@ukic/web-components 3.21.0 → 3.23.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-3a796e7a.js → helpers-81cd6930.js} +3 -16
- package/dist/cjs/helpers-81cd6930.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-action-chip.cjs.entry.js +7 -3
- package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +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 +5 -3
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +7 -3
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +13 -5
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +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-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +212 -80
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +389 -0
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_3.cjs.entry.js +1412 -0
- package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +11 -11
- 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-side-navigation.cjs.entry.js +18 -9
- 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-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +5 -5
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -2
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-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 +8 -7
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/index-d337cd8a.js +12 -16
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ic-action-chip/ic-action-chip.css +15 -2
- package/dist/collection/components/ic-action-chip/ic-action-chip.js +5 -1
- package/dist/collection/components/ic-action-chip/ic-action-chip.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -5
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +15 -3
- package/dist/collection/components/ic-chip/ic-chip.js +5 -1
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +33 -5
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +32 -0
- package/dist/collection/components/ic-menu/ic-menu.css +6 -1
- package/dist/collection/components/ic-menu/ic-menu.js +184 -53
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +104 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +895 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +215 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +10 -11
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.css +1 -2
- package/dist/collection/components/ic-select/ic-select.js +414 -589
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.types.js +2 -0
- package/dist/collection/components/ic-select/ic-select.types.js.map +1 -0
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +26 -21
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +18 -9
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- 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-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.js +4 -4
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -2
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +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-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.js +7 -6
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +21 -2
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +32 -0
- package/dist/collection/utils/helpers.js +2 -15
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +3 -16
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-action-chip.js +6 -2
- package/dist/components/ic-action-chip.js.map +1 -1
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox.js +4 -4
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +6 -2
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +14 -5
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-menu2.js +213 -79
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar.d.ts +11 -0
- package/dist/components/ic-pagination-bar.js +523 -0
- package/dist/components/ic-pagination-bar.js.map +1 -0
- package/dist/components/ic-pagination.js +1 -375
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/{esm/ic-pagination.entry.js → components/ic-pagination2.js} +82 -11
- package/dist/components/ic-pagination2.js.map +1 -0
- package/dist/components/ic-popover-menu.js +4 -4
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +11 -11
- 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 +1 -994
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-select2.js +804 -0
- package/dist/components/ic-select2.js.map +1 -0
- package/dist/components/ic-side-navigation.js +18 -9
- 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-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +4 -4
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +1 -2
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-text-field.js +1 -528
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/{esm/ic-text-field.entry.js → components/ic-text-field2.js} +114 -11
- package/dist/components/ic-text-field2.js.map +1 -0
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +7 -6
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +2 -2
- package/dist/components/ic-tooltip2.js +5 -3
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-0a24c536.entry.js → p-05fd2707.entry.js} +2 -2
- package/dist/core/{p-85e15d01.entry.js → p-09505807.entry.js} +2 -2
- package/dist/core/{p-96bc7d24.entry.js → p-09caf7ed.entry.js} +2 -2
- package/dist/core/p-09caf7ed.entry.js.map +1 -0
- package/dist/core/p-0fb7f915.entry.js +2 -0
- package/dist/core/p-0fb7f915.entry.js.map +1 -0
- package/dist/core/{p-41a5da12.entry.js → p-1b81ec88.entry.js} +2 -2
- package/dist/core/p-1b81ec88.entry.js.map +1 -0
- package/dist/core/{p-99951365.entry.js → p-2691cc80.entry.js} +2 -2
- package/dist/core/{p-94916588.entry.js → p-2a124daf.entry.js} +2 -2
- package/dist/core/{p-04c77b2d.entry.js → p-2b87c592.entry.js} +2 -2
- package/dist/core/{p-4aa56990.entry.js → p-2bd80913.entry.js} +2 -2
- package/dist/core/{p-aed1c7e7.entry.js → p-347cc084.entry.js} +2 -2
- package/dist/core/p-393af2bc.entry.js +2 -0
- package/dist/core/p-393af2bc.entry.js.map +1 -0
- package/dist/core/{p-a3dea729.entry.js → p-3aed13ba.entry.js} +2 -2
- package/dist/core/{p-8da90b72.entry.js → p-46fd555f.entry.js} +2 -2
- package/dist/core/{p-43cc0f1d.entry.js → p-48a628f0.entry.js} +2 -2
- package/dist/core/{p-9a4e067f.entry.js → p-4f56acff.entry.js} +2 -2
- package/dist/core/{p-3021290f.entry.js → p-506d428a.entry.js} +2 -2
- package/dist/core/{p-a1b2f483.entry.js → p-50dca790.entry.js} +2 -2
- package/dist/core/p-53ab3c0f.entry.js +2 -0
- package/dist/core/p-53ab3c0f.entry.js.map +1 -0
- package/dist/core/{p-feef7c2c.entry.js → p-56de4f4b.entry.js} +2 -2
- package/dist/core/{p-b4e322fe.entry.js → p-5900cb65.entry.js} +2 -2
- package/dist/core/{p-78a54069.entry.js → p-5976de6e.entry.js} +2 -2
- package/dist/core/{p-2af89564.entry.js → p-61d79fc6.entry.js} +2 -2
- package/dist/core/{p-2af89564.entry.js.map → p-61d79fc6.entry.js.map} +1 -1
- package/dist/core/p-659d048d.entry.js +2 -0
- package/dist/core/{p-1edf2689.entry.js → p-67de1290.entry.js} +2 -2
- package/dist/core/p-6b4ec95f.entry.js +3 -0
- package/dist/core/p-6b4ec95f.entry.js.map +1 -0
- package/dist/core/{p-f700b759.entry.js → p-73043f57.entry.js} +2 -2
- package/dist/core/{p-7b8e5926.entry.js → p-735d3096.entry.js} +2 -2
- package/dist/core/{p-07075461.entry.js → p-7b538fd1.entry.js} +2 -2
- package/dist/core/{p-cfd43558.entry.js → p-80d85403.entry.js} +2 -2
- package/dist/core/{p-7f279c8a.entry.js → p-83578f1d.entry.js} +2 -2
- package/dist/core/{p-7f279c8a.entry.js.map → p-83578f1d.entry.js.map} +1 -1
- package/dist/core/{p-b8c0c142.entry.js → p-880f7548.entry.js} +2 -2
- package/dist/core/p-880f7548.entry.js.map +1 -0
- package/dist/core/{p-79949920.entry.js → p-8a833e82.entry.js} +2 -2
- package/dist/core/{p-0aba9e31.entry.js → p-90678e67.entry.js} +2 -2
- package/dist/core/{p-a851eb65.entry.js → p-9502fb86.entry.js} +2 -2
- package/dist/core/{p-2ca7f050.entry.js → p-99433296.entry.js} +2 -2
- package/dist/core/p-99433296.entry.js.map +1 -0
- package/dist/core/{p-f6de08fb.entry.js → p-9c2b2cb9.entry.js} +2 -2
- package/dist/core/{p-949d08d3.entry.js → p-9cb83a2e.entry.js} +2 -2
- package/dist/core/{p-f0ecb80b.entry.js → p-a08d6b46.entry.js} +2 -2
- package/dist/core/{p-9057a186.entry.js → p-a2953aad.entry.js} +2 -2
- package/dist/core/p-a2953aad.entry.js.map +1 -0
- package/dist/core/p-a321feee.entry.js +2 -0
- package/dist/core/p-a321feee.entry.js.map +1 -0
- package/dist/core/{p-208f470f.entry.js → p-a780a34b.entry.js} +2 -2
- package/dist/core/{p-387b7bca.entry.js → p-aad03a3c.entry.js} +2 -2
- package/dist/core/{p-ec14c783.entry.js → p-aaf4e367.entry.js} +2 -2
- package/dist/core/{p-707ae6e9.entry.js → p-b52c44eb.entry.js} +2 -2
- package/dist/core/{p-716e7eaf.entry.js → p-b777f0a1.entry.js} +2 -2
- package/dist/core/p-b777f0a1.entry.js.map +1 -0
- package/dist/core/p-b77b1e1f.js +2 -0
- package/dist/core/p-b77b1e1f.js.map +1 -0
- package/dist/core/{p-780babc0.entry.js → p-b997ad5e.entry.js} +2 -2
- package/dist/core/{p-a0af1b0a.entry.js → p-bb7652cd.entry.js} +2 -2
- package/dist/core/{p-ded4cd76.entry.js → p-cbca04bb.entry.js} +2 -2
- package/dist/core/{p-99687bce.entry.js → p-cc64e5ef.entry.js} +2 -2
- package/dist/core/{p-812c5e61.entry.js → p-cfbacca1.entry.js} +2 -2
- package/dist/core/{p-0da2caa2.entry.js → p-daec7e69.entry.js} +2 -2
- package/dist/core/{p-1590fd69.entry.js → p-e7767c0d.entry.js} +2 -2
- package/dist/core/p-e938eb31.entry.js +2 -0
- package/dist/core/p-e938eb31.entry.js.map +1 -0
- package/dist/core/{p-dce11b9d.entry.js → p-ea7a3d30.entry.js} +2 -2
- package/dist/core/{p-880afd4b.entry.js → p-ebd688b9.entry.js} +2 -2
- package/dist/core/p-ebd688b9.entry.js.map +1 -0
- package/dist/core/{p-a674b13b.entry.js → p-ef70ea50.entry.js} +2 -2
- package/dist/core/{p-d25d0aad.entry.js → p-f64996f1.entry.js} +2 -2
- package/dist/core/{p-db17a793.entry.js → p-f661ba76.entry.js} +2 -2
- package/dist/core/{p-a03bb31c.entry.js → p-f84ac9c6.entry.js} +2 -2
- package/dist/core/{p-f3406b42.entry.js → p-fb9376f0.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-0f85537f.js → helpers-66681c73.js} +4 -17
- package/dist/esm/helpers-66681c73.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-action-chip.entry.js +7 -3
- package/dist/esm/ic-action-chip.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +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 +5 -3
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -5
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +7 -3
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +13 -5
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +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-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +212 -80
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/ic-pagination-bar.entry.js +385 -0
- package/dist/esm/ic-pagination-bar.entry.js.map +1 -0
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination_3.entry.js +1406 -0
- package/dist/esm/ic-pagination_3.entry.js.map +1 -0
- package/dist/esm/ic-popover-menu.entry.js +5 -5
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +11 -11
- 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-side-navigation.entry.js +18 -9
- 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-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +5 -5
- package/dist/esm/ic-tab-context.entry.js +1 -2
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -3
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +8 -7
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +3 -3
- package/dist/esm/ic-toggle-button.entry.js +3 -3
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/index-a7a720e7.js +12 -16
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-classification-banner/ic-classification-banner.d.ts +4 -0
- package/dist/types/components/ic-menu/ic-menu.d.ts +11 -1
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +162 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +8 -0
- package/dist/types/components/ic-select/ic-select.d.ts +53 -80
- package/dist/types/components/ic-select/ic-select.types.d.ts +43 -0
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -2
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +253 -5
- package/dist/types/utils/helpers.d.ts +2 -4
- package/hydrate/index.js +1145 -773
- package/hydrate/index.mjs +1145 -773
- package/package.json +2 -2
- package/vscode-data.json +131 -0
- package/dist/cjs/helpers-3a796e7a.js.map +0 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +0 -312
- package/dist/cjs/ic-pagination.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-select.cjs.entry.js +0 -879
- package/dist/cjs/ic-select.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +0 -433
- package/dist/cjs/ic-text-field.cjs.entry.js.map +0 -1
- package/dist/core/p-0d7fd892.entry.js +0 -2
- package/dist/core/p-29b61bb5.entry.js +0 -3
- package/dist/core/p-29b61bb5.entry.js.map +0 -1
- package/dist/core/p-2ca7f050.entry.js.map +0 -1
- package/dist/core/p-41a5da12.entry.js.map +0 -1
- package/dist/core/p-4aadabc8.entry.js +0 -2
- package/dist/core/p-4aadabc8.entry.js.map +0 -1
- package/dist/core/p-716e7eaf.entry.js.map +0 -1
- package/dist/core/p-808e1ef5.entry.js +0 -2
- package/dist/core/p-808e1ef5.entry.js.map +0 -1
- package/dist/core/p-880afd4b.entry.js.map +0 -1
- package/dist/core/p-8fe4e0ad.entry.js +0 -2
- package/dist/core/p-8fe4e0ad.entry.js.map +0 -1
- package/dist/core/p-9057a186.entry.js.map +0 -1
- package/dist/core/p-96bc7d24.entry.js.map +0 -1
- package/dist/core/p-b8c0c142.entry.js.map +0 -1
- package/dist/core/p-c5b9519d.entry.js +0 -2
- package/dist/core/p-c5b9519d.entry.js.map +0 -1
- package/dist/core/p-d1730d4d.entry.js +0 -2
- package/dist/core/p-d1730d4d.entry.js.map +0 -1
- package/dist/core/p-dbc8bf0c.js +0 -2
- package/dist/core/p-dbc8bf0c.js.map +0 -1
- package/dist/core/p-fdb587ab.entry.js +0 -2
- package/dist/core/p-fdb587ab.entry.js.map +0 -1
- package/dist/esm/helpers-0f85537f.js.map +0 -1
- package/dist/esm/ic-pagination.entry.js.map +0 -1
- package/dist/esm/ic-select.entry.js +0 -875
- package/dist/esm/ic-select.entry.js.map +0 -1
- package/dist/esm/ic-text-field.entry.js.map +0 -1
- /package/dist/core/{p-0a24c536.entry.js.map → p-05fd2707.entry.js.map} +0 -0
- /package/dist/core/{p-85e15d01.entry.js.map → p-09505807.entry.js.map} +0 -0
- /package/dist/core/{p-99951365.entry.js.map → p-2691cc80.entry.js.map} +0 -0
- /package/dist/core/{p-94916588.entry.js.map → p-2a124daf.entry.js.map} +0 -0
- /package/dist/core/{p-04c77b2d.entry.js.map → p-2b87c592.entry.js.map} +0 -0
- /package/dist/core/{p-4aa56990.entry.js.map → p-2bd80913.entry.js.map} +0 -0
- /package/dist/core/{p-aed1c7e7.entry.js.map → p-347cc084.entry.js.map} +0 -0
- /package/dist/core/{p-a3dea729.entry.js.map → p-3aed13ba.entry.js.map} +0 -0
- /package/dist/core/{p-8da90b72.entry.js.map → p-46fd555f.entry.js.map} +0 -0
- /package/dist/core/{p-43cc0f1d.entry.js.map → p-48a628f0.entry.js.map} +0 -0
- /package/dist/core/{p-9a4e067f.entry.js.map → p-4f56acff.entry.js.map} +0 -0
- /package/dist/core/{p-3021290f.entry.js.map → p-506d428a.entry.js.map} +0 -0
- /package/dist/core/{p-a1b2f483.entry.js.map → p-50dca790.entry.js.map} +0 -0
- /package/dist/core/{p-feef7c2c.entry.js.map → p-56de4f4b.entry.js.map} +0 -0
- /package/dist/core/{p-b4e322fe.entry.js.map → p-5900cb65.entry.js.map} +0 -0
- /package/dist/core/{p-78a54069.entry.js.map → p-5976de6e.entry.js.map} +0 -0
- /package/dist/core/{p-0d7fd892.entry.js.map → p-659d048d.entry.js.map} +0 -0
- /package/dist/core/{p-1edf2689.entry.js.map → p-67de1290.entry.js.map} +0 -0
- /package/dist/core/{p-f700b759.entry.js.map → p-73043f57.entry.js.map} +0 -0
- /package/dist/core/{p-7b8e5926.entry.js.map → p-735d3096.entry.js.map} +0 -0
- /package/dist/core/{p-07075461.entry.js.map → p-7b538fd1.entry.js.map} +0 -0
- /package/dist/core/{p-cfd43558.entry.js.map → p-80d85403.entry.js.map} +0 -0
- /package/dist/core/{p-79949920.entry.js.map → p-8a833e82.entry.js.map} +0 -0
- /package/dist/core/{p-0aba9e31.entry.js.map → p-90678e67.entry.js.map} +0 -0
- /package/dist/core/{p-a851eb65.entry.js.map → p-9502fb86.entry.js.map} +0 -0
- /package/dist/core/{p-f6de08fb.entry.js.map → p-9c2b2cb9.entry.js.map} +0 -0
- /package/dist/core/{p-949d08d3.entry.js.map → p-9cb83a2e.entry.js.map} +0 -0
- /package/dist/core/{p-f0ecb80b.entry.js.map → p-a08d6b46.entry.js.map} +0 -0
- /package/dist/core/{p-208f470f.entry.js.map → p-a780a34b.entry.js.map} +0 -0
- /package/dist/core/{p-387b7bca.entry.js.map → p-aad03a3c.entry.js.map} +0 -0
- /package/dist/core/{p-ec14c783.entry.js.map → p-aaf4e367.entry.js.map} +0 -0
- /package/dist/core/{p-707ae6e9.entry.js.map → p-b52c44eb.entry.js.map} +0 -0
- /package/dist/core/{p-780babc0.entry.js.map → p-b997ad5e.entry.js.map} +0 -0
- /package/dist/core/{p-a0af1b0a.entry.js.map → p-bb7652cd.entry.js.map} +0 -0
- /package/dist/core/{p-ded4cd76.entry.js.map → p-cbca04bb.entry.js.map} +0 -0
- /package/dist/core/{p-99687bce.entry.js.map → p-cc64e5ef.entry.js.map} +0 -0
- /package/dist/core/{p-812c5e61.entry.js.map → p-cfbacca1.entry.js.map} +0 -0
- /package/dist/core/{p-0da2caa2.entry.js.map → p-daec7e69.entry.js.map} +0 -0
- /package/dist/core/{p-1590fd69.entry.js.map → p-e7767c0d.entry.js.map} +0 -0
- /package/dist/core/{p-dce11b9d.entry.js.map → p-ea7a3d30.entry.js.map} +0 -0
- /package/dist/core/{p-a674b13b.entry.js.map → p-ef70ea50.entry.js.map} +0 -0
- /package/dist/core/{p-d25d0aad.entry.js.map → p-f64996f1.entry.js.map} +0 -0
- /package/dist/core/{p-db17a793.entry.js.map → p-f661ba76.entry.js.map} +0 -0
- /package/dist/core/{p-a03bb31c.entry.js.map → p-f84ac9c6.entry.js.map} +0 -0
- /package/dist/core/{p-f3406b42.entry.js.map → p-fb9376f0.entry.js.map} +0 -0
|
@@ -3,7 +3,6 @@ import { createPopper, } from "@popperjs/core";
|
|
|
3
3
|
import Check from "../../assets/check-icon.svg";
|
|
4
4
|
import { getOptionsWithoutGroupTitlesCount, isMacDevice, onComponentRequiredPropUndefined, } from "../../utils/helpers";
|
|
5
5
|
import { sanitizeHTMLString, sanitizeHTMLIconString, } from "../../utils/common-helpers";
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
6
|
export class Menu {
|
|
8
7
|
constructor() {
|
|
9
8
|
this.ACTIVE_DESCENDANT = "aria-activedescendant";
|
|
@@ -73,6 +72,30 @@ export class Menu {
|
|
|
73
72
|
* The custom name for the value field for IcMenuOption.
|
|
74
73
|
*/
|
|
75
74
|
this.valueField = "value";
|
|
75
|
+
/**
|
|
76
|
+
* @internal If `true`, allows the menu to receive focus when opened.
|
|
77
|
+
*/
|
|
78
|
+
this.allowMenuFocus = true;
|
|
79
|
+
this.emitOptionId = (index) => {
|
|
80
|
+
let option;
|
|
81
|
+
if (index >= 0 && index < this.ungroupedOptions.length) {
|
|
82
|
+
option = this.ungroupedOptions[index];
|
|
83
|
+
}
|
|
84
|
+
else if (this.ungroupedOptions.length > 0) {
|
|
85
|
+
option =
|
|
86
|
+
index < 0
|
|
87
|
+
? this.ungroupedOptions[this.ungroupedOptions.length - 1]
|
|
88
|
+
: this.ungroupedOptions[0];
|
|
89
|
+
}
|
|
90
|
+
if (option) {
|
|
91
|
+
this.menuOptionId.emit({
|
|
92
|
+
optionId: this.getOptionId(option[this.valueField]),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this.menuOptionId.emit({ optionId: undefined });
|
|
97
|
+
}
|
|
98
|
+
};
|
|
76
99
|
this.handleClearListener = () => {
|
|
77
100
|
this.optionHighlighted = "";
|
|
78
101
|
};
|
|
@@ -85,7 +108,9 @@ export class Menu {
|
|
|
85
108
|
this.menuStateChange.emit({ open, focusInput });
|
|
86
109
|
if (!open) {
|
|
87
110
|
if (focusInput !== false) {
|
|
88
|
-
(
|
|
111
|
+
if (this.allowMenuFocus) {
|
|
112
|
+
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
113
|
+
}
|
|
89
114
|
this.preventClickOpen = false;
|
|
90
115
|
}
|
|
91
116
|
// Reset optionHighlighted so previously highlighted option doesn't get reselected when Enter pressed
|
|
@@ -144,16 +169,42 @@ export class Menu {
|
|
|
144
169
|
const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
|
|
145
170
|
this.keyboardNav = false;
|
|
146
171
|
switch (event.key) {
|
|
147
|
-
case "ArrowDown":
|
|
172
|
+
case "ArrowDown": {
|
|
148
173
|
this.keyboardNav = true;
|
|
149
174
|
this.arrowBehaviour(event);
|
|
175
|
+
const nextIndex = selectedOptionIndex < this.ungroupedOptions.length - 1
|
|
176
|
+
? selectedOptionIndex + 1
|
|
177
|
+
: 0;
|
|
150
178
|
this.setNextOptionValue(selectedOptionIndex);
|
|
179
|
+
this.emitOptionId(nextIndex);
|
|
151
180
|
break;
|
|
152
|
-
|
|
181
|
+
}
|
|
182
|
+
case "ArrowUp": {
|
|
153
183
|
this.keyboardNav = true;
|
|
154
184
|
this.arrowBehaviour(event);
|
|
185
|
+
const prevIndex = selectedOptionIndex > 0
|
|
186
|
+
? selectedOptionIndex - 1
|
|
187
|
+
: this.ungroupedOptions.length - 1;
|
|
155
188
|
this.setPreviousOptionValue(selectedOptionIndex);
|
|
189
|
+
this.emitOptionId(prevIndex);
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
case "Home": {
|
|
193
|
+
this.keyboardNav = true;
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
this.arrowBehaviour(event);
|
|
196
|
+
this.setNextOptionValue(-1);
|
|
197
|
+
this.emitOptionId(0);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
case "End": {
|
|
201
|
+
this.keyboardNav = true;
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
this.arrowBehaviour(event);
|
|
204
|
+
this.setPreviousOptionValue(this.ungroupedOptions.length);
|
|
205
|
+
this.emitOptionId(this.ungroupedOptions.length - 1);
|
|
156
206
|
break;
|
|
207
|
+
}
|
|
157
208
|
case " ":
|
|
158
209
|
case "Enter":
|
|
159
210
|
if (event.target.id !== this.CLEAR_BUTTON_ID) {
|
|
@@ -353,14 +404,15 @@ export class Menu {
|
|
|
353
404
|
if (this.open) {
|
|
354
405
|
event.stopImmediatePropagation();
|
|
355
406
|
}
|
|
356
|
-
this.handleMenuChange(false);
|
|
407
|
+
this.handleMenuChange(false, !this.allowMenuFocus);
|
|
357
408
|
this.menuOptionId.emit({ optionId: undefined });
|
|
358
409
|
break;
|
|
359
410
|
case "a":
|
|
360
411
|
// Checks if Cmd (meta) key is pressed if Mac device (while excluding meta key on Windows)
|
|
361
412
|
// Otherwise, if a different OS, checks Ctrl key
|
|
362
|
-
if (
|
|
363
|
-
(
|
|
413
|
+
if (this.multiSelect &&
|
|
414
|
+
((isMacDevice() && event.metaKey) ||
|
|
415
|
+
(!isMacDevice() && event.ctrlKey))) {
|
|
364
416
|
this.emitSelectAllEvents();
|
|
365
417
|
this.lastOptionFocused = null;
|
|
366
418
|
this.lastOptionSelected = null;
|
|
@@ -465,14 +517,6 @@ export class Menu {
|
|
|
465
517
|
this.handleMouseDown = (event) => {
|
|
466
518
|
event.preventDefault();
|
|
467
519
|
};
|
|
468
|
-
this.handleMenuKeyDown = (event) => {
|
|
469
|
-
if (this.activationType === "automatic") {
|
|
470
|
-
this.autoSetValueOnMenuKeyDown(event);
|
|
471
|
-
}
|
|
472
|
-
else if (this.activationType === "manual" && !this.searchBar) {
|
|
473
|
-
this.manualSetInputValueKeyboardOpen(event);
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
520
|
this.handleMenuKeyUp = (event) => {
|
|
477
521
|
if (event.key === "Tab" && event.shiftKey) {
|
|
478
522
|
this.preventClickOpen = false;
|
|
@@ -488,15 +532,19 @@ export class Menu {
|
|
|
488
532
|
this.handleSelectAllClick = () => {
|
|
489
533
|
var _a;
|
|
490
534
|
this.keyboardNav = false;
|
|
491
|
-
(
|
|
535
|
+
if (this.allowMenuFocus) {
|
|
536
|
+
(_a = this.menu) === null || _a === void 0 ? void 0 : _a.focus();
|
|
537
|
+
}
|
|
492
538
|
this.emitSelectAllEvents();
|
|
493
539
|
this.lastOptionFocused = null;
|
|
494
540
|
this.lastOptionSelected = null;
|
|
495
541
|
};
|
|
496
542
|
this.handleSelectAllBlur = (event) => {
|
|
497
|
-
var _a;
|
|
543
|
+
var _a, _b, _c;
|
|
498
544
|
this.host.classList.remove("ic-select-select-all-focused");
|
|
499
|
-
|
|
545
|
+
const relatedTarget = event.relatedTarget;
|
|
546
|
+
if (!((_a = this.menu) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget)) &&
|
|
547
|
+
!((_c = (_b = this.parentEl) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.contains(relatedTarget))) {
|
|
500
548
|
this.handleMenuChange(false, false);
|
|
501
549
|
}
|
|
502
550
|
};
|
|
@@ -580,7 +628,7 @@ export class Menu {
|
|
|
580
628
|
// (i.e. you don't have to press Enter select an option - just focus on it)
|
|
581
629
|
// and menu is focused
|
|
582
630
|
this.autoSetValueOnMenuKeyDown = (event) => {
|
|
583
|
-
var _a
|
|
631
|
+
var _a;
|
|
584
632
|
event.cancelBubble = true;
|
|
585
633
|
const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
|
|
586
634
|
const isSearchableSelect = !!this.inputEl && this.inputEl.tagName === "INPUT";
|
|
@@ -593,6 +641,9 @@ export class Menu {
|
|
|
593
641
|
if (!this.hasTimedOut) {
|
|
594
642
|
event.preventDefault();
|
|
595
643
|
this.setPreviousOptionValue(selectedOptionIndex);
|
|
644
|
+
this.emitOptionId(selectedOptionIndex > 0
|
|
645
|
+
? selectedOptionIndex - 1
|
|
646
|
+
: this.ungroupedOptions.length - 1);
|
|
596
647
|
this.keyboardNav = true;
|
|
597
648
|
}
|
|
598
649
|
break;
|
|
@@ -600,6 +651,9 @@ export class Menu {
|
|
|
600
651
|
if (!this.hasTimedOut) {
|
|
601
652
|
event.preventDefault();
|
|
602
653
|
this.setNextOptionValue(selectedOptionIndex);
|
|
654
|
+
this.emitOptionId(selectedOptionIndex < this.ungroupedOptions.length - 1
|
|
655
|
+
? selectedOptionIndex + 1
|
|
656
|
+
: 0);
|
|
603
657
|
this.keyboardNav = true;
|
|
604
658
|
}
|
|
605
659
|
break;
|
|
@@ -607,30 +661,29 @@ export class Menu {
|
|
|
607
661
|
this.menuOptionSelect.emit({
|
|
608
662
|
value: this.ungroupedOptions[0][this.valueField],
|
|
609
663
|
});
|
|
664
|
+
this.emitOptionId(0);
|
|
610
665
|
this.keyboardNav = true;
|
|
611
666
|
break;
|
|
612
667
|
case "End":
|
|
613
668
|
this.menuOptionSelect.emit({
|
|
614
669
|
value: this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField],
|
|
615
670
|
});
|
|
671
|
+
this.emitOptionId(this.ungroupedOptions.length - 1);
|
|
616
672
|
this.keyboardNav = true;
|
|
617
673
|
break;
|
|
618
674
|
case "Enter":
|
|
619
675
|
!this.hasTimedOut && this.handleMenuChange(false);
|
|
620
676
|
break;
|
|
621
677
|
case "Escape":
|
|
622
|
-
this.handleMenuChange(false);
|
|
678
|
+
this.handleMenuChange(false, !this.allowMenuFocus);
|
|
623
679
|
break;
|
|
624
680
|
case "Backspace":
|
|
625
|
-
if (isSearchableSelect) {
|
|
626
|
-
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
627
|
-
}
|
|
628
681
|
break;
|
|
629
682
|
case "Shift":
|
|
630
683
|
break;
|
|
631
684
|
default:
|
|
632
685
|
if (isSearchableSelect && event.key !== "Tab" && !this.hasTimedOut) {
|
|
633
|
-
(
|
|
686
|
+
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
634
687
|
}
|
|
635
688
|
if (event.key.length === 1) {
|
|
636
689
|
this.keyboardNav = true;
|
|
@@ -669,21 +722,28 @@ export class Menu {
|
|
|
669
722
|
return menuOptions.findIndex((option) => option[this.valueField] === this.optionHighlighted);
|
|
670
723
|
};
|
|
671
724
|
this.isManualMode = this.activationType === "manual";
|
|
672
|
-
|
|
725
|
+
// Scroll to highlighted option, or selected option if no highlighted option (i.e. when the menu opens)
|
|
726
|
+
this.scrollToSelected = () => {
|
|
673
727
|
var _a;
|
|
674
|
-
const
|
|
728
|
+
const menu = this.menu;
|
|
729
|
+
const selectedOption = this.selectOnEnter || this.searchableSelect || this.multiSelect
|
|
675
730
|
? this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`)
|
|
676
731
|
: menu.querySelector(".option[aria-selected='true']");
|
|
677
732
|
if (selectedOption) {
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
menu.scrollTop
|
|
733
|
+
const menuRect = menu.getBoundingClientRect();
|
|
734
|
+
const optionRect = selectedOption.getBoundingClientRect();
|
|
735
|
+
if (optionRect.top < menuRect.top) {
|
|
736
|
+
menu.scrollTop -= menuRect.top - optionRect.top;
|
|
737
|
+
}
|
|
738
|
+
else if (optionRect.bottom > menuRect.bottom) {
|
|
739
|
+
menu.scrollTop += optionRect.bottom - menuRect.bottom;
|
|
682
740
|
}
|
|
683
741
|
// 'aria-activedescendant' affects screen reader focus
|
|
684
742
|
// https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/#kbd_focus_activedescendant
|
|
685
743
|
(_a = this.menu) === null || _a === void 0 ? void 0 : _a.setAttribute(this.ACTIVE_DESCENDANT, selectedOption.id);
|
|
686
|
-
|
|
744
|
+
if (this.allowMenuFocus) {
|
|
745
|
+
selectedOption.focus();
|
|
746
|
+
}
|
|
687
747
|
}
|
|
688
748
|
};
|
|
689
749
|
// Set 'ungroupedOptions' variable and emit its value
|
|
@@ -726,7 +786,7 @@ export class Menu {
|
|
|
726
786
|
"show-check-icon": showCheckIcon,
|
|
727
787
|
} }, (option.icon || !option.hideLabel) && (h("div", { class: "option-label" }, option.icon && (h("div", { class: "option-icon", innerHTML: sanitizeHTMLIconString(option.icon), "aria-hidden": "true" })), !option.hideLabel && (h("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])))), option.description && (h("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, h("p", null, option.description))), option.element && (h("div", { class: {
|
|
728
788
|
"option-element": option.icon || !option.hideLabel || option.description,
|
|
729
|
-
}, innerHTML: sanitizeHTMLString(option.element.component), "aria-hidden": "true" }))), showCheckIcon && h("span", { class: "check-icon", innerHTML: Check })));
|
|
789
|
+
}, innerHTML: sanitizeHTMLString(option.element.component), "aria-hidden": "true" }))), showCheckIcon && (h("span", { class: "check-icon", innerHTML: Check, "aria-hidden": "true" }))));
|
|
730
790
|
};
|
|
731
791
|
this.displayOption = (option, selected, index, parentOption) => {
|
|
732
792
|
var _a;
|
|
@@ -743,11 +803,13 @@ export class Menu {
|
|
|
743
803
|
"disabled-option": !!option.disabled,
|
|
744
804
|
"loading-option": !!option.loading,
|
|
745
805
|
timeout: !!option.timedOut,
|
|
746
|
-
}, role: "option", tabindex:
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
806
|
+
}, role: "option", tabindex: !this.allowMenuFocus
|
|
807
|
+
? "-1"
|
|
808
|
+
: open &&
|
|
809
|
+
(selected || option[this.valueField] === optionHighlighted) &&
|
|
810
|
+
keyboardNav
|
|
811
|
+
? "0"
|
|
812
|
+
: "-1", "aria-label": this.getOptionAriaLabel(option, parentOption), "aria-selected": selected ? "true" : "false", "aria-disabled": option.disabled ? "true" : "false", onClick: !option.timedOut && !option.loading
|
|
751
813
|
? this.handleOptionClick
|
|
752
814
|
: undefined, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, "data-value": option[this.valueField], "data-label": option[this.labelField] }, ((_a = option.htmlProps) !== null && _a !== void 0 ? _a : {})), option.timedOut ? (h(Fragment, null, h("div", { class: "loading-error-info" }, h("svg", { class: "error-icon-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#000000" }, h("title", null, "Error"), h("g", null, h("path", { d: "M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" }))), h("ic-typography", { variant: "label" }, option[this.labelField])), h("ic-button", { size: "small", variant: "tertiary", onClick: this.handleRetry, onKeyDown: this.handleRetryKeyDown, onBlur: this.handleTimeoutBlur, id: "retry-button" }, "Retry"))) : (this.optionContent(option, selected))));
|
|
753
815
|
};
|
|
@@ -809,10 +871,7 @@ export class Menu {
|
|
|
809
871
|
inputValueInOptions &&
|
|
810
872
|
this.autofocusOnSelected &&
|
|
811
873
|
!this.searchableSelect) {
|
|
812
|
-
this.scrollToSelected(
|
|
813
|
-
}
|
|
814
|
-
else if (this.selectOnEnter) {
|
|
815
|
-
this.menu.focus();
|
|
874
|
+
this.scrollToSelected();
|
|
816
875
|
}
|
|
817
876
|
else if (!!this.optionHighlighted &&
|
|
818
877
|
!this.focusFromSearchKeypress &&
|
|
@@ -820,15 +879,19 @@ export class Menu {
|
|
|
820
879
|
const highlightedEl = this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);
|
|
821
880
|
if (highlightedEl) {
|
|
822
881
|
this.menu.setAttribute(this.ACTIVE_DESCENDANT, highlightedEl.id);
|
|
823
|
-
|
|
882
|
+
if (this.allowMenuFocus) {
|
|
883
|
+
highlightedEl.focus();
|
|
884
|
+
}
|
|
824
885
|
}
|
|
825
886
|
}
|
|
826
|
-
else if (this.inputEl &&
|
|
887
|
+
else if (this.inputEl &&
|
|
888
|
+
this.inputEl.tagName !== "INPUT" &&
|
|
889
|
+
this.allowMenuFocus) {
|
|
827
890
|
this.menu.focus();
|
|
828
891
|
}
|
|
829
892
|
}
|
|
830
|
-
if (this.menu && this.open
|
|
831
|
-
this.scrollToSelected(
|
|
893
|
+
if (this.menu && this.open) {
|
|
894
|
+
this.scrollToSelected();
|
|
832
895
|
}
|
|
833
896
|
this.preventMenuFocus = false;
|
|
834
897
|
}
|
|
@@ -863,6 +926,19 @@ export class Menu {
|
|
|
863
926
|
this.manualSetInputValueKeyboardOpen(event);
|
|
864
927
|
}
|
|
865
928
|
}
|
|
929
|
+
/**
|
|
930
|
+
* Used alongside activationType
|
|
931
|
+
* If menu is open and user navigates options via keyboard, emit optionSelect custom event.
|
|
932
|
+
* @param {KeyboardEvent} event The keyboard event which is available when handleMenuKeydown is invoked.
|
|
933
|
+
*/
|
|
934
|
+
async handleMenuKeyDown(event) {
|
|
935
|
+
if (this.activationType === "automatic") {
|
|
936
|
+
this.autoSetValueOnMenuKeyDown(event);
|
|
937
|
+
}
|
|
938
|
+
else if (this.activationType === "manual" && !this.searchBar) {
|
|
939
|
+
this.manualSetInputValueKeyboardOpen(event);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
866
942
|
/**
|
|
867
943
|
* @internal Used to highlight the first option in the menu.
|
|
868
944
|
*/
|
|
@@ -916,7 +992,7 @@ export class Menu {
|
|
|
916
992
|
const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, parentEl, SEARCH_BAR_TAG, multiSelect, } = this;
|
|
917
993
|
const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
|
|
918
994
|
const hasNoResults = this.host.classList.contains("no-results");
|
|
919
|
-
return (h(Host, { key: '
|
|
995
|
+
return (h(Host, { key: '8b0e06f14c1979c3658e6e13fca3e4c6828c795d', class: {
|
|
920
996
|
"ic-menu-full-width": !!fullWidth,
|
|
921
997
|
"ic-menu-no-focus": ((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" &&
|
|
922
998
|
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) !== SEARCH_BAR_TAG) ||
|
|
@@ -925,12 +1001,16 @@ export class Menu {
|
|
|
925
1001
|
[`ic-menu-${size}`]: true,
|
|
926
1002
|
"ic-menu-open": open && options.length !== 0,
|
|
927
1003
|
"ic-menu-multiple": multiSelect,
|
|
928
|
-
} }, options.length !== 0 && (h("ul", { key: '
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1004
|
+
} }, options.length !== 0 && (h("ul", { key: '5af8ebaf798f09d020cab17adf4ef04e0fe2f9d4', id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": multiSelect ? "true" : "false", "aria-activedescendant": this.optionHighlighted
|
|
1005
|
+
? this.getOptionId(this.optionHighlighted)
|
|
1006
|
+
: undefined, tabindex: !this.allowMenuFocus
|
|
1007
|
+
? "-1"
|
|
1008
|
+
: open &&
|
|
1009
|
+
!keyboardNav &&
|
|
1010
|
+
((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ||
|
|
1011
|
+
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) === SEARCH_BAR_TAG)
|
|
1012
|
+
? "0"
|
|
1013
|
+
: "-1", ref: (el) => (this.menu = el), onKeyDown: this.handleMenuKeyDown, onKeyUp: this.handleMenuKeyUp, onBlur: this.handleBlur }, this.getSortedOptions(options).map((option, index) => {
|
|
934
1014
|
if (option.children) {
|
|
935
1015
|
if (option.children.length > 0) {
|
|
936
1016
|
return (h("div", null, h("ic-typography", { class: "option-group-title", role: "presentation", variant: "subtitle-small" }, h("p", null, option[this.labelField])), option.children.map((childOption) => childOption[this.labelField] &&
|
|
@@ -953,7 +1033,7 @@ export class Menu {
|
|
|
953
1033
|
multiSelect &&
|
|
954
1034
|
!isLoading &&
|
|
955
1035
|
!hasTimedOut &&
|
|
956
|
-
!hasNoResults && (h("div", { key: '
|
|
1036
|
+
!hasNoResults && (h("div", { key: 'f1a670781a41df910d8d55d2a956e062faf5a425', class: "option-bar" }, h("ic-typography", { key: '9687b26a0a275e9a6cff54180f2962d836ef4262' }, h("p", { key: '33e219ebba6ad3eb4ed60d77d9ed86551cb93a48' }, `${value ? value.length : 0}/${getOptionsWithoutGroupTitlesCount(this.options)} selected`)), h("ic-button", { key: '05e39e54ef176fb303ba59dcc3b91745cf38deef', class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "medium" }, selectAllButtonText)))));
|
|
957
1037
|
}
|
|
958
1038
|
static get is() { return "ic-menu"; }
|
|
959
1039
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1409,6 +1489,29 @@ export class Menu {
|
|
|
1409
1489
|
"attribute": "value-field",
|
|
1410
1490
|
"reflect": false,
|
|
1411
1491
|
"defaultValue": "\"value\""
|
|
1492
|
+
},
|
|
1493
|
+
"allowMenuFocus": {
|
|
1494
|
+
"type": "boolean",
|
|
1495
|
+
"mutable": false,
|
|
1496
|
+
"complexType": {
|
|
1497
|
+
"original": "boolean",
|
|
1498
|
+
"resolved": "boolean",
|
|
1499
|
+
"references": {}
|
|
1500
|
+
},
|
|
1501
|
+
"required": false,
|
|
1502
|
+
"optional": false,
|
|
1503
|
+
"docs": {
|
|
1504
|
+
"tags": [{
|
|
1505
|
+
"name": "internal",
|
|
1506
|
+
"text": "If `true`, allows the menu to receive focus when opened."
|
|
1507
|
+
}],
|
|
1508
|
+
"text": ""
|
|
1509
|
+
},
|
|
1510
|
+
"getter": false,
|
|
1511
|
+
"setter": false,
|
|
1512
|
+
"attribute": "allow-menu-focus",
|
|
1513
|
+
"reflect": false,
|
|
1514
|
+
"defaultValue": "true"
|
|
1412
1515
|
}
|
|
1413
1516
|
};
|
|
1414
1517
|
}
|
|
@@ -1670,6 +1773,34 @@ export class Menu {
|
|
|
1670
1773
|
}]
|
|
1671
1774
|
}
|
|
1672
1775
|
},
|
|
1776
|
+
"handleMenuKeyDown": {
|
|
1777
|
+
"complexType": {
|
|
1778
|
+
"signature": "(event: KeyboardEvent) => Promise<void>",
|
|
1779
|
+
"parameters": [{
|
|
1780
|
+
"name": "event",
|
|
1781
|
+
"type": "KeyboardEvent",
|
|
1782
|
+
"docs": "The keyboard event which is available when handleMenuKeydown is invoked."
|
|
1783
|
+
}],
|
|
1784
|
+
"references": {
|
|
1785
|
+
"Promise": {
|
|
1786
|
+
"location": "global",
|
|
1787
|
+
"id": "global::Promise"
|
|
1788
|
+
},
|
|
1789
|
+
"KeyboardEvent": {
|
|
1790
|
+
"location": "global",
|
|
1791
|
+
"id": "global::KeyboardEvent"
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1794
|
+
"return": "Promise<void>"
|
|
1795
|
+
},
|
|
1796
|
+
"docs": {
|
|
1797
|
+
"text": "Used alongside activationType\nIf menu is open and user navigates options via keyboard, emit optionSelect custom event.",
|
|
1798
|
+
"tags": [{
|
|
1799
|
+
"name": "param",
|
|
1800
|
+
"text": "event The keyboard event which is available when handleMenuKeydown is invoked."
|
|
1801
|
+
}]
|
|
1802
|
+
}
|
|
1803
|
+
},
|
|
1673
1804
|
"handleSetFirstOption": {
|
|
1674
1805
|
"complexType": {
|
|
1675
1806
|
"signature": "() => Promise<void>",
|