@ukic/web-components 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-fc4016d2.js → helpers-931fd72e.js} +30 -32
- package/dist/cjs/helpers-931fd72e.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +10 -8
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/ic-button_3.cjs.entry.js +138 -145
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -2
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -5
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +8 -13
- 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-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
- package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +7 -6
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +33 -27
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +36 -13
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +12 -22
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +31 -39
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +121 -166
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +65 -62
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-page-header.cjs.entry.js +7 -7
- package/dist/cjs/ic-pagination-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
- package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +6 -6
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -5
- package/dist/cjs/ic-search-bar.cjs.entry.js +68 -34
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-select.cjs.entry.js +142 -218
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +35 -17
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
- package/dist/cjs/ic-step.cjs.entry.js +14 -14
- package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
- package/dist/cjs/ic-switch.cjs.entry.js +6 -6
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +16 -11
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +4 -4
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +54 -68
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +62 -64
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +74 -66
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/ag-theme-icds.css +24 -4
- package/dist/collection/components/ic-accordion/ic-accordion.js +9 -7
- package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.stories.js +1 -1
- package/dist/collection/components/ic-alert/ic-alert.css +4 -0
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +2 -2
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +2 -2
- package/dist/collection/components/ic-button/ic-button.css +0 -8
- package/dist/collection/components/ic-button/ic-button.js +3 -3
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +3 -0
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +9 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +6 -11
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +10 -2
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +6 -3
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +22 -0
- package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
- package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
- package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
- package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
- package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
- package/dist/collection/components/ic-hero/ic-hero.css +13 -4
- package/dist/collection/components/ic-hero/ic-hero.js +5 -4
- package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
- package/dist/collection/components/ic-hero/ic-hero.stories.js +1 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
- package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
- package/dist/collection/components/ic-input-label/ic-input-label.css +2 -1
- package/dist/collection/components/ic-input-label/ic-input-label.js +31 -8
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
- package/dist/collection/components/ic-link/ic-link.js +12 -25
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +3 -3
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +210 -211
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.types.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.js +94 -47
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +38 -47
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +144 -170
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +10 -14
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +80 -74
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
- package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
- package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +3 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
- package/dist/collection/components/ic-radio-group/ic-radio-group.css +10 -2
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +7 -4
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +22 -0
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +96 -34
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +29 -18
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.js +197 -271
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(multi).stories.js +21 -13
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +21 -13
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +47 -30
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +54 -16
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +390 -0
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
- package/dist/collection/components/ic-step/ic-step.js +13 -13
- package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
- package/dist/collection/components/ic-switch/ic-switch.css +1 -4
- package/dist/collection/components/ic-switch/ic-switch.js +5 -4
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.stories.js +8 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
- package/dist/collection/components/ic-text-field/ic-text-field.js +21 -14
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.stories.js +12 -1
- package/dist/collection/components/ic-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.js +3 -3
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +40 -7
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +80 -82
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +79 -88
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +2 -2
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +1 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +89 -81
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.js +2 -2
- package/dist/collection/utils/constants.js +1 -1
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/helpers.js +27 -30
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +29 -32
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-accordion.js +9 -7
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +1 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +2 -2
- package/dist/components/ic-breadcrumb2.js +2 -2
- package/dist/components/ic-button2.js +4 -4
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +1 -1
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +4 -4
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +7 -12
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-empty-state.js +2 -2
- package/dist/components/ic-footer-link.js +2 -2
- package/dist/components/ic-hero.js +6 -5
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +5 -5
- package/dist/components/ic-input-component-container2.js +3 -3
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-label2.js +33 -10
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +3 -3
- package/dist/components/ic-link2.js +12 -24
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +139 -143
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu2.js +30 -22
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +32 -41
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +122 -167
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +68 -63
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +5 -5
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination.js +4 -4
- package/dist/components/ic-popover-menu.js +5 -5
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +5 -5
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +4 -4
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +72 -34
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select.js +141 -217
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +36 -17
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-step.js +13 -13
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-switch.js +5 -5
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-text-field.js +17 -11
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +4 -4
- package/dist/components/ic-toggle-button-group.js +53 -67
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +62 -64
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +2 -2
- package/dist/components/ic-top-navigation.js +75 -67
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js +2 -2
- package/dist/core/ag-theme-icds.css +24 -4
- package/dist/core/core.css +29 -25
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-b371a498.entry.js → p-0f3a56bb.entry.js} +2 -2
- package/dist/core/p-0f3a56bb.entry.js.map +1 -0
- package/dist/core/{p-72c117b6.entry.js → p-0f86ea09.entry.js} +2 -2
- package/dist/core/p-1228fd8c.entry.js +2 -0
- package/dist/core/{p-b8da5c07.entry.js.map → p-1228fd8c.entry.js.map} +1 -1
- package/dist/core/p-1286b234.entry.js +2 -0
- package/dist/core/p-1286b234.entry.js.map +1 -0
- package/dist/core/{p-8c4f7c63.entry.js → p-13e65198.entry.js} +2 -2
- package/dist/core/{p-fbf57f0a.entry.js → p-20a6dc40.entry.js} +2 -2
- package/dist/core/p-20a6dc40.entry.js.map +1 -0
- package/dist/core/{p-cdf56a5d.entry.js → p-21ed856c.entry.js} +2 -2
- package/dist/core/p-21ed856c.entry.js.map +1 -0
- package/dist/core/p-226406d6.entry.js +2 -0
- package/dist/core/{p-70a6cff1.entry.js → p-24bb2265.entry.js} +2 -2
- package/dist/core/{p-d45d66c0.entry.js → p-2b342b23.entry.js} +2 -2
- package/dist/core/p-334672c1.entry.js +2 -0
- package/dist/core/p-334672c1.entry.js.map +1 -0
- package/dist/core/{p-8b5022bc.entry.js → p-3448c713.entry.js} +2 -2
- package/dist/core/p-37900547.entry.js +2 -0
- package/dist/core/p-37900547.entry.js.map +1 -0
- package/dist/core/p-3abaa877.entry.js +2 -0
- package/dist/core/p-3abaa877.entry.js.map +1 -0
- package/dist/core/{p-ef36181d.entry.js → p-3afc2870.entry.js} +2 -2
- package/dist/core/{p-aad10013.entry.js → p-3d7d2ff4.entry.js} +2 -2
- package/dist/core/p-41bb4db1.entry.js +2 -0
- package/dist/core/p-41bb4db1.entry.js.map +1 -0
- package/dist/core/{p-788c96ac.entry.js → p-44902a33.entry.js} +2 -2
- package/dist/core/{p-628c32b8.entry.js → p-476eac8c.entry.js} +2 -2
- package/dist/core/{p-9479f272.entry.js → p-49ca3f54.entry.js} +2 -2
- package/dist/core/{p-ebab7a9e.entry.js → p-4dfc41e7.entry.js} +2 -2
- package/dist/core/{p-83764268.entry.js → p-5026eeaf.entry.js} +2 -2
- package/dist/core/{p-2c17cc67.entry.js → p-54ea7120.entry.js} +2 -2
- package/dist/core/{p-a17499ff.entry.js → p-5b2bf9bb.entry.js} +2 -2
- package/dist/core/{p-0a436c47.entry.js → p-5d9b23ce.entry.js} +2 -2
- package/dist/core/p-5d9b23ce.entry.js.map +1 -0
- package/dist/core/{p-c9a4fe37.entry.js → p-5f9d1977.entry.js} +2 -2
- package/dist/core/p-5f9d1977.entry.js.map +1 -0
- package/dist/core/{p-1b2690b4.entry.js → p-6c10e1a2.entry.js} +2 -2
- package/dist/core/p-6c10e1a2.entry.js.map +1 -0
- package/dist/core/{p-1440847f.entry.js → p-6cb81f35.entry.js} +2 -2
- package/dist/core/{p-df88ff5b.entry.js → p-6dd73165.entry.js} +2 -2
- package/dist/core/p-7ead8535.entry.js +2 -0
- package/dist/core/p-7ead8535.entry.js.map +1 -0
- package/dist/core/{p-c8cf1ad5.entry.js → p-831e884c.entry.js} +2 -2
- package/dist/core/{p-267a19d4.entry.js → p-85f735ed.entry.js} +2 -2
- package/dist/core/p-89f493f3.entry.js +2 -0
- package/dist/core/p-89f493f3.entry.js.map +1 -0
- package/dist/core/{p-00bc353b.entry.js → p-8da025b5.entry.js} +2 -2
- package/dist/core/p-990c37aa.entry.js +2 -0
- package/dist/core/p-990c37aa.entry.js.map +1 -0
- package/dist/core/p-9e039aba.entry.js +2 -0
- package/dist/core/p-9e039aba.entry.js.map +1 -0
- package/dist/core/{p-bc2ca778.entry.js → p-9e051db4.entry.js} +2 -2
- package/dist/core/{p-a0161990.entry.js → p-9edc5973.entry.js} +2 -2
- package/dist/core/{p-2c371198.entry.js → p-a14025cc.entry.js} +2 -2
- package/dist/core/p-a7286727.entry.js +2 -0
- package/dist/core/p-a7286727.entry.js.map +1 -0
- package/dist/core/{p-c4663e1a.entry.js → p-ab4e8b4a.entry.js} +2 -2
- package/dist/core/{p-42a7d0b6.entry.js → p-ab7a5536.entry.js} +2 -2
- package/dist/core/{p-26dfc4db.entry.js → p-ac73cfb8.entry.js} +2 -2
- package/dist/core/{p-f0388d68.entry.js → p-ad374f0b.entry.js} +2 -2
- package/dist/core/p-ad374f0b.entry.js.map +1 -0
- package/dist/core/{p-513628ef.entry.js → p-b08bb522.entry.js} +2 -2
- package/dist/core/{p-1be17f22.entry.js → p-b1b27b7e.entry.js} +2 -2
- package/dist/core/p-b40ecf16.js +2 -0
- package/dist/core/p-b40ecf16.js.map +1 -0
- package/dist/core/{p-10e1e227.entry.js → p-b59007a3.entry.js} +2 -2
- package/dist/core/{p-16f55230.entry.js → p-b811c7a1.entry.js} +2 -2
- package/dist/core/p-b811c7a1.entry.js.map +1 -0
- package/dist/core/p-bae2df5e.entry.js +2 -0
- package/dist/core/p-bae2df5e.entry.js.map +1 -0
- package/dist/core/{p-bdc72446.entry.js → p-c8555360.entry.js} +2 -2
- package/dist/core/{p-a4f9b5bf.entry.js → p-ced2e6ca.entry.js} +2 -2
- package/dist/core/{p-9ca147f3.entry.js → p-d281c3cf.entry.js} +2 -2
- package/dist/core/p-d32c377d.entry.js +2 -0
- package/dist/core/p-d32c377d.entry.js.map +1 -0
- package/dist/core/p-d4a77f80.entry.js +2 -0
- package/dist/core/p-d4a77f80.entry.js.map +1 -0
- package/dist/core/{p-9c47521d.entry.js → p-d7476f6d.entry.js} +2 -2
- package/dist/core/{p-1838d1e9.entry.js → p-e107d1dd.entry.js} +2 -2
- package/dist/core/p-e506ec91.entry.js +2 -0
- package/dist/core/p-e506ec91.entry.js.map +1 -0
- package/dist/core/{p-b9459ba2.entry.js → p-fc5661ac.entry.js} +2 -2
- package/dist/core/p-fca45edb.entry.js +2 -0
- package/dist/core/p-fca45edb.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-f2ffaa7c.js → helpers-91abc444.js} +30 -33
- package/dist/esm/helpers-91abc444.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +10 -8
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/ic-breadcrumb.entry.js +3 -3
- package/dist/esm/ic-button_3.entry.js +138 -145
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +2 -2
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +5 -5
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +8 -13
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js +3 -3
- package/dist/esm/ic-dialog.entry.js +2 -2
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +3 -3
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +3 -3
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +7 -6
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
- package/dist/esm/ic-input-component-container_3.entry.js +33 -27
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +36 -13
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +12 -22
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +31 -39
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +121 -166
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +65 -62
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -5
- package/dist/esm/ic-page-header.entry.js +7 -7
- package/dist/esm/ic-pagination-item.entry.js +2 -2
- package/dist/esm/ic-pagination.entry.js +5 -5
- package/dist/esm/ic-popover-menu.entry.js +6 -6
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +6 -6
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -5
- package/dist/esm/ic-search-bar.entry.js +68 -34
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-select.entry.js +142 -218
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +35 -17
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skip-link.entry.js +2 -2
- package/dist/esm/ic-status-tag.entry.js +3 -3
- package/dist/esm/ic-step.entry.js +14 -14
- package/dist/esm/ic-stepper.entry.js +3 -3
- package/dist/esm/ic-switch.entry.js +6 -6
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -3
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-text-field.entry.js +16 -11
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +4 -4
- package/dist/esm/ic-toggle-button-group.entry.js +54 -68
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +62 -64
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +75 -67
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +3 -0
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +2 -0
- package/dist/types/components/ic-link/ic-link.d.ts +2 -3
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +28 -32
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.types.d.ts +2 -0
- package/dist/types/components/ic-menu/ic-menu.d.ts +19 -12
- package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +8 -5
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +8 -19
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +9 -7
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +3 -0
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +13 -0
- package/dist/types/components/ic-select/ic-select.d.ts +37 -38
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +5 -0
- package/dist/types/components/ic-switch/ic-switch.d.ts +1 -0
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +4 -2
- package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +10 -11
- package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +10 -12
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +10 -8
- package/dist/types/components.d.ts +122 -94
- package/dist/types/utils/constants.d.ts +1 -1
- package/dist/types/utils/helpers.d.ts +1 -1
- package/hydrate/index.js +1047 -1100
- package/hydrate/index.mjs +1047 -1100
- package/package.json +3 -5
- package/vscode-data.json +16 -4
- package/dist/cjs/helpers-fc4016d2.js.map +0 -1
- package/dist/core/p-0a436c47.entry.js.map +0 -1
- package/dist/core/p-15b7adaf.entry.js +0 -2
- package/dist/core/p-15b7adaf.entry.js.map +0 -1
- package/dist/core/p-16f55230.entry.js.map +0 -1
- package/dist/core/p-18714198.entry.js +0 -2
- package/dist/core/p-18714198.entry.js.map +0 -1
- package/dist/core/p-1b2690b4.entry.js.map +0 -1
- package/dist/core/p-206c2a26.entry.js +0 -2
- package/dist/core/p-206c2a26.entry.js.map +0 -1
- package/dist/core/p-2e44cf53.entry.js +0 -2
- package/dist/core/p-2e44cf53.entry.js.map +0 -1
- package/dist/core/p-730d2f6e.entry.js +0 -2
- package/dist/core/p-730d2f6e.entry.js.map +0 -1
- package/dist/core/p-7fb79e87.entry.js +0 -2
- package/dist/core/p-7fb79e87.entry.js.map +0 -1
- package/dist/core/p-8242c24f.js +0 -2
- package/dist/core/p-8242c24f.js.map +0 -1
- package/dist/core/p-910f5f14.entry.js +0 -2
- package/dist/core/p-910f5f14.entry.js.map +0 -1
- package/dist/core/p-9cfc2bac.entry.js +0 -2
- package/dist/core/p-9cfc2bac.entry.js.map +0 -1
- package/dist/core/p-b371a498.entry.js.map +0 -1
- package/dist/core/p-b7568944.entry.js +0 -2
- package/dist/core/p-b7568944.entry.js.map +0 -1
- package/dist/core/p-b8da5c07.entry.js +0 -2
- package/dist/core/p-ba600947.entry.js +0 -2
- package/dist/core/p-ba600947.entry.js.map +0 -1
- package/dist/core/p-c45023b7.entry.js +0 -2
- package/dist/core/p-c45023b7.entry.js.map +0 -1
- package/dist/core/p-c9a4fe37.entry.js.map +0 -1
- package/dist/core/p-cdf56a5d.entry.js.map +0 -1
- package/dist/core/p-d6c50565.entry.js +0 -2
- package/dist/core/p-d6c50565.entry.js.map +0 -1
- package/dist/core/p-d975bf2f.entry.js +0 -2
- package/dist/core/p-d975bf2f.entry.js.map +0 -1
- package/dist/core/p-dede4974.entry.js +0 -2
- package/dist/core/p-dede4974.entry.js.map +0 -1
- package/dist/core/p-e86a6d2d.entry.js +0 -2
- package/dist/core/p-eeab3a2e.entry.js +0 -2
- package/dist/core/p-eeab3a2e.entry.js.map +0 -1
- package/dist/core/p-f0388d68.entry.js.map +0 -1
- package/dist/core/p-fbf57f0a.entry.js.map +0 -1
- package/dist/esm/helpers-f2ffaa7c.js.map +0 -1
- /package/dist/core/{p-72c117b6.entry.js.map → p-0f86ea09.entry.js.map} +0 -0
- /package/dist/core/{p-8c4f7c63.entry.js.map → p-13e65198.entry.js.map} +0 -0
- /package/dist/core/{p-e86a6d2d.entry.js.map → p-226406d6.entry.js.map} +0 -0
- /package/dist/core/{p-70a6cff1.entry.js.map → p-24bb2265.entry.js.map} +0 -0
- /package/dist/core/{p-d45d66c0.entry.js.map → p-2b342b23.entry.js.map} +0 -0
- /package/dist/core/{p-8b5022bc.entry.js.map → p-3448c713.entry.js.map} +0 -0
- /package/dist/core/{p-ef36181d.entry.js.map → p-3afc2870.entry.js.map} +0 -0
- /package/dist/core/{p-aad10013.entry.js.map → p-3d7d2ff4.entry.js.map} +0 -0
- /package/dist/core/{p-788c96ac.entry.js.map → p-44902a33.entry.js.map} +0 -0
- /package/dist/core/{p-628c32b8.entry.js.map → p-476eac8c.entry.js.map} +0 -0
- /package/dist/core/{p-9479f272.entry.js.map → p-49ca3f54.entry.js.map} +0 -0
- /package/dist/core/{p-ebab7a9e.entry.js.map → p-4dfc41e7.entry.js.map} +0 -0
- /package/dist/core/{p-83764268.entry.js.map → p-5026eeaf.entry.js.map} +0 -0
- /package/dist/core/{p-2c17cc67.entry.js.map → p-54ea7120.entry.js.map} +0 -0
- /package/dist/core/{p-a17499ff.entry.js.map → p-5b2bf9bb.entry.js.map} +0 -0
- /package/dist/core/{p-1440847f.entry.js.map → p-6cb81f35.entry.js.map} +0 -0
- /package/dist/core/{p-df88ff5b.entry.js.map → p-6dd73165.entry.js.map} +0 -0
- /package/dist/core/{p-c8cf1ad5.entry.js.map → p-831e884c.entry.js.map} +0 -0
- /package/dist/core/{p-267a19d4.entry.js.map → p-85f735ed.entry.js.map} +0 -0
- /package/dist/core/{p-00bc353b.entry.js.map → p-8da025b5.entry.js.map} +0 -0
- /package/dist/core/{p-bc2ca778.entry.js.map → p-9e051db4.entry.js.map} +0 -0
- /package/dist/core/{p-a0161990.entry.js.map → p-9edc5973.entry.js.map} +0 -0
- /package/dist/core/{p-2c371198.entry.js.map → p-a14025cc.entry.js.map} +0 -0
- /package/dist/core/{p-c4663e1a.entry.js.map → p-ab4e8b4a.entry.js.map} +0 -0
- /package/dist/core/{p-42a7d0b6.entry.js.map → p-ab7a5536.entry.js.map} +0 -0
- /package/dist/core/{p-26dfc4db.entry.js.map → p-ac73cfb8.entry.js.map} +0 -0
- /package/dist/core/{p-513628ef.entry.js.map → p-b08bb522.entry.js.map} +0 -0
- /package/dist/core/{p-1be17f22.entry.js.map → p-b1b27b7e.entry.js.map} +0 -0
- /package/dist/core/{p-10e1e227.entry.js.map → p-b59007a3.entry.js.map} +0 -0
- /package/dist/core/{p-bdc72446.entry.js.map → p-c8555360.entry.js.map} +0 -0
- /package/dist/core/{p-a4f9b5bf.entry.js.map → p-ced2e6ca.entry.js.map} +0 -0
- /package/dist/core/{p-9ca147f3.entry.js.map → p-d281c3cf.entry.js.map} +0 -0
- /package/dist/core/{p-9c47521d.entry.js.map → p-d7476f6d.entry.js.map} +0 -0
- /package/dist/core/{p-1838d1e9.entry.js.map → p-e107d1dd.entry.js.map} +0 -0
- /package/dist/core/{p-b9459ba2.entry.js.map → p-fc5661ac.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import {
|
2
|
+
import { W as checkSlotInChildMutations, S as getLabelFromValue, R as getFilteredMenuOptions, K as getOptionsWithoutGroupTitlesCount, r as removeDisabledFalse, s as removeFormResetListener, b as inheritAttributes, q as addFormResetListener, o as onComponentRequiredPropUndefined, t as renderHiddenInput, v as getInputDescribedByText, w as hasValidationStatus, i as isSlotUsed, X as isMobileOrTablet, I as IC_INHERITED_ARIA, z as IcInformationStatus } from './helpers.js';
|
3
3
|
import { d as defineCustomElement$a } from './ic-button2.js';
|
4
4
|
import { d as defineCustomElement$9 } from './ic-input-component-container2.js';
|
5
5
|
import { d as defineCustomElement$8 } from './ic-input-container2.js';
|
@@ -40,11 +40,14 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
40
40
|
this.icOptionSelect = createEvent(this, "icOptionSelect", 7);
|
41
41
|
this.icOptionDeselect = createEvent(this, "icOptionDeselect", 7);
|
42
42
|
this.icRetryLoad = createEvent(this, "icRetryLoad", 7);
|
43
|
+
this.blurredBecauseButtonPressed = false;
|
43
44
|
this.hasSetDefaultValue = false;
|
45
|
+
this.hasTimedOut = false;
|
44
46
|
this.inheritedAttributes = {};
|
45
47
|
this.initialOptionsEmpty = false;
|
46
48
|
this.inputId = `ic-select-input-${inputIds++}`;
|
47
49
|
this.menuId = `${this.inputId}-menu`;
|
50
|
+
this.retryButtonClick = false;
|
48
51
|
this.searchableMenuItemSelected = false;
|
49
52
|
this.ungroupedOptions = [];
|
50
53
|
this.hostMutationObserver = null;
|
@@ -160,6 +163,12 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
160
163
|
*/
|
161
164
|
this.debounce = 0;
|
162
165
|
this.currDebounce = this.debounce;
|
166
|
+
/**
|
167
|
+
* The value of the select, reflected by the value of the currently selected option.
|
168
|
+
* For the searchable variant, the value is also reflected by the user input.
|
169
|
+
* For the multi-select variant, the value must be an array of option values.
|
170
|
+
*/
|
171
|
+
this.value = null;
|
163
172
|
this.initialValue = this.value;
|
164
173
|
this.inputValueToFilter = this.value;
|
165
174
|
// triggered when attributes of host element change
|
@@ -197,13 +206,27 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
197
206
|
this.emitIcChange = (value) => {
|
198
207
|
// If "Select all" button clicked, replace value with new value (array of all option values)
|
199
208
|
if (this.multiple && !Array.isArray(value) && value !== null) {
|
200
|
-
|
209
|
+
// Update selected options - adds / removes them, in order of option list
|
210
|
+
// Create new array if value prop is undefined
|
211
|
+
if (this.value) {
|
212
|
+
let valueArray = this.value.slice();
|
213
|
+
if (this.value.includes(value)) {
|
214
|
+
valueArray.splice(valueArray.indexOf(value), 1);
|
215
|
+
}
|
216
|
+
else {
|
217
|
+
valueArray.push(value);
|
218
|
+
valueArray = this.getValueSortedByOptions(valueArray);
|
219
|
+
}
|
220
|
+
this.value = valueArray.length === 0 ? null : valueArray;
|
221
|
+
}
|
222
|
+
else {
|
223
|
+
this.value = [value];
|
224
|
+
}
|
201
225
|
}
|
202
226
|
else {
|
203
227
|
this.value = value;
|
204
228
|
}
|
205
|
-
|
206
|
-
this.icChange.emit({ value: valueToEmit || null });
|
229
|
+
this.icChange.emit({ value: this.multiple ? this.value : value });
|
207
230
|
};
|
208
231
|
this.emitIcInput = (value) => {
|
209
232
|
clearTimeout(this.debounceIcInput);
|
@@ -216,30 +239,25 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
216
239
|
if (this.options.length > 0) {
|
217
240
|
this.setOptionsValuesFromLabels();
|
218
241
|
this.uniqueOptions = this.deduplicateOptions(this.options);
|
219
|
-
this.filteredOptions = this.uniqueOptions;
|
220
242
|
}
|
221
243
|
else {
|
222
244
|
this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
|
223
245
|
this.uniqueOptions = this.noOptions;
|
224
|
-
this.filteredOptions = this.noOptions;
|
225
246
|
}
|
247
|
+
this.filteredOptions = this.uniqueOptions;
|
226
248
|
if (this.isExternalFiltering()) {
|
227
249
|
// When searchable select
|
228
250
|
this.noOptions = null;
|
229
251
|
this.updateSearchableSelectResultAriaLive();
|
230
252
|
this.setDefaultValue();
|
231
253
|
}
|
232
|
-
else {
|
233
|
-
|
234
|
-
|
235
|
-
this.initialOptionsEmpty = false;
|
236
|
-
}
|
254
|
+
else if (this.initialOptionsEmpty) {
|
255
|
+
this.setDefaultValue();
|
256
|
+
this.initialOptionsEmpty = false;
|
237
257
|
}
|
238
258
|
}
|
239
|
-
else {
|
240
|
-
|
241
|
-
this.options = this.noOptions || [];
|
242
|
-
}
|
259
|
+
else if (!this.searchable) {
|
260
|
+
this.options = this.noOptions || [];
|
243
261
|
}
|
244
262
|
};
|
245
263
|
/**
|
@@ -250,11 +268,10 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
250
268
|
this.deduplicateOptions = (options) => {
|
251
269
|
const uniqueValues = [];
|
252
270
|
const dedupedOptions = [];
|
253
|
-
let dedupedChildren;
|
254
271
|
options.forEach((option) => {
|
255
272
|
if (option.children) {
|
256
273
|
//If an option has children, we will loop through them
|
257
|
-
dedupedChildren = [];
|
274
|
+
const dedupedChildren = [];
|
258
275
|
option.children.forEach((child) => {
|
259
276
|
if (uniqueValues.includes(child.value)) {
|
260
277
|
console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`);
|
@@ -265,8 +282,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
265
282
|
}
|
266
283
|
});
|
267
284
|
// construct a modified option, inserting the deduplicated children alongside the original information
|
268
|
-
|
269
|
-
dedupedOptions.push(modifiedParent);
|
285
|
+
dedupedOptions.push(Object.assign(Object.assign({}, option), { children: dedupedChildren }));
|
270
286
|
}
|
271
287
|
else {
|
272
288
|
// If an option does not have children, assess to see if it's value has been included already
|
@@ -298,12 +314,10 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
298
314
|
};
|
299
315
|
this.setTextColor = () => {
|
300
316
|
if (this.nativeSelectElement) {
|
301
|
-
|
302
|
-
this.nativeSelectElement.
|
303
|
-
|
304
|
-
|
305
|
-
this.nativeSelectElement.className = "select-option-selected";
|
306
|
-
}
|
317
|
+
this.nativeSelectElement.className =
|
318
|
+
this.nativeSelectElement.selectedIndex === 0
|
319
|
+
? "placeholder"
|
320
|
+
: "select-option-selected";
|
307
321
|
}
|
308
322
|
};
|
309
323
|
this.setMenuChange = (open) => {
|
@@ -311,27 +325,12 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
311
325
|
this.open = open;
|
312
326
|
}
|
313
327
|
};
|
314
|
-
this.getLabelFromValue = (value) =>
|
315
|
-
|
316
|
-
}
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
};
|
321
|
-
this.getFilteredChildMenuOptions = (option) => {
|
322
|
-
let children = option.children;
|
323
|
-
if (option.children) {
|
324
|
-
if (this.searchable) {
|
325
|
-
children = getFilteredMenuOptions(option.children, !!this.includeDescriptionsInSearch, this.searchableSelectInputValue || "", this.searchMatchPosition);
|
326
|
-
}
|
327
|
-
else {
|
328
|
-
children = getFilteredMenuOptions(option.children, false, this.pressedCharacters, "start");
|
329
|
-
}
|
330
|
-
}
|
331
|
-
const newOption = Object.assign({}, option);
|
332
|
-
newOption.children = children;
|
333
|
-
return newOption;
|
334
|
-
};
|
328
|
+
this.getLabelFromValue = (value) => getLabelFromValue(value, this.uniqueOptions);
|
329
|
+
this.getMultipleOptionsString = (selectedValues) => selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value)).filter((label) => !!label).join(", ");
|
330
|
+
this.getFilteredChildMenuOptions = (option) => (Object.assign(Object.assign({}, option), { children: option.children &&
|
331
|
+
getFilteredMenuOptions(option.children, this.searchable && !!this.includeDescriptionsInSearch, this.searchable
|
332
|
+
? this.searchableSelectInputValue || ""
|
333
|
+
: this.pressedCharacters, this.searchable ? this.searchMatchPosition : "start") }));
|
335
334
|
// (For multi-select) get value array, i.e. selected option values, in order they appear in option list
|
336
335
|
this.getValueSortedByOptions = (value) => {
|
337
336
|
const valueArray = value;
|
@@ -350,13 +349,13 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
350
349
|
// (rather than native <select> - rendered when viewed on a mobile / tablet screen)
|
351
350
|
this.handleCustomSelectChange = (event) => {
|
352
351
|
var _a, _b;
|
353
|
-
const value = event.detail
|
354
|
-
if (
|
352
|
+
const { value, label, optionId } = event.detail;
|
353
|
+
if (label === this.emptyOptionListText) {
|
355
354
|
(_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
|
356
355
|
return;
|
357
356
|
}
|
358
357
|
if (this.searchable) {
|
359
|
-
this.value = value;
|
358
|
+
this.value = value || null;
|
360
359
|
this.searchableMenuItemSelected = true;
|
361
360
|
// After editing the input, if selecting the same option as before, set the input value to label again
|
362
361
|
if (this.value === this.currValue) {
|
@@ -367,64 +366,39 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
367
366
|
this.hiddenInputValue =
|
368
367
|
this.getValueFromLabel(this.searchableSelectInputValue) || null;
|
369
368
|
}
|
370
|
-
if (
|
371
|
-
this.
|
372
|
-
|
373
|
-
else {
|
374
|
-
this.icOptionSelect.emit({ value });
|
375
|
-
}
|
376
|
-
this.ariaActiveDescendant = event.detail.optionId;
|
377
|
-
this.emitIcChange(value);
|
378
|
-
};
|
379
|
-
// Update selected options - adds / removes them, in order of option list
|
380
|
-
// Create new array if value prop is undefined
|
381
|
-
this.handleMultipleSelectChange = (value) => {
|
382
|
-
if (this.value) {
|
383
|
-
let valueArray = this.value.slice();
|
384
|
-
if (this.value.includes(value)) {
|
385
|
-
const valueIndex = valueArray.indexOf(value);
|
386
|
-
valueArray.splice(valueIndex, 1);
|
369
|
+
if (value) {
|
370
|
+
if (this.multiple && ((_b = this.value) === null || _b === void 0 ? void 0 : _b.includes(value))) {
|
371
|
+
this.icOptionDeselect.emit({ value });
|
387
372
|
}
|
388
373
|
else {
|
389
|
-
|
390
|
-
valueArray = this.getValueSortedByOptions(valueArray);
|
374
|
+
this.icOptionSelect.emit({ value });
|
391
375
|
}
|
392
|
-
this.value = valueArray.length === 0 ? null : valueArray;
|
393
|
-
}
|
394
|
-
else {
|
395
|
-
const valueArray = [];
|
396
|
-
valueArray.push(value);
|
397
|
-
this.value = valueArray;
|
398
376
|
}
|
377
|
+
this.ariaActiveDescendant = optionId;
|
378
|
+
this.emitIcChange(value || null);
|
399
379
|
};
|
400
|
-
this.handleSelectAllChange = (
|
401
|
-
const
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
if (selectAllOptions) {
|
406
|
-
let unselectedValues;
|
380
|
+
this.handleSelectAllChange = ({ detail, }) => {
|
381
|
+
const allValues = this.ungroupedOptions
|
382
|
+
.filter((option) => !option.disabled)
|
383
|
+
.map((option) => option.value);
|
384
|
+
if (detail.select) {
|
407
385
|
// Only emit icOptionSelect for all values that are newly selected
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
else {
|
412
|
-
unselectedValues = allValues;
|
413
|
-
}
|
386
|
+
const unselectedValues = this.value
|
387
|
+
? allValues.filter((value) => this.value && !this.value.includes(value))
|
388
|
+
: allValues;
|
414
389
|
unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
|
415
|
-
newValue = allValues;
|
416
390
|
}
|
417
391
|
else {
|
418
392
|
// Only emit icOptionDeselect for values that were selected
|
419
393
|
this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
|
420
|
-
newValue = null;
|
421
394
|
}
|
422
|
-
this.emitIcChange(
|
395
|
+
this.emitIcChange(detail.select ? allValues : null);
|
423
396
|
};
|
424
397
|
this.handleMenuChange = (event) => {
|
425
398
|
this.open = event.detail.open;
|
426
399
|
this.pressedCharacters = "";
|
427
|
-
this.searchable
|
400
|
+
if (this.searchable)
|
401
|
+
this.handleFocusIndicatorDisplay();
|
428
402
|
};
|
429
403
|
// clears the debounce delay when navigating the menu with arrow keys etc
|
430
404
|
// to prevent delay in change event, which should only occur when typing in input
|
@@ -499,19 +473,18 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
499
473
|
if (this.open && key === " " && this.pressedCharacters.length === 0) {
|
500
474
|
this.setMenuChange(false);
|
501
475
|
}
|
502
|
-
if (key.length
|
503
|
-
window.clearTimeout(this.characterKeyPressTimer);
|
504
|
-
this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
|
505
|
-
if (!(key === " " && !this.pressedCharacters)) {
|
506
|
-
this.pressedCharacters += key;
|
507
|
-
this.handleFilter();
|
508
|
-
if (!this.noOptions) {
|
509
|
-
this.emitIcChange(this.filteredOptions[0].value);
|
510
|
-
}
|
511
|
-
}
|
512
|
-
}
|
513
|
-
else {
|
476
|
+
if (key.length !== 1 || this.searchable) {
|
514
477
|
this.pressedCharacters = "";
|
478
|
+
return;
|
479
|
+
}
|
480
|
+
window.clearTimeout(this.characterKeyPressTimer);
|
481
|
+
this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
|
482
|
+
if (key !== " " || !!this.pressedCharacters) {
|
483
|
+
this.pressedCharacters += key;
|
484
|
+
this.handleFilter();
|
485
|
+
if (!this.noOptions) {
|
486
|
+
this.emitIcChange(this.filteredOptions[0].value);
|
487
|
+
}
|
515
488
|
}
|
516
489
|
};
|
517
490
|
this.handleNativeSelectKeyDown = (event) => {
|
@@ -530,19 +503,17 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
530
503
|
if (this.isExternalFiltering() && (event.key === "Enter" || isArrowKey)) {
|
531
504
|
this.menu.options = this.filteredOptions;
|
532
505
|
}
|
533
|
-
else {
|
534
|
-
|
535
|
-
|
536
|
-
this.menu.options = this.uniqueOptions;
|
537
|
-
}
|
506
|
+
else if (!this.hasTimedOut) {
|
507
|
+
this.noOptions = null;
|
508
|
+
this.menu.options = this.uniqueOptions;
|
538
509
|
}
|
539
510
|
}
|
540
511
|
if (this.open && event.key === "Enter") {
|
541
512
|
this.setMenuChange(false);
|
542
513
|
}
|
543
514
|
else {
|
544
|
-
if (!
|
545
|
-
if (
|
515
|
+
if (!isArrowKey || this.noOptions === null) {
|
516
|
+
if (event.key !== " " || this.pressedCharacters.length <= 0) {
|
546
517
|
// Keyboard events get passed onto ic-menu
|
547
518
|
(_a = this.menu) === null || _a === void 0 ? void 0 : _a.handleKeyboardOpen(event);
|
548
519
|
}
|
@@ -558,9 +529,9 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
558
529
|
this.handleClearButtonBlur = (ev) => {
|
559
530
|
var _a;
|
560
531
|
const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
|
561
|
-
if (!
|
562
|
-
ev.relatedTarget
|
563
|
-
!
|
532
|
+
if ((!this.searchableSelectElement ||
|
533
|
+
ev.relatedTarget !== this.searchableSelectElement) &&
|
534
|
+
(!retryButton || ev.relatedTarget !== retryButton)) {
|
564
535
|
this.setMenuChange(false);
|
565
536
|
this.handleFocusIndicatorDisplay();
|
566
537
|
}
|
@@ -569,12 +540,8 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
569
540
|
this.handleFilter = () => {
|
570
541
|
var _a;
|
571
542
|
const options = this.deduplicateOptions(this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions);
|
572
|
-
|
543
|
+
const isGrouped = options.some((option) => !!option.children);
|
573
544
|
let newFilteredOptions = [];
|
574
|
-
options.map((option) => {
|
575
|
-
if (option.children)
|
576
|
-
isGrouped = true;
|
577
|
-
});
|
578
545
|
let menuOptionsFiltered;
|
579
546
|
if (this.searchable) {
|
580
547
|
menuOptionsFiltered = getFilteredMenuOptions(options, !!this.includeDescriptionsInSearch, this.inputValueToFilter || "", this.searchMatchPosition);
|
@@ -588,30 +555,14 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
588
555
|
newFilteredOptions = menuOptionsFiltered;
|
589
556
|
}
|
590
557
|
else if (isGrouped) {
|
591
|
-
options.map((option) =>
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
}
|
600
|
-
else {
|
601
|
-
newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
|
602
|
-
}
|
603
|
-
});
|
604
|
-
}
|
605
|
-
let noChildOptionsWhenFiltered = false;
|
606
|
-
if (isGrouped) {
|
607
|
-
noChildOptionsWhenFiltered = true;
|
608
|
-
newFilteredOptions.map((option) => {
|
609
|
-
if (option.children && option.children.length > 0) {
|
610
|
-
noChildOptionsWhenFiltered = false;
|
611
|
-
}
|
612
|
-
});
|
613
|
-
}
|
614
|
-
if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {
|
558
|
+
newFilteredOptions = options.map((option) => this.includeGroupTitlesInSearch &&
|
559
|
+
menuOptionsFiltered.indexOf(option) !== -1
|
560
|
+
? option
|
561
|
+
: this.getFilteredChildMenuOptions(option));
|
562
|
+
}
|
563
|
+
if (newFilteredOptions.length > 0 &&
|
564
|
+
(!isGrouped ||
|
565
|
+
newFilteredOptions.some(({ children }) => children && children.length > 0))) {
|
615
566
|
this.noOptions = null;
|
616
567
|
this.filteredOptions = newFilteredOptions;
|
617
568
|
}
|
@@ -646,11 +597,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
646
597
|
}, this.timeout);
|
647
598
|
}
|
648
599
|
};
|
649
|
-
this.getValueFromLabel = (label) => {
|
650
|
-
var _a;
|
651
|
-
return (label &&
|
652
|
-
((_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value));
|
653
|
-
};
|
600
|
+
this.getValueFromLabel = (label) => { var _a; return label && ((_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value); };
|
654
601
|
this.handleSearchableSelectInput = (event) => {
|
655
602
|
this.searchableSelectInputValue = event.target.value;
|
656
603
|
this.emitIcInput(this.searchableSelectInputValue);
|
@@ -664,19 +611,18 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
664
611
|
this.setMenuChange(true);
|
665
612
|
if (!this.disableAutoFiltering) {
|
666
613
|
this.handleFilter();
|
667
|
-
this.
|
614
|
+
clearTimeout(this.debounceAria);
|
615
|
+
window.setTimeout(() => {
|
616
|
+
this.updateSearchableSelectResultAriaLive();
|
617
|
+
}, 800);
|
668
618
|
}
|
669
619
|
};
|
670
620
|
this.updateSearchableSelectResultAriaLive = () => {
|
671
621
|
var _a;
|
672
622
|
const searchableSelectResultsStatusEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".searchable-select-results-status");
|
673
623
|
if (searchableSelectResultsStatusEl) {
|
674
|
-
|
675
|
-
|
676
|
-
}
|
677
|
-
else {
|
678
|
-
searchableSelectResultsStatusEl.innerText = "";
|
679
|
-
}
|
624
|
+
searchableSelectResultsStatusEl.innerText =
|
625
|
+
this.noOptions !== null ? this.emptyOptionListText : "";
|
680
626
|
}
|
681
627
|
};
|
682
628
|
this.updateMultiSelectedCountAriaLive = () => {
|
@@ -710,13 +656,12 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
710
656
|
return;
|
711
657
|
}
|
712
658
|
const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
|
713
|
-
|
659
|
+
if (this.searchable &&
|
714
660
|
!!this.menu &&
|
715
661
|
target !== this.menu &&
|
716
662
|
!Array.from(this.menu.querySelectorAll("[role='option']")).includes(target) &&
|
717
|
-
!
|
718
|
-
!
|
719
|
-
if (isSearchableAndNoFocusedInternalElements) {
|
663
|
+
(!this.clearButton || target !== this.clearButton) &&
|
664
|
+
(!retryButton || target !== retryButton)) {
|
720
665
|
if (!this.retryButtonClick) {
|
721
666
|
this.setMenuChange(false);
|
722
667
|
// Clear input field on blur when searchable if no option is selected
|
@@ -755,6 +700,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
755
700
|
this.filteredOptions = this.uniqueOptions;
|
756
701
|
}
|
757
702
|
};
|
703
|
+
this.renderNativeOption = (option) => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.currValue }, option.label));
|
758
704
|
}
|
759
705
|
watchDisabledHandler() {
|
760
706
|
removeDisabledFalse(this.disabled, this.el);
|
@@ -766,7 +712,9 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
766
712
|
this.setOptions();
|
767
713
|
}
|
768
714
|
debounceChangedHandler(newValue) {
|
769
|
-
this.
|
715
|
+
if (this.currDebounce !== newValue) {
|
716
|
+
this.currDebounce = newValue;
|
717
|
+
}
|
770
718
|
}
|
771
719
|
valueChangedHandler() {
|
772
720
|
if (this.value !== this.currValue) {
|
@@ -849,83 +797,59 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
849
797
|
this.searchableSelectElement.focus();
|
850
798
|
}
|
851
799
|
}
|
852
|
-
updateOnChangeDebounce(newValue) {
|
853
|
-
if (this.currDebounce !== newValue) {
|
854
|
-
this.currDebounce = newValue;
|
855
|
-
}
|
856
|
-
}
|
857
|
-
debounceAriaLiveUpdate() {
|
858
|
-
clearTimeout(this.debounceAria);
|
859
|
-
window.setTimeout(() => {
|
860
|
-
this.updateSearchableSelectResultAriaLive();
|
861
|
-
}, 800);
|
862
|
-
}
|
863
800
|
render() {
|
864
|
-
|
801
|
+
var _a;
|
802
|
+
const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, theme, hiddenInputValue, open, inputId, searchableSelectInputValue, loading, value, emptyOptionListText, uniqueOptions, selectOnEnter, form, inheritedAttributes, ariaActiveDescendant, hasTimedOut, noOptions, filteredOptions, clearButtonFocused, } = this;
|
865
803
|
// HTML inputs only accept 'string' for their value
|
866
804
|
// Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
|
867
|
-
renderHiddenInput(this.el,
|
805
|
+
renderHiddenInput(this.el, searchable ? hiddenInputValue : currValue, name || inputId, disabled);
|
868
806
|
const invalid = `${validationStatus === IcInformationStatus.Error}`;
|
869
|
-
const describedBy = getInputDescribedByText(this.inputId, helperText !== "", hasValidationStatus(
|
870
|
-
let showLeftIcon = !!this.el.querySelector(`[slot="icon"]`);
|
871
|
-
if (showLeftIcon && (disabled || (readonly && !this.value))) {
|
872
|
-
showLeftIcon = false;
|
873
|
-
}
|
874
|
-
const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
|
807
|
+
const describedBy = getInputDescribedByText(this.el, inputId, helperText !== "", hasValidationStatus(validationStatus, !!disabled)).trim();
|
875
808
|
const valueLabelString = multiple
|
876
809
|
? this.getMultipleOptionsString(currValue)
|
877
810
|
: this.getLabelFromValue(currValue);
|
878
811
|
const isClearable = !disabled &&
|
879
812
|
(searchable
|
880
|
-
?
|
881
|
-
: currValue && !
|
882
|
-
return (h(Host, { key: '
|
883
|
-
"ic-select-disabled":
|
884
|
-
"ic-select-searchable":
|
813
|
+
? !!searchableSelectInputValue
|
814
|
+
: !!currValue && !loading && showClearButton);
|
815
|
+
return (h(Host, { key: '4772c66e1053f7c19cafff3753af54715eab05d9', class: {
|
816
|
+
"ic-select-disabled": disabled,
|
817
|
+
"ic-select-searchable": searchable,
|
885
818
|
[`ic-select-${size}`]: size !== "medium",
|
886
|
-
"ic-select-full-width":
|
819
|
+
"ic-select-full-width": fullWidth,
|
887
820
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
888
|
-
}, onBlur: this.onBlur }, h("ic-input-container", { key: '
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
}
|
895
|
-
else {
|
896
|
-
return (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
|
897
|
-
}
|
898
|
-
}))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
|
821
|
+
}, onBlur: this.onBlur }, h("ic-input-container", { key: '8d4a5a0b53f01cc6740b9fc1f5fa0805e45c8169', readonly: readonly }, !hideLabel && (h("ic-input-label", { key: '37e19194734f052932dd6ac7c56994f67802a1bd', for: inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly }, h("slot", { key: '3b27f513ffc78d514c7695b1e5941041837efd55', name: "helper-text", slot: "helper-text" }))), h("ic-input-component-container", { key: 'a5bf5d711e23862ec08fb8f8e85ce0beec436ccc', ref: (el) => (this.anchorEl = el), class: { "menu-open": open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, isSlotUsed(this.el, "icon") &&
|
822
|
+
!disabled &&
|
823
|
+
(!readonly || !!value) && (h("span", { key: '42fc8c78302cde968d3c96ad72c9aac66652829e', slot: "left-icon", class: {
|
824
|
+
readonly,
|
825
|
+
"has-value": !!value,
|
826
|
+
} }, h("slot", { key: '0cf7160335785716303e4e2e602be1a2d975098e', name: "icon" }))), readonly ? (h("ic-typography", null, h("p", null, valueLabelString))) : isMobileOrTablet() && !multiple ? (h("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.handleNativeSelectKeyDown, form: form }, inheritedAttributes), h("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => option.children ? (h("optgroup", { label: option.label }, option.children.map((child) => this.renderNativeOption(child)))) : (this.renderNativeOption(option))))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
|
899
827
|
"select-input": true,
|
900
|
-
"with-clear-button": !!
|
901
|
-
}, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant":
|
902
|
-
(currValue === null ||
|
828
|
+
"with-clear-button": !!searchableSelectInputValue,
|
829
|
+
}, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": `${open}`, "aria-invalid": invalid, "aria-required": `${required}`, "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: inputId, value: searchableSelectInputValue || undefined, placeholder: placeholder, disabled: disabled, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, form: form }), isClearable && (h("div", { class: "clear-button-container" }, h("ic-button", { id: "clear-button", ref: (el) => (this.clearButton = el), "aria-label": searchableSelectInputValue &&
|
830
|
+
(currValue === null || loading)
|
903
831
|
? "Clear input"
|
904
|
-
: "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", theme:
|
832
|
+
: "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", theme: clearButtonFocused ? "light" : "dark" }), h("div", { class: "divider" }))), h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
|
905
833
|
"expand-icon": true,
|
906
|
-
"expand-icon-open":
|
907
|
-
}, innerHTML: Expand, "aria-hidden": "true" }), h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (h("div", { class: "select-container" }, h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id:
|
908
|
-
? `${
|
909
|
-
: valueLabelString) || placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded":
|
834
|
+
"expand-icon-open": open,
|
835
|
+
}, innerHTML: Expand, "aria-hidden": "true" }), h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (h("div", { class: "select-container" }, h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id: inputId, "aria-label": `${label}, ${(multiple && currValue
|
836
|
+
? `${currValue.length} of ${getOptionsWithoutGroupTitlesCount(options)} selected, ${valueLabelString}`
|
837
|
+
: valueLabelString) || placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded": `${open}`, "aria-owns": menuId, "aria-controls": menuId, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.handleClick, onMouseDown: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("ic-typography", { variant: "body", class: {
|
910
838
|
"value-text": true,
|
911
|
-
"with-clear-button":
|
912
|
-
placeholder: !
|
913
|
-
? !
|
839
|
+
"with-clear-button": isClearable,
|
840
|
+
placeholder: !loading && multiple
|
841
|
+
? !value || value.length < 1
|
914
842
|
: !this.getLabelFromValue(currValue),
|
915
843
|
} }, valueLabelString || placeholder), h("div", { class: "select-input-end" }, isClearable && h("div", { class: "divider" }), h("span", { class: {
|
916
844
|
"expand-icon": true,
|
917
|
-
"expand-icon-open":
|
918
|
-
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && (h("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", theme:
|
919
|
-
"no-results":
|
920
|
-
|
921
|
-
(
|
922
|
-
|
923
|
-
this.noOptions[0].label === this.emptyOptionListText),
|
924
|
-
}, ref: (el) => (this.menu = el), inputEl: (searchable
|
845
|
+
"expand-icon-open": open,
|
846
|
+
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && (h("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", theme: clearButtonFocused ? "light" : "dark" }))))), (!isMobileOrTablet() || multiple) && (h("ic-menu", { key: '3c09e05b72ddab09e9cfe2fb3ba2e403964dcb37', class: {
|
847
|
+
"no-results": loading ||
|
848
|
+
hasTimedOut ||
|
849
|
+
((_a = noOptions === null || noOptions === void 0 ? void 0 : noOptions[0]) === null || _a === void 0 ? void 0 : _a.label) === emptyOptionListText,
|
850
|
+
}, ref: (el) => (this.menu = el), inputEl: searchable
|
925
851
|
? this.searchableSelectElement
|
926
|
-
: this.customSelectElement
|
927
|
-
? "manual"
|
928
|
-
: "automatic", closeOnSelect: !multiple })), this.multiple && (h("div", { key: 'b1a65d56087d6603846cdd9cfc8c086e49597001', "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), hasValidationStatus(this.validationStatus, !!this.disabled) && (h("ic-input-validation", { key: 'e5553be7be57e5ae847bcd1a4d2525b18c4d1429', class: { "menu-open": this.open }, ariaLiveMode: "polite", status: validationStatus, message: validationText || "", for: this.inputId })))));
|
852
|
+
: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: open, options: searchable ? filteredOptions : uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, selectOnEnter: selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleCustomSelectChange, onMenuOptionSelectAll: this.handleSelectAllChange, onMenuKeyPress: this.handleMenuKeyPress, onUngroupedOptionsSet: this.setUngroupedOptions, onRetryButtonClicked: this.handleRetry, parentEl: this.el, onTimeoutBlur: this.onTimeoutBlur, activationType: searchable || multiple || selectOnEnter ? "manual" : "automatic", closeOnSelect: !multiple })), multiple && (h("div", { key: '744fd85d0482cc49928b5d167691a58ff87d22ab', "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), hasValidationStatus(validationStatus, disabled) && (h("ic-input-validation", { key: '034f52ca6c0b23f29d784ec342a83e9434a0e352', class: { "menu-open": open }, ariaLiveMode: "polite", status: validationStatus, message: validationText, for: inputId })))));
|
929
853
|
}
|
930
854
|
static get delegatesFocus() { return true; }
|
931
855
|
get el() { return this; }
|