@ukic/web-components 3.0.0-alpha.2 → 3.0.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-f1cf5156.js → helpers-69219f14.js} +24 -1
- package/dist/cjs/helpers-69219f14.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +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 +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +3 -3
- 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-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +446 -164
- 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 -6
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +5 -5
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +9 -9
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +27 -22
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +147 -37
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +7 -4
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +2 -2
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-alert/ic-alert.css +3 -1
- package/dist/collection/components/ic-alert/ic-alert.js +1 -1
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +5 -0
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-input-label/ic-input-label.css +1 -0
- package/dist/collection/components/ic-input-label/ic-input-label.js +45 -4
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js +35 -49
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +1 -0
- package/dist/collection/components/ic-menu/ic-menu.css +70 -10
- package/dist/collection/components/ic-menu/ic-menu.js +485 -192
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +381 -33
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.css +2 -2
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +32 -28
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.css +5 -2
- package/dist/collection/components/ic-page-header/ic-page-header.js +3 -3
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +5 -5
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +31 -7
- 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 +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +2 -2
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +1 -0
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +26 -21
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +1 -0
- package/dist/collection/components/ic-select/ic-select.css +36 -16
- package/dist/collection/components/ic-select/ic-select.js +191 -43
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +160 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.css +27 -30
- package/dist/collection/components/ic-switch/ic-switch.js +29 -2
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.css +1 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/utils/helpers.js +20 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +22 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-alert.js +1 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +2 -2
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-input-label2.js +10 -6
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +450 -167
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +2 -2
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +4 -4
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-popover-menu.js +9 -8
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +27 -22
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +2 -2
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select.js +148 -37
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +7 -3
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-text-field2.js +2 -2
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/core/core.css +580 -10
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-d2f89cb5.entry.js → p-0395442c.entry.js} +2 -2
- package/dist/core/{p-244d6dba.entry.js → p-0d233b0c.entry.js} +2 -2
- package/dist/core/{p-f38bce8d.entry.js → p-134def81.entry.js} +2 -2
- package/dist/core/p-134def81.entry.js.map +1 -0
- package/dist/core/p-14dfd8db.entry.js +2 -0
- package/dist/core/p-14dfd8db.entry.js.map +1 -0
- package/dist/core/p-1b116dd1.entry.js +2 -0
- package/dist/core/p-1b116dd1.entry.js.map +1 -0
- package/dist/core/p-21cc87c0.entry.js +2 -0
- package/dist/core/p-21cc87c0.entry.js.map +1 -0
- package/dist/core/p-2eae9b27.entry.js +2 -0
- package/dist/core/p-2eae9b27.entry.js.map +1 -0
- package/dist/core/p-3618ac34.entry.js +2 -0
- package/dist/core/p-3618ac34.entry.js.map +1 -0
- package/dist/core/{p-355acffa.entry.js → p-37dea10d.entry.js} +2 -2
- package/dist/core/{p-bf1f0ac7.entry.js → p-384d454d.entry.js} +2 -2
- package/dist/core/p-384d454d.entry.js.map +1 -0
- package/dist/core/p-3d417eff.entry.js +2 -0
- package/dist/core/p-3d417eff.entry.js.map +1 -0
- package/dist/core/p-3d9726a3.entry.js +2 -0
- package/dist/core/{p-408344d3.entry.js.map → p-3d9726a3.entry.js.map} +1 -1
- package/dist/core/{p-84526c3e.entry.js → p-43256b7c.entry.js} +2 -2
- package/dist/core/{p-93c23a35.entry.js → p-4a3b1f06.entry.js} +2 -2
- package/dist/core/{p-34db8aaf.entry.js → p-5cd016e1.entry.js} +2 -2
- package/dist/core/{p-d2f8e03f.entry.js → p-5ef8e106.entry.js} +2 -2
- package/dist/core/{p-0a808ec3.entry.js → p-690c5e80.entry.js} +2 -2
- package/dist/core/{p-43f9a711.entry.js → p-6d3e4bb1.entry.js} +2 -2
- package/dist/core/{p-4055f22c.entry.js → p-726673ee.entry.js} +2 -2
- package/dist/core/p-726673ee.entry.js.map +1 -0
- package/dist/core/{p-fa1b7a80.entry.js → p-72d30c8a.entry.js} +2 -2
- package/dist/core/{p-f30f3a3e.entry.js → p-76263187.entry.js} +2 -2
- package/dist/core/{p-c86d48b6.entry.js → p-7827b5cb.entry.js} +2 -2
- package/dist/core/p-79d0be03.entry.js +2 -0
- package/dist/core/p-79d0be03.entry.js.map +1 -0
- package/dist/core/{p-c06a3b97.entry.js → p-7b35de65.entry.js} +2 -2
- package/dist/core/{p-1684c8d4.entry.js → p-7fbf2d3e.entry.js} +2 -2
- package/dist/core/p-91cf9b2b.entry.js +2 -0
- package/dist/core/p-91cf9b2b.entry.js.map +1 -0
- package/dist/core/{p-1b573920.entry.js → p-922984cb.entry.js} +2 -2
- package/dist/core/{p-aab2c7aa.entry.js → p-95f603dd.entry.js} +2 -2
- package/dist/core/{p-e4b276b5.entry.js → p-97fb2bdf.entry.js} +2 -2
- package/dist/core/p-ac4b7329.entry.js +2 -0
- package/dist/core/p-ac4b7329.entry.js.map +1 -0
- package/dist/core/{p-e3ed9110.entry.js → p-acbd15ab.entry.js} +2 -2
- package/dist/core/{p-6d40baa9.entry.js → p-b17c94b7.entry.js} +2 -2
- package/dist/core/p-b78f8b8c.entry.js +2 -0
- package/dist/core/p-b78f8b8c.entry.js.map +1 -0
- package/dist/core/{p-312cacae.js → p-b7eb8ef9.js} +2 -2
- package/dist/core/p-b7eb8ef9.js.map +1 -0
- package/dist/core/{p-363d6e88.entry.js → p-b95a72a3.entry.js} +2 -2
- package/dist/core/{p-21e5dd29.entry.js → p-b997064c.entry.js} +2 -2
- package/dist/core/{p-4ff6d16f.entry.js → p-ba6ecc15.entry.js} +2 -2
- package/dist/core/{p-0d30ffab.entry.js → p-c0fc3d02.entry.js} +2 -2
- package/dist/core/p-c396bd4d.entry.js +2 -0
- package/dist/core/p-c396bd4d.entry.js.map +1 -0
- package/dist/core/{p-f828a6e1.entry.js → p-c9cf932c.entry.js} +2 -2
- package/dist/core/{p-aa0619ce.entry.js → p-cf7db84a.entry.js} +2 -2
- package/dist/core/{p-d58a10ec.entry.js → p-dd36bf1b.entry.js} +2 -2
- package/dist/core/p-e488de54.entry.js +2 -0
- package/dist/core/p-e488de54.entry.js.map +1 -0
- package/dist/core/{p-da14cd3c.entry.js → p-e4d1839e.entry.js} +2 -2
- package/dist/core/{p-0fb047e7.entry.js → p-eb3b4935.entry.js} +2 -2
- package/dist/core/{p-0fb047e7.entry.js.map → p-eb3b4935.entry.js.map} +1 -1
- package/dist/core/{p-60efd7fa.entry.js → p-ebafab37.entry.js} +2 -2
- package/dist/core/{p-82375dca.entry.js → p-ee6dd94c.entry.js} +2 -2
- package/dist/core/{p-9dba6823.entry.js → p-f0fc1bf0.entry.js} +2 -2
- package/dist/core/{p-49525194.entry.js → p-f24984c5.entry.js} +2 -2
- package/dist/core/p-f24984c5.entry.js.map +1 -0
- package/dist/core/{p-d8870804.entry.js → p-f5b2b26d.entry.js} +2 -2
- package/dist/core/p-f60dbd0e.entry.js +2 -0
- package/dist/core/p-f60dbd0e.entry.js.map +1 -0
- package/dist/core/{p-40e9e76a.entry.js → p-f71c00ce.entry.js} +2 -2
- package/dist/core/{p-cbcd4427.entry.js → p-ff4298b1.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-1c9151ef.js → helpers-e8797e8d.js} +23 -2
- package/dist/esm/helpers-e8797e8d.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +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 +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +2 -2
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +2 -2
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +3 -3
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +446 -164
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +8 -6
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +2 -2
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +5 -5
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination.entry.js +1 -1
- package/dist/esm/ic-popover-menu.entry.js +9 -9
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +2 -2
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +27 -22
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +2 -2
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +147 -37
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +7 -4
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-text-field.entry.js +2 -2
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-alert/ic-alert.d.ts +1 -1
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +8 -0
- package/dist/types/components/ic-menu/ic-menu.d.ts +43 -15
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +5 -0
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +3 -2
- package/dist/types/components/ic-select/ic-select.d.ts +24 -10
- package/dist/types/components/ic-switch/ic-switch.d.ts +5 -1
- package/dist/types/components.d.ts +66 -20
- package/dist/types/utils/helpers.d.ts +7 -0
- package/dist/types/utils/types.d.ts +1 -1
- package/hydrate/index.js +685 -255
- package/package.json +2 -2
- package/vscode-data.json +49 -7
- package/dist/cjs/helpers-f1cf5156.js.map +0 -1
- package/dist/core/p-0c872824.entry.js +0 -2
- package/dist/core/p-0c872824.entry.js.map +0 -1
- package/dist/core/p-1f1758a9.entry.js +0 -2
- package/dist/core/p-1f1758a9.entry.js.map +0 -1
- package/dist/core/p-312cacae.js.map +0 -1
- package/dist/core/p-322edabc.entry.js +0 -2
- package/dist/core/p-322edabc.entry.js.map +0 -1
- package/dist/core/p-4055f22c.entry.js.map +0 -1
- package/dist/core/p-408344d3.entry.js +0 -2
- package/dist/core/p-4502d3c1.entry.js +0 -2
- package/dist/core/p-4502d3c1.entry.js.map +0 -1
- package/dist/core/p-49525194.entry.js.map +0 -1
- package/dist/core/p-5deb9730.entry.js +0 -2
- package/dist/core/p-5deb9730.entry.js.map +0 -1
- package/dist/core/p-6bd2e938.entry.js +0 -2
- package/dist/core/p-6bd2e938.entry.js.map +0 -1
- package/dist/core/p-7c89fc86.entry.js +0 -2
- package/dist/core/p-7c89fc86.entry.js.map +0 -1
- package/dist/core/p-af20322c.entry.js +0 -2
- package/dist/core/p-af20322c.entry.js.map +0 -1
- package/dist/core/p-bf1f0ac7.entry.js.map +0 -1
- package/dist/core/p-d1c9c32b.entry.js +0 -2
- package/dist/core/p-d1c9c32b.entry.js.map +0 -1
- package/dist/core/p-dc83a0e9.entry.js +0 -2
- package/dist/core/p-dc83a0e9.entry.js.map +0 -1
- package/dist/core/p-de3a5423.entry.js +0 -2
- package/dist/core/p-de3a5423.entry.js.map +0 -1
- package/dist/core/p-e53309b0.entry.js +0 -2
- package/dist/core/p-e53309b0.entry.js.map +0 -1
- package/dist/core/p-f38bce8d.entry.js.map +0 -1
- package/dist/core/p-fa587e6d.entry.js +0 -2
- package/dist/core/p-fa587e6d.entry.js.map +0 -1
- package/dist/esm/helpers-1c9151ef.js.map +0 -1
- /package/dist/core/{p-d2f89cb5.entry.js.map → p-0395442c.entry.js.map} +0 -0
- /package/dist/core/{p-244d6dba.entry.js.map → p-0d233b0c.entry.js.map} +0 -0
- /package/dist/core/{p-355acffa.entry.js.map → p-37dea10d.entry.js.map} +0 -0
- /package/dist/core/{p-84526c3e.entry.js.map → p-43256b7c.entry.js.map} +0 -0
- /package/dist/core/{p-93c23a35.entry.js.map → p-4a3b1f06.entry.js.map} +0 -0
- /package/dist/core/{p-34db8aaf.entry.js.map → p-5cd016e1.entry.js.map} +0 -0
- /package/dist/core/{p-d2f8e03f.entry.js.map → p-5ef8e106.entry.js.map} +0 -0
- /package/dist/core/{p-0a808ec3.entry.js.map → p-690c5e80.entry.js.map} +0 -0
- /package/dist/core/{p-43f9a711.entry.js.map → p-6d3e4bb1.entry.js.map} +0 -0
- /package/dist/core/{p-fa1b7a80.entry.js.map → p-72d30c8a.entry.js.map} +0 -0
- /package/dist/core/{p-f30f3a3e.entry.js.map → p-76263187.entry.js.map} +0 -0
- /package/dist/core/{p-c86d48b6.entry.js.map → p-7827b5cb.entry.js.map} +0 -0
- /package/dist/core/{p-c06a3b97.entry.js.map → p-7b35de65.entry.js.map} +0 -0
- /package/dist/core/{p-1684c8d4.entry.js.map → p-7fbf2d3e.entry.js.map} +0 -0
- /package/dist/core/{p-1b573920.entry.js.map → p-922984cb.entry.js.map} +0 -0
- /package/dist/core/{p-aab2c7aa.entry.js.map → p-95f603dd.entry.js.map} +0 -0
- /package/dist/core/{p-e4b276b5.entry.js.map → p-97fb2bdf.entry.js.map} +0 -0
- /package/dist/core/{p-e3ed9110.entry.js.map → p-acbd15ab.entry.js.map} +0 -0
- /package/dist/core/{p-6d40baa9.entry.js.map → p-b17c94b7.entry.js.map} +0 -0
- /package/dist/core/{p-363d6e88.entry.js.map → p-b95a72a3.entry.js.map} +0 -0
- /package/dist/core/{p-21e5dd29.entry.js.map → p-b997064c.entry.js.map} +0 -0
- /package/dist/core/{p-4ff6d16f.entry.js.map → p-ba6ecc15.entry.js.map} +0 -0
- /package/dist/core/{p-0d30ffab.entry.js.map → p-c0fc3d02.entry.js.map} +0 -0
- /package/dist/core/{p-f828a6e1.entry.js.map → p-c9cf932c.entry.js.map} +0 -0
- /package/dist/core/{p-aa0619ce.entry.js.map → p-cf7db84a.entry.js.map} +0 -0
- /package/dist/core/{p-d58a10ec.entry.js.map → p-dd36bf1b.entry.js.map} +0 -0
- /package/dist/core/{p-da14cd3c.entry.js.map → p-e4d1839e.entry.js.map} +0 -0
- /package/dist/core/{p-60efd7fa.entry.js.map → p-ebafab37.entry.js.map} +0 -0
- /package/dist/core/{p-82375dca.entry.js.map → p-ee6dd94c.entry.js.map} +0 -0
- /package/dist/core/{p-9dba6823.entry.js.map → p-f0fc1bf0.entry.js.map} +0 -0
- /package/dist/core/{p-d8870804.entry.js.map → p-f5b2b26d.entry.js.map} +0 -0
- /package/dist/core/{p-40e9e76a.entry.js.map → p-f71c00ce.entry.js.map} +0 -0
- /package/dist/core/{p-cbcd4427.entry.js.map → p-ff4298b1.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-d1d2c456.js';
|
2
|
-
import { c as checkSlotInChildMutations, B as getLabelFromValue, z as getFilteredMenuOptions, k as removeFormResetListener, v as inheritAttributes, r as removeDisabledFalse, j as addFormResetListener, a as onComponentRequiredPropUndefined, l as renderHiddenInput, n as getInputDescribedByText, p as hasValidationStatus,
|
2
|
+
import { c as checkSlotInChildMutations, B as getLabelFromValue, z as getFilteredMenuOptions, C as getOptionsWithoutGroupTitlesCount, k as removeFormResetListener, v as inheritAttributes, r as removeDisabledFalse, j as addFormResetListener, a as onComponentRequiredPropUndefined, l as renderHiddenInput, n as getInputDescribedByText, p as hasValidationStatus, E as isMobileOrTablet, I as IcThemeForegroundEnum, w as IC_INHERITED_ARIA, F as IcInformationStatus } from './helpers-e8797e8d.js';
|
3
3
|
|
4
4
|
const Expand = `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
5
5
|
<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
|
@@ -11,7 +11,7 @@ const Clear = `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www
|
|
11
11
|
</svg>
|
12
12
|
`;
|
13
13
|
|
14
|
-
const icSelectCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative}:host(.ic-select-full-width){width:100%}ic-input-component-container:hover{--border-color:var(--ic-action-dark-hover)}ic-input-component-container:active{--border-color:var(--ic-action-dark-pressed);color:var(--ic-action-dark-pressed)}ic-input-component-container.menu-open{--border-color:var(--ic-architectural-400);color:var(--ic-action-dark)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);color:var(--ic-color-text-primary);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:0.375rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 0.375rem center;background-image:url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select option,.select-option-selected{color:var(--ic-color-text-primary)}select:disabled{color:var(--ic-architectural-200);background-image:url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center;position:relative}.select-input{width:100%;height:100%;padding:0 0.375rem;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none}.select-input:focus{outline:var(--ic-hc-focus-outline)}:host(:not(.ic-select-disabled)) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}.select-input[disabled]{pointer-events:none}:host(.ic-select-searchable) .select-input{cursor:auto}.searchable-select-container{align-items:center;display:flex;width:100%;position:relative}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-
|
14
|
+
const icSelectCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--menu-max-height:100px}:host(.ic-select-full-width){width:100%}ic-input-component-container:hover{--border-color:var(--ic-action-dark-hover)}ic-input-component-container:active{--border-color:var(--ic-action-dark-pressed);color:var(--ic-action-dark-pressed)}ic-input-component-container.menu-open{--border-color:var(--ic-architectural-400);color:var(--ic-action-dark)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);color:var(--ic-color-text-primary);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:0.375rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 0.375rem center;background-image:url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select option,.select-option-selected{color:var(--ic-color-text-primary)}select:disabled{color:var(--ic-architectural-200);background-image:url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center;position:relative}.select-input{width:100%;height:100%;padding:0 0.375rem;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none}.select-input:focus{outline:var(--ic-hc-focus-outline)}:host(:not(.ic-select-disabled)) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}.select-input[disabled]{pointer-events:none}:host(.ic-select-searchable) .select-input{cursor:auto}.select-input.with-clear-button{padding-right:0}.value-text{max-width:calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-bottom:0 !important}.value-text.with-clear-button{padding-right:calc(var(--ic-space-xl) + var(--ic-space-xs))}.searchable-select-container{align-items:center;display:flex;width:100%;position:relative}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xxs);color:var(--ic-action-dark)}.expand-icon>svg{display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.ic-select-disabled) .expand-icon,:host(.ic-select-disabled) .expand-icon>svg>path{color:var(--ic-architectural-200)}:host(.ic-select-searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.ic-select-searchable) .expand-icon>svg{height:2.25rem;padding:0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs)}:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-action-dark)}.expand-icon-open,:host(.ic-select-searchable) .expand-icon-open{transform:rotateX(180deg)}:host(.ic-select-disabled) .value-text,.placeholder{color:var(--ic-color-text-tertiary)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;align-items:center}.divider{width:var(--ic-space-1px);background-color:var(--ic-architectural-400);margin:var(--ic-space-xxs) 0;border-radius:var(--ic-space-1px);height:var(--ic-space-lg)}:host(.ic-select-small) .divider{height:var(--ic-space-md)}:host(.ic-select-large) .divider{height:var(--ic-space-xl)}.clear-button{position:absolute;right:calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus{background-color:var(--ic-color-focus-inner);box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer);border-radius:0.25rem}.clear-button:focus *{fill:white}.clear-button.searchable{position:static}.searchable-select-results-status,.multi-select-selected-count{border:0;clip:rect(0, 0, 0, 0, 0);height:var(--ic-space-1px);overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:var(--ic-space-1px)}::slotted([slot=\"icon\"]){fill:var(--ic-color-text-tertiary)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-color-text-primary)}.readonly ::slotted([slot=\"icon\"]){padding:0.375rem;margin-bottom:0.75rem}@media (forced-colors: active){.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
|
15
15
|
|
16
16
|
let inputIds = 0;
|
17
17
|
const MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, "tabindex", "title"];
|
@@ -26,6 +26,7 @@ const Select = class {
|
|
26
26
|
this.icInput = createEvent(this, "icInput", 7);
|
27
27
|
this.icOpen = createEvent(this, "icOpen", 7);
|
28
28
|
this.icOptionSelect = createEvent(this, "icOptionSelect", 7);
|
29
|
+
this.icOptionDeselect = createEvent(this, "icOptionDeselect", 7);
|
29
30
|
this.icRetryLoad = createEvent(this, "icRetryLoad", 7);
|
30
31
|
this.hasSetDefaultValue = false;
|
31
32
|
this.inheritedAttributes = {};
|
@@ -63,17 +64,24 @@ const Select = class {
|
|
63
64
|
};
|
64
65
|
this.emitIcChange = (value) => {
|
65
66
|
if (!this.searchable) {
|
66
|
-
|
67
|
+
// If "Select all" button clicked, replace value with new value (array of all option values)
|
68
|
+
if (this.multiple && !Array.isArray(value) && value !== null) {
|
69
|
+
this.handleMultipleSelectChange(value);
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
this.value = value;
|
73
|
+
}
|
67
74
|
}
|
68
75
|
clearTimeout(this.debounceIcChange);
|
69
76
|
this.debounceIcChange = window.setTimeout(() => {
|
70
|
-
this.
|
77
|
+
const valueToEmit = this.multiple ? this.value : value;
|
78
|
+
this.icChange.emit({ value: valueToEmit });
|
71
79
|
}, this.currDebounce);
|
72
80
|
};
|
73
81
|
this.emitImmediateIcChange = (value) => {
|
74
82
|
this.value = value;
|
75
83
|
clearTimeout(this.debounceIcChange);
|
76
|
-
this.icChange.emit({ value
|
84
|
+
this.icChange.emit({ value });
|
77
85
|
};
|
78
86
|
/**
|
79
87
|
* Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn
|
@@ -146,6 +154,10 @@ const Select = class {
|
|
146
154
|
this.getLabelFromValue = (value) => {
|
147
155
|
return getLabelFromValue(value, this.uniqueOptions);
|
148
156
|
};
|
157
|
+
this.getMultipleOptionsString = (selectedValues) => {
|
158
|
+
const selectedLabels = selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value));
|
159
|
+
return selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.join(", ");
|
160
|
+
};
|
149
161
|
this.getFilteredChildMenuOptions = (option) => {
|
150
162
|
let children = option.children;
|
151
163
|
if (this.searchable) {
|
@@ -158,18 +170,29 @@ const Select = class {
|
|
158
170
|
newOption.children = children;
|
159
171
|
return newOption;
|
160
172
|
};
|
173
|
+
// (For multi-select) get value array, i.e. selected option values, in order they appear in option list
|
174
|
+
this.getValueSortedByOptions = (value) => {
|
175
|
+
const valueArray = value;
|
176
|
+
const valuesFromAllOptions = this.ungroupedOptions.map((option) => option.value);
|
177
|
+
valueArray.sort((a, b) => valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b));
|
178
|
+
return valueArray;
|
179
|
+
};
|
161
180
|
this.handleNativeSelectChange = () => {
|
162
181
|
this.icOptionSelect.emit({ value: this.nativeSelectElement.value });
|
163
182
|
this.emitImmediateIcChange(this.nativeSelectElement.value);
|
164
183
|
this.setTextColor();
|
165
184
|
};
|
185
|
+
// Handle option select for when a custom input box and menu is rendered
|
186
|
+
// (rather than native <select> - rendered when viewed on a mobile / tablet screen)
|
166
187
|
this.handleCustomSelectChange = (event) => {
|
188
|
+
var _a;
|
189
|
+
const value = event.detail.value;
|
167
190
|
if (this.searchable && event.detail.label === this.emptyOptionListText) {
|
168
191
|
this.searchableSelectElement.focus();
|
169
192
|
return;
|
170
193
|
}
|
171
194
|
if (this.searchable) {
|
172
|
-
this.value =
|
195
|
+
this.value = value;
|
173
196
|
this.searchableMenuItemSelected = true;
|
174
197
|
// After editing the input, if selecting the same option as before, set the input value to label again
|
175
198
|
if (this.value === this.currValue) {
|
@@ -178,9 +201,59 @@ const Select = class {
|
|
178
201
|
this.inputValueToFilter = null;
|
179
202
|
this.hiddenInputValue = this.getValueFromLabel(this.searchableSelectInputValue);
|
180
203
|
}
|
204
|
+
if (this.multiple && ((_a = this.value) === null || _a === void 0 ? void 0 : _a.includes(value))) {
|
205
|
+
this.icOptionDeselect.emit({ value });
|
206
|
+
}
|
207
|
+
else {
|
208
|
+
this.icOptionSelect.emit({ value });
|
209
|
+
}
|
181
210
|
this.ariaActiveDescendant = event.detail.optionId;
|
182
|
-
this.
|
183
|
-
|
211
|
+
this.emitIcChange(value);
|
212
|
+
};
|
213
|
+
// Update selected options - adds / removes them, in order of option list
|
214
|
+
// Create new array if value prop is undefined
|
215
|
+
this.handleMultipleSelectChange = (value) => {
|
216
|
+
if (this.value) {
|
217
|
+
let valueArray = this.value.slice();
|
218
|
+
if (this.value.includes(value)) {
|
219
|
+
const valueIndex = valueArray.indexOf(value);
|
220
|
+
valueArray.splice(valueIndex, 1);
|
221
|
+
}
|
222
|
+
else {
|
223
|
+
valueArray.push(value);
|
224
|
+
valueArray = this.getValueSortedByOptions(valueArray);
|
225
|
+
}
|
226
|
+
this.value = valueArray.length === 0 ? null : valueArray;
|
227
|
+
}
|
228
|
+
else {
|
229
|
+
const valueArray = [];
|
230
|
+
valueArray.push(value);
|
231
|
+
this.value = valueArray;
|
232
|
+
}
|
233
|
+
};
|
234
|
+
this.handleSelectAllChange = (event) => {
|
235
|
+
const selectAllOptions = event.detail.select;
|
236
|
+
const allEnabledOptions = this.ungroupedOptions.filter((option) => !option.disabled);
|
237
|
+
const allValues = allEnabledOptions.map((option) => option.value);
|
238
|
+
let newValue;
|
239
|
+
if (selectAllOptions) {
|
240
|
+
let unselectedValues;
|
241
|
+
// Only emit icOptionSelect for all values that are newly selected
|
242
|
+
if (this.value) {
|
243
|
+
unselectedValues = allValues.filter((value) => this.value && !this.value.includes(value));
|
244
|
+
}
|
245
|
+
else {
|
246
|
+
unselectedValues = allValues;
|
247
|
+
}
|
248
|
+
unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
|
249
|
+
newValue = allValues;
|
250
|
+
}
|
251
|
+
else {
|
252
|
+
// Only emit icOptionDeselect for values that were selected
|
253
|
+
this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
|
254
|
+
newValue = null;
|
255
|
+
}
|
256
|
+
this.emitIcChange(newValue);
|
184
257
|
};
|
185
258
|
this.handleMenuChange = (event) => {
|
186
259
|
this.open = event.detail.open;
|
@@ -191,10 +264,9 @@ const Select = class {
|
|
191
264
|
// to prevent delay in change event, which should only occur when typing in input
|
192
265
|
this.handleMenuKeyPress = (ev) => {
|
193
266
|
ev.cancelBubble = true;
|
194
|
-
this.
|
195
|
-
|
196
|
-
|
197
|
-
this.value = ev.detail.value;
|
267
|
+
if (!this.multiple) {
|
268
|
+
this.handleCharacterKeyDown(ev.detail.key);
|
269
|
+
}
|
198
270
|
};
|
199
271
|
this.handleFocusIndicatorDisplay = () => {
|
200
272
|
const focusIndicator = this.el.shadowRoot.querySelector(".focus-indicator");
|
@@ -266,10 +338,12 @@ const Select = class {
|
|
266
338
|
if (key.length === 1 && !this.searchable) {
|
267
339
|
window.clearTimeout(this.characterKeyPressTimer);
|
268
340
|
this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
|
269
|
-
this.pressedCharacters
|
270
|
-
|
271
|
-
|
272
|
-
|
341
|
+
if (!(key === " " && !this.pressedCharacters)) {
|
342
|
+
this.pressedCharacters += key;
|
343
|
+
this.handleFilter();
|
344
|
+
if (!this.noOptions) {
|
345
|
+
this.emitImmediateIcChange(this.filteredOptions[0].value);
|
346
|
+
}
|
273
347
|
}
|
274
348
|
}
|
275
349
|
else {
|
@@ -307,7 +381,9 @@ const Select = class {
|
|
307
381
|
// Keyboard events get passed onto ic-menu
|
308
382
|
this.menu.handleKeyboardOpen(event);
|
309
383
|
}
|
310
|
-
this.
|
384
|
+
if (!this.multiple) {
|
385
|
+
this.handleCharacterKeyDown(event.key);
|
386
|
+
}
|
311
387
|
}
|
312
388
|
}
|
313
389
|
};
|
@@ -432,7 +508,24 @@ const Select = class {
|
|
432
508
|
}
|
433
509
|
}
|
434
510
|
};
|
511
|
+
this.updateMultiSelectedCountAriaLive = () => {
|
512
|
+
var _a;
|
513
|
+
const multiSelectSelectedCountEl = this.el.shadowRoot.querySelector(".multi-select-selected-count");
|
514
|
+
const selectedCount = `${(_a = this.currValue) === null || _a === void 0 ? void 0 : _a.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
|
515
|
+
if (multiSelectSelectedCountEl &&
|
516
|
+
multiSelectSelectedCountEl.innerText !== selectedCount) {
|
517
|
+
multiSelectSelectedCountEl.innerText = selectedCount;
|
518
|
+
}
|
519
|
+
};
|
435
520
|
this.getDefaultValue = (value) => this.getLabelFromValue(value) || value || null;
|
521
|
+
this.setDefaultValue = () => {
|
522
|
+
if (!this.hasSetDefaultValue && this.currValue) {
|
523
|
+
this.searchableSelectInputValue =
|
524
|
+
this.searchable && this.getDefaultValue(this.currValue);
|
525
|
+
this.initialValue = this.currValue;
|
526
|
+
this.hasSetDefaultValue = true;
|
527
|
+
}
|
528
|
+
};
|
436
529
|
this.onFocus = () => {
|
437
530
|
this.icFocus.emit();
|
438
531
|
};
|
@@ -497,6 +590,7 @@ const Select = class {
|
|
497
590
|
this.label = undefined;
|
498
591
|
this.loadingErrorLabel = "Loading Error";
|
499
592
|
this.loadingLabel = "Loading...";
|
593
|
+
this.multiple = false;
|
500
594
|
this.name = this.inputId;
|
501
595
|
this.placeholder = "Select an option";
|
502
596
|
this.readonly = false;
|
@@ -525,10 +619,11 @@ const Select = class {
|
|
525
619
|
}
|
526
620
|
watchOptionsHandler() {
|
527
621
|
var _a;
|
528
|
-
if (!this.hasTimedOut) {
|
622
|
+
if (!this.hasTimedOut && this.options !== this.noOptions) {
|
529
623
|
this.loading = false;
|
530
624
|
clearTimeout(this.timeoutTimer);
|
531
625
|
if (this.isExternalFiltering()) {
|
626
|
+
// When searchable select
|
532
627
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
533
628
|
this.setOptionsValuesFromLabels();
|
534
629
|
this.noOptions = null;
|
@@ -564,11 +659,18 @@ const Select = class {
|
|
564
659
|
}
|
565
660
|
valueChangedHandler() {
|
566
661
|
if (this.value !== this.currValue) {
|
567
|
-
this.
|
662
|
+
if (this.value && this.multiple) {
|
663
|
+
this.currValue = this.getValueSortedByOptions(this.value);
|
664
|
+
this.updateMultiSelectedCountAriaLive();
|
665
|
+
}
|
666
|
+
else {
|
667
|
+
this.currValue = this.value;
|
668
|
+
}
|
568
669
|
}
|
569
670
|
if (this.searchable) {
|
570
671
|
this.searchableSelectInputValue =
|
571
|
-
this.getLabelFromValue(this.currValue) ||
|
672
|
+
this.getLabelFromValue(this.currValue) ||
|
673
|
+
this.currValue;
|
572
674
|
}
|
573
675
|
}
|
574
676
|
openChangedHandler() {
|
@@ -638,15 +740,10 @@ const Select = class {
|
|
638
740
|
this.updateSearchableSelectResultAriaLive();
|
639
741
|
}, 800);
|
640
742
|
}
|
641
|
-
setDefaultValue() {
|
642
|
-
if (!this.hasSetDefaultValue && this.currValue) {
|
643
|
-
this.searchableSelectInputValue = this.getDefaultValue(this.currValue);
|
644
|
-
this.initialValue = this.currValue;
|
645
|
-
this.hasSetDefaultValue = true;
|
646
|
-
}
|
647
|
-
}
|
648
743
|
render() {
|
649
|
-
const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, } = this;
|
744
|
+
const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, } = this;
|
745
|
+
// HTML inputs only accept 'string' for their value
|
746
|
+
// Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
|
650
747
|
renderHiddenInput(true, this.el, name, this.searchable ? this.hiddenInputValue : currValue, disabled);
|
651
748
|
const invalid = `${validationStatus === IcInformationStatus.Error}`;
|
652
749
|
const describedBy = getInputDescribedByText(this.inputId, helperText !== "", hasValidationStatus(this.validationStatus, this.disabled)).trim();
|
@@ -654,6 +751,7 @@ const Select = class {
|
|
654
751
|
if (showLeftIcon && (disabled || (readonly && !this.value))) {
|
655
752
|
showLeftIcon = false;
|
656
753
|
}
|
754
|
+
const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
|
657
755
|
return (h(Host, { class: {
|
658
756
|
["ic-select-disabled"]: disabled,
|
659
757
|
["ic-select-searchable"]: searchable,
|
@@ -662,14 +760,19 @@ const Select = class {
|
|
662
760
|
}, onBlur: this.onBlur }, h("ic-input-container", { readonly: readonly }, !hideLabel && (h("ic-input-label", { for: this.inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly })), h("ic-input-component-container", { ref: (el) => (this.anchorEl = el), class: { "menu-open": this.open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, showLeftIcon && (h("span", { slot: "left-icon", class: {
|
663
761
|
["readonly"]: readonly,
|
664
762
|
["has-value"]: !!this.value,
|
665
|
-
} }, h("slot", { name: "icon" }))), readonly ? (h("ic-typography", null, h("p", null,
|
763
|
+
} }, h("slot", { name: "icon" }))), readonly ? (h("ic-typography", null, h("p", null, multiple
|
764
|
+
? this.getMultipleOptionsString(currValue)
|
765
|
+
: this.getLabelFromValue(currValue)))) : isMobileOrTablet() && !multiple ? (h("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: this.inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.handleNativeSelectKeyDown, form: this.form }, this.inheritedAttributes), h("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => {
|
666
766
|
if (option.children) {
|
667
767
|
return (h("optgroup", { label: option.label }, option.children.map((option) => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label)))));
|
668
768
|
}
|
669
769
|
else {
|
670
770
|
return (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
|
671
771
|
}
|
672
|
-
}))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class:
|
772
|
+
}))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
|
773
|
+
"select-input": true,
|
774
|
+
"with-clear-button": !!this.searchableSelectInputValue,
|
775
|
+
}, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": this.ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": `${this.open}`, "aria-invalid": invalid, "aria-required": `${required}`, "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: this.inputId, value: this.searchableSelectInputValue, placeholder: placeholder, disabled: disabled, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, form: this.form }), this.searchableSelectInputValue &&
|
673
776
|
(showClearButton || searchable) && (h("div", { class: "clear-button-container" }, h("ic-button", { id: "clear-button", ref: (el) => (this.clearButton = el), "aria-label": this.searchableSelectInputValue && currValue === null
|
674
777
|
? "Clear input"
|
675
778
|
: "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
|
@@ -677,17 +780,22 @@ const Select = class {
|
|
677
780
|
: IcThemeForegroundEnum.Dark }), h("div", { class: "divider" }))), h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
|
678
781
|
"expand-icon": true,
|
679
782
|
"expand-icon-open": this.open,
|
680
|
-
|
681
|
-
|
783
|
+
}, 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: this.inputId, "aria-label": `${label}, ${(multiple && currValue
|
784
|
+
? `${optionsSelectedCount}, ${this.getMultipleOptionsString(currValue)}`
|
785
|
+
: this.getLabelFromValue(currValue)) ||
|
786
|
+
placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded": this.open ? "true" : "false", "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: {
|
682
787
|
"value-text": true,
|
683
|
-
|
684
|
-
|
788
|
+
"with-clear-button": currValue && showClearButton,
|
789
|
+
placeholder: !this.value || (multiple && this.value.length < 1),
|
790
|
+
} }, (multiple
|
791
|
+
? this.getMultipleOptionsString(currValue)
|
792
|
+
: this.getLabelFromValue(currValue)) ||
|
793
|
+
placeholder), h("div", { class: "select-input-end" }, currValue && showClearButton && (h("div", { class: "divider" })), h("span", { class: {
|
685
794
|
"expand-icon": true,
|
686
795
|
"expand-icon-open": this.open,
|
687
|
-
"expand-icon-filled": !(currValue == null || currValue === ""),
|
688
796
|
}, innerHTML: Expand, "aria-hidden": "true" }))), currValue && showClearButton && (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", appearance: this.clearButtonFocused
|
689
797
|
? IcThemeForegroundEnum.Light
|
690
|
-
: IcThemeForegroundEnum.Dark }))))), !isMobileOrTablet() && (h("ic-menu", { class: {
|
798
|
+
: IcThemeForegroundEnum.Dark }))))), (!isMobileOrTablet() || multiple) && (h("ic-menu", { class: {
|
691
799
|
"no-results": this.loading ||
|
692
800
|
this.hasTimedOut ||
|
693
801
|
(this.noOptions !== null &&
|
@@ -695,7 +803,9 @@ const Select = class {
|
|
695
803
|
this.noOptions[0].label === this.emptyOptionListText),
|
696
804
|
}, ref: (el) => (this.menu = el), inputEl: searchable
|
697
805
|
? this.searchableSelectElement
|
698
|
-
: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: this.open, options: searchable ? this.filteredOptions : this.uniqueOptions, value: currValue, fullWidth: fullWidth, selectOnEnter: this.selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleCustomSelectChange,
|
806
|
+
: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: this.open, options: searchable ? this.filteredOptions : this.uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, selectOnEnter: this.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: this.searchable || multiple || this.selectOnEnter
|
807
|
+
? "manual"
|
808
|
+
: "automatic", closeOnSelect: !multiple })), this.multiple && (h("div", { "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), hasValidationStatus(this.validationStatus, this.disabled) && (h("ic-input-validation", { class: { "menu-open": this.open }, ariaLiveMode: "polite", status: validationStatus, message: validationText, for: this.inputId })))));
|
699
809
|
}
|
700
810
|
static get delegatesFocus() { return true; }
|
701
811
|
get el() { return getElement(this); }
|