@ukic/web-components 3.22.0 → 3.24.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/{helpers-81cd6930.js → helpers-51bab4b5.js} +9 -68
- package/dist/cjs/helpers-51bab4b5.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 +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 +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 +41 -29
- package/dist/cjs/ic-dialog.cjs.entry.js.map +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 +27 -26
- 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-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 +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_3.cjs.entry.js +19 -17
- package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +7 -7
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +9 -7
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +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 +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +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-group.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-typography.cjs.entry.js +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.js +41 -29
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.css +15 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +9 -9
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +48 -4
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +29 -444
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +7 -5
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.js +18 -16
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.types.js.map +1 -1
- 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 +8 -66
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +9 -67
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-dialog.js +41 -29
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-menu2.js +27 -26
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-pagination-bar.js +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +6 -6
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +8 -6
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-select2.js +19 -17
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-text-field2.js +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button.js +1 -1
- package/dist/components/ic-tooltip2.js +5 -3
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/{p-fb9376f0.entry.js → p-043a5677.entry.js} +2 -2
- package/dist/core/{p-0fb7f915.entry.js → p-111abe0f.entry.js} +2 -2
- package/dist/core/{p-e7767c0d.entry.js → p-174a70c4.entry.js} +2 -2
- package/dist/core/{p-347cc084.entry.js → p-19056c16.entry.js} +2 -2
- package/dist/core/{p-659d048d.entry.js → p-1bacfc3c.entry.js} +2 -2
- package/dist/core/p-27540e3e.entry.js +2 -0
- package/dist/core/p-27540e3e.entry.js.map +1 -0
- package/dist/core/{p-f661ba76.entry.js → p-2a1faef2.entry.js} +2 -2
- package/dist/core/{p-67de1290.entry.js → p-2b1ce5b7.entry.js} +2 -2
- package/dist/core/p-2e15136e.entry.js +2 -0
- package/dist/core/p-2e15136e.entry.js.map +1 -0
- package/dist/core/{p-ea7a3d30.entry.js → p-3f001e75.entry.js} +2 -2
- package/dist/core/{p-9cb83a2e.entry.js → p-44d043f7.entry.js} +2 -2
- package/dist/core/{p-e938eb31.entry.js → p-4613f697.entry.js} +2 -2
- package/dist/core/{p-4f56acff.entry.js → p-46e5a58b.entry.js} +2 -2
- package/dist/core/{p-cfbacca1.entry.js → p-4dbc72f4.entry.js} +2 -2
- package/dist/core/{p-99433296.entry.js → p-4e59d889.entry.js} +2 -2
- package/dist/core/p-52be32d7.entry.js +3 -0
- package/dist/core/p-52be32d7.entry.js.map +1 -0
- package/dist/core/{p-daec7e69.entry.js → p-570d763b.entry.js} +2 -2
- package/dist/core/{p-8a833e82.entry.js → p-571404d0.entry.js} +2 -2
- package/dist/core/{p-61d79fc6.entry.js → p-574ef8c9.entry.js} +2 -2
- package/dist/core/{p-a780a34b.entry.js → p-59c5265c.entry.js} +2 -2
- package/dist/core/{p-2691cc80.entry.js → p-5d01fefb.entry.js} +2 -2
- package/dist/core/{p-2b87c592.entry.js → p-6183ad85.entry.js} +2 -2
- package/dist/core/{p-46fd555f.entry.js → p-66bfff48.entry.js} +2 -2
- package/dist/core/{p-90678e67.entry.js → p-7410fde3.entry.js} +2 -2
- package/dist/core/{p-cbca04bb.entry.js → p-75bf2d00.entry.js} +2 -2
- package/dist/core/{p-09505807.entry.js → p-884af70c.entry.js} +2 -2
- package/dist/core/{p-aaf4e367.entry.js → p-9ae157de.entry.js} +2 -2
- package/dist/core/{p-80d85403.entry.js → p-9b48971f.entry.js} +2 -2
- package/dist/core/{p-73043f57.entry.js → p-9ced00a7.entry.js} +2 -2
- package/dist/core/{p-b777f0a1.entry.js → p-9da03270.entry.js} +2 -2
- package/dist/core/{p-bb7652cd.entry.js → p-a0c54a50.entry.js} +2 -2
- package/dist/core/{p-880f7548.entry.js → p-a5fcb9c1.entry.js} +2 -2
- package/dist/core/{p-2a124daf.entry.js → p-a6ebe253.entry.js} +2 -2
- package/dist/core/{p-ef70ea50.entry.js → p-b27e147d.entry.js} +2 -2
- package/dist/core/{p-f64996f1.entry.js → p-b2aef77d.entry.js} +2 -2
- package/dist/core/{p-393af2bc.entry.js → p-b431dd8a.entry.js} +2 -2
- package/dist/core/{p-1b81ec88.entry.js → p-b4e8e438.entry.js} +2 -2
- package/dist/core/{p-b997ad5e.entry.js → p-b5e683d0.entry.js} +2 -2
- package/dist/core/{p-7b538fd1.entry.js → p-ba80d403.entry.js} +2 -2
- package/dist/core/{p-3aed13ba.entry.js → p-be0010c0.entry.js} +2 -2
- package/dist/core/p-c14ec3e2.entry.js +2 -0
- package/dist/core/p-c14ec3e2.entry.js.map +1 -0
- package/dist/core/{p-5900cb65.entry.js → p-c9fbad60.entry.js} +2 -2
- package/dist/core/{p-0b728f50.entry.js → p-cc3cda99.entry.js} +2 -2
- package/dist/core/p-cc3cda99.entry.js.map +1 -0
- package/dist/core/{p-735d3096.entry.js → p-cf669574.entry.js} +2 -2
- package/dist/core/{p-50dca790.entry.js → p-d5fcd4f9.entry.js} +2 -2
- package/dist/core/{p-506d428a.entry.js → p-d8de5b88.entry.js} +2 -2
- package/dist/core/{p-05fd2707.entry.js → p-dbb1370f.entry.js} +2 -2
- package/dist/core/{p-53ab3c0f.entry.js → p-e35f15ec.entry.js} +2 -2
- package/dist/core/{p-09caf7ed.entry.js → p-e8e45d88.entry.js} +2 -2
- package/dist/core/p-ee63aaf8.entry.js +2 -0
- package/dist/core/p-ee63aaf8.entry.js.map +1 -0
- package/dist/core/{p-b77b1e1f.js → p-eeb8d98a.js} +2 -2
- package/dist/core/p-eeb8d98a.js.map +1 -0
- package/dist/core/{p-9c2b2cb9.entry.js → p-f82baa04.entry.js} +2 -2
- package/dist/core/{p-2bd80913.entry.js → p-fc4b7d2b.entry.js} +2 -2
- package/dist/core/{p-48a628f0.entry.js → p-fe9c3f6e.entry.js} +2 -2
- package/dist/esm/{helpers-66681c73.js → helpers-33039856.js} +10 -68
- package/dist/esm/helpers-33039856.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 +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 +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 +41 -29
- package/dist/esm/ic-dialog.entry.js.map +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 +27 -26
- 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-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 +1 -1
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination_3.entry.js +19 -17
- package/dist/esm/ic-pagination_3.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +7 -7
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +9 -7
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +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 +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +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-group.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-typography.entry.js +1 -1
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +2 -1
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +2 -2
- package/dist/types/components/ic-select/ic-select.types.d.ts +2 -1
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +21 -2
- package/dist/types/utils/helpers.d.ts +0 -31
- package/hydrate/index.js +110 -149
- package/hydrate/index.mjs +110 -149
- package/package.json +3 -3
- package/vscode-data.json +3 -0
- package/dist/cjs/helpers-81cd6930.js.map +0 -1
- package/dist/core/p-0b728f50.entry.js.map +0 -1
- package/dist/core/p-6b4ec95f.entry.js +0 -3
- package/dist/core/p-6b4ec95f.entry.js.map +0 -1
- package/dist/core/p-a08d6b46.entry.js +0 -2
- package/dist/core/p-a08d6b46.entry.js.map +0 -1
- package/dist/core/p-a321feee.entry.js +0 -2
- package/dist/core/p-a321feee.entry.js.map +0 -1
- package/dist/core/p-b77b1e1f.js.map +0 -1
- package/dist/core/p-cc64e5ef.entry.js +0 -2
- package/dist/core/p-cc64e5ef.entry.js.map +0 -1
- package/dist/core/p-f84ac9c6.entry.js +0 -2
- package/dist/core/p-f84ac9c6.entry.js.map +0 -1
- package/dist/esm/helpers-66681c73.js.map +0 -1
- /package/dist/core/{p-fb9376f0.entry.js.map → p-043a5677.entry.js.map} +0 -0
- /package/dist/core/{p-0fb7f915.entry.js.map → p-111abe0f.entry.js.map} +0 -0
- /package/dist/core/{p-e7767c0d.entry.js.map → p-174a70c4.entry.js.map} +0 -0
- /package/dist/core/{p-347cc084.entry.js.map → p-19056c16.entry.js.map} +0 -0
- /package/dist/core/{p-659d048d.entry.js.map → p-1bacfc3c.entry.js.map} +0 -0
- /package/dist/core/{p-f661ba76.entry.js.map → p-2a1faef2.entry.js.map} +0 -0
- /package/dist/core/{p-67de1290.entry.js.map → p-2b1ce5b7.entry.js.map} +0 -0
- /package/dist/core/{p-ea7a3d30.entry.js.map → p-3f001e75.entry.js.map} +0 -0
- /package/dist/core/{p-9cb83a2e.entry.js.map → p-44d043f7.entry.js.map} +0 -0
- /package/dist/core/{p-e938eb31.entry.js.map → p-4613f697.entry.js.map} +0 -0
- /package/dist/core/{p-4f56acff.entry.js.map → p-46e5a58b.entry.js.map} +0 -0
- /package/dist/core/{p-cfbacca1.entry.js.map → p-4dbc72f4.entry.js.map} +0 -0
- /package/dist/core/{p-99433296.entry.js.map → p-4e59d889.entry.js.map} +0 -0
- /package/dist/core/{p-daec7e69.entry.js.map → p-570d763b.entry.js.map} +0 -0
- /package/dist/core/{p-8a833e82.entry.js.map → p-571404d0.entry.js.map} +0 -0
- /package/dist/core/{p-61d79fc6.entry.js.map → p-574ef8c9.entry.js.map} +0 -0
- /package/dist/core/{p-a780a34b.entry.js.map → p-59c5265c.entry.js.map} +0 -0
- /package/dist/core/{p-2691cc80.entry.js.map → p-5d01fefb.entry.js.map} +0 -0
- /package/dist/core/{p-2b87c592.entry.js.map → p-6183ad85.entry.js.map} +0 -0
- /package/dist/core/{p-46fd555f.entry.js.map → p-66bfff48.entry.js.map} +0 -0
- /package/dist/core/{p-90678e67.entry.js.map → p-7410fde3.entry.js.map} +0 -0
- /package/dist/core/{p-cbca04bb.entry.js.map → p-75bf2d00.entry.js.map} +0 -0
- /package/dist/core/{p-09505807.entry.js.map → p-884af70c.entry.js.map} +0 -0
- /package/dist/core/{p-aaf4e367.entry.js.map → p-9ae157de.entry.js.map} +0 -0
- /package/dist/core/{p-80d85403.entry.js.map → p-9b48971f.entry.js.map} +0 -0
- /package/dist/core/{p-73043f57.entry.js.map → p-9ced00a7.entry.js.map} +0 -0
- /package/dist/core/{p-b777f0a1.entry.js.map → p-9da03270.entry.js.map} +0 -0
- /package/dist/core/{p-bb7652cd.entry.js.map → p-a0c54a50.entry.js.map} +0 -0
- /package/dist/core/{p-880f7548.entry.js.map → p-a5fcb9c1.entry.js.map} +0 -0
- /package/dist/core/{p-2a124daf.entry.js.map → p-a6ebe253.entry.js.map} +0 -0
- /package/dist/core/{p-ef70ea50.entry.js.map → p-b27e147d.entry.js.map} +0 -0
- /package/dist/core/{p-f64996f1.entry.js.map → p-b2aef77d.entry.js.map} +0 -0
- /package/dist/core/{p-393af2bc.entry.js.map → p-b431dd8a.entry.js.map} +0 -0
- /package/dist/core/{p-1b81ec88.entry.js.map → p-b4e8e438.entry.js.map} +0 -0
- /package/dist/core/{p-b997ad5e.entry.js.map → p-b5e683d0.entry.js.map} +0 -0
- /package/dist/core/{p-7b538fd1.entry.js.map → p-ba80d403.entry.js.map} +0 -0
- /package/dist/core/{p-3aed13ba.entry.js.map → p-be0010c0.entry.js.map} +0 -0
- /package/dist/core/{p-5900cb65.entry.js.map → p-c9fbad60.entry.js.map} +0 -0
- /package/dist/core/{p-735d3096.entry.js.map → p-cf669574.entry.js.map} +0 -0
- /package/dist/core/{p-50dca790.entry.js.map → p-d5fcd4f9.entry.js.map} +0 -0
- /package/dist/core/{p-506d428a.entry.js.map → p-d8de5b88.entry.js.map} +0 -0
- /package/dist/core/{p-05fd2707.entry.js.map → p-dbb1370f.entry.js.map} +0 -0
- /package/dist/core/{p-53ab3c0f.entry.js.map → p-e35f15ec.entry.js.map} +0 -0
- /package/dist/core/{p-09caf7ed.entry.js.map → p-e8e45d88.entry.js.map} +0 -0
- /package/dist/core/{p-9c2b2cb9.entry.js.map → p-f82baa04.entry.js.map} +0 -0
- /package/dist/core/{p-2bd80913.entry.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/ic-radio-option/ic-radio-option.css?tag=ic-radio-option&encapsulation=scoped","src/components/ic-radio-option/ic-radio-option.tsx"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: flex;\n flex-direction: column;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n:host .additional-field-wrapper-static::slotted([slot=\"additional-field\"]) {\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-left: var(--ic-space-xl);\n}\n\n/* The label turns grey when disabled */\n:host(.ic-radio-option-disabled),\n:host(.ic-radio-option-disabled) .radio-label {\n --ic-typography-color: var(--ic-radio-button-text-option-disabled);\n}\n\n/* Focus states */\n:host .radio-option-container input:focus + span.checkmark,\n:host .radio-option-container:hover input:focus + span.checkmark,\n:host .radio-option-container:active input:focus + span.checkmark,\n:host(:focus) .radio-option-container input:checked + span.checkmark {\n box-shadow: var(--ic-border-focus);\n}\n\n/* The container */\n:host .radio-option-container {\n display: grid;\n grid-template-columns: min-content auto;\n position: relative;\n cursor: pointer;\n align-items: center;\n margin: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);\n}\n\n:host(.ic-radio-option-small) .radio-option-container {\n margin: 0 0 0 var(--ic-space-xxs);\n}\n\n:host .radio-option-container.disabled,\n:host .radio-option-container.disabled input:disabled {\n cursor: default;\n}\n\n/* Hide the browser's default radio button */\n:host .radio-option-container input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n display: inline-block;\n position: absolute;\n cursor: pointer;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n border-radius: 50%;\n border: none;\n}\n\n:host(.ic-radio-option-small) .radio-option-container input {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n/* Create a custom radio button */\n:host .checkmark {\n display: block;\n position: relative;\n top: 0;\n left: 0;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n background-color: var(--ic-radio-button-background-default);\n border: var(--ic-space-1px) solid var(--ic-radio-button-border-default);\n border-radius: 50%;\n transition: var(--ic-easing-transition-fast);\n box-sizing: border-box;\n}\n\n:host(.ic-radio-option-small) .checkmark {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n/* Show the indicator (dot/circle) when checked */\n:host .radio-option-container input:checked ~ .checkmark::after {\n display: inline-block;\n}\n\n/* On mouse-over, add a light blue background color */\n:host .radio-option-container:hover input ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-hover);\n border: var(--ic-border-width) solid var(--ic-radio-button-default-hover);\n}\n\n:host .radio-option-container:hover input:checked ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-hover);\n border: 0.125rem solid var(--ic-radio-button-default-hover);\n}\n\n:host\n .radio-option-container:hover:not(.disabled)\n input:checked\n ~ .checkmark::after {\n background-color: var(--ic-radio-button-default-hover);\n}\n\n/* When pressed, adds the active colours */\n:host .radio-option-container:active input ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-pressed);\n border: var(--ic-border-width) solid var(--ic-radio-button-default-pressed);\n}\n\n/* When pressed, adds the active colours */\n:host .radio-option-container:active input:checked ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-default-pressed);\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-pressed);\n}\n\n:host(.ic-radio-option-small)\n .radio-option-container\n input:checked\n ~ .checkmark {\n border-width: var(--ic-space-1px);\n}\n\n/* When pressed and selected, adds the active colours */\n:host .radio-option-container:active input:checked ~ .checkmark::after {\n background-color: var(--ic-radio-button-default-pressed);\n}\n\n/* When the radio button is checked */\n:host .radio-option-container input:checked ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-default-active);\n}\n\n/* When the radio button is checked and disabled */\n:host .radio-option-container input:checked:disabled ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-border-disabled);\n}\n\n/* When the radio button is disabled */\n:host .radio-option-container input:disabled ~ .checkmark {\n border: var(--ic-border-width) dashed var(--ic-radio-button-border-disabled);\n}\n\n/* When the radio button is disabled */\n:host .radio-option-container input:disabled ~ .checkmark::after {\n background: var(--ic-radio-button-disabled);\n}\n\n/* On mouse-over inactive */\n:host .radio-option-container:hover input:disabled ~ .checkmark {\n box-shadow: none;\n border: 0.125rem solid none;\n}\n\n:host .radio-option-container:active input:disabled ~ .checkmark::after {\n background-color: var(--ic-radio-button-disabled);\n}\n\n/* Style the indicator (dot/circle) */\n:host .radio-option-container .checkmark::after {\n content: \"\";\n position: absolute;\n display: none;\n top: calc(50% - var(--ic-space-xs));\n left: calc(50% - var(--ic-space-xs));\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n border-radius: 50%;\n background: var(--ic-radio-button-default-active);\n}\n\n:host(.ic-radio-option-small) .radio-option-container .checkmark::after {\n top: 50%;\n left: 50%;\n width: 0.625rem;\n height: 0.625rem;\n border-radius: 50%;\n background: var(--ic-radio-button-default-active);\n transform: translate(-50%, -50%);\n}\n\n:host .radio-label {\n margin-left: var(--ic-space-md);\n\n --ic-typography-color: var(--ic-radio-button-text-option);\n}\n\n:host(.ic-radio-option-small) .radio-label {\n margin-left: var(--ic-space-xs);\n}\n\n:host .additional-field-wrapper-static {\n margin-left: var(--ic-space-xs);\n}\n\n/* The line */\n:host .branch-corner {\n color: var(--ic-radio-button-required-bar);\n height: var(--ic-space-md);\n width: var(--ic-space-xl);\n border-radius: 0 0 0 0.188rem;\n border-bottom: 0.125rem solid var(--ic-radio-button-required-bar);\n border-left: 0.125rem solid var(--ic-radio-button-required-bar);\n margin-left: calc(-1 * var(--ic-space-1px));\n}\n\n/* The dynamic container */\n:host .dynamic-container {\n display: flex;\n position: relative;\n margin: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-md);\n gap: var(--ic-space-xs);\n}\n\n:host(.ic-radio-option-small) .dynamic-container {\n margin-left: 12px;\n}\n\n:host .dynamic-container.hidden {\n display: none;\n}\n\n:host .dynamic-text {\n color: var(--ic-radio-button-required-text);\n\n --ic-typography-color: var(--ic-radio-button-required-text);\n\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-bottom: var(--ic-space-xs);\n border-radius: 2%;\n}\n\n@media (max-width: 576px) {\n :host .additional-field-wrapper-dynamic::slotted(ic-text-field),\n :host .additional-field-wrapper-static::slotted(ic-text-field) {\n --input-width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n\n :host .radio-option-container input:checked ~ .checkmark,\n :host .radio-option-container:active input:checked ~ .checkmark {\n border-color: Highlight;\n }\n\n :host .radio-option-container input:checked ~ .checkmark::after,\n :host .radio-option-container:active input:checked ~ .checkmark::after {\n background-color: Highlight;\n }\n\n :host .radio-option-container input:disabled ~ .checkmark,\n :host .radio-option-container input:checked:disabled ~ .checkmark {\n border-color: GrayText;\n }\n\n :host .radio-option-container input:disabled ~ .checkmark::after,\n :host .radio-option-container:active input:disabled ~ .checkmark::after {\n background-color: GrayText;\n }\n}\n\n/* Right to left */\n:host input[type=\"radio\"]:dir(rtl) {\n right: 0;\n}\n\n:host .radio-label:dir(rtl) {\n padding-right: var(--ic-space-sm);\n padding-left: 0;\n}\n\n:host .branch-corner:dir(rtl) {\n border-radius: 0 0 0.188rem;\n border-right: 0.125rem solid var(--ic-action-default);\n border-left: none;\n}\n\n:host .dynamic-container:dir(rtl) {\n margin: var(--ic-space-xxxs) var(--ic-space-sm) var(--ic-space-xxs) 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host .checkmark {\n transition: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Listen,\n State,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcAdditionalFieldTypes,\n IcThemeMode,\n IcValueEventDetail,\n} from \"../../utils/types\";\nimport {\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n isPropDefined,\n isSlotUsed,\n slotHasContent,\n} from \"../../utils/helpers\";\n\nconst ADDITIONAL_FIELD = \"additional-field\";\n\n/**\n * @slot additional-field - Content to displayed alongside a radio option.\n */\n@Component({\n tag: \"ic-radio-option\",\n scoped: true,\n styleUrl: \"ic-radio-option.css\",\n})\nexport class RadioOption {\n private defaultRadioValue: string = \"\";\n private hasAdditionalField: boolean = false;\n private radioElement?: HTMLInputElement;\n private skipFocus = false;\n\n @Element() el: HTMLIcRadioOptionElement;\n\n /**\n * The style of additionalField that will be displayed if used.\n */\n @Prop({ reflect: true }) additionalFieldDisplay?: IcAdditionalFieldTypes =\n \"static\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The text to be displayed when dynamic.\n */\n @Prop() dynamicText?: string = \"This selection requires additional answers\";\n\n /**\n * The <form> element to associate the radio with.\n */\n @Prop() form?: string;\n\n /**\n * The group label for the radio option.\n */\n @Prop() groupLabel?: string;\n\n /**\n * The label for the radio option.\n */\n @Prop() label?: string;\n\n /**\n * The name for the radio option.\n */\n @Prop() name?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The value for the radio option.\n */\n @Prop({ mutable: true }) value!: string;\n\n /**\n * If `true`, the radio option will be displayed in a selected state.\n */\n @Prop({ reflect: true, mutable: true }) selected?: boolean = false;\n @State() initiallySelected = this.selected;\n\n @Watch(\"selected\")\n watchSelectedHandler(): void {\n this.icSelectedChange.emit();\n }\n\n /**\n * Emitted when the radio option is selected.\n */\n @Event() icCheck: EventEmitter<IcValueEventDetail>;\n @Listen(\"icCheck\")\n handleCheck(ev: CustomEvent<IcValueEventDetail>): void {\n if (\n this.additionalFieldDisplay === \"static\" &&\n Array.from(this.el.querySelectorAll(\"ic-radio-option\")).includes(\n ev.target as HTMLIcRadioOptionElement\n )\n )\n this.icCheck.emit({ value: this.value });\n }\n\n /**\n * Emitted when the radio option is selected or deselected.\n */\n @Event() icSelectedChange: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n if (isSlotUsed(this.el, ADDITIONAL_FIELD)) {\n this.hasAdditionalField = true;\n this.getAdditionalField();\n }\n\n this.defaultRadioValue = this.value;\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.value, propName: \"value\" }],\n \"Radio Option\"\n );\n }\n\n componentWillRender(): void {\n const hasSlot = slotHasContent(this.el, ADDITIONAL_FIELD);\n if (hasSlot && !this.hasAdditionalField) {\n this.hasAdditionalField = true;\n this.getAdditionalField();\n } else if (!hasSlot && this.hasAdditionalField) {\n this.hasAdditionalField = false;\n }\n }\n\n componentDidRender(): void {\n if (this.additionalFieldDisplay === \"static\") {\n const additionalField = this.getAdditionalField();\n if (!this.selected || this.disabled) {\n additionalField?.setAttribute(\"disabled\", \"\");\n } else {\n additionalField?.removeAttribute(\"disabled\");\n }\n }\n }\n\n @Listen(\"icChange\")\n additionalFieldValueHandler(event: CustomEvent<{ value: string }>): void {\n if (this.selected) {\n this.value = event.detail.value || this.defaultRadioValue;\n this.icCheck.emit({\n value: this.value,\n });\n }\n\n event.stopImmediatePropagation();\n }\n\n /**\n * Sets focus on the radio option.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.radioElement?.focus();\n }\n\n /**\n * @internal Sets the tabIndex of the radio option.\n */\n @Method()\n async setTabIndex(value: number): Promise<void> {\n this.radioElement?.setAttribute(\"tabIndex\", value.toString());\n }\n\n private getAdditionalField(): HTMLIcTextFieldElement {\n const additionalField = this.el.querySelector(\n 'ic-text-field[slot=\"additional-field\"]'\n ) as HTMLIcTextFieldElement;\n if (additionalField) additionalField.hiddenInput = false;\n return additionalField;\n }\n\n private handleClick = (event: MouseEvent) => {\n const clickedAdditionalField = (event.target as Element).matches(\n \".dynamic-container:not(ic-radio-option, .checkmark), .dynamic-container *:not(ic-radio-option, .checkmark)\"\n );\n\n if (\n !this.disabled &&\n (!clickedAdditionalField || event.target === this.radioElement)\n ) {\n event.stopPropagation();\n if (this.skipFocus === false) {\n this.radioElement?.focus();\n }\n this.skipFocus = false;\n\n if (this.hasAdditionalField) {\n this.value = this.getAdditionalField()?.value || this.defaultRadioValue;\n }\n\n this.icCheck.emit({\n value: this.value,\n });\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const preventPropagationElements = [\"IC-DATE-INPUT\", \"IC-DATE-PICKER\"];\n\n if (\n this.getAdditionalField() == document.activeElement &&\n preventPropagationElements.includes(this.getAdditionalField().nodeName)\n ) {\n event.stopPropagation();\n }\n };\n\n private handleFormReset = (): void => {\n this.skipFocus = true;\n this.selected = this.initiallySelected;\n };\n\n render() {\n const {\n additionalFieldDisplay,\n disabled,\n dynamicText,\n form,\n groupLabel,\n handleClick,\n handleKeyDown,\n hasAdditionalField,\n label,\n name,\n selected,\n value,\n theme,\n } = this;\n\n const id = `ic-radio-option-${isPropDefined(label) || value}-${groupLabel}`;\n\n return (\n <Host\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n class={{\n [\"ic-radio-option-disabled\"]: !!disabled,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-radio-option-small\"]:\n this.el.parentElement?.tagName === \"IC-RADIO-GROUP\" &&\n this.el.parentElement?.className.includes(\"ic-radio-group-small\"),\n }}\n >\n <div class={{ \"radio-option-container\": true, disabled: !!disabled }}>\n <div>\n <input\n tabindex={selected ? \"0\" : \"-1\"}\n type=\"radio\"\n name={name}\n id={id}\n value={value}\n disabled={disabled}\n checked={selected}\n ref={(el) => (this.radioElement = el)}\n form={form}\n ></input>\n <span class=\"checkmark\"></span>\n </div>\n <ic-typography class=\"radio-label\" variant=\"body\">\n <label htmlFor={id}>{label}</label>\n </ic-typography>\n </div>\n {hasAdditionalField && (\n <div\n class={{\n \"dynamic-container\": true,\n hidden: additionalFieldDisplay === \"dynamic\" && !selected,\n }}\n >\n {additionalFieldDisplay === \"dynamic\" && (\n <div class=\"branch-corner\"></div>\n )}\n <div>\n {additionalFieldDisplay === \"dynamic\" && (\n <ic-typography variant=\"caption\" role=\"alert\">\n <p class=\"dynamic-text\">{dynamicText}</p>\n </ic-typography>\n )}\n <div\n class={{\n [`additional-field-wrapper-${additionalFieldDisplay}`]: true,\n }}\n >\n <slot name={ADDITIONAL_FIELD}></slot>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"ic-radio-option.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,0kUAA0kU,CAAC;AACpmU,4BAAe,gBAAgB;;AC2B/B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;MAU/B,WAAW;IALxB;;;;;QAMU,sBAAiB,GAAW,EAAE,CAAC;QAC/B,uBAAkB,GAAY,KAAK,CAAC;QAEpC,cAAS,GAAG,KAAK,CAAC;;;;QAOD,2BAAsB,GAC7C,QAAQ,CAAC;;;;QAKH,aAAQ,GAAa,KAAK,CAAC;;;;QAS3B,gBAAW,GAAY,4CAA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,IAAI,EACV,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,EACjB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,EACrC,IAAI,EAAE,IAAI,GACH,EACT,6DAAM,KAAK,EAAC,WAAW,GAAQ,CAC3B,EACN,sEAAe,KAAK,EAAC,aAAa,EAAC,OAAO,EAAC,MAAM,IAC/C,8DAAO,OAAO,EAAE,EAAE,IAAG,KAAK,CAAS,CACrB,CACZ,EACL,kBAAkB,KACjB,4DACE,KAAK,EAAE;gBACL,mBAAmB,EAAE,IAAI;gBACzB,MAAM,EAAE,sBAAsB,KAAK,SAAS,IAAI,CAAC,QAAQ;aAC1D,IAEA,sBAAsB,KAAK,SAAS,KACnC,4DAAK,KAAK,EAAC,eAAe,GAAO,CAClC,EACD,8DACG,sBAAsB,KAAK,SAAS,KACnC,sEAAe,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,IAC3C,0DAAG,KAAK,EAAC,cAAc,IAAE,WAAW,CAAK,CAC3B,CACjB,EACD,4DACE,KAAK,EAAE;gBACL,CAAC,4BAA4B,sBAAsB,EAAE,GAAG,IAAI;aAC7D,IAED,6DAAM,IAAI,EAAE,gBAAgB,GAAS,CACjC,CACF,CACF,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-radio-option/ic-radio-option.css?tag=ic-radio-option&encapsulation=scoped","src/components/ic-radio-option/ic-radio-option.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n:host .additional-field-wrapper-static::slotted([slot=\"additional-field\"]) {\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-left: var(--ic-space-xl);\n}\n\n/* The label turns grey when disabled */\n:host(.ic-radio-option-disabled),\n:host(.ic-radio-option-disabled) .radio-label {\n --ic-typography-color: var(--ic-radio-button-text-option-disabled);\n}\n\n/* Focus states */\n:host .radio-option-container input:focus + span.checkmark,\n:host .radio-option-container:hover input:focus + span.checkmark,\n:host .radio-option-container:active input:focus + span.checkmark,\n:host(:focus) .radio-option-container input:checked + span.checkmark {\n box-shadow: var(--ic-border-focus);\n}\n\n/* The container */\n:host .radio-option-container {\n display: grid;\n grid-template-columns: min-content auto;\n position: relative;\n cursor: pointer;\n align-items: center;\n margin: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);\n}\n\n:host(.ic-radio-option-small) .radio-option-container {\n margin: 0 0 0 var(--ic-space-xxs);\n}\n\n:host .radio-option-container.disabled,\n:host .radio-option-container.disabled input:disabled {\n cursor: default;\n}\n\n/* Hide the browser's default radio button */\n:host .radio-option-container input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n display: inline-block;\n position: absolute;\n cursor: pointer;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n border-radius: 50%;\n border: none;\n}\n\n:host(.ic-radio-option-small) .radio-option-container input {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n:host(.ic-radio-option-large) .radio-option-container input {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n/* Create a custom radio button */\n:host .checkmark {\n display: block;\n position: relative;\n top: 0;\n left: 0;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n background-color: var(--ic-radio-button-background-default);\n border: var(--ic-space-1px) solid var(--ic-radio-button-border-default);\n border-radius: 50%;\n transition: var(--ic-easing-transition-fast);\n box-sizing: border-box;\n}\n\n:host(.ic-radio-option-small) .checkmark {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n:host(.ic-radio-option-large) .checkmark {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n/* Show the indicator (dot/circle) when checked */\n:host .radio-option-container input:checked ~ .checkmark::after {\n display: inline-block;\n}\n\n/* On mouse-over, add a light blue background color */\n:host .radio-option-container:hover input ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-hover);\n border: var(--ic-border-width) solid var(--ic-radio-button-default-hover);\n}\n\n:host .radio-option-container:hover input:checked ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-hover);\n border: 0.125rem solid var(--ic-radio-button-default-hover);\n}\n\n:host\n .radio-option-container:hover:not(.disabled)\n input:checked\n ~ .checkmark::after {\n background-color: var(--ic-radio-button-default-hover);\n}\n\n/* When pressed, adds the active colours */\n:host .radio-option-container:active input ~ .checkmark {\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-pressed);\n border: var(--ic-border-width) solid var(--ic-radio-button-default-pressed);\n}\n\n/* When pressed, adds the active colours */\n:host .radio-option-container:active input:checked ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-default-pressed);\n box-shadow: 0 0 0 0.25rem var(--ic-radio-button-active-pressed);\n}\n\n:host(.ic-radio-option-small)\n .radio-option-container\n input:checked\n ~ .checkmark {\n border-width: var(--ic-space-1px);\n}\n\n/* When pressed and selected, adds the active colours */\n:host .radio-option-container:active input:checked ~ .checkmark::after {\n background-color: var(--ic-radio-button-default-pressed);\n}\n\n/* When the radio button is checked */\n:host .radio-option-container input:checked ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-default-active);\n}\n\n/* When the radio button is checked and disabled */\n:host .radio-option-container input:checked:disabled ~ .checkmark {\n border: 0.125rem solid var(--ic-radio-button-border-disabled);\n}\n\n/* When the radio button is disabled */\n:host .radio-option-container input:disabled ~ .checkmark {\n border: var(--ic-border-width) dashed var(--ic-radio-button-border-disabled);\n}\n\n/* When the radio button is disabled */\n:host .radio-option-container input:disabled ~ .checkmark::after {\n background: var(--ic-radio-button-disabled);\n}\n\n/* On mouse-over inactive */\n:host .radio-option-container:hover input:disabled ~ .checkmark {\n box-shadow: none;\n border: 0.125rem solid none;\n}\n\n:host .radio-option-container:active input:disabled ~ .checkmark::after {\n background-color: var(--ic-radio-button-disabled);\n}\n\n/* Style the indicator (dot/circle) */\n:host .radio-option-container .checkmark::after {\n content: \"\";\n position: absolute;\n display: none;\n top: calc(50% - var(--ic-space-xs));\n left: calc(50% - var(--ic-space-xs));\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n border-radius: 50%;\n background: var(--ic-radio-button-default-active);\n}\n\n:host(.ic-radio-option-small) .radio-option-container .checkmark::after {\n top: 50%;\n left: 50%;\n width: 0.625rem;\n height: 0.625rem;\n border-radius: 50%;\n background: var(--ic-radio-button-default-active);\n transform: translate(-50%, -50%);\n}\n\n:host(.ic-radio-option-large) .radio-option-container .checkmark::after {\n top: 50%;\n left: 50%;\n width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n border-radius: 50%;\n background: var(--ic-radio-button-default-active);\n transform: translate(-50%, -50%);\n}\n\n:host .radio-label {\n margin-left: var(--ic-space-md);\n\n --ic-typography-color: var(--ic-radio-button-text-option);\n}\n\n:host(.ic-radio-option-small) .radio-label {\n margin-left: var(--ic-space-xs);\n}\n\n:host(.ic-radio-option-large) .radio-label {\n margin-left: var(--ic-space-md);\n}\n\n:host .additional-field-wrapper-static {\n margin-left: var(--ic-space-xs);\n}\n\n/* The line */\n:host .branch-corner {\n color: var(--ic-radio-button-required-bar);\n height: var(--ic-space-md);\n width: var(--ic-space-xl);\n border-radius: 0 0 0 0.188rem;\n border-bottom: 0.125rem solid var(--ic-radio-button-required-bar);\n border-left: 0.125rem solid var(--ic-radio-button-required-bar);\n margin-left: calc(-1 * var(--ic-space-1px));\n}\n\n/* The dynamic container */\n:host .dynamic-container {\n display: flex;\n position: relative;\n margin: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-md);\n gap: var(--ic-space-xs);\n}\n\n:host(.ic-radio-option-small) .dynamic-container {\n margin-left: var(--ic-space-sm);\n}\n\n:host(.ic-radio-option-large) .dynamic-container {\n margin-left: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host .dynamic-container.hidden {\n display: none;\n}\n\n:host .dynamic-text {\n color: var(--ic-radio-button-required-text);\n\n --ic-typography-color: var(--ic-radio-button-required-text);\n\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-bottom: var(--ic-space-xs);\n border-radius: 2%;\n}\n\n@media (max-width: 576px) {\n :host .additional-field-wrapper-dynamic::slotted(ic-text-field),\n :host .additional-field-wrapper-static::slotted(ic-text-field) {\n --input-width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n\n :host .radio-option-container input:checked ~ .checkmark,\n :host .radio-option-container:active input:checked ~ .checkmark {\n border-color: Highlight;\n }\n\n :host .radio-option-container input:checked ~ .checkmark::after,\n :host .radio-option-container:active input:checked ~ .checkmark::after {\n background-color: Highlight;\n }\n\n :host .radio-option-container input:disabled ~ .checkmark,\n :host .radio-option-container input:checked:disabled ~ .checkmark {\n border-color: GrayText;\n }\n\n :host .radio-option-container input:disabled ~ .checkmark::after,\n :host .radio-option-container:active input:disabled ~ .checkmark::after {\n background-color: GrayText;\n }\n}\n\n/* Right to left */\n:host input[type=\"radio\"]:dir(rtl) {\n right: 0;\n}\n\n:host .radio-label:dir(rtl) {\n padding-right: var(--ic-space-sm);\n padding-left: 0;\n}\n\n:host .branch-corner:dir(rtl) {\n border-radius: 0 0 0.188rem;\n border-right: 0.125rem solid var(--ic-action-default);\n border-left: none;\n}\n\n:host .dynamic-container:dir(rtl) {\n margin: var(--ic-space-xxxs) var(--ic-space-sm) var(--ic-space-xxs) 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host .checkmark {\n transition: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Listen,\n State,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcAdditionalFieldTypes,\n IcThemeMode,\n IcValueEventDetail,\n} from \"../../utils/types\";\nimport {\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n isPropDefined,\n isSlotUsed,\n slotHasContent,\n} from \"../../utils/helpers\";\n\nconst ADDITIONAL_FIELD = \"additional-field\";\n\n/**\n * @slot additional-field - Content to displayed alongside a radio option.\n */\n@Component({\n tag: \"ic-radio-option\",\n scoped: true,\n styleUrl: \"ic-radio-option.css\",\n})\nexport class RadioOption {\n private defaultRadioValue: string = \"\";\n private hasAdditionalField: boolean = false;\n private radioElement?: HTMLInputElement;\n private skipFocus = false;\n\n @Element() el: HTMLIcRadioOptionElement;\n\n /**\n * The style of additionalField that will be displayed if used.\n */\n @Prop({ reflect: true }) additionalFieldDisplay?: IcAdditionalFieldTypes =\n \"static\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The text to be displayed when dynamic.\n */\n @Prop() dynamicText?: string = \"This selection requires additional answers\";\n\n /**\n * The <form> element to associate the radio with.\n */\n @Prop() form?: string;\n\n /**\n * The group label for the radio option.\n */\n @Prop() groupLabel?: string;\n\n /**\n * The label for the radio option.\n */\n @Prop() label?: string;\n\n /**\n * The name for the radio option.\n */\n @Prop() name?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The value for the radio option.\n */\n @Prop({ mutable: true }) value!: string;\n\n /**\n * If `true`, the radio option will be displayed in a selected state.\n */\n @Prop({ reflect: true, mutable: true }) selected?: boolean = false;\n @State() initiallySelected = this.selected;\n\n @Watch(\"selected\")\n watchSelectedHandler(): void {\n this.icSelectedChange.emit();\n }\n\n /**\n * Emitted when the radio option is selected.\n */\n @Event() icCheck: EventEmitter<IcValueEventDetail>;\n @Listen(\"icCheck\")\n handleCheck(ev: CustomEvent<IcValueEventDetail>): void {\n if (\n this.additionalFieldDisplay === \"static\" &&\n Array.from(this.el.querySelectorAll(\"ic-radio-option\")).includes(\n ev.target as HTMLIcRadioOptionElement\n )\n )\n this.icCheck.emit({ value: this.value });\n }\n\n /**\n * Emitted when the radio option is selected or deselected.\n */\n @Event() icSelectedChange: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n if (isSlotUsed(this.el, ADDITIONAL_FIELD)) {\n this.hasAdditionalField = true;\n this.getAdditionalField();\n }\n\n this.defaultRadioValue = this.value;\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.value, propName: \"value\" }],\n \"Radio Option\"\n );\n }\n\n componentWillRender(): void {\n const hasSlot = slotHasContent(this.el, ADDITIONAL_FIELD);\n if (hasSlot && !this.hasAdditionalField) {\n this.hasAdditionalField = true;\n this.getAdditionalField();\n } else if (!hasSlot && this.hasAdditionalField) {\n this.hasAdditionalField = false;\n }\n }\n\n componentDidRender(): void {\n if (this.additionalFieldDisplay === \"static\") {\n const additionalField = this.getAdditionalField();\n if (!this.selected || this.disabled) {\n additionalField?.setAttribute(\"disabled\", \"\");\n } else {\n additionalField?.removeAttribute(\"disabled\");\n }\n }\n }\n\n @Listen(\"icChange\")\n additionalFieldValueHandler(event: CustomEvent<{ value: string }>): void {\n if (this.selected) {\n this.value = event.detail.value || this.defaultRadioValue;\n this.icCheck.emit({\n value: this.value,\n });\n }\n\n event.stopImmediatePropagation();\n }\n\n /**\n * Sets focus on the radio option.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.radioElement?.focus();\n }\n\n /**\n * @internal Sets the tabIndex of the radio option.\n */\n @Method()\n async setTabIndex(value: number): Promise<void> {\n this.radioElement?.setAttribute(\"tabIndex\", value.toString());\n }\n\n private getAdditionalField(): HTMLIcTextFieldElement {\n const additionalField = this.el.querySelector(\n 'ic-text-field[slot=\"additional-field\"]'\n ) as HTMLIcTextFieldElement;\n if (additionalField) additionalField.hiddenInput = false;\n return additionalField;\n }\n\n private handleClick = (event: MouseEvent) => {\n const clickedAdditionalField = (event.target as Element).matches(\n \".dynamic-container:not(ic-radio-option, .checkmark), .dynamic-container *:not(ic-radio-option, .checkmark)\"\n );\n\n if (\n !this.disabled &&\n (!clickedAdditionalField || event.target === this.radioElement)\n ) {\n event.stopPropagation();\n if (this.skipFocus === false) {\n this.radioElement?.focus();\n }\n this.skipFocus = false;\n\n if (this.hasAdditionalField) {\n this.value = this.getAdditionalField()?.value || this.defaultRadioValue;\n }\n\n this.icCheck.emit({\n value: this.value,\n });\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const preventPropagationElements = [\"IC-DATE-INPUT\", \"IC-DATE-PICKER\"];\n\n if (\n this.getAdditionalField() == document.activeElement &&\n preventPropagationElements.includes(this.getAdditionalField().nodeName)\n ) {\n event.stopPropagation();\n }\n };\n\n private handleFormReset = (): void => {\n this.skipFocus = true;\n this.selected = this.initiallySelected;\n };\n\n render() {\n const {\n additionalFieldDisplay,\n disabled,\n dynamicText,\n form,\n groupLabel,\n handleClick,\n handleKeyDown,\n hasAdditionalField,\n label,\n name,\n selected,\n value,\n theme,\n } = this;\n\n const id = `ic-radio-option-${isPropDefined(label) || value}-${groupLabel}`;\n\n return (\n <Host\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n class={{\n [\"ic-radio-option-disabled\"]: !!disabled,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-radio-option-small\"]:\n this.el.parentElement?.tagName === \"IC-RADIO-GROUP\" &&\n this.el.parentElement?.className.includes(\"ic-radio-group-small\"),\n [\"ic-radio-option-large\"]:\n this.el.parentElement?.tagName === \"IC-RADIO-GROUP\" &&\n this.el.parentElement?.className.includes(\"ic-radio-group-large\"),\n }}\n >\n <div class={{ \"radio-option-container\": true, disabled: !!disabled }}>\n <div>\n <input\n tabindex={selected ? \"0\" : \"-1\"}\n type=\"radio\"\n name={name}\n id={id}\n value={value}\n disabled={disabled}\n checked={selected}\n ref={(el) => (this.radioElement = el)}\n form={form}\n ></input>\n <span class=\"checkmark\"></span>\n </div>\n <ic-typography class=\"radio-label\" variant=\"body\">\n <label htmlFor={id}>{label}</label>\n </ic-typography>\n </div>\n {hasAdditionalField && (\n <div\n class={{\n \"dynamic-container\": true,\n hidden: additionalFieldDisplay === \"dynamic\" && !selected,\n }}\n >\n {additionalFieldDisplay === \"dynamic\" && (\n <div class=\"branch-corner\"></div>\n )}\n <div>\n {additionalFieldDisplay === \"dynamic\" && (\n <ic-typography variant=\"caption\" role=\"alert\">\n <p class=\"dynamic-text\">{dynamicText}</p>\n </ic-typography>\n )}\n <div\n class={{\n [`additional-field-wrapper-${additionalFieldDisplay}`]: true,\n }}\n >\n <slot name={ADDITIONAL_FIELD}></slot>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { V as getFilteredMenuOptions, W as getLabelFromValue, h as handleHiddenFormButtonClick, r as removeDisabledFalse, U as debounceEvent, o as onComponentRequiredPropUndefined, w as getInputDescribedByText, u as renderHiddenInput } from './helpers.js';
|
|
3
3
|
import { d as defineCustomElement$9 } from './ic-button2.js';
|
|
4
4
|
import { d as defineCustomElement$8 } from './ic-input-component-container2.js';
|
|
5
5
|
import { d as defineCustomElement$7 } from './ic-input-container2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { S as checkSlotInChildMutations, r as removeDisabledFalse, t as removeFormResetListener, s as addFormResetListener, w as getInputDescribedByText, u as renderHiddenInput, i as isSlotUsed, T as isMobileOrTablet, A as IcInformationStatus } from './helpers.js';
|
|
3
3
|
import { I as IC_INHERITED_ARIA } from './constants.js';
|
|
4
4
|
import { d as defineCustomElement$9 } from './ic-button2.js';
|
|
5
5
|
import { d as defineCustomElement$8 } from './ic-input-component-container2.js';
|
|
@@ -367,7 +367,9 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
367
367
|
if (filteredOptions.length > 0) {
|
|
368
368
|
const firstOption = filteredOptions[0];
|
|
369
369
|
if ("children" in firstOption) {
|
|
370
|
-
|
|
370
|
+
if (firstOption.children) {
|
|
371
|
+
this.value = firstOption.children[0].value;
|
|
372
|
+
}
|
|
371
373
|
}
|
|
372
374
|
else {
|
|
373
375
|
this.value = firstOption.value;
|
|
@@ -634,19 +636,19 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
634
636
|
"loading" in menuOptions[0] ||
|
|
635
637
|
"timedOut" in menuOptions[0]));
|
|
636
638
|
renderHiddenInput(this.el, value, name || inputId, disabled);
|
|
637
|
-
const ClearButton = () => (h("ic-button", { key: '
|
|
638
|
-
const NativeSelect = () => (h("select", Object.assign({ key: '
|
|
639
|
-
const SelectButton = () => (h("div", { key: '
|
|
639
|
+
const ClearButton = () => (h("ic-button", { key: '8b264f825c15b75c6b4b75659f8fe054425f1d08', ref: (el) => (this.clearButton = el), id: "clear-button", "aria-label": this.searchable ? "Clear input" : "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onBlur: this.handleBlur, size: size, variant: "icon-tertiary" }));
|
|
640
|
+
const NativeSelect = () => (h("select", Object.assign({ key: '75584fed7b1a6ad382ded83c440643657c1e1c7c', ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid ? "true" : "false", onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleNativeSelectKeyDown, form: form }, inheritedAttributes), h("option", { key: '9cecd0abe9eb2f3df10dcc9cf6f6bd0f866f5e9d', value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => "children" in option && option.children ? (h("optgroup", { label: option.label }, option.children.map((child) => this.renderNativeOption(child)))) : (this.renderNativeOption(option)))));
|
|
641
|
+
const SelectButton = () => (h("div", { key: '236970625078488c8fc0b592ffff98fdce92eb59', class: "select-container" }, h("button", { key: '7c57aae2a5ffc206af492ef69afc81ed45f132e4', class: "select-input", role: "combobox", ref: (el) => (this.selectElement = el), id: inputId, "aria-label": `${label}, ${(multiple && value
|
|
640
642
|
? `${value.length} of ${this.flatOptions.length} selected, ${this.getLabelString()}`
|
|
641
|
-
: this.getLabelString()) || placeholder}`, onClick: this.handleClick, "aria-describedby": describedBy, "aria-invalid": invalid ? "true" : "false", "aria-haspopup": "listbox", "aria-expanded": `${open}`, "aria-controls": menuId, "aria-required": `${required}`, disabled: disabled, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-activedescendant": ariaActiveDescendant }, h("ic-typography", { key: '
|
|
643
|
+
: this.getLabelString()) || placeholder}`, onClick: this.handleClick, "aria-describedby": describedBy, "aria-invalid": invalid ? "true" : "false", "aria-haspopup": "listbox", "aria-expanded": `${open}`, "aria-controls": menuId, "aria-required": `${required}`, disabled: disabled, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-activedescendant": ariaActiveDescendant }, h("ic-typography", { key: 'e83a141287ad5f72e5760781452a4f191cf04fa8', variant: "body", class: {
|
|
642
644
|
"value-text": true,
|
|
643
645
|
"with-clear-button": !!isClearable,
|
|
644
646
|
placeholder: !value,
|
|
645
|
-
} }, this.getLabelString()), h("div", { key: '
|
|
647
|
+
} }, this.getLabelString()), h("div", { key: 'd0144dcf41567138a7920ef03e3487e0ec54adaf', class: "select-input-end" }, isClearable && h("div", { key: '7476a99bca242fb377406f059e23445307f8fd47', class: "divider" }), h("span", { key: '9c7bcbd45dd68efa9342fec61ca30e8129cbe3e3', class: {
|
|
646
648
|
"expand-icon": true,
|
|
647
649
|
"expand-icon-open": open,
|
|
648
|
-
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && h(ClearButton, { key: '
|
|
649
|
-
const SelectInput = () => (h("div", { key: '
|
|
650
|
+
}, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && h(ClearButton, { key: '96fe7d88db9ae07066b8975594a9394b51adbead' }), h("div", { key: 'f8aa1da24f4f1b7c6caefd93af5626939a4c30da', "aria-live": "polite", "aria-atomic": "true", class: "aria-live-hidden-text" }, selectButtonAriaLiveText)));
|
|
651
|
+
const SelectInput = () => (h("div", { key: '0359142f04587d68aad6d55f9a7a64bc3f61943e', class: "searchable-select-container" }, h("input", { key: 'e7c6a921b493e0a8b810e5ea823fe2970313b4f9', class: {
|
|
650
652
|
"value-text": true,
|
|
651
653
|
"select-input": true,
|
|
652
654
|
"with-clear-button": !!searchableSelectInputValue,
|
|
@@ -654,25 +656,25 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
654
656
|
? ""
|
|
655
657
|
: value
|
|
656
658
|
? this.getLabelString()
|
|
657
|
-
: searchableSelectInputValue || undefined, disabled: disabled, placeholder: placeholder, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown, form: form }), isClearable && (h("div", { key: '
|
|
659
|
+
: searchableSelectInputValue || undefined, disabled: disabled, placeholder: placeholder, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown, form: form }), isClearable && (h("div", { key: '4c6c663b7f3794a0a3748d6cb61c31372bbad84d', class: "clear-button-container" }, h(ClearButton, { key: '03413d6336fa01461037740a9a73c2acbad9d3c1' }), h("div", { key: 'aad75a81b8a62e8302a83f95d3dae62028d82841', class: "divider" }))), h("span", { key: 'cc9aa62781332afed5a4a00ad687820fd6106a8a', onMouseDown: this.handleExpandIconMouseDown, class: {
|
|
658
660
|
"expand-icon": true,
|
|
659
661
|
"expand-icon-open": open,
|
|
660
|
-
}, innerHTML: Expand, "aria-hidden": "true" }), h("div", { key: '
|
|
661
|
-
const ReadOnly = () => (h("ic-typography", { key: '
|
|
662
|
-
return (h(Host, { key: '
|
|
662
|
+
}, innerHTML: Expand, "aria-hidden": "true" }), h("div", { key: 'f689789683bad109768658de55194fd922f6a586', "aria-live": "polite", role: "status", class: "aria-live-hidden-text" }, selectInputAriaLiveText)));
|
|
663
|
+
const ReadOnly = () => (h("ic-typography", { key: 'f77135f478f4860a473bda5ce2d5ed82adae0b53' }, h("p", { key: 'b98c424e53047b835231479ba3c8e949207b2e60' }, this.getLabelString() === placeholder ? "" : this.getLabelString())));
|
|
664
|
+
return (h(Host, { key: '126f830a424039ed189c5c0bdb3a5581f4c9fd34', class: {
|
|
663
665
|
"ic-select-disabled": disabled,
|
|
664
666
|
"ic-select-searchable": searchable,
|
|
665
667
|
[`ic-select-${size}`]: size !== "medium",
|
|
666
668
|
"ic-select-full-width": fullWidth,
|
|
667
669
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
668
|
-
} }, h("ic-input-container", { key: '
|
|
670
|
+
} }, h("ic-input-container", { key: 'b9dee0df3b7201371974b1384cc773550304574f', readonly: readonly }, !hideLabel && (h("ic-input-label", { key: 'a247b8e90fd62cc805e6e2b921bd598d81023b50', for: inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly }, h("slot", { key: '022b03330ee4995b282ca486b8b8407458b65242', name: "helper-text", slot: "helper-text" }))), h("ic-input-component-container", { key: '012bec0098db190860d46d78d0d0eabfea6f349b', ref: (el) => (this.anchorEl = el), class: { "menu-open": open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, isSlotUsed(this.el, "icon") &&
|
|
669
671
|
!disabled &&
|
|
670
|
-
(!readonly || !!value) && (h("span", { key: '
|
|
672
|
+
(!readonly || !!value) && (h("span", { key: 'e510aaf8f1af290adeda47fb69a2b9fe03ba45df', slot: "left-icon", class: {
|
|
671
673
|
readonly,
|
|
672
674
|
"has-value": !!value,
|
|
673
|
-
} }, h("slot", { key: '
|
|
675
|
+
} }, h("slot", { key: '4618acba252d43f20b92430be62ad522296145c9', name: "icon" }))), isMobileOrTablet() && this.useNativeSelectOnMobile && !multiple ? (h(NativeSelect, null)) : readonly ? (h(ReadOnly, null)) : !searchable ? (h(SelectButton, null)) : (h(SelectInput, null))), !(isMobileOrTablet() &&
|
|
674
676
|
this.useNativeSelectOnMobile &&
|
|
675
|
-
!multiple) && (h("ic-menu", { key: '
|
|
677
|
+
!multiple) && (h("ic-menu", { key: '5e014dba6d6c4598aa9c6644aa556fc4e80022cc', ref: (el) => (this.menu = el), class: { "no-results": noOptions }, inputEl: searchable ? this.searchableSelectElement : this.selectElement, allowMenuFocus: false, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: open, options: this.getOptions(), value: multiple ? value : value, fullWidth: fullWidth, selectOnEnter: selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleSelectChange, onMenuOptionSelectAll: this.handleSelectAllChange, onTimeoutBlur: this.handleTimeoutBlur, onMenuOptionId: this.updateAriaActiveDescendant, onClick: this.setFocus, parentEl: this.el, activationType: searchable || multiple || selectOnEnter ? "manual" : "automatic", onRetryButtonClicked: this.handleRetry, closeOnSelect: !multiple, multiSelect: multiple, searchableSelect: searchable })), h("ic-input-validation", { key: '08feb8f8e219adb8aba58e078a9dc6d0aa8bc006', class: {
|
|
676
678
|
"menu-open": open,
|
|
677
679
|
}, ariaLiveMode: validationAriaLive, status: showValidation ? validationStatus : "", message: showValidation ? validationText : "", for: inputId }))));
|
|
678
680
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ic-select2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,u0RAAu0R,CAAC;AAC51R,u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;;;;;;;;;;;","names":[],"sources":["src/components/ic-select/ic-select.css?tag=ic-select&encapsulation=shadow","src/components/ic-select/ic-select.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --input-width: Width of the input field\n * @prop --menu-width: Width of the dropdown menu\n * @prop --ic-z-index-menu: z-index of select menu\n */\n\n:host {\n display: block;\n position: relative;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n --menu-max-height: 100px;\n --border-color: var(--ic-select-field-border);\n --border-color-hover: var(--ic-select-field-border-hover);\n --border-color-pressed: var(--ic-select-field-border-pressed);\n --border-color-disabled: var(--ic-select-field-border-disabled);\n --border-color-error: var(--ic-select-field-border-error);\n --border-color-error-hover: var(--ic-select-field-border-error-hover);\n --border-color-error-pressed: var(--ic-select-field-border-error-pressed);\n --border-color-success: var(--ic-select-field-border-success);\n --border-color-success-hover: var(--ic-select-field-border-success-hover);\n --border-color-success-pressed: var(--ic-select-field-border-success-pressed);\n --border-color-warning: var(--ic-select-field-border-warning);\n --border-color-warning-hover: var(--ic-select-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-select-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-select-field-label);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle\n );\n --ic-input-validation-status-text-color: var(--ic-select-state-text);\n --ic-input-validation-error: var(--ic-select-state-icon-error);\n --ic-input-validation-warning-icon-color: var(--ic-select-state-icon-warning);\n --ic-input-validation-success-icon-color: var(--ic-select-state-icon-success);\n --menu-item-text-color: var(--ic-select-list-option-text);\n --menu-bg-color: var(--ic-select-list-option-background);\n --menu-border-color: var(--ic-select-dropdown-list-border);\n}\n\n:host(.ic-select-disabled) {\n --ic-input-label-text-color: var(--ic-select-field-label-disabled);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle-disabled\n );\n}\n\n:host(.ic-select-full-width) {\n width: 100%;\n}\n\nic-input-component-container.menu-open {\n --border-color: var(--ic-select-field-border-pressed);\n}\n\nic-input-validation .status-icon,\nic-input-validation .statustext {\n visibility: visible;\n}\n\nic-input-validation.menu-open .status-icon,\nic-input-validation.menu-open .statustext {\n visibility: hidden;\n transition: visibility 0s;\n}\n\nic-input-label {\n margin-bottom: var(--ic-space-xs);\n}\n\nselect {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n height: 100%;\n padding-left: 0.375rem;\n appearance: none;\n background-repeat: no-repeat;\n background-position: right 0.375rem center;\n background-image: var(--ic-select-mobile-dropdown-icon);\n caret-color: var(--ic-select-input-field-text-cursor);\n}\n\nselect option,\n.select-option-selected {\n color: var(--ic-select-list-option-text);\n}\n\nselect:disabled {\n color: var(--ic-select-content-text-disabled);\n background-image: var(--ic-select-mobile-dropdown-icon-disabled);\n}\n\nselect:focus {\n border: 0;\n outline: 0;\n}\n\nselect:not([disabled]) {\n cursor: pointer;\n}\n\n.select-container {\n width: 100%;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.select-input {\n width: 100%;\n height: 100%;\n padding: 0 0.375rem;\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n}\n\n.select-input:focus {\n outline: none;\n}\n\n.select-input[disabled] {\n pointer-events: none;\n}\n\n:host(.ic-select-searchable) .select-input {\n cursor: auto;\n}\n\n.select-input.with-clear-button {\n padding-right: 0;\n}\n\n.value-text {\n max-width: calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));\n box-sizing: border-box;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n margin-bottom: 0 !important;\n}\n\n.value-text.with-clear-button {\n padding-right: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n.searchable-select-container {\n align-items: center;\n display: flex;\n width: 100%;\n position: relative;\n}\n\n.expand-icon {\n height: var(--ic-space-lg);\n padding-left: var(--ic-space-xxs);\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon > svg {\n display: inline-block;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-disabled) .expand-icon,\n:host(.ic-select-disabled) .expand-icon > svg > path {\n color: var(--ic-select-disabled-expand-icon-color);\n}\n\n:host(.ic-select-searchable) .expand-icon {\n padding-left: 0;\n height: 2.25rem;\n}\n\n:host(.ic-select-searchable) .expand-icon > svg {\n height: 2.25rem;\n padding: 0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs);\n}\n\n:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon > svg {\n cursor: pointer;\n}\n\n.expand-icon-open {\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon-open,\n:host(.ic-select-searchable) .expand-icon-open {\n transform: rotateX(180deg);\n}\n\n.placeholder {\n color: var(--ic-select-content-placeholder-text);\n}\n\n:host(.ic-select-disabled) .value-text,\n:host(.ic-select-disabled) .select-input,\n:host(.ic-select-disabled) .placeholder,\n:host(.ic-select-disabled.ic-select-searchable) .select-input::placeholder {\n color: var(--ic-select-content-text-disabled);\n}\n\n.select-input-end {\n display: flex;\n align-items: center;\n}\n\n.clear-button-container {\n display: flex;\n align-items: center;\n}\n\n.divider {\n width: var(--ic-space-1px);\n background-color: var(--ic-select-content-divider);\n margin: var(--ic-space-xxs) 0;\n border-radius: var(--ic-space-1px);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-small) .divider {\n height: var(--ic-space-md);\n}\n\n:host(.ic-select-large) .divider {\n height: var(--ic-space-xl);\n}\n\n.clear-button {\n color: var(--ic-select-clear-button);\n position: absolute;\n right: calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n}\n\n.clear-button:focus,\n.clear-button:active {\n background-color: var(--ic-color-focus-inner);\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer);\n border-radius: 0.25rem;\n}\n\n.clear-button:focus,\n.clear-button:active * {\n fill: var(--ic-atoms-input-clear-button-focus);\n}\n\n.clear-button.searchable {\n position: static;\n}\n\n.aria-live-hidden-text {\n border: 0;\n clip: rect(0, 0, 0, 0, 0);\n height: var(--ic-space-1px);\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: var(--ic-space-1px);\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-placeholder-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-text);\n}\n\n.readonly ::slotted([slot=\"icon\"]) {\n padding: 0.375rem;\n margin-bottom: 0.75rem;\n}\n\n@media (forced-colors: active) {\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .clear-button,\n ic-input-validation.menu-open .status-icon,\n ic-input-validation.menu-open .statustext {\n transition: none;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n State,\n Watch,\n forceUpdate,\n Method,\n} from \"@stencil/core\";\nimport {\n addFormResetListener,\n checkSlotInChildMutations,\n getInputDescribedByText,\n isMobileOrTablet,\n isSlotUsed,\n removeDisabledFalse,\n removeFormResetListener,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaLive,\n IcInformationStatusOrEmpty,\n IcSearchMatchPositions,\n IcMultiValueEventDetail,\n IcSizes,\n IcThemeMode,\n IcInformationStatus,\n} from \"../../utils/types\";\nimport {\n IcSelectOption,\n IcSelectOptionBase,\n IcSelectOptionFlat,\n IcSelectOptionGroup,\n} from \"./ic-select.types\";\nimport Expand from \"./assets/Expand.svg\";\nimport Clear from \"./assets/Clear.svg\";\nimport {\n IcMenuChangeEventDetail,\n IcMenuOptionIdEventDetail,\n IcOptionSelectEventDetail,\n} from \"../ic-menu/ic-menu.types\";\nimport { IcMenuCustomEvent } from \"../../components\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"tabindex\", \"title\"];\n\n/**\n * @slot helper-text - Content is set as the helper text for the select.\n * @slot icon - Content will be placed to the left of the select text input.\n */\n@Component({\n tag: \"ic-select\",\n styleUrl: \"ic-select.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Select {\n private inputId = `ic-select-input-${inputIds++}`;\n private menu?: HTMLIcMenuElement;\n private menuId = `${this.inputId}-menu`;\n private inheritedAttributes: { [k: string]: string } = {};\n private anchorEl?: HTMLElement;\n private nativeSelectElement?: HTMLSelectElement;\n private hostMutationObserver: MutationObserver | null = null;\n private clearButton?: HTMLIcButtonElement;\n private searchableSelectElement?: HTMLInputElement;\n private timeoutTimer: number | null = null;\n private hasTimedOut: boolean = false;\n private selectElement?: HTMLButtonElement;\n private initialRender: boolean = true;\n private characterKeyPressTimer?: number;\n private pressedCharacters = \"\";\n\n @Element() el!: HTMLIcSelectElement;\n\n @State() ariaActiveDescendant?: string;\n @State() debounceIcInput?: number;\n @State() hiddenInputValue: string | null;\n @State() hasError: boolean = false;\n @State() searchableSelectInputValue: string = \"\";\n @State() selectButtonAriaLiveText: string = \"\";\n @State() selectInputAriaLiveText: string = \"\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop({ reflect: true }) disabled = false;\n\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source.\n */\n @Prop() disableAutoFiltering = false;\n\n /**\n * The text displayed when there are no options in the option list.\n */\n @Prop() emptyOptionListText = \"No results found\";\n\n /**\n * The <form> element to associate the select with.\n */\n @Prop() form?: string;\n\n /**\n * If `true`, the select will fill the width of the container.\n */\n @Prop() fullWidth = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel = false;\n\n /**\n * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeDescriptionsInSearch = false;\n\n /**\n * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeGroupTitlesInSearch = false;\n\n /**\n * The label for the select.\n */\n @Prop() label!: string;\n\n /**\n * The message displayed when external loading times out.\n */\n @Prop() loadingErrorLabel = \"Loading Error\";\n\n /**\n * The message displayed whilst the options are being loaded externally.\n */\n @Prop() loadingLabel = \"Loading...\";\n\n /**\n * If `true`, multiple options can be selected.\n */\n @Prop() multiple = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder = \"Select an option\";\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the select will require a value.\n */\n @Prop() required = false;\n\n /**\n * If `true`, a searchable variant of the select will be displayed which can be typed in to filter options. This functionality is only available on the single-select variant of the select component.\n */\n @Prop() searchable = false;\n\n /**\n * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering.\n */\n @Prop() searchMatchPosition: IcSearchMatchPositions = \"anywhere\";\n\n /**\n * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown on the single select.\n */\n @Prop() selectOnEnter = false;\n\n /**\n * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select.\n */\n @Prop() showClearButton = false;\n\n /**\n * The size of the select.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * If using external filtering, set a timeout for when loading takes too long.\n */\n @Prop() timeout?: number;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * The value of the `aria-live` attribute on the validation message.\n */\n @Prop() validationAriaLive: IcAriaLive = \"polite\";\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText = \"\";\n\n /**\n * If `true` and on a mobile or tablet device, the native select element will be used instead of the custom select component for better usability.\n */\n @Prop() useNativeSelectOnMobile = true;\n\n /**\n * If `true`, the loading state will be triggered when fetching options asynchronously.\n */\n @Prop({ mutable: true }) loading = false;\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n this.hasTimedOut = false;\n\n if (newValue) {\n this.hasError = false;\n if (this.timeout) {\n if (this.timeoutTimer) {\n this.clearTimer();\n }\n this.timeoutTimer = window.setTimeout(() => {\n this.loading = false;\n this.hasTimedOut = true;\n forceUpdate(this);\n }, this.timeout);\n }\n } else {\n if (this.timeoutTimer) {\n this.clearTimer();\n }\n }\n }\n\n private clearTimer() {\n if (this.timeoutTimer) {\n clearTimeout(this.timeoutTimer);\n this.timeoutTimer = null;\n }\n }\n\n /**\n * The possible selection options.\n */\n @Prop() options: IcSelectOption[] = [];\n @State() flatOptions: IcSelectOptionFlat[] = [];\n @Watch(\"options\")\n optionsChangedHandler(): void {\n const flat = this.getFlatOptions(this.options)\n .filter((option) => option.value != null || option.label != null) // filter out options missing both value and label\n .map((option) => ({\n ...option,\n value: option.value ?? option.label, // if an option is missing a value, use the label as the value\n label: option.label ?? option.value, // vice versa\n }));\n this.flatOptions = this.getDeduplicatedOptions(flat);\n\n if (!this.initialRender) this.loading = false;\n this.clearTimer();\n this.updateSelectButtonAriaLive();\n }\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icInput` event after each keystroke.\n */\n @Prop() debounce = 0;\n @State() currDebounce = this.debounce;\n @Watch(\"debounce\")\n debounceChangedHandler(newValue: number): void {\n if (this.currDebounce !== newValue) {\n this.currDebounce = newValue;\n }\n }\n\n /**\n * The value of the select, reflected by the value of the currently selected option.\n * For the searchable variant, the value is also reflected by the user input.\n * For the multi-select variant, the value must be an array of option values.\n */\n @Prop({ mutable: true }) value: string | string[] | null = null;\n @State() initialValue = this.value;\n @Watch(\"value\")\n valueChangedHandler(newValue: string | string[] | null): void {\n const validated = this.getValidatedValue(newValue);\n\n const isEqual =\n Array.isArray(validated) && Array.isArray(this.value)\n ? validated.length === this.value.length &&\n validated.every((v, i) => v === (this.value as string[])[i])\n : validated === this.value;\n\n if (!isEqual) {\n this.value = validated;\n return;\n }\n\n this.updateSelectButtonAriaLive();\n this.icChange.emit({ value: this.value });\n }\n\n @State() open = false;\n @Watch(\"open\")\n openChangedHandler(): void {\n this.open ? this.icOpen.emit() : this.icClose.emit();\n if (!this.open) {\n this.ariaActiveDescendant = undefined;\n }\n this.handleFocusIndicatorDisplay();\n }\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() icBlur: EventEmitter<void>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() icChange: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Emitted when the clear or clear all button is clicked.\n */\n @Event() icClear: EventEmitter<void>;\n\n /**\n * Emitted when the select options menu is closed.\n */\n @Event() icClose: EventEmitter<void>;\n\n /**\n * Emitted when the select gains focus.\n */\n @Event() icFocus: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Emitted when the select options menu is opened.\n */\n @Event() icOpen: EventEmitter<void>;\n\n /**\n * Emitted when an option is selected.\n * Selecting an option will also trigger an `icChange/onIcChange` due to the value being updated.\n */\n @Event() icOptionSelect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when `multiple` is `true` and an option is deselected.\n */\n @Event() icOptionDeselect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when the 'retry loading' button is clicked for a searchable variant.\n */\n @Event() icRetryLoad: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Sets focus on the select component.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.focus();\n } else if (this.selectElement) {\n this.selectElement.focus();\n } else if (this.searchableSelectElement) {\n this.searchableSelectElement.focus();\n }\n }\n\n componentDidRender(): void {\n if (this.nativeSelectElement && !this.disabled) {\n this.setTextColor();\n }\n this.initialRender = false;\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n this.clearTimer();\n }\n\n componentDidLoad(): void {\n forceUpdate(this);\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n private getValidatedValue = (\n value: string | string[] | null\n ): string | string[] | null => {\n const validValues = this.flatOptions.map((opt) => opt.value);\n\n if (validValues.length === 0) return value;\n\n if (this.multiple) {\n if (!value) return null;\n const arr = Array.isArray(value) ? value : [value]; // Ensure value is an array\n const filtered = validValues.filter((v) => arr.includes(v)); // Keep only valid values\n return filtered.length > 0 ? filtered : null;\n } else {\n return validValues.includes(value as string) ? value : null;\n }\n };\n\n componentWillLoad(): void {\n this.optionsChangedHandler();\n this.value = this.getValidatedValue(this.value);\n this.initialValue = this.value;\n\n if (this.loading) this.loadingHandler(true);\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n private getFilteredOptions = (\n searchString: string,\n searchMatchPosition: \"anywhere\" | \"start\",\n includeDescriptionsInSearch: boolean,\n includeGroupTitlesInSearch: boolean\n ): IcSelectOption[] => {\n const search = searchString.toLowerCase();\n const match = (text: string, method: \"anywhere\" | \"start\") =>\n method === \"anywhere\" ? text.includes(search) : text.startsWith(search);\n\n return this.unflattenOptions(\n this.flatOptions.filter((option) => {\n const label = option.label.toLowerCase();\n const group = option.group?.toLowerCase() ?? \"\";\n const description = option.description?.toLowerCase() ?? \"\";\n return (\n match(label, searchMatchPosition) ||\n (includeDescriptionsInSearch &&\n match(description, searchMatchPosition)) ||\n (includeGroupTitlesInSearch && match(group, searchMatchPosition))\n );\n })\n );\n };\n\n private getOptions = (): IcSelectOption[] => {\n const options =\n this.searchable &&\n !this.disableAutoFiltering &&\n this.searchableSelectInputValue\n ? this.getFilteredOptions(\n this.searchableSelectInputValue,\n this.searchMatchPosition,\n this.includeDescriptionsInSearch,\n this.includeGroupTitlesInSearch\n )\n : this.unflattenOptions(this.flatOptions);\n\n if (this.hasTimedOut)\n return [{ label: this.loadingErrorLabel, value: \"\", timedOut: true }];\n\n if (this.loading)\n return [{ label: this.loadingLabel, value: \"\", loading: true }];\n\n if (options.length > 0) return options;\n\n return [{ label: this.emptyOptionListText, value: \"\" }];\n };\n\n private getFlatOptions = (options: IcSelectOption[]): IcSelectOptionFlat[] =>\n options.flatMap(\n (item) =>\n (\"children\" in item && item.children\n ? [...item.children.map((child) => ({ group: item.label, ...child }))]\n : [item]) as IcSelectOptionFlat[]\n );\n\n private unflattenOptions = (\n flatOptions: IcSelectOptionFlat[]\n ): IcSelectOption[] => {\n const groupMap = new Map<string, IcSelectOptionGroup>();\n const result: IcSelectOption[] = [];\n\n for (const option of flatOptions) {\n if (option.group) {\n let group = groupMap.get(option.group);\n if (!group) {\n group = { label: option.group, children: [] };\n groupMap.set(option.group, group);\n result.push(group);\n }\n const { group: _, ...rest } = option;\n group.children.push(rest as IcSelectOptionBase);\n } else {\n result.push(option);\n }\n }\n return result;\n };\n\n private getLabelFromValue = (value: string | null): string =>\n this.flatOptions.find((option) => option.value === value)?.label ?? \"\";\n\n // Construct the string that will be shown in the select input or button\n private getLabelString = (): string => {\n if (Array.isArray(this.value)) {\n return this.value.map(this.getLabelFromValue).filter(Boolean).join(\", \");\n }\n return (\n this.getLabelFromValue(this.value) ||\n (this.searchable ? \"\" : this.placeholder)\n );\n };\n\n private handleClick = (event: MouseEvent) => {\n if (event.detail !== 0) {\n this.menu?.handleClickOpen();\n }\n };\n\n private handleExpandIconMouseDown = (event: MouseEvent) => {\n if (!this.disabled) {\n event.preventDefault();\n this.searchableSelectElement?.focus();\n this.handleClick(event);\n }\n };\n\n private handleBlur = ({ relatedTarget }: FocusEvent) => {\n const target = relatedTarget as HTMLElement;\n if (\n this.el.contains(target) ||\n this.el.shadowRoot?.contains(target) ||\n this.menu?.contains(target) ||\n target === this.clearButton\n ) {\n return;\n }\n\n this.open = false;\n this.handleFocusIndicatorDisplay();\n\n if (this.searchable) {\n this.searchableSelectInputValue = \"\";\n }\n this.icBlur.emit();\n };\n\n private handleTimeoutBlur = (event: CustomEvent<{ ev: FocusEvent }>) => {\n this.handleBlur(event.detail.ev);\n };\n\n private handleFocus = () => {\n this.icFocus.emit();\n };\n\n private handleClear = () => {\n this.clearTimer();\n this.loading = false;\n this.value = null;\n this.searchableSelectInputValue = \"\";\n\n this.icClear.emit();\n\n this.setFocus();\n };\n\n private setTextColor = () => {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.className =\n this.nativeSelectElement.selectedIndex === 0\n ? \"placeholder\"\n : \"select-option-selected\";\n }\n };\n\n private handleNativeSelectChange = () => {\n if (this.nativeSelectElement) {\n this.icOptionSelect.emit({ value: this.nativeSelectElement.value });\n this.icChange.emit({ value: this.nativeSelectElement.value });\n }\n this.setTextColor();\n };\n\n private handleFocusIndicatorDisplay = () => {\n const focusIndicator =\n this.el.shadowRoot?.querySelector(\".focus-indicator\");\n\n if (focusIndicator) {\n if (this.open) {\n focusIndicator.classList.add(\"focus-indicator-enabled\");\n } else {\n focusIndicator.classList.remove(\"focus-indicator-enabled\");\n }\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (!(event.key === \" \" && this.pressedCharacters.length > 0)) {\n if (this.open) {\n this.menu?.handleMenuKeyDown(event);\n } else {\n this.menu?.handleKeyboardOpen(event);\n }\n }\n\n if (\n !this.multiple &&\n !this.searchable &&\n !this.selectOnEnter &&\n /^[a-zA-Z0-9 ]$/.test(event.key)\n ) {\n this.handleCharacterKeyDown(event.key);\n }\n };\n\n private handleCharacterKeyDown = (key: string) => {\n // Only close menu when space is pressed if not being used alongside character keys to quickly select options\n if (this.open && key === \" \" && this.pressedCharacters.length === 0) {\n this.open = false;\n }\n\n if (key.length !== 1 || this.searchable) {\n this.pressedCharacters = \"\";\n return;\n }\n\n window.clearTimeout(this.characterKeyPressTimer);\n this.characterKeyPressTimer = window.setTimeout(\n () => (this.pressedCharacters = \"\"),\n 1000\n );\n\n if (key !== \" \" || !!this.pressedCharacters) {\n this.pressedCharacters += key;\n const filteredOptions = this.getFilteredOptions(\n this.pressedCharacters,\n \"start\",\n false,\n false\n );\n\n if (filteredOptions.length > 0) {\n const firstOption = filteredOptions[0];\n if (\"children\" in firstOption) {\n this.value = firstOption.children[0].value;\n } else {\n this.value = firstOption.value;\n }\n }\n }\n };\n\n private handleNativeSelectKeyDown = (event: KeyboardEvent) => {\n this.handleKeyDown(event);\n };\n\n private handleSelectChange = (\n event: CustomEvent<IcOptionSelectEventDetail>\n ) => {\n const { value } = event.detail;\n if (!value || this.getLabelFromValue(value) === this.emptyOptionListText) {\n this.value = null;\n return;\n }\n\n if (this.multiple) {\n let valueArray = Array.isArray(this.value) ? [...this.value] : [];\n const index = valueArray.indexOf(value);\n\n if (index > -1) {\n valueArray.splice(index, 1);\n this.icOptionDeselect.emit({ value });\n } else {\n this.icOptionSelect.emit({ value });\n valueArray.push(value);\n valueArray = this.getValidatedValue(valueArray) as string[];\n }\n this.value = valueArray.length ? valueArray : null;\n } else {\n this.icOptionSelect.emit({ value });\n this.value = value;\n if (this.searchable) this.searchableSelectInputValue = \"\";\n }\n };\n\n private handleSelectAllChange = ({\n detail,\n }: CustomEvent<{ select: boolean }>) => {\n const allSelectableValues = this.flatOptions\n .filter((option) => !option.disabled)\n .map((option) => option.value);\n if (detail.select) {\n allSelectableValues\n .filter((value) => !((this.value ?? []) as string[]).includes(value))\n .forEach((value) => {\n this.icOptionSelect.emit({ value });\n });\n\n this.value = allSelectableValues;\n } else {\n (this.value as string[]).forEach((value) =>\n this.icOptionDeselect.emit({ value })\n );\n this.value = null;\n }\n };\n\n private handleFormReset = () => {\n this.value = this.initialValue;\n this.searchableSelectInputValue = \"\";\n if (this.searchable) {\n this.hiddenInputValue = this.initialValue as string;\n }\n };\n\n private handleRetry = () => {\n this.clearTimer();\n this.hasTimedOut = false;\n this.hasError = false;\n this.loading = true;\n this.icRetryLoad.emit({\n value: this.searchable\n ? this.searchableSelectInputValue\n : this.hiddenInputValue,\n });\n this.setFocus();\n };\n\n private handleSearchableSelectInput = (event: Event) => {\n this.updateSearchableSelectResultAriaLive();\n if (!this.multiple) {\n this.value = null;\n }\n\n this.searchableSelectInputValue =\n (event.target as HTMLInputElement).value ?? \"\";\n this.open = true;\n\n clearTimeout(this.debounceIcInput);\n this.debounceIcInput = window.setTimeout(\n () => this.icInput.emit({ value: this.searchableSelectInputValue }),\n this.currDebounce\n );\n };\n\n private hostMutationCallback = (mutationList: MutationRecord[]) => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private updateSelectButtonAriaLive = () => {\n const value_label = this.getLabelFromValue(this.value as string);\n this.selectButtonAriaLiveText = this.multiple\n ? `${this.value ? this.value.length : 0} of ${\n this.flatOptions.length\n } selected`\n : this.value\n ? value_label ?? `${value_label} selected`\n : \"\";\n };\n\n private updateSearchableSelectResultAriaLive = () => {\n this.selectInputAriaLiveText =\n this.getOptions()?.[0]?.label == this.emptyOptionListText\n ? this.emptyOptionListText\n : \"\";\n };\n\n private updateAriaActiveDescendant = (\n event: IcMenuCustomEvent<IcMenuOptionIdEventDetail>\n ) => {\n this.ariaActiveDescendant = event.detail.optionId;\n };\n\n private handleMenuChange = (event: CustomEvent<IcMenuChangeEventDetail>) => {\n this.open = event.detail.open;\n this.pressedCharacters = \"\";\n };\n\n private getDeduplicatedOptions = (\n flatOptions: IcSelectOptionFlat[]\n ): IcSelectOptionFlat[] => {\n const seen = new Set();\n return flatOptions.filter((option) => {\n if (option.value && seen.has(option.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`\n );\n return false;\n }\n if (option.value) seen.add(option.value);\n return true;\n });\n };\n\n private renderNativeOption = (option: IcSelectOptionBase) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n >\n {option.label}\n </option>\n );\n\n render() {\n const {\n disabled,\n searchable,\n size,\n fullWidth,\n theme,\n readonly,\n hideLabel,\n inputId,\n label,\n helperText,\n required,\n value,\n options,\n menuId,\n multiple,\n validationStatus,\n open,\n showClearButton,\n selectOnEnter,\n loading,\n searchableSelectInputValue,\n validationText,\n validationAriaLive,\n form,\n ariaActiveDescendant,\n placeholder,\n name,\n inheritedAttributes,\n selectInputAriaLiveText,\n selectButtonAriaLiveText,\n } = this;\n\n const hasValue = !!value;\n const hasInput = !!searchableSelectInputValue;\n const isClearable =\n !disabled &&\n ((searchable && (hasInput || hasValue)) ||\n (!searchable && hasValue && !loading && showClearButton));\n\n const showValidation = !!validationStatus && !disabled;\n\n const invalid = validationStatus === IcInformationStatus.Error;\n\n const describedBy = getInputDescribedByText(\n this.el,\n inputId,\n helperText !== \"\",\n showValidation\n ).trim();\n\n const menuOptions = this.getOptions();\n const noOptions =\n disabled ||\n (menuOptions.length === 1 &&\n (menuOptions[0].label === this.emptyOptionListText ||\n \"loading\" in menuOptions[0] ||\n \"timedOut\" in menuOptions[0]));\n\n renderHiddenInput(this.el, value as string, name || inputId, disabled);\n\n const ClearButton = () => (\n <ic-button\n ref={(el) => (this.clearButton = el)}\n id=\"clear-button\"\n aria-label={this.searchable ? \"Clear input\" : \"Clear selection\"}\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onBlur={this.handleBlur}\n size={size}\n variant=\"icon-tertiary\"\n ></ic-button>\n );\n\n const NativeSelect = () => (\n <select\n ref={(el) => (this.nativeSelectElement = el)}\n disabled={disabled}\n onChange={this.handleNativeSelectChange}\n required={required}\n id={inputId}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid ? \"true\" : \"false\"}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleNativeSelectKeyDown}\n form={form}\n {...inheritedAttributes}\n >\n <option value=\"\" selected disabled={!showClearButton}>\n {placeholder}\n </option>\n {options.map((option) =>\n \"children\" in option ? (\n <optgroup label={option.label}>\n {option.children.map((child) =>\n this.renderNativeOption(child as IcSelectOptionBase)\n )}\n </optgroup>\n ) : (\n this.renderNativeOption(option as IcSelectOptionBase)\n )\n )}\n </select>\n );\n\n const SelectButton = () => (\n <div class=\"select-container\">\n <button\n class=\"select-input\"\n role=\"combobox\"\n ref={(el) => (this.selectElement = el)}\n id={inputId}\n aria-label={`${label}, ${\n (multiple && value\n ? `${value.length} of ${\n this.flatOptions.length\n } selected, ${this.getLabelString()}`\n : this.getLabelString()) || placeholder\n }`}\n onClick={this.handleClick}\n aria-describedby={describedBy}\n aria-invalid={invalid ? \"true\" : \"false\"}\n aria-haspopup=\"listbox\"\n aria-expanded={`${open}`}\n aria-controls={menuId}\n aria-required={`${required}`}\n disabled={disabled}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n aria-activedescendant={ariaActiveDescendant}\n >\n <ic-typography\n variant=\"body\"\n class={{\n \"value-text\": true,\n \"with-clear-button\": !!isClearable,\n placeholder: !value,\n }}\n >\n {this.getLabelString()}\n </ic-typography>\n <div class=\"select-input-end\">\n {isClearable && <div class=\"divider\"></div>}\n <span\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n </div>\n </button>\n {isClearable && <ClearButton></ClearButton>}\n <div\n aria-live=\"polite\"\n aria-atomic=\"true\"\n class=\"aria-live-hidden-text\"\n >\n {selectButtonAriaLiveText}\n </div>\n </div>\n );\n\n const SelectInput = () => (\n <div class=\"searchable-select-container\">\n <input\n class={{\n \"value-text\": true,\n \"select-input\": true,\n \"with-clear-button\": !!searchableSelectInputValue,\n }}\n role=\"combobox\"\n autocomplete=\"off\"\n aria-label={label}\n aria-describedby={describedBy}\n aria-activedescendant={ariaActiveDescendant}\n aria-autocomplete=\"list\"\n aria-expanded={`${open}`}\n aria-invalid={invalid ? \"true\" : \"false\"}\n aria-required={`${required}`}\n aria-controls={menuId}\n ref={(el) => (this.searchableSelectElement = el)}\n id={inputId}\n value={\n multiple\n ? \"\"\n : value\n ? this.getLabelString()\n : searchableSelectInputValue || undefined\n }\n disabled={disabled}\n placeholder={placeholder}\n onInput={this.handleSearchableSelectInput}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n form={form}\n ></input>\n {isClearable && (\n <div class=\"clear-button-container\">\n <ClearButton></ClearButton>\n <div class=\"divider\"></div>\n </div>\n )}\n <span\n onMouseDown={this.handleExpandIconMouseDown}\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n <div aria-live=\"polite\" role=\"status\" class=\"aria-live-hidden-text\">\n {selectInputAriaLiveText}\n </div>\n </div>\n );\n\n const ReadOnly = () => (\n <ic-typography>\n <p>\n {this.getLabelString() === placeholder ? \"\" : this.getLabelString()}\n </p>\n </ic-typography>\n );\n\n return (\n <Host\n class={{\n \"ic-select-disabled\": disabled,\n \"ic-select-searchable\": searchable,\n [`ic-select-${size}`]: size !== \"medium\",\n \"ic-select-full-width\": fullWidth,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <ic-input-container readonly={readonly}>\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n readonly={readonly}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n <ic-input-component-container\n ref={(el) => (this.anchorEl = el)}\n class={{ \"menu-open\": open }}\n size={size}\n fullWidth={fullWidth}\n disabled={disabled}\n readonly={readonly}\n validationStatus={validationStatus}\n >\n {isSlotUsed(this.el, \"icon\") &&\n !disabled &&\n (!readonly || !!value) && (\n <span\n slot=\"left-icon\"\n class={{\n readonly,\n \"has-value\": !!value,\n }}\n >\n <slot name=\"icon\" />\n </span>\n )}\n {isMobileOrTablet() && this.useNativeSelectOnMobile && !multiple ? (\n <NativeSelect />\n ) : readonly ? (\n <ReadOnly />\n ) : !searchable ? (\n <SelectButton />\n ) : (\n <SelectInput />\n )}\n </ic-input-component-container>\n {!(\n isMobileOrTablet() &&\n this.useNativeSelectOnMobile &&\n !multiple\n ) && (\n <ic-menu\n ref={(el) => (this.menu = el)}\n class={{ \"no-results\": noOptions }}\n inputEl={\n searchable ? this.searchableSelectElement : this.selectElement\n }\n allowMenuFocus={false}\n inputLabel={label}\n anchorEl={this.anchorEl}\n size={size}\n menuId={menuId}\n open={open}\n options={this.getOptions()}\n value={multiple ? (value as string[]) : (value as string)}\n fullWidth={fullWidth}\n selectOnEnter={selectOnEnter}\n onMenuStateChange={this.handleMenuChange}\n onMenuOptionSelect={this.handleSelectChange}\n onMenuOptionSelectAll={this.handleSelectAllChange}\n onTimeoutBlur={this.handleTimeoutBlur}\n onMenuOptionId={this.updateAriaActiveDescendant}\n onClick={this.setFocus}\n parentEl={this.el}\n activationType={\n searchable || multiple || selectOnEnter ? \"manual\" : \"automatic\"\n }\n onRetryButtonClicked={this.handleRetry}\n closeOnSelect={!multiple}\n multiSelect={multiple}\n searchableSelect={searchable}\n ></ic-menu>\n )}\n <ic-input-validation\n class={{\n \"menu-open\": open,\n }}\n ariaLiveMode={validationAriaLive}\n status={showValidation ? validationStatus : \"\"}\n message={showValidation ? validationText : \"\"}\n for={inputId}\n ></ic-input-validation>\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"ic-select2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,u0RAAu0R,CAAC;AAC51R,uBAAe,WAAW;;;;;;;;;;;;;;AC+C1B,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,kBAAkB,GAAG,CAAC,GAAG,iBAAiB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;MAa1D,MAAM;IAPnB;;;;;;;;;;;;;;QAQU,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;QAE1C,WAAM,GAAG,GAAG,IAAI,CAAC,OAAO,OAAO,CAAC;QAChC,wBAAmB,GAA4B,EAAE,CAAC;QAGlD,yBAAoB,GAA4B,IAAI,CAAC;QAGrD,iBAAY,GAAkB,IAAI,CAAC;QACnC,gBAAW,GAAY,KAAK,CAAC;QAE7B,kBAAa,GAAY,IAAI,CAAC;QAE9B,sBAAiB,GAAG,EAAE,CAAC;QAOtB,aAAQ,GAAY,KAAK,CAAC;QAC1B,+BAA0B,GAAW,EAAE,CAAC;QACxC,6BAAwB,GAAW,EAAE,CAAC;QACtC,4BAAuB,GAAW,EAAE,CAAC;;;;QAKrB,aAAQ,GAAG,KAAK,CAAC;;;;QAUlC,yBAAoB,GAAG,KAAK,CAAC;;;;QAK7B,wBAAmB,GAAG,kBAAkB,CAAC;;;;QAUzC,cAAS,GAAG,KAAK,CAAC;;;;QAKlB,eAAU,GAAG,EAAE,CAAC;;;;QAKhB,cAAS,GAAG,KAAK,CAAC;;;;QAKlB,gCAA2B,GAAG,KAAK,CAAC;;;;QAKpC,+BAA0B,GAAG,KAAK,CAAC;;;;QAUnC,sBAAiB,GAAG,eAAe,CAAC;;;;QAKpC,iBAAY,GAAG,YAAY,CAAC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ACD,YAAY,EAAE,kBAAkB,EAChC,MAAM,EAAE,cAAc,GAAG,gBAAgB,GAAG,EAAE,EAC9C,OAAO,EAAE,cAAc,GAAG,cAAc,GAAG,EAAE,EAC7C,GAAG,EAAE,OAAO,GACS,CACJ,CAChB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-select/ic-select.css?tag=ic-select&encapsulation=shadow","src/components/ic-select/ic-select.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --input-width: Width of the input field\n * @prop --menu-width: Width of the dropdown menu\n * @prop --ic-z-index-menu: z-index of select menu\n */\n\n:host {\n display: block;\n position: relative;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n --menu-max-height: 100px;\n --border-color: var(--ic-select-field-border);\n --border-color-hover: var(--ic-select-field-border-hover);\n --border-color-pressed: var(--ic-select-field-border-pressed);\n --border-color-disabled: var(--ic-select-field-border-disabled);\n --border-color-error: var(--ic-select-field-border-error);\n --border-color-error-hover: var(--ic-select-field-border-error-hover);\n --border-color-error-pressed: var(--ic-select-field-border-error-pressed);\n --border-color-success: var(--ic-select-field-border-success);\n --border-color-success-hover: var(--ic-select-field-border-success-hover);\n --border-color-success-pressed: var(--ic-select-field-border-success-pressed);\n --border-color-warning: var(--ic-select-field-border-warning);\n --border-color-warning-hover: var(--ic-select-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-select-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-select-field-label);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle\n );\n --ic-input-validation-status-text-color: var(--ic-select-state-text);\n --ic-input-validation-error: var(--ic-select-state-icon-error);\n --ic-input-validation-warning-icon-color: var(--ic-select-state-icon-warning);\n --ic-input-validation-success-icon-color: var(--ic-select-state-icon-success);\n --menu-item-text-color: var(--ic-select-list-option-text);\n --menu-bg-color: var(--ic-select-list-option-background);\n --menu-border-color: var(--ic-select-dropdown-list-border);\n}\n\n:host(.ic-select-disabled) {\n --ic-input-label-text-color: var(--ic-select-field-label-disabled);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle-disabled\n );\n}\n\n:host(.ic-select-full-width) {\n width: 100%;\n}\n\nic-input-component-container.menu-open {\n --border-color: var(--ic-select-field-border-pressed);\n}\n\nic-input-validation .status-icon,\nic-input-validation .statustext {\n visibility: visible;\n}\n\nic-input-validation.menu-open .status-icon,\nic-input-validation.menu-open .statustext {\n visibility: hidden;\n transition: visibility 0s;\n}\n\nic-input-label {\n margin-bottom: var(--ic-space-xs);\n}\n\nselect {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n height: 100%;\n padding-left: 0.375rem;\n appearance: none;\n background-repeat: no-repeat;\n background-position: right 0.375rem center;\n background-image: var(--ic-select-mobile-dropdown-icon);\n caret-color: var(--ic-select-input-field-text-cursor);\n}\n\nselect option,\n.select-option-selected {\n color: var(--ic-select-list-option-text);\n}\n\nselect:disabled {\n color: var(--ic-select-content-text-disabled);\n background-image: var(--ic-select-mobile-dropdown-icon-disabled);\n}\n\nselect:focus {\n border: 0;\n outline: 0;\n}\n\nselect:not([disabled]) {\n cursor: pointer;\n}\n\n.select-container {\n width: 100%;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.select-input {\n width: 100%;\n height: 100%;\n padding: 0 0.375rem;\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n}\n\n.select-input:focus {\n outline: none;\n}\n\n.select-input[disabled] {\n pointer-events: none;\n}\n\n:host(.ic-select-searchable) .select-input {\n cursor: auto;\n}\n\n.select-input.with-clear-button {\n padding-right: 0;\n}\n\n.value-text {\n max-width: calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));\n box-sizing: border-box;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n margin-bottom: 0 !important;\n}\n\n.value-text.with-clear-button {\n padding-right: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n.searchable-select-container {\n align-items: center;\n display: flex;\n width: 100%;\n position: relative;\n}\n\n.expand-icon {\n height: var(--ic-space-lg);\n padding-left: var(--ic-space-xxs);\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon > svg {\n display: inline-block;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-disabled) .expand-icon,\n:host(.ic-select-disabled) .expand-icon > svg > path {\n color: var(--ic-select-disabled-expand-icon-color);\n}\n\n:host(.ic-select-searchable) .expand-icon {\n padding-left: 0;\n height: 2.25rem;\n}\n\n:host(.ic-select-searchable) .expand-icon > svg {\n height: 2.25rem;\n padding: 0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs);\n}\n\n:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon > svg {\n cursor: pointer;\n}\n\n.expand-icon-open {\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon-open,\n:host(.ic-select-searchable) .expand-icon-open {\n transform: rotateX(180deg);\n}\n\n.placeholder {\n color: var(--ic-select-content-placeholder-text);\n}\n\n:host(.ic-select-disabled) .value-text,\n:host(.ic-select-disabled) .select-input,\n:host(.ic-select-disabled) .placeholder,\n:host(.ic-select-disabled.ic-select-searchable) .select-input::placeholder {\n color: var(--ic-select-content-text-disabled);\n}\n\n.select-input-end {\n display: flex;\n align-items: center;\n}\n\n.clear-button-container {\n display: flex;\n align-items: center;\n}\n\n.divider {\n width: var(--ic-space-1px);\n background-color: var(--ic-select-content-divider);\n margin: var(--ic-space-xxs) 0;\n border-radius: var(--ic-space-1px);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-small) .divider {\n height: var(--ic-space-md);\n}\n\n:host(.ic-select-large) .divider {\n height: var(--ic-space-xl);\n}\n\n.clear-button {\n color: var(--ic-select-clear-button);\n position: absolute;\n right: calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n}\n\n.clear-button:focus,\n.clear-button:active {\n background-color: var(--ic-color-focus-inner);\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer);\n border-radius: 0.25rem;\n}\n\n.clear-button:focus,\n.clear-button:active * {\n fill: var(--ic-atoms-input-clear-button-focus);\n}\n\n.clear-button.searchable {\n position: static;\n}\n\n.aria-live-hidden-text {\n border: 0;\n clip: rect(0, 0, 0, 0, 0);\n height: var(--ic-space-1px);\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: var(--ic-space-1px);\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-placeholder-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-text);\n}\n\n.readonly ::slotted([slot=\"icon\"]) {\n padding: 0.375rem;\n margin-bottom: 0.75rem;\n}\n\n@media (forced-colors: active) {\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .clear-button,\n ic-input-validation.menu-open .status-icon,\n ic-input-validation.menu-open .statustext {\n transition: none;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n State,\n Watch,\n forceUpdate,\n Method,\n} from \"@stencil/core\";\nimport {\n addFormResetListener,\n checkSlotInChildMutations,\n getInputDescribedByText,\n isMobileOrTablet,\n isSlotUsed,\n removeDisabledFalse,\n removeFormResetListener,\n renderHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaLive,\n IcInformationStatusOrEmpty,\n IcSearchMatchPositions,\n IcMultiValueEventDetail,\n IcSizes,\n IcThemeMode,\n IcInformationStatus,\n} from \"../../utils/types\";\nimport {\n IcSelectOption,\n IcSelectOptionBase,\n IcSelectOptionFlat,\n IcSelectOptionGroup,\n} from \"./ic-select.types\";\nimport Expand from \"./assets/Expand.svg\";\nimport Clear from \"./assets/Clear.svg\";\nimport {\n IcMenuChangeEventDetail,\n IcMenuOptionIdEventDetail,\n IcOptionSelectEventDetail,\n} from \"../ic-menu/ic-menu.types\";\nimport { IcMenuCustomEvent } from \"../../components\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"tabindex\", \"title\"];\n\n/**\n * @slot helper-text - Content is set as the helper text for the select.\n * @slot icon - Content will be placed to the left of the select text input.\n */\n@Component({\n tag: \"ic-select\",\n styleUrl: \"ic-select.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Select {\n private inputId = `ic-select-input-${inputIds++}`;\n private menu?: HTMLIcMenuElement;\n private menuId = `${this.inputId}-menu`;\n private inheritedAttributes: { [k: string]: string } = {};\n private anchorEl?: HTMLElement;\n private nativeSelectElement?: HTMLSelectElement;\n private hostMutationObserver: MutationObserver | null = null;\n private clearButton?: HTMLIcButtonElement;\n private searchableSelectElement?: HTMLInputElement;\n private timeoutTimer: number | null = null;\n private hasTimedOut: boolean = false;\n private selectElement?: HTMLButtonElement;\n private initialRender: boolean = true;\n private characterKeyPressTimer?: number;\n private pressedCharacters = \"\";\n\n @Element() el!: HTMLIcSelectElement;\n\n @State() ariaActiveDescendant?: string;\n @State() debounceIcInput?: number;\n @State() hiddenInputValue: string | null;\n @State() hasError: boolean = false;\n @State() searchableSelectInputValue: string = \"\";\n @State() selectButtonAriaLiveText: string = \"\";\n @State() selectInputAriaLiveText: string = \"\";\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop({ reflect: true }) disabled = false;\n\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source.\n */\n @Prop() disableAutoFiltering = false;\n\n /**\n * The text displayed when there are no options in the option list.\n */\n @Prop() emptyOptionListText = \"No results found\";\n\n /**\n * The <form> element to associate the select with.\n */\n @Prop() form?: string;\n\n /**\n * If `true`, the select will fill the width of the container.\n */\n @Prop() fullWidth = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel = false;\n\n /**\n * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeDescriptionsInSearch = false;\n\n /**\n * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeGroupTitlesInSearch = false;\n\n /**\n * The label for the select.\n */\n @Prop() label!: string;\n\n /**\n * The message displayed when external loading times out.\n */\n @Prop() loadingErrorLabel = \"Loading Error\";\n\n /**\n * The message displayed whilst the options are being loaded externally.\n */\n @Prop() loadingLabel = \"Loading...\";\n\n /**\n * If `true`, multiple options can be selected.\n */\n @Prop() multiple = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder = \"Select an option\";\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the select will require a value.\n */\n @Prop() required = false;\n\n /**\n * If `true`, a searchable variant of the select will be displayed which can be typed in to filter options. This functionality is only available on the single-select variant of the select component.\n */\n @Prop() searchable = false;\n\n /**\n * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering.\n */\n @Prop() searchMatchPosition: IcSearchMatchPositions = \"anywhere\";\n\n /**\n * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown on the single select.\n */\n @Prop() selectOnEnter = false;\n\n /**\n * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select.\n */\n @Prop() showClearButton = false;\n\n /**\n * The size of the select.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * If using external filtering, set a timeout for when loading takes too long.\n */\n @Prop() timeout?: number;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * The value of the `aria-live` attribute on the validation message.\n */\n @Prop() validationAriaLive: IcAriaLive = \"polite\";\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText = \"\";\n\n /**\n * If `true` and on a mobile or tablet device, the native select element will be used instead of the custom select component for better usability.\n */\n @Prop() useNativeSelectOnMobile = true;\n\n /**\n * If `true`, the loading state will be triggered when fetching options asynchronously.\n */\n @Prop({ mutable: true }) loading = false;\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n this.hasTimedOut = false;\n\n if (newValue) {\n this.hasError = false;\n if (this.timeout) {\n if (this.timeoutTimer) {\n this.clearTimer();\n }\n this.timeoutTimer = window.setTimeout(() => {\n this.loading = false;\n this.hasTimedOut = true;\n forceUpdate(this);\n }, this.timeout);\n }\n } else {\n if (this.timeoutTimer) {\n this.clearTimer();\n }\n }\n }\n\n private clearTimer() {\n if (this.timeoutTimer) {\n clearTimeout(this.timeoutTimer);\n this.timeoutTimer = null;\n }\n }\n\n /**\n * The possible selection options.\n */\n @Prop() options: IcSelectOption[] = [];\n @State() flatOptions: IcSelectOptionFlat[] = [];\n @Watch(\"options\")\n optionsChangedHandler(): void {\n const flat = this.getFlatOptions(this.options)\n .filter((option) => option.value != null || option.label != null) // filter out options missing both value and label\n .map((option) => ({\n ...option,\n value: option.value ?? option.label, // if an option is missing a value, use the label as the value\n label: option.label ?? option.value, // vice versa\n }));\n this.flatOptions = this.getDeduplicatedOptions(flat);\n\n if (!this.initialRender) this.loading = false;\n this.clearTimer();\n this.updateSelectButtonAriaLive();\n }\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icInput` event after each keystroke.\n */\n @Prop() debounce = 0;\n @State() currDebounce = this.debounce;\n @Watch(\"debounce\")\n debounceChangedHandler(newValue: number): void {\n if (this.currDebounce !== newValue) {\n this.currDebounce = newValue;\n }\n }\n\n /**\n * The value of the select, reflected by the value of the currently selected option.\n * For the searchable variant, the value is also reflected by the user input.\n * For the multi-select variant, the value must be an array of option values.\n */\n @Prop({ mutable: true }) value: string | string[] | null = null;\n @State() initialValue = this.value;\n @Watch(\"value\")\n valueChangedHandler(newValue: string | string[] | null): void {\n const validated = this.getValidatedValue(newValue);\n\n const isEqual =\n Array.isArray(validated) && Array.isArray(this.value)\n ? validated.length === this.value.length &&\n validated.every((v, i) => v === (this.value as string[])[i])\n : validated === this.value;\n\n if (!isEqual) {\n this.value = validated;\n return;\n }\n\n this.updateSelectButtonAriaLive();\n this.icChange.emit({ value: this.value });\n }\n\n @State() open = false;\n @Watch(\"open\")\n openChangedHandler(): void {\n this.open ? this.icOpen.emit() : this.icClose.emit();\n if (!this.open) {\n this.ariaActiveDescendant = undefined;\n }\n this.handleFocusIndicatorDisplay();\n }\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() icBlur: EventEmitter<void>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() icChange: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Emitted when the clear or clear all button is clicked.\n */\n @Event() icClear: EventEmitter<void>;\n\n /**\n * Emitted when the select options menu is closed.\n */\n @Event() icClose: EventEmitter<void>;\n\n /**\n * Emitted when the select gains focus.\n */\n @Event() icFocus: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Emitted when the select options menu is opened.\n */\n @Event() icOpen: EventEmitter<void>;\n\n /**\n * Emitted when an option is selected.\n * Selecting an option will also trigger an `icChange/onIcChange` due to the value being updated.\n */\n @Event() icOptionSelect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when `multiple` is `true` and an option is deselected.\n */\n @Event() icOptionDeselect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when the 'retry loading' button is clicked for a searchable variant.\n */\n @Event() icRetryLoad: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Sets focus on the select component.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.focus();\n } else if (this.selectElement) {\n this.selectElement.focus();\n } else if (this.searchableSelectElement) {\n this.searchableSelectElement.focus();\n }\n }\n\n componentDidRender(): void {\n if (this.nativeSelectElement && !this.disabled) {\n this.setTextColor();\n }\n this.initialRender = false;\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n this.clearTimer();\n }\n\n componentDidLoad(): void {\n forceUpdate(this);\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n private getValidatedValue = (\n value: string | string[] | null\n ): string | string[] | null => {\n const validValues = this.flatOptions.map((opt) => opt.value);\n\n if (validValues.length === 0) return value;\n\n if (this.multiple) {\n if (!value) return null;\n const arr = Array.isArray(value) ? value : [value]; // Ensure value is an array\n const filtered = validValues.filter((v) => arr.includes(v)); // Keep only valid values\n return filtered.length > 0 ? filtered : null;\n } else {\n return validValues.includes(value as string) ? value : null;\n }\n };\n\n componentWillLoad(): void {\n this.optionsChangedHandler();\n this.value = this.getValidatedValue(this.value);\n this.initialValue = this.value;\n\n if (this.loading) this.loadingHandler(true);\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n private getFilteredOptions = (\n searchString: string,\n searchMatchPosition: \"anywhere\" | \"start\",\n includeDescriptionsInSearch: boolean,\n includeGroupTitlesInSearch: boolean\n ): IcSelectOption[] => {\n const search = searchString.toLowerCase();\n const match = (text: string, method: \"anywhere\" | \"start\") =>\n method === \"anywhere\" ? text.includes(search) : text.startsWith(search);\n\n return this.unflattenOptions(\n this.flatOptions.filter((option) => {\n const label = option.label.toLowerCase();\n const group = option.group?.toLowerCase() ?? \"\";\n const description = option.description?.toLowerCase() ?? \"\";\n return (\n match(label, searchMatchPosition) ||\n (includeDescriptionsInSearch &&\n match(description, searchMatchPosition)) ||\n (includeGroupTitlesInSearch && match(group, searchMatchPosition))\n );\n })\n );\n };\n\n private getOptions = (): IcSelectOption[] => {\n const options =\n this.searchable &&\n !this.disableAutoFiltering &&\n this.searchableSelectInputValue\n ? this.getFilteredOptions(\n this.searchableSelectInputValue,\n this.searchMatchPosition,\n this.includeDescriptionsInSearch,\n this.includeGroupTitlesInSearch\n )\n : this.unflattenOptions(this.flatOptions);\n\n if (this.hasTimedOut)\n return [{ label: this.loadingErrorLabel, value: \"\", timedOut: true }];\n\n if (this.loading)\n return [{ label: this.loadingLabel, value: \"\", loading: true }];\n\n if (options.length > 0) return options;\n\n return [{ label: this.emptyOptionListText, value: \"\" }];\n };\n\n private getFlatOptions = (options: IcSelectOption[]): IcSelectOptionFlat[] =>\n options.flatMap(\n (item) =>\n (\"children\" in item && item.children\n ? [...item.children.map((child) => ({ group: item.label, ...child }))]\n : [item]) as IcSelectOptionFlat[]\n );\n\n private unflattenOptions = (\n flatOptions: IcSelectOptionFlat[]\n ): IcSelectOption[] => {\n const groupMap = new Map<string, IcSelectOptionGroup>();\n const result: IcSelectOption[] = [];\n\n for (const option of flatOptions) {\n if (option.group) {\n let group = groupMap.get(option.group);\n if (!group) {\n group = { label: option.group, children: [] };\n groupMap.set(option.group, group);\n result.push(group);\n }\n const { group: _, ...rest } = option;\n group.children.push(rest as IcSelectOptionBase);\n } else {\n result.push(option);\n }\n }\n return result;\n };\n\n private getLabelFromValue = (value: string | null): string =>\n this.flatOptions.find((option) => option.value === value)?.label ?? \"\";\n\n // Construct the string that will be shown in the select input or button\n private getLabelString = (): string => {\n if (Array.isArray(this.value)) {\n return this.value.map(this.getLabelFromValue).filter(Boolean).join(\", \");\n }\n return (\n this.getLabelFromValue(this.value) ||\n (this.searchable ? \"\" : this.placeholder)\n );\n };\n\n private handleClick = (event: MouseEvent) => {\n if (event.detail !== 0) {\n this.menu?.handleClickOpen();\n }\n };\n\n private handleExpandIconMouseDown = (event: MouseEvent) => {\n if (!this.disabled) {\n event.preventDefault();\n this.searchableSelectElement?.focus();\n this.handleClick(event);\n }\n };\n\n private handleBlur = ({ relatedTarget }: FocusEvent) => {\n const target = relatedTarget as HTMLElement;\n if (\n this.el.contains(target) ||\n this.el.shadowRoot?.contains(target) ||\n this.menu?.contains(target) ||\n target === this.clearButton\n ) {\n return;\n }\n\n this.open = false;\n this.handleFocusIndicatorDisplay();\n\n if (this.searchable) {\n this.searchableSelectInputValue = \"\";\n }\n this.icBlur.emit();\n };\n\n private handleTimeoutBlur = (event: CustomEvent<{ ev: FocusEvent }>) => {\n this.handleBlur(event.detail.ev);\n };\n\n private handleFocus = () => {\n this.icFocus.emit();\n };\n\n private handleClear = () => {\n this.clearTimer();\n this.loading = false;\n this.value = null;\n this.searchableSelectInputValue = \"\";\n\n this.icClear.emit();\n\n this.setFocus();\n };\n\n private setTextColor = () => {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.className =\n this.nativeSelectElement.selectedIndex === 0\n ? \"placeholder\"\n : \"select-option-selected\";\n }\n };\n\n private handleNativeSelectChange = () => {\n if (this.nativeSelectElement) {\n this.icOptionSelect.emit({ value: this.nativeSelectElement.value });\n this.icChange.emit({ value: this.nativeSelectElement.value });\n }\n this.setTextColor();\n };\n\n private handleFocusIndicatorDisplay = () => {\n const focusIndicator =\n this.el.shadowRoot?.querySelector(\".focus-indicator\");\n\n if (focusIndicator) {\n if (this.open) {\n focusIndicator.classList.add(\"focus-indicator-enabled\");\n } else {\n focusIndicator.classList.remove(\"focus-indicator-enabled\");\n }\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (!(event.key === \" \" && this.pressedCharacters.length > 0)) {\n if (this.open) {\n this.menu?.handleMenuKeyDown(event);\n } else {\n this.menu?.handleKeyboardOpen(event);\n }\n }\n\n if (\n !this.multiple &&\n !this.searchable &&\n !this.selectOnEnter &&\n /^[a-zA-Z0-9 ]$/.test(event.key)\n ) {\n this.handleCharacterKeyDown(event.key);\n }\n };\n\n private handleCharacterKeyDown = (key: string) => {\n // Only close menu when space is pressed if not being used alongside character keys to quickly select options\n if (this.open && key === \" \" && this.pressedCharacters.length === 0) {\n this.open = false;\n }\n\n if (key.length !== 1 || this.searchable) {\n this.pressedCharacters = \"\";\n return;\n }\n\n window.clearTimeout(this.characterKeyPressTimer);\n this.characterKeyPressTimer = window.setTimeout(\n () => (this.pressedCharacters = \"\"),\n 1000\n );\n\n if (key !== \" \" || !!this.pressedCharacters) {\n this.pressedCharacters += key;\n const filteredOptions = this.getFilteredOptions(\n this.pressedCharacters,\n \"start\",\n false,\n false\n );\n\n if (filteredOptions.length > 0) {\n const firstOption = filteredOptions[0];\n if (\"children\" in firstOption) {\n if (firstOption.children) {\n this.value = firstOption.children[0].value;\n }\n } else {\n this.value = firstOption.value;\n }\n }\n }\n };\n\n private handleNativeSelectKeyDown = (event: KeyboardEvent) => {\n this.handleKeyDown(event);\n };\n\n private handleSelectChange = (\n event: CustomEvent<IcOptionSelectEventDetail>\n ) => {\n const { value } = event.detail;\n if (!value || this.getLabelFromValue(value) === this.emptyOptionListText) {\n this.value = null;\n return;\n }\n\n if (this.multiple) {\n let valueArray = Array.isArray(this.value) ? [...this.value] : [];\n const index = valueArray.indexOf(value);\n\n if (index > -1) {\n valueArray.splice(index, 1);\n this.icOptionDeselect.emit({ value });\n } else {\n this.icOptionSelect.emit({ value });\n valueArray.push(value);\n valueArray = this.getValidatedValue(valueArray) as string[];\n }\n this.value = valueArray.length ? valueArray : null;\n } else {\n this.icOptionSelect.emit({ value });\n this.value = value;\n if (this.searchable) this.searchableSelectInputValue = \"\";\n }\n };\n\n private handleSelectAllChange = ({\n detail,\n }: CustomEvent<{ select: boolean }>) => {\n const allSelectableValues = this.flatOptions\n .filter((option) => !option.disabled)\n .map((option) => option.value);\n if (detail.select) {\n allSelectableValues\n .filter((value) => !((this.value ?? []) as string[]).includes(value))\n .forEach((value) => {\n this.icOptionSelect.emit({ value });\n });\n\n this.value = allSelectableValues;\n } else {\n (this.value as string[]).forEach((value) =>\n this.icOptionDeselect.emit({ value })\n );\n this.value = null;\n }\n };\n\n private handleFormReset = () => {\n this.value = this.initialValue;\n this.searchableSelectInputValue = \"\";\n if (this.searchable) {\n this.hiddenInputValue = this.initialValue as string;\n }\n };\n\n private handleRetry = () => {\n this.clearTimer();\n this.hasTimedOut = false;\n this.hasError = false;\n this.loading = true;\n this.icRetryLoad.emit({\n value: this.searchable\n ? this.searchableSelectInputValue\n : this.hiddenInputValue,\n });\n this.setFocus();\n };\n\n private handleSearchableSelectInput = (event: Event) => {\n this.updateSearchableSelectResultAriaLive();\n if (!this.multiple) {\n this.value = null;\n }\n\n this.searchableSelectInputValue =\n (event.target as HTMLInputElement).value ?? \"\";\n this.open = true;\n\n clearTimeout(this.debounceIcInput);\n this.debounceIcInput = window.setTimeout(\n () => this.icInput.emit({ value: this.searchableSelectInputValue }),\n this.currDebounce\n );\n };\n\n private hostMutationCallback = (mutationList: MutationRecord[]) => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private updateSelectButtonAriaLive = () => {\n const value_label = this.getLabelFromValue(this.value as string);\n this.selectButtonAriaLiveText = this.multiple\n ? `${this.value ? this.value.length : 0} of ${\n this.flatOptions.length\n } selected`\n : this.value\n ? value_label ?? `${value_label} selected`\n : \"\";\n };\n\n private updateSearchableSelectResultAriaLive = () => {\n this.selectInputAriaLiveText =\n this.getOptions()?.[0]?.label == this.emptyOptionListText\n ? this.emptyOptionListText\n : \"\";\n };\n\n private updateAriaActiveDescendant = (\n event: IcMenuCustomEvent<IcMenuOptionIdEventDetail>\n ) => {\n this.ariaActiveDescendant = event.detail.optionId;\n };\n\n private handleMenuChange = (event: CustomEvent<IcMenuChangeEventDetail>) => {\n this.open = event.detail.open;\n this.pressedCharacters = \"\";\n };\n\n private getDeduplicatedOptions = (\n flatOptions: IcSelectOptionFlat[]\n ): IcSelectOptionFlat[] => {\n const seen = new Set();\n return flatOptions.filter((option) => {\n if (option.value && seen.has(option.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`\n );\n return false;\n }\n if (option.value) seen.add(option.value);\n return true;\n });\n };\n\n private renderNativeOption = (option: IcSelectOptionBase) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n >\n {option.label}\n </option>\n );\n\n render() {\n const {\n disabled,\n searchable,\n size,\n fullWidth,\n theme,\n readonly,\n hideLabel,\n inputId,\n label,\n helperText,\n required,\n value,\n options,\n menuId,\n multiple,\n validationStatus,\n open,\n showClearButton,\n selectOnEnter,\n loading,\n searchableSelectInputValue,\n validationText,\n validationAriaLive,\n form,\n ariaActiveDescendant,\n placeholder,\n name,\n inheritedAttributes,\n selectInputAriaLiveText,\n selectButtonAriaLiveText,\n } = this;\n\n const hasValue = !!value;\n const hasInput = !!searchableSelectInputValue;\n const isClearable =\n !disabled &&\n ((searchable && (hasInput || hasValue)) ||\n (!searchable && hasValue && !loading && showClearButton));\n\n const showValidation = !!validationStatus && !disabled;\n\n const invalid = validationStatus === IcInformationStatus.Error;\n\n const describedBy = getInputDescribedByText(\n this.el,\n inputId,\n helperText !== \"\",\n showValidation\n ).trim();\n\n const menuOptions = this.getOptions();\n const noOptions =\n disabled ||\n (menuOptions.length === 1 &&\n (menuOptions[0].label === this.emptyOptionListText ||\n \"loading\" in menuOptions[0] ||\n \"timedOut\" in menuOptions[0]));\n\n renderHiddenInput(this.el, value as string, name || inputId, disabled);\n\n const ClearButton = () => (\n <ic-button\n ref={(el) => (this.clearButton = el)}\n id=\"clear-button\"\n aria-label={this.searchable ? \"Clear input\" : \"Clear selection\"}\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onBlur={this.handleBlur}\n size={size}\n variant=\"icon-tertiary\"\n ></ic-button>\n );\n\n const NativeSelect = () => (\n <select\n ref={(el) => (this.nativeSelectElement = el)}\n disabled={disabled}\n onChange={this.handleNativeSelectChange}\n required={required}\n id={inputId}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid ? \"true\" : \"false\"}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleNativeSelectKeyDown}\n form={form}\n {...inheritedAttributes}\n >\n <option value=\"\" selected disabled={!showClearButton}>\n {placeholder}\n </option>\n {options.map((option) =>\n \"children\" in option && option.children ? (\n <optgroup label={option.label}>\n {option.children.map((child) =>\n this.renderNativeOption(child as IcSelectOptionBase)\n )}\n </optgroup>\n ) : (\n this.renderNativeOption(option as IcSelectOptionBase)\n )\n )}\n </select>\n );\n\n const SelectButton = () => (\n <div class=\"select-container\">\n <button\n class=\"select-input\"\n role=\"combobox\"\n ref={(el) => (this.selectElement = el)}\n id={inputId}\n aria-label={`${label}, ${\n (multiple && value\n ? `${value.length} of ${\n this.flatOptions.length\n } selected, ${this.getLabelString()}`\n : this.getLabelString()) || placeholder\n }`}\n onClick={this.handleClick}\n aria-describedby={describedBy}\n aria-invalid={invalid ? \"true\" : \"false\"}\n aria-haspopup=\"listbox\"\n aria-expanded={`${open}`}\n aria-controls={menuId}\n aria-required={`${required}`}\n disabled={disabled}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n aria-activedescendant={ariaActiveDescendant}\n >\n <ic-typography\n variant=\"body\"\n class={{\n \"value-text\": true,\n \"with-clear-button\": !!isClearable,\n placeholder: !value,\n }}\n >\n {this.getLabelString()}\n </ic-typography>\n <div class=\"select-input-end\">\n {isClearable && <div class=\"divider\"></div>}\n <span\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n </div>\n </button>\n {isClearable && <ClearButton></ClearButton>}\n <div\n aria-live=\"polite\"\n aria-atomic=\"true\"\n class=\"aria-live-hidden-text\"\n >\n {selectButtonAriaLiveText}\n </div>\n </div>\n );\n\n const SelectInput = () => (\n <div class=\"searchable-select-container\">\n <input\n class={{\n \"value-text\": true,\n \"select-input\": true,\n \"with-clear-button\": !!searchableSelectInputValue,\n }}\n role=\"combobox\"\n autocomplete=\"off\"\n aria-label={label}\n aria-describedby={describedBy}\n aria-activedescendant={ariaActiveDescendant}\n aria-autocomplete=\"list\"\n aria-expanded={`${open}`}\n aria-invalid={invalid ? \"true\" : \"false\"}\n aria-required={`${required}`}\n aria-controls={menuId}\n ref={(el) => (this.searchableSelectElement = el)}\n id={inputId}\n value={\n multiple\n ? \"\"\n : value\n ? this.getLabelString()\n : searchableSelectInputValue || undefined\n }\n disabled={disabled}\n placeholder={placeholder}\n onInput={this.handleSearchableSelectInput}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n form={form}\n ></input>\n {isClearable && (\n <div class=\"clear-button-container\">\n <ClearButton></ClearButton>\n <div class=\"divider\"></div>\n </div>\n )}\n <span\n onMouseDown={this.handleExpandIconMouseDown}\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n <div aria-live=\"polite\" role=\"status\" class=\"aria-live-hidden-text\">\n {selectInputAriaLiveText}\n </div>\n </div>\n );\n\n const ReadOnly = () => (\n <ic-typography>\n <p>\n {this.getLabelString() === placeholder ? \"\" : this.getLabelString()}\n </p>\n </ic-typography>\n );\n\n return (\n <Host\n class={{\n \"ic-select-disabled\": disabled,\n \"ic-select-searchable\": searchable,\n [`ic-select-${size}`]: size !== \"medium\",\n \"ic-select-full-width\": fullWidth,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <ic-input-container readonly={readonly}>\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n readonly={readonly}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n <ic-input-component-container\n ref={(el) => (this.anchorEl = el)}\n class={{ \"menu-open\": open }}\n size={size}\n fullWidth={fullWidth}\n disabled={disabled}\n readonly={readonly}\n validationStatus={validationStatus}\n >\n {isSlotUsed(this.el, \"icon\") &&\n !disabled &&\n (!readonly || !!value) && (\n <span\n slot=\"left-icon\"\n class={{\n readonly,\n \"has-value\": !!value,\n }}\n >\n <slot name=\"icon\" />\n </span>\n )}\n {isMobileOrTablet() && this.useNativeSelectOnMobile && !multiple ? (\n <NativeSelect />\n ) : readonly ? (\n <ReadOnly />\n ) : !searchable ? (\n <SelectButton />\n ) : (\n <SelectInput />\n )}\n </ic-input-component-container>\n {!(\n isMobileOrTablet() &&\n this.useNativeSelectOnMobile &&\n !multiple\n ) && (\n <ic-menu\n ref={(el) => (this.menu = el)}\n class={{ \"no-results\": noOptions }}\n inputEl={\n searchable ? this.searchableSelectElement : this.selectElement\n }\n allowMenuFocus={false}\n inputLabel={label}\n anchorEl={this.anchorEl}\n size={size}\n menuId={menuId}\n open={open}\n options={this.getOptions()}\n value={multiple ? (value as string[]) : (value as string)}\n fullWidth={fullWidth}\n selectOnEnter={selectOnEnter}\n onMenuStateChange={this.handleMenuChange}\n onMenuOptionSelect={this.handleSelectChange}\n onMenuOptionSelectAll={this.handleSelectAllChange}\n onTimeoutBlur={this.handleTimeoutBlur}\n onMenuOptionId={this.updateAriaActiveDescendant}\n onClick={this.setFocus}\n parentEl={this.el}\n activationType={\n searchable || multiple || selectOnEnter ? \"manual\" : \"automatic\"\n }\n onRetryButtonClicked={this.handleRetry}\n closeOnSelect={!multiple}\n multiSelect={multiple}\n searchableSelect={searchable}\n ></ic-menu>\n )}\n <ic-input-validation\n class={{\n \"menu-open\": open,\n }}\n ariaLiveMode={validationAriaLive}\n status={showValidation ? validationStatus : \"\"}\n message={showValidation ? validationText : \"\"}\n for={inputId}\n ></ic-input-validation>\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as closeIcon } from './close-icon.js';
|
|
3
3
|
import { c as chevronIcon } from './chevron-icon.js';
|
|
4
|
-
import {
|
|
4
|
+
import { O as getCssProperty, q as getCurrentDeviceSize, D as DEVICE_SIZES, l as getBrandForegroundAppearance, i as isSlotUsed, G as isEmptyString, c as checkResizeObserver, o as onComponentRequiredPropUndefined, f as renderDynamicChildSlots, I as IcBrandForegroundEnum, H as hasClassificationBanner, m as isPropDefined } from './helpers.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './ic-button2.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './ic-divider2.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
|