@carbon/ibmdotcom-web-components 1.26.0-rc.1 → 1.26.0-rc.3
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/es/component-mixins/cta/cta.d.ts.map +1 -1
- package/es/component-mixins/cta/cta.js +12 -12
- package/es/component-mixins/cta/cta.js.map +1 -1
- package/es/component-mixins/cta/video.d.ts.map +1 -1
- package/es/component-mixins/cta/video.js +5 -5
- package/es/component-mixins/cta/video.js.map +1 -1
- package/es/components/back-to-top/__stories__/data/content.d.ts.map +1 -1
- package/es/components/back-to-top/__stories__/data/content.js +1 -1
- package/es/components/back-to-top/__stories__/data/content.js.map +1 -1
- package/es/components/back-to-top/back-to-top.d.ts +1 -1
- package/es/components/back-to-top/back-to-top.d.ts.map +1 -1
- package/es/components/back-to-top/back-to-top.js +3 -3
- package/es/components/back-to-top/back-to-top.js.map +1 -1
- package/es/components/background-media/background-media.d.ts.map +1 -1
- package/es/components/background-media/background-media.js +2 -2
- package/es/components/background-media/background-media.js.map +1 -1
- package/es/components/button/button.d.ts +1 -4
- package/es/components/button/button.d.ts.map +1 -1
- package/es/components/button/button.js +3 -3
- package/es/components/button/button.js.map +1 -1
- package/es/components/button-group/button-group.d.ts.map +1 -1
- package/es/components/button-group/button-group.js +1 -1
- package/es/components/button-group/button-group.js.map +1 -1
- package/es/components/card/card.d.ts +1 -1
- package/es/components/card/card.d.ts.map +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/card/card.js.map +1 -1
- package/es/components/card-in-card/card-in-card.d.ts.map +1 -1
- package/es/components/card-in-card/card-in-card.js +1 -1
- package/es/components/card-in-card/card-in-card.js.map +1 -1
- package/es/components/carousel/carousel.d.ts +10 -1
- package/es/components/carousel/carousel.d.ts.map +1 -1
- package/es/components/carousel/carousel.js +6 -6
- package/es/components/carousel/carousel.js.map +1 -1
- package/es/components/content-item-horizontal/content-item-horizontal-media.d.ts +3 -9
- package/es/components/content-item-horizontal/content-item-horizontal-media.d.ts.map +1 -1
- package/es/components/content-item-horizontal/content-item-horizontal-media.js +2 -2
- package/es/components/content-item-horizontal/content-item-horizontal-media.js.map +1 -1
- package/es/components/cta/card-cta.d.ts.map +1 -1
- package/es/components/cta/card-cta.js +1 -1
- package/es/components/cta/card-cta.js.map +1 -1
- package/es/components/cta/feature-cta.d.ts +4 -1
- package/es/components/cta/feature-cta.d.ts.map +1 -1
- package/es/components/cta/feature-cta.js +1 -1
- package/es/components/cta/feature-cta.js.map +1 -1
- package/es/components/cta/video-cta-composite.d.ts +9 -6
- package/es/components/cta/video-cta-composite.d.ts.map +1 -1
- package/es/components/cta/video-cta-composite.js +3 -3
- package/es/components/cta/video-cta-composite.js.map +1 -1
- package/es/components/dotcom-shell/__stories__/data/content.d.ts.map +1 -1
- package/es/components/dotcom-shell/__stories__/data/content.js +1 -1
- package/es/components/dotcom-shell/__stories__/data/content.js.map +1 -1
- package/es/components/expressive-modal/expressive-modal-body.d.ts +1 -1
- package/es/components/expressive-modal/expressive-modal-body.d.ts.map +1 -1
- package/es/components/expressive-modal/expressive-modal-body.js +1 -1
- package/es/components/expressive-modal/expressive-modal-body.js.map +1 -1
- package/es/components/expressive-modal/expressive-modal-close-button.d.ts +1 -1
- package/es/components/expressive-modal/expressive-modal-close-button.d.ts.map +1 -1
- package/es/components/expressive-modal/expressive-modal-close-button.js +1 -1
- package/es/components/expressive-modal/expressive-modal-close-button.js.map +1 -1
- package/es/components/expressive-modal/expressive-modal-footer.d.ts +1 -1
- package/es/components/expressive-modal/expressive-modal-footer.d.ts.map +1 -1
- package/es/components/expressive-modal/expressive-modal-footer.js +1 -1
- package/es/components/expressive-modal/expressive-modal-footer.js.map +1 -1
- package/es/components/expressive-modal/expressive-modal-header.d.ts +1 -1
- package/es/components/expressive-modal/expressive-modal-header.d.ts.map +1 -1
- package/es/components/expressive-modal/expressive-modal-header.js +1 -1
- package/es/components/expressive-modal/expressive-modal-header.js.map +1 -1
- package/es/components/expressive-modal/expressive-modal-heading.d.ts +1 -1
- package/es/components/expressive-modal/expressive-modal-heading.d.ts.map +1 -1
- package/es/components/expressive-modal/expressive-modal-heading.js +1 -1
- package/es/components/expressive-modal/expressive-modal-heading.js.map +1 -1
- package/es/components/expressive-modal/expressive-modal.d.ts +5 -10
- package/es/components/expressive-modal/expressive-modal.d.ts.map +1 -1
- package/es/components/expressive-modal/expressive-modal.js +3 -3
- package/es/components/expressive-modal/expressive-modal.js.map +1 -1
- package/es/components/filter-panel/filter-group-item.d.ts +2 -4
- package/es/components/filter-panel/filter-group-item.d.ts.map +1 -1
- package/es/components/filter-panel/filter-group-item.js +1 -1
- package/es/components/filter-panel/filter-group-item.js.map +1 -1
- package/es/components/filter-panel/filter-group.d.ts +1 -1
- package/es/components/filter-panel/filter-group.d.ts.map +1 -1
- package/es/components/filter-panel/filter-group.js +1 -1
- package/es/components/filter-panel/filter-group.js.map +1 -1
- package/es/components/filter-panel/filter-modal-button.d.ts +1 -1
- package/es/components/filter-panel/filter-modal-button.d.ts.map +1 -1
- package/es/components/filter-panel/filter-modal-button.js +1 -1
- package/es/components/filter-panel/filter-modal-button.js.map +1 -1
- package/es/components/filter-panel/filter-modal-footer.d.ts +1 -1
- package/es/components/filter-panel/filter-modal-footer.d.ts.map +1 -1
- package/es/components/filter-panel/filter-modal-footer.js +1 -1
- package/es/components/filter-panel/filter-modal-footer.js.map +1 -1
- package/es/components/filter-panel/filter-modal-heading.d.ts +1 -1
- package/es/components/filter-panel/filter-modal-heading.d.ts.map +1 -1
- package/es/components/filter-panel/filter-modal-heading.js +1 -1
- package/es/components/filter-panel/filter-modal-heading.js.map +1 -1
- package/es/components/filter-panel/filter-panel-checkbox.d.ts +2 -2
- package/es/components/filter-panel/filter-panel-checkbox.d.ts.map +1 -1
- package/es/components/filter-panel/filter-panel-checkbox.js +3 -3
- package/es/components/filter-panel/filter-panel-checkbox.js.map +1 -1
- package/es/components/filter-panel/filter-panel-composite.d.ts +20 -12
- package/es/components/filter-panel/filter-panel-composite.d.ts.map +1 -1
- package/es/components/filter-panel/filter-panel-composite.js +4 -4
- package/es/components/filter-panel/filter-panel-composite.js.map +1 -1
- package/es/components/filter-panel/filter-panel-input-select-item.d.ts +0 -3
- package/es/components/filter-panel/filter-panel-input-select-item.d.ts.map +1 -1
- package/es/components/filter-panel/filter-panel-input-select-item.js +2 -2
- package/es/components/filter-panel/filter-panel-input-select-item.js.map +1 -1
- package/es/components/filter-panel/filter-panel-input-select.d.ts +5 -1
- package/es/components/filter-panel/filter-panel-input-select.d.ts.map +1 -1
- package/es/components/filter-panel/filter-panel-input-select.js +2 -2
- package/es/components/filter-panel/filter-panel-input-select.js.map +1 -1
- package/es/components/filter-panel/filter-panel-modal.d.ts +4 -6
- package/es/components/filter-panel/filter-panel-modal.d.ts.map +1 -1
- package/es/components/filter-panel/filter-panel-modal.js +3 -3
- package/es/components/filter-panel/filter-panel-modal.js.map +1 -1
- package/es/components/filter-panel/filter-panel.d.ts +4 -2
- package/es/components/filter-panel/filter-panel.d.ts.map +1 -1
- package/es/components/filter-panel/filter-panel.js +2 -2
- package/es/components/filter-panel/filter-panel.js.map +1 -1
- package/es/components/footer/combo-box.d.ts +1 -1
- package/es/components/footer/combo-box.d.ts.map +1 -1
- package/es/components/footer/combo-box.js +1 -1
- package/es/components/footer/combo-box.js.map +1 -1
- package/es/components/footer/defs.d.ts +1 -1
- package/es/components/footer/defs.d.ts.map +1 -1
- package/es/components/footer/defs.js +1 -1
- package/es/components/footer/defs.js.map +1 -1
- package/es/components/footer/dropdown.d.ts +1 -1
- package/es/components/footer/dropdown.d.ts.map +1 -1
- package/es/components/footer/dropdown.js +3 -3
- package/es/components/footer/dropdown.js.map +1 -1
- package/es/components/footer/footer-composite.d.ts +3 -8
- package/es/components/footer/footer-composite.d.ts.map +1 -1
- package/es/components/footer/footer-composite.js +5 -5
- package/es/components/footer/footer-composite.js.map +1 -1
- package/es/components/footer/footer-logo.d.ts.map +1 -1
- package/es/components/footer/footer-logo.js +2 -2
- package/es/components/footer/footer-logo.js.map +1 -1
- package/es/components/footer/footer-nav-group.d.ts.map +1 -1
- package/es/components/footer/footer-nav-group.js +1 -1
- package/es/components/footer/footer-nav-group.js.map +1 -1
- package/es/components/footer/footer-nav-item.d.ts +1 -1
- package/es/components/footer/footer-nav-item.d.ts.map +1 -1
- package/es/components/footer/footer-nav-item.js +1 -1
- package/es/components/footer/footer-nav-item.js.map +1 -1
- package/es/components/footer/language-selector-desktop.d.ts.map +1 -1
- package/es/components/footer/language-selector-desktop.js +2 -2
- package/es/components/footer/language-selector-desktop.js.map +1 -1
- package/es/components/footer/language-selector-mobile.d.ts.map +1 -1
- package/es/components/footer/language-selector-mobile.js +2 -2
- package/es/components/footer/language-selector-mobile.js.map +1 -1
- package/es/components/footer/locale-button.d.ts +3 -1
- package/es/components/footer/locale-button.d.ts.map +1 -1
- package/es/components/footer/locale-button.js +3 -3
- package/es/components/footer/locale-button.js.map +1 -1
- package/es/components/image/image.d.ts +5 -1
- package/es/components/image/image.d.ts.map +1 -1
- package/es/components/image/image.js +3 -3
- package/es/components/image/image.js.map +1 -1
- package/es/components/image-with-caption/image-with-caption.d.ts.map +1 -1
- package/es/components/image-with-caption/image-with-caption.js +3 -3
- package/es/components/image-with-caption/image-with-caption.js.map +1 -1
- package/es/components/leadspace/breadcrumb-item.d.ts +1 -1
- package/es/components/leadspace/breadcrumb-item.d.ts.map +1 -1
- package/es/components/leadspace/breadcrumb-item.js +1 -1
- package/es/components/leadspace/breadcrumb-item.js.map +1 -1
- package/es/components/leadspace/breadcrumb-link.d.ts +1 -1
- package/es/components/leadspace/breadcrumb-link.d.ts.map +1 -1
- package/es/components/leadspace/breadcrumb-link.js +1 -1
- package/es/components/leadspace/breadcrumb-link.js.map +1 -1
- package/es/components/leadspace/breadcrumb.d.ts +1 -1
- package/es/components/leadspace/breadcrumb.d.ts.map +1 -1
- package/es/components/leadspace/breadcrumb.js +1 -1
- package/es/components/leadspace/breadcrumb.js.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-composite.d.ts +8 -6
- package/es/components/leaving-ibm/leaving-ibm-composite.d.ts.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-composite.js +7 -7
- package/es/components/leaving-ibm/leaving-ibm-composite.js.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal-body.d.ts +2 -2
- package/es/components/leaving-ibm/leaving-ibm-modal-body.d.ts.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal-body.js +3 -3
- package/es/components/leaving-ibm/leaving-ibm-modal-body.js.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal-heading.d.ts +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal-heading.d.ts.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal-heading.js +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal-heading.js.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal.d.ts +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal.d.ts.map +1 -1
- package/es/components/leaving-ibm/leaving-ibm-modal.js +2 -2
- package/es/components/leaving-ibm/leaving-ibm-modal.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-image-viewer.d.ts.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-image-viewer.js +1 -1
- package/es/components/lightbox-media-viewer/lightbox-image-viewer.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.d.ts +3 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.d.ts.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.d.ts +1 -3
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.d.ts.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js +2 -2
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js.map +1 -1
- package/es/components/link-with-icon/link-with-icon.d.ts +1 -1
- package/es/components/link-with-icon/link-with-icon.d.ts.map +1 -1
- package/es/components/link-with-icon/link-with-icon.js +1 -1
- package/es/components/link-with-icon/link-with-icon.js.map +1 -1
- package/es/components/locale-modal/locale-item.d.ts +1 -1
- package/es/components/locale-modal/locale-item.d.ts.map +1 -1
- package/es/components/locale-modal/locale-item.js +1 -1
- package/es/components/locale-modal/locale-item.js.map +1 -1
- package/es/components/locale-modal/locale-modal-composite.d.ts.map +1 -1
- package/es/components/locale-modal/locale-modal-composite.js +1 -1
- package/es/components/locale-modal/locale-modal-composite.js.map +1 -1
- package/es/components/locale-modal/locale-modal.d.ts.map +1 -1
- package/es/components/locale-modal/locale-modal.js +5 -5
- package/es/components/locale-modal/locale-modal.js.map +1 -1
- package/es/components/locale-modal/locale-search.d.ts.map +1 -1
- package/es/components/locale-modal/locale-search.js +1 -1
- package/es/components/locale-modal/locale-search.js.map +1 -1
- package/es/components/locale-modal/region-item.d.ts +1 -1
- package/es/components/locale-modal/region-item.d.ts.map +1 -1
- package/es/components/locale-modal/region-item.js +3 -3
- package/es/components/locale-modal/region-item.js.map +1 -1
- package/es/components/locale-modal/regions.d.ts +1 -1
- package/es/components/locale-modal/regions.d.ts.map +1 -1
- package/es/components/locale-modal/regions.js +1 -1
- package/es/components/locale-modal/regions.js.map +1 -1
- package/es/components/markdown/markdown.d.ts +4 -4
- package/es/components/markdown/markdown.d.ts.map +1 -1
- package/es/components/markdown/markdown.js +4 -4
- package/es/components/markdown/markdown.js.map +1 -1
- package/es/components/masthead/cloud/cloud-left-nav-item.d.ts +1 -1
- package/es/components/masthead/cloud/cloud-left-nav-item.d.ts.map +1 -1
- package/es/components/masthead/cloud/cloud-left-nav-item.js +1 -1
- package/es/components/masthead/cloud/cloud-left-nav-item.js.map +1 -1
- package/es/components/masthead/cloud/cloud-masthead-composite.d.ts.map +1 -1
- package/es/components/masthead/cloud/cloud-masthead-composite.js +1 -1
- package/es/components/masthead/cloud/cloud-masthead-composite.js.map +1 -1
- package/es/components/masthead/cloud/cloud-masthead-profile.d.ts.map +1 -1
- package/es/components/masthead/cloud/cloud-masthead-profile.js +1 -1
- package/es/components/masthead/cloud/cloud-masthead-profile.js.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-category-heading.d.ts.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-category-heading.js +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-category-heading.js.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-category-link.d.ts +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-category-link.d.ts.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-category-link.js +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-category-link.js.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tab.d.ts +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tab.d.ts.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tab.js +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tab.js.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tabs.d.ts +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tabs.d.ts.map +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tabs.js +1 -1
- package/es/components/masthead/cloud/cloud-megamenu-tabs.js.map +1 -1
- package/es/components/masthead/left-nav-item.d.ts +1 -1
- package/es/components/masthead/left-nav-item.d.ts.map +1 -1
- package/es/components/masthead/left-nav-item.js +1 -1
- package/es/components/masthead/left-nav-item.js.map +1 -1
- package/es/components/masthead/left-nav-menu-item.d.ts +1 -1
- package/es/components/masthead/left-nav-menu-item.d.ts.map +1 -1
- package/es/components/masthead/left-nav-menu-item.js +1 -1
- package/es/components/masthead/left-nav-menu-item.js.map +1 -1
- package/es/components/masthead/left-nav-menu-section.d.ts +11 -12
- package/es/components/masthead/left-nav-menu-section.d.ts.map +1 -1
- package/es/components/masthead/left-nav-menu-section.js +6 -6
- package/es/components/masthead/left-nav-menu-section.js.map +1 -1
- package/es/components/masthead/left-nav-menu.d.ts +3 -0
- package/es/components/masthead/left-nav-menu.d.ts.map +1 -1
- package/es/components/masthead/left-nav-menu.js +2 -2
- package/es/components/masthead/left-nav-menu.js.map +1 -1
- package/es/components/masthead/left-nav-name.d.ts +1 -1
- package/es/components/masthead/left-nav-name.d.ts.map +1 -1
- package/es/components/masthead/left-nav-name.js +2 -2
- package/es/components/masthead/left-nav-name.js.map +1 -1
- package/es/components/masthead/left-nav.d.ts +1 -1
- package/es/components/masthead/left-nav.d.ts.map +1 -1
- package/es/components/masthead/left-nav.js +3 -3
- package/es/components/masthead/left-nav.js.map +1 -1
- package/es/components/masthead/masthead-composite.d.ts.map +1 -1
- package/es/components/masthead/masthead-composite.js +2 -2
- package/es/components/masthead/masthead-composite.js.map +1 -1
- package/es/components/masthead/masthead-global-bar.d.ts +7 -4
- package/es/components/masthead/masthead-global-bar.d.ts.map +1 -1
- package/es/components/masthead/masthead-global-bar.js +3 -3
- package/es/components/masthead/masthead-global-bar.js.map +1 -1
- package/es/components/masthead/masthead-logo.d.ts +7 -12
- package/es/components/masthead/masthead-logo.d.ts.map +1 -1
- package/es/components/masthead/masthead-logo.js +4 -4
- package/es/components/masthead/masthead-logo.js.map +1 -1
- package/es/components/masthead/masthead-menu-button.d.ts +2 -2
- package/es/components/masthead/masthead-menu-button.d.ts.map +1 -1
- package/es/components/masthead/masthead-menu-button.js +3 -3
- package/es/components/masthead/masthead-menu-button.js.map +1 -1
- package/es/components/masthead/masthead-profile-item.d.ts +1 -1
- package/es/components/masthead/masthead-profile-item.d.ts.map +1 -1
- package/es/components/masthead/masthead-profile-item.js +1 -1
- package/es/components/masthead/masthead-profile-item.js.map +1 -1
- package/es/components/masthead/masthead-profile.d.ts +1 -1
- package/es/components/masthead/masthead-profile.d.ts.map +1 -1
- package/es/components/masthead/masthead-profile.js +5 -5
- package/es/components/masthead/masthead-profile.js.map +1 -1
- package/es/components/masthead/megamenu-category-group.d.ts.map +1 -1
- package/es/components/masthead/megamenu-category-group.js +2 -2
- package/es/components/masthead/megamenu-category-group.js.map +1 -1
- package/es/components/masthead/megamenu-category-link.d.ts +1 -1
- package/es/components/masthead/megamenu-category-link.d.ts.map +1 -1
- package/es/components/masthead/megamenu-category-link.js +1 -1
- package/es/components/masthead/megamenu-category-link.js.map +1 -1
- package/es/components/masthead/megamenu-link-with-icon.d.ts +1 -1
- package/es/components/masthead/megamenu-link-with-icon.d.ts.map +1 -1
- package/es/components/masthead/megamenu-link-with-icon.js +1 -1
- package/es/components/masthead/megamenu-link-with-icon.js.map +1 -1
- package/es/components/masthead/megamenu-right-navigation.d.ts.map +1 -1
- package/es/components/masthead/megamenu-right-navigation.js +1 -1
- package/es/components/masthead/megamenu-right-navigation.js.map +1 -1
- package/es/components/masthead/skip-to-content.d.ts +1 -1
- package/es/components/masthead/skip-to-content.d.ts.map +1 -1
- package/es/components/masthead/skip-to-content.js +1 -1
- package/es/components/masthead/skip-to-content.js.map +1 -1
- package/es/components/masthead/top-nav-item.d.ts +1 -1
- package/es/components/masthead/top-nav-item.d.ts.map +1 -1
- package/es/components/masthead/top-nav-item.js +1 -1
- package/es/components/masthead/top-nav-item.js.map +1 -1
- package/es/components/masthead/top-nav-menu-item.d.ts +1 -1
- package/es/components/masthead/top-nav-menu-item.d.ts.map +1 -1
- package/es/components/masthead/top-nav-menu-item.js +1 -1
- package/es/components/masthead/top-nav-menu-item.js.map +1 -1
- package/es/components/masthead/top-nav-menu.d.ts +1 -1
- package/es/components/masthead/top-nav-menu.d.ts.map +1 -1
- package/es/components/masthead/top-nav-menu.js +1 -1
- package/es/components/masthead/top-nav-menu.js.map +1 -1
- package/es/components/masthead/top-nav-name.d.ts.map +1 -1
- package/es/components/masthead/top-nav-name.js +1 -1
- package/es/components/masthead/top-nav-name.js.map +1 -1
- package/es/components/masthead/top-nav.d.ts +2 -11
- package/es/components/masthead/top-nav.d.ts.map +1 -1
- package/es/components/masthead/top-nav.js +6 -6
- package/es/components/masthead/top-nav.js.map +1 -1
- package/es/components/pricing-table/pricing-table-annotation-toggle.d.ts.map +1 -1
- package/es/components/pricing-table/pricing-table-annotation-toggle.js +2 -2
- package/es/components/pricing-table/pricing-table-annotation-toggle.js.map +1 -1
- package/es/components/pricing-table/pricing-table-cell.d.ts +1 -1
- package/es/components/pricing-table/pricing-table-cell.d.ts.map +1 -1
- package/es/components/pricing-table/pricing-table-cell.js +2 -2
- package/es/components/pricing-table/pricing-table-cell.js.map +1 -1
- package/es/components/pricing-table/pricing-table.d.ts +5 -8
- package/es/components/pricing-table/pricing-table.d.ts.map +1 -1
- package/es/components/pricing-table/pricing-table.js +2 -2
- package/es/components/pricing-table/pricing-table.js.map +1 -1
- package/es/components/search/search.d.ts +2 -2
- package/es/components/search/search.d.ts.map +1 -1
- package/es/components/search/search.js +2 -2
- package/es/components/search/search.js.map +1 -1
- package/es/components/search-with-typeahead/scoped-search-dropdown-mobile.d.ts.map +1 -1
- package/es/components/search-with-typeahead/scoped-search-dropdown-mobile.js +4 -4
- package/es/components/search-with-typeahead/scoped-search-dropdown-mobile.js.map +1 -1
- package/es/components/search-with-typeahead/search-with-typeahead.d.ts +10 -16
- package/es/components/search-with-typeahead/search-with-typeahead.d.ts.map +1 -1
- package/es/components/search-with-typeahead/search-with-typeahead.js +6 -6
- package/es/components/search-with-typeahead/search-with-typeahead.js.map +1 -1
- package/es/components/structured-list/index.d.ts +2 -2
- package/es/components/structured-list/index.d.ts.map +1 -1
- package/es/components/structured-list/index.js +2 -2
- package/es/components/structured-list/index.js.map +1 -1
- package/es/components/structured-list/structured-list-body.d.ts +1 -1
- package/es/components/structured-list/structured-list-body.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-body.js +1 -1
- package/es/components/structured-list/structured-list-body.js.map +1 -1
- package/es/components/structured-list/structured-list-cell.d.ts +1 -1
- package/es/components/structured-list/structured-list-cell.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-cell.js +4 -4
- package/es/components/structured-list/structured-list-cell.js.map +1 -1
- package/es/components/structured-list/structured-list-head.d.ts +1 -1
- package/es/components/structured-list/structured-list-head.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-head.js +1 -1
- package/es/components/structured-list/structured-list-head.js.map +1 -1
- package/es/components/structured-list/structured-list-header-cell.d.ts +1 -1
- package/es/components/structured-list/structured-list-header-cell.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-header-cell.js +1 -1
- package/es/components/structured-list/structured-list-header-cell.js.map +1 -1
- package/es/components/structured-list/structured-list-header-row.d.ts +1 -1
- package/es/components/structured-list/structured-list-header-row.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-header-row.js +1 -1
- package/es/components/structured-list/structured-list-header-row.js.map +1 -1
- package/es/components/structured-list/structured-list-row.d.ts +1 -1
- package/es/components/structured-list/structured-list-row.d.ts.map +1 -1
- package/es/components/structured-list/structured-list-row.js +1 -1
- package/es/components/structured-list/structured-list-row.js.map +1 -1
- package/es/components/table-of-contents/table-of-contents.d.ts +24 -6
- package/es/components/table-of-contents/table-of-contents.d.ts.map +1 -1
- package/es/components/table-of-contents/table-of-contents.js +5 -5
- package/es/components/table-of-contents/table-of-contents.js.map +1 -1
- package/es/components/tabs-extended/tabs-extended.d.ts.map +1 -1
- package/es/components/tabs-extended/tabs-extended.js +1 -1
- package/es/components/tabs-extended/tabs-extended.js.map +1 -1
- package/es/components/tag-link/tag-link.d.ts.map +1 -1
- package/es/components/tag-link/tag-link.js +1 -1
- package/es/components/tag-link/tag-link.js.map +1 -1
- package/es/components/video-player/video-player-composite.d.ts +7 -2
- package/es/components/video-player/video-player-composite.d.ts.map +1 -1
- package/es/components/video-player/video-player-composite.js +3 -3
- package/es/components/video-player/video-player-composite.js.map +1 -1
- package/es/components/video-player/video-player.d.ts +6 -0
- package/es/components/video-player/video-player.d.ts.map +1 -1
- package/es/components/video-player/video-player.js +2 -2
- package/es/components/video-player/video-player.js.map +1 -1
- package/es/components-react/back-to-top/back-to-top.js +1 -1
- package/es/components-react/background-media/background-media.js +1 -1
- package/es/components-react/button/button.js +2 -2
- package/es/components-react/button-group/button-group-item.js +1 -1
- package/es/components-react/button-group/button-group.js +1 -1
- package/es/components-react/callout-quote/callout-link-with-icon.js +1 -1
- package/es/components-react/callout-quote/callout-quote.js +1 -1
- package/es/components-react/callout-with-media/callout-with-media-copy.js +1 -1
- package/es/components-react/callout-with-media/callout-with-media-image.js +1 -1
- package/es/components-react/callout-with-media/callout-with-media-video.js +1 -1
- package/es/components-react/callout-with-media/callout-with-media.js +1 -1
- package/es/components-react/card/card-eyebrow.js +1 -1
- package/es/components-react/card/card-footer.js +1 -1
- package/es/components-react/card/card-heading.js +1 -1
- package/es/components-react/card/card.js +3 -3
- package/es/components-react/card/image-logo.js +1 -1
- package/es/components-react/card-group/card-group-card-link-item.js +1 -1
- package/es/components-react/card-group/card-group-item.js +1 -1
- package/es/components-react/card-group/card-group.js +1 -1
- package/es/components-react/card-in-card/card-in-card-image.js +1 -1
- package/es/components-react/card-in-card/card-in-card.js +1 -1
- package/es/components-react/card-link/card-link-heading.js +1 -1
- package/es/components-react/card-link/card-link.js +1 -1
- package/es/components-react/card-section-carousel/card-section-carousel.js +1 -1
- package/es/components-react/card-section-offset/card-section-offset.js +1 -1
- package/es/components-react/card-section-simple/card-section-simple.js +1 -1
- package/es/components-react/carousel/carousel.js +1 -1
- package/es/components-react/content-block/content-block-complementary.js +1 -1
- package/es/components-react/content-block/content-block-copy.js +1 -1
- package/es/components-react/content-block/content-block-heading.js +1 -1
- package/es/components-react/content-block/content-block-paragraph.js +1 -1
- package/es/components-react/content-block/content-block.js +1 -1
- package/es/components-react/content-block-cards/content-block-cards.js +1 -1
- package/es/components-react/content-block-horizontal/content-block-horizontal.js +1 -1
- package/es/components-react/content-block-media/content-block-media-content.js +1 -1
- package/es/components-react/content-block-media/content-block-media.js +1 -1
- package/es/components-react/content-block-mixed/content-block-mixed.js +1 -1
- package/es/components-react/content-block-segmented/content-block-segmented-item.js +1 -1
- package/es/components-react/content-block-segmented/content-block-segmented.js +1 -1
- package/es/components-react/content-block-simple/content-block-simple.js +1 -1
- package/es/components-react/content-group/content-group-copy.js +1 -1
- package/es/components-react/content-group/content-group-heading.js +1 -1
- package/es/components-react/content-group/content-group-paragraph.js +1 -1
- package/es/components-react/content-group/content-group.js +1 -1
- package/es/components-react/content-group-banner/content-group-banner.js +1 -1
- package/es/components-react/content-group-cards/content-group-cards-item.js +1 -1
- package/es/components-react/content-group-cards/content-group-cards.js +1 -1
- package/es/components-react/content-group-pictograms/content-group-pictograms.js +1 -1
- package/es/components-react/content-group-simple/content-group-simple.js +1 -1
- package/es/components-react/content-item/content-item-copy.js +1 -1
- package/es/components-react/content-item/content-item-heading.js +1 -1
- package/es/components-react/content-item/content-item-paragraph.js +1 -1
- package/es/components-react/content-item/content-item.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal-copy.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal-eyebrow.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal-media-copy.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal-media-featured.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal-media-video.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal-media.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal-thumbnail-copy.js +1 -1
- package/es/components-react/content-item-horizontal/content-item-horizontal.js +1 -1
- package/es/components-react/content-section/content-section-copy.js +1 -1
- package/es/components-react/content-section/content-section-heading.js +1 -1
- package/es/components-react/content-section/content-section.js +1 -1
- package/es/components-react/cta/button-cta.js +1 -1
- package/es/components-react/cta/card-cta-footer.js +1 -1
- package/es/components-react/cta/card-cta-image.js +1 -1
- package/es/components-react/cta/card-cta.js +1 -1
- package/es/components-react/cta/card-link-cta.js +1 -1
- package/es/components-react/cta/feature-cta-footer.js +1 -1
- package/es/components-react/cta/feature-cta.js +1 -1
- package/es/components-react/cta/link-list-item-card-cta.js +1 -1
- package/es/components-react/cta/link-list-item-cta.js +1 -1
- package/es/components-react/cta/text-cta.js +1 -1
- package/es/components-react/cta/video-cta-composite.js +1 -1
- package/es/components-react/cta/video-cta-container.js +1 -1
- package/es/components-react/cta-block/cta-block-item-row.js +1 -1
- package/es/components-react/cta-block/cta-block-item.js +1 -1
- package/es/components-react/cta-block/cta-block.js +1 -1
- package/es/components-react/cta-section/cta-section.js +1 -1
- package/es/components-react/dotcom-shell/dotcom-shell-composite.js +1 -1
- package/es/components-react/dotcom-shell/dotcom-shell-container.js +1 -1
- package/es/components-react/dotcom-shell/dotcom-shell.js +1 -1
- package/es/components-react/expressive-modal/expressive-modal-body.js +3 -3
- package/es/components-react/expressive-modal/expressive-modal-close-button.js +3 -3
- package/es/components-react/expressive-modal/expressive-modal-footer.js +3 -3
- package/es/components-react/expressive-modal/expressive-modal-header.js +3 -3
- package/es/components-react/expressive-modal/expressive-modal-heading.js +3 -3
- package/es/components-react/expressive-modal/expressive-modal.js +1 -1
- package/es/components-react/feature-card/feature-card-footer.js +1 -1
- package/es/components-react/feature-card/feature-card.js +1 -1
- package/es/components-react/feature-section/feature-section-card-link.js +1 -1
- package/es/components-react/feature-section/feature-section.js +1 -1
- package/es/components-react/filter-panel/filter-group-item.js +3 -3
- package/es/components-react/filter-panel/filter-group.js +3 -3
- package/es/components-react/filter-panel/filter-modal-button.js +3 -3
- package/es/components-react/filter-panel/filter-modal-footer.js +3 -3
- package/es/components-react/filter-panel/filter-modal-heading.js +3 -3
- package/es/components-react/filter-panel/filter-panel-checkbox.js +3 -3
- package/es/components-react/filter-panel/filter-panel-composite.js +1 -1
- package/es/components-react/filter-panel/filter-panel-heading.js +1 -1
- package/es/components-react/filter-panel/filter-panel-input-select-item.js +1 -1
- package/es/components-react/filter-panel/filter-panel-input-select.js +1 -1
- package/es/components-react/filter-panel/filter-panel-modal.js +3 -3
- package/es/components-react/filter-panel/filter-panel.js +1 -1
- package/es/components-react/footer/dropdown.js +3 -3
- package/es/components-react/footer/footer-composite.js +1 -1
- package/es/components-react/footer/footer-container.js +1 -1
- package/es/components-react/horizontal-rule/horizontal-rule.js +1 -1
- package/es/components-react/image/image-item.js +1 -1
- package/es/components-react/image/image.js +1 -1
- package/es/components-react/leadspace/breadcrumb-item.js +3 -3
- package/es/components-react/leadspace/breadcrumb-link.js +3 -3
- package/es/components-react/leadspace/breadcrumb.js +3 -3
- package/es/components-react/leadspace/leadspace-heading.js +1 -1
- package/es/components-react/leadspace/leadspace-image.js +1 -1
- package/es/components-react/leadspace/leadspace.js +1 -1
- package/es/components-react/leadspace-block/leadspace-block-content.js +1 -1
- package/es/components-react/leadspace-block/leadspace-block-cta.js +1 -1
- package/es/components-react/leadspace-block/leadspace-block-heading.js +1 -1
- package/es/components-react/leadspace-block/leadspace-block-media.js +1 -1
- package/es/components-react/leadspace-block/leadspace-block.js +1 -1
- package/es/components-react/leadspace-with-search/leadspace-with-search-content-copy.js +1 -1
- package/es/components-react/leadspace-with-search/leadspace-with-search-content-heading.js +1 -1
- package/es/components-react/leadspace-with-search/leadspace-with-search-content.js +1 -1
- package/es/components-react/leadspace-with-search/leadspace-with-search-heading.js +1 -1
- package/es/components-react/leadspace-with-search/leadspace-with-search.js +1 -1
- package/es/components-react/leaving-ibm/leaving-ibm-composite.js +1 -1
- package/es/components-react/leaving-ibm/leaving-ibm-container.js +1 -1
- package/es/components-react/leaving-ibm/leaving-ibm-modal-body.js +3 -3
- package/es/components-react/leaving-ibm/leaving-ibm-modal-heading.js +3 -3
- package/es/components-react/leaving-ibm/leaving-ibm-modal-supplemental.js +1 -1
- package/es/components-react/leaving-ibm/leaving-ibm-modal.js +3 -3
- package/es/components-react/lightbox-media-viewer/lightbox-image-viewer.js +1 -1
- package/es/components-react/lightbox-media-viewer/lightbox-media-viewer.js +1 -1
- package/es/components-react/lightbox-media-viewer/lightbox-video-player-composite.js +1 -1
- package/es/components-react/lightbox-media-viewer/lightbox-video-player-container.js +1 -1
- package/es/components-react/lightbox-media-viewer/lightbox-video-player.js +1 -1
- package/es/components-react/link-list/link-list-heading.js +1 -1
- package/es/components-react/link-list/link-list-item-card.js +1 -1
- package/es/components-react/link-list/link-list-item.js +1 -1
- package/es/components-react/link-list/link-list.js +1 -1
- package/es/components-react/link-list-section/link-list-section.js +1 -1
- package/es/components-react/link-with-icon/link-with-icon.js +3 -3
- package/es/components-react/locale-modal/locale-modal-composite.js +1 -1
- package/es/components-react/locale-modal/locale-modal-container.js +1 -1
- package/es/components-react/logo-grid/logo-grid-item.js +1 -1
- package/es/components-react/logo-grid/logo-grid-link.js +1 -1
- package/es/components-react/logo-grid/logo-grid.js +1 -1
- package/es/components-react/markdown/markdown.js +1 -1
- package/es/components-react/masthead/masthead-composite.js +1 -1
- package/es/components-react/masthead/masthead-container.js +1 -1
- package/es/components-react/masthead/masthead.js +1 -1
- package/es/components-react/pictogram-item/pictogram-item.js +1 -1
- package/es/components-react/quote/quote-link-with-icon.js +1 -1
- package/es/components-react/quote/quote-source-bottom-copy.js +1 -1
- package/es/components-react/quote/quote-source-copy.js +1 -1
- package/es/components-react/quote/quote-source-heading.js +1 -1
- package/es/components-react/quote/quote.js +1 -1
- package/es/components-react/search-with-typeahead/scoped-search-dropdown-mobile.js +3 -3
- package/es/components-react/search-with-typeahead/scoped-search-dropdown.js +1 -1
- package/es/components-react/search-with-typeahead/search-with-typeahead-item.js +1 -1
- package/es/components-react/search-with-typeahead/search-with-typeahead.js +3 -3
- package/es/components-react/structured-list/structured-list-body.js +3 -3
- package/es/components-react/structured-list/structured-list-cell.js +3 -3
- package/es/components-react/structured-list/structured-list-group.js +1 -1
- package/es/components-react/structured-list/structured-list-head.js +3 -3
- package/es/components-react/structured-list/structured-list-header-cell.js +3 -3
- package/es/components-react/structured-list/structured-list-header-row.js +3 -3
- package/es/components-react/structured-list/structured-list-row.js +3 -3
- package/es/components-react/structured-list/structured-list.js +1 -1
- package/es/components-react/table-of-contents/table-of-contents.js +1 -1
- package/es/components-react/tabs-extended/tab.js +1 -1
- package/es/components-react/tabs-extended/tabs-extended.js +1 -1
- package/es/components-react/tabs-extended-media/tabs-extended-media.js +1 -1
- package/es/components-react/tag-group/tag-group.js +1 -1
- package/es/components-react/tag-link/tag-link.js +1 -1
- package/es/components-react/universal-banner/universal-banner-copy.js +1 -1
- package/es/components-react/universal-banner/universal-banner-heading.js +1 -1
- package/es/components-react/universal-banner/universal-banner-image.js +1 -1
- package/es/components-react/universal-banner/universal-banner.js +1 -1
- package/es/components-react/video-player/video-player-composite.js +1 -1
- package/es/components-react/video-player/video-player-container.js +1 -1
- package/es/components-react/video-player/video-player.js +1 -1
- package/es/icons/IBM-8bar-logo--h23.js +1 -1
- package/es/icons/IBM-8bar-logo--h65-white.js +1 -1
- package/es/icons/play-video.js +1 -1
- package/lib/components-react-node/back-to-top/back-to-top.js +1 -1
- package/lib/components-react-node/background-media/background-media.js +1 -1
- package/lib/components-react-node/button/button.js +2 -2
- package/lib/components-react-node/button-group/button-group-item.js +1 -1
- package/lib/components-react-node/button-group/button-group.js +1 -1
- package/lib/components-react-node/callout-quote/callout-link-with-icon.js +1 -1
- package/lib/components-react-node/callout-quote/callout-quote.js +1 -1
- package/lib/components-react-node/callout-with-media/callout-with-media-copy.js +1 -1
- package/lib/components-react-node/callout-with-media/callout-with-media-image.js +1 -1
- package/lib/components-react-node/callout-with-media/callout-with-media-video.js +1 -1
- package/lib/components-react-node/callout-with-media/callout-with-media.js +1 -1
- package/lib/components-react-node/card/card-eyebrow.js +1 -1
- package/lib/components-react-node/card/card-footer.js +1 -1
- package/lib/components-react-node/card/card-heading.js +1 -1
- package/lib/components-react-node/card/card.js +2 -2
- package/lib/components-react-node/card/image-logo.js +1 -1
- package/lib/components-react-node/card-group/card-group-card-link-item.js +1 -1
- package/lib/components-react-node/card-group/card-group-item.js +1 -1
- package/lib/components-react-node/card-group/card-group.js +1 -1
- package/lib/components-react-node/card-in-card/card-in-card-image.js +1 -1
- package/lib/components-react-node/card-in-card/card-in-card.js +1 -1
- package/lib/components-react-node/card-link/card-link-heading.js +1 -1
- package/lib/components-react-node/card-link/card-link.js +1 -1
- package/lib/components-react-node/card-section-carousel/card-section-carousel.js +1 -1
- package/lib/components-react-node/card-section-offset/card-section-offset.js +1 -1
- package/lib/components-react-node/card-section-simple/card-section-simple.js +1 -1
- package/lib/components-react-node/carousel/carousel.js +1 -1
- package/lib/components-react-node/content-block/content-block-complementary.js +1 -1
- package/lib/components-react-node/content-block/content-block-copy.js +1 -1
- package/lib/components-react-node/content-block/content-block-heading.js +1 -1
- package/lib/components-react-node/content-block/content-block-paragraph.js +1 -1
- package/lib/components-react-node/content-block/content-block.js +1 -1
- package/lib/components-react-node/content-block-cards/content-block-cards.js +1 -1
- package/lib/components-react-node/content-block-horizontal/content-block-horizontal.js +1 -1
- package/lib/components-react-node/content-block-media/content-block-media-content.js +1 -1
- package/lib/components-react-node/content-block-media/content-block-media.js +1 -1
- package/lib/components-react-node/content-block-mixed/content-block-mixed.js +1 -1
- package/lib/components-react-node/content-block-segmented/content-block-segmented-item.js +1 -1
- package/lib/components-react-node/content-block-segmented/content-block-segmented.js +1 -1
- package/lib/components-react-node/content-block-simple/content-block-simple.js +1 -1
- package/lib/components-react-node/content-group/content-group-copy.js +1 -1
- package/lib/components-react-node/content-group/content-group-heading.js +1 -1
- package/lib/components-react-node/content-group/content-group-paragraph.js +1 -1
- package/lib/components-react-node/content-group/content-group.js +1 -1
- package/lib/components-react-node/content-group-banner/content-group-banner.js +1 -1
- package/lib/components-react-node/content-group-cards/content-group-cards-item.js +1 -1
- package/lib/components-react-node/content-group-cards/content-group-cards.js +1 -1
- package/lib/components-react-node/content-group-pictograms/content-group-pictograms.js +1 -1
- package/lib/components-react-node/content-group-simple/content-group-simple.js +1 -1
- package/lib/components-react-node/content-item/content-item-copy.js +1 -1
- package/lib/components-react-node/content-item/content-item-heading.js +1 -1
- package/lib/components-react-node/content-item/content-item-paragraph.js +1 -1
- package/lib/components-react-node/content-item/content-item.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal-copy.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal-eyebrow.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media-copy.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media-featured.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media-video.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal-media.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal-thumbnail-copy.js +1 -1
- package/lib/components-react-node/content-item-horizontal/content-item-horizontal.js +1 -1
- package/lib/components-react-node/content-section/content-section-copy.js +1 -1
- package/lib/components-react-node/content-section/content-section-heading.js +1 -1
- package/lib/components-react-node/content-section/content-section.js +1 -1
- package/lib/components-react-node/cta/button-cta.js +1 -1
- package/lib/components-react-node/cta/card-cta-footer.js +1 -1
- package/lib/components-react-node/cta/card-cta-image.js +1 -1
- package/lib/components-react-node/cta/card-cta.js +1 -1
- package/lib/components-react-node/cta/card-link-cta.js +1 -1
- package/lib/components-react-node/cta/feature-cta-footer.js +1 -1
- package/lib/components-react-node/cta/feature-cta.js +1 -1
- package/lib/components-react-node/cta/link-list-item-card-cta.js +1 -1
- package/lib/components-react-node/cta/link-list-item-cta.js +1 -1
- package/lib/components-react-node/cta/text-cta.js +1 -1
- package/lib/components-react-node/cta/video-cta-composite.js +1 -1
- package/lib/components-react-node/cta/video-cta-container.js +1 -1
- package/lib/components-react-node/cta-block/cta-block-item-row.js +1 -1
- package/lib/components-react-node/cta-block/cta-block-item.js +1 -1
- package/lib/components-react-node/cta-block/cta-block.js +1 -1
- package/lib/components-react-node/cta-section/cta-section.js +1 -1
- package/lib/components-react-node/dotcom-shell/dotcom-shell-composite.js +1 -1
- package/lib/components-react-node/dotcom-shell/dotcom-shell-container.js +1 -1
- package/lib/components-react-node/dotcom-shell/dotcom-shell.js +1 -1
- package/lib/components-react-node/expressive-modal/expressive-modal-body.js +2 -2
- package/lib/components-react-node/expressive-modal/expressive-modal-close-button.js +2 -2
- package/lib/components-react-node/expressive-modal/expressive-modal-footer.js +2 -2
- package/lib/components-react-node/expressive-modal/expressive-modal-header.js +2 -2
- package/lib/components-react-node/expressive-modal/expressive-modal-heading.js +2 -2
- package/lib/components-react-node/expressive-modal/expressive-modal.js +1 -1
- package/lib/components-react-node/feature-card/feature-card-footer.js +1 -1
- package/lib/components-react-node/feature-card/feature-card.js +1 -1
- package/lib/components-react-node/feature-section/feature-section-card-link.js +1 -1
- package/lib/components-react-node/feature-section/feature-section.js +1 -1
- package/lib/components-react-node/filter-panel/filter-group-item.js +2 -2
- package/lib/components-react-node/filter-panel/filter-group.js +2 -2
- package/lib/components-react-node/filter-panel/filter-modal-button.js +2 -2
- package/lib/components-react-node/filter-panel/filter-modal-footer.js +2 -2
- package/lib/components-react-node/filter-panel/filter-modal-heading.js +2 -2
- package/lib/components-react-node/filter-panel/filter-panel-checkbox.js +2 -2
- package/lib/components-react-node/filter-panel/filter-panel-composite.js +1 -1
- package/lib/components-react-node/filter-panel/filter-panel-heading.js +1 -1
- package/lib/components-react-node/filter-panel/filter-panel-input-select-item.js +1 -1
- package/lib/components-react-node/filter-panel/filter-panel-input-select.js +1 -1
- package/lib/components-react-node/filter-panel/filter-panel-modal.js +2 -2
- package/lib/components-react-node/filter-panel/filter-panel.js +1 -1
- package/lib/components-react-node/footer/dropdown.js +2 -2
- package/lib/components-react-node/footer/footer-composite.js +1 -1
- package/lib/components-react-node/footer/footer-container.js +1 -1
- package/lib/components-react-node/horizontal-rule/horizontal-rule.js +1 -1
- package/lib/components-react-node/image/image-item.js +1 -1
- package/lib/components-react-node/image/image.js +1 -1
- package/lib/components-react-node/leadspace/breadcrumb-item.js +2 -2
- package/lib/components-react-node/leadspace/breadcrumb-link.js +2 -2
- package/lib/components-react-node/leadspace/breadcrumb.js +2 -2
- package/lib/components-react-node/leadspace/leadspace-heading.js +1 -1
- package/lib/components-react-node/leadspace/leadspace-image.js +1 -1
- package/lib/components-react-node/leadspace/leadspace.js +1 -1
- package/lib/components-react-node/leadspace-block/leadspace-block-content.js +1 -1
- package/lib/components-react-node/leadspace-block/leadspace-block-cta.js +1 -1
- package/lib/components-react-node/leadspace-block/leadspace-block-heading.js +1 -1
- package/lib/components-react-node/leadspace-block/leadspace-block-media.js +1 -1
- package/lib/components-react-node/leadspace-block/leadspace-block.js +1 -1
- package/lib/components-react-node/leadspace-with-search/leadspace-with-search-content-copy.js +1 -1
- package/lib/components-react-node/leadspace-with-search/leadspace-with-search-content-heading.js +1 -1
- package/lib/components-react-node/leadspace-with-search/leadspace-with-search-content.js +1 -1
- package/lib/components-react-node/leadspace-with-search/leadspace-with-search-heading.js +1 -1
- package/lib/components-react-node/leadspace-with-search/leadspace-with-search.js +1 -1
- package/lib/components-react-node/leaving-ibm/leaving-ibm-composite.js +1 -1
- package/lib/components-react-node/leaving-ibm/leaving-ibm-container.js +1 -1
- package/lib/components-react-node/leaving-ibm/leaving-ibm-modal-body.js +2 -2
- package/lib/components-react-node/leaving-ibm/leaving-ibm-modal-heading.js +2 -2
- package/lib/components-react-node/leaving-ibm/leaving-ibm-modal-supplemental.js +1 -1
- package/lib/components-react-node/leaving-ibm/leaving-ibm-modal.js +2 -2
- package/lib/components-react-node/lightbox-media-viewer/lightbox-image-viewer.js +1 -1
- package/lib/components-react-node/lightbox-media-viewer/lightbox-media-viewer.js +1 -1
- package/lib/components-react-node/lightbox-media-viewer/lightbox-video-player-composite.js +1 -1
- package/lib/components-react-node/lightbox-media-viewer/lightbox-video-player-container.js +1 -1
- package/lib/components-react-node/lightbox-media-viewer/lightbox-video-player.js +1 -1
- package/lib/components-react-node/link-list/link-list-heading.js +1 -1
- package/lib/components-react-node/link-list/link-list-item-card.js +1 -1
- package/lib/components-react-node/link-list/link-list-item.js +1 -1
- package/lib/components-react-node/link-list/link-list.js +1 -1
- package/lib/components-react-node/link-list-section/link-list-section.js +1 -1
- package/lib/components-react-node/link-with-icon/link-with-icon.js +2 -2
- package/lib/components-react-node/locale-modal/locale-modal-composite.js +1 -1
- package/lib/components-react-node/locale-modal/locale-modal-container.js +1 -1
- package/lib/components-react-node/logo-grid/logo-grid-item.js +1 -1
- package/lib/components-react-node/logo-grid/logo-grid-link.js +1 -1
- package/lib/components-react-node/logo-grid/logo-grid.js +1 -1
- package/lib/components-react-node/markdown/markdown.js +1 -1
- package/lib/components-react-node/masthead/masthead-composite.js +1 -1
- package/lib/components-react-node/masthead/masthead-container.js +1 -1
- package/lib/components-react-node/masthead/masthead.js +1 -1
- package/lib/components-react-node/pictogram-item/pictogram-item.js +1 -1
- package/lib/components-react-node/quote/quote-link-with-icon.js +1 -1
- package/lib/components-react-node/quote/quote-source-bottom-copy.js +1 -1
- package/lib/components-react-node/quote/quote-source-copy.js +1 -1
- package/lib/components-react-node/quote/quote-source-heading.js +1 -1
- package/lib/components-react-node/quote/quote.js +1 -1
- package/lib/components-react-node/search-with-typeahead/scoped-search-dropdown-mobile.js +2 -2
- package/lib/components-react-node/search-with-typeahead/scoped-search-dropdown.js +1 -1
- package/lib/components-react-node/search-with-typeahead/search-with-typeahead-item.js +1 -1
- package/lib/components-react-node/search-with-typeahead/search-with-typeahead.js +2 -2
- package/lib/components-react-node/structured-list/structured-list-body.js +2 -2
- package/lib/components-react-node/structured-list/structured-list-cell.js +2 -2
- package/lib/components-react-node/structured-list/structured-list-group.js +1 -1
- package/lib/components-react-node/structured-list/structured-list-head.js +2 -2
- package/lib/components-react-node/structured-list/structured-list-header-cell.js +2 -2
- package/lib/components-react-node/structured-list/structured-list-header-row.js +2 -2
- package/lib/components-react-node/structured-list/structured-list-row.js +2 -2
- package/lib/components-react-node/structured-list/structured-list.js +1 -1
- package/lib/components-react-node/table-of-contents/table-of-contents.js +1 -1
- package/lib/components-react-node/tabs-extended/tab.js +1 -1
- package/lib/components-react-node/tabs-extended/tabs-extended.js +1 -1
- package/lib/components-react-node/tabs-extended-media/tabs-extended-media.js +1 -1
- package/lib/components-react-node/tag-group/tag-group.js +1 -1
- package/lib/components-react-node/tag-link/tag-link.js +1 -1
- package/lib/components-react-node/universal-banner/universal-banner-copy.js +1 -1
- package/lib/components-react-node/universal-banner/universal-banner-heading.js +1 -1
- package/lib/components-react-node/universal-banner/universal-banner-image.js +1 -1
- package/lib/components-react-node/universal-banner/universal-banner.js +1 -1
- package/lib/components-react-node/video-player/video-player-composite.js +1 -1
- package/lib/components-react-node/video-player/video-player-container.js +1 -1
- package/lib/components-react-node/video-player/video-player.js +1 -1
- package/package.json +4 -4
- package/scss/components/background-media/background-media.scss +1 -1
- package/scss/components/button/button.scss +1 -1
- package/scss/components/expressive-modal/expressive-modal.scss +1 -1
- package/scss/components/filter-panel/filter-panel.scss +1 -1
- package/scss/components/leadspace/leadspace.scss +1 -1
- package/scss/components/leaving-ibm/leaving-ibm.scss +1 -1
- package/scss/components/masthead/masthead.scss +3 -3
- package/scss/components/search/search.scss +1 -1
|
@@ -10,10 +10,10 @@ import { LitElement, TemplateResult } from 'lit-element';
|
|
|
10
10
|
import './filter-group';
|
|
11
11
|
import './filter-panel';
|
|
12
12
|
import './filter-panel-modal';
|
|
13
|
-
import '@carbon/
|
|
13
|
+
import '@carbon/web-components/es/components/checkbox/checkbox.js';
|
|
14
14
|
declare const DDSFilterPanelComposite_base: {
|
|
15
15
|
new (...args: any[]): {
|
|
16
|
-
_handles: Set<import("@carbon/
|
|
16
|
+
_handles: Set<import("@carbon/web-components/es/globals/internal/handle").default>;
|
|
17
17
|
connectedCallback(): void;
|
|
18
18
|
disconnectedCallback(): void;
|
|
19
19
|
accessKey: string;
|
|
@@ -69,7 +69,12 @@ declare const DDSFilterPanelComposite_base: {
|
|
|
69
69
|
closest<E extends Element = Element>(selectors: string): E | null;
|
|
70
70
|
getAttribute(qualifiedName: string): string | null;
|
|
71
71
|
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
72
|
-
getAttributeNames(): string[];
|
|
72
|
+
getAttributeNames(): string[]; /**
|
|
73
|
+
* Host listener for handling the state change when a checkbox is selected.
|
|
74
|
+
*
|
|
75
|
+
* @param event checkbox select event
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
73
78
|
getAttributeNode(qualifiedName: string): Attr | null;
|
|
74
79
|
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
75
80
|
getBoundingClientRect(): DOMRect;
|
|
@@ -161,16 +166,9 @@ declare const DDSFilterPanelComposite_base: {
|
|
|
161
166
|
ariaBusy: string | null;
|
|
162
167
|
ariaChecked: string | null;
|
|
163
168
|
ariaColCount: string | null;
|
|
164
|
-
/**
|
|
165
|
-
* selected value property
|
|
166
|
-
*/
|
|
167
169
|
ariaColIndex: string | null;
|
|
168
170
|
ariaColSpan: string | null;
|
|
169
|
-
ariaCurrent: string | null;
|
|
170
|
-
* Event handler for the clearing functionality
|
|
171
|
-
*
|
|
172
|
-
* @private
|
|
173
|
-
*/
|
|
171
|
+
ariaCurrent: string | null;
|
|
174
172
|
ariaDisabled: string | null;
|
|
175
173
|
ariaExpanded: string | null;
|
|
176
174
|
ariaHasPopup: string | null;
|
|
@@ -213,7 +211,11 @@ declare const DDSFilterPanelComposite_base: {
|
|
|
213
211
|
readonly firstElementChild: Element | null;
|
|
214
212
|
readonly lastElementChild: Element | null;
|
|
215
213
|
append(...nodes: (string | Node)[]): void;
|
|
216
|
-
prepend(...nodes: (string | Node)[]): void;
|
|
214
|
+
prepend(...nodes: (string | Node)[]): void; /**
|
|
215
|
+
* Sets the open modal to true
|
|
216
|
+
*
|
|
217
|
+
* @private
|
|
218
|
+
*/
|
|
217
219
|
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
|
|
218
220
|
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
|
|
219
221
|
querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
|
|
@@ -266,6 +268,9 @@ declare const DDSFilterPanelComposite_base: {
|
|
|
266
268
|
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
267
269
|
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
270
|
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
|
+
/**
|
|
272
|
+
* The name of the custom event captured upon selecting a checkbox
|
|
273
|
+
*/
|
|
269
274
|
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
270
275
|
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
276
|
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
@@ -273,6 +278,9 @@ declare const DDSFilterPanelComposite_base: {
|
|
|
273
278
|
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
274
279
|
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
275
280
|
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
281
|
+
/**
|
|
282
|
+
* The name of the custom event captured upon closing the modal
|
|
283
|
+
*/
|
|
276
284
|
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
277
285
|
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
278
286
|
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/filter-panel/filter-panel-composite.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAGL,UAAU,EAGV,cAAc,EACf,MAAM,aAAa,CAAC;AAKrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,sBAAsB,CAAC;AAM9B,OAAO,kEAAkE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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mB,WAE7B;IAED;;OAEG;IAEH,MAAM,KAAK,kBAAkB,WAE5B;IAED,MAAM,KAAK,cAAc,WAExB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,uBAAuB,CAAC","file":"filter-panel-composite.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n LitElement,\n property,\n state,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Filter from '@carbon/carbon-web-components/es/icons/filter/16.js';\nimport HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport './filter-group';\nimport './filter-panel';\nimport './filter-panel-modal';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\nimport '@carbon/carbon-web-components/es/components/checkbox/checkbox.js';\nimport DDSFilterGroupItem from './filter-group-item';\nimport DDSFilterPanelCheckbox from './filter-panel-checkbox';\nimport DDSFilterPanelInputSelect from './filter-panel-input-select';\nimport DDSFilterPanelInputSelectItem from './filter-panel-input-select-item';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * Filter panel composite\n *\n * @element dds-filter-panel-composite\n */\n@customElement(`${ddsPrefix}-filter-panel-composite`)\nclass DDSFilterPanelComposite extends HostListenerMixin(\n StableSelectorMixin(LitElement)\n) {\n /**\n * Host listener for handling the state change when a input select item is selected.\n *\n * @param event content state change\n * @private\n */\n @HostListener('document:eventInputSelectItem')\n protected _handleInputSelectItemStateChange = (event: CustomEvent) => {\n const { value, lastValue, headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelectItem;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n\n // remove the DDSInputSelect (header) value from list to add an inner child instead\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n\n if (!value) {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n return;\n }\n\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n }\n\n if (lastValue && this._selectedValues.includes(lastValue)) {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== lastValue\n );\n }\n // enables the clear button\n if (this._selectedValues) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n /**\n * Host listener for handling the state change when a checkbox is selected.\n *\n * @param event checkbox select event\n * @private\n */\n @HostListener('document:eventCheckboxSelect')\n protected _handleCheckboxStateChange = (event: CustomEvent) => {\n const { value } = event.detail;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`).forEach((e) => {\n if (e.getAttribute('value') === value) {\n e.toggleAttribute('checked');\n e.closest(`${ddsPrefix}-filter-group-item`)?.setAttribute('open', '');\n\n const { stableSelector } = DDSFilterPanelCheckbox;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n }\n });\n\n const filterGroupItems = this.querySelectorAll(\n `${ddsPrefix}-filter-group-item`\n );\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-group-item`)\n .forEach((filterGroupItem, index) => {\n if ((filterGroupItem as DDSFilterGroupItem).open) {\n (filterGroupItems[index] as DDSFilterGroupItem).open = true;\n }\n });\n\n // toggle value in list\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n } else {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n }\n\n // shows clear button depending on the list's length\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n } else {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n\n this.renderStatus();\n };\n\n /**\n * Host listener for caching filter group items' view all states.\n *\n * @param event filter group item view all toggle event\n * @private\n */\n @HostListener('document:eventFilterGroupViewAllToggle')\n protected _handleFilterGroupViewAllToggle = (event: CustomEvent) => {\n const match = this._filterGroupsAllRevealed.findIndex((entry) => {\n return entry.id === event.detail.id;\n });\n\n if (match !== -1) {\n this._filterGroupsAllRevealed[match].value = event.detail.value;\n } else {\n this._filterGroupsAllRevealed.push(event.detail);\n }\n };\n\n /**\n * handles modal close event\n */\n @HostListener('document:eventModalClose')\n protected modalCloseEvent = () => {\n this.openFilterModal = false;\n };\n\n /**\n * Handles the state change when an input select is selected.\n *\n * @param event title state change\n * @private\n */\n @HostListener('document:eventInputSelect')\n protected _handleInputSelectStateChange = (event: CustomEvent) => {\n const { headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelect;\n this._focusElement = `${stableSelector}[header-value=\"${headerValue}\"]`;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`).forEach(\n (e) => {\n // capture the element counterpart in Filter Panel Modal\n if (e.getAttribute('header-value') === headerValue) {\n const currentGroup = e.closest(`${ddsPrefix}-filter-group-item`);\n currentGroup?.setAttribute('open', '');\n\n // Clears all other sibling items in the Filter Group\n currentGroup\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((inputSelect) => {\n if (inputSelect === e) return;\n this._selectedValues = this._selectedValues.filter(\n (str) => str !== inputSelect.getAttribute('header-value')\n );\n inputSelect.removeAttribute('selected');\n inputSelect.removeAttribute('is-open');\n });\n\n e.toggleAttribute('selected');\n e.toggleAttribute('is-open');\n }\n }\n );\n\n // toggle value in list\n if (!this._selectedValues.includes(headerValue)) {\n this._selectedValues.push(headerValue);\n } else {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n }\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n\n // enables the clear button\n if (this._selectedValues.length > 0) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n @HostListener('document:eventHeadingChange')\n protected _handleHeadingChange = () => {\n this.renderStatus();\n };\n\n /**\n * selected value property\n */\n @property({ type: String, reflect: true })\n selectValue = '';\n\n /**\n * Event handler for the clearing functionality\n *\n * @private\n */\n @HostListener('document:eventSelectionClear')\n protected _handleClearSelection = () => {\n this._selectedValues = [];\n\n // handles clear when clearing from the static filter panel modal\n this._contents.forEach((group) => {\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n });\n\n // handles clear when clearing from the filter panel static\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n\n // disables the button\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n\n this.renderStatus();\n };\n\n /**\n * `true` to open the locale modal.\n */\n @property({ type: Boolean })\n openFilterModal = false;\n\n /**\n * Sets the open modal to true\n *\n * @private\n */\n protected _openModal() {\n this.openFilterModal = true;\n }\n\n /**\n *\n */\n @property()\n _contents: any[] = [];\n\n /**\n * sets the array for the filter button title\n */\n @property()\n _title: any[] = [];\n\n /**\n * sets the selected values into an array\n */\n @property()\n _selectedValues: string[] = [];\n\n /**\n * sets the filter button title\n */\n @property()\n _filterButtonTitle: string = '';\n\n /**\n * stores which filter groups have revealed filters\n */\n @property()\n _filterGroupsAllRevealed: { id: string; value: boolean }[] = [];\n\n @property()\n _isMobile: boolean = window.innerWidth < breakpoint;\n\n /**\n * An element to set focus to on render.\n */\n @state()\n _focusElement: string | null = null;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isMobile = window.innerWidth < breakpoint;\n };\n\n protected async _querySelectorMobile(id: string): Promise<Element | null> {\n return this.querySelector(id);\n }\n\n protected async _querySelectorDesktop(id: string): Promise<Element | null> {\n let element;\n if (this.shadowRoot) {\n element = this.shadowRoot.querySelector(id);\n }\n return element;\n }\n\n protected async _querySelector(id: string): Promise<Element | null> {\n const { _isMobile } = this;\n let element;\n\n if (_isMobile) {\n element = await this._querySelectorMobile(id);\n } else {\n element = await this._querySelectorDesktop(id);\n }\n return element;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._contents = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n }\n\n protected renderStatus() {\n this._filterButtonTitle = `\n ${this._title[0].innerText}${\n this._selectedValues.length > 0 ? ` (${this._selectedValues.length})` : ''\n }\n `;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleTitleSlotChange({ target }: Event) {\n this._title = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n this._filterButtonTitle = this._title[0].innerText;\n }\n\n /**\n * Renders original content into the modal and listens for changes to this\n * content to then be stored in `this._content`.\n */\n protected _renderModal = (): TemplateResult => html`\n <dds-filter-panel-modal\n ?open=${this.openFilterModal}\n heading=\"${this._filterButtonTitle}\"\n >\n <slot name=\"heading\" @slotchange=\"${this._handleTitleSlotChange}\"></slot>\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </dds-filter-panel-modal>\n `;\n\n /**\n * Renders copies of slotted elements into the desktop presentation.\n */\n protected _renderDesktop = (): TemplateResult => html`\n <dds-filter-panel heading=\"${this._filterButtonTitle}\">\n ${this._title.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n ${this._contents.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n </dds-filter-panel>\n `;\n\n render() {\n return html`\n <button class=\"bx--filter-button\" @click=${this._openModal}>\n <div class=\"${prefix}--filter__modal__button\">\n ${this._filterButtonTitle} ${Filter()}\n </div>\n </button>\n ${this._renderModal()} ${this._renderDesktop()}\n `;\n }\n\n protected async updated() {\n const { _focusElement } = this;\n\n if (_focusElement) {\n const targetElement = await this._querySelector(_focusElement);\n\n if (targetElement instanceof HTMLElement) {\n targetElement?.focus();\n }\n\n this._focusElement = null;\n }\n }\n\n /**\n * The name of the custom event captured upon selecting a checkbox\n */\n\n static get eventCheckboxSelect() {\n return `${ddsPrefix}-checkbox-select`;\n }\n\n /**\n * The name of the custom event captured upon selecting an input select item.\n */\n\n static get eventInputSelectItem() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n /**\n * The name of the custom event captured upon activating \"view all\" button in\n * a filter group item\n */\n\n static get eventFilterGroupViewAllToggle() {\n return `${ddsPrefix}-filter-group-view-all-toggle`;\n }\n\n /**\n * The name of the custom event captured upon closing the modal\n */\n\n static get eventModalClose() {\n return `${prefix}-modal-beingclosed`;\n }\n\n /**\n * The name of the custom event capture upon selecting an input select item\n */\n\n static get eventInputSelect() {\n return `${ddsPrefix}-filter-panel-input-select-title`;\n }\n\n /**\n * The name of the custom event fired to clear selections\n */\n\n static get eventSelectionClear() {\n return `${ddsPrefix}-selection-clear`;\n }\n\n /**\n * The name of the custom event capture when the heading changes\n */\n\n static get eventHeadingChange() {\n return `${ddsPrefix}-filter-panel-heading-change`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-composite`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelComposite;\n"]}
|
|
1
|
+
{"version":3,"sources":["components/filter-panel/filter-panel-composite.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAGL,UAAU,EAGV,cAAc,EACf,MAAM,aAAa,CAAC;AAKrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,sBAAsB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AAK,oBAAoB,WAE9B;IAED;;;OAGG;IAEH,MAAM,KAAK,6BAA6B,WAEvC;IAED;;OAEG;IAEH,MAAM,KAAK,eAAe,WAEzB;IAED;;OAEG;IAEH,MAAM,KAAK,gBAAgB,WAE1B;IAED;;OAEG;IAEH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IAEH,MAAM,KAAK,kBAAkB,WAE5B;IAED,MAAM,KAAK,cAAc,WAExB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAGD,eAAe,uBAAuB,CAAC","file":"filter-panel-composite.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n LitElement,\n property,\n state,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Filter from '@carbon/web-components/es/icons/filter/16.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport './filter-group';\nimport './filter-panel';\nimport './filter-panel-modal';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\nimport '@carbon/web-components/es/components/checkbox/checkbox.js';\nimport DDSFilterGroupItem from './filter-group-item';\nimport DDSFilterPanelCheckbox from './filter-panel-checkbox';\nimport DDSFilterPanelInputSelect from './filter-panel-input-select';\nimport DDSFilterPanelInputSelectItem from './filter-panel-input-select-item';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * Filter panel composite\n *\n * @element dds-filter-panel-composite\n */\n@customElement(`${ddsPrefix}-filter-panel-composite`)\nclass DDSFilterPanelComposite extends HostListenerMixin(\n StableSelectorMixin(LitElement)\n) {\n /**\n * Host listener for handling the state change when a input select item is selected.\n *\n * @param event content state change\n * @private\n */\n @HostListener('document:eventInputSelectItem')\n protected _handleInputSelectItemStateChange = (event: CustomEvent) => {\n const { value, lastValue, headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelectItem;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n\n // remove the DDSInputSelect (header) value from list to add an inner child instead\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n\n if (!value) {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n return;\n }\n\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n }\n\n if (lastValue && this._selectedValues.includes(lastValue)) {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== lastValue\n );\n }\n // enables the clear button\n if (this._selectedValues) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n /**\n * Host listener for handling the state change when a checkbox is selected.\n *\n * @param event checkbox select event\n * @private\n */\n @HostListener('document:eventCheckboxSelect')\n protected _handleCheckboxStateChange = (event: CustomEvent) => {\n const { value } = event.detail;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`).forEach((e) => {\n if (e.getAttribute('value') === value) {\n e.toggleAttribute('checked');\n e.closest(`${ddsPrefix}-filter-group-item`)?.setAttribute('open', '');\n\n const { stableSelector } = DDSFilterPanelCheckbox;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n }\n });\n\n const filterGroupItems = this.querySelectorAll(\n `${ddsPrefix}-filter-group-item`\n );\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-group-item`)\n .forEach((filterGroupItem, index) => {\n if ((filterGroupItem as DDSFilterGroupItem).open) {\n (filterGroupItems[index] as DDSFilterGroupItem).open = true;\n }\n });\n\n // toggle value in list\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n } else {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n }\n\n // shows clear button depending on the list's length\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n } else {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n\n this.renderStatus();\n };\n\n /**\n * Host listener for caching filter group items' view all states.\n *\n * @param event filter group item view all toggle event\n * @private\n */\n @HostListener('document:eventFilterGroupViewAllToggle')\n protected _handleFilterGroupViewAllToggle = (event: CustomEvent) => {\n const match = this._filterGroupsAllRevealed.findIndex((entry) => {\n return entry.id === event.detail.id;\n });\n\n if (match !== -1) {\n this._filterGroupsAllRevealed[match].value = event.detail.value;\n } else {\n this._filterGroupsAllRevealed.push(event.detail);\n }\n };\n\n /**\n * handles modal close event\n */\n @HostListener('document:eventModalClose')\n protected modalCloseEvent = () => {\n this.openFilterModal = false;\n };\n\n /**\n * Handles the state change when an input select is selected.\n *\n * @param event title state change\n * @private\n */\n @HostListener('document:eventInputSelect')\n protected _handleInputSelectStateChange = (event: CustomEvent) => {\n const { headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelect;\n this._focusElement = `${stableSelector}[header-value=\"${headerValue}\"]`;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`).forEach(\n (e) => {\n // capture the element counterpart in Filter Panel Modal\n if (e.getAttribute('header-value') === headerValue) {\n const currentGroup = e.closest(`${ddsPrefix}-filter-group-item`);\n currentGroup?.setAttribute('open', '');\n\n // Clears all other sibling items in the Filter Group\n currentGroup\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((inputSelect) => {\n if (inputSelect === e) return;\n this._selectedValues = this._selectedValues.filter(\n (str) => str !== inputSelect.getAttribute('header-value')\n );\n inputSelect.removeAttribute('selected');\n inputSelect.removeAttribute('is-open');\n });\n\n e.toggleAttribute('selected');\n e.toggleAttribute('is-open');\n }\n }\n );\n\n // toggle value in list\n if (!this._selectedValues.includes(headerValue)) {\n this._selectedValues.push(headerValue);\n } else {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n }\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n\n // enables the clear button\n if (this._selectedValues.length > 0) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n @HostListener('document:eventHeadingChange')\n protected _handleHeadingChange = () => {\n this.renderStatus();\n };\n\n /**\n * selected value property\n */\n @property({ type: String, reflect: true })\n selectValue = '';\n\n /**\n * Event handler for the clearing functionality\n *\n * @private\n */\n @HostListener('document:eventSelectionClear')\n protected _handleClearSelection = () => {\n this._selectedValues = [];\n\n // handles clear when clearing from the static filter panel modal\n this._contents.forEach((group) => {\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n });\n\n // handles clear when clearing from the filter panel static\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n\n // disables the button\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n\n this.renderStatus();\n };\n\n /**\n * `true` to open the locale modal.\n */\n @property({ type: Boolean })\n openFilterModal = false;\n\n /**\n * Sets the open modal to true\n *\n * @private\n */\n protected _openModal() {\n this.openFilterModal = true;\n }\n\n /**\n *\n */\n @property()\n _contents: any[] = [];\n\n /**\n * sets the array for the filter button title\n */\n @property()\n _title: any[] = [];\n\n /**\n * sets the selected values into an array\n */\n @property()\n _selectedValues: string[] = [];\n\n /**\n * sets the filter button title\n */\n @property()\n _filterButtonTitle: string = '';\n\n /**\n * stores which filter groups have revealed filters\n */\n @property()\n _filterGroupsAllRevealed: { id: string; value: boolean }[] = [];\n\n @property()\n _isMobile: boolean = window.innerWidth < breakpoint;\n\n /**\n * An element to set focus to on render.\n */\n @state()\n _focusElement: string | null = null;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isMobile = window.innerWidth < breakpoint;\n };\n\n protected async _querySelectorMobile(id: string): Promise<Element | null> {\n return this.querySelector(id);\n }\n\n protected async _querySelectorDesktop(id: string): Promise<Element | null> {\n let element;\n if (this.shadowRoot) {\n element = this.shadowRoot.querySelector(id);\n }\n return element;\n }\n\n protected async _querySelector(id: string): Promise<Element | null> {\n const { _isMobile } = this;\n let element;\n\n if (_isMobile) {\n element = await this._querySelectorMobile(id);\n } else {\n element = await this._querySelectorDesktop(id);\n }\n return element;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._contents = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n }\n\n protected renderStatus() {\n this._filterButtonTitle = `\n ${this._title[0].innerText}${\n this._selectedValues.length > 0 ? ` (${this._selectedValues.length})` : ''\n }\n `;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleTitleSlotChange({ target }: Event) {\n this._title = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n this._filterButtonTitle = this._title[0].innerText;\n }\n\n /**\n * Renders original content into the modal and listens for changes to this\n * content to then be stored in `this._content`.\n */\n protected _renderModal = (): TemplateResult => html`\n <dds-filter-panel-modal\n ?open=${this.openFilterModal}\n heading=\"${this._filterButtonTitle}\"\n >\n <slot name=\"heading\" @slotchange=\"${this._handleTitleSlotChange}\"></slot>\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </dds-filter-panel-modal>\n `;\n\n /**\n * Renders copies of slotted elements into the desktop presentation.\n */\n protected _renderDesktop = (): TemplateResult => html`\n <dds-filter-panel heading=\"${this._filterButtonTitle}\">\n ${this._title.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n ${this._contents.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n </dds-filter-panel>\n `;\n\n render() {\n return html`\n <button class=\"bx--filter-button\" @click=${this._openModal}>\n <div class=\"${prefix}--filter__modal__button\">\n ${this._filterButtonTitle} ${Filter()}\n </div>\n </button>\n ${this._renderModal()} ${this._renderDesktop()}\n `;\n }\n\n protected async updated() {\n const { _focusElement } = this;\n\n if (_focusElement) {\n const targetElement = await this._querySelector(_focusElement);\n\n if (targetElement instanceof HTMLElement) {\n targetElement?.focus();\n }\n\n this._focusElement = null;\n }\n }\n\n /**\n * The name of the custom event captured upon selecting a checkbox\n */\n\n static get eventCheckboxSelect() {\n return `${ddsPrefix}-checkbox-select`;\n }\n\n /**\n * The name of the custom event captured upon selecting an input select item.\n */\n\n static get eventInputSelectItem() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n /**\n * The name of the custom event captured upon activating \"view all\" button in\n * a filter group item\n */\n\n static get eventFilterGroupViewAllToggle() {\n return `${ddsPrefix}-filter-group-view-all-toggle`;\n }\n\n /**\n * The name of the custom event captured upon closing the modal\n */\n\n static get eventModalClose() {\n return `${prefix}-modal-beingclosed`;\n }\n\n /**\n * The name of the custom event capture upon selecting an input select item\n */\n\n static get eventInputSelect() {\n return `${ddsPrefix}-filter-panel-input-select-title`;\n }\n\n /**\n * The name of the custom event fired to clear selections\n */\n\n static get eventSelectionClear() {\n return `${ddsPrefix}-selection-clear`;\n }\n\n /**\n * The name of the custom event capture when the heading changes\n */\n\n static get eventHeadingChange() {\n return `${ddsPrefix}-filter-panel-heading-change`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-composite`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelComposite;\n"]}
|
|
@@ -16,18 +16,18 @@ let _ = t => t,
|
|
|
16
16
|
|
|
17
17
|
import { customElement, html, LitElement, property, state } from 'lit-element';
|
|
18
18
|
import settings from 'carbon-components/es/globals/js/settings.js';
|
|
19
|
-
import Filter from '@carbon/
|
|
20
|
-
import HostListenerMixin from '@carbon/
|
|
19
|
+
import Filter from '@carbon/web-components/es/icons/filter/16.js';
|
|
20
|
+
import HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';
|
|
21
21
|
import { baseFontSize, breakpoints } from '@carbon/layout';
|
|
22
22
|
import "./filter-group.js";
|
|
23
23
|
import "./filter-panel.js";
|
|
24
24
|
import "./filter-panel-modal.js";
|
|
25
25
|
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
26
|
-
import HostListener from '@carbon/
|
|
26
|
+
import HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';
|
|
27
27
|
import ddsSettings from "../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js";
|
|
28
28
|
import StableSelectorMixin from "../../globals/mixins/stable-selector.js";
|
|
29
29
|
import styles from "././filter-panel.css.js";
|
|
30
|
-
import '@carbon/
|
|
30
|
+
import '@carbon/web-components/es/components/checkbox/checkbox.js';
|
|
31
31
|
import DDSFilterPanelCheckbox from "./filter-panel-checkbox.js";
|
|
32
32
|
import DDSFilterPanelInputSelect from "./filter-panel-input-select.js";
|
|
33
33
|
import DDSFilterPanelInputSelectItem from "./filter-panel-input-select-item.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-panel-composite.js","names":["customElement","html","LitElement","property","state","settings","Filter","HostListenerMixin","baseFontSize","breakpoints","unsafeHTML","HostListener","ddsSettings","StableSelectorMixin","styles","DDSFilterPanelCheckbox","DDSFilterPanelInputSelect","DDSFilterPanelInputSelectItem","prefix","stablePrefix","ddsPrefix","breakpoint","parseFloat","lg","width","DDSFilterPanelComposite","event","value","lastValue","headerValue","detail","stableSelector","_focusElement","_selectedValues","filter","e","length","shadowRoot","querySelector","removeAttribute","includes","push","setAttribute","renderStatus","querySelectorAll","forEach","getAttribute","toggleAttribute","closest","filterGroupItems","filterGroupItem","index","open","match","_filterGroupsAllRevealed","findIndex","entry","id","openFilterModal","currentGroup","inputSelect","str","type","String","reflect","_contents","group","Boolean","window","innerWidth","_isMobile","element","_querySelectorMobile","_querySelectorDesktop","target","assignedNodes","node","nodeType","Node","TEXT_NODE","textContent","trim","_filterButtonTitle","_title","innerText","_handleTitleSlotChange","_handleSlotChange","map","outerHTML","_openModal","_renderModal","_renderDesktop","targetElement","_querySelector","HTMLElement","focus"],"sources":["components/filter-panel/filter-panel-composite.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n LitElement,\n property,\n state,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Filter from '@carbon/carbon-web-components/es/icons/filter/16.js';\nimport HostListenerMixin from '@carbon/carbon-web-components/es/globals/mixins/host-listener.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport './filter-group';\nimport './filter-panel';\nimport './filter-panel-modal';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport HostListener from '@carbon/carbon-web-components/es/globals/decorators/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\nimport '@carbon/carbon-web-components/es/components/checkbox/checkbox.js';\nimport DDSFilterGroupItem from './filter-group-item';\nimport DDSFilterPanelCheckbox from './filter-panel-checkbox';\nimport DDSFilterPanelInputSelect from './filter-panel-input-select';\nimport DDSFilterPanelInputSelectItem from './filter-panel-input-select-item';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * Filter panel composite\n *\n * @element dds-filter-panel-composite\n */\n@customElement(`${ddsPrefix}-filter-panel-composite`)\nclass DDSFilterPanelComposite extends HostListenerMixin(\n StableSelectorMixin(LitElement)\n) {\n /**\n * Host listener for handling the state change when a input select item is selected.\n *\n * @param event content state change\n * @private\n */\n @HostListener('document:eventInputSelectItem')\n protected _handleInputSelectItemStateChange = (event: CustomEvent) => {\n const { value, lastValue, headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelectItem;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n\n // remove the DDSInputSelect (header) value from list to add an inner child instead\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n\n if (!value) {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n return;\n }\n\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n }\n\n if (lastValue && this._selectedValues.includes(lastValue)) {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== lastValue\n );\n }\n // enables the clear button\n if (this._selectedValues) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n /**\n * Host listener for handling the state change when a checkbox is selected.\n *\n * @param event checkbox select event\n * @private\n */\n @HostListener('document:eventCheckboxSelect')\n protected _handleCheckboxStateChange = (event: CustomEvent) => {\n const { value } = event.detail;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`).forEach((e) => {\n if (e.getAttribute('value') === value) {\n e.toggleAttribute('checked');\n e.closest(`${ddsPrefix}-filter-group-item`)?.setAttribute('open', '');\n\n const { stableSelector } = DDSFilterPanelCheckbox;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n }\n });\n\n const filterGroupItems = this.querySelectorAll(\n `${ddsPrefix}-filter-group-item`\n );\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-group-item`)\n .forEach((filterGroupItem, index) => {\n if ((filterGroupItem as DDSFilterGroupItem).open) {\n (filterGroupItems[index] as DDSFilterGroupItem).open = true;\n }\n });\n\n // toggle value in list\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n } else {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n }\n\n // shows clear button depending on the list's length\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n } else {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n\n this.renderStatus();\n };\n\n /**\n * Host listener for caching filter group items' view all states.\n *\n * @param event filter group item view all toggle event\n * @private\n */\n @HostListener('document:eventFilterGroupViewAllToggle')\n protected _handleFilterGroupViewAllToggle = (event: CustomEvent) => {\n const match = this._filterGroupsAllRevealed.findIndex((entry) => {\n return entry.id === event.detail.id;\n });\n\n if (match !== -1) {\n this._filterGroupsAllRevealed[match].value = event.detail.value;\n } else {\n this._filterGroupsAllRevealed.push(event.detail);\n }\n };\n\n /**\n * handles modal close event\n */\n @HostListener('document:eventModalClose')\n protected modalCloseEvent = () => {\n this.openFilterModal = false;\n };\n\n /**\n * Handles the state change when an input select is selected.\n *\n * @param event title state change\n * @private\n */\n @HostListener('document:eventInputSelect')\n protected _handleInputSelectStateChange = (event: CustomEvent) => {\n const { headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelect;\n this._focusElement = `${stableSelector}[header-value=\"${headerValue}\"]`;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`).forEach(\n (e) => {\n // capture the element counterpart in Filter Panel Modal\n if (e.getAttribute('header-value') === headerValue) {\n const currentGroup = e.closest(`${ddsPrefix}-filter-group-item`);\n currentGroup?.setAttribute('open', '');\n\n // Clears all other sibling items in the Filter Group\n currentGroup\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((inputSelect) => {\n if (inputSelect === e) return;\n this._selectedValues = this._selectedValues.filter(\n (str) => str !== inputSelect.getAttribute('header-value')\n );\n inputSelect.removeAttribute('selected');\n inputSelect.removeAttribute('is-open');\n });\n\n e.toggleAttribute('selected');\n e.toggleAttribute('is-open');\n }\n }\n );\n\n // toggle value in list\n if (!this._selectedValues.includes(headerValue)) {\n this._selectedValues.push(headerValue);\n } else {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n }\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n\n // enables the clear button\n if (this._selectedValues.length > 0) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n @HostListener('document:eventHeadingChange')\n protected _handleHeadingChange = () => {\n this.renderStatus();\n };\n\n /**\n * selected value property\n */\n @property({ type: String, reflect: true })\n selectValue = '';\n\n /**\n * Event handler for the clearing functionality\n *\n * @private\n */\n @HostListener('document:eventSelectionClear')\n protected _handleClearSelection = () => {\n this._selectedValues = [];\n\n // handles clear when clearing from the static filter panel modal\n this._contents.forEach((group) => {\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n });\n\n // handles clear when clearing from the filter panel static\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n\n // disables the button\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n\n this.renderStatus();\n };\n\n /**\n * `true` to open the locale modal.\n */\n @property({ type: Boolean })\n openFilterModal = false;\n\n /**\n * Sets the open modal to true\n *\n * @private\n */\n protected _openModal() {\n this.openFilterModal = true;\n }\n\n /**\n *\n */\n @property()\n _contents: any[] = [];\n\n /**\n * sets the array for the filter button title\n */\n @property()\n _title: any[] = [];\n\n /**\n * sets the selected values into an array\n */\n @property()\n _selectedValues: string[] = [];\n\n /**\n * sets the filter button title\n */\n @property()\n _filterButtonTitle: string = '';\n\n /**\n * stores which filter groups have revealed filters\n */\n @property()\n _filterGroupsAllRevealed: { id: string; value: boolean }[] = [];\n\n @property()\n _isMobile: boolean = window.innerWidth < breakpoint;\n\n /**\n * An element to set focus to on render.\n */\n @state()\n _focusElement: string | null = null;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isMobile = window.innerWidth < breakpoint;\n };\n\n protected async _querySelectorMobile(id: string): Promise<Element | null> {\n return this.querySelector(id);\n }\n\n protected async _querySelectorDesktop(id: string): Promise<Element | null> {\n let element;\n if (this.shadowRoot) {\n element = this.shadowRoot.querySelector(id);\n }\n return element;\n }\n\n protected async _querySelector(id: string): Promise<Element | null> {\n const { _isMobile } = this;\n let element;\n\n if (_isMobile) {\n element = await this._querySelectorMobile(id);\n } else {\n element = await this._querySelectorDesktop(id);\n }\n return element;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._contents = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n }\n\n protected renderStatus() {\n this._filterButtonTitle = `\n ${this._title[0].innerText}${\n this._selectedValues.length > 0 ? ` (${this._selectedValues.length})` : ''\n }\n `;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleTitleSlotChange({ target }: Event) {\n this._title = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n this._filterButtonTitle = this._title[0].innerText;\n }\n\n /**\n * Renders original content into the modal and listens for changes to this\n * content to then be stored in `this._content`.\n */\n protected _renderModal = (): TemplateResult => html`\n <dds-filter-panel-modal\n ?open=${this.openFilterModal}\n heading=\"${this._filterButtonTitle}\"\n >\n <slot name=\"heading\" @slotchange=\"${this._handleTitleSlotChange}\"></slot>\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </dds-filter-panel-modal>\n `;\n\n /**\n * Renders copies of slotted elements into the desktop presentation.\n */\n protected _renderDesktop = (): TemplateResult => html`\n <dds-filter-panel heading=\"${this._filterButtonTitle}\">\n ${this._title.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n ${this._contents.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n </dds-filter-panel>\n `;\n\n render() {\n return html`\n <button class=\"bx--filter-button\" @click=${this._openModal}>\n <div class=\"${prefix}--filter__modal__button\">\n ${this._filterButtonTitle} ${Filter()}\n </div>\n </button>\n ${this._renderModal()} ${this._renderDesktop()}\n `;\n }\n\n protected async updated() {\n const { _focusElement } = this;\n\n if (_focusElement) {\n const targetElement = await this._querySelector(_focusElement);\n\n if (targetElement instanceof HTMLElement) {\n targetElement?.focus();\n }\n\n this._focusElement = null;\n }\n }\n\n /**\n * The name of the custom event captured upon selecting a checkbox\n */\n\n static get eventCheckboxSelect() {\n return `${ddsPrefix}-checkbox-select`;\n }\n\n /**\n * The name of the custom event captured upon selecting an input select item.\n */\n\n static get eventInputSelectItem() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n /**\n * The name of the custom event captured upon activating \"view all\" button in\n * a filter group item\n */\n\n static get eventFilterGroupViewAllToggle() {\n return `${ddsPrefix}-filter-group-view-all-toggle`;\n }\n\n /**\n * The name of the custom event captured upon closing the modal\n */\n\n static get eventModalClose() {\n return `${prefix}-modal-beingclosed`;\n }\n\n /**\n * The name of the custom event capture upon selecting an input select item\n */\n\n static get eventInputSelect() {\n return `${ddsPrefix}-filter-panel-input-select-title`;\n }\n\n /**\n * The name of the custom event fired to clear selections\n */\n\n static get eventSelectionClear() {\n return `${ddsPrefix}-selection-clear`;\n }\n\n /**\n * The name of the custom event capture when the heading changes\n */\n\n static get eventHeadingChange() {\n return `${ddsPrefix}-filter-panel-heading-change`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-composite`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelComposite;\n"],"mappings":";;;;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;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,gCAAkC;QAChC,OAAQ,GAAEA,SAAU,4BAA2B;MACjD;;MAEA;AACF;AACA;AACA;IAHE;MAAA;MAAA;MAAA;MAAA,OAKA,yCAA2C;QACzC,OAAQ,GAAEA,SAAU,+BAA8B;MACpD;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,2BAA6B;QAC3B,OAAQ,GAAEF,MAAO,oBAAmB;MACtC;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,4BAA8B;QAC5B,OAAQ,GAAEE,SAAU,kCAAiC;MACvD;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,+BAAiC;QAC/B,OAAQ,GAAEA,SAAU,kBAAiB;MACvC;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,8BAAgC;QAC9B,OAAQ,GAAEA,SAAU,8BAA6B;MACnD;IAAC;MAAA;MAAA;MAAA;MAAA,OAED,0BAA4B;QAC1B,OAAQ,GAAEA,SAAU,yBAAwB;MAC9C;IAAC;MAAA;MAAA;MAAA;MAAA;QAAA,OAEeN,MAAM;MAAA;IAAA;EAAA;AAAA,GAtgBcP,iBAAiB,CACrDM,mBAAmB,CAACX,UAAU,CAAC,CAChC,GAugBD;AACA,eAAeuB,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"filter-panel-composite.js","names":["customElement","html","LitElement","property","state","settings","Filter","HostListenerMixin","baseFontSize","breakpoints","unsafeHTML","HostListener","ddsSettings","StableSelectorMixin","styles","DDSFilterPanelCheckbox","DDSFilterPanelInputSelect","DDSFilterPanelInputSelectItem","prefix","stablePrefix","ddsPrefix","breakpoint","parseFloat","lg","width","DDSFilterPanelComposite","event","value","lastValue","headerValue","detail","stableSelector","_focusElement","_selectedValues","filter","e","length","shadowRoot","querySelector","removeAttribute","includes","push","setAttribute","renderStatus","querySelectorAll","forEach","getAttribute","toggleAttribute","closest","filterGroupItems","filterGroupItem","index","open","match","_filterGroupsAllRevealed","findIndex","entry","id","openFilterModal","currentGroup","inputSelect","str","type","String","reflect","_contents","group","Boolean","window","innerWidth","_isMobile","element","_querySelectorMobile","_querySelectorDesktop","target","assignedNodes","node","nodeType","Node","TEXT_NODE","textContent","trim","_filterButtonTitle","_title","innerText","_handleTitleSlotChange","_handleSlotChange","map","outerHTML","_openModal","_renderModal","_renderDesktop","targetElement","_querySelector","HTMLElement","focus"],"sources":["components/filter-panel/filter-panel-composite.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n customElement,\n html,\n LitElement,\n property,\n state,\n TemplateResult,\n} from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Filter from '@carbon/web-components/es/icons/filter/16.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport { baseFontSize, breakpoints } from '@carbon/layout';\nimport './filter-group';\nimport './filter-panel';\nimport './filter-panel-modal';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\nimport '@carbon/web-components/es/components/checkbox/checkbox.js';\nimport DDSFilterGroupItem from './filter-group-item';\nimport DDSFilterPanelCheckbox from './filter-panel-checkbox';\nimport DDSFilterPanelInputSelect from './filter-panel-input-select';\nimport DDSFilterPanelInputSelectItem from './filter-panel-input-select-item';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\nconst breakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;\n\n/**\n * Filter panel composite\n *\n * @element dds-filter-panel-composite\n */\n@customElement(`${ddsPrefix}-filter-panel-composite`)\nclass DDSFilterPanelComposite extends HostListenerMixin(\n StableSelectorMixin(LitElement)\n) {\n /**\n * Host listener for handling the state change when a input select item is selected.\n *\n * @param event content state change\n * @private\n */\n @HostListener('document:eventInputSelectItem')\n protected _handleInputSelectItemStateChange = (event: CustomEvent) => {\n const { value, lastValue, headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelectItem;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n\n // remove the DDSInputSelect (header) value from list to add an inner child instead\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n\n if (!value) {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n return;\n }\n\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n }\n\n if (lastValue && this._selectedValues.includes(lastValue)) {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== lastValue\n );\n }\n // enables the clear button\n if (this._selectedValues) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n /**\n * Host listener for handling the state change when a checkbox is selected.\n *\n * @param event checkbox select event\n * @private\n */\n @HostListener('document:eventCheckboxSelect')\n protected _handleCheckboxStateChange = (event: CustomEvent) => {\n const { value } = event.detail;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`).forEach((e) => {\n if (e.getAttribute('value') === value) {\n e.toggleAttribute('checked');\n e.closest(`${ddsPrefix}-filter-group-item`)?.setAttribute('open', '');\n\n const { stableSelector } = DDSFilterPanelCheckbox;\n this._focusElement = `${stableSelector}[value=\"${value}\"]`;\n }\n });\n\n const filterGroupItems = this.querySelectorAll(\n `${ddsPrefix}-filter-group-item`\n );\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-group-item`)\n .forEach((filterGroupItem, index) => {\n if ((filterGroupItem as DDSFilterGroupItem).open) {\n (filterGroupItems[index] as DDSFilterGroupItem).open = true;\n }\n });\n\n // toggle value in list\n if (!this._selectedValues.includes(value)) {\n this._selectedValues.push(value);\n } else {\n this._selectedValues = this._selectedValues.filter((e) => e !== value);\n }\n\n // shows clear button depending on the list's length\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n } else {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n\n this.renderStatus();\n };\n\n /**\n * Host listener for caching filter group items' view all states.\n *\n * @param event filter group item view all toggle event\n * @private\n */\n @HostListener('document:eventFilterGroupViewAllToggle')\n protected _handleFilterGroupViewAllToggle = (event: CustomEvent) => {\n const match = this._filterGroupsAllRevealed.findIndex((entry) => {\n return entry.id === event.detail.id;\n });\n\n if (match !== -1) {\n this._filterGroupsAllRevealed[match].value = event.detail.value;\n } else {\n this._filterGroupsAllRevealed.push(event.detail);\n }\n };\n\n /**\n * handles modal close event\n */\n @HostListener('document:eventModalClose')\n protected modalCloseEvent = () => {\n this.openFilterModal = false;\n };\n\n /**\n * Handles the state change when an input select is selected.\n *\n * @param event title state change\n * @private\n */\n @HostListener('document:eventInputSelect')\n protected _handleInputSelectStateChange = (event: CustomEvent) => {\n const { headerValue } = event.detail;\n\n const { stableSelector } = DDSFilterPanelInputSelect;\n this._focusElement = `${stableSelector}[header-value=\"${headerValue}\"]`;\n\n // toggle checkbox in filter panel modal\n this.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`).forEach(\n (e) => {\n // capture the element counterpart in Filter Panel Modal\n if (e.getAttribute('header-value') === headerValue) {\n const currentGroup = e.closest(`${ddsPrefix}-filter-group-item`);\n currentGroup?.setAttribute('open', '');\n\n // Clears all other sibling items in the Filter Group\n currentGroup\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((inputSelect) => {\n if (inputSelect === e) return;\n this._selectedValues = this._selectedValues.filter(\n (str) => str !== inputSelect.getAttribute('header-value')\n );\n inputSelect.removeAttribute('selected');\n inputSelect.removeAttribute('is-open');\n });\n\n e.toggleAttribute('selected');\n e.toggleAttribute('is-open');\n }\n }\n );\n\n // toggle value in list\n if (!this._selectedValues.includes(headerValue)) {\n this._selectedValues.push(headerValue);\n } else {\n this._selectedValues = this._selectedValues.filter(\n (e) => e !== headerValue\n );\n }\n\n if (!this._selectedValues.length) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n }\n\n // enables the clear button\n if (this._selectedValues.length > 0) {\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.setAttribute('has-selections', '');\n this.shadowRoot!.querySelector(`${ddsPrefix}-filter-panel`)?.setAttribute(\n 'has-selections',\n ''\n );\n }\n this.renderStatus();\n };\n\n @HostListener('document:eventHeadingChange')\n protected _handleHeadingChange = () => {\n this.renderStatus();\n };\n\n /**\n * selected value property\n */\n @property({ type: String, reflect: true })\n selectValue = '';\n\n /**\n * Event handler for the clearing functionality\n *\n * @private\n */\n @HostListener('document:eventSelectionClear')\n protected _handleClearSelection = () => {\n this._selectedValues = [];\n\n // handles clear when clearing from the static filter panel modal\n this._contents.forEach((group) => {\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n group\n .querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n });\n\n // handles clear when clearing from the filter panel static\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-checkbox`)\n .forEach((e) => {\n e.removeAttribute('checked');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select-item`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n this.shadowRoot\n ?.querySelectorAll(`${ddsPrefix}-filter-panel-input-select`)\n .forEach((e) => {\n e.removeAttribute('selected');\n e.removeAttribute('is-open');\n });\n\n // disables the button\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel-modal`\n )?.removeAttribute('has-selections');\n this.shadowRoot!.querySelector(\n `${ddsPrefix}-filter-panel`\n )?.removeAttribute('has-selections');\n\n this.renderStatus();\n };\n\n /**\n * `true` to open the locale modal.\n */\n @property({ type: Boolean })\n openFilterModal = false;\n\n /**\n * Sets the open modal to true\n *\n * @private\n */\n protected _openModal() {\n this.openFilterModal = true;\n }\n\n /**\n *\n */\n @property()\n _contents: any[] = [];\n\n /**\n * sets the array for the filter button title\n */\n @property()\n _title: any[] = [];\n\n /**\n * sets the selected values into an array\n */\n @property()\n _selectedValues: string[] = [];\n\n /**\n * sets the filter button title\n */\n @property()\n _filterButtonTitle: string = '';\n\n /**\n * stores which filter groups have revealed filters\n */\n @property()\n _filterGroupsAllRevealed: { id: string; value: boolean }[] = [];\n\n @property()\n _isMobile: boolean = window.innerWidth < breakpoint;\n\n /**\n * An element to set focus to on render.\n */\n @state()\n _focusElement: string | null = null;\n\n @HostListener('window:resize')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleWindowResize = (): void => {\n this._isMobile = window.innerWidth < breakpoint;\n };\n\n protected async _querySelectorMobile(id: string): Promise<Element | null> {\n return this.querySelector(id);\n }\n\n protected async _querySelectorDesktop(id: string): Promise<Element | null> {\n let element;\n if (this.shadowRoot) {\n element = this.shadowRoot.querySelector(id);\n }\n return element;\n }\n\n protected async _querySelector(id: string): Promise<Element | null> {\n const { _isMobile } = this;\n let element;\n\n if (_isMobile) {\n element = await this._querySelectorMobile(id);\n } else {\n element = await this._querySelectorDesktop(id);\n }\n return element;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._contents = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n }\n\n protected renderStatus() {\n this._filterButtonTitle = `\n ${this._title[0].innerText}${\n this._selectedValues.length > 0 ? ` (${this._selectedValues.length})` : ''\n }\n `;\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleTitleSlotChange({ target }: Event) {\n this._title = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n this._filterButtonTitle = this._title[0].innerText;\n }\n\n /**\n * Renders original content into the modal and listens for changes to this\n * content to then be stored in `this._content`.\n */\n protected _renderModal = (): TemplateResult => html`\n <dds-filter-panel-modal\n ?open=${this.openFilterModal}\n heading=\"${this._filterButtonTitle}\"\n >\n <slot name=\"heading\" @slotchange=\"${this._handleTitleSlotChange}\"></slot>\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </dds-filter-panel-modal>\n `;\n\n /**\n * Renders copies of slotted elements into the desktop presentation.\n */\n protected _renderDesktop = (): TemplateResult => html`\n <dds-filter-panel heading=\"${this._filterButtonTitle}\">\n ${this._title.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n ${this._contents.map((e) => {\n return html` ${unsafeHTML((e as HTMLElement).outerHTML)} `;\n })}\n </dds-filter-panel>\n `;\n\n render() {\n return html`\n <button class=\"bx--filter-button\" @click=${this._openModal}>\n <div class=\"${prefix}--filter__modal__button\">\n ${this._filterButtonTitle} ${Filter()}\n </div>\n </button>\n ${this._renderModal()} ${this._renderDesktop()}\n `;\n }\n\n protected async updated() {\n const { _focusElement } = this;\n\n if (_focusElement) {\n const targetElement = await this._querySelector(_focusElement);\n\n if (targetElement instanceof HTMLElement) {\n targetElement?.focus();\n }\n\n this._focusElement = null;\n }\n }\n\n /**\n * The name of the custom event captured upon selecting a checkbox\n */\n\n static get eventCheckboxSelect() {\n return `${ddsPrefix}-checkbox-select`;\n }\n\n /**\n * The name of the custom event captured upon selecting an input select item.\n */\n\n static get eventInputSelectItem() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n /**\n * The name of the custom event captured upon activating \"view all\" button in\n * a filter group item\n */\n\n static get eventFilterGroupViewAllToggle() {\n return `${ddsPrefix}-filter-group-view-all-toggle`;\n }\n\n /**\n * The name of the custom event captured upon closing the modal\n */\n\n static get eventModalClose() {\n return `${prefix}-modal-beingclosed`;\n }\n\n /**\n * The name of the custom event capture upon selecting an input select item\n */\n\n static get eventInputSelect() {\n return `${ddsPrefix}-filter-panel-input-select-title`;\n }\n\n /**\n * The name of the custom event fired to clear selections\n */\n\n static get eventSelectionClear() {\n return `${ddsPrefix}-selection-clear`;\n }\n\n /**\n * The name of the custom event capture when the heading changes\n */\n\n static get eventHeadingChange() {\n return `${ddsPrefix}-filter-panel-heading-change`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-composite`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelComposite;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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OAIA,gCAAkC;QAChC,OAAQ,GAAEA,SAAU,4BAA2B;MACjD;;MAEA;AACF;AACA;AACA;IAHE;MAAA;MAAA;MAAA;MAAA,OAKA,yCAA2C;QACzC,OAAQ,GAAEA,SAAU,+BAA8B;MACpD;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,2BAA6B;QAC3B,OAAQ,GAAEF,MAAO,oBAAmB;MACtC;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,4BAA8B;QAC5B,OAAQ,GAAEE,SAAU,kCAAiC;MACvD;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,+BAAiC;QAC/B,OAAQ,GAAEA,SAAU,kBAAiB;MACvC;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAIA,8BAAgC;QAC9B,OAAQ,GAAEA,SAAU,8BAA6B;MACnD;IAAC;MAAA;MAAA;MAAA;MAAA,OAED,0BAA4B;QAC1B,OAAQ,GAAEA,SAAU,yBAAwB;MAC9C;IAAC;MAAA;MAAA;MAAA;MAAA;QAAA,OAEeN,MAAM;MAAA;IAAA;EAAA;AAAA,GAtgBcP,iBAAiB,CACrDM,mBAAmB,CAACX,UAAU,CAAC,CAChC,GAugBD;AACA,eAAeuB,uBAAuB"}
|
|
@@ -24,9 +24,6 @@ declare const DDSFilterPanelInputSelectItem_base: (new (...args: any[]) => {
|
|
|
24
24
|
readonly offsetTop: number;
|
|
25
25
|
readonly offsetWidth: number;
|
|
26
26
|
outerText: string;
|
|
27
|
-
/**
|
|
28
|
-
* Property for the input select item value
|
|
29
|
-
*/
|
|
30
27
|
spellcheck: boolean;
|
|
31
28
|
title: string;
|
|
32
29
|
translate: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/filter-panel/filter-panel-input-select-item.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAiC,UAAU,EAAE,MAA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eAAe,6BAA6B,CAAC","file":"filter-panel-input-select-item.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { customElement, html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Close from '@carbon/web-components/es/icons/close/16.js';\nimport FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\n/**\n * The input select inner dropdown.\n *\n * @element dds-filter-panel-input-select-item\n */\n@customElement(`${ddsPrefix}-filter-panel-input-select-item`)\nclass DDSFilterPanelInputSelectItem extends FocusMixin(\n StableSelectorMixin(LitElement)\n) {\n /**\n * Property for the input select item value\n */\n @property()\n _title: string = '';\n\n /**\n * sets the input select dropdown to unselected\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._title = (target as HTMLSlotElement).assignedNodes()[0]\n .textContent as string;\n\n this.setAttribute(\n 'aria-label',\n `${this._title}, ${this.selected ? 'selected' : 'unselected'}`\n );\n }\n\n connectedCallback() {\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('selected')) {\n this.setAttribute('aria-selected', `${String(Boolean(this.selected))}`);\n this.setAttribute(\n 'aria-label',\n `${this._title}, ${this.selected ? 'selected' : 'unselected'}`\n );\n }\n }\n\n render() {\n return html`\n <slot @slotchange=${this._handleSlotChange}></slot>\n <div class=\"${prefix}--close__icon\">\n ${this.selected ? Close() : null}\n </div>\n `;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-input-select-item`;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelInputSelectItem;\n"]}
|
|
@@ -14,8 +14,8 @@ let _ = t => t,
|
|
|
14
14
|
|
|
15
15
|
import { customElement, html, property, LitElement } from 'lit-element';
|
|
16
16
|
import settings from 'carbon-components/es/globals/js/settings.js';
|
|
17
|
-
import Close from '@carbon/
|
|
18
|
-
import FocusMixin from '@carbon/
|
|
17
|
+
import Close from '@carbon/web-components/es/icons/close/16.js';
|
|
18
|
+
import FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';
|
|
19
19
|
import ddsSettings from "../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js";
|
|
20
20
|
import StableSelectorMixin from "../../globals/mixins/stable-selector.js";
|
|
21
21
|
import styles from "././filter-panel.css.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-panel-input-select-item.js","names":["customElement","html","property","LitElement","settings","Close","FocusMixin","ddsSettings","StableSelectorMixin","styles","prefix","stablePrefix","ddsPrefix","DDSFilterPanelInputSelectItem","type","Boolean","reflect","target","_title","assignedNodes","textContent","setAttribute","selected","hasAttribute","changedProperties","has","String","_handleSlotChange"],"sources":["components/filter-panel/filter-panel-input-select-item.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { customElement, html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Close from '@carbon/
|
|
1
|
+
{"version":3,"file":"filter-panel-input-select-item.js","names":["customElement","html","property","LitElement","settings","Close","FocusMixin","ddsSettings","StableSelectorMixin","styles","prefix","stablePrefix","ddsPrefix","DDSFilterPanelInputSelectItem","type","Boolean","reflect","target","_title","assignedNodes","textContent","setAttribute","selected","hasAttribute","changedProperties","has","String","_handleSlotChange"],"sources":["components/filter-panel/filter-panel-input-select-item.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { customElement, html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Close from '@carbon/web-components/es/icons/close/16.js';\nimport FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\n/**\n * The input select inner dropdown.\n *\n * @element dds-filter-panel-input-select-item\n */\n@customElement(`${ddsPrefix}-filter-panel-input-select-item`)\nclass DDSFilterPanelInputSelectItem extends FocusMixin(\n StableSelectorMixin(LitElement)\n) {\n /**\n * Property for the input select item value\n */\n @property()\n _title: string = '';\n\n /**\n * sets the input select dropdown to unselected\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._title = (target as HTMLSlotElement).assignedNodes()[0]\n .textContent as string;\n\n this.setAttribute(\n 'aria-label',\n `${this._title}, ${this.selected ? 'selected' : 'unselected'}`\n );\n }\n\n connectedCallback() {\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('selected')) {\n this.setAttribute('aria-selected', `${String(Boolean(this.selected))}`);\n this.setAttribute(\n 'aria-label',\n `${this._title}, ${this.selected ? 'selected' : 'unselected'}`\n );\n }\n }\n\n render() {\n return html`\n <slot @slotchange=${this._handleSlotChange}></slot>\n <div class=\"${prefix}--close__icon\">\n ${this.selected ? Close() : null}\n </div>\n `;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-input-select-item`;\n }\n\n static styles = styles;\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelInputSelectItem;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,aAAa;AACvE,OAAOC,QAAQ,MAAM,6CAA6C;AAClE,OAAOC,KAAK,MAAM,6CAA6C;AAC/D,OAAOC,UAAU,MAAM,mDAAmD;AAC1E,OAAOC,WAAW,MAAM,kFAA+E;AACvG,OAAOC,mBAAmB,MAAM,yCAAsC;AACtE,OAAOC,MAAM,MAAM,yBAAqB;AAExC,MAAM;EAAEC;AAAO,CAAC,GAAGN,QAAQ;AAC3B,MAAM;EAAEO,YAAY,EAAEC;AAAU,CAAC,GAAGL,WAAW;;AAE/C;AACA;AACA;AACA;AACA;AAJA,IAMMM,6BAA6B,cADlCb,aAAa,CAAE,GAAEY,SAAU,iCAAgC,CAAC;EAA7D,MACMC,6BAA6B,qBAEjC;IAAA;MAAA;MAAA;IAAA;EA+DF;EAAC;IAAA,GAjEKA,6BAA6B;IAAA;MAAA;MAAA,aAMhCX,QAAQ,EAAE;MAAA;MAAA;QAAA,OACM,EAAE;MAAA;IAAA;MAAA;MAAA,aAKlBA,QAAQ,CAAC;QAAEY,IAAI,EAAEC,OAAO;QAAEC,OAAO,EAAE;MAAK,CAAC,CAAC;MAAA;MAAA;QAAA,OAChC,KAAK;MAAA;IAAA;MAAA;MAAA;MAAA;MAVhB;AACF;AACA;;MAIE;AACF;AACA;;MAIE;AACF;AACA;AACA;AACA;MACE,2BAA4B;QAAEC;MAAc,CAAC,EAAE;QAC7C,IAAI,C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AAA;MAAA;MAAA;QAAA,OAEeH,MAAM;MAAA;IAAA;EAAA;AAAA,GAhEoBH,UAAU,CACpDE,mBAAmB,CAACL,UAAU,CAAC,CAChC,GAiED;AACA,eAAeU,6BAA6B"}
|
|
@@ -18,7 +18,11 @@ declare const DDSFilterPanelInputSelect_base: (new (...args: any[]) => {
|
|
|
18
18
|
inert: boolean;
|
|
19
19
|
innerText: string;
|
|
20
20
|
lang: string;
|
|
21
|
-
readonly offsetHeight: number;
|
|
21
|
+
readonly offsetHeight: number; /**
|
|
22
|
+
* The container of the input select.
|
|
23
|
+
*
|
|
24
|
+
* @element dds-filter-panel-input-select
|
|
25
|
+
*/
|
|
22
26
|
readonly offsetLeft: number;
|
|
23
27
|
readonly offsetParent: Element | null;
|
|
24
28
|
readonly offsetTop: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/filter-panel/filter-panel-input-select.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAiC,UAAU,EAAE,MAAM,aAAa,CAAC
|
|
1
|
+
{"version":3,"sources":["components/filter-panel/filter-panel-input-select.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAiC,UAAU,EAAE,MAAM,aAAa,CAAC;;;;;;;;;;;;mCAYxE;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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el-input-select.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { customElement, html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Close from '@carbon/web-components/es/icons/close/16.js';\nimport FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\nimport DDSFilterPanelInputSelectItem from './filter-panel-input-select-item';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\n/**\n * The container of the input select.\n *\n * @element dds-filter-panel-input-select\n */\n@customElement(`${ddsPrefix}-filter-panel-input-select`)\nclass DDSFilterPanelInputSelect extends FocusMixin(\n StableSelectorMixin(LitElement)\n) {\n @property()\n ariaLabel = '';\n\n /**\n * Sets the input selected dropdown to closed\n */\n @property({ attribute: 'is-open', type: Boolean })\n isOpen = false;\n\n /**\n * sets the title value to a string\n */\n @property()\n title!: string;\n\n /**\n * sets the selected value attribute to selected\n */\n @property({ attribute: 'selected', type: Boolean })\n selected: boolean = false;\n\n /**\n * property for setting the value to a string\n */\n @property()\n value: string = '';\n\n /**\n * targets the last selected item\n */\n @property()\n lastValue: any;\n\n static get selectorItem() {\n return `${ddsPrefix}-filter-panel-input-select-item`;\n }\n\n /**\n *\n * @param event sets the selected value attribute to selected and removes the attribute from the 'lastvalue'\n * @private\n */\n protected _handleClickInner(event) {\n const { eventContentStateChange } = this\n .constructor as typeof DDSFilterPanelInputSelect;\n const selected = (event.target as Element).closest(\n (this.constructor as typeof DDSFilterPanelInputSelect).selectorItem\n ) as DDSFilterPanelInputSelectItem;\n if (selected.hasAttribute('selected')) {\n selected.removeAttribute('selected');\n } else {\n if (this.lastValue) {\n this.lastValue.removeAttribute('selected');\n }\n this.selected = false;\n this.removeAttribute('selected');\n selected.setAttribute('selected', '');\n }\n\n this.dispatchEvent(\n new CustomEvent(eventContentStateChange, {\n bubbles: true,\n composed: true,\n detail: {\n value: selected.getAttribute('value'),\n lastValue: this.lastValue ? this.lastValue.getAttribute('value') : '',\n headerValue: this.headerValue,\n },\n })\n );\n this.lastValue = selected;\n }\n\n /**\n * Ensures the click header handler gets called upon clicking enter if focused.\n *\n * @param event captures the inputed key\n * @private\n */\n private _handleKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Enter') {\n this._handleClickHeader();\n }\n };\n\n /**\n * Ensures the click inner handler gets called upon clicking enter if focused.\n *\n * @param event captures the inputed key\n * @private\n */\n private _handleKeydownInner = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n this._handleClickInner(event);\n }\n };\n\n /**\n * sets the input select items to an array\n */\n @property()\n _items: any[] = [];\n\n /**\n * sets header-value attribute to the input selected header\n */\n @property({ attribute: 'header-value' })\n headerValue: string = '';\n\n /**\n * Toggles the input select dropdown and sets the header to selected and sets the value\n *\n * @private\n */\n protected _handleClickHeader() {\n const { eventInputSelect } = this\n .constructor as typeof DDSFilterPanelInputSelect;\n this.isOpen = !this.isOpen;\n this.selected = !this.selected;\n this.dispatchEvent(\n new CustomEvent(eventInputSelect, {\n bubbles: true,\n composed: true,\n detail: {\n headerValue: this.headerValue,\n },\n })\n );\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._items = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n }\n\n updated(changedProperties) {\n if (changedProperties.has('selected')) {\n this.ariaLabel = `${this.title}, ${\n this.selected ? 'selected' : 'unselected'\n }`;\n }\n if (this._items.length) {\n this.shadowRoot\n ?.querySelector(`.${prefix}--input-container__heading`)\n ?.setAttribute('aria-expanded', String(Boolean(this.isOpen)));\n }\n }\n\n render() {\n const { title } = this;\n return html`\n <div class=\"${prefix}--input-container\">\n <div\n class=\"${prefix}--input-container__heading\"\n tabindex=\"1\"\n @click=${this._handleClickHeader}\n @keydown=${this._handleKeydown}\n aria-controls=\"content\"\n aria-label=\"${this.ariaLabel}\"\n role=\"button\"\n >\n ${title}\n <div class=\"${prefix}--close__icon\">\n ${this.selected && this.isOpen ? Close() : null}\n </div>\n </div>\n <ul\n id=\"content\"\n @click=${this._handleClickInner}\n @keydown=${this._handleKeydownInner}\n class=\"${this.isOpen\n ? ''\n : `${prefix}--selected-option-dropdown__hidden`} ${prefix}--selected-option-dropdown\"\n >\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </ul>\n </div>\n `;\n }\n\n /**\n * The name of the custom event fired upon selecting the title\n */\n static get eventInputSelect() {\n return `${ddsPrefix}-filter-panel-input-select-title`;\n }\n\n /**\n * The name of the custom event fired after the search content is changed upon a user gesture.\n */\n static get eventContentStateChange() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelInputSelect;\n"]}
|
|
@@ -12,8 +12,8 @@ let _ = t => t,
|
|
|
12
12
|
|
|
13
13
|
import { customElement, html, property, LitElement } from 'lit-element';
|
|
14
14
|
import settings from 'carbon-components/es/globals/js/settings.js';
|
|
15
|
-
import Close from '@carbon/
|
|
16
|
-
import FocusMixin from '@carbon/
|
|
15
|
+
import Close from '@carbon/web-components/es/icons/close/16.js';
|
|
16
|
+
import FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';
|
|
17
17
|
import ddsSettings from "../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js";
|
|
18
18
|
import StableSelectorMixin from "../../globals/mixins/stable-selector.js";
|
|
19
19
|
import styles from "././filter-panel.css.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-panel-input-select.js","names":["customElement","html","property","LitElement","settings","Close","FocusMixin","ddsSettings","StableSelectorMixin","styles","prefix","stablePrefix","ddsPrefix","DDSFilterPanelInputSelect","attribute","type","Boolean","event","eventContentStateChange","constructor","selected","target","closest","selectorItem","hasAttribute","removeAttribute","lastValue","setAttribute","dispatchEvent","CustomEvent","bubbles","composed","detail","value","getAttribute","headerValue","key","_handleClickHeader","_handleClickInner","eventInputSelect","isOpen","_items","assignedNodes","filter","node","nodeType","Node","TEXT_NODE","textContent","trim","changedProperties","has","ariaLabel","title","length","shadowRoot","querySelector","String","_handleKeydown","_handleKeydownInner","_handleSlotChange"],"sources":["components/filter-panel/filter-panel-input-select.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { customElement, html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Close from '@carbon/carbon-web-components/es/icons/close/16.js';\nimport FocusMixin from '@carbon/carbon-web-components/es/globals/mixins/focus.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\nimport DDSFilterPanelInputSelectItem from './filter-panel-input-select-item';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\n/**\n * The container of the input select.\n *\n * @element dds-filter-panel-input-select\n */\n@customElement(`${ddsPrefix}-filter-panel-input-select`)\nclass DDSFilterPanelInputSelect extends FocusMixin(\n StableSelectorMixin(LitElement)\n) {\n @property()\n ariaLabel = '';\n\n /**\n * Sets the input selected dropdown to closed\n */\n @property({ attribute: 'is-open', type: Boolean })\n isOpen = false;\n\n /**\n * sets the title value to a string\n */\n @property()\n title!: string;\n\n /**\n * sets the selected value attribute to selected\n */\n @property({ attribute: 'selected', type: Boolean })\n selected: boolean = false;\n\n /**\n * property for setting the value to a string\n */\n @property()\n value: string = '';\n\n /**\n * targets the last selected item\n */\n @property()\n lastValue: any;\n\n static get selectorItem() {\n return `${ddsPrefix}-filter-panel-input-select-item`;\n }\n\n /**\n *\n * @param event sets the selected value attribute to selected and removes the attribute from the 'lastvalue'\n * @private\n */\n protected _handleClickInner(event) {\n const { eventContentStateChange } = this\n .constructor as typeof DDSFilterPanelInputSelect;\n const selected = (event.target as Element).closest(\n (this.constructor as typeof DDSFilterPanelInputSelect).selectorItem\n ) as DDSFilterPanelInputSelectItem;\n if (selected.hasAttribute('selected')) {\n selected.removeAttribute('selected');\n } else {\n if (this.lastValue) {\n this.lastValue.removeAttribute('selected');\n }\n this.selected = false;\n this.removeAttribute('selected');\n selected.setAttribute('selected', '');\n }\n\n this.dispatchEvent(\n new CustomEvent(eventContentStateChange, {\n bubbles: true,\n composed: true,\n detail: {\n value: selected.getAttribute('value'),\n lastValue: this.lastValue ? this.lastValue.getAttribute('value') : '',\n headerValue: this.headerValue,\n },\n })\n );\n this.lastValue = selected;\n }\n\n /**\n * Ensures the click header handler gets called upon clicking enter if focused.\n *\n * @param event captures the inputed key\n * @private\n */\n private _handleKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Enter') {\n this._handleClickHeader();\n }\n };\n\n /**\n * Ensures the click inner handler gets called upon clicking enter if focused.\n *\n * @param event captures the inputed key\n * @private\n */\n private _handleKeydownInner = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n this._handleClickInner(event);\n }\n };\n\n /**\n * sets the input select items to an array\n */\n @property()\n _items: any[] = [];\n\n /**\n * sets header-value attribute to the input selected header\n */\n @property({ attribute: 'header-value' })\n headerValue: string = '';\n\n /**\n * Toggles the input select dropdown and sets the header to selected and sets the value\n *\n * @private\n */\n protected _handleClickHeader() {\n const { eventInputSelect } = this\n .constructor as typeof DDSFilterPanelInputSelect;\n this.isOpen = !this.isOpen;\n this.selected = !this.selected;\n this.dispatchEvent(\n new CustomEvent(eventInputSelect, {\n bubbles: true,\n composed: true,\n detail: {\n headerValue: this.headerValue,\n },\n })\n );\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._items = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n }\n\n updated(changedProperties) {\n if (changedProperties.has('selected')) {\n this.ariaLabel = `${this.title}, ${\n this.selected ? 'selected' : 'unselected'\n }`;\n }\n if (this._items.length) {\n this.shadowRoot\n ?.querySelector(`.${prefix}--input-container__heading`)\n ?.setAttribute('aria-expanded', String(Boolean(this.isOpen)));\n }\n }\n\n render() {\n const { title } = this;\n return html`\n <div class=\"${prefix}--input-container\">\n <div\n class=\"${prefix}--input-container__heading\"\n tabindex=\"1\"\n @click=${this._handleClickHeader}\n @keydown=${this._handleKeydown}\n aria-controls=\"content\"\n aria-label=\"${this.ariaLabel}\"\n role=\"button\"\n >\n ${title}\n <div class=\"${prefix}--close__icon\">\n ${this.selected && this.isOpen ? Close() : null}\n </div>\n </div>\n <ul\n id=\"content\"\n @click=${this._handleClickInner}\n @keydown=${this._handleKeydownInner}\n class=\"${this.isOpen\n ? ''\n : `${prefix}--selected-option-dropdown__hidden`} ${prefix}--selected-option-dropdown\"\n >\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </ul>\n </div>\n `;\n }\n\n /**\n * The name of the custom event fired upon selecting the title\n */\n static get eventInputSelect() {\n return `${ddsPrefix}-filter-panel-input-select-title`;\n }\n\n /**\n * The name of the custom event fired after the search content is changed upon a user gesture.\n */\n static get eventContentStateChange() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_EL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,MAAM,GAChB,EAAE,GACD,GAAE9B,MAAO,oCAAmC,EAAIA,MAAM,EAEtC,IAAI,CAACkD,iBAAiB;MAInD;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAGA,4BAA8B;QAC5B,OAAQ,GAAEhD,SAAU,kCAAiC;MACvD;;MAEA;AACF;AACA;IAFE;MAAA;MAAA;MAAA;MAAA,OAGA,mCAAqC;QACnC,OAAQ,GAAEA,SAAU,4BAA2B;MACjD;IAAC;MAAA;MAAA;MAAA;MAAA,OAED,0BAA4B;QAC1B,OAAQ,GAAEA,SAAU,4BAA2B;MACjD;IAAC;MAAA;MAAA;MAAA;MAAA;QAAA,OAEeH,MAAM;MAAA;IAAA;EAAA;AAAA,GAjNgBH,UAAU,CAChDE,mBAAmB,CAACL,UAAU,CAAC,CAChC,GAkND;AACA,eAAeU,yBAAyB"}
|
|
1
|
+
{"version":3,"file":"filter-panel-input-select.js","names":["customElement","html","property","LitElement","settings","Close","FocusMixin","ddsSettings","StableSelectorMixin","styles","prefix","stablePrefix","ddsPrefix","DDSFilterPanelInputSelect","attribute","type","Boolean","event","eventContentStateChange","constructor","selected","target","closest","selectorItem","hasAttribute","removeAttribute","lastValue","setAttribute","dispatchEvent","CustomEvent","bubbles","composed","detail","value","getAttribute","headerValue","key","_handleClickHeader","_handleClickInner","eventInputSelect","isOpen","_items","assignedNodes","filter","node","nodeType","Node","TEXT_NODE","textContent","trim","changedProperties","has","ariaLabel","title","length","shadowRoot","querySelector","String","_handleKeydown","_handleKeydownInner","_handleSlotChange"],"sources":["components/filter-panel/filter-panel-input-select.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { customElement, html, property, LitElement } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings.js';\nimport Close from '@carbon/web-components/es/icons/close/16.js';\nimport FocusMixin from '@carbon/web-components/es/globals/mixins/focus.js';\nimport ddsSettings from '../../internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport styles from './filter-panel.scss';\nimport DDSFilterPanelInputSelectItem from './filter-panel-input-select-item';\n\nconst { prefix } = settings;\nconst { stablePrefix: ddsPrefix } = ddsSettings;\n\n/**\n * The container of the input select.\n *\n * @element dds-filter-panel-input-select\n */\n@customElement(`${ddsPrefix}-filter-panel-input-select`)\nclass DDSFilterPanelInputSelect extends FocusMixin(\n StableSelectorMixin(LitElement)\n) {\n @property()\n ariaLabel = '';\n\n /**\n * Sets the input selected dropdown to closed\n */\n @property({ attribute: 'is-open', type: Boolean })\n isOpen = false;\n\n /**\n * sets the title value to a string\n */\n @property()\n title!: string;\n\n /**\n * sets the selected value attribute to selected\n */\n @property({ attribute: 'selected', type: Boolean })\n selected: boolean = false;\n\n /**\n * property for setting the value to a string\n */\n @property()\n value: string = '';\n\n /**\n * targets the last selected item\n */\n @property()\n lastValue: any;\n\n static get selectorItem() {\n return `${ddsPrefix}-filter-panel-input-select-item`;\n }\n\n /**\n *\n * @param event sets the selected value attribute to selected and removes the attribute from the 'lastvalue'\n * @private\n */\n protected _handleClickInner(event) {\n const { eventContentStateChange } = this\n .constructor as typeof DDSFilterPanelInputSelect;\n const selected = (event.target as Element).closest(\n (this.constructor as typeof DDSFilterPanelInputSelect).selectorItem\n ) as DDSFilterPanelInputSelectItem;\n if (selected.hasAttribute('selected')) {\n selected.removeAttribute('selected');\n } else {\n if (this.lastValue) {\n this.lastValue.removeAttribute('selected');\n }\n this.selected = false;\n this.removeAttribute('selected');\n selected.setAttribute('selected', '');\n }\n\n this.dispatchEvent(\n new CustomEvent(eventContentStateChange, {\n bubbles: true,\n composed: true,\n detail: {\n value: selected.getAttribute('value'),\n lastValue: this.lastValue ? this.lastValue.getAttribute('value') : '',\n headerValue: this.headerValue,\n },\n })\n );\n this.lastValue = selected;\n }\n\n /**\n * Ensures the click header handler gets called upon clicking enter if focused.\n *\n * @param event captures the inputed key\n * @private\n */\n private _handleKeydown = ({ key }: KeyboardEvent) => {\n if (key === 'Enter') {\n this._handleClickHeader();\n }\n };\n\n /**\n * Ensures the click inner handler gets called upon clicking enter if focused.\n *\n * @param event captures the inputed key\n * @private\n */\n private _handleKeydownInner = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n this._handleClickInner(event);\n }\n };\n\n /**\n * sets the input select items to an array\n */\n @property()\n _items: any[] = [];\n\n /**\n * sets header-value attribute to the input selected header\n */\n @property({ attribute: 'header-value' })\n headerValue: string = '';\n\n /**\n * Toggles the input select dropdown and sets the header to selected and sets the value\n *\n * @private\n */\n protected _handleClickHeader() {\n const { eventInputSelect } = this\n .constructor as typeof DDSFilterPanelInputSelect;\n this.isOpen = !this.isOpen;\n this.selected = !this.selected;\n this.dispatchEvent(\n new CustomEvent(eventInputSelect, {\n bubbles: true,\n composed: true,\n detail: {\n headerValue: this.headerValue,\n },\n })\n );\n }\n\n /**\n * Handles `slotchange` event.\n *\n * @param event The event.\n */\n protected _handleSlotChange({ target }: Event) {\n this._items = (target as HTMLSlotElement)\n .assignedNodes()\n .filter(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n }\n\n updated(changedProperties) {\n if (changedProperties.has('selected')) {\n this.ariaLabel = `${this.title}, ${\n this.selected ? 'selected' : 'unselected'\n }`;\n }\n if (this._items.length) {\n this.shadowRoot\n ?.querySelector(`.${prefix}--input-container__heading`)\n ?.setAttribute('aria-expanded', String(Boolean(this.isOpen)));\n }\n }\n\n render() {\n const { title } = this;\n return html`\n <div class=\"${prefix}--input-container\">\n <div\n class=\"${prefix}--input-container__heading\"\n tabindex=\"1\"\n @click=${this._handleClickHeader}\n @keydown=${this._handleKeydown}\n aria-controls=\"content\"\n aria-label=\"${this.ariaLabel}\"\n role=\"button\"\n >\n ${title}\n <div class=\"${prefix}--close__icon\">\n ${this.selected && this.isOpen ? Close() : null}\n </div>\n </div>\n <ul\n id=\"content\"\n @click=${this._handleClickInner}\n @keydown=${this._handleKeydownInner}\n class=\"${this.isOpen\n ? ''\n : `${prefix}--selected-option-dropdown__hidden`} ${prefix}--selected-option-dropdown\"\n >\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </ul>\n </div>\n `;\n }\n\n /**\n * The name of the custom event fired upon selecting the title\n */\n static get eventInputSelect() {\n return `${ddsPrefix}-filter-panel-input-select-title`;\n }\n\n /**\n * The name of the custom event fired after the search content is changed upon a user gesture.\n */\n static get eventContentStateChange() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n static get stableSelector() {\n return `${ddsPrefix}-filter-panel-input-select`;\n }\n\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default DDSFilterPanelInputSelect;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,aAAa;AACvE,OAAOC,QAAQ,MAAM,6CAA6C;AAClE,OAAOC,KAAK,MAAM,6CAA6C;AAC/D,OAAOC,UAAU,MAAM,mDAAmD;AAC1E,OAAOC,WAAW,MAAM,kFAA+E;AACvG,OAAOC,mBAAmB,MAAM,yCAAsC;AACtE,OAAOC,MAAM,MAAM,yBAAqB;AAGxC,MAAM;EAAEC;AAAO,CAAC,GAAGN,QAAQ;AAC3B,MAAM;EAAEO,YAAY,EAAEC;AAAU,CAAC,GAAGL,WAAW;;AAE/C;AACA;AACA;AACA;AACA;AAJA,IAMMM,yBAAyB,cAD9Bb,aAAa,CAAE,GAAEY,SAAU,4BAA2B,CAAC;EAAxD,MACMC,yBAAyB,qBAE7B;IAAA;MAAA;MAAA;IAAA;EAgNF;EAAC;IAAA,GAlNKA,yBAAyB;IAAA;MAAA;MAAA,aAG5BX,QAAQ,EAAE;MAAA;MAAA;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