@ukic/web-components 3.2.0 → 3.4.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-789082d4.js → helpers-fc4016d2.js} +21 -37
- package/dist/cjs/helpers-fc4016d2.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 +4 -4
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +56 -76
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +32 -51
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +110 -131
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +6 -6
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +9 -10
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +37 -41
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +26 -38
- package/dist/cjs/ic-chip.cjs.entry.js.map +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 +23 -22
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +8 -8
- package/dist/cjs/ic-link.cjs.entry.js +12 -4
- 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 +5 -5
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -3
- package/dist/cjs/ic-navigation-group.cjs.entry.js +116 -164
- 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 +8 -7
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -5
- package/dist/cjs/ic-search-bar.cjs.entry.js +149 -154
- 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 +25 -6
- 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 +3 -3
- package/dist/cjs/ic-text-field.cjs.entry.js +39 -31
- 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 +65 -63
- 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/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-badge/ic-badge.css +1 -1
- package/dist/collection/components/ic-badge/ic-badge.js +2 -2
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +40 -59
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +65 -86
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.css +105 -62
- package/dist/collection/components/ic-button/ic-button.js +141 -162
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.stories.js +10 -2
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +3 -0
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +4 -4
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +9 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +73 -80
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +24 -25
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +9 -0
- package/dist/collection/components/ic-chip/ic-chip.js +66 -72
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.stories.js +2 -1
- 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.js +4 -4
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +3 -3
- package/dist/collection/components/ic-link/ic-link.js +12 -4
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-link/ic-link.stories.js +28 -5
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +3 -3
- package/dist/collection/components/ic-menu/ic-menu.js +41 -40
- 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-menu-item/ic-menu-item.css +0 -5
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +3 -3
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +2 -2
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +119 -167
- 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 +7 -13
- 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 -5
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +6 -5
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +208 -211
- 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 +9 -8
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.js +196 -271
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +30 -21
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +43 -4
- 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 +247 -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.js +5 -5
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.js +2 -2
- 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 +124 -101
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -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.js +81 -79
- 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/helpers.js +20 -36
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +21 -37
- 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-badge.js +3 -3
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +57 -78
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +32 -51
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +105 -126
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +5 -5
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +8 -9
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +39 -43
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +28 -40
- package/dist/components/ic-chip.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 +4 -4
- package/dist/components/ic-input-validation2.js +3 -3
- package/dist/components/ic-link2.js +11 -3
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +3 -3
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-item2.js +4 -4
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +17 -16
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +2 -2
- package/dist/components/ic-navigation-group.js +115 -163
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +67 -62
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +4 -4
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination.js +4 -4
- package/dist/components/ic-popover-menu.js +7 -6
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +4 -4
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +4 -4
- package/dist/components/ic-search-bar.js +150 -154
- 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 +25 -5
- 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-tab.js +2 -2
- package/dist/components/ic-text-field.js +40 -31
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +3 -3
- 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 +61 -63
- 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 +65 -63
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js +2 -2
- package/dist/core/core.css +159 -109
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-0fb68b4f.entry.js +2 -0
- package/dist/core/p-0fb68b4f.entry.js.map +1 -0
- package/dist/core/{p-bbe5596b.entry.js → p-15b7adaf.entry.js} +2 -2
- package/dist/core/{p-abaea607.entry.js → p-1d172032.entry.js} +2 -2
- package/dist/core/{p-fc50d582.entry.js → p-1d254b71.entry.js} +2 -2
- package/dist/core/p-1d254b71.entry.js.map +1 -0
- package/dist/core/{p-6de6b6b7.entry.js → p-23536595.entry.js} +2 -2
- package/dist/core/{p-81a12e36.entry.js → p-26dfc4db.entry.js} +2 -2
- package/dist/core/{p-81a12e36.entry.js.map → p-26dfc4db.entry.js.map} +1 -1
- package/dist/core/{p-f3c72ffb.entry.js → p-2c371198.entry.js} +2 -2
- package/dist/core/p-3676ac4e.entry.js +2 -0
- package/dist/core/p-3676ac4e.entry.js.map +1 -0
- package/dist/core/{p-f34eee68.entry.js → p-3cb4ecef.entry.js} +2 -2
- package/dist/core/{p-3eb7ef1d.entry.js → p-432aeae0.entry.js} +2 -2
- package/dist/core/p-4a2acb2e.entry.js +2 -0
- package/dist/core/p-4a2acb2e.entry.js.map +1 -0
- package/dist/core/p-4dc97b03.entry.js +2 -0
- package/dist/core/p-4dc97b03.entry.js.map +1 -0
- package/dist/core/p-4e48a671.entry.js +2 -0
- package/dist/core/p-4e48a671.entry.js.map +1 -0
- package/dist/core/p-513628ef.entry.js +2 -0
- package/dist/core/p-513628ef.entry.js.map +1 -0
- package/dist/core/{p-88924aef.entry.js → p-51b49429.entry.js} +2 -2
- package/dist/core/p-554845c4.entry.js +2 -0
- package/dist/core/p-554845c4.entry.js.map +1 -0
- package/dist/core/{p-7afc71d0.entry.js → p-56e0de32.entry.js} +2 -2
- package/dist/core/{p-7a0d238b.entry.js → p-56fb0298.entry.js} +2 -2
- package/dist/core/p-59b48450.entry.js +2 -0
- package/dist/core/p-59b48450.entry.js.map +1 -0
- package/dist/core/{p-fbde763c.entry.js → p-5aec3757.entry.js} +2 -2
- package/dist/core/{p-23d059ff.entry.js → p-5eb2ac90.entry.js} +2 -2
- package/dist/core/{p-c2ca6274.entry.js → p-60aad45d.entry.js} +2 -2
- package/dist/core/{p-33c86ba6.entry.js → p-628c32b8.entry.js} +2 -2
- package/dist/core/p-6cd0b010.entry.js +2 -0
- package/dist/core/p-6cd0b010.entry.js.map +1 -0
- package/dist/core/{p-7dfe0284.entry.js → p-6eea869b.entry.js} +2 -2
- package/dist/core/{p-0631c3ab.entry.js → p-7d2c07e2.entry.js} +2 -2
- package/dist/core/p-7d352865.entry.js +2 -0
- package/dist/core/p-7d352865.entry.js.map +1 -0
- package/dist/core/{p-959a9cdf.entry.js → p-7deaf128.entry.js} +2 -2
- package/dist/core/{p-959a9cdf.entry.js.map → p-7deaf128.entry.js.map} +1 -1
- package/dist/core/p-803f2eb8.entry.js +2 -0
- package/dist/core/p-803f2eb8.entry.js.map +1 -0
- package/dist/core/p-8242c24f.js +2 -0
- package/dist/core/p-8242c24f.js.map +1 -0
- package/dist/core/p-87fa5add.entry.js +2 -0
- package/dist/core/p-87fa5add.entry.js.map +1 -0
- package/dist/core/{p-3675c4b4.entry.js → p-887e00bb.entry.js} +2 -2
- package/dist/core/p-8958c60f.entry.js +2 -0
- package/dist/core/p-8958c60f.entry.js.map +1 -0
- package/dist/core/{p-45432bf5.entry.js → p-8c77dd65.entry.js} +2 -2
- package/dist/core/{p-e2f893f0.entry.js → p-9a6dc8b1.entry.js} +2 -2
- package/dist/core/p-9a6dc8b1.entry.js.map +1 -0
- package/dist/core/{p-acebb05c.entry.js → p-9c47521d.entry.js} +2 -2
- package/dist/core/p-a140bcaa.entry.js +2 -0
- package/dist/core/p-a17499ff.entry.js +2 -0
- package/dist/core/p-a17499ff.entry.js.map +1 -0
- package/dist/core/{p-005cd8a8.entry.js → p-aad10013.entry.js} +2 -2
- package/dist/core/p-aad2abbf.entry.js +2 -0
- package/dist/core/p-aad2abbf.entry.js.map +1 -0
- package/dist/core/p-bdcc79dd.entry.js +2 -0
- package/dist/core/p-bdcc79dd.entry.js.map +1 -0
- package/dist/core/{p-de43d375.entry.js → p-bf3b853e.entry.js} +2 -2
- package/dist/core/{p-e56d0db2.entry.js → p-c59fd23e.entry.js} +2 -2
- package/dist/core/{p-f815f8c9.entry.js → p-c5ffe2cf.entry.js} +2 -2
- package/dist/core/{p-5206a978.entry.js → p-c8cf1ad5.entry.js} +2 -2
- package/dist/core/p-cfa9ed7d.entry.js +2 -0
- package/dist/core/p-cfa9ed7d.entry.js.map +1 -0
- package/dist/core/{p-23ed8b99.entry.js → p-d4903dcd.entry.js} +2 -2
- package/dist/core/{p-1e4cdd2d.entry.js → p-d82b27df.entry.js} +2 -2
- package/dist/core/{p-7c0914e7.entry.js → p-d8ce39ac.entry.js} +2 -2
- package/dist/core/{p-70700c7a.entry.js → p-dcce0dfd.entry.js} +2 -2
- package/dist/core/{p-40f2f58e.entry.js → p-de1e04ac.entry.js} +2 -2
- package/dist/core/{p-4b601e06.entry.js → p-dee21f6d.entry.js} +2 -2
- package/dist/core/{p-4245a976.entry.js → p-dfc8cba6.entry.js} +2 -2
- package/dist/core/{p-b3ac38c5.entry.js → p-e2629bfe.entry.js} +2 -2
- package/dist/core/{p-3b5d3e24.entry.js → p-e38fddbb.entry.js} +2 -2
- package/dist/core/p-e38fddbb.entry.js.map +1 -0
- package/dist/core/p-eca6e215.entry.js +2 -0
- package/dist/core/p-eca6e215.entry.js.map +1 -0
- package/dist/core/{p-44e4e8c1.entry.js → p-ef36181d.entry.js} +2 -2
- package/dist/core/{p-ef09b450.entry.js → p-ef4b752c.entry.js} +2 -2
- package/dist/core/p-ef4b752c.entry.js.map +1 -0
- package/dist/core/{p-b3d6d5be.entry.js → p-fa38ad2e.entry.js} +2 -2
- package/dist/core/p-fc4f7180.entry.js +2 -0
- package/dist/core/p-fc4f7180.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-46a2d1fd.js → helpers-f2ffaa7c.js} +22 -38
- package/dist/esm/helpers-f2ffaa7c.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 +4 -4
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +56 -76
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +32 -51
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +111 -132
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +6 -6
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +9 -10
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +37 -41
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +26 -38
- package/dist/esm/ic-chip.entry.js.map +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 +23 -22
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +8 -8
- package/dist/esm/ic-link.entry.js +12 -4
- 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 +5 -5
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +3 -3
- package/dist/esm/ic-navigation-group.entry.js +116 -164
- 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 +8 -7
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +5 -5
- package/dist/esm/ic-radio-option.entry.js +5 -5
- package/dist/esm/ic-search-bar.entry.js +149 -154
- 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 +25 -6
- 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 +3 -3
- package/dist/esm/ic-text-field.entry.js +39 -31
- 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 +66 -64
- 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-breadcrumb/ic-breadcrumb.d.ts +4 -6
- package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +9 -15
- package/dist/types/components/ic-button/ic-button.d.ts +29 -22
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +14 -13
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +8 -9
- package/dist/types/components/ic-chip/ic-chip.d.ts +13 -15
- package/dist/types/components/ic-link/ic-link.d.ts +2 -1
- package/dist/types/components/ic-menu/ic-menu.d.ts +12 -12
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +4 -18
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +9 -7
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +40 -40
- package/dist/types/components/ic-select/ic-select.d.ts +36 -38
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +5 -0
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +40 -34
- 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 +9 -8
- package/dist/types/components.d.ts +216 -203
- package/dist/types/utils/helpers.d.ts +8 -8
- package/hydrate/index.js +1158 -1350
- package/hydrate/index.mjs +1158 -1350
- package/package.json +2 -2
- package/vscode-data.json +172 -4
- package/dist/cjs/helpers-789082d4.js.map +0 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.types.js +0 -2
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.types.js.map +0 -1
- package/dist/core/p-0a8b3967.entry.js +0 -2
- package/dist/core/p-0a8b3967.entry.js.map +0 -1
- package/dist/core/p-0b4350df.entry.js +0 -2
- package/dist/core/p-0b4350df.entry.js.map +0 -1
- package/dist/core/p-0e618fc5.entry.js +0 -2
- package/dist/core/p-0e618fc5.entry.js.map +0 -1
- package/dist/core/p-18ecba80.entry.js +0 -2
- package/dist/core/p-18ecba80.entry.js.map +0 -1
- package/dist/core/p-281ce313.js +0 -2
- package/dist/core/p-281ce313.js.map +0 -1
- package/dist/core/p-30abe545.entry.js +0 -2
- package/dist/core/p-30abe545.entry.js.map +0 -1
- package/dist/core/p-3132270d.entry.js +0 -2
- package/dist/core/p-3132270d.entry.js.map +0 -1
- package/dist/core/p-3b5d3e24.entry.js.map +0 -1
- package/dist/core/p-517d7afb.entry.js +0 -2
- package/dist/core/p-517d7afb.entry.js.map +0 -1
- package/dist/core/p-5d4b0480.entry.js +0 -2
- package/dist/core/p-5d4b0480.entry.js.map +0 -1
- package/dist/core/p-5e18b899.entry.js +0 -2
- package/dist/core/p-5e18b899.entry.js.map +0 -1
- package/dist/core/p-6337fe1f.entry.js +0 -2
- package/dist/core/p-6337fe1f.entry.js.map +0 -1
- package/dist/core/p-63fe83ad.entry.js +0 -2
- package/dist/core/p-63fe83ad.entry.js.map +0 -1
- package/dist/core/p-8ba129fc.entry.js +0 -2
- package/dist/core/p-8ba129fc.entry.js.map +0 -1
- package/dist/core/p-950db960.entry.js +0 -2
- package/dist/core/p-950db960.entry.js.map +0 -1
- package/dist/core/p-9ea9a4ce.entry.js +0 -2
- package/dist/core/p-9ea9a4ce.entry.js.map +0 -1
- package/dist/core/p-a9c96e3e.entry.js +0 -2
- package/dist/core/p-a9c96e3e.entry.js.map +0 -1
- package/dist/core/p-ac7db165.entry.js +0 -2
- package/dist/core/p-ac7db165.entry.js.map +0 -1
- package/dist/core/p-c04f36c5.entry.js +0 -2
- package/dist/core/p-c62318a8.entry.js +0 -2
- package/dist/core/p-c62318a8.entry.js.map +0 -1
- package/dist/core/p-e2f893f0.entry.js.map +0 -1
- package/dist/core/p-e586ae7b.entry.js +0 -2
- package/dist/core/p-e586ae7b.entry.js.map +0 -1
- package/dist/core/p-ef09b450.entry.js.map +0 -1
- package/dist/core/p-fc50d582.entry.js.map +0 -1
- package/dist/core/p-fe833509.entry.js +0 -2
- package/dist/core/p-fe833509.entry.js.map +0 -1
- package/dist/esm/helpers-46a2d1fd.js.map +0 -1
- package/dist/types/components/ic-breadcrumb/ic-breadcrumb.types.d.ts +0 -1
- /package/dist/core/{p-bbe5596b.entry.js.map → p-15b7adaf.entry.js.map} +0 -0
- /package/dist/core/{p-abaea607.entry.js.map → p-1d172032.entry.js.map} +0 -0
- /package/dist/core/{p-6de6b6b7.entry.js.map → p-23536595.entry.js.map} +0 -0
- /package/dist/core/{p-f3c72ffb.entry.js.map → p-2c371198.entry.js.map} +0 -0
- /package/dist/core/{p-f34eee68.entry.js.map → p-3cb4ecef.entry.js.map} +0 -0
- /package/dist/core/{p-3eb7ef1d.entry.js.map → p-432aeae0.entry.js.map} +0 -0
- /package/dist/core/{p-88924aef.entry.js.map → p-51b49429.entry.js.map} +0 -0
- /package/dist/core/{p-7afc71d0.entry.js.map → p-56e0de32.entry.js.map} +0 -0
- /package/dist/core/{p-7a0d238b.entry.js.map → p-56fb0298.entry.js.map} +0 -0
- /package/dist/core/{p-fbde763c.entry.js.map → p-5aec3757.entry.js.map} +0 -0
- /package/dist/core/{p-23d059ff.entry.js.map → p-5eb2ac90.entry.js.map} +0 -0
- /package/dist/core/{p-c2ca6274.entry.js.map → p-60aad45d.entry.js.map} +0 -0
- /package/dist/core/{p-33c86ba6.entry.js.map → p-628c32b8.entry.js.map} +0 -0
- /package/dist/core/{p-7dfe0284.entry.js.map → p-6eea869b.entry.js.map} +0 -0
- /package/dist/core/{p-0631c3ab.entry.js.map → p-7d2c07e2.entry.js.map} +0 -0
- /package/dist/core/{p-3675c4b4.entry.js.map → p-887e00bb.entry.js.map} +0 -0
- /package/dist/core/{p-45432bf5.entry.js.map → p-8c77dd65.entry.js.map} +0 -0
- /package/dist/core/{p-acebb05c.entry.js.map → p-9c47521d.entry.js.map} +0 -0
- /package/dist/core/{p-c04f36c5.entry.js.map → p-a140bcaa.entry.js.map} +0 -0
- /package/dist/core/{p-005cd8a8.entry.js.map → p-aad10013.entry.js.map} +0 -0
- /package/dist/core/{p-de43d375.entry.js.map → p-bf3b853e.entry.js.map} +0 -0
- /package/dist/core/{p-e56d0db2.entry.js.map → p-c59fd23e.entry.js.map} +0 -0
- /package/dist/core/{p-f815f8c9.entry.js.map → p-c5ffe2cf.entry.js.map} +0 -0
- /package/dist/core/{p-5206a978.entry.js.map → p-c8cf1ad5.entry.js.map} +0 -0
- /package/dist/core/{p-23ed8b99.entry.js.map → p-d4903dcd.entry.js.map} +0 -0
- /package/dist/core/{p-1e4cdd2d.entry.js.map → p-d82b27df.entry.js.map} +0 -0
- /package/dist/core/{p-7c0914e7.entry.js.map → p-d8ce39ac.entry.js.map} +0 -0
- /package/dist/core/{p-70700c7a.entry.js.map → p-dcce0dfd.entry.js.map} +0 -0
- /package/dist/core/{p-40f2f58e.entry.js.map → p-de1e04ac.entry.js.map} +0 -0
- /package/dist/core/{p-4b601e06.entry.js.map → p-dee21f6d.entry.js.map} +0 -0
- /package/dist/core/{p-4245a976.entry.js.map → p-dfc8cba6.entry.js.map} +0 -0
- /package/dist/core/{p-b3ac38c5.entry.js.map → p-e2629bfe.entry.js.map} +0 -0
- /package/dist/core/{p-44e4e8c1.entry.js.map → p-ef36181d.entry.js.map} +0 -0
- /package/dist/core/{p-b3d6d5be.entry.js.map → p-fa38ad2e.entry.js.map} +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-d337cd8a.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-fc4016d2.js');
|
7
7
|
|
8
8
|
const Expand = `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
9
9
|
<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
|
@@ -33,11 +33,14 @@ const Select = class {
|
|
33
33
|
this.icOptionSelect = index.createEvent(this, "icOptionSelect", 7);
|
34
34
|
this.icOptionDeselect = index.createEvent(this, "icOptionDeselect", 7);
|
35
35
|
this.icRetryLoad = index.createEvent(this, "icRetryLoad", 7);
|
36
|
+
this.blurredBecauseButtonPressed = false;
|
36
37
|
this.hasSetDefaultValue = false;
|
38
|
+
this.hasTimedOut = false;
|
37
39
|
this.inheritedAttributes = {};
|
38
40
|
this.initialOptionsEmpty = false;
|
39
41
|
this.inputId = `ic-select-input-${inputIds++}`;
|
40
42
|
this.menuId = `${this.inputId}-menu`;
|
43
|
+
this.retryButtonClick = false;
|
41
44
|
this.searchableMenuItemSelected = false;
|
42
45
|
this.ungroupedOptions = [];
|
43
46
|
this.hostMutationObserver = null;
|
@@ -153,6 +156,12 @@ const Select = class {
|
|
153
156
|
*/
|
154
157
|
this.debounce = 0;
|
155
158
|
this.currDebounce = this.debounce;
|
159
|
+
/**
|
160
|
+
* The value of the select, reflected by the value of the currently selected option.
|
161
|
+
* For the searchable variant, the value is also reflected by the user input.
|
162
|
+
* For the multi-select variant, the value must be an array of option values.
|
163
|
+
*/
|
164
|
+
this.value = null;
|
156
165
|
this.initialValue = this.value;
|
157
166
|
this.inputValueToFilter = this.value;
|
158
167
|
// triggered when attributes of host element change
|
@@ -190,13 +199,27 @@ const Select = class {
|
|
190
199
|
this.emitIcChange = (value) => {
|
191
200
|
// If "Select all" button clicked, replace value with new value (array of all option values)
|
192
201
|
if (this.multiple && !Array.isArray(value) && value !== null) {
|
193
|
-
|
202
|
+
// Update selected options - adds / removes them, in order of option list
|
203
|
+
// Create new array if value prop is undefined
|
204
|
+
if (this.value) {
|
205
|
+
let valueArray = this.value.slice();
|
206
|
+
if (this.value.includes(value)) {
|
207
|
+
valueArray.splice(valueArray.indexOf(value), 1);
|
208
|
+
}
|
209
|
+
else {
|
210
|
+
valueArray.push(value);
|
211
|
+
valueArray = this.getValueSortedByOptions(valueArray);
|
212
|
+
}
|
213
|
+
this.value = valueArray.length === 0 ? null : valueArray;
|
214
|
+
}
|
215
|
+
else {
|
216
|
+
this.value = [value];
|
217
|
+
}
|
194
218
|
}
|
195
219
|
else {
|
196
220
|
this.value = value;
|
197
221
|
}
|
198
|
-
|
199
|
-
this.icChange.emit({ value: valueToEmit || null });
|
222
|
+
this.icChange.emit({ value: this.multiple ? this.value : value });
|
200
223
|
};
|
201
224
|
this.emitIcInput = (value) => {
|
202
225
|
clearTimeout(this.debounceIcInput);
|
@@ -209,30 +232,25 @@ const Select = class {
|
|
209
232
|
if (this.options.length > 0) {
|
210
233
|
this.setOptionsValuesFromLabels();
|
211
234
|
this.uniqueOptions = this.deduplicateOptions(this.options);
|
212
|
-
this.filteredOptions = this.uniqueOptions;
|
213
235
|
}
|
214
236
|
else {
|
215
237
|
this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
|
216
238
|
this.uniqueOptions = this.noOptions;
|
217
|
-
this.filteredOptions = this.noOptions;
|
218
239
|
}
|
240
|
+
this.filteredOptions = this.uniqueOptions;
|
219
241
|
if (this.isExternalFiltering()) {
|
220
242
|
// When searchable select
|
221
243
|
this.noOptions = null;
|
222
244
|
this.updateSearchableSelectResultAriaLive();
|
223
245
|
this.setDefaultValue();
|
224
246
|
}
|
225
|
-
else {
|
226
|
-
|
227
|
-
|
228
|
-
this.initialOptionsEmpty = false;
|
229
|
-
}
|
247
|
+
else if (this.initialOptionsEmpty) {
|
248
|
+
this.setDefaultValue();
|
249
|
+
this.initialOptionsEmpty = false;
|
230
250
|
}
|
231
251
|
}
|
232
|
-
else {
|
233
|
-
|
234
|
-
this.options = this.noOptions || [];
|
235
|
-
}
|
252
|
+
else if (!this.searchable) {
|
253
|
+
this.options = this.noOptions || [];
|
236
254
|
}
|
237
255
|
};
|
238
256
|
/**
|
@@ -243,11 +261,10 @@ const Select = class {
|
|
243
261
|
this.deduplicateOptions = (options) => {
|
244
262
|
const uniqueValues = [];
|
245
263
|
const dedupedOptions = [];
|
246
|
-
let dedupedChildren;
|
247
264
|
options.forEach((option) => {
|
248
265
|
if (option.children) {
|
249
266
|
//If an option has children, we will loop through them
|
250
|
-
dedupedChildren = [];
|
267
|
+
const dedupedChildren = [];
|
251
268
|
option.children.forEach((child) => {
|
252
269
|
if (uniqueValues.includes(child.value)) {
|
253
270
|
console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`);
|
@@ -258,8 +275,7 @@ const Select = class {
|
|
258
275
|
}
|
259
276
|
});
|
260
277
|
// construct a modified option, inserting the deduplicated children alongside the original information
|
261
|
-
|
262
|
-
dedupedOptions.push(modifiedParent);
|
278
|
+
dedupedOptions.push(Object.assign(Object.assign({}, option), { children: dedupedChildren }));
|
263
279
|
}
|
264
280
|
else {
|
265
281
|
// If an option does not have children, assess to see if it's value has been included already
|
@@ -291,12 +307,10 @@ const Select = class {
|
|
291
307
|
};
|
292
308
|
this.setTextColor = () => {
|
293
309
|
if (this.nativeSelectElement) {
|
294
|
-
|
295
|
-
this.nativeSelectElement.
|
296
|
-
|
297
|
-
|
298
|
-
this.nativeSelectElement.className = "select-option-selected";
|
299
|
-
}
|
310
|
+
this.nativeSelectElement.className =
|
311
|
+
this.nativeSelectElement.selectedIndex === 0
|
312
|
+
? "placeholder"
|
313
|
+
: "select-option-selected";
|
300
314
|
}
|
301
315
|
};
|
302
316
|
this.setMenuChange = (open) => {
|
@@ -304,27 +318,12 @@ const Select = class {
|
|
304
318
|
this.open = open;
|
305
319
|
}
|
306
320
|
};
|
307
|
-
this.getLabelFromValue = (value) =>
|
308
|
-
|
309
|
-
}
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
};
|
314
|
-
this.getFilteredChildMenuOptions = (option) => {
|
315
|
-
let children = option.children;
|
316
|
-
if (option.children) {
|
317
|
-
if (this.searchable) {
|
318
|
-
children = helpers.getFilteredMenuOptions(option.children, !!this.includeDescriptionsInSearch, this.searchableSelectInputValue || "", this.searchMatchPosition);
|
319
|
-
}
|
320
|
-
else {
|
321
|
-
children = helpers.getFilteredMenuOptions(option.children, false, this.pressedCharacters, "start");
|
322
|
-
}
|
323
|
-
}
|
324
|
-
const newOption = Object.assign({}, option);
|
325
|
-
newOption.children = children;
|
326
|
-
return newOption;
|
327
|
-
};
|
321
|
+
this.getLabelFromValue = (value) => helpers.getLabelFromValue(value, this.uniqueOptions);
|
322
|
+
this.getMultipleOptionsString = (selectedValues) => selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value)).filter((label) => !!label).join(", ");
|
323
|
+
this.getFilteredChildMenuOptions = (option) => (Object.assign(Object.assign({}, option), { children: option.children &&
|
324
|
+
helpers.getFilteredMenuOptions(option.children, this.searchable && !!this.includeDescriptionsInSearch, this.searchable
|
325
|
+
? this.searchableSelectInputValue || ""
|
326
|
+
: this.pressedCharacters, this.searchable ? this.searchMatchPosition : "start") }));
|
328
327
|
// (For multi-select) get value array, i.e. selected option values, in order they appear in option list
|
329
328
|
this.getValueSortedByOptions = (value) => {
|
330
329
|
const valueArray = value;
|
@@ -343,13 +342,13 @@ const Select = class {
|
|
343
342
|
// (rather than native <select> - rendered when viewed on a mobile / tablet screen)
|
344
343
|
this.handleCustomSelectChange = (event) => {
|
345
344
|
var _a, _b;
|
346
|
-
const value = event.detail
|
347
|
-
if (
|
345
|
+
const { value, label, optionId } = event.detail;
|
346
|
+
if (label === this.emptyOptionListText) {
|
348
347
|
(_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
|
349
348
|
return;
|
350
349
|
}
|
351
350
|
if (this.searchable) {
|
352
|
-
this.value = value;
|
351
|
+
this.value = value || null;
|
353
352
|
this.searchableMenuItemSelected = true;
|
354
353
|
// After editing the input, if selecting the same option as before, set the input value to label again
|
355
354
|
if (this.value === this.currValue) {
|
@@ -360,64 +359,39 @@ const Select = class {
|
|
360
359
|
this.hiddenInputValue =
|
361
360
|
this.getValueFromLabel(this.searchableSelectInputValue) || null;
|
362
361
|
}
|
363
|
-
if (
|
364
|
-
this.
|
365
|
-
|
366
|
-
else {
|
367
|
-
this.icOptionSelect.emit({ value });
|
368
|
-
}
|
369
|
-
this.ariaActiveDescendant = event.detail.optionId;
|
370
|
-
this.emitIcChange(value);
|
371
|
-
};
|
372
|
-
// Update selected options - adds / removes them, in order of option list
|
373
|
-
// Create new array if value prop is undefined
|
374
|
-
this.handleMultipleSelectChange = (value) => {
|
375
|
-
if (this.value) {
|
376
|
-
let valueArray = this.value.slice();
|
377
|
-
if (this.value.includes(value)) {
|
378
|
-
const valueIndex = valueArray.indexOf(value);
|
379
|
-
valueArray.splice(valueIndex, 1);
|
362
|
+
if (value) {
|
363
|
+
if (this.multiple && ((_b = this.value) === null || _b === void 0 ? void 0 : _b.includes(value))) {
|
364
|
+
this.icOptionDeselect.emit({ value });
|
380
365
|
}
|
381
366
|
else {
|
382
|
-
|
383
|
-
valueArray = this.getValueSortedByOptions(valueArray);
|
367
|
+
this.icOptionSelect.emit({ value });
|
384
368
|
}
|
385
|
-
this.value = valueArray.length === 0 ? null : valueArray;
|
386
369
|
}
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
const allEnabledOptions = this.ungroupedOptions.filter((option) => !option.disabled);
|
396
|
-
const allValues = allEnabledOptions.map((option) => option.value);
|
397
|
-
let newValue;
|
398
|
-
if (selectAllOptions) {
|
399
|
-
let unselectedValues;
|
370
|
+
this.ariaActiveDescendant = optionId;
|
371
|
+
this.emitIcChange(value || null);
|
372
|
+
};
|
373
|
+
this.handleSelectAllChange = ({ detail, }) => {
|
374
|
+
const allValues = this.ungroupedOptions
|
375
|
+
.filter((option) => !option.disabled)
|
376
|
+
.map((option) => option.value);
|
377
|
+
if (detail.select) {
|
400
378
|
// Only emit icOptionSelect for all values that are newly selected
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
else {
|
405
|
-
unselectedValues = allValues;
|
406
|
-
}
|
379
|
+
const unselectedValues = this.value
|
380
|
+
? allValues.filter((value) => this.value && !this.value.includes(value))
|
381
|
+
: allValues;
|
407
382
|
unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
|
408
|
-
newValue = allValues;
|
409
383
|
}
|
410
384
|
else {
|
411
385
|
// Only emit icOptionDeselect for values that were selected
|
412
386
|
this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
|
413
|
-
newValue = null;
|
414
387
|
}
|
415
|
-
this.emitIcChange(
|
388
|
+
this.emitIcChange(detail.select ? allValues : null);
|
416
389
|
};
|
417
390
|
this.handleMenuChange = (event) => {
|
418
391
|
this.open = event.detail.open;
|
419
392
|
this.pressedCharacters = "";
|
420
|
-
this.searchable
|
393
|
+
if (this.searchable)
|
394
|
+
this.handleFocusIndicatorDisplay();
|
421
395
|
};
|
422
396
|
// clears the debounce delay when navigating the menu with arrow keys etc
|
423
397
|
// to prevent delay in change event, which should only occur when typing in input
|
@@ -492,19 +466,18 @@ const Select = class {
|
|
492
466
|
if (this.open && key === " " && this.pressedCharacters.length === 0) {
|
493
467
|
this.setMenuChange(false);
|
494
468
|
}
|
495
|
-
if (key.length
|
496
|
-
window.clearTimeout(this.characterKeyPressTimer);
|
497
|
-
this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
|
498
|
-
if (!(key === " " && !this.pressedCharacters)) {
|
499
|
-
this.pressedCharacters += key;
|
500
|
-
this.handleFilter();
|
501
|
-
if (!this.noOptions) {
|
502
|
-
this.emitIcChange(this.filteredOptions[0].value);
|
503
|
-
}
|
504
|
-
}
|
505
|
-
}
|
506
|
-
else {
|
469
|
+
if (key.length !== 1 || this.searchable) {
|
507
470
|
this.pressedCharacters = "";
|
471
|
+
return;
|
472
|
+
}
|
473
|
+
window.clearTimeout(this.characterKeyPressTimer);
|
474
|
+
this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
|
475
|
+
if (key !== " " || !!this.pressedCharacters) {
|
476
|
+
this.pressedCharacters += key;
|
477
|
+
this.handleFilter();
|
478
|
+
if (!this.noOptions) {
|
479
|
+
this.emitIcChange(this.filteredOptions[0].value);
|
480
|
+
}
|
508
481
|
}
|
509
482
|
};
|
510
483
|
this.handleNativeSelectKeyDown = (event) => {
|
@@ -523,19 +496,17 @@ const Select = class {
|
|
523
496
|
if (this.isExternalFiltering() && (event.key === "Enter" || isArrowKey)) {
|
524
497
|
this.menu.options = this.filteredOptions;
|
525
498
|
}
|
526
|
-
else {
|
527
|
-
|
528
|
-
|
529
|
-
this.menu.options = this.uniqueOptions;
|
530
|
-
}
|
499
|
+
else if (!this.hasTimedOut) {
|
500
|
+
this.noOptions = null;
|
501
|
+
this.menu.options = this.uniqueOptions;
|
531
502
|
}
|
532
503
|
}
|
533
504
|
if (this.open && event.key === "Enter") {
|
534
505
|
this.setMenuChange(false);
|
535
506
|
}
|
536
507
|
else {
|
537
|
-
if (!
|
538
|
-
if (
|
508
|
+
if (!isArrowKey || this.noOptions === null) {
|
509
|
+
if (event.key !== " " || this.pressedCharacters.length <= 0) {
|
539
510
|
// Keyboard events get passed onto ic-menu
|
540
511
|
(_a = this.menu) === null || _a === void 0 ? void 0 : _a.handleKeyboardOpen(event);
|
541
512
|
}
|
@@ -551,9 +522,9 @@ const Select = class {
|
|
551
522
|
this.handleClearButtonBlur = (ev) => {
|
552
523
|
var _a;
|
553
524
|
const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
|
554
|
-
if (!
|
555
|
-
ev.relatedTarget
|
556
|
-
!
|
525
|
+
if ((!this.searchableSelectElement ||
|
526
|
+
ev.relatedTarget !== this.searchableSelectElement) &&
|
527
|
+
(!retryButton || ev.relatedTarget !== retryButton)) {
|
557
528
|
this.setMenuChange(false);
|
558
529
|
this.handleFocusIndicatorDisplay();
|
559
530
|
}
|
@@ -562,12 +533,8 @@ const Select = class {
|
|
562
533
|
this.handleFilter = () => {
|
563
534
|
var _a;
|
564
535
|
const options = this.deduplicateOptions(this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions);
|
565
|
-
|
536
|
+
const isGrouped = options.some((option) => !!option.children);
|
566
537
|
let newFilteredOptions = [];
|
567
|
-
options.map((option) => {
|
568
|
-
if (option.children)
|
569
|
-
isGrouped = true;
|
570
|
-
});
|
571
538
|
let menuOptionsFiltered;
|
572
539
|
if (this.searchable) {
|
573
540
|
menuOptionsFiltered = helpers.getFilteredMenuOptions(options, !!this.includeDescriptionsInSearch, this.inputValueToFilter || "", this.searchMatchPosition);
|
@@ -581,30 +548,14 @@ const Select = class {
|
|
581
548
|
newFilteredOptions = menuOptionsFiltered;
|
582
549
|
}
|
583
550
|
else if (isGrouped) {
|
584
|
-
options.map((option) =>
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
}
|
593
|
-
else {
|
594
|
-
newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
|
595
|
-
}
|
596
|
-
});
|
597
|
-
}
|
598
|
-
let noChildOptionsWhenFiltered = false;
|
599
|
-
if (isGrouped) {
|
600
|
-
noChildOptionsWhenFiltered = true;
|
601
|
-
newFilteredOptions.map((option) => {
|
602
|
-
if (option.children && option.children.length > 0) {
|
603
|
-
noChildOptionsWhenFiltered = false;
|
604
|
-
}
|
605
|
-
});
|
606
|
-
}
|
607
|
-
if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {
|
551
|
+
newFilteredOptions = options.map((option) => this.includeGroupTitlesInSearch &&
|
552
|
+
menuOptionsFiltered.indexOf(option) !== -1
|
553
|
+
? option
|
554
|
+
: this.getFilteredChildMenuOptions(option));
|
555
|
+
}
|
556
|
+
if (newFilteredOptions.length > 0 &&
|
557
|
+
(!isGrouped ||
|
558
|
+
newFilteredOptions.some(({ children }) => children && children.length > 0))) {
|
608
559
|
this.noOptions = null;
|
609
560
|
this.filteredOptions = newFilteredOptions;
|
610
561
|
}
|
@@ -639,11 +590,7 @@ const Select = class {
|
|
639
590
|
}, this.timeout);
|
640
591
|
}
|
641
592
|
};
|
642
|
-
this.getValueFromLabel = (label) => {
|
643
|
-
var _a;
|
644
|
-
return (label &&
|
645
|
-
((_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value));
|
646
|
-
};
|
593
|
+
this.getValueFromLabel = (label) => { var _a; return label && ((_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value); };
|
647
594
|
this.handleSearchableSelectInput = (event) => {
|
648
595
|
this.searchableSelectInputValue = event.target.value;
|
649
596
|
this.emitIcInput(this.searchableSelectInputValue);
|
@@ -657,19 +604,18 @@ const Select = class {
|
|
657
604
|
this.setMenuChange(true);
|
658
605
|
if (!this.disableAutoFiltering) {
|
659
606
|
this.handleFilter();
|
660
|
-
this.
|
607
|
+
clearTimeout(this.debounceAria);
|
608
|
+
window.setTimeout(() => {
|
609
|
+
this.updateSearchableSelectResultAriaLive();
|
610
|
+
}, 800);
|
661
611
|
}
|
662
612
|
};
|
663
613
|
this.updateSearchableSelectResultAriaLive = () => {
|
664
614
|
var _a;
|
665
615
|
const searchableSelectResultsStatusEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".searchable-select-results-status");
|
666
616
|
if (searchableSelectResultsStatusEl) {
|
667
|
-
|
668
|
-
|
669
|
-
}
|
670
|
-
else {
|
671
|
-
searchableSelectResultsStatusEl.innerText = "";
|
672
|
-
}
|
617
|
+
searchableSelectResultsStatusEl.innerText =
|
618
|
+
this.noOptions !== null ? this.emptyOptionListText : "";
|
673
619
|
}
|
674
620
|
};
|
675
621
|
this.updateMultiSelectedCountAriaLive = () => {
|
@@ -703,13 +649,12 @@ const Select = class {
|
|
703
649
|
return;
|
704
650
|
}
|
705
651
|
const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
|
706
|
-
|
652
|
+
if (this.searchable &&
|
707
653
|
!!this.menu &&
|
708
654
|
target !== this.menu &&
|
709
655
|
!Array.from(this.menu.querySelectorAll("[role='option']")).includes(target) &&
|
710
|
-
!
|
711
|
-
!
|
712
|
-
if (isSearchableAndNoFocusedInternalElements) {
|
656
|
+
(!this.clearButton || target !== this.clearButton) &&
|
657
|
+
(!retryButton || target !== retryButton)) {
|
713
658
|
if (!this.retryButtonClick) {
|
714
659
|
this.setMenuChange(false);
|
715
660
|
// Clear input field on blur when searchable if no option is selected
|
@@ -748,6 +693,7 @@ const Select = class {
|
|
748
693
|
this.filteredOptions = this.uniqueOptions;
|
749
694
|
}
|
750
695
|
};
|
696
|
+
this.renderNativeOption = (option) => (index.h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.currValue }, option.label));
|
751
697
|
}
|
752
698
|
watchDisabledHandler() {
|
753
699
|
helpers.removeDisabledFalse(this.disabled, this.el);
|
@@ -759,7 +705,9 @@ const Select = class {
|
|
759
705
|
this.setOptions();
|
760
706
|
}
|
761
707
|
debounceChangedHandler(newValue) {
|
762
|
-
this.
|
708
|
+
if (this.currDebounce !== newValue) {
|
709
|
+
this.currDebounce = newValue;
|
710
|
+
}
|
763
711
|
}
|
764
712
|
valueChangedHandler() {
|
765
713
|
if (this.value !== this.currValue) {
|
@@ -842,83 +790,59 @@ const Select = class {
|
|
842
790
|
this.searchableSelectElement.focus();
|
843
791
|
}
|
844
792
|
}
|
845
|
-
updateOnChangeDebounce(newValue) {
|
846
|
-
if (this.currDebounce !== newValue) {
|
847
|
-
this.currDebounce = newValue;
|
848
|
-
}
|
849
|
-
}
|
850
|
-
debounceAriaLiveUpdate() {
|
851
|
-
clearTimeout(this.debounceAria);
|
852
|
-
window.setTimeout(() => {
|
853
|
-
this.updateSearchableSelectResultAriaLive();
|
854
|
-
}, 800);
|
855
|
-
}
|
856
793
|
render() {
|
857
|
-
|
794
|
+
var _a;
|
795
|
+
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;
|
858
796
|
// HTML inputs only accept 'string' for their value
|
859
797
|
// Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
|
860
|
-
helpers.renderHiddenInput(
|
798
|
+
helpers.renderHiddenInput(this.el, searchable ? hiddenInputValue : currValue, name || inputId, disabled);
|
861
799
|
const invalid = `${validationStatus === helpers.IcInformationStatus.Error}`;
|
862
|
-
const describedBy = helpers.getInputDescribedByText(
|
863
|
-
let showLeftIcon = !!this.el.querySelector(`[slot="icon"]`);
|
864
|
-
if (showLeftIcon && (disabled || (readonly && !this.value))) {
|
865
|
-
showLeftIcon = false;
|
866
|
-
}
|
867
|
-
const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${helpers.getOptionsWithoutGroupTitlesCount(this.options)} selected`;
|
800
|
+
const describedBy = helpers.getInputDescribedByText(inputId, helperText !== "", helpers.hasValidationStatus(validationStatus, !!disabled)).trim();
|
868
801
|
const valueLabelString = multiple
|
869
802
|
? this.getMultipleOptionsString(currValue)
|
870
803
|
: this.getLabelFromValue(currValue);
|
871
804
|
const isClearable = !disabled &&
|
872
805
|
(searchable
|
873
|
-
?
|
874
|
-
: currValue && !
|
875
|
-
return (index.h(index.Host, { key: '
|
876
|
-
"ic-select-disabled":
|
877
|
-
"ic-select-searchable":
|
806
|
+
? !!searchableSelectInputValue
|
807
|
+
: !!currValue && !loading && showClearButton);
|
808
|
+
return (index.h(index.Host, { key: 'd128625d13fdd5c5ee1710116f071f42c9f9820f', class: {
|
809
|
+
"ic-select-disabled": disabled,
|
810
|
+
"ic-select-searchable": searchable,
|
878
811
|
[`ic-select-${size}`]: size !== "medium",
|
879
|
-
"ic-select-full-width":
|
812
|
+
"ic-select-full-width": fullWidth,
|
880
813
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
881
|
-
}, onBlur: this.onBlur }, index.h("ic-input-container", { key: '
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
}
|
888
|
-
else {
|
889
|
-
return (index.h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
|
890
|
-
}
|
891
|
-
}))) : searchable ? (index.h("div", { class: "searchable-select-container" }, index.h("input", { class: {
|
814
|
+
}, onBlur: this.onBlur }, index.h("ic-input-container", { key: 'd3d0381138d095fb6c2c673d543b9b61710c064b', readonly: readonly }, !hideLabel && (index.h("ic-input-label", { key: '9cc4c487e780d00eed4bc4e4e3c3cbb66aab2a14', for: inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly })), index.h("ic-input-component-container", { key: 'cc15c6396b6edcd506e2caa93871ec529f6f25a4', ref: (el) => (this.anchorEl = el), class: { "menu-open": open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, helpers.isSlotUsed(this.el, "icon") &&
|
815
|
+
!disabled &&
|
816
|
+
(!readonly || !!value) && (index.h("span", { key: '21933fa4367b40e02fc41692a35f612f0c6c17d5', slot: "left-icon", class: {
|
817
|
+
readonly,
|
818
|
+
"has-value": !!value,
|
819
|
+
} }, index.h("slot", { key: 'ad5ca4da28e3fb74526668811a042d7efdfad10c', name: "icon" }))), readonly ? (index.h("ic-typography", null, index.h("p", null, valueLabelString))) : helpers.isMobileOrTablet() && !multiple ? (index.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), index.h("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => option.children ? (index.h("optgroup", { label: option.label }, option.children.map((child) => this.renderNativeOption(child)))) : (this.renderNativeOption(option))))) : searchable ? (index.h("div", { class: "searchable-select-container" }, index.h("input", { class: {
|
892
820
|
"select-input": true,
|
893
|
-
"with-clear-button": !!
|
894
|
-
}, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant":
|
895
|
-
(currValue === null ||
|
821
|
+
"with-clear-button": !!searchableSelectInputValue,
|
822
|
+
}, 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 && (index.h("div", { class: "clear-button-container" }, index.h("ic-button", { id: "clear-button", ref: (el) => (this.clearButton = el), "aria-label": searchableSelectInputValue &&
|
823
|
+
(currValue === null || loading)
|
896
824
|
? "Clear input"
|
897
|
-
: "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", theme:
|
825
|
+
: "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", theme: clearButtonFocused ? "light" : "dark" }), index.h("div", { class: "divider" }))), index.h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
|
898
826
|
"expand-icon": true,
|
899
|
-
"expand-icon-open":
|
900
|
-
}, innerHTML: Expand, "aria-hidden": "true" }), index.h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (index.h("div", { class: "select-container" }, index.h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id:
|
901
|
-
? `${
|
902
|
-
: valueLabelString) || placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded":
|
827
|
+
"expand-icon-open": open,
|
828
|
+
}, innerHTML: Expand, "aria-hidden": "true" }), index.h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (index.h("div", { class: "select-container" }, index.h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id: inputId, "aria-label": `${label}, ${(multiple && currValue
|
829
|
+
? `${currValue.length} of ${helpers.getOptionsWithoutGroupTitlesCount(options)} selected, ${valueLabelString}`
|
830
|
+
: 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 }, index.h("ic-typography", { variant: "body", class: {
|
903
831
|
"value-text": true,
|
904
|
-
"with-clear-button":
|
905
|
-
placeholder: !
|
906
|
-
? !
|
832
|
+
"with-clear-button": isClearable,
|
833
|
+
placeholder: !loading && multiple
|
834
|
+
? !value || value.length < 1
|
907
835
|
: !this.getLabelFromValue(currValue),
|
908
836
|
} }, valueLabelString || placeholder), index.h("div", { class: "select-input-end" }, isClearable && index.h("div", { class: "divider" }), index.h("span", { class: {
|
909
837
|
"expand-icon": true,
|
910
|
-
"expand-icon-open":
|
911
|
-
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && (index.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:
|
912
|
-
"no-results":
|
913
|
-
|
914
|
-
(
|
915
|
-
|
916
|
-
this.noOptions[0].label === this.emptyOptionListText),
|
917
|
-
}, ref: (el) => (this.menu = el), inputEl: (searchable
|
838
|
+
"expand-icon-open": open,
|
839
|
+
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && (index.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" }))))), (!helpers.isMobileOrTablet() || multiple) && (index.h("ic-menu", { key: '341d478ae904d5bd2a4c6fa54fb29802d2851f3e', class: {
|
840
|
+
"no-results": loading ||
|
841
|
+
hasTimedOut ||
|
842
|
+
((_a = noOptions === null || noOptions === void 0 ? void 0 : noOptions[0]) === null || _a === void 0 ? void 0 : _a.label) === emptyOptionListText,
|
843
|
+
}, ref: (el) => (this.menu = el), inputEl: searchable
|
918
844
|
? this.searchableSelectElement
|
919
|
-
: this.customSelectElement
|
920
|
-
? "manual"
|
921
|
-
: "automatic", closeOnSelect: !multiple })), this.multiple && (index.h("div", { key: '876f1da870c48b21130b246afa988c4fccefdfc6', "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), helpers.hasValidationStatus(this.validationStatus, !!this.disabled) && (index.h("ic-input-validation", { key: '657c2433a3ab425432356227e931cafe4268dd8b', class: { "menu-open": this.open }, ariaLiveMode: "polite", status: validationStatus, message: validationText || "", for: this.inputId })))));
|
845
|
+
: 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 && (index.h("div", { key: '8fb9874132ab430dc90eba61264424fcf200b944', "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), helpers.hasValidationStatus(validationStatus, disabled) && (index.h("ic-input-validation", { key: '872afd5e8f621258c64756d06061a266a4e09745', class: { "menu-open": open }, ariaLiveMode: "polite", status: validationStatus, message: validationText, for: inputId })))));
|
922
846
|
}
|
923
847
|
static get delegatesFocus() { return true; }
|
924
848
|
get el() { return index.getElement(this); }
|