@ukic/web-components 3.0.0-alpha.2 → 3.0.0-alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-f1cf5156.js → helpers-69219f14.js} +24 -1
- package/dist/cjs/helpers-69219f14.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +10 -10
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +5 -5
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +7 -5
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +22 -24
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +17 -6
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +6 -4
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +4 -2
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +71 -7
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +2 -2
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +4 -3
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +450 -167
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +9 -7
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +11 -11
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +5 -4
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +29 -2
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +5 -5
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +8 -11
- package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +37 -15
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +11 -11
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +15 -6
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +31 -22
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +12 -9
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +147 -37
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -3
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +7 -4
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +2 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +2 -2
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +3 -3
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/ag-theme-icds.css +217 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.css +21 -19
- package/dist/collection/components/ic-accordion/ic-accordion.js +27 -30
- package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
- package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +3 -3
- package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +2 -12
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +18 -18
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +3 -3
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +1 -1
- package/dist/collection/components/ic-alert/ic-alert.css +25 -18
- package/dist/collection/components/ic-alert/ic-alert.js +48 -22
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +1 -1
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +98 -114
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +46 -24
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +47 -39
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +29 -3
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +15 -2
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +40 -3
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +13 -25
- package/dist/collection/components/ic-dialog/ic-dialog.css +16 -3
- package/dist/collection/components/ic-dialog/ic-dialog.js +26 -0
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-divider/ic-divider.css +341 -4
- package/dist/collection/components/ic-divider/ic-divider.js +235 -8
- package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
- package/dist/collection/components/ic-divider/ic-divider.types.js +2 -0
- package/dist/collection/components/ic-divider/ic-divider.types.js.map +1 -0
- package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js +89 -4
- package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js.map +1 -1
- package/dist/collection/components/ic-footer/ic-footer.css +20 -19
- package/dist/collection/components/ic-footer-link/ic-footer-link.css +2 -2
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +9 -21
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
- package/dist/collection/components/ic-hero/ic-hero.css +17 -2
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +3 -2
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +4 -2
- package/dist/collection/components/ic-input-label/ic-input-label.css +13 -1
- package/dist/collection/components/ic-input-label/ic-input-label.js +45 -4
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js +35 -49
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.css +5 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +1 -0
- package/dist/collection/components/ic-menu/ic-menu.css +78 -14
- package/dist/collection/components/ic-menu/ic-menu.js +488 -194
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +381 -33
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.css +2 -2
- package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +32 -28
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +11 -11
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +1 -1
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +3 -2
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +31 -3
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js +12 -0
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.css +5 -2
- package/dist/collection/components/ic-page-header/ic-page-header.js +3 -3
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-pagination/ic-pagination.css +15 -0
- package/dist/collection/components/ic-pagination/ic-pagination.js +77 -37
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +1 -1
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +26 -6
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +48 -33
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +5 -5
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +33 -9
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.css +17 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +38 -3
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +2 -2
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +35 -25
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +54 -21
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +41 -5
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +34 -7
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.css +37 -16
- package/dist/collection/components/ic-select/ic-select.js +191 -43
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +160 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +0 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +2 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.css +27 -30
- package/dist/collection/components/ic-switch/ic-switch.js +29 -2
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +2 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.css +7 -4
- package/dist/collection/components/ic-toast/ic-toast.css +25 -16
- package/dist/collection/components/ic-toast/ic-toast.js +1 -2
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +12 -12
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +1 -0
- package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/utils/helpers.js +20 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +22 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-accordion-group.js +11 -11
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js +5 -5
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +8 -5
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-card-vertical.js +23 -24
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +19 -6
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +6 -3
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-classification-banner.js +1 -1
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-dialog.js +4 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +86 -9
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +3 -2
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +10 -6
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +2 -2
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu-item2.js +11 -11
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +453 -169
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +5 -4
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +31 -3
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +4 -4
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +10 -12
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination.js +38 -15
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +11 -10
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +17 -6
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +32 -22
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +13 -9
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select.js +148 -37
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +4 -3
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +7 -3
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +2 -1
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-text-field2.js +2 -2
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +3 -3
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +1 -1
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/core/ag-theme-icds.css +217 -0
- package/dist/core/core.css +692 -10
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-84526c3e.entry.js → p-13d5875c.entry.js} +2 -2
- package/dist/core/p-13d5875c.entry.js.map +1 -0
- package/dist/core/p-19872973.entry.js +2 -0
- package/dist/core/p-19872973.entry.js.map +1 -0
- package/dist/core/p-2140431c.entry.js +2 -0
- package/dist/core/p-2140431c.entry.js.map +1 -0
- package/dist/core/p-29767574.entry.js +2 -0
- package/dist/core/p-29767574.entry.js.map +1 -0
- package/dist/core/p-2e909738.entry.js +2 -0
- package/dist/core/p-2e909738.entry.js.map +1 -0
- package/dist/core/p-2eae9b27.entry.js +2 -0
- package/dist/core/p-2eae9b27.entry.js.map +1 -0
- package/dist/core/p-2ef46ead.entry.js +2 -0
- package/dist/core/p-2ef46ead.entry.js.map +1 -0
- package/dist/core/{p-355acffa.entry.js → p-37dea10d.entry.js} +2 -2
- package/dist/core/p-3d9726a3.entry.js +2 -0
- package/dist/core/{p-408344d3.entry.js.map → p-3d9726a3.entry.js.map} +1 -1
- package/dist/core/p-428f95f8.entry.js +2 -0
- package/dist/core/p-428f95f8.entry.js.map +1 -0
- package/dist/core/p-4973c563.entry.js +2 -0
- package/dist/core/p-4973c563.entry.js.map +1 -0
- package/dist/core/{p-93c23a35.entry.js → p-4a3b1f06.entry.js} +2 -2
- package/dist/core/{p-34db8aaf.entry.js → p-5cd016e1.entry.js} +2 -2
- package/dist/core/{p-d2f8e03f.entry.js → p-5ef8e106.entry.js} +2 -2
- package/dist/core/p-5f4a6555.entry.js +2 -0
- package/dist/core/p-5f4a6555.entry.js.map +1 -0
- package/dist/core/p-605c0c92.entry.js +2 -0
- package/dist/core/p-605c0c92.entry.js.map +1 -0
- package/dist/core/p-655a9e0f.entry.js +2 -0
- package/dist/core/p-655a9e0f.entry.js.map +1 -0
- package/dist/core/p-65a16de9.entry.js +2 -0
- package/dist/core/p-65a16de9.entry.js.map +1 -0
- package/dist/core/{p-0a808ec3.entry.js → p-690c5e80.entry.js} +2 -2
- package/dist/core/p-705eb610.entry.js +2 -0
- package/dist/core/p-705eb610.entry.js.map +1 -0
- package/dist/core/{p-f30f3a3e.entry.js → p-76263187.entry.js} +2 -2
- package/dist/core/p-78c1f1cc.entry.js +2 -0
- package/dist/core/p-78c1f1cc.entry.js.map +1 -0
- package/dist/core/p-79d0be03.entry.js +2 -0
- package/dist/core/p-79d0be03.entry.js.map +1 -0
- package/dist/core/{p-c06a3b97.entry.js → p-7b35de65.entry.js} +2 -2
- package/dist/core/p-7bff1e96.entry.js +2 -0
- package/dist/core/p-7bff1e96.entry.js.map +1 -0
- package/dist/core/{p-4055f22c.entry.js → p-806a0fab.entry.js} +2 -2
- package/dist/core/p-806a0fab.entry.js.map +1 -0
- package/dist/core/p-85173458.entry.js +2 -0
- package/dist/core/p-85173458.entry.js.map +1 -0
- package/dist/core/{p-1b573920.entry.js → p-922984cb.entry.js} +2 -2
- package/dist/core/{p-aab2c7aa.entry.js → p-95f603dd.entry.js} +2 -2
- package/dist/core/{p-b01ffa55.entry.js → p-96b4ca6e.entry.js} +2 -2
- package/dist/core/p-96b4ca6e.entry.js.map +1 -0
- package/dist/core/p-979c2792.entry.js +2 -0
- package/dist/core/p-979c2792.entry.js.map +1 -0
- package/dist/core/{p-e4b276b5.entry.js → p-97fb2bdf.entry.js} +2 -2
- package/dist/core/p-9ec7f96c.entry.js +2 -0
- package/dist/core/p-9ec7f96c.entry.js.map +1 -0
- package/dist/core/p-9fa93dfe.entry.js +2 -0
- package/dist/core/p-9fa93dfe.entry.js.map +1 -0
- package/dist/core/p-a9341313.entry.js +2 -0
- package/dist/core/p-a9341313.entry.js.map +1 -0
- package/dist/core/{p-e3ed9110.entry.js → p-acbd15ab.entry.js} +2 -2
- package/dist/core/{p-31fc8756.entry.js → p-ae0775aa.entry.js} +2 -2
- package/dist/core/p-ae0775aa.entry.js.map +1 -0
- package/dist/core/{p-312cacae.js → p-b7eb8ef9.js} +2 -2
- package/dist/core/p-b7eb8ef9.js.map +1 -0
- package/dist/core/{p-4ff6d16f.entry.js → p-ba6ecc15.entry.js} +2 -2
- package/dist/core/p-bbeb03ef.entry.js +2 -0
- package/dist/core/p-bbeb03ef.entry.js.map +1 -0
- package/dist/core/{p-0d30ffab.entry.js → p-c0fc3d02.entry.js} +2 -2
- package/dist/core/p-c396bd4d.entry.js +2 -0
- package/dist/core/p-c396bd4d.entry.js.map +1 -0
- package/dist/core/{p-f828a6e1.entry.js → p-c9cf932c.entry.js} +2 -2
- package/dist/core/p-cedc375e.entry.js +2 -0
- package/dist/core/p-cedc375e.entry.js.map +1 -0
- package/dist/core/{p-d58a10ec.entry.js → p-d4a83e25.entry.js} +2 -2
- package/dist/core/p-d4a83e25.entry.js.map +1 -0
- package/dist/core/p-d93bac01.entry.js +2 -0
- package/dist/core/p-d93bac01.entry.js.map +1 -0
- package/dist/core/{p-50ead56c.entry.js → p-df957570.entry.js} +2 -2
- package/dist/core/p-df957570.entry.js.map +1 -0
- package/dist/core/{p-0fb047e7.entry.js → p-eb3b4935.entry.js} +2 -2
- package/dist/core/{p-0fb047e7.entry.js.map → p-eb3b4935.entry.js.map} +1 -1
- package/dist/core/{p-60efd7fa.entry.js → p-ebafab37.entry.js} +2 -2
- package/dist/core/p-ebafab37.entry.js.map +1 -0
- package/dist/core/{p-82375dca.entry.js → p-ee6dd94c.entry.js} +2 -2
- package/dist/core/p-ef78bebc.entry.js +2 -0
- package/dist/core/p-ef78bebc.entry.js.map +1 -0
- package/dist/core/p-f0ae2b99.entry.js +2 -0
- package/dist/core/p-f0ae2b99.entry.js.map +1 -0
- package/dist/core/{p-49525194.entry.js → p-f24984c5.entry.js} +2 -2
- package/dist/core/p-f24984c5.entry.js.map +1 -0
- package/dist/core/{p-d8870804.entry.js → p-f5b2b26d.entry.js} +2 -2
- package/dist/core/{p-40e9e76a.entry.js → p-f71c00ce.entry.js} +2 -2
- package/dist/core/p-fdd0b732.entry.js +2 -0
- package/dist/core/p-fdd0b732.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-1c9151ef.js → helpers-e8797e8d.js} +23 -2
- package/dist/esm/helpers-e8797e8d.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +10 -10
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +5 -5
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +7 -5
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +2 -2
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +23 -25
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +17 -6
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +6 -4
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-classification-banner.entry.js +1 -1
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +4 -2
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +72 -8
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +2 -2
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +2 -2
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +2 -2
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +4 -3
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +450 -167
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +9 -7
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +3 -3
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +11 -11
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +5 -4
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +30 -3
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +5 -5
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +8 -11
- package/dist/esm/ic-pagination-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination.entry.js +37 -15
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +11 -11
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +15 -6
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +31 -22
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +12 -9
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +147 -37
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +4 -3
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +7 -4
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +2 -1
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-text-field.entry.js +2 -2
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +3 -3
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-accordion/ic-accordion.d.ts +5 -5
- package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +4 -4
- package/dist/types/components/ic-alert/ic-alert.d.ts +9 -5
- package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +7 -3
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +6 -2
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +7 -1
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +5 -0
- package/dist/types/components/ic-divider/ic-divider.d.ts +31 -1
- package/dist/types/components/ic-divider/ic-divider.types.d.ts +3 -0
- package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +2 -1
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +8 -0
- package/dist/types/components/ic-menu/ic-menu.d.ts +43 -15
- package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +1 -1
- package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +2 -2
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +2 -2
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +7 -2
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +13 -5
- package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +9 -5
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +5 -0
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +6 -1
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +8 -3
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +5 -1
- package/dist/types/components/ic-select/ic-select.d.ts +24 -10
- package/dist/types/components/ic-switch/ic-switch.d.ts +5 -1
- package/dist/types/components.d.ts +242 -51
- package/dist/types/utils/helpers.d.ts +9 -2
- package/dist/types/utils/types.d.ts +1 -1
- package/hydrate/index.js +969 -380
- package/package.json +2 -2
- package/vscode-data.json +330 -55
- package/dist/cjs/helpers-f1cf5156.js.map +0 -1
- package/dist/core/p-0c872824.entry.js +0 -2
- package/dist/core/p-0c872824.entry.js.map +0 -1
- package/dist/core/p-1684c8d4.entry.js +0 -2
- package/dist/core/p-1684c8d4.entry.js.map +0 -1
- package/dist/core/p-1f1758a9.entry.js +0 -2
- package/dist/core/p-1f1758a9.entry.js.map +0 -1
- package/dist/core/p-21e5dd29.entry.js +0 -2
- package/dist/core/p-21e5dd29.entry.js.map +0 -1
- package/dist/core/p-244d6dba.entry.js +0 -2
- package/dist/core/p-244d6dba.entry.js.map +0 -1
- package/dist/core/p-312cacae.js.map +0 -1
- package/dist/core/p-31fc8756.entry.js.map +0 -1
- package/dist/core/p-322edabc.entry.js +0 -2
- package/dist/core/p-322edabc.entry.js.map +0 -1
- package/dist/core/p-363d6e88.entry.js +0 -2
- package/dist/core/p-363d6e88.entry.js.map +0 -1
- package/dist/core/p-4055f22c.entry.js.map +0 -1
- package/dist/core/p-408344d3.entry.js +0 -2
- package/dist/core/p-43f9a711.entry.js +0 -2
- package/dist/core/p-43f9a711.entry.js.map +0 -1
- package/dist/core/p-4502d3c1.entry.js +0 -2
- package/dist/core/p-4502d3c1.entry.js.map +0 -1
- package/dist/core/p-49525194.entry.js.map +0 -1
- package/dist/core/p-50ead56c.entry.js.map +0 -1
- package/dist/core/p-5deb9730.entry.js +0 -2
- package/dist/core/p-5deb9730.entry.js.map +0 -1
- package/dist/core/p-60efd7fa.entry.js.map +0 -1
- package/dist/core/p-6bd2e938.entry.js +0 -2
- package/dist/core/p-6bd2e938.entry.js.map +0 -1
- package/dist/core/p-6d40baa9.entry.js +0 -2
- package/dist/core/p-6d40baa9.entry.js.map +0 -1
- package/dist/core/p-7c89fc86.entry.js +0 -2
- package/dist/core/p-7c89fc86.entry.js.map +0 -1
- package/dist/core/p-84526c3e.entry.js.map +0 -1
- package/dist/core/p-9dba6823.entry.js +0 -2
- package/dist/core/p-9dba6823.entry.js.map +0 -1
- package/dist/core/p-aa0619ce.entry.js +0 -2
- package/dist/core/p-aa0619ce.entry.js.map +0 -1
- package/dist/core/p-af20322c.entry.js +0 -2
- package/dist/core/p-af20322c.entry.js.map +0 -1
- package/dist/core/p-b01ffa55.entry.js.map +0 -1
- package/dist/core/p-bf1f0ac7.entry.js +0 -2
- package/dist/core/p-bf1f0ac7.entry.js.map +0 -1
- package/dist/core/p-c86d48b6.entry.js +0 -2
- package/dist/core/p-c86d48b6.entry.js.map +0 -1
- package/dist/core/p-cbcd4427.entry.js +0 -2
- package/dist/core/p-cbcd4427.entry.js.map +0 -1
- package/dist/core/p-d1c9c32b.entry.js +0 -2
- package/dist/core/p-d1c9c32b.entry.js.map +0 -1
- package/dist/core/p-d2f89cb5.entry.js +0 -2
- package/dist/core/p-d2f89cb5.entry.js.map +0 -1
- package/dist/core/p-d58a10ec.entry.js.map +0 -1
- package/dist/core/p-da14cd3c.entry.js +0 -2
- package/dist/core/p-da14cd3c.entry.js.map +0 -1
- package/dist/core/p-dc83a0e9.entry.js +0 -2
- package/dist/core/p-dc83a0e9.entry.js.map +0 -1
- package/dist/core/p-de3a5423.entry.js +0 -2
- package/dist/core/p-de3a5423.entry.js.map +0 -1
- package/dist/core/p-e53309b0.entry.js +0 -2
- package/dist/core/p-e53309b0.entry.js.map +0 -1
- package/dist/core/p-f38bce8d.entry.js +0 -2
- package/dist/core/p-f38bce8d.entry.js.map +0 -1
- package/dist/core/p-fa1b7a80.entry.js +0 -2
- package/dist/core/p-fa1b7a80.entry.js.map +0 -1
- package/dist/core/p-fa587e6d.entry.js +0 -2
- package/dist/core/p-fa587e6d.entry.js.map +0 -1
- package/dist/esm/helpers-1c9151ef.js.map +0 -1
- /package/dist/core/{p-355acffa.entry.js.map → p-37dea10d.entry.js.map} +0 -0
- /package/dist/core/{p-93c23a35.entry.js.map → p-4a3b1f06.entry.js.map} +0 -0
- /package/dist/core/{p-34db8aaf.entry.js.map → p-5cd016e1.entry.js.map} +0 -0
- /package/dist/core/{p-d2f8e03f.entry.js.map → p-5ef8e106.entry.js.map} +0 -0
- /package/dist/core/{p-0a808ec3.entry.js.map → p-690c5e80.entry.js.map} +0 -0
- /package/dist/core/{p-f30f3a3e.entry.js.map → p-76263187.entry.js.map} +0 -0
- /package/dist/core/{p-c06a3b97.entry.js.map → p-7b35de65.entry.js.map} +0 -0
- /package/dist/core/{p-1b573920.entry.js.map → p-922984cb.entry.js.map} +0 -0
- /package/dist/core/{p-aab2c7aa.entry.js.map → p-95f603dd.entry.js.map} +0 -0
- /package/dist/core/{p-e4b276b5.entry.js.map → p-97fb2bdf.entry.js.map} +0 -0
- /package/dist/core/{p-e3ed9110.entry.js.map → p-acbd15ab.entry.js.map} +0 -0
- /package/dist/core/{p-4ff6d16f.entry.js.map → p-ba6ecc15.entry.js.map} +0 -0
- /package/dist/core/{p-0d30ffab.entry.js.map → p-c0fc3d02.entry.js.map} +0 -0
- /package/dist/core/{p-f828a6e1.entry.js.map → p-c9cf932c.entry.js.map} +0 -0
- /package/dist/core/{p-82375dca.entry.js.map → p-ee6dd94c.entry.js.map} +0 -0
- /package/dist/core/{p-d8870804.entry.js.map → p-f5b2b26d.entry.js.map} +0 -0
- /package/dist/core/{p-40e9e76a.entry.js.map → p-f71c00ce.entry.js.map} +0 -0
@@ -1,18 +1,25 @@
|
|
1
1
|
import { h, Host, Fragment, } from "@stencil/core";
|
2
2
|
import { createPopper } from "@popperjs/core";
|
3
3
|
import Check from "../../assets/check-icon.svg";
|
4
|
-
import { onComponentRequiredPropUndefined } from "../../utils/helpers";
|
4
|
+
import { getOptionsWithoutGroupTitlesCount, isMacDevice, onComponentRequiredPropUndefined, } from "../../utils/helpers";
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
6
6
|
export class Menu {
|
7
7
|
constructor() {
|
8
|
+
this.ACTIVE_DESCENDANT = "aria-activedescendant";
|
9
|
+
this.CLEAR_BUTTON_ID = "clear-button";
|
8
10
|
this.disabledOptionSelected = false;
|
9
11
|
this.hasPreviouslyBlurred = false;
|
10
12
|
this.hasTimedOut = false;
|
11
13
|
this.isLoading = false;
|
14
|
+
this.isMultiSelect = false;
|
12
15
|
this.isSearchBar = false;
|
13
16
|
this.isSearchableSelect = false;
|
14
|
-
|
15
|
-
this.
|
17
|
+
this.lastOptionSelected = null; // Index of last option selected
|
18
|
+
this.lastOptionFocused = null; // Index of last option focused
|
19
|
+
this.multiOptionClicked = null;
|
20
|
+
this.preventClickOpen = false; // Prevents menu re-opening immediately after it is closed on blur when clicking input.
|
21
|
+
this.preventMenuFocus = false; // (When multiple) ensures focus moves straight to select all button from menu.
|
22
|
+
this.shiftPressed = false;
|
16
23
|
this.ungroupedOptions = [];
|
17
24
|
this.handleClearListener = () => {
|
18
25
|
this.optionHighlighted = "";
|
@@ -23,9 +30,16 @@ export class Menu {
|
|
23
30
|
};
|
24
31
|
this.handleMenuChange = (open, focusInput) => {
|
25
32
|
this.menuStateChange.emit({ open, focusInput });
|
26
|
-
if (!open
|
27
|
-
|
28
|
-
|
33
|
+
if (!open) {
|
34
|
+
if (focusInput !== false) {
|
35
|
+
this.inputEl.focus();
|
36
|
+
this.preventClickOpen = false;
|
37
|
+
}
|
38
|
+
// Reset optionHighlighted so previously highlighted option doesn't get reselected when Enter pressed
|
39
|
+
if (this.isMultiSelect) {
|
40
|
+
this.optionHighlighted = undefined;
|
41
|
+
this.multiOptionClicked = null;
|
42
|
+
}
|
29
43
|
}
|
30
44
|
};
|
31
45
|
this.setNextOptionValue = (selectedOptionIndex) => {
|
@@ -60,24 +74,34 @@ export class Menu {
|
|
60
74
|
if (parent.tagName === "IC-SEARCH-BAR") {
|
61
75
|
this.isSearchBar = true;
|
62
76
|
}
|
63
|
-
else if (parent.tagName === "IC-SELECT"
|
64
|
-
parent.getAttribute("searchable") !== null &&
|
65
|
-
|
66
|
-
|
77
|
+
else if (parent.tagName === "IC-SELECT") {
|
78
|
+
if (parent.getAttribute("searchable") !== null &&
|
79
|
+
parent.getAttribute("searchable") !== undefined) {
|
80
|
+
this.isSearchableSelect = true;
|
81
|
+
}
|
82
|
+
else if (parent.getAttribute("multiple") !== null &&
|
83
|
+
parent.getAttribute("multiple") !== undefined) {
|
84
|
+
this.isMultiSelect = true;
|
85
|
+
}
|
67
86
|
}
|
68
87
|
};
|
88
|
+
// Open menu when up or down arrow keys are pressed
|
69
89
|
this.arrowBehaviour = (event) => {
|
70
90
|
event.preventDefault();
|
71
91
|
this.handleMenuChange(true);
|
72
92
|
};
|
73
|
-
this.
|
93
|
+
this.getMenuOptions = () => this.isSearchBar ? this.options : this.ungroupedOptions;
|
94
|
+
// Set option that is focused and so should show focus state
|
74
95
|
this.setHighlightedOption = (highlightedIndex) => {
|
75
|
-
const menuOptions = this.
|
96
|
+
const menuOptions = this.getMenuOptions();
|
76
97
|
menuOptions[highlightedIndex] &&
|
77
98
|
!menuOptions[highlightedIndex].timedOut &&
|
78
99
|
(this.optionHighlighted =
|
79
100
|
menuOptions[highlightedIndex][this.valueField] || undefined);
|
80
101
|
};
|
102
|
+
// Determines keyboard behaviour when selection is automatic
|
103
|
+
// (i.e. you don't have to press Enter select an option - just focus on it)
|
104
|
+
// and menu is closed
|
81
105
|
this.autoSetInputValueKeyboardOpen = (event) => {
|
82
106
|
const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
|
83
107
|
this.keyboardNav = false;
|
@@ -94,147 +118,278 @@ export class Menu {
|
|
94
118
|
break;
|
95
119
|
case " ":
|
96
120
|
case "Enter":
|
97
|
-
if (event.target.id !==
|
121
|
+
if (event.target.id !== this.CLEAR_BUTTON_ID) {
|
98
122
|
this.handleMenuChange(true);
|
99
123
|
}
|
100
124
|
break;
|
101
125
|
}
|
102
126
|
};
|
103
|
-
this.
|
104
|
-
|
105
|
-
|
106
|
-
|
127
|
+
this.selectHighlightedOption = (options, highlightedOptionIndex) => {
|
128
|
+
if (!this.isLoading && !this.hasTimedOut) {
|
129
|
+
this.keyboardNav = true;
|
130
|
+
}
|
107
131
|
const isOpen = this.isSearchBar || this.isSearchableSelect || this.open;
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
else {
|
119
|
-
this.setHighlightedOption(0);
|
120
|
-
this.menuOptionId.emit({
|
121
|
-
optionId: getOptionId(0),
|
122
|
-
});
|
132
|
+
if (isOpen) {
|
133
|
+
if (highlightedOptionIndex >= 0) {
|
134
|
+
if (options[highlightedOptionIndex] !== undefined) {
|
135
|
+
if (this.isSearchBar &&
|
136
|
+
options[highlightedOptionIndex].disabled === true) {
|
137
|
+
this.disabledOptionSelected = true;
|
138
|
+
}
|
139
|
+
else {
|
140
|
+
this.setInputValue(highlightedOptionIndex);
|
141
|
+
}
|
123
142
|
}
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
143
|
+
}
|
144
|
+
else {
|
145
|
+
this.setInputValue(highlightedOptionIndex);
|
146
|
+
}
|
147
|
+
}
|
148
|
+
else {
|
149
|
+
this.handleMenuChange(true);
|
150
|
+
}
|
151
|
+
};
|
152
|
+
// Check if option is selected based on the index of the option
|
153
|
+
this.isOptionSelected = (index) => {
|
154
|
+
const menuOptions = this.getMenuOptions();
|
155
|
+
return this.value
|
156
|
+
? this.value.includes(menuOptions[index][this.valueField])
|
157
|
+
: false;
|
158
|
+
};
|
159
|
+
// Deselect currently selected options when shift pressed, but keep certain options selected
|
160
|
+
this.deselectSelectedOptions = (optionsToKeepSelected) => {
|
161
|
+
const menuOptions = this.getMenuOptions();
|
162
|
+
if (this.value) {
|
163
|
+
const selectedOptionIndexes = this.value.map((value) => {
|
164
|
+
return menuOptions.findIndex((option) => option[this.valueField] === value);
|
165
|
+
});
|
166
|
+
// Call setInputValue (which toggles the selected state) on options that need to be deselected
|
167
|
+
selectedOptionIndexes.forEach((index) => !optionsToKeepSelected.includes(index) && this.setInputValue(index));
|
168
|
+
}
|
169
|
+
};
|
170
|
+
// Determines keyboard behaviour when selection is manual (i.e. when you have to press Enter to select an option)
|
171
|
+
this.manualSetInputValueKeyboardOpen = (event) => {
|
172
|
+
const menuOptions = this.getMenuOptions();
|
173
|
+
// For preventing focus disappearing on currently focused option when Shift / Cmd / Ctrl pressed
|
174
|
+
// (i.e. when user is likely in the middle of executing a keyboard combination to select options)
|
175
|
+
const isKeyboardCombination = event.shiftKey || event.metaKey || event.ctrlKey;
|
176
|
+
const highlightedOptionIndex = this.getOptionHighlightedIndex();
|
177
|
+
const clickedMultiOptionIndex = menuOptions.findIndex((option) => option[this.valueField] === this.multiOptionClicked);
|
178
|
+
const getOptionId = (index) => { var _a; return (_a = Array.from(this.host.querySelectorAll("li"))[index]) === null || _a === void 0 ? void 0 : _a.id; };
|
179
|
+
// Space press should be equivalent to Enter when multi-select
|
180
|
+
if (event.key === " " && this.isMultiSelect) {
|
181
|
+
this.handleOptionSelect(event, highlightedOptionIndex);
|
182
|
+
}
|
183
|
+
else {
|
184
|
+
switch (event.key) {
|
185
|
+
case "ArrowDown":
|
186
|
+
this.keyboardNav = true;
|
187
|
+
this.arrowBehaviour(event);
|
188
|
+
if (this.multiOptionClicked) {
|
189
|
+
// Set focus to option last clicked
|
190
|
+
// Prevents it resetting to the top of the menu when user switches to using keyboard
|
191
|
+
this.setHighlightedOption(clickedMultiOptionIndex);
|
192
|
+
this.multiOptionClicked = null;
|
193
|
+
}
|
194
|
+
else {
|
195
|
+
this.handleSingleShiftSelect(event, highlightedOptionIndex, menuOptions);
|
196
|
+
if (highlightedOptionIndex < menuOptions.length - 1) {
|
197
|
+
this.setHighlightedOption(highlightedOptionIndex + 1);
|
198
|
+
this.menuOptionId.emit({
|
199
|
+
optionId: getOptionId(highlightedOptionIndex + 1),
|
200
|
+
});
|
201
|
+
this.handleSingleShiftSelect(event, highlightedOptionIndex + 1, menuOptions);
|
202
|
+
}
|
203
|
+
else {
|
204
|
+
this.setHighlightedOption(0);
|
205
|
+
this.menuOptionId.emit({
|
206
|
+
optionId: getOptionId(0),
|
207
|
+
});
|
208
|
+
this.handleSingleShiftSelect(event, 0, menuOptions);
|
209
|
+
}
|
210
|
+
// Deselect currently selected options if arrow was pressed for first time after shift is held
|
211
|
+
if (this.isMultiSelect && this.shiftPressed) {
|
212
|
+
this.deselectSelectedOptions([
|
213
|
+
highlightedOptionIndex,
|
214
|
+
this.getOptionHighlightedIndex(),
|
215
|
+
]);
|
216
|
+
this.shiftPressed = false;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
this.lastOptionFocused = this.getOptionHighlightedIndex();
|
220
|
+
this.preventIncorrectTabOrder = false;
|
221
|
+
this.focusFromSearchKeypress = false;
|
222
|
+
break;
|
223
|
+
case "ArrowUp":
|
224
|
+
this.keyboardNav = true;
|
225
|
+
this.arrowBehaviour(event);
|
226
|
+
if (this.multiOptionClicked) {
|
227
|
+
// Set focus to option last clicked
|
228
|
+
// Prevents it resetting to the bottom of the menu when user switches to using keyboard
|
229
|
+
this.setHighlightedOption(clickedMultiOptionIndex);
|
230
|
+
this.multiOptionClicked = null;
|
231
|
+
}
|
232
|
+
else {
|
233
|
+
this.handleSingleShiftSelect(event, highlightedOptionIndex, menuOptions);
|
234
|
+
if (highlightedOptionIndex <= 0 ||
|
235
|
+
highlightedOptionIndex > menuOptions.length + 1) {
|
236
|
+
this.setHighlightedOption(menuOptions.length - 1);
|
237
|
+
this.menuOptionId.emit({
|
238
|
+
optionId: getOptionId(menuOptions.length - 1),
|
239
|
+
});
|
240
|
+
this.handleSingleShiftSelect(event, menuOptions.length - 1, menuOptions);
|
241
|
+
}
|
242
|
+
else {
|
243
|
+
this.setHighlightedOption(highlightedOptionIndex - 1);
|
244
|
+
this.menuOptionId.emit({
|
245
|
+
optionId: getOptionId(highlightedOptionIndex - 1),
|
246
|
+
});
|
247
|
+
this.handleSingleShiftSelect(event, highlightedOptionIndex - 1, menuOptions);
|
248
|
+
}
|
249
|
+
// Deselect currently selected options if arrow was pressed for first time after shift is held
|
250
|
+
if (this.isMultiSelect && this.shiftPressed) {
|
251
|
+
this.deselectSelectedOptions([
|
252
|
+
highlightedOptionIndex,
|
253
|
+
this.getOptionHighlightedIndex(),
|
254
|
+
]);
|
255
|
+
this.shiftPressed = false;
|
256
|
+
}
|
257
|
+
}
|
258
|
+
this.lastOptionFocused = this.getOptionHighlightedIndex();
|
259
|
+
this.preventIncorrectTabOrder = false;
|
260
|
+
this.focusFromSearchKeypress = false;
|
261
|
+
break;
|
262
|
+
case "Home": {
|
263
|
+
const startOptionIndex = 0;
|
264
|
+
this.keyboardNav = true;
|
265
|
+
event.preventDefault();
|
266
|
+
this.arrowBehaviour(event);
|
267
|
+
this.setHighlightedOption(startOptionIndex);
|
133
268
|
this.menuOptionId.emit({
|
134
|
-
optionId: getOptionId(
|
269
|
+
optionId: getOptionId(startOptionIndex),
|
135
270
|
});
|
271
|
+
if (event.shiftKey && event.ctrlKey) {
|
272
|
+
this.handleMultipleShiftSelect(startOptionIndex);
|
273
|
+
}
|
274
|
+
this.lastOptionFocused = startOptionIndex;
|
275
|
+
this.lastOptionSelected = startOptionIndex;
|
276
|
+
break;
|
136
277
|
}
|
137
|
-
|
138
|
-
|
278
|
+
case "End": {
|
279
|
+
const endOptionIndex = menuOptions.length - 1;
|
280
|
+
this.keyboardNav = true;
|
281
|
+
event.preventDefault();
|
282
|
+
this.arrowBehaviour(event);
|
283
|
+
this.setHighlightedOption(endOptionIndex);
|
139
284
|
this.menuOptionId.emit({
|
140
|
-
optionId: getOptionId(
|
285
|
+
optionId: getOptionId(endOptionIndex),
|
141
286
|
});
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
this.keyboardNav = true;
|
148
|
-
event.preventDefault();
|
149
|
-
this.arrowBehaviour(event);
|
150
|
-
this.setHighlightedOption(0);
|
151
|
-
this.menuOptionId.emit({
|
152
|
-
optionId: getOptionId(0),
|
153
|
-
});
|
154
|
-
break;
|
155
|
-
case "End":
|
156
|
-
this.keyboardNav = true;
|
157
|
-
event.preventDefault();
|
158
|
-
this.arrowBehaviour(event);
|
159
|
-
this.setHighlightedOption(menuOptions.length - 1);
|
160
|
-
this.menuOptionId.emit({
|
161
|
-
optionId: getOptionId(menuOptions.length - 1),
|
162
|
-
});
|
163
|
-
break;
|
164
|
-
case " ":
|
165
|
-
this.keyboardNav = false;
|
166
|
-
if (this.isSearchBar || this.isSearchableSelect) {
|
287
|
+
if (event.shiftKey && event.ctrlKey) {
|
288
|
+
this.handleMultipleShiftSelect(endOptionIndex);
|
289
|
+
}
|
290
|
+
this.lastOptionFocused = endOptionIndex;
|
291
|
+
this.lastOptionSelected = endOptionIndex;
|
167
292
|
break;
|
168
293
|
}
|
169
|
-
|
170
|
-
if (
|
171
|
-
this.
|
294
|
+
case " ":
|
295
|
+
if (!isKeyboardCombination) {
|
296
|
+
this.keyboardNav = false;
|
172
297
|
}
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
298
|
+
if (this.isSearchBar || this.isSearchableSelect) {
|
299
|
+
break;
|
300
|
+
}
|
301
|
+
else {
|
302
|
+
if (event.target.id !== this.CLEAR_BUTTON_ID) {
|
303
|
+
this.handleMenuChange(true);
|
304
|
+
}
|
305
|
+
}
|
306
|
+
break;
|
307
|
+
case "Enter":
|
308
|
+
event.preventDefault();
|
309
|
+
if (!isKeyboardCombination) {
|
310
|
+
this.keyboardNav = false;
|
311
|
+
}
|
312
|
+
this.handleOptionSelect(event, highlightedOptionIndex);
|
313
|
+
break;
|
314
|
+
case "Escape":
|
315
|
+
if (this.open) {
|
316
|
+
event.stopImmediatePropagation();
|
317
|
+
}
|
318
|
+
this.handleMenuChange(false);
|
319
|
+
this.menuOptionId.emit({ optionId: undefined });
|
320
|
+
break;
|
321
|
+
case "a":
|
322
|
+
// Checks if Cmd (meta) key is pressed if Mac device (while excluding meta key on Windows)
|
323
|
+
// Otherwise, if a different OS, checks Ctrl key
|
324
|
+
if ((isMacDevice() && event.metaKey) ||
|
325
|
+
(!isMacDevice() && event.ctrlKey)) {
|
326
|
+
this.emitSelectAll();
|
327
|
+
this.lastOptionFocused = null;
|
328
|
+
this.lastOptionSelected = null;
|
329
|
+
}
|
330
|
+
break;
|
331
|
+
case "Shift":
|
332
|
+
case "Tab":
|
333
|
+
if (event.key === "Shift") {
|
334
|
+
this.shiftPressed = true;
|
335
|
+
}
|
336
|
+
if (this.isSearchBar) {
|
337
|
+
this.keyboardNav = true;
|
338
|
+
}
|
339
|
+
if (this.isMultiSelect) {
|
340
|
+
if (this.open && !event.shiftKey && this.selectAllButton) {
|
341
|
+
event.preventDefault();
|
342
|
+
this.selectAllButton.focus(); // Move focus to select all button instead of focused option
|
343
|
+
this.preventMenuFocus = true;
|
344
|
+
this.preventClickOpen = true;
|
345
|
+
this.optionHighlighted = undefined; // Stop any option focus states showing when focus moved to select all button
|
190
346
|
}
|
191
347
|
}
|
192
348
|
else {
|
193
|
-
this.
|
349
|
+
this.preventIncorrectTabOrder = true;
|
194
350
|
}
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
event.stopImmediatePropagation();
|
203
|
-
}
|
204
|
-
this.handleMenuChange(false);
|
205
|
-
this.menuOptionId.emit({ optionId: undefined });
|
206
|
-
break;
|
207
|
-
case "Shift":
|
208
|
-
case "Tab":
|
209
|
-
if (this.isSearchBar) {
|
210
|
-
this.keyboardNav = true;
|
211
|
-
}
|
212
|
-
this.preventIncorrectTabOrder = true;
|
213
|
-
break;
|
214
|
-
default:
|
215
|
-
this.keyboardNav = false;
|
216
|
-
this.focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex);
|
217
|
-
break;
|
351
|
+
break;
|
352
|
+
default:
|
353
|
+
if (!isKeyboardCombination) {
|
354
|
+
this.keyboardNav = false;
|
355
|
+
}
|
356
|
+
this.focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex);
|
357
|
+
}
|
218
358
|
}
|
219
359
|
};
|
220
360
|
this.setInputValue = (highlightedOptionIndex) => {
|
221
|
-
const menuOptions = this.
|
361
|
+
const menuOptions = this.getMenuOptions();
|
222
362
|
if (menuOptions[highlightedOptionIndex] !== undefined) {
|
223
363
|
this.menuOptionSelect.emit({
|
224
364
|
value: menuOptions[highlightedOptionIndex][this.valueField],
|
225
365
|
});
|
226
|
-
this.
|
227
|
-
|
366
|
+
if (this.closeOnSelect) {
|
367
|
+
this.optionHighlighted = undefined;
|
368
|
+
this.menuOptionId.emit({ optionId: undefined });
|
369
|
+
}
|
370
|
+
}
|
371
|
+
if (this.closeOnSelect) {
|
372
|
+
if (!this.hasTimedOut) {
|
373
|
+
this.handleMenuChange(false);
|
374
|
+
}
|
375
|
+
else {
|
376
|
+
this.parentEl.setFocus();
|
377
|
+
}
|
228
378
|
}
|
229
|
-
if (!this.hasTimedOut)
|
230
|
-
this.handleMenuChange(false);
|
231
|
-
else
|
232
|
-
this.parentEl.setFocus();
|
233
379
|
};
|
234
380
|
this.handleOptionClick = (event) => {
|
235
381
|
const { value, label } = event.target.dataset;
|
236
|
-
this.
|
237
|
-
|
382
|
+
if (this.isMultiSelect) {
|
383
|
+
const menuOptions = this.getMenuOptions();
|
384
|
+
const selectedOptionIndex = menuOptions.findIndex((option) => option.value === value);
|
385
|
+
this.handleOptionSelect(event, selectedOptionIndex, true);
|
386
|
+
this.multiOptionClicked = value;
|
387
|
+
}
|
388
|
+
else {
|
389
|
+
this.menuOptionSelect.emit({ value, label });
|
390
|
+
this.handleMenuChange(false);
|
391
|
+
}
|
392
|
+
this.optionHighlighted = undefined;
|
238
393
|
};
|
239
394
|
this.handleRetry = () => {
|
240
395
|
this.retryButtonClicked.emit({ value: this.value });
|
@@ -247,13 +402,23 @@ export class Menu {
|
|
247
402
|
};
|
248
403
|
this.handleBlur = (event) => {
|
249
404
|
if (event.relatedTarget !== this.inputEl) {
|
250
|
-
if (
|
405
|
+
if (event.relatedTarget === this.selectAllButton) {
|
406
|
+
this.menu.removeAttribute(this.ACTIVE_DESCENDANT);
|
407
|
+
}
|
408
|
+
if (!(this.menu.contains(event.relatedTarget) ||
|
409
|
+
event.relatedTarget === this.selectAllButton)) {
|
251
410
|
this.handleMenuChange(false, this.hasPreviouslyBlurred);
|
411
|
+
this.menu.removeAttribute(this.ACTIVE_DESCENDANT);
|
412
|
+
this.lastOptionFocused = null;
|
413
|
+
this.lastOptionSelected = null;
|
252
414
|
}
|
253
415
|
}
|
254
416
|
else {
|
255
417
|
this.handleMenuChange(false);
|
256
418
|
this.preventClickOpen = true;
|
419
|
+
this.menu.removeAttribute(this.ACTIVE_DESCENDANT);
|
420
|
+
this.lastOptionFocused = null;
|
421
|
+
this.lastOptionSelected = null;
|
257
422
|
}
|
258
423
|
if (!this.isSearchBar)
|
259
424
|
this.hasPreviouslyBlurred = !!event.relatedTarget;
|
@@ -266,12 +431,109 @@ export class Menu {
|
|
266
431
|
this.autoSetValueOnMenuKeyDown(event);
|
267
432
|
}
|
268
433
|
else if (this.activationType === "manual" && !this.isSearchBar) {
|
269
|
-
this.
|
434
|
+
this.manualSetInputValueKeyboardOpen(event);
|
435
|
+
}
|
436
|
+
};
|
437
|
+
this.handleMenuKeyUp = (event) => {
|
438
|
+
if (event.key === "Tab" && event.shiftKey) {
|
439
|
+
this.preventClickOpen = false;
|
440
|
+
}
|
441
|
+
if (event.key === "Enter" && this.disabledOptionSelected) {
|
442
|
+
this.disabledOptionSelected = false;
|
443
|
+
event.stopImmediatePropagation();
|
444
|
+
}
|
445
|
+
if (event.key === "Shift") {
|
446
|
+
this.shiftPressed = false;
|
447
|
+
}
|
448
|
+
};
|
449
|
+
this.handleSelectAllClick = () => {
|
450
|
+
this.keyboardNav = false;
|
451
|
+
this.menu.focus();
|
452
|
+
this.emitSelectAll();
|
453
|
+
this.lastOptionFocused = null;
|
454
|
+
this.lastOptionSelected = null;
|
455
|
+
};
|
456
|
+
this.handleSelectAllBlur = (event) => {
|
457
|
+
this.host.classList.remove("ic-select-select-all-focused");
|
458
|
+
if (!this.menu.contains(event.relatedTarget)) {
|
459
|
+
this.handleMenuChange(false, false);
|
460
|
+
}
|
461
|
+
};
|
462
|
+
this.handleSelectAllFocus = () => {
|
463
|
+
this.host.classList.add("ic-select-select-all-focused");
|
464
|
+
this.lastOptionFocused = null;
|
465
|
+
this.lastOptionSelected = null;
|
466
|
+
};
|
467
|
+
// Fix for Safari - select all button click was causing menu to close
|
468
|
+
this.handleSelectAllMouseDown = (event) => {
|
469
|
+
event.preventDefault();
|
470
|
+
};
|
471
|
+
// When shift key is being used to select contiguous options one by one on a multi-select
|
472
|
+
// I.e. holding shift and pressing up and down arrow keys
|
473
|
+
this.handleSingleShiftSelect = (event, optionToSelectIndex, options) => {
|
474
|
+
if (this.isMultiSelect &&
|
475
|
+
event.shiftKey &&
|
476
|
+
!this.isOptionSelected(optionToSelectIndex)) {
|
477
|
+
this.selectHighlightedOption(options, optionToSelectIndex);
|
478
|
+
this.lastOptionSelected = optionToSelectIndex;
|
479
|
+
}
|
480
|
+
};
|
481
|
+
// When shift key is being used to select multiple options at once on a multi-select
|
482
|
+
// I.e. holding shift when selecting another option
|
483
|
+
this.handleMultipleShiftSelect = (lastOptionInSelection, useFocusForSelection = false, firstOptionSelected = null) => {
|
484
|
+
this.shiftPressed = false;
|
485
|
+
const firstOptionInSelection = firstOptionSelected === null
|
486
|
+
? this.getFirstOptionInSelection(useFocusForSelection)
|
487
|
+
: firstOptionSelected;
|
488
|
+
if (firstOptionInSelection !== null) {
|
489
|
+
const optionsToSelect = [];
|
490
|
+
if (firstOptionInSelection < lastOptionInSelection) {
|
491
|
+
for (let i = firstOptionInSelection; i < lastOptionInSelection + 1; i++) {
|
492
|
+
optionsToSelect.push(i);
|
493
|
+
}
|
494
|
+
}
|
495
|
+
else {
|
496
|
+
for (let i = firstOptionInSelection; i > lastOptionInSelection - 1; i--) {
|
497
|
+
optionsToSelect.push(i);
|
498
|
+
}
|
499
|
+
}
|
500
|
+
optionsToSelect.forEach((optionIndex) => !this.isOptionSelected(optionIndex) && this.setInputValue(optionIndex));
|
501
|
+
this.deselectSelectedOptions(optionsToSelect);
|
270
502
|
}
|
271
503
|
};
|
504
|
+
this.handleOptionSelect = (event, optionIndex, useFocusForSelection = false) => {
|
505
|
+
const menuOptions = this.getMenuOptions();
|
506
|
+
const firstOptionInSelection = this.getFirstOptionInSelection(useFocusForSelection);
|
507
|
+
if (event.shiftKey && firstOptionInSelection !== null) {
|
508
|
+
this.handleMultipleShiftSelect(optionIndex, useFocusForSelection, firstOptionInSelection);
|
509
|
+
}
|
510
|
+
else {
|
511
|
+
this.selectHighlightedOption(menuOptions, optionIndex);
|
512
|
+
}
|
513
|
+
this.lastOptionFocused = optionIndex;
|
514
|
+
this.lastOptionSelected = optionIndex;
|
515
|
+
};
|
516
|
+
this.getFirstOptionInSelection = (useFocusForSelection) => {
|
517
|
+
return useFocusForSelection && this.lastOptionFocused !== null
|
518
|
+
? this.lastOptionFocused
|
519
|
+
: this.lastOptionSelected !== null
|
520
|
+
? this.lastOptionSelected
|
521
|
+
: null;
|
522
|
+
};
|
523
|
+
this.emitSelectAll = () => {
|
524
|
+
var _a;
|
525
|
+
// Select all if there is either no value or not all options are selected
|
526
|
+
// 'true' means select all, 'false' means clear all
|
527
|
+
this.menuOptionSelectAll.emit({
|
528
|
+
select: !this.value || !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === this.ungroupedOptions.length),
|
529
|
+
});
|
530
|
+
};
|
272
531
|
this.emitMenuKeyPress = (isNavKey, key) => {
|
273
532
|
this.menuKeyPress.emit({ isNavKey: isNavKey, key: key });
|
274
533
|
};
|
534
|
+
// Determines keyboard behaviour when selection is automatic
|
535
|
+
// (i.e. you don't have to press Enter select an option - just focus on it)
|
536
|
+
// and menu is focused
|
275
537
|
this.autoSetValueOnMenuKeyDown = (event) => {
|
276
538
|
event.cancelBubble = true;
|
277
539
|
const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
|
@@ -331,15 +593,6 @@ export class Menu {
|
|
331
593
|
}
|
332
594
|
this.emitMenuKeyPress(this.keyboardNav, event.key);
|
333
595
|
};
|
334
|
-
this.handleMenuKeyUp = (event) => {
|
335
|
-
if (event.key === "Tab" && event.shiftKey) {
|
336
|
-
this.preventClickOpen = false;
|
337
|
-
}
|
338
|
-
if (event.key === "Enter" && this.disabledOptionSelected) {
|
339
|
-
this.disabledOptionSelected = false;
|
340
|
-
event.stopImmediatePropagation();
|
341
|
-
}
|
342
|
-
};
|
343
596
|
this.getOptionId = (value) => {
|
344
597
|
return `${this.menuId}-${value}`;
|
345
598
|
};
|
@@ -365,6 +618,10 @@ export class Menu {
|
|
365
618
|
}
|
366
619
|
return sorted;
|
367
620
|
};
|
621
|
+
this.getOptionHighlightedIndex = () => {
|
622
|
+
const menuOptions = this.getMenuOptions();
|
623
|
+
return menuOptions.findIndex((option) => option[this.valueField] === this.optionHighlighted);
|
624
|
+
};
|
368
625
|
this.isManualMode = this.activationType === "manual";
|
369
626
|
this.scrollToSelected = (menu) => {
|
370
627
|
const selectedOption = this.selectOnEnter
|
@@ -376,9 +633,14 @@ export class Menu {
|
|
376
633
|
elTop < menu.scrollTop + menu.offsetHeight) {
|
377
634
|
menu.scrollTop = selectedOption.offsetTop;
|
378
635
|
}
|
636
|
+
// 'aria-activedescendant' affects screen reader focus
|
637
|
+
// https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/#kbd_focus_activedescendant
|
638
|
+
this.menu.setAttribute(this.ACTIVE_DESCENDANT, selectedOption.id);
|
379
639
|
selectedOption.focus();
|
380
640
|
}
|
381
641
|
};
|
642
|
+
// Set 'ungroupedOptions' variable and emit its value
|
643
|
+
// - this is all the options with disabled options and group titles removed
|
382
644
|
this.loadUngroupedOptions = () => {
|
383
645
|
if (this.options.length > 0 && this.options.map) {
|
384
646
|
this.options.map((option) => {
|
@@ -405,21 +667,24 @@ export class Menu {
|
|
405
667
|
this.handleTimeoutBlur = (ev) => {
|
406
668
|
this.timeoutBlur.emit({ ev });
|
407
669
|
};
|
408
|
-
this.optionContent = (option) => {
|
409
|
-
|
410
|
-
return (h(Fragment, null, option.loading && h("ic-loading-indicator", { size: "icon" }), h("div", { class: "option-text-container" }, h("div", { class: "option-label" }, option.icon && (h("div", { class: "option-icon", innerHTML: option.icon, "aria-hidden": "true" })), h("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])), option.description && (h("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, h("p", null, option.description))), option.element && (h("div", { class: "option-element", innerHTML: option.element.component, "aria-hidden": "true" }))), !!option[this.valueField] &&
|
670
|
+
this.optionContent = (option, selected) => {
|
671
|
+
const showCheckIcon = !!option[this.valueField] &&
|
411
672
|
!!this.value &&
|
412
|
-
|
413
|
-
this.parentEl.tagName !== "IC-SEARCH-BAR"
|
673
|
+
selected &&
|
674
|
+
this.parentEl.tagName !== "IC-SEARCH-BAR";
|
675
|
+
return (h(Fragment, null, option.loading && h("ic-loading-indicator", { size: "icon" }), h("div", { class: {
|
676
|
+
"option-text-container": true,
|
677
|
+
"show-check-icon": showCheckIcon,
|
678
|
+
} }, h("div", { class: "option-label" }, option.icon && (h("div", { class: "option-icon", innerHTML: option.icon, "aria-hidden": "true" })), h("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])), option.description && (h("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, h("p", null, option.description))), option.element && (h("div", { class: "option-element", innerHTML: option.element.component, "aria-hidden": "true" }))), showCheckIcon && h("span", { class: "check-icon", innerHTML: Check })));
|
414
679
|
};
|
415
|
-
this.displayOption = (option, index, parentOption) => {
|
416
|
-
const { open,
|
680
|
+
this.displayOption = (option, selected, index, parentOption) => {
|
681
|
+
const { open, keyboardNav, isManualMode, initialOptionsListRender, optionHighlighted, options, } = this;
|
417
682
|
return (h("li", { id: this.getOptionId(option[this.valueField]), class: {
|
418
683
|
option: true,
|
419
684
|
"focused-option": isManualMode
|
420
685
|
? (keyboardNav || initialOptionsListRender) &&
|
421
686
|
option[this.valueField] === optionHighlighted
|
422
|
-
: keyboardNav &&
|
687
|
+
: keyboardNav && selected,
|
423
688
|
"last-recommended-option": option.recommended &&
|
424
689
|
options[index + 1] &&
|
425
690
|
!options[index + 1].recommended,
|
@@ -427,20 +692,21 @@ export class Menu {
|
|
427
692
|
"loading-option": option.loading,
|
428
693
|
timeout: option.timedOut,
|
429
694
|
}, role: "option", tabindex: open &&
|
430
|
-
(option[this.valueField] ===
|
431
|
-
option[this.valueField] === optionHighlighted) &&
|
695
|
+
(selected || option[this.valueField] === optionHighlighted) &&
|
432
696
|
keyboardNav
|
433
697
|
? "0"
|
434
|
-
: "-1", "aria-label": this.getOptionAriaLabel(option, parentOption), "aria-selected":
|
698
|
+
: "-1", "aria-label": this.getOptionAriaLabel(option, parentOption), "aria-selected": selected ? "true" : "false", "aria-disabled": option.disabled ? "true" : "false", onClick: !option.timedOut && !option.loading && this.handleOptionClick, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, "data-value": option[this.valueField], "data-label": option[this.labelField] }, option.timedOut ? (h(Fragment, null, h("div", { class: "loading-error-info" }, h("svg", { class: "error-icon-svg", "aria-labelledby": "error-title", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#000000" }, h("title", { id: "error-title" }, "Error"), h("g", { id: "close-octagon" }, h("path", { id: "Vector", d: "M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" }))), h("ic-typography", { variant: "label" }, option[this.labelField])), h("ic-button", { size: "small", variant: "tertiary", onClick: this.handleRetry, onKeyDown: this.handleRetryKeyDown, onBlur: this.handleTimeoutBlur, id: "retry-button" }, "Retry"))) : (this.optionContent(option, selected))));
|
435
699
|
};
|
436
700
|
this.focusFromSearchKeypress = false;
|
437
701
|
this.initialOptionsListRender = false;
|
438
702
|
this.keyboardNav = false;
|
439
703
|
this.optionHighlighted = undefined;
|
440
704
|
this.preventIncorrectTabOrder = false;
|
705
|
+
this.menuOptions = undefined;
|
441
706
|
this.activationType = "automatic";
|
442
707
|
this.anchorEl = undefined;
|
443
708
|
this.autoFocusOnSelected = true;
|
709
|
+
this.closeOnSelect = true;
|
444
710
|
this.fullWidth = false;
|
445
711
|
this.inputEl = undefined;
|
446
712
|
this.inputLabel = undefined;
|
@@ -467,9 +733,6 @@ export class Menu {
|
|
467
733
|
this.ungroupedOptions = [];
|
468
734
|
this.loadUngroupedOptions();
|
469
735
|
}
|
470
|
-
watchValueHandler() {
|
471
|
-
this.menuValueChange.emit({ value: this.value });
|
472
|
-
}
|
473
736
|
connectedCallback() {
|
474
737
|
this.getParentEl(this.parentEl);
|
475
738
|
if (this.isSearchBar) {
|
@@ -479,11 +742,12 @@ export class Menu {
|
|
479
742
|
}
|
480
743
|
}
|
481
744
|
disconnectedCallback() {
|
745
|
+
var _a, _b;
|
482
746
|
if (this.popperInstance) {
|
483
747
|
this.popperInstance.destroy();
|
484
748
|
}
|
485
|
-
this.parentEl.removeEventListener("icClear", this.handleClearListener);
|
486
|
-
this.parentEl.removeEventListener("icSubmitSearch", this.handleSubmitSearch);
|
749
|
+
(_a = this.parentEl) === null || _a === void 0 ? void 0 : _a.removeEventListener("icClear", this.handleClearListener);
|
750
|
+
(_b = this.parentEl) === null || _b === void 0 ? void 0 : _b.removeEventListener("icSubmitSearch", this.handleSubmitSearch);
|
487
751
|
}
|
488
752
|
componentWillLoad() {
|
489
753
|
var _a, _b;
|
@@ -508,7 +772,7 @@ export class Menu {
|
|
508
772
|
}
|
509
773
|
componentDidUpdate() {
|
510
774
|
const inputValueInOptions = this.options.some((option) => option[this.valueField] === this.value);
|
511
|
-
if (this.open && this.options.length !== 0) {
|
775
|
+
if (this.open && this.options.length !== 0 && !this.preventMenuFocus) {
|
512
776
|
if (this.value &&
|
513
777
|
this.keyboardNav &&
|
514
778
|
inputValueInOptions &&
|
@@ -516,8 +780,7 @@ export class Menu {
|
|
516
780
|
!this.isSearchableSelect) {
|
517
781
|
this.scrollToSelected(this.menu);
|
518
782
|
}
|
519
|
-
else if (this.
|
520
|
-
this.inputEl.tagName !== "INPUT") {
|
783
|
+
else if (this.selectOnEnter) {
|
521
784
|
this.menu.focus();
|
522
785
|
}
|
523
786
|
else if (!!this.optionHighlighted &&
|
@@ -525,13 +788,19 @@ export class Menu {
|
|
525
788
|
!this.preventIncorrectTabOrder) {
|
526
789
|
const highlightedEl = this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);
|
527
790
|
if (highlightedEl) {
|
791
|
+
this.menu.setAttribute(this.ACTIVE_DESCENDANT, highlightedEl.id);
|
528
792
|
highlightedEl.focus();
|
529
793
|
}
|
530
794
|
}
|
795
|
+
else if (this.inputEl.tagName !== "IC-TEXT-FIELD" &&
|
796
|
+
this.inputEl.tagName !== "INPUT") {
|
797
|
+
this.menu.focus();
|
798
|
+
}
|
531
799
|
}
|
532
800
|
if (this.open && !this.value && this.selectOnEnter) {
|
533
801
|
this.scrollToSelected(this.menu);
|
534
802
|
}
|
803
|
+
this.preventMenuFocus = false;
|
535
804
|
}
|
536
805
|
componentDidRender() {
|
537
806
|
if (this.open && !this.popperInstance && this.anchorEl) {
|
@@ -561,7 +830,7 @@ export class Menu {
|
|
561
830
|
this.autoSetInputValueKeyboardOpen(event);
|
562
831
|
}
|
563
832
|
else {
|
564
|
-
this.
|
833
|
+
this.manualSetInputValueKeyboardOpen(event);
|
565
834
|
}
|
566
835
|
}
|
567
836
|
/**
|
@@ -576,8 +845,9 @@ export class Menu {
|
|
576
845
|
* boundary behaviour so sticking with PopperJS.
|
577
846
|
*/
|
578
847
|
async initPopperJs(anchor) {
|
848
|
+
// Placements set to "-start" to accommodate for custom menu width - menu should always be aligned to the left
|
579
849
|
this.popperInstance = createPopper(anchor, this.host, {
|
580
|
-
placement: "bottom",
|
850
|
+
placement: "bottom-start",
|
581
851
|
modifiers: [
|
582
852
|
{
|
583
853
|
name: "offset",
|
@@ -588,7 +858,7 @@ export class Menu {
|
|
588
858
|
{
|
589
859
|
name: "flip",
|
590
860
|
options: {
|
591
|
-
fallbackPlacements: ["top"],
|
861
|
+
fallbackPlacements: ["top-start"],
|
592
862
|
rootBoundary: "viewport",
|
593
863
|
},
|
594
864
|
},
|
@@ -610,24 +880,38 @@ export class Menu {
|
|
610
880
|
}
|
611
881
|
render() {
|
612
882
|
const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, } = this;
|
883
|
+
const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
|
884
|
+
const hasNoResults = this.host.classList.contains("no-results");
|
613
885
|
return (h(Host, { class: {
|
614
886
|
"ic-menu-full-width": fullWidth,
|
615
887
|
"ic-menu-no-focus": (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" || hasTimedOut || isLoading,
|
616
888
|
[`ic-menu-${size}`]: true,
|
617
|
-
"ic-menu-open": open,
|
618
|
-
|
889
|
+
"ic-menu-open": open && options.length !== 0,
|
890
|
+
"ic-menu-multiple": this.isMultiSelect,
|
891
|
+
} }, options.length !== 0 && (h("ul", { id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": this.isMultiSelect ? "true" : "false", tabindex: open && !keyboardNav && (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ? "0" : "-1", ref: (el) => (this.menu = el), onKeyDown: this.handleMenuKeyDown, onKeyUp: this.handleMenuKeyUp, onBlur: this.handleBlur }, this.getSortedOptions(options).map((option, index) => {
|
619
892
|
if (option.children) {
|
620
893
|
if (option.children.length > 0) {
|
621
|
-
return (h("div", null, h("ic-typography", { class: "option-group-title", role: "presentation", variant: "subtitle-small" }, h("p", null, option[this.labelField])), option.children.map((childOption) =>
|
894
|
+
return (h("div", null, h("ic-typography", { class: "option-group-title", role: "presentation", variant: "subtitle-small" }, h("p", null, option[this.labelField])), option.children.map((childOption) => childOption.label &&
|
895
|
+
this.displayOption(childOption, this.isMultiSelect
|
896
|
+
? value === null || value === void 0 ? void 0 : value.includes(childOption[this.valueField])
|
897
|
+
: childOption[this.valueField] === value, index, option))));
|
622
898
|
}
|
623
899
|
else {
|
624
900
|
return null;
|
625
901
|
}
|
626
902
|
}
|
627
903
|
else {
|
628
|
-
|
904
|
+
// Display option only if it has a label (rather than displaying an empty space)
|
905
|
+
return (option.label &&
|
906
|
+
this.displayOption(option, this.isMultiSelect
|
907
|
+
? value === null || value === void 0 ? void 0 : value.includes(option[this.valueField])
|
908
|
+
: option[this.valueField] === value, index));
|
629
909
|
}
|
630
|
-
})))
|
910
|
+
}))), options.length !== 0 &&
|
911
|
+
this.isMultiSelect &&
|
912
|
+
!isLoading &&
|
913
|
+
!hasTimedOut &&
|
914
|
+
!hasNoResults && (h("div", { class: "option-bar" }, h("ic-typography", null, h("p", null, `${value ? value.length : 0}/${getOptionsWithoutGroupTitlesCount(this.options)} selected`)), h("ic-button", { class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "medium" }, selectAllButtonText)))));
|
631
915
|
}
|
632
916
|
static get is() { return "ic-menu"; }
|
633
917
|
static get encapsulation() { return "scoped"; }
|
@@ -708,6 +992,24 @@ export class Menu {
|
|
708
992
|
"reflect": false,
|
709
993
|
"defaultValue": "true"
|
710
994
|
},
|
995
|
+
"closeOnSelect": {
|
996
|
+
"type": "boolean",
|
997
|
+
"mutable": false,
|
998
|
+
"complexType": {
|
999
|
+
"original": "boolean",
|
1000
|
+
"resolved": "boolean",
|
1001
|
+
"references": {}
|
1002
|
+
},
|
1003
|
+
"required": false,
|
1004
|
+
"optional": false,
|
1005
|
+
"docs": {
|
1006
|
+
"tags": [],
|
1007
|
+
"text": "If `true`, the menu will close when an option is selected."
|
1008
|
+
},
|
1009
|
+
"attribute": "close-on-select",
|
1010
|
+
"reflect": false,
|
1011
|
+
"defaultValue": "true"
|
1012
|
+
},
|
711
1013
|
"fullWidth": {
|
712
1014
|
"type": "boolean",
|
713
1015
|
"mutable": false,
|
@@ -901,7 +1203,7 @@ export class Menu {
|
|
901
1203
|
"optional": true,
|
902
1204
|
"docs": {
|
903
1205
|
"tags": [],
|
904
|
-
"text": "The size of the menu
|
1206
|
+
"text": "The size of the menu."
|
905
1207
|
},
|
906
1208
|
"attribute": "size",
|
907
1209
|
"reflect": false,
|
@@ -930,17 +1232,17 @@ export class Menu {
|
|
930
1232
|
},
|
931
1233
|
"value": {
|
932
1234
|
"type": "string",
|
933
|
-
"mutable":
|
1235
|
+
"mutable": false,
|
934
1236
|
"complexType": {
|
935
|
-
"original": "string",
|
936
|
-
"resolved": "string",
|
1237
|
+
"original": "string | string[]",
|
1238
|
+
"resolved": "string | string[]",
|
937
1239
|
"references": {}
|
938
1240
|
},
|
939
1241
|
"required": true,
|
940
1242
|
"optional": false,
|
941
1243
|
"docs": {
|
942
1244
|
"tags": [],
|
943
|
-
"text": "The value of the currently selected option."
|
1245
|
+
"text": "The value of the currently selected option - or array of values (if multiple options allowed)."
|
944
1246
|
},
|
945
1247
|
"attribute": "value",
|
946
1248
|
"reflect": false
|
@@ -971,7 +1273,8 @@ export class Menu {
|
|
971
1273
|
"initialOptionsListRender": {},
|
972
1274
|
"keyboardNav": {},
|
973
1275
|
"optionHighlighted": {},
|
974
|
-
"preventIncorrectTabOrder": {}
|
1276
|
+
"preventIncorrectTabOrder": {},
|
1277
|
+
"menuOptions": {}
|
975
1278
|
};
|
976
1279
|
}
|
977
1280
|
static get events() {
|
@@ -984,7 +1287,7 @@ export class Menu {
|
|
984
1287
|
"docs": {
|
985
1288
|
"tags": [{
|
986
1289
|
"name": "internal",
|
987
|
-
"text": "Emitted when key is pressed while menu is open"
|
1290
|
+
"text": "Emitted when key is pressed while menu is open."
|
988
1291
|
}],
|
989
1292
|
"text": ""
|
990
1293
|
},
|
@@ -1002,7 +1305,7 @@ export class Menu {
|
|
1002
1305
|
"docs": {
|
1003
1306
|
"tags": [{
|
1004
1307
|
"name": "internal",
|
1005
|
-
"text": "Emitted when an option has been highlighted"
|
1308
|
+
"text": "Emitted when an option has been highlighted."
|
1006
1309
|
}],
|
1007
1310
|
"text": ""
|
1008
1311
|
},
|
@@ -1042,50 +1345,44 @@ export class Menu {
|
|
1042
1345
|
}
|
1043
1346
|
}
|
1044
1347
|
}, {
|
1045
|
-
"method": "
|
1046
|
-
"name": "
|
1348
|
+
"method": "menuOptionSelectAll",
|
1349
|
+
"name": "menuOptionSelectAll",
|
1047
1350
|
"bubbles": true,
|
1048
1351
|
"cancelable": true,
|
1049
1352
|
"composed": true,
|
1050
1353
|
"docs": {
|
1051
1354
|
"tags": [{
|
1052
1355
|
"name": "internal",
|
1053
|
-
"text": "Emitted when
|
1356
|
+
"text": "Emitted when all options are selected or deselected."
|
1054
1357
|
}],
|
1055
1358
|
"text": ""
|
1056
1359
|
},
|
1057
1360
|
"complexType": {
|
1058
|
-
"original": "
|
1059
|
-
"resolved": "
|
1060
|
-
"references": {
|
1061
|
-
"IcMenuChangeEventDetail": {
|
1062
|
-
"location": "import",
|
1063
|
-
"path": "./ic-menu.types",
|
1064
|
-
"id": "src/components/ic-menu/ic-menu.types.ts::IcMenuChangeEventDetail"
|
1065
|
-
}
|
1066
|
-
}
|
1361
|
+
"original": "{ select: boolean }",
|
1362
|
+
"resolved": "{ select: boolean; }",
|
1363
|
+
"references": {}
|
1067
1364
|
}
|
1068
1365
|
}, {
|
1069
|
-
"method": "
|
1070
|
-
"name": "
|
1366
|
+
"method": "menuStateChange",
|
1367
|
+
"name": "menuStateChange",
|
1071
1368
|
"bubbles": true,
|
1072
1369
|
"cancelable": true,
|
1073
1370
|
"composed": true,
|
1074
1371
|
"docs": {
|
1075
1372
|
"tags": [{
|
1076
1373
|
"name": "internal",
|
1077
|
-
"text": "Emitted when menu
|
1374
|
+
"text": "Emitted when state of menu changes (i.e. open or closed)."
|
1078
1375
|
}],
|
1079
1376
|
"text": ""
|
1080
1377
|
},
|
1081
1378
|
"complexType": {
|
1082
|
-
"original": "
|
1083
|
-
"resolved": "
|
1379
|
+
"original": "IcMenuChangeEventDetail",
|
1380
|
+
"resolved": "IcMenuChangeEventDetail",
|
1084
1381
|
"references": {
|
1085
|
-
"
|
1382
|
+
"IcMenuChangeEventDetail": {
|
1086
1383
|
"location": "import",
|
1087
|
-
"path": "
|
1088
|
-
"id": "src/
|
1384
|
+
"path": "./ic-menu.types",
|
1385
|
+
"id": "src/components/ic-menu/ic-menu.types.ts::IcMenuChangeEventDetail"
|
1089
1386
|
}
|
1090
1387
|
}
|
1091
1388
|
}
|
@@ -1098,7 +1395,7 @@ export class Menu {
|
|
1098
1395
|
"docs": {
|
1099
1396
|
"tags": [{
|
1100
1397
|
"name": "internal",
|
1101
|
-
"text": "Emitted when the retry button is clicked"
|
1398
|
+
"text": "Emitted when the retry button is clicked."
|
1102
1399
|
}],
|
1103
1400
|
"text": ""
|
1104
1401
|
},
|
@@ -1122,7 +1419,7 @@ export class Menu {
|
|
1122
1419
|
"docs": {
|
1123
1420
|
"tags": [{
|
1124
1421
|
"name": "internal",
|
1125
|
-
"text": "Emitted when the timeout menu loses focus"
|
1422
|
+
"text": "Emitted when the timeout menu loses focus."
|
1126
1423
|
}],
|
1127
1424
|
"text": ""
|
1128
1425
|
},
|
@@ -1270,9 +1567,6 @@ export class Menu {
|
|
1270
1567
|
}, {
|
1271
1568
|
"propName": "options",
|
1272
1569
|
"methodName": "watchOptionsHandler"
|
1273
|
-
}, {
|
1274
|
-
"propName": "value",
|
1275
|
-
"methodName": "watchValueHandler"
|
1276
1570
|
}];
|
1277
1571
|
}
|
1278
1572
|
}
|