@ukic/canary-web-components 3.0.0-canary.16 → 3.0.0-canary.18
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/README.md +19 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-d01564f7.js → helpers-6f33d131.js} +31 -33
- package/dist/cjs/helpers-6f33d131.js.map +1 -0
- package/dist/cjs/{helpers-199b92d5.js → helpers-f4e7322b.js} +36 -73
- package/dist/cjs/helpers-f4e7322b.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +63 -36
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +4 -4
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +41 -17
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +56 -76
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +32 -51
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +135 -131
- 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 +6 -6
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +9 -10
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox_3.cjs.entry.js +38 -37
- package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +26 -38
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +2 -2
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +15 -19
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +3 -3
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +2 -2
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +4 -4
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +5 -5
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +9 -9
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +8 -8
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +21 -3
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +5 -5
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -3
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +12 -7
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +7 -7
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +83 -83
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +8 -7
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +6 -6
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +112 -135
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +6 -6
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skip-link.cjs.entry.js +10 -3
- package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +15 -15
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +6 -6
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +4 -2
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +4 -4
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +5 -5
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +8 -3
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +7 -6
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +4 -4
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +14 -18
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +8 -7
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +23 -2
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +6 -5
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js +13 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -1
- package/dist/collection/utils/constants.js +40 -1
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/helpers.js +177 -135
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +36 -73
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +30 -32
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +66 -37
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +3 -3
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +40 -16
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +57 -78
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +32 -51
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +105 -126
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +5 -5
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +9 -10
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox2.js +37 -36
- package/dist/components/ic-checkbox2.js.map +1 -1
- package/dist/components/ic-chip.js +28 -40
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +2 -2
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-list.js.map +1 -1
- package/dist/components/ic-data-row.js +3 -3
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-data-table.js +14 -18
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-dialog.js +2 -2
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +2 -2
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-empty-state2.js +2 -2
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +2 -2
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +4 -4
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +5 -5
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +6 -6
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +4 -4
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +5 -5
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +4 -4
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +23 -3
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +3 -3
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu-item2.js +4 -4
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +4 -4
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +2 -2
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +3 -3
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +12 -7
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +5 -5
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +4 -4
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +7 -6
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +5 -5
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -6
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +112 -135
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-section-container2.js.map +1 -1
- package/dist/components/ic-select2.js +47 -50
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +6 -6
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-skip-link.js +12 -4
- package/dist/components/ic-skip-link.js.map +1 -1
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +14 -14
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +3 -3
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +6 -6
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +1 -1
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +2 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +32 -29
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +3 -1
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast-region.js.map +1 -1
- package/dist/components/ic-toast.js +4 -4
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +3 -3
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +30 -2
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +5 -5
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +8 -2
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +6 -5
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/components/ic-typography2.js +3 -3
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +160 -110
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-09f54ca3.entry.js +2 -0
- package/dist/core/p-09f54ca3.entry.js.map +1 -0
- package/dist/core/{p-f5e9c8c8.entry.js → p-0a0b25c5.entry.js} +2 -2
- package/dist/core/{p-a2fcea60.entry.js → p-0e3a62cc.entry.js} +2 -2
- package/dist/core/p-10703715.entry.js +2 -0
- package/dist/core/p-10703715.entry.js.map +1 -0
- package/dist/core/{p-643a94c2.entry.js → p-1aed572a.entry.js} +2 -2
- package/dist/core/{p-643a94c2.entry.js.map → p-1aed572a.entry.js.map} +1 -1
- package/dist/core/{p-37df68fe.entry.js → p-1be17f22.entry.js} +2 -2
- package/dist/core/{p-37df68fe.entry.js.map → p-1be17f22.entry.js.map} +1 -1
- package/dist/core/p-1fd22368.entry.js +2 -0
- package/dist/core/{p-ca5d3a21.entry.js.map → p-1fd22368.entry.js.map} +1 -1
- package/dist/core/{p-214a48c6.entry.js → p-266686d0.entry.js} +2 -2
- package/dist/core/p-266686d0.entry.js.map +1 -0
- package/dist/core/{p-2d9c36a6.entry.js → p-33f4abc9.entry.js} +2 -2
- package/dist/core/p-33f4abc9.entry.js.map +1 -0
- package/dist/core/p-3800cda8.entry.js +2 -0
- package/dist/core/p-3800cda8.entry.js.map +1 -0
- package/dist/core/{p-336be00c.entry.js → p-45f32fea.entry.js} +2 -2
- package/dist/core/p-45f32fea.entry.js.map +1 -0
- package/dist/core/{p-fa02a267.entry.js → p-4b6818d9.entry.js} +2 -2
- package/dist/core/{p-fa02a267.entry.js.map → p-4b6818d9.entry.js.map} +1 -1
- package/dist/core/{p-3ee70c45.entry.js → p-5744b8b3.entry.js} +2 -2
- package/dist/core/{p-3ee70c45.entry.js.map → p-5744b8b3.entry.js.map} +1 -1
- package/dist/core/{p-f2beca5c.entry.js → p-59bc9fe7.entry.js} +2 -2
- package/dist/core/{p-f2beca5c.entry.js.map → p-59bc9fe7.entry.js.map} +1 -1
- package/dist/core/{p-858dd362.entry.js → p-5c363e21.entry.js} +2 -2
- package/dist/core/p-671acf27.entry.js +2 -0
- package/dist/core/p-671acf27.entry.js.map +1 -0
- package/dist/core/p-6724039c.entry.js +2 -0
- package/dist/core/p-6724039c.entry.js.map +1 -0
- package/dist/core/{p-65ddc948.entry.js → p-6e0f4278.entry.js} +2 -2
- package/dist/core/p-6e0f4278.entry.js.map +1 -0
- package/dist/core/{p-8856dff4.entry.js → p-72c117b6.entry.js} +2 -2
- package/dist/core/{p-8856dff4.entry.js.map → p-72c117b6.entry.js.map} +1 -1
- package/dist/core/{p-91b8ee39.entry.js → p-7c096c5e.entry.js} +2 -2
- package/dist/core/{p-91b8ee39.entry.js.map → p-7c096c5e.entry.js.map} +1 -1
- package/dist/core/p-824cbf95.entry.js +2 -0
- package/dist/core/p-824cbf95.entry.js.map +1 -0
- package/dist/core/p-84daed4d.entry.js +2 -0
- package/dist/core/p-84daed4d.entry.js.map +1 -0
- package/dist/core/p-8ae0fd6f.entry.js +2 -0
- package/dist/core/p-8ae0fd6f.entry.js.map +1 -0
- package/dist/core/p-8b5022bc.entry.js +2 -0
- package/dist/core/p-8b5022bc.entry.js.map +1 -0
- package/dist/core/p-92a969b3.entry.js +2 -0
- package/dist/core/p-92a969b3.entry.js.map +1 -0
- package/dist/core/{p-a12dd148.entry.js → p-93e154e0.entry.js} +2 -2
- package/dist/core/{p-a12dd148.entry.js.map → p-93e154e0.entry.js.map} +1 -1
- package/dist/core/p-954959d4.entry.js +2 -0
- package/dist/core/p-954959d4.entry.js.map +1 -0
- package/dist/core/{p-7b13ccd0.entry.js → p-95868542.entry.js} +2 -2
- package/dist/core/{p-7b13ccd0.entry.js.map → p-95868542.entry.js.map} +1 -1
- package/dist/core/p-9882c572.entry.js +2 -0
- package/dist/core/p-9882c572.entry.js.map +1 -0
- package/dist/core/p-9918c411.entry.js +2 -0
- package/dist/core/p-9918c411.entry.js.map +1 -0
- package/dist/core/{p-110486f0.entry.js → p-9ca147f3.entry.js} +2 -2
- package/dist/core/{p-110486f0.entry.js.map → p-9ca147f3.entry.js.map} +1 -1
- package/dist/core/{p-5ec11974.entry.js → p-a054bb1b.entry.js} +2 -2
- package/dist/core/{p-5ec11974.entry.js.map → p-a054bb1b.entry.js.map} +1 -1
- package/dist/core/p-aa83f828.entry.js +2 -0
- package/dist/core/p-aa83f828.entry.js.map +1 -0
- package/dist/core/{p-9bf0ce9e.entry.js → p-ad390076.entry.js} +2 -2
- package/dist/core/{p-9bf0ce9e.entry.js.map → p-ad390076.entry.js.map} +1 -1
- package/dist/core/p-ad45f8f8.entry.js +2 -0
- package/dist/core/p-ad45f8f8.entry.js.map +1 -0
- package/dist/core/{p-bb9142fe.entry.js → p-af1d6e41.entry.js} +2 -2
- package/dist/core/{p-cd0dbcea.entry.js → p-b7d117e8.entry.js} +2 -2
- package/dist/core/{p-cd0dbcea.entry.js.map → p-b7d117e8.entry.js.map} +1 -1
- package/dist/core/{p-1b31a720.entry.js → p-b92e5fb3.entry.js} +2 -2
- package/dist/core/{p-1b31a720.entry.js.map → p-b92e5fb3.entry.js.map} +1 -1
- package/dist/core/{p-701696aa.entry.js → p-b9459ba2.entry.js} +2 -2
- package/dist/core/{p-701696aa.entry.js.map → p-b9459ba2.entry.js.map} +1 -1
- package/dist/core/p-b947e4ff.entry.js +2 -0
- package/dist/core/p-b947e4ff.entry.js.map +1 -0
- package/dist/core/{p-50f4d151.entry.js → p-bc2ca778.entry.js} +2 -2
- package/dist/core/{p-50f4d151.entry.js.map → p-bc2ca778.entry.js.map} +1 -1
- package/dist/core/{p-19c4cc6c.entry.js → p-bff6fef6.entry.js} +2 -2
- package/dist/core/{p-19c4cc6c.entry.js.map → p-bff6fef6.entry.js.map} +1 -1
- package/dist/core/p-c472cb32.entry.js +2 -0
- package/dist/core/p-c472cb32.entry.js.map +1 -0
- package/dist/core/p-cd770df5.entry.js +2 -0
- package/dist/core/{p-48465394.entry.js.map → p-cd770df5.entry.js.map} +1 -1
- package/dist/core/p-d328f6fc.entry.js +2 -0
- package/dist/core/p-d328f6fc.entry.js.map +1 -0
- package/dist/core/p-d3d48548.entry.js +2 -0
- package/dist/core/p-d3d48548.entry.js.map +1 -0
- package/dist/core/{p-071f4748.entry.js → p-df88ff5b.entry.js} +2 -2
- package/dist/core/{p-071f4748.entry.js.map → p-df88ff5b.entry.js.map} +1 -1
- package/dist/core/p-e38b20bf.entry.js +2 -0
- package/dist/core/p-e38b20bf.entry.js.map +1 -0
- package/dist/core/{p-ed416362.entry.js → p-e64e27be.entry.js} +2 -2
- package/dist/core/{p-ed416362.entry.js.map → p-e64e27be.entry.js.map} +1 -1
- package/dist/core/{p-8402fcf7.entry.js → p-e7c00131.entry.js} +2 -2
- package/dist/core/p-e7c00131.entry.js.map +1 -0
- package/dist/core/{p-5bd43e19.entry.js → p-e9683f52.entry.js} +2 -2
- package/dist/core/{p-5bd43e19.entry.js.map → p-e9683f52.entry.js.map} +1 -1
- package/dist/core/{p-b88ae211.entry.js → p-ead9900a.entry.js} +2 -2
- package/dist/core/{p-b88ae211.entry.js.map → p-ead9900a.entry.js.map} +1 -1
- package/dist/core/p-eb74cab5.entry.js +2 -0
- package/dist/core/p-eb74cab5.entry.js.map +1 -0
- package/dist/core/{p-944ea274.entry.js → p-eb88b348.entry.js} +2 -2
- package/dist/core/{p-944ea274.entry.js.map → p-eb88b348.entry.js.map} +1 -1
- package/dist/core/p-eca2fea1.js +2 -0
- package/dist/core/p-eca2fea1.js.map +1 -0
- package/dist/core/p-ed542433.js +2 -0
- package/dist/core/p-ed542433.js.map +1 -0
- package/dist/core/p-edeb3823.entry.js +2 -0
- package/dist/core/p-edeb3823.entry.js.map +1 -0
- package/dist/core/{p-91d5efc0.entry.js → p-ef07630d.entry.js} +2 -2
- package/dist/core/{p-91d5efc0.entry.js.map → p-ef07630d.entry.js.map} +1 -1
- package/dist/core/p-f6141c29.entry.js +2 -0
- package/dist/core/p-f6141c29.entry.js.map +1 -0
- package/dist/core/{p-b006976c.entry.js → p-f6eaec92.entry.js} +2 -2
- package/dist/core/p-f6eaec92.entry.js.map +1 -0
- package/dist/core/{p-c3f26b24.entry.js → p-f9a16fa8.entry.js} +2 -2
- package/dist/core/{p-c3f26b24.entry.js.map → p-f9a16fa8.entry.js.map} +1 -1
- package/dist/core/{p-2c7e9e71.entry.js → p-fb1fce87.entry.js} +2 -2
- package/dist/core/{p-2c7e9e71.entry.js.map → p-fb1fce87.entry.js.map} +1 -1
- package/dist/core/{p-520dce89.entry.js → p-fb8214a9.entry.js} +2 -2
- package/dist/core/p-fb8214a9.entry.js.map +1 -0
- package/dist/core/{p-6cfd6b56.entry.js → p-fb8d27fa.entry.js} +2 -2
- package/dist/core/{p-6cfd6b56.entry.js.map → p-fb8d27fa.entry.js.map} +1 -1
- package/dist/core/{p-123bd8ce.entry.js → p-fbcc2a11.entry.js} +2 -2
- package/dist/core/p-fbcc2a11.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-ddc2008a.js → helpers-0bb68835.js} +31 -33
- package/dist/esm/helpers-0bb68835.js.map +1 -0
- package/dist/esm/{helpers-9fe45194.js → helpers-fc03923c.js} +37 -74
- package/dist/esm/helpers-fc03923c.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +63 -36
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +4 -4
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +41 -17
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +56 -76
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +32 -51
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +136 -132
- 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 +6 -6
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +9 -10
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox_3.entry.js +38 -37
- package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +26 -38
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +2 -2
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-list.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +3 -3
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +15 -19
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +3 -3
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +2 -2
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +2 -2
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +3 -3
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +4 -4
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +5 -5
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +9 -9
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +8 -8
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +21 -3
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +5 -5
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +3 -3
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +3 -3
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +12 -7
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -5
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +7 -7
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +83 -83
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +8 -7
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +5 -5
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +6 -6
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +112 -135
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +6 -6
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-skip-link.entry.js +10 -3
- package/dist/esm/ic-skip-link.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +3 -3
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +15 -15
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +3 -3
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +6 -6
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -3
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +3 -3
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +4 -2
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +4 -4
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +3 -3
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +4 -4
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +5 -5
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +8 -3
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +7 -6
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +4 -4
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +0 -1
- package/dist/types/components/ic-data-table/story-data.d.ts +4 -4
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +7 -0
- package/dist/types/components.d.ts +5 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +72 -46
- package/dist/types/utils/types.d.ts +32 -7
- package/hydrate/index.js +872 -895
- package/hydrate/index.mjs +872 -895
- package/package.json +4 -4
- package/dist/cjs/helpers-199b92d5.js.map +0 -1
- package/dist/cjs/helpers-d01564f7.js.map +0 -1
- package/dist/core/p-09e8b002.entry.js +0 -2
- package/dist/core/p-09e8b002.entry.js.map +0 -1
- package/dist/core/p-123bd8ce.entry.js.map +0 -1
- package/dist/core/p-12d4803e.entry.js +0 -2
- package/dist/core/p-12d4803e.entry.js.map +0 -1
- package/dist/core/p-19ecd2a6.entry.js +0 -2
- package/dist/core/p-19ecd2a6.entry.js.map +0 -1
- package/dist/core/p-1bfead5b.entry.js +0 -2
- package/dist/core/p-1bfead5b.entry.js.map +0 -1
- package/dist/core/p-214a48c6.entry.js.map +0 -1
- package/dist/core/p-236dc1a6.entry.js +0 -2
- package/dist/core/p-236dc1a6.entry.js.map +0 -1
- package/dist/core/p-2d9c36a6.entry.js.map +0 -1
- package/dist/core/p-336be00c.entry.js.map +0 -1
- package/dist/core/p-38f612b0.entry.js +0 -2
- package/dist/core/p-38f612b0.entry.js.map +0 -1
- package/dist/core/p-3cf6ca89.entry.js +0 -2
- package/dist/core/p-3cf6ca89.entry.js.map +0 -1
- package/dist/core/p-46f64dc5.entry.js +0 -2
- package/dist/core/p-46f64dc5.entry.js.map +0 -1
- package/dist/core/p-48465394.entry.js +0 -2
- package/dist/core/p-520dce89.entry.js.map +0 -1
- package/dist/core/p-65ddc948.entry.js.map +0 -1
- package/dist/core/p-69f6db9f.entry.js +0 -2
- package/dist/core/p-69f6db9f.entry.js.map +0 -1
- package/dist/core/p-7d054704.js +0 -2
- package/dist/core/p-7d054704.js.map +0 -1
- package/dist/core/p-8402fcf7.entry.js.map +0 -1
- package/dist/core/p-87c92ab1.entry.js +0 -2
- package/dist/core/p-87c92ab1.entry.js.map +0 -1
- package/dist/core/p-951669ca.entry.js +0 -2
- package/dist/core/p-951669ca.entry.js.map +0 -1
- package/dist/core/p-9e5e6070.entry.js +0 -2
- package/dist/core/p-9e5e6070.entry.js.map +0 -1
- package/dist/core/p-a6031c41.entry.js +0 -2
- package/dist/core/p-a6031c41.entry.js.map +0 -1
- package/dist/core/p-b006976c.entry.js.map +0 -1
- package/dist/core/p-b17f6b1d.entry.js +0 -2
- package/dist/core/p-b17f6b1d.entry.js.map +0 -1
- package/dist/core/p-b334a20d.entry.js +0 -2
- package/dist/core/p-b334a20d.entry.js.map +0 -1
- package/dist/core/p-b603b9ef.entry.js +0 -2
- package/dist/core/p-b603b9ef.entry.js.map +0 -1
- package/dist/core/p-b953b22f.entry.js +0 -2
- package/dist/core/p-b953b22f.entry.js.map +0 -1
- package/dist/core/p-b9e73154.js +0 -2
- package/dist/core/p-b9e73154.js.map +0 -1
- package/dist/core/p-c1dbb35b.entry.js +0 -2
- package/dist/core/p-c1dbb35b.entry.js.map +0 -1
- package/dist/core/p-c1f653d4.entry.js +0 -2
- package/dist/core/p-c1f653d4.entry.js.map +0 -1
- package/dist/core/p-ca5d3a21.entry.js +0 -2
- package/dist/core/p-cda2a461.entry.js +0 -2
- package/dist/core/p-cda2a461.entry.js.map +0 -1
- package/dist/core/p-f3bb5006.entry.js +0 -2
- package/dist/core/p-f3bb5006.entry.js.map +0 -1
- package/dist/core/p-fa18f9c6.entry.js +0 -2
- package/dist/core/p-fa18f9c6.entry.js.map +0 -1
- package/dist/core/p-fb01a001.entry.js +0 -2
- package/dist/core/p-fb01a001.entry.js.map +0 -1
- package/dist/esm/helpers-9fe45194.js.map +0 -1
- package/dist/esm/helpers-ddc2008a.js.map +0 -1
- /package/dist/core/{p-f5e9c8c8.entry.js.map → p-0a0b25c5.entry.js.map} +0 -0
- /package/dist/core/{p-a2fcea60.entry.js.map → p-0e3a62cc.entry.js.map} +0 -0
- /package/dist/core/{p-858dd362.entry.js.map → p-5c363e21.entry.js.map} +0 -0
- /package/dist/core/{p-bb9142fe.entry.js.map → p-af1d6e41.entry.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["icNavigationMenuCss","IcNavigationMenuStyle0","NAV_GROUP_TAG","NAV_ITEM_TAG","NavigationMenu","constructor","hostRef","this","hasButtons","hasNavigation","lastTabStop","navGroupFirst","navItemAboveButtons","status","theme","version","setLastTabStop","lastNavGroupExpanded","lastEl","navigationEls","length","tagName","childNavItems","children","slotContent","getSlot","closeMenu","icNavigationMenuClose","emit","focusCloseButton","_a","closeButton","focus","focusLastTabStop","focusEl","componentWillLoad","navBarEl","document","querySelector","getSlotContent","el","addEventListener","event","detail","expanded","firstEl","buttonContent","componentDidLoad","componentWillRender","isSlotUsed","navItemClickHandler","handleKeyDown","ev","key","shiftKey","activeElement","preventDefault","render","h","Host","class","onClick","role","id","ref","variant","size","width","height","viewBox","fill","xmlns","d","name"],"sources":["../web-components/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css?tag=ic-navigation-menu&encapsulation=shadow","../web-components/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js"],"sourcesContent":["/**\n * @prop --ic-z-index-navigation-menu: z-index of navigation menu\n */\n\n:host {\n display: block;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n min-height: 100% !important;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-navigation-menu);\n}\n\n.popout-modal {\n position: absolute;\n inset: 0;\n}\n\n.popout-menu {\n position: fixed;\n top: 0;\n right: 0;\n width: 16rem;\n bottom: 0;\n background-color: var(--ic-top-navigation-menu-background);\n color: var(--ic-top-navigation-nav-item);\n\n --ic-typography-color: var(--ic-top-navigation-nav-item);\n\n box-shadow: var(--ic-elevation-overlay);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n:host(.inline) .popout-menu {\n position: absolute;\n}\n\n.menu-close-button-container {\n position: relative;\n left: 11.875rem;\n padding: var(--ic-space-md) 0;\n}\n\n.nav-group-first {\n padding-bottom: 0;\n}\n\n.menu-buttons-container {\n padding: var(--ic-space-sm) 0;\n border-bottom: var(--ic-border-width) solid var(--ic-architectural-200);\n}\n\n.menu-buttons-container-nav-item-above {\n margin-top: var(--ic-space-md);\n border-top: var(--ic-border-width) solid var(--ic-architectural-200);\n}\n\n.menu-status-version-container {\n display: flex;\n flex-wrap: wrap;\n gap: var(--ic-space-xs);\n padding: var(--ic-space-md) var(--ic-space-md) var(--ic-space-xl);\n}\n\n.status-version-no-buttons {\n border-top: var(--ic-space-1px) solid var(--ic-architectural-200);\n}\n\n.menu-status {\n background-color: var(--ic-status-tag-neutral);\n\n --ic-typography-color: var(--ic-color-text-inverted);\n\n border-radius: var(--ic-space-md);\n width: -moz-fit-content;\n width: fit-content;\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n}\n\n.menu-version {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-status-tag-outlined-background-neutral-contrast);\n\n --ic-typography-color: var(--ic-color-text-primary-light);\n\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n}\n\n.menu-status-text,\n.menu-version-text {\n overflow-wrap: break-word;\n}\n\n.navigation-landmark-text {\n position: absolute;\n width: var(--ic-space-1px);\n height: var(--ic-space-1px);\n padding: 0;\n margin: calc(-1 * var(--ic-space-1px));\n overflow: hidden;\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getSlot, getSlotContent, isSlotUsed } from \"../../utils/helpers\";\nconst NAV_GROUP_TAG = \"IC-NAVIGATION-GROUP\";\nconst NAV_ITEM_TAG = \"IC-NAVIGATION-ITEM\";\n/**\n * @slot navigation - Content will be rendered at top of panel.\n * @slot buttons - Content will be rendered above version info and below navigation.\n */\nexport class NavigationMenu {\n constructor() {\n this.hasButtons = false;\n this.hasNavigation = false;\n this.lastTabStop = null;\n this.navGroupFirst = false;\n this.navItemAboveButtons = false;\n /**\n * The status info to display.\n */\n this.status = \"\";\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 this.theme = \"inherit\";\n /**\n * The version info to display.\n */\n this.version = \"\";\n this.setLastTabStop = (lastNavGroupExpanded) => {\n let lastEl = this.navigationEls[this.navigationEls.length - 1];\n if (lastEl.tagName === NAV_GROUP_TAG && lastNavGroupExpanded) {\n const childNavItems = lastEl.children;\n lastEl = childNavItems[childNavItems.length - 1];\n }\n if (lastEl.tagName === NAV_ITEM_TAG) {\n //check for slotted content i.e. react router link\n const slotContent = getSlot(lastEl, \"navigation-item\");\n if (slotContent !== null) {\n lastEl = slotContent;\n }\n }\n this.lastTabStop = lastEl;\n };\n this.closeMenu = () => {\n this.icNavigationMenuClose.emit();\n };\n this.focusCloseButton = () => {\n var _a;\n (_a = this.closeButton) === null || _a === void 0 ? void 0 : _a.focus();\n };\n this.focusLastTabStop = () => {\n let focusEl;\n if (this.lastTabStop !== null) {\n switch (this.lastTabStop.tagName) {\n case \"IC-NAVIGATION-BUTTON\":\n case NAV_ITEM_TAG:\n case NAV_GROUP_TAG:\n focusEl = this.lastTabStop;\n focusEl.focus();\n break;\n case \"A\":\n this.lastTabStop.focus();\n break;\n }\n }\n };\n }\n componentWillLoad() {\n this.navBarEl = document.querySelector(\"ic-top-navigation\");\n this.navigationEls = getSlotContent(this.el, \"navigation\");\n if (this.navigationEls) {\n this.hasNavigation = true;\n const lastEl = this.navigationEls[this.navigationEls.length - 1];\n if (lastEl.tagName === NAV_ITEM_TAG) {\n this.navItemAboveButtons = true;\n }\n else if (lastEl.tagName === NAV_GROUP_TAG) {\n lastEl.addEventListener(\"navigationGroupExpanded\", ((event) => {\n this.setLastTabStop(event.detail.expanded);\n }));\n }\n const firstEl = this.navigationEls[0];\n if (firstEl.tagName === NAV_GROUP_TAG) {\n this.navGroupFirst = true;\n }\n }\n const buttonContent = getSlotContent(this.el, \"buttons\");\n if (buttonContent !== null) {\n this.hasButtons = true;\n this.lastTabStop = buttonContent[buttonContent.length - 1];\n }\n else {\n if (this.hasNavigation && this.navigationEls) {\n this.setLastTabStop(false);\n }\n }\n }\n componentDidLoad() {\n this.focusCloseButton();\n }\n componentWillRender() {\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasButtons = isSlotUsed(this.el, \"buttons\");\n }\n navItemClickHandler() {\n this.closeMenu();\n }\n handleKeyDown(ev) {\n if (ev.key === \"Tab\") {\n if (ev.shiftKey) {\n if (document.activeElement === this.navBarEl) {\n ev.preventDefault();\n this.focusLastTabStop();\n }\n }\n else if (document.activeElement === this.lastTabStop ||\n this.lastTabStop === null) {\n ev.preventDefault();\n this.focusCloseButton();\n }\n }\n else if (ev.key === \"Escape\") {\n this.closeMenu();\n }\n }\n render() {\n return (h(Host, { key: 'd8a429fb76fa3a1ef80580957fd6481e240f5317', class: { [`ic-theme-${this.theme}`]: this.theme !== \"inherit\" } }, h(\"div\", { key: '7bf2fffdc59f70baa6674deae32a1bc4b94ad1c7', class: \"popout-modal\", onClick: this.closeMenu }), h(\"div\", { key: '5f040801d741e34fa84396292a7ff2e6c371c004', class: \"popout-menu\", role: \"dialog\", \"aria-modal\": \"true\", \"aria-label\": `${this.hasNavigation ? \"Navigation\" : \"App\"} menu` }, h(\"span\", { key: 'e1b5a6eb1689c24845f8dde72d4b4439333889a2', \"aria-hidden\": \"true\", id: \"navigation-landmark-text\", class: \"navigation-landmark-text\" }, \"Main navigation\"), h(\"nav\", { key: 'cfe33959155fc33481c1d71b43e740c97d59447f', \"aria-labelledby\": \"navigation-landmark-text\", \"aria-hidden\": this.hasNavigation ? \"false\" : \"true\" }, h(\"div\", { key: 'd6bcbb09f3477305ec0dacd2274d7be1b92818c4', class: {\n [\"menu-close-button-container\"]: true,\n [\"nav-group-first\"]: this.navGroupFirst,\n } }, h(\"ic-button\", { key: '29c00c1baf94e77fc12c4f5808b7f959261b9307', ref: (el) => (this.closeButton = el), id: \"menu-close-button\", class: \"menu-close-button\", variant: \"icon\", size: \"large\", \"aria-label\": `Close ${this.hasNavigation ? \"navigation\" : \"app\"} menu`, onClick: this.closeMenu }, h(\"svg\", { key: '8117252bd49a7fb0a884730ed79d059955cd973e', width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, h(\"path\", { key: 'f7b68f7e0b0860dc30f3477ef49f3b9da41e2625', d: \"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z\" })))), this.hasNavigation && h(\"slot\", { key: '42a9be2b531c8aeffd12ecbe1b8b089121416def', name: \"navigation\" })), this.hasButtons && (h(\"div\", { key: '53bd2be53748f6ce6aff7d835e2fa05ae4a4302f', class: {\n [\"menu-buttons-container\"]: true,\n [\"menu-buttons-container-nav-item-above\"]: this.navItemAboveButtons,\n } }, h(\"slot\", { key: 'fc5df99477f01b812d5ff4fdcadf8766a613734d', name: \"buttons\" }))), (this.status !== \"\" || this.version !== \"\") && (h(\"div\", { key: '74d83ccdcd72f225733da95a63313d1ac1fc9cbd', class: {\n [\"menu-status-version-container\"]: true,\n [\"status-version-no-buttons\"]: !this.hasButtons,\n } }, this.status !== \"\" && (h(\"div\", { key: '5b41cca5949cb96006b7660334561c378e039fd9', class: \"menu-status\" }, h(\"ic-typography\", { key: 'c068f6a9e6f4f3dcb4386185e5b34547c93dcbc2', variant: \"label-uppercase\", \"aria-label\": \"app tag\", class: \"menu-status-text\" }, this.status))), this.version !== \"\" && (h(\"div\", { key: 'bcd01f93742c4a3b1106437da91ec7e6541e5e13', class: \"menu-version\" }, h(\"ic-typography\", { key: 'aa25f91209bd326e9b2f4f34869885e9e78d263c', variant: \"label\", class: \"menu-version-text\", \"aria-label\": \"app version\" }, this.version))))))));\n }\n static get is() { return \"ic-navigation-menu\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-navigation-menu.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-navigation-menu.css\"]\n };\n }\n static get properties() {\n return {\n \"status\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The status info to display.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"status\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\" | undefined\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"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 \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"version\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The version info to display.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"version\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icNavigationMenuClose\",\n \"name\": \"icNavigationMenuClose\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"- Emitted when the menu is closed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"navItemClicked\",\n \"method\": \"navItemClickHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyDown\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-navigation-menu.js.map\n"],"mappings":"kHAAA,MAAMA,EAAsB,izDAC5B,MAAAC,EAAeD,ECCf,MAAME,EAAgB,sBACtB,MAAMC,EAAe,qB,MAKRC,EAAc,MACvB,WAAAC,CAAAC,G,uEACIC,KAAKC,WAAa,MAClBD,KAAKE,cAAgB,MACrBF,KAAKG,YAAc,KACnBH,KAAKI,cAAgB,MACrBJ,KAAKK,oBAAsB,MAI3BL,KAAKM,OAAS,GAIdN,KAAKO,MAAQ,UAIbP,KAAKQ,QAAU,GACfR,KAAKS,eAAkBC,IACnB,IAAIC,EAASX,KAAKY,cAAcZ,KAAKY,cAAcC,OAAS,GAC5D,GAAIF,EAAOG,UAAYnB,GAAiBe,EAAsB,CAC1D,MAAMK,EAAgBJ,EAAOK,SAC7BL,EAASI,EAAcA,EAAcF,OAAS,E,CAElD,GAAIF,EAAOG,UAAYlB,EAAc,CAEjC,MAAMqB,EAAcC,EAAQP,EAAQ,mBACpC,GAAIM,IAAgB,KAAM,CACtBN,EAASM,C,EAGjBjB,KAAKG,YAAcQ,CAAM,EAE7BX,KAAKmB,UAAY,KACbnB,KAAKoB,sBAAsBC,MAAM,EAErCrB,KAAKsB,iBAAmB,KACpB,IAAIC,GACHA,EAAKvB,KAAKwB,eAAiB,MAAQD,SAAY,OAAS,EAAIA,EAAGE,OAAO,EAE3EzB,KAAK0B,iBAAmB,KACpB,IAAIC,EACJ,GAAI3B,KAAKG,cAAgB,KAAM,CAC3B,OAAQH,KAAKG,YAAYW,SACrB,IAAK,uBACL,KAAKlB,EACL,KAAKD,EACDgC,EAAU3B,KAAKG,YACfwB,EAAQF,QACR,MACJ,IAAK,IACD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EAAE,MAAO,CAAEL,IAAK,2CAA4CO,MAAO,CACvM,CAAC,iCAAkC,KACnC,CAAC,8BAA+BrD,KAAKC,aACpCD,KAAKM,SAAW,IAAO6C,EAAE,MAAO,CAAEL,IAAK,2CAA4CO,MAAO,eAAiBF,EAAE,gBAAiB,CAAEL,IAAK,2CAA4CY,QAAS,kBAAmB,aAAc,UAAWL,MAAO,oBAAsBrD,KAAKM,SAAWN,KAAKQ,UAAY,IAAO2C,EAAE,MAAO,CAAEL,IAAK,2CAA4CO,MAAO,gBAAkBF,EAAE,gBAAiB,CAAEL,IAAK,2CAA4CY,QAAS,QAASL,MAAO,oBAAqB,aAAc,eAAiBrD,KAAKQ,Y","ignoreList":[]}
|
1
|
+
{"version":3,"names":["icNavigationMenuCss","IcNavigationMenuStyle0","NAV_GROUP_TAG","NAV_ITEM_TAG","NavigationMenu","constructor","hostRef","this","hasButtons","hasNavigation","lastTabStop","navGroupFirst","navItemAboveButtons","status","theme","version","setLastTabStop","lastNavGroupExpanded","lastEl","navigationEls","length","tagName","childNavItems","children","slotContent","getSlot","closeMenu","icNavigationMenuClose","emit","focusCloseButton","_a","closeButton","focus","focusLastTabStop","focusEl","componentWillLoad","navBarEl","document","querySelector","getSlotContent","el","addEventListener","event","detail","expanded","firstEl","buttonContent","componentDidLoad","componentWillRender","isSlotUsed","navItemClickHandler","handleKeyDown","ev","key","shiftKey","activeElement","preventDefault","render","h","Host","class","onClick","role","id","ref","variant","size","width","height","viewBox","fill","xmlns","d","name"],"sources":["../web-components/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css?tag=ic-navigation-menu&encapsulation=shadow","../web-components/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js"],"sourcesContent":["/**\n * @prop --ic-z-index-navigation-menu: z-index of navigation menu\n */\n\n:host {\n display: block;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n min-height: 100% !important;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-navigation-menu);\n}\n\n.popout-modal {\n position: absolute;\n inset: 0;\n}\n\n.popout-menu {\n position: fixed;\n top: 0;\n right: 0;\n width: 16rem;\n bottom: 0;\n background-color: var(--ic-top-navigation-menu-background);\n color: var(--ic-top-navigation-nav-item);\n\n --ic-typography-color: var(--ic-top-navigation-nav-item);\n\n box-shadow: var(--ic-elevation-overlay);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n:host(.inline) .popout-menu {\n position: absolute;\n}\n\n.menu-close-button-container {\n position: relative;\n left: 11.875rem;\n padding: var(--ic-space-md) 0;\n}\n\n.nav-group-first {\n padding-bottom: 0;\n}\n\n.menu-buttons-container {\n padding: var(--ic-space-sm) 0;\n border-bottom: var(--ic-border-width) solid var(--ic-architectural-200);\n}\n\n.menu-buttons-container-nav-item-above {\n margin-top: var(--ic-space-md);\n border-top: var(--ic-border-width) solid var(--ic-architectural-200);\n}\n\n.menu-status-version-container {\n display: flex;\n flex-wrap: wrap;\n gap: var(--ic-space-xs);\n padding: var(--ic-space-md) var(--ic-space-md) var(--ic-space-xl);\n}\n\n.status-version-no-buttons {\n border-top: var(--ic-space-1px) solid var(--ic-architectural-200);\n}\n\n.menu-status {\n background-color: var(--ic-status-tag-neutral);\n\n --ic-typography-color: var(--ic-color-text-inverted);\n\n border-radius: var(--ic-space-md);\n width: -moz-fit-content;\n width: fit-content;\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n}\n\n.menu-version {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-status-tag-outlined-background-neutral-contrast);\n\n --ic-typography-color: var(--ic-color-text-primary-light);\n\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n}\n\n.menu-status-text,\n.menu-version-text {\n overflow-wrap: break-word;\n}\n\n.navigation-landmark-text {\n position: absolute;\n width: var(--ic-space-1px);\n height: var(--ic-space-1px);\n padding: 0;\n margin: calc(-1 * var(--ic-space-1px));\n overflow: hidden;\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getSlot, getSlotContent, isSlotUsed } from \"../../utils/helpers\";\nconst NAV_GROUP_TAG = \"IC-NAVIGATION-GROUP\";\nconst NAV_ITEM_TAG = \"IC-NAVIGATION-ITEM\";\n/**\n * @slot navigation - Content will be rendered at top of panel.\n * @slot buttons - Content will be rendered above version info and below navigation.\n */\nexport class NavigationMenu {\n constructor() {\n this.hasButtons = false;\n this.hasNavigation = false;\n this.lastTabStop = null;\n this.navGroupFirst = false;\n this.navItemAboveButtons = false;\n /**\n * The status info to display.\n */\n this.status = \"\";\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 this.theme = \"inherit\";\n /**\n * The version info to display.\n */\n this.version = \"\";\n this.setLastTabStop = (lastNavGroupExpanded) => {\n let lastEl = this.navigationEls[this.navigationEls.length - 1];\n if (lastEl.tagName === NAV_GROUP_TAG && lastNavGroupExpanded) {\n const childNavItems = lastEl.children;\n lastEl = childNavItems[childNavItems.length - 1];\n }\n if (lastEl.tagName === NAV_ITEM_TAG) {\n //check for slotted content i.e. react router link\n const slotContent = getSlot(lastEl, \"navigation-item\");\n if (slotContent !== null) {\n lastEl = slotContent;\n }\n }\n this.lastTabStop = lastEl;\n };\n this.closeMenu = () => {\n this.icNavigationMenuClose.emit();\n };\n this.focusCloseButton = () => {\n var _a;\n (_a = this.closeButton) === null || _a === void 0 ? void 0 : _a.focus();\n };\n this.focusLastTabStop = () => {\n let focusEl;\n if (this.lastTabStop !== null) {\n switch (this.lastTabStop.tagName) {\n case \"IC-NAVIGATION-BUTTON\":\n case NAV_ITEM_TAG:\n case NAV_GROUP_TAG:\n focusEl = this.lastTabStop;\n focusEl.focus();\n break;\n case \"A\":\n this.lastTabStop.focus();\n break;\n }\n }\n };\n }\n componentWillLoad() {\n this.navBarEl = document.querySelector(\"ic-top-navigation\");\n this.navigationEls = getSlotContent(this.el, \"navigation\");\n if (this.navigationEls) {\n this.hasNavigation = true;\n const lastEl = this.navigationEls[this.navigationEls.length - 1];\n if (lastEl.tagName === NAV_ITEM_TAG) {\n this.navItemAboveButtons = true;\n }\n else if (lastEl.tagName === NAV_GROUP_TAG) {\n lastEl.addEventListener(\"navigationGroupExpanded\", ((event) => {\n this.setLastTabStop(event.detail.expanded);\n }));\n }\n const firstEl = this.navigationEls[0];\n if (firstEl.tagName === NAV_GROUP_TAG) {\n this.navGroupFirst = true;\n }\n }\n const buttonContent = getSlotContent(this.el, \"buttons\");\n if (buttonContent !== null) {\n this.hasButtons = true;\n this.lastTabStop = buttonContent[buttonContent.length - 1];\n }\n else {\n if (this.hasNavigation && this.navigationEls) {\n this.setLastTabStop(false);\n }\n }\n }\n componentDidLoad() {\n this.focusCloseButton();\n }\n componentWillRender() {\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasButtons = isSlotUsed(this.el, \"buttons\");\n }\n navItemClickHandler() {\n this.closeMenu();\n }\n handleKeyDown(ev) {\n if (ev.key === \"Tab\") {\n if (ev.shiftKey) {\n if (document.activeElement === this.navBarEl) {\n ev.preventDefault();\n this.focusLastTabStop();\n }\n }\n else if (document.activeElement === this.lastTabStop ||\n this.lastTabStop === null) {\n ev.preventDefault();\n this.focusCloseButton();\n }\n }\n else if (ev.key === \"Escape\") {\n this.closeMenu();\n }\n }\n render() {\n return (h(Host, { key: '3e06550714484b8a9d157e0391697e303fbf8259', class: { [`ic-theme-${this.theme}`]: this.theme !== \"inherit\" } }, h(\"div\", { key: 'b56300f2817a5a42401570a56f5b29c90e37e336', class: \"popout-modal\", onClick: this.closeMenu }), h(\"div\", { key: '081658f80afaa6d7f39971cc0f566068166b6688', class: \"popout-menu\", role: \"dialog\", \"aria-modal\": \"true\", \"aria-label\": `${this.hasNavigation ? \"Navigation\" : \"App\"} menu` }, h(\"span\", { key: '67841c0d0cfb29fba7e3c722436c7e87bca1842d', \"aria-hidden\": \"true\", id: \"navigation-landmark-text\", class: \"navigation-landmark-text\" }, \"Main navigation\"), h(\"nav\", { key: 'cb5aa473a04868d6af4dcd2ebc2b61ef5d785904', \"aria-labelledby\": \"navigation-landmark-text\", \"aria-hidden\": this.hasNavigation ? \"false\" : \"true\" }, h(\"div\", { key: '2551b868b4c932b5fcff041bdae690e748d40430', class: {\n [\"menu-close-button-container\"]: true,\n [\"nav-group-first\"]: this.navGroupFirst,\n } }, h(\"ic-button\", { key: '7bd12321078c63fe2ffe62ede9d9db4695b0b510', ref: (el) => (this.closeButton = el), id: \"menu-close-button\", class: \"menu-close-button\", variant: \"icon\", size: \"large\", \"aria-label\": `Close ${this.hasNavigation ? \"navigation\" : \"app\"} menu`, onClick: this.closeMenu }, h(\"svg\", { key: 'da0aa67b38afb973367472a95c74d2f6e49e9fd8', width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, h(\"path\", { key: 'd7d5993d336c40113eb2ae3528c429028c78fcfe', d: \"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z\" })))), this.hasNavigation && h(\"slot\", { key: '1957640a14ad85b1ef0b3b9b330ea9f2beeb7391', name: \"navigation\" })), this.hasButtons && (h(\"div\", { key: '0c92359ed82d16596420c022fa61ff2a106161dd', class: {\n [\"menu-buttons-container\"]: true,\n [\"menu-buttons-container-nav-item-above\"]: this.navItemAboveButtons,\n } }, h(\"slot\", { key: '96f46255f4faa638122e1f567003101d42790c55', name: \"buttons\" }))), (this.status !== \"\" || this.version !== \"\") && (h(\"div\", { key: '7ef37a7aa83a5e73a66d9d9c7eb99054f65f3785', class: {\n [\"menu-status-version-container\"]: true,\n [\"status-version-no-buttons\"]: !this.hasButtons,\n } }, this.status !== \"\" && (h(\"div\", { key: '00a4dbcfa3fff6671c0d4a986141f321ac492b1f', class: \"menu-status\" }, h(\"ic-typography\", { key: 'f176e8fe85d647789146f59f83205c99c47ced63', variant: \"label-uppercase\", \"aria-label\": \"app tag\", class: \"menu-status-text\" }, this.status))), this.version !== \"\" && (h(\"div\", { key: 'c216559b1da429a6cbf910e58638fcabfeccf95a', class: \"menu-version\" }, h(\"ic-typography\", { key: '4b72051f226eb2563d41fe0c239d62ed82d33701', variant: \"label\", class: \"menu-version-text\", \"aria-label\": \"app version\" }, this.version))))))));\n }\n static get is() { return \"ic-navigation-menu\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-navigation-menu.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-navigation-menu.css\"]\n };\n }\n static get properties() {\n return {\n \"status\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The status info to display.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"status\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\" | undefined\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"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 \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"version\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The version info to display.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"version\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icNavigationMenuClose\",\n \"name\": \"icNavigationMenuClose\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"- Emitted when the menu is closed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"navItemClicked\",\n \"method\": \"navItemClickHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyDown\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-navigation-menu.js.map\n"],"mappings":"kHAAA,MAAMA,EAAsB,izDAC5B,MAAAC,EAAeD,ECCf,MAAME,EAAgB,sBACtB,MAAMC,EAAe,qB,MAKRC,EAAc,MACvB,WAAAC,CAAAC,G,uEACIC,KAAKC,WAAa,MAClBD,KAAKE,cAAgB,MACrBF,KAAKG,YAAc,KACnBH,KAAKI,cAAgB,MACrBJ,KAAKK,oBAAsB,MAI3BL,KAAKM,OAAS,GAIdN,KAAKO,MAAQ,UAIbP,KAAKQ,QAAU,GACfR,KAAKS,eAAkBC,IACnB,IAAIC,EAASX,KAAKY,cAAcZ,KAAKY,cAAcC,OAAS,GAC5D,GAAIF,EAAOG,UAAYnB,GAAiBe,EAAsB,CAC1D,MAAMK,EAAgBJ,EAAOK,SAC7BL,EAASI,EAAcA,EAAcF,OAAS,E,CAElD,GAAIF,EAAOG,UAAYlB,EAAc,CAEjC,MAAMqB,EAAcC,EAAQP,EAAQ,mBACpC,GAAIM,IAAgB,KAAM,CACtBN,EAASM,C,EAGjBjB,KAAKG,YAAcQ,CAAM,EAE7BX,KAAKmB,UAAY,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AE,OAAQ,CAAEL,IAAK,2CAA4CmB,EAAG,6GAA+GjE,KAAKE,eAAiBiD,EAAE,OAAQ,CAAEL,IAAK,2CAA4CoB,KAAM,gBAAkBlE,KAAKC,YAAekD,EAAE,MAAO,CAAEL,IAAK,2CAA4CO,MAAO,CACrzB,CAAC,0BAA2B,KAC5B,CAAC,yCAA0CrD,KAAKK,sBAC/C8C,EAAE,OAAQ,CAAEL,IAAK,2CAA4CoB,KAAM,cAAiBlE,KAAKM,SAAW,IAAMN,KAAKQ,UAAY,KAAQ2C,EAAE,MAAO,CAAEL,IAAK,2CAA4CO,MAAO,CACvM,CAAC,iCAAkC,KACnC,CAAC,8BAA+BrD,KAAKC,aACpCD,KAAKM,SAAW,IAAO6C,EAAE,MAAO,CAAEL,IAAK,2CAA4CO,MAAO,eAAiBF,EAAE,gBAAiB,CAAEL,IAAK,2CAA4CY,QAAS,kBAAmB,aAAc,UAAWL,MAAO,oBAAsBrD,KAAKM,SAAWN,KAAKQ,UAAY,IAAO2C,EAAE,MAAO,CAAEL,IAAK,2CAA4CO,MAAO,gBAAkBF,EAAE,gBAAiB,CAAEL,IAAK,2CAA4CY,QAAS,QAASL,MAAO,oBAAqB,aAAc,eAAiBrD,KAAKQ,Y","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{f as n}from"./p-8e4e97b4.js";var t;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(t||(t={}));var e;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(e||(e={}));const a=`<svg aria-labelledby="error-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="error-title">Error</title>\n <g id="close-octagon">\n <path id="Vector" d="M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" />\n </g>\n</svg>\n`;const i=`<svg aria-labelledby="info-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="info-title">For your information</title>\n <g id="info">\n <path id="Vector" d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z" />\n </g>\n</svg>\n`;const o=`<svg aria-labelledby="neutral-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n<title id="neutral-title">Neutral</title>\n <g id="Icon">\n <path id="Vector" d="M19.5 3H5.5C4.4 3 3.5 3.9 3.5 5V19C3.5 20.1 4.4 21 5.5 21H19.5C20.6 21 21.5 20.1 21.5 19V5C21.5 3.9 20.6 3 19.5 3ZM12.51 18C11.81 18 11.25 17.44 11.25 16.74C11.25 16.03 11.81 15.49 12.51 15.49C13.22 15.49 13.76 16.03 13.76 16.74C13.75 17.43 13.22 18 12.51 18ZM15.52 10.6C14.76 11.71 14.04 12.06 13.65 12.77C13.55 12.95 13.49 13.09 13.46 13.4C13.41 13.85 13.01 14.18 12.56 14.18H12.5C11.98 14.18 11.57 13.74 11.62 13.22C11.65 12.88 11.73 12.53 11.92 12.19C12.41 11.32 13.34 10.8 13.88 10.03C14.45 9.22 14.13 7.7 12.51 7.7C11.8 7.7 11.33 8.06 11.04 8.49C10.79 8.85 10.35 9.02 9.94 8.85C9.41 8.64 9.22 8 9.54 7.54C10.15 6.65 11.17 6 12.49 6C13.97 6 14.98 6.67 15.5 7.52C15.94 8.24 16.2 9.59 15.52 10.6Z" />\n </g>\n</svg>\n`;const r=`<svg aria-labelledby="success-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="success-title">Success</title>\n <g id="check_circle">\n <path id="Vector" d="M12.5 2C6.98 2 2.5 6.48 2.5 12C2.5 17.52 6.98 22 12.5 22C18.02 22 22.5 17.52 22.5 12C22.5 6.48 18.02 2 12.5 2ZM9.79 16.29L6.2 12.7C5.81 12.31 5.81 11.68 6.2 11.29C6.59 10.9 7.22 10.9 7.61 11.29L10.5 14.17L17.38 7.29C17.77 6.9 18.4 6.9 18.79 7.29C19.18 7.68 19.18 8.31 18.79 8.7L11.2 16.29C10.82 16.68 10.18 16.68 9.79 16.29Z" />\n </g>\n</svg>\n`;const s=`<svg aria-labelledby="warning-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="warning-title">Warning</title>\n <g id="warning">\n <path id="Vector" d="M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z" />\n </g>\n</svg>\n`;const c={neutral:{icon:o,ariaLabel:"Neutral"},info:{icon:i,ariaLabel:"For your information"},warning:{icon:s,ariaLabel:"Warning"},error:{icon:a,ariaLabel:"Error"},success:{icon:r,ariaLabel:"Success"}};const l=["aria-atomic","aria-autocomplete","aria-busy","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"];const d={XS:576,S:768,M:992,L:1200,XL:99999};const u=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"];const p=["ic-alert"];const f={"ic-alert":["ic-link","ic-button"]};const v=136.701;const g=130;const b=["Alt","AltGraph","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","AudioVolumeDown","AudioVolumeMute","AudioVolumeUp","CapsLock","ContextMenu","Control","Delete","End","Enter","Escape","F1","F10","F11","F12","F2","F3","F4","F5","F6","F7","F8","F9","Home","Insert","Meta","NumLock","PageDown","PageUp","Shift","Tab"];const C=133.3505;const w="anywhere";const m="ic-input";const L=(n,t=[])=>{const e={};t.forEach((t=>{const a=n.getAttribute(t);if(a!==null){e[t]=a;n.removeAttribute(t)}}));return e};const h=(n,t)=>{const e=n._original||n;return{_original:n,emit:y(e.emit.bind(e),t)}};const y=(n,t=0)=>{let e;return(...a)=>{clearTimeout(e);e=setTimeout(n,t,...a)}};const x=(n,t,e,a=false,i=true)=>{if(e&&(i||N(n))){let i=A(n);if(!i){i=n.ownerDocument.createElement("input");i.type="hidden";i.classList.add(m);n.appendChild(i)}i.disabled=a;i.name=e;i.value=t instanceof Date?t.toISOString():t||""}};const A=n=>Array.from(n.querySelectorAll(`input.${m}`)).filter((t=>n===t.parentElement))[0];const M=(n,t,e,a,i,o,r)=>{if(o!==undefined&&N(t)){let s=A(t);if(s===null||s===undefined){s=t.ownerDocument.createElement("input");s.classList.add(m);t.appendChild(s)}s.type="file";s.hidden=true;s.multiple=e;s.name=o;s.disabled=a;if(r)s.files=r;if(i)s.accept=i;s.onchange=()=>{n.emit(s.files)};s.click()}};const V=n=>{var t;(t=A(n))===null||t===void 0?void 0:t.remove()};const N=n=>!!n&&!!n.shadowRoot&&!!n.attachShadow;const I=n=>n+"-helper-text";const F=n=>n+"-validation-text";const k=(n,t,e)=>`${t?I(n):""} ${e?F(n):""}`.trim();const $=(n,t=null)=>{var a;const i=n.parentElement||n.getRootNode().host.parentElement;const o=i===null||i===void 0?void 0:i.closest(u.join(","));if(o){const i=o.tagName.toLowerCase();const r=n.tagName.toLowerCase();if((a=f[i])===null||a===void 0?void 0:a.includes(r)){return e.Default}else if(t!==null&&!p.includes(i)){return t}else if(o.classList.contains(`${i}-${e.Dark}`)||o.classList.contains(e.Dark)){return e.Dark}return e.Light}return e.Default};const E=()=>"maxTouchPoints"in navigator&&"userAgent"in navigator?navigator.maxTouchPoints>0&&/iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent):false;const T=(n,t)=>{const e=document.createElement("button");t.type&&e.setAttribute("type",t.type);e.style.display="none";n.appendChild(e);e.click();e.remove()};const H=n=>!n||n.trim().length===0;const Z=n=>n!==undefined?n:undefined;const O=(n,t,e="value",a="label")=>{const i=[];if(t.length>0&&t.map){t.map((n=>{if(n.children){n.children.map((n=>i.push(n)))}else{i.push(n)}}));const o=i.find((t=>t[e]===n));if(o!==undefined)return o[a]}return undefined};const P=(n,t,e,a=w,i="label")=>n.filter((n=>{var o;const r=n[i].toLowerCase();const s=(o=n.description)===null||o===void 0?void 0:o.toLowerCase();const c=e.toLowerCase();return a===w?t?r.includes(c)||(s===null||s===void 0?void 0:s.includes(c)):r.includes(c):t?r.startsWith(c)||(s===null||s===void 0?void 0:s.startsWith(c)):r.startsWith(c)}));const S=n=>{const t=[];if(n.length>0&&n.map){n.map((n=>{if(n.children){n.children.map((n=>t.push(n)))}else{t.push(n)}}))}return t.length};const D=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const B=()=>{if(D(z.S)){return z.S}if(D(z.M)){return z.M}if(D(z.L)){return z.L}if(D(z.XL)){return z.XL}return z.UNDEFINED};const G=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const R=()=>{const n=G("--ic-brand-color-primary-r");const t=G("--ic-brand-color-primary-g");const e=G("--ic-brand-color-primary-b");return(parseInt(n)*299+parseInt(t)*587+parseInt(e)*114)/1e3};const U=(n=R())=>n>C?e.Dark:e.Light;const W=(n,t)=>(n===null||n===void 0?void 0:n.querySelector(`[slot="${t}"]`))||null;const X=(n,t)=>W(n,t)!==null;const _=(n,t)=>{const e=W(n,t);return e?j(e):null};const j=n=>{const t=n.firstElementChild;if(t===null)return[n];const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null};const q=({parentElement:n})=>{let t={navType:"",parent:null};if(n){switch(n.tagName){case"IC-NAVIGATION-GROUP":t=q(n);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:n};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:n};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}}return t};const z={XS:Number(G("--ic-breakpoint-xs").replace("px","")),S:Number(G("--ic-breakpoint-sm").replace("px","")),M:Number(G("--ic-breakpoint-md").replace("px","")),L:Number(G("--ic-breakpoint-lg").replace("px","")),XL:Number(G("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const J=(n,t)=>!!n&&!t;const K=({children:n},t)=>Array.from(n).some((n=>n.getAttribute("slot")===t));const Q=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const Y=(n,t)=>{n.forEach((({prop:n,propName:e})=>{if(n===null||n===undefined){console.error(`No ${e} specified for ${t} component - prop '${e}' (web components) / '${nn(e)}' (react) required`)}}))};const nn=n=>n.toLowerCase().split("-").map(((n,t)=>t===0?n:`${n.substring(0,1).toUpperCase()}${n.substring(1)}`)).join("");const tn=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const en=n=>parseInt(n,16);const an=n=>{const t=n.replace("#","").split("").map((n=>n.repeat(2)));return{r:en(n.length===4?t[0]:n.slice(1,3)),g:en(n.length===4?t[1]:n.slice(3,5)),b:en(n.length===4?t[2]:n.slice(5)),a:1}};const on=n=>{const t=n.slice(3,4).toLowerCase()==="a";const e=n.substring(t?5:4,n.length-1).replace(/ /g,"").split(",").map(Number);return{r:e[0],g:e[1],b:e[2],a:t?e[3]:1}};const rn=({scrollWidth:n,clientWidth:t})=>n>t;const sn=()=>!!document.querySelector("ic-classification-banner:not([inline='true'])");const cn=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.addEventListener("reset",t)};const ln=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.removeEventListener("reset",t)};const dn=(n,t=16)=>`${1/t*parseInt(n)}rem`;const un=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const pn=()=>window.navigator.userAgent.toUpperCase().indexOf("MAC")>=0;const fn=n=>{const t=n===null||n===void 0?void 0:n.slice(0,1).toLowerCase();if(t!=="#"&&t!=="r")return null;return t==="#"?an(n):on(n)};const vn=n=>n.charAt(0).toUpperCase()+n.slice(1);const gn=(n,t,e)=>{const a=n=>Array.from(n).some((n=>Array.isArray(e)?e.some((t=>n.slot===t)):n.slot===e));return a(n)||a(t)};const bn=n=>!!n.closest(".ag-cell")&&!!n.closest(".ag-root");const Cn=n=>{var t;return((t=n.parentElement)===null||t===void 0?void 0:t.tagName)===`${n.tagName}-GROUP`};const wn=(n,t)=>n.some((({type:n,addedNodes:e,removedNodes:a})=>n==="childList"&&gn(e,a,t)));const mn=(t,e,a)=>{if(wn(t,e)){n(a)}};export{a as $,O as A,T as B,h as C,z as D,x as E,H as F,R as G,v as H,e as I,W as J,Cn as K,V as L,_ as M,vn as N,gn as O,S as P,E as Q,t as R,b as S,rn as T,r as U,c as V,g as W,pn as X,I as Y,F as Z,s as _,mn as a,M as a0,Y as b,fn as c,Z as d,B as e,tn as f,U as g,$ as h,K as i,k as j,J as k,bn as l,j as m,d as n,Q as o,dn as p,sn as q,un as r,X as s,L as t,l as u,q as v,G as w,ln as x,cn as y,P as z};
|
2
|
+
//# sourceMappingURL=p-eca2fea1.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["IcInformationStatus","IcBrandForegroundEnum","VARIANT_ICONS","neutral","icon","neutralIcon","ariaLabel","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","IC_INHERITED_ARIA","IC_DEVICE_SIZES","XS","S","M","L","XL","IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","IGNORED_KEYBOARD_CHARACTERS","DARK_MODE_THRESHOLD","ANYWHERE_SEARCH_POSITION","icInput","inheritAttributes","element","attributes","attributeObject","forEach","attr","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","container","name","disabled","always","hasShadowDom","input","getHiddenInputElement","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","Array","from","querySelectorAll","filter","el","parentElement","renderFileHiddenInput","multiple","accept","undefined","hidden","files","onchange","click","removeHiddenInput","_a","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","trim","getBrandFromContext","brandFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","includes","Default","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","test","userAgent","handleHiddenFormButtonClick","form","button","hiddenFormButton","document","setAttribute","style","display","isEmptyString","length","isPropDefined","prop","getLabelFromValue","options","valueField","labelField","ungroupedOptions","map","option","children","push","matchingValue","find","getFilteredMenuOptions","includeDescriptions","searchString","position","label","description","lowerSearchString","startsWith","getOptionsWithoutGroupTitlesCount","optionsWithoutGroupTitles","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getBrandColorBrightness","themeRed","themeGreen","themeBlue","parseInt","getBrandForegroundAppearance","brightness","getSlot","querySelector","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","Number","replace","hasValidationStatus","status","isSlotUsed","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","propName","console","kebabToCamelCase","kebabCase","split","word","index","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","hexChars","char","repeat","r","slice","g","b","a","rgbaStrToObj","rgbaStr","isRGBA","rgbValues","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","removeDisabledFalse","isMacDevice","indexOf","convertToRGBA","color","firstChar","capitalize","text","charAt","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","isArray","isElInAGGrid","isSlottedInGroup","hasDynamicChildSlots","mutationList","slotNames","renderDynamicChildSlots","ref","forceUpdate"],"sources":["../web-components/dist/collection/utils/types.js","../web-components/dist/collection/utils/constants.js","../web-components/dist/collection/utils/helpers.js"],"sourcesContent":["export var IcInformationStatus;\n(function (IcInformationStatus) {\n IcInformationStatus[\"Warning\"] = \"warning\";\n IcInformationStatus[\"Error\"] = \"error\";\n IcInformationStatus[\"Success\"] = \"success\";\n})(IcInformationStatus || (IcInformationStatus = {}));\nexport var IcBrandForegroundEnum;\n(function (IcBrandForegroundEnum) {\n IcBrandForegroundEnum[\"Default\"] = \"default\";\n IcBrandForegroundEnum[\"Dark\"] = \"dark\";\n IcBrandForegroundEnum[\"Light\"] = \"light\";\n})(IcBrandForegroundEnum || (IcBrandForegroundEnum = {}));\n//# sourceMappingURL=types.js.map\n","import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\nexport const IC_BLOCK_COLOR_EXCEPTIONS = {\n \"ic-alert\": [\"ic-link\", \"ic-button\"],\n};\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n// Keyboard characters that do not affect the content of an input control when pressed\nexport const IGNORED_KEYBOARD_CHARACTERS = [\n \"Alt\",\n \"AltGraph\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"AudioVolumeDown\",\n \"AudioVolumeMute\",\n \"AudioVolumeUp\",\n \"CapsLock\",\n \"ContextMenu\",\n \"Control\",\n \"Delete\",\n \"End\",\n \"Enter\",\n \"Escape\",\n \"F1\",\n \"F10\",\n \"F11\",\n \"F12\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"Home\",\n \"Insert\",\n \"Meta\",\n \"NumLock\",\n \"PageDown\",\n \"PageUp\",\n \"Shift\",\n \"Tab\",\n];\n//# sourceMappingURL=constants.js.map\n","import { forceUpdate } from \"@stencil/core\";\nimport { IcBrandForegroundEnum, } from \"../utils/types\";\nimport { IC_BLOCK_COLOR_COMPONENTS, IC_BLOCK_COLOR_EXCEPTIONS, IC_FIXED_COLOR_COMPONENTS, } from \"./constants\";\nconst DARK_MODE_THRESHOLD = 133.3505;\nconst ANYWHERE_SEARCH_POSITION = \"anywhere\";\nconst icInput = \"ic-input\";\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (theEnum) => {\n const arr = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val;\n arr.push(str);\n }\n });\n return arr;\n};\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (element, attributes = []) => {\n const attributeObject = {};\n attributes.forEach((attr) => {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n element.removeAttribute(attr);\n }\n });\n return attributeObject;\n};\nexport const debounceEvent = (event, wait) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = event._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n };\n};\nexport const debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param container The element where the input will be added\n * @param value The value of the input\n * @param name The name of the input\n * @param disabled If true, the input is disabled\n * @param always Add a hidden input even if the container does not use Shadow\n */\nexport const renderHiddenInput = (container, value, name, disabled = false, always = true) => {\n if (name && (always || hasShadowDom(container))) {\n let input = getHiddenInputElement(container);\n if (!input) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value instanceof Date ? value.toISOString() : value || \"\";\n }\n};\nconst getHiddenInputElement = (container) => Array.from(container.querySelectorAll(`input.${icInput}`)).filter((el) => container === el.parentElement)[0];\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n * @param name The name of the input\n * @param value The value of the input\n */\nexport const renderFileHiddenInput = (event, container, multiple, disabled, accept, name, value) => {\n if (name !== undefined && hasShadowDom(container)) {\n let input = getHiddenInputElement(container);\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.disabled = disabled;\n if (value)\n input.files = value;\n if (accept)\n input.accept = accept;\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\n }\n};\nexport const removeHiddenInput = (container) => {\n var _a;\n (_a = getHiddenInputElement(container)) === null || _a === void 0 ? void 0 : _a.remove();\n};\nexport const hasShadowDom = (el) => !!el && !!el.shadowRoot && !!el.attachShadow;\nexport const getInputHelperTextID = (id) => id + \"-helper-text\";\nexport const getInputValidationTextID = (id) => id + \"-validation-text\";\nexport const getInputDescribedByText = (inputId, helperText, validationText) => `${helperText ? getInputHelperTextID(inputId) : \"\"} ${validationText ? getInputValidationTextID(inputId) : \"\"}`.trim();\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (el, brandFromEvent = null) => {\n var _a;\n const parentElement = el.parentElement || el.getRootNode().host.parentElement;\n const blockColorParent = parentElement === null || parentElement === void 0 ? void 0 : parentElement.closest(IC_BLOCK_COLOR_COMPONENTS.join(\",\"));\n // If within a block color component\n if (blockColorParent) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n if ((_a = IC_BLOCK_COLOR_EXCEPTIONS[parentTag]) === null || _a === void 0 ? void 0 : _a.includes(currentTag)) {\n return IcBrandForegroundEnum.Default;\n }\n else if (brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)) {\n return brandFromEvent;\n }\n else if (blockColorParent.classList.contains(`${parentTag}-${IcBrandForegroundEnum.Dark}`) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)) {\n return IcBrandForegroundEnum.Dark;\n }\n return IcBrandForegroundEnum.Light;\n }\n return IcBrandForegroundEnum.Default;\n};\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = () => \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)\n : false;\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (form, button) => {\n const hiddenFormButton = document.createElement(\"button\");\n button.type && hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n form.appendChild(hiddenFormButton);\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\nexport const isEmptyString = (value) => !value || value.trim().length === 0;\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop) => prop !== undefined ? prop : undefined;\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (value, options, valueField = \"value\", labelField = \"label\") => {\n const ungroupedOptions = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => ungroupedOptions.push(option));\n }\n else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find((option) => option[valueField] === value);\n if (matchingValue !== undefined)\n return matchingValue[labelField];\n }\n return undefined;\n};\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (options, includeDescriptions, searchString, position = ANYWHERE_SEARCH_POSITION, labelField = \"label\") => options.filter((option) => {\n var _a;\n const label = option[labelField].toLowerCase();\n const description = (_a = option.description) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n return position === ANYWHERE_SEARCH_POSITION\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n (description === null || description === void 0 ? void 0 : description.includes(lowerSearchString))\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n (description === null || description === void 0 ? void 0 : description.startsWith(lowerSearchString))\n : label.startsWith(lowerSearchString);\n});\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (options) => {\n const optionsWithoutGroupTitles = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n }\n else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n return optionsWithoutGroupTitles.length;\n};\nexport const deviceSizeMatches = (size) => window.matchMedia(`(max-width: ${size}px)`).matches;\nexport const getCurrentDeviceSize = () => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\nexport const getCssProperty = (cssVar) => getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-brand-text-color\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getBrandColorBrightness = () => {\n const themeRed = getCssProperty(\"--ic-brand-color-primary-r\");\n const themeGreen = getCssProperty(\"--ic-brand-color-primary-g\");\n const themeBlue = getCssProperty(\"--ic-brand-color-primary-b\");\n return ((parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000);\n};\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (brightness = getBrandColorBrightness()) => brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\nexport const getSlot = (element, name) => (element === null || element === void 0 ? void 0 : element.querySelector(`[slot=\"${name}\"]`)) || null;\nexport const slotHasContent = (element, name) => getSlot(element, name) !== null;\nexport const getSlotContent = (element, name) => {\n const slot = getSlot(element, name);\n return slot ? getSlotElements(slot) : null;\n};\nexport const getSlotElements = (slot) => {\n const slotContent = slot.firstElementChild;\n if (slotContent === null)\n return [slot];\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n};\nexport const getNavItemParentDetails = ({ parentElement, }) => {\n let navType = { navType: \"\", parent: null };\n if (parentElement) {\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n }\n return navType;\n};\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\nexport const hasValidationStatus = (status, disabled) => !!status && !disabled;\nexport const isSlotUsed = ({ children }, slotName) => Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (oldValue, newValue, callback) => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\nexport const onComponentRequiredPropUndefined = (props, component) => {\n props.forEach(({ prop, propName }) => {\n if (prop === null || prop === undefined) {\n console.error(`No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(propName)}' (react) required`);\n }\n });\n};\nexport const kebabToCamelCase = (kebabCase) => kebabCase\n .toLowerCase()\n .split(\"-\")\n .map((word, index) => index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`)\n .join(\"\");\nexport const checkResizeObserver = (callbackFn) => {\n if (typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\") {\n callbackFn();\n }\n};\nconst hex2dec = (v) => parseInt(v, 16);\nexport const hexToRgba = (hex) => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\nexport const rgbaStrToObj = (rgbaStr) => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\nexport const elementOverflowsX = ({ scrollWidth, clientWidth, }) => scrollWidth > clientWidth;\nexport const hasClassificationBanner = () => !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\nexport const addFormResetListener = (el, callbackFn) => {\n var _a;\n (_a = el.closest(\"FORM\")) === null || _a === void 0 ? void 0 : _a.addEventListener(\"reset\", callbackFn);\n};\nexport const removeFormResetListener = (el, callbackFn) => {\n var _a;\n (_a = el.closest(\"FORM\")) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"reset\", callbackFn);\n};\nexport const pxToRem = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (disabled, element) => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\nexport const isMacDevice = () => window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\nexport const isNumeric = (value) => /^-?\\d+$/.test(value);\nexport async function waitForHydration() {\n const elements = document.getElementsByTagName(\"*\");\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n }\n else {\n return false;\n }\n }\n return false;\n}\nexport const convertToRGBA = (color) => {\n const firstChar = color === null || color === void 0 ? void 0 : color.slice(0, 1).toLowerCase();\n if (firstChar !== \"#\" && firstChar !== \"r\")\n return null;\n return firstChar === \"#\" ? hexToRgba(color) : rgbaStrToObj(color);\n};\nexport const capitalize = (text) => text.charAt(0).toUpperCase() + text.slice(1);\nexport const checkSlotInChildMutations = (addedNodes, removedNodes, slotName) => {\n const hasSlot = (nodeList) => Array.from(nodeList).some((node) => Array.isArray(slotName)\n ? slotName.some((name) => node.slot === name)\n : node.slot === slotName);\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\nexport const isElInAGGrid = (el) => !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n/**\n * Checks if the component is slotted in its relevant 'group' component\n * @param component - the component to check\n */\nexport const isSlottedInGroup = (component) => { var _a; return ((_a = component.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) === `${component.tagName}-GROUP`; };\nexport const hasDynamicChildSlots = (mutationList, slotNames) => mutationList.some(({ type, addedNodes, removedNodes }) => type === \"childList\" &&\n checkSlotInChildMutations(addedNodes, removedNodes, slotNames));\nexport const renderDynamicChildSlots = (mutationList, slotNames, ref) => {\n if (hasDynamicChildSlots(mutationList, slotNames)) {\n forceUpdate(ref);\n }\n};\n//# sourceMappingURL=helpers.js.map\n"],"mappings":"oCAAU,IAACA,GACX,SAAWA,GACPA,EAAoB,WAAa,UACjCA,EAAoB,SAAW,QAC/BA,EAAoB,WAAa,SACpC,EAJD,CAIGA,IAAwBA,EAAsB,KACvC,IAACC,GACX,SAAWA,GACPA,EAAsB,WAAa,UACnCA,EAAsB,QAAU,OAChCA,EAAsB,SAAW,OACpC,EAJD,CAIGA,IAA0BA,EAAwB,K,w7FCLzC,MAACC,EAAgB,CACzBC,QAAS,CACLC,KAAMC,EACNC,UAAW,WAEfC,KAAM,CACFH,KAAMI,EACNF,UAAW,wBAEfG,QAAS,CACLL,KAAMM,EACNJ,UAAW,WAEfK,MAAO,CACHP,KAAMQ,EACNN,UAAW,SAEfO,QAAS,CACLT,KAAMU,EACNR,UAAW,YAIP,MAACS,EAAoB,CAC7B,cACA,oBACA,YACA,gBACA,eACA,mBACA,mBACA,eACA,gBACA,kBACA,oBACA,gBACA,cACA,eACA,gBACA,cACA,eACA,oBACA,aACA,kBACA,YACA,YACA,gBACA,wBAEQ,MAACC,EAAkB,CAC3BC,GAAI,IACJC,EAAG,IACHC,EAAG,IACHC,EAAG,KACHC,GAAI,OAED,MAAMC,EAA4B,CACrC,UACA,oBACA,YACA,qBACA,YAEG,MAAMC,EAA4B,CAAC,YACnC,MAAMC,EAA4B,CACrC,WAAY,CAAC,UAAW,cAShB,MAACC,EAA6B,QAC9B,MAACC,EAA6B,IAE9B,MAACC,EAA8B,CACvC,MACA,WACA,YACA,YACA,aACA,UACA,kBACA,kBACA,gBACA,WACA,cACA,UACA,SACA,MACA,QACA,SACA,KACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,OACA,UACA,WACA,SACA,QACA,OCpHJ,MAAMC,EAAsB,SAC5B,MAAMC,EAA2B,WACjC,MAAMC,EAAU,WAqBJ,MAACC,EAAoB,CAACC,EAASC,EAAa,MACpD,MAAMC,EAAkB,GACxBD,EAA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AACK,GAAgBrL,KAASA,EAAG4B,QAAQ,eAAiB5B,EAAG4B,QAAQ,YAKjE,MAAC0J,GAAoBzD,IAAgB,IAAIlH,EAAI,QAASA,EAAKkH,EAAU5H,iBAAmB,MAAQU,SAAY,OAAS,EAAIA,EAAGoB,WAAa,GAAG8F,EAAU9F,eAAe,EAC1K,MAAMwJ,GAAuB,CAACC,EAAcC,IAAcD,EAAanE,MAAK,EAAG/H,OAAMyL,aAAYC,kBAAmB1L,IAAS,aAChIwL,GAA0BC,EAAYC,EAAcS,KAC5C,MAACC,GAA0B,CAACF,EAAcC,EAAWE,KAC7D,GAAIJ,GAAqBC,EAAcC,GAAY,CAC/CG,EAAYD,EACpB,U","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{f as n}from"./p-8e4e97b4.js";const t={XS:576,S:768,M:992,L:1200,XL:99999};const e=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"];const s=["ic-alert"];const o={"ic-alert":["ic-link","ic-button"]};var r;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(r||(r={}));var i;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(i||(i={}));var a;(function(n){n[n["January"]=0]="January";n[n["February"]=1]="February";n[n["March"]=2]="March";n[n["April"]=3]="April";n[n["May"]=4]="May";n[n["June"]=5]="June";n[n["July"]=6]="July";n[n["August"]=7]="August";n[n["September"]=8]="September";n[n["October"]=9]="October";n[n["November"]=10]="November";n[n["December"]=11]="December"})(a||(a={}));var c;(function(n){n[n["Sun"]=0]="Sun";n[n["Mon"]=1]="Mon";n[n["Tue"]=2]="Tue";n[n["Wed"]=3]="Wed";n[n["Thu"]=4]="Thu";n[n["Fri"]=5]="Fri";n[n["Sat"]=6]="Sat"})(c||(c={}));var u;(function(n){n[n["Sunday"]=0]="Sunday";n[n["Monday"]=1]="Monday";n[n["Tuesday"]=2]="Tuesday";n[n["Wednesday"]=3]="Wednesday";n[n["Thursday"]=4]="Thursday";n[n["Friday"]=5]="Friday";n[n["Saturday"]=6]="Saturday"})(u||(u={}));var d;(function(n){n[n["Sunday"]=0]="Sunday";n[n["Monday"]=1]="Monday";n[n["Tuesday"]=2]="Tuesday";n[n["Wednesday"]=3]="Wednesday";n[n["Thursday"]=4]="Thursday";n[n["Friday"]=5]="Friday";n[n["Saturday"]=6]="Saturday"})(d||(d={}));const l="ic-input";const f="input.ic-input";const p=n=>{const t=[];Object.values(n).forEach((n=>{if(isNaN(Number(n))){const e=n;t.push(e)}}));return t};const y=(n,t)=>{let e;return(...s)=>{const o=t();clearTimeout(e);e=setTimeout(n,o,...s)}};const b=(n,t,e,s,o)=>{if(e!==undefined&&(n||m(t))){const n=t.querySelectorAll(f);const r=Array.from(n);const i=r.filter((n=>t===n.parentElement));let a=i[0];if(a===null||a===undefined){a=t.ownerDocument.createElement("input");a.type="hidden";a.classList.add(l);t.appendChild(a)}a.disabled=!!o;a.name=e;if(s instanceof Date){a.value=s?s.toISOString():""}else{a.value=s||""}}};const m=n=>n?!!n.shadowRoot&&!!n.attachShadow:false;const v=n=>n+"-helper-text";const N=n=>n+"-validation-text";const x=(n,t,e)=>`${t?v(n):""} ${e?N(n):""}`.trim();const $=(n,t=null)=>{var r;const a=n.parentElement||n.getRootNode().host.parentElement;const c=a===null||a===void 0?void 0:a.closest(e.join(","));if(c){const e=c.tagName.toLowerCase();const a=n.tagName.toLowerCase();if((r=o[e])===null||r===void 0?void 0:r.includes(a)){return i.Default}else if(t!==null&&!s.includes(e)){return t}else if(c.classList.contains(`${e}-${i.Dark}`)||c.classList.contains(i.Dark)){return i.Dark}return i.Light}return i.Default};const h=n=>n?n.trim().length===0:true;const S=n=>n!==undefined?n:null;const w=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const M=()=>{if(w(T.S)){return T.S}if(w(T.M)){return T.M}if(w(T.L)){return T.L}if(w(T.XL)){return T.XL}return T.UNDEFINED};const g=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const k=n=>{const t=n.firstElementChild;if(t!==null){const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null}else{return n===null?null:[n]}};const T={XS:Number(g("--ic-breakpoint-xs").replace("px","")),S:Number(g("--ic-breakpoint-sm").replace("px","")),M:Number(g("--ic-breakpoint-md").replace("px","")),L:Number(g("--ic-breakpoint-lg").replace("px","")),XL:Number(g("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const A=({children:n},t)=>Array.from(n).some((n=>n.getAttribute("slot")===t));const F=(n,t)=>{n.forEach((({prop:n,propName:e})=>{if(n===null||n===undefined){console.error(`No ${e} specified for ${t} component - prop '${e}' (web components) / '${O(e)}' (react) required`)}}))};const O=n=>n.toLowerCase().split("-").map(((n,t)=>t===0?n:`${n.substring(0,1).toUpperCase()}${n.substring(1)}`)).join("");const j=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const D=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.addEventListener("reset",t)};const L=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.removeEventListener("reset",t)};const X=(n,t=16)=>`${1/t*parseInt(n)}rem`;const I=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const J=n=>/^-?\d+$/.test(n);const W=n=>n.charAt(0).toUpperCase()+n.slice(1);const q=(n,t,e)=>{const s=n=>Array.from(n).some((n=>Array.isArray(e)?e.some((t=>n.slot===t)):n.slot===e));return s(n)||s(t)};const E=(n,t,e)=>{const s={};const o=t.map((n=>n.index));const r=Object.keys(n);const i=Object.values(n);const a=r.length+o.length;for(let n=0,c=0;n<a;n++){if(o.includes(n)){s[t[o.indexOf(n)].key]=e;continue}s[r[c]]=i[c];c++}return s};const R=(n,t)=>n.some((({type:n,addedNodes:e,removedNodes:s})=>n==="childList"?q(e,s,t):false));const z=(t,e,s)=>{if(R(t,e)){n(s)}};export{b as A,T as D,i as I,z as a,h as b,E as c,y as d,w as e,k as f,$ as g,j as h,A as i,t as j,u as k,a as l,d as m,c as n,F as o,X as p,M as q,I as r,p as s,S as t,W as u,x as v,L as w,D as x,J as y,r as z};
|
2
|
+
//# sourceMappingURL=p-ed542433.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["IC_DEVICE_SIZES","XS","S","M","L","XL","IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","IcInformationStatus","IcBrandForegroundEnum","IcDateInputMonths","IcShortDayNames","IcDayNames","IcWeekDays","icInput","linkIcInput","stringEnumToArray","theEnum","arr","Object","values","forEach","val","isNaN","Number","str","push","dynamicDebounce","func","getDelay","timer","args","delay","clearTimeout","setTimeout","renderHiddenInput","always","container","name","value","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","trim","getBrandFromContext","brandFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","_a","includes","Default","contains","Dark","Light","isEmptyString","length","isPropDefined","prop","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","document","documentElement","getPropertyValue","getSlotElements","slot","slotContent","firstElementChild","elements","assignedElements","childNodes","replace","isSlotUsed","children","slotName","some","child","getAttribute","onComponentRequiredPropUndefined","props","component","propName","console","error","kebabToCamelCase","kebabCase","split","map","word","index","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","parseInt","removeDisabledFalse","element","removeAttribute","isNumeric","test","capitalize","text","charAt","slice","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","isArray","addDataToPosition","dataObject","newKeys","newValue","newData","newIndexes","key","keys","numberOfKeys","i","j","indexOf","hasDynamicChildSlots","mutationList","slotNames","renderDynamicChildSlots","ref","forceUpdate"],"sources":["src/utils/constants.ts","src/utils/types.ts","src/utils/helpers.ts"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\", \"ic-button\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n\n// Keyboard characters that do not affect the content of an input control when pressed\nexport const IGNORED_KEYBOARD_CHARACTERS = [\n \"Alt\",\n \"AltGraph\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"AudioVolumeDown\",\n \"AudioVolumeMute\",\n \"AudioVolumeUp\",\n \"CapsLock\",\n \"ContextMenu\",\n \"Control\",\n \"Delete\",\n \"End\",\n \"Enter\",\n \"Escape\",\n \"F1\",\n \"F10\",\n \"F11\",\n \"F12\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"Home\",\n \"Insert\",\n \"Meta\",\n \"NumLock\",\n \"PageDown\",\n \"PageUp\",\n \"Shift\",\n \"Tab\",\n];\n","import {\n IcPaginationLabelTypes,\n IcPaginationTypes,\n IcPaginationAlignmentOptions,\n} from \"../components\";\n\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcBrandForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement | null;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcRequiredPropsTypes =\n | string\n | boolean\n | number\n | HTMLElement\n | IcMenuOption[]\n | undefined;\n\nexport type IcPropObject = { prop: IcRequiredPropsTypes; propName: string };\n\nexport type IcRelatedTarget = EventTarget | undefined;\n\nexport type IcOrientation = \"horizontal\" | \"vertical\";\n\nexport type IcEmphasisType = \"filled\" | \"outlined\";\n\nexport interface IcValueEventDetail {\n value: string;\n keyPressed?: string;\n}\n\nexport interface IcMultiValueEventDetail {\n value: string | string[] | null;\n keyPressed?: string;\n}\n\nexport interface IcBlurEventDetail {\n relatedTarget: IcRelatedTarget | null;\n}\n\nexport type IcSelectTypes = \"single\" | \"multi\";\n\nexport type IcSelectMethodTypes = \"auto\" | \"manual\";\n\nexport type IcDeviceSizes = 0 | 576 | 768 | 992 | 1200;\n\ntype RGB = `rgb(${string})`;\ntype RGBA = `rgba(${string})`;\ntype HEX = `#${string}`;\n\nexport type IcColor = RGB | RGBA | HEX;\n\nexport type IcIconPlacementOptions = \"left\" | \"right\" | \"top\";\n\nexport type IcButtonTooltipPlacement = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface IcPaginationBarOptions {\n alignment?: IcPaginationAlignmentOptions;\n hideAllFromItemsPerPage?: boolean;\n hideRangeLabel?: boolean;\n itemLabel?: string;\n itemsPerPageOptions?: { label: string; value: string }[];\n monochrome?: boolean;\n pageLabel?: string;\n rangeLabelType?: IcPaginationLabelTypes;\n selectedItemsPerPage?: number;\n setToFirstPageOnPaginationChange?: boolean;\n showGoToPageControl?: boolean;\n showItemsPerPageControl?: boolean;\n theme?: IcThemeMode;\n type?: IcPaginationTypes;\n}\n\nexport type IcDateFormat = \"DD/MM/YYYY\" | \"MM/DD/YYYY\" | \"YYYY/MM/DD\";\n\nexport enum IcDateInputMonths {\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n}\n\nexport enum IcShortDayNames {\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n}\n\nexport enum IcDayNames {\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n}\n\nexport enum IcWeekDays {\n Sunday = 0,\n Monday = 1,\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n","/**\n * To investigate:\n * IcColorRGBA works via @ukic/web-components but IcBrandForegroundEnum does not even though they are exported\n * from @ukic/web-components in the same file. Why?\n */\nimport { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcBrandForegroundNoDefault,\n IcBrandForeground,\n IcMenuOption,\n} from \"@ukic/web-components\";\nimport { IcDataTableDataType } from \"../interface\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\"; // Using @ukic/web-components/dist/types/utils/constants does not work so duplicated constants into canary package\nimport { IcBrandForegroundEnum } from \"./types\"; // Using @ukic/web-components/dist/types/utils/types does not work so duplicated constants into canary package\n\nconst DARK_MODE_THRESHOLD = 133.3505;\nconst ANYWHERE_SEARCH_POSITION = \"anywhere\";\nconst icInput = \"ic-input\";\nconst linkIcInput = \"input.ic-input\";\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\nexport const dynamicDebounce = (\n func: (...args: unknown[]) => void,\n getDelay: () => number\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n const delay = getDelay();\n clearTimeout(timer);\n timer = setTimeout(func, delay, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | Date | undefined | null,\n disabled: boolean | undefined\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(linkIcInput);\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.disabled = !!disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : \"\";\n } else {\n input.value = value || \"\";\n }\n }\n};\n\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n name: string,\n value: FileList | undefined | null,\n disabled: boolean,\n accept: string | undefined | null\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n const inputs = container.querySelectorAll(linkIcInput);\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.disabled = disabled;\n\n if (value) input.files = value;\n if (accept) input.accept = accept;\n\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement | null | undefined): boolean =>\n el ? !!el.shadowRoot && !!el.attachShadow : false;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (\n el: Element,\n brandFromEvent: IcBrandForeground | null = null\n): IcBrandForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement?.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcBrandForegroundEnum.Default;\n } else if (\n brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return brandFromEvent;\n } else if (\n blockColorParent.classList.contains(\n `${parentTag}-${IcBrandForegroundEnum.Dark}`\n ) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n }\n\n return IcBrandForegroundEnum.Light;\n }\n\n return IcBrandForegroundEnum.Default;\n};\n\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n : false;\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n button.type && hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string | null): boolean =>\n value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions = ANYWHERE_SEARCH_POSITION,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === ANYWHERE_SEARCH_POSITION\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the brand colour, calculated by using the brand RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-brand-text-color\"\n * @returns number representing the brightness of the brand colour\n */\nexport const getBrandColorBrightness = (): number => {\n const r = getCssProperty(\"--ic-brand-color-primary-r\");\n const g = getCssProperty(\"--ic-brand-color-primary-g\");\n const b = getCssProperty(\"--ic-brand-color-primary-b\");\n return (parseInt(r) * 299 + parseInt(g) * 587 + parseInt(b) * 114) / 1000;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (\n brightness = getBrandColorBrightness()\n): IcBrandForegroundNoDefault =>\n brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (\n element: HTMLElement | undefined,\n name: string\n): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] | null => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = ({\n parentElement,\n}: HTMLElement): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n if (parentElement) {\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n }\n\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status?: IcInformationStatusOrEmpty,\n disabled?: boolean\n): boolean => !!status && !disabled;\n\nexport const isSlotUsed = (\n { children }: HTMLElement,\n slotName: string\n): boolean =>\n Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n props.forEach(({ prop, propName }) => {\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n });\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string =>\n kebabCase\n .toLowerCase()\n .split(\"-\")\n .map((word, index) =>\n index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`\n )\n .join(\"\");\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = (v: string) => parseInt(v, 16);\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\n\nexport const elementOverflowsX = ({\n scrollWidth,\n clientWidth,\n}: HTMLElement): boolean => scrollWidth > clientWidth;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.addEventListener(\"reset\", callbackFn);\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.removeEventListener(\"reset\", callbackFn);\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (\n disabled: boolean | undefined,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean =>\n window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n\nexport const isNumeric = (value: string): boolean => /^-?\\d+$/.test(value);\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const convertToRGBA = (color: IcColor): IcColorRGBA | null => {\n const firstChar = color?.slice(0, 1).toLowerCase();\n return firstChar === \"#\"\n ? hexToRgba(color)\n : firstChar === \"r\"\n ? rgbaStrToObj(color)\n : null;\n};\n\nexport const capitalize = (text: string): string =>\n text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string | string[]\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) =>\n Array.isArray(slotName)\n ? slotName.some((name) => (node as Element).slot === name)\n : (node as Element).slot === slotName\n );\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const isElInAGGrid = (el: HTMLElement): boolean =>\n !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n\nexport const addDataToPosition = (\n dataObject: IcDataTableDataType,\n newKeys: { key: string; index: number }[],\n newValue: unknown\n): IcDataTableDataType => {\n const newData: IcDataTableDataType = {};\n const newIndexes = newKeys.map((key) => key.index);\n\n const keys = Object.keys(dataObject);\n const values = Object.values(dataObject);\n const numberOfKeys = keys.length + newIndexes.length;\n\n for (let i = 0, j = 0; i < numberOfKeys; i++) {\n if (newIndexes.includes(i)) {\n newData[newKeys[newIndexes.indexOf(i)].key] = newValue;\n continue;\n }\n newData[keys[j]] = values[j];\n j++;\n }\n return newData;\n};\n\n/*\n * Checks if the component is slotted in its relevant 'group' component\n * @param component - the component to check\n */\nexport const isSlottedInGroup = (component: HTMLElement): boolean => {\n const parent = component?.tagName + \"-GROUP\";\n return component?.parentElement?.tagName === parent;\n};\n\nexport const hasDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[]\n): boolean =>\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, slotNames)\n : false\n );\n\nexport const renderDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[],\n ref: unknown\n): void => {\n if (hasDynamicChildSlots(mutationList, slotNames)) {\n forceUpdate(ref);\n }\n};\n"],"mapp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KE,MAAM,GAErC,MAAMC,EAA4B,CACvCC,EACAC,EACAxC,KAEA,MAAMyC,EAAWC,GACfhH,MAAMC,KAAK+G,GAAUzC,MAAM0C,GACzBjH,MAAMkH,QAAQ5C,GACVA,EAASC,MAAM/E,GAAUyH,EAAiBpD,OAASrE,IAClDyH,EAAiBpD,OAASS,IAEnC,OAAOyC,EAAQF,IAAeE,EAAQD,EAAa,E,MAMxCK,EAAoB,CAC/BC,EACAC,EACAC,KAEA,MAAMC,EAA+B,GACrC,MAAMC,EAAaH,EAAQlC,KAAKsC,GAAQA,EAAIpC,QAE5C,MAAMqC,EAAOrJ,OAAOqJ,KAAKN,GACzB,MAAM9I,EAASD,OAAOC,OAAO8I,GAC7B,MAAMO,EAAeD,EAAK/E,OAAS6E,EAAW7E,OAE9C,IAAK,IAAIiF,EAAI,EAAGC,EAAI,EAAGD,EAAID,EAAcC,IAAK,CAC5C,GAAIJ,EAAWnF,SAASuF,GAAI,CAC1BL,EAAQF,EAAQG,EAAWM,QAAQF,IAAIH,KAAOH,EAC9C,Q,CAEFC,EAAQG,EAAKG,IAAMvJ,EAAOuJ,GAC1BA,G,CAEF,OAAON,CAAO,EAYT,MAAMQ,EAAuB,CAClCC,EACAC,IAEAD,EAAazD,MAAK,EAAG9D,OAAMoG,aAAYC,kBACrCrG,IAAS,YACLmG,EAA0BC,EAAYC,EAAcmB,GACpD,Q,MAGKC,EAA0B,CACrCF,EACAC,EACAE,KAEA,GAAIJ,EAAqBC,EAAcC,GAAY,CACjDG,EAAYD,E","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,c as e,h as i,H as s,g as a,f as o}from"./p-8e4e97b4.js";import{r as n,b as r,N as l,O as c,A as h,z as d,P as u,x as p,t as b,y as f,E as m,j as v,k as g,Q as x,u as y,R as w,C as k,S as z,L,i as C,F as H}from"./p-eca2fea1.js";const $=`<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.08748 0L0.912476 1.175L4.72914 5L0.912476 8.825L2.08748 10L7.08748 5L2.08748 0Z" fill="currentColor"/>\n</svg>\n`;const T=`<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.1709 8.825L7.34589 5L11.1709 1.175L9.99589 0L4.99589 5L9.99589 10L11.1709 8.825ZM0.829224 0H2.49589V10H0.829224V0Z" fill="currentColour"/>\n</svg>`;const M='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{box-sizing:border-box;width:100%;display:flex;justify-content:center}nav{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}ic-button{cursor:pointer}ic-button.next-previous{--icon-width:var(--ic-space-xs);--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs));padding:0 var(--ic-space-xxs) 0 var(--ic-space-xxxs)}ic-button.first-last{--icon-width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs))}ic-button.first-last::part(button),ic-button.next-previous::part(button){color:var(--ic-pagination-chevron)}:host(.ic-pagination-monochrome) ic-button.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.next-previous::part(button){color:var(--ic-pagination-chevron-monochrome)}ic-button.ic-button-disabled.first-last::part(button),ic-button.ic-button-disabled.next-previous::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.next-previous::part(button){color:var(--ic-pagination-chevron-disabled)}.disabled{color:var(--ic-color-text-disabled-mid);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-current-page{display:none}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}';const j=M;const B=class{constructor(s){t(this,s);this.icPageChange=e(this,"icPageChange",7);this.endEllipsis=false;this.endItems=[];this.midItems=[];this.startEllipsis=false;this.startItems=[];this.adjacentPageCount=1;this.boundaryPageCount=1;this.defaultPage=1;this.disabled=false;this.hideCurrentPage=false;this.hideFirstAndLastPageButton=false;this.label="Page";this.monochrome=false;this.theme="inherit";this.type="simple";this.currentPage=this.defaultPage;this.handleClickFirst=()=>{this.currentPage=1;this.icPageChange.emit({value:this.currentPage})};this.handleClickPrevious=()=>{this.currentPage--;this.icPageChange.emit({value:this.currentPage})};this.handleClickNext=()=>{this.currentPage++;this.icPageChange.emit({value:this.currentPage})};this.handleClickLast=()=>{this.currentPage=this.pages;this.icPageChange.emit({value:this.currentPage})};this.firstButton=()=>i("ic-button",{id:"first-page-button","aria-label":"Go to first page",theme:this.theme,onClick:this.handleClickFirst,class:"page-button first-last",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:T});this.previousButton=()=>i("ic-button",{id:"previous-page-button","aria-label":"Go to previous page",theme:this.theme,onClick:this.handleClickPrevious,class:"page-button next-previous flip",disabled:this.currentPage===1||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:$});this.nextButton=()=>i("ic-button",{id:"next-page-button","aria-label":"Go to next page",theme:this.theme,onClick:this.handleClickNext,class:"page-button next-previous",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:$});this.lastButton=()=>i("ic-button",{id:"last-page-button","aria-label":"Go to last page",theme:this.theme,onClick:this.handleClickLast,class:"page-button first-last flip",disabled:this.currentPage===this.pages||this.disabled,variant:"icon-tertiary",monochrome:this.theme=="light"||this.theme=="dark",innerHTML:T});this.renderStartEllipsis=()=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"start-ellipsis",disabled:this.disabled});this.renderEndEllipsis=()=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,type:"ellipsis",id:"end-ellipsis",disabled:this.disabled});this.renderStartItems=()=>this.startItems.map((t=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderEndItems=()=>this.endItems.map((t=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderMiddleItems=()=>this.midItems.map((t=>i("ic-pagination-item",{theme:this.theme,monochrome:this.monochrome,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})))}watchAdjacentPageCountHandler(){if(this.adjacentPageCount>2){this.adjacentPageCount=2}}watchBoundaryPageCountHandler(){if(this.boundaryPageCount>2){this.boundaryPageCount=2}}watchDisabledHandler(){n(this.disabled,this.el)}watchNumberPagesHandler(){this.watchPageChangeHandler()}watchTypeHandler(){this.watchPageChangeHandler()}watchPageChangeHandler(){if(this.type==="simple"){return}this.startEllipsis=false;this.endEllipsis=false;this.startItems=[];this.endItems=[];this.midItems=[];const t=[];let e=0;const i=[];let s=this.pages;const a=[];let o;let n;let r=false;let l=false;if(this.pages<=this.boundaryPageCount*2+this.adjacentPageCount*2+3){this.startEllipsis=false;this.endEllipsis=false;for(let e=1;e<=this.pages;e++){t.push(e)}this.startItems=t;return}e=this.boundaryPageCount===0?1:this.boundaryPageCount;s=this.boundaryPageCount===0?this.pages:this.pages-this.boundaryPageCount+1;if(this.currentPage<=this.adjacentPageCount+this.boundaryPageCount+2){r=false;l=true;let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}o=e+1;n=o+t}else{r=true;if(this.currentPage>this.pages-(this.adjacentPageCount+this.boundaryPageCount+2)){let t=2*this.adjacentPageCount+1;if(this.boundaryPageCount===0){t--}n=this.boundaryPageCount===0?this.pages-1:this.pages-this.boundaryPageCount;o=n-t}else{l=true;o=this.currentPage-this.adjacentPageCount;n=this.currentPage+this.adjacentPageCount}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&r===false){for(let i=1;i<=e;i++){t.push(i)}}if(this.boundaryPageCount>0||this.boundaryPageCount===0&&l===false){for(let t=s;t<=this.pages;t++){i.push(t)}}for(let t=o;t<=n;t++){a.push(t)}this.startEllipsis=r;this.endEllipsis=l;this.startItems=t;this.endItems=i;this.midItems=a}componentWillLoad(){this.watchPageChangeHandler();this.watchBoundaryPageCountHandler();this.watchAdjacentPageCountHandler();n(this.disabled,this.el)}componentDidLoad(){r([{prop:this.pages,propName:"pages"}],"Pagination")}paginationItemClickHandler(t){const e=t.detail.page;this.currentPage=e;this.icPageChange.emit({value:this.currentPage})}async setCurrentPage(t){if(typeof t==="number"&&t>0&&t<=this.pages){this.currentPage=t}else{console.error("Current page must be a number greater than zero but less than or equal to the total number of pages")}}render(){const{type:t,currentPage:e,hideCurrentPage:a,disabled:o,hideFirstAndLastPageButton:n,label:r,theme:l,monochrome:c}=this;return i(s,{key:"9f9c0ceb1629ebff96c677d7b4ad9995bbe480cd",class:{[`ic-theme-${l}`]:l!=="inherit",["ic-pagination-monochrome"]:!!c}},t==="simple"&&i("nav",{key:"4d24ed30438c6755a1717454ee83e2a1b58d93c5",class:{["disabled"]:!!o},role:"navigation","aria-label":"Pagination Navigation"},n?null:this.firstButton(),this.previousButton(),i("ic-pagination-item",{key:"784f99d1fa32d4f48c6de793707825333e45651a",theme:this.theme,monochrome:this.monochrome,type:"simple-current",page:e,label:r,class:{["hide-current-page"]:!!a},disabled:o}),this.nextButton(),n?null:this.lastButton()),t==="complex"&&i("nav",{key:"ce6061fcee8e202cb895e2919525b64c6a1c1114",class:{["disabled"]:!!o},role:"navigation","aria-label":"Pagination Navigation"},n?null:this.firstButton(),this.previousButton(),this.renderStartItems(),this.startEllipsis&&this.renderStartEllipsis(),this.renderMiddleItems(),this.endEllipsis&&this.renderEndEllipsis(),this.renderEndItems(),this.nextButton(),n?null:this.lastButton()),t==="complex"&&i("span",{key:"4980f1fd9ebd31a5b8835876479e12a8a0f5d54d",class:"sr-only","aria-live":"polite"},"Page ",this.currentPage))}get el(){return a(this)}static get watchers(){return{adjacentPageCount:["watchAdjacentPageCountHandler"],boundaryPageCount:["watchBoundaryPageCountHandler"],disabled:["watchDisabledHandler"],pages:["watchNumberPagesHandler"],type:["watchTypeHandler"],currentPage:["watchPageChangeHandler"]}}};B.style=j;const P='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}a{text-align:center}.item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--ic-space-xl) + var(--ic-space-sm));height:var(--ic-space-xl);margin:var(--ic-space-xxs) var(--ic-space-xxxs);cursor:pointer;text-decoration:none}button{background:none;border:none;outline:inherit;position:relative}.ellipsis{pointer-events:none;--ic-typography-color:var(--ic-pagination-ellipsis)}.monochrome .ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome)}.item-container:focus{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.page{--ic-typography-color:var(--ic-pagination-page-number)}.monochrome .page{--ic-typography-color:var(--ic-pagination-page-number-monochrome)}.simple-current{min-width:calc(var(--ic-space-xxl) + var(--ic-space-md));height:var(--ic-space-lg);cursor:default}.item-container.page:hover:not(.selected):not(:focus){border-radius:var(--ic-border-radius);background-color:var(--ic-pagination-hover)}.item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed)}.monochrome .item-container.page:hover:not(.selected):not(:focus){background-color:var(--ic-pagination-hover-monochrome)}.monochrome .item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed-monochrome)}.selected{pointer-events:none;outline:none}.selected::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-pagination-selected-banner)}.monochrome .selected::after{background-color:var(--ic-pagination-selected-banner-monochrome)}.page-selected{--ic-typography-color:var(--ic-pagination-text)}.item-container.page.light:hover:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-hover)}.item-container.page.light:active:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-pressed)}ic-typography.light,ic-typography.page-selected.light{--ic-typography-color:var(--ic-architectural-white)}.selected.light::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome)}.item-container.page.dark:hover:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-hover)}.item-container.page.dark:active:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-pressed)}ic-typography.dark{--ic-typography-color:var(--ic-color-text-primary)}.selected.dark::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome-dark)}.disabled{--ic-typography-color:var(--ic-pagination-text-disabled);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.disabled.page ic-typography{--ic-typography-color:var(--ic-pagination-page-number-disabled)}.disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-disabled)}.monochrome .disabled.page{--ic-typography-color:var(--ic-pagination-page-number-monochrome-disabled)}.monochrome .disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome-disabled)}@media (forced-colors: active){.selected::after{background-color:Highlight}.selected.light::after{background-color:Highlight}.selected.dark::after{background-color:Highlight}.disabled{--ic-typography-color:GrayText}}';const D=P;const I=class{constructor(i){t(this,i);this.paginationItemClick=e(this,"paginationItemClick",7);this.disabled=false;this.label="Page";this.monochrome=false;this.selected=false;this.theme="inherit";this.handleClick=()=>{this.paginationItemClick.emit({page:this.page||null})}}watchDisabledHandler(){n(this.disabled,this.el)}watchLabelHandler(){this.capitalizedLabel=l(this.label)}componentWillLoad(){this.watchLabelHandler();n(this.disabled,this.el)}render(){const{page:t,selected:e,type:s,disabled:a,label:o,capitalizedLabel:n,monochrome:r}=this;return i("a",{key:"c067a0e35e2a92dff8d7f24d135a06a686d74a7d",class:{["monochrome"]:!!r}},s==="ellipsis"?i("div",{class:{["item-container"]:true,["ellipsis"]:true,["disabled"]:!!a}},i("ic-typography",{variant:"label"},"...")):s==="page"?i("button",{disabled:a,onClick:this.handleClick,tabindex:e?"-1":"0",role:"button","aria-current":e&&"page","aria-label":e?`${o}: ${t}`:`Go to ${o} ${t}`,class:{["selected"]:!a&&e,["disabled"]:!!a,["item-container"]:true,["page"]:s==="page"}},i("ic-typography",{variant:"label",class:{["page-selected"]:e,["disabled"]:!!a}},t)):i("ic-typography",{"aria-live":"polite",class:{[`simple-current`]:true,["disabled"]:!!a},variant:"label"},n," ",t))}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],label:["watchLabelHandler"]}}};I.style=D;const O=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />\n</svg>\n`;const N=`<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n<path d="M12.6666 4.27334L11.7266 3.33334L7.99998 7.06001L4.27331 3.33334L3.33331 4.27334L7.05998 8.00001L3.33331 11.7267L4.27331 12.6667L7.99998 8.94001L11.7266 12.6667L12.6666 11.7267L8.93998 8.00001L12.6666 4.27334Z" fill="currentColor" />\n</svg>\n`;const q='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--menu-max-height:100px;--border-color:var(--ic-select-field-border);--border-color-hover:var(--ic-select-field-border-hover);--border-color-pressed:var(--ic-select-field-border-pressed);--border-color-disabled:var(--ic-select-field-border-disabled);--border-color-error:var(--ic-select-field-border-error);--border-color-error-hover:var(--ic-select-field-border-error-hover);--border-color-error-pressed:var(--ic-select-field-border-error-pressed);--border-color-success:var(--ic-select-field-border-success);--border-color-success-hover:var(--ic-select-field-border-success-hover);--border-color-success-pressed:var(--ic-select-field-border-success-pressed);--border-color-warning:var(--ic-select-field-border-warning);--border-color-warning-hover:var(--ic-select-field-border-warning-hover);--border-color-warning-pressed:var(--ic-select-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-select-field-labe);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle\n );--ic-input-validation-status-text-color:var(--ic-select-state-text);--ic-input-validation-error:var(--ic-select-state-icon-error);--ic-input-validation-warning-icon-color:var(--ic-select-state-icon-warning);--ic-input-validation-success-icon-color:var(--ic-select-state-icon-success);--menu-item-text-color:var(--ic-select-list-option-text);--menu-bg-color:var(--ic-select-list-option-background);--menu-border-color:var(--ic-select-dropdown-list-border)}:host(.ic-select-disabled){--ic-input-label-text-color:var(--ic-select-field-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle-disabled\n )}:host(.ic-select-full-width){width:100%}ic-input-component-container.menu-open{--border-color:var(--ic-select-field-border-pressed)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-select-field-background);color:var(--ic-select-content-text);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:0.375rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 0.375rem center;background-image:var(--ic-select-mobile-dropdown-icon);caret-color:var(--ic-select-input-field-text-cursor)}select option,.select-option-selected{color:var(--ic-select-list-option-text)}select:disabled{color:var(--ic-select-content-text-disabled);background-image:var(--ic-select-mobile-dropdown-icon-disabled)}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center;position:relative}.select-input{width:100%;height:100%;padding:0 0.375rem;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none;background-color:var(--ic-select-field-background);color:var(--ic-select-content-text)}.select-input:focus{outline:none}.select-input[disabled]{pointer-events:none}:host(.ic-select-searchable) .select-input{cursor:auto}.select-input.with-clear-button{padding-right:0}.value-text{max-width:calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-bottom:0 !important}.value-text.with-clear-button{padding-right:calc(var(--ic-space-xl) + var(--ic-space-xs))}.searchable-select-container{align-items:center;display:flex;width:100%;position:relative}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xxs);color:var(--ic-select-expand-icon-color)}.expand-icon>svg{display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.ic-select-disabled) .expand-icon,:host(.ic-select-disabled) .expand-icon>svg>path{color:var(--ic-select-disabled-expand-icon-color)}:host(.ic-select-searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.ic-select-searchable) .expand-icon>svg{height:2.25rem;padding:0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs)}:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-select-expand-icon-color)}.expand-icon-open,:host(.ic-select-searchable) .expand-icon-open{transform:rotateX(180deg)}.placeholder{color:var(--ic-select-content-placeholder-text)}:host(.ic-select-disabled.ic-select-searchable) .select-input::-moz-placeholder{color:var(--ic-select-content-text-disabled)}:host(.ic-select-disabled) .value-text,:host(.ic-select-disabled) .select-input,:host(.ic-select-disabled) .placeholder,:host(.ic-select-disabled.ic-select-searchable) .select-input::placeholder{color:var(--ic-select-content-text-disabled)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;align-items:center}.divider{width:var(--ic-space-1px);background-color:var(--ic-select-content-divider);margin:var(--ic-space-xxs) 0;border-radius:var(--ic-space-1px);height:var(--ic-space-lg)}:host(.ic-select-small) .divider{height:var(--ic-space-md)}:host(.ic-select-large) .divider{height:var(--ic-space-xl)}.clear-button{color:var(--ic-select-clear-button);position:absolute;right:calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus,.clear-button:active{background-color:var(--ic-color-focus-inner);box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer);border-radius:0.25rem}.clear-button:focus,.clear-button:active *{fill:var(--ic-atoms-input-clear-button-focus)}.clear-button.searchable{position:static}.searchable-select-results-status,.multi-select-selected-count{border:0;clip:rect(0, 0, 0, 0, 0);height:var(--ic-space-1px);overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:var(--ic-space-1px)}::slotted([slot="icon"]){fill:var(--ic-select-content-placeholder-text)}.has-value ::slotted([slot="icon"]){fill:var(--ic-select-content-text)}.readonly ::slotted([slot="icon"]){padding:0.375rem;margin-bottom:0.75rem}@media (forced-colors: active){.has-value ::slotted([slot="icon"]){fill:currentcolor}}';const S=q;let F=0;const A=[...y,"tabindex","title"];const E=class{constructor(i){t(this,i);this.icBlur=e(this,"icBlur",7);this.icChange=e(this,"icChange",7);this.icClear=e(this,"icClear",7);this.icClose=e(this,"icClose",7);this.icFocus=e(this,"icFocus",7);this.icInput=e(this,"icInput",7);this.icOpen=e(this,"icOpen",7);this.icOptionSelect=e(this,"icOptionSelect",7);this.icOptionDeselect=e(this,"icOptionDeselect",7);this.icRetryLoad=e(this,"icRetryLoad",7);this.hasSetDefaultValue=false;this.inheritedAttributes={};this.initialOptionsEmpty=false;this.inputId=`ic-select-input-${F++}`;this.menuId=`${this.inputId}-menu`;this.searchableMenuItemSelected=false;this.ungroupedOptions=[];this.hostMutationObserver=null;this.clearButtonFocused=false;this.noOptions=null;this.open=false;this.pressedCharacters="";this.searchableSelectInputValue=null;this.disabled=false;this.disableAutoFiltering=false;this.emptyOptionListText="No results found";this.fullWidth=false;this.helperText="";this.hideLabel=false;this.includeDescriptionsInSearch=false;this.includeGroupTitlesInSearch=false;this.loadingErrorLabel="Loading Error";this.loadingLabel="Loading...";this.multiple=false;this.name=this.inputId;this.placeholder="Select an option";this.readonly=false;this.required=false;this.searchable=false;this.searchMatchPosition="anywhere";this.selectOnEnter=false;this.showClearButton=false;this.size="medium";this.theme="inherit";this.validationStatus="";this.validationText="";this.loading=false;this.options=[];this.filteredOptions=this.options;this.uniqueOptions=this.options;this.debounce=0;this.currDebounce=this.debounce;this.initialValue=this.value;this.inputValueToFilter=this.value;this.hostMutationCallback=t=>{let e=false;t.forEach((({attributeName:t,type:i,addedNodes:s,removedNodes:a})=>{if(t){const i=this.el.getAttribute(t);if(i&&A.includes(t)){this.inheritedAttributes[t]=i;e=true}}else if(i==="childList"){e=c(s,a,"icon")}}));if(e){o(this)}};this.handleRetry=t=>{var e;if(t.detail.keyPressed)(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus();this.blurredBecauseButtonPressed=true;this.retryButtonClick=true;this.hasSetDefaultValue=true;this.icRetryLoad.emit({value:this.searchable?this.searchableSelectInputValue:this.hiddenInputValue})};this.emitIcChange=t=>{if(this.multiple&&!Array.isArray(t)&&t!==null){this.handleMultipleSelectChange(String(t))}else{this.value=t}const e=this.multiple?this.value:t;this.icChange.emit({value:e||null})};this.emitIcInput=t=>{clearTimeout(this.debounceIcInput);this.debounceIcInput=window.setTimeout((()=>this.icInput.emit({value:t})),this.currDebounce)};this.setOptions=()=>{if(!this.hasTimedOut&&this.options!==this.noOptions){this.loading=false;clearTimeout(this.timeoutTimer);if(this.options.length>0){this.setOptionsValuesFromLabels();this.uniqueOptions=this.deduplicateOptions(this.options);this.filteredOptions=this.uniqueOptions}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}if(this.isExternalFiltering()){this.noOptions=null;this.updateSearchableSelectResultAriaLive();this.setDefaultValue()}else{if(this.initialOptionsEmpty){this.setDefaultValue();this.initialOptionsEmpty=false}}}else{if(!this.searchable){this.options=this.noOptions||[]}}};this.deduplicateOptions=t=>{const e=[];const i=[];let s;t.forEach((t=>{if(t.children){s=[];t.children.forEach((t=>{if(e.includes(t.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${t.value}) which has been removed.`)}else{e.push(t.value);s.push(t)}}));const a=Object.assign(Object.assign({},t),{children:s});i.push(a)}else{if(e.includes(t.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${t.value}) which has been removed.`)}else{e.push(t.value);i.push(t)}}}));return i};this.setOptionsValuesFromLabels=()=>{if(this.options.length>0){this.options.map((t=>{if(!t.value){t.value=t.label}}))}};this.setUngroupedOptions=t=>{this.ungroupedOptions=t.detail.options};this.setTextColor=()=>{if(this.nativeSelectElement){if(this.nativeSelectElement.selectedIndex===0){this.nativeSelectElement.className="placeholder"}else{this.nativeSelectElement.className="select-option-selected"}}};this.setMenuChange=t=>{if(this.open!==t){this.open=t}};this.getLabelFromValue=t=>h(t,this.uniqueOptions);this.getMultipleOptionsString=t=>{const e=t===null||t===void 0?void 0:t.map((t=>this.getLabelFromValue(t))).filter((t=>!!t));return e===null||e===void 0?void 0:e.join(", ")};this.getFilteredChildMenuOptions=t=>{let e=t.children;if(t.children){if(this.searchable){e=d(t.children,!!this.includeDescriptionsInSearch,this.searchableSelectInputValue||"",this.searchMatchPosition)}else{e=d(t.children,false,this.pressedCharacters,"start")}}const i=Object.assign({},t);i.children=e;return i};this.getValueSortedByOptions=t=>{const e=t;const i=this.ungroupedOptions.map((t=>t.value));e.sort(((t,e)=>i.indexOf(t)-i.indexOf(e)));return e};this.handleNativeSelectChange=()=>{if(this.nativeSelectElement){this.icOptionSelect.emit({value:this.nativeSelectElement.value});this.emitIcChange(this.nativeSelectElement.value)}this.setTextColor()};this.handleCustomSelectChange=t=>{var e,i;const s=t.detail.value;if(t.detail.label===this.emptyOptionListText){(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus();return}if(this.searchable){this.value=s;this.searchableMenuItemSelected=true;if(this.value===this.currValue){this.searchableSelectInputValue=this.getLabelFromValue(this.value)||null}this.inputValueToFilter=null;this.hiddenInputValue=this.getValueFromLabel(this.searchableSelectInputValue)||null}if(this.multiple&&((i=this.value)===null||i===void 0?void 0:i.includes(s))){this.icOptionDeselect.emit({value:s})}else{this.icOptionSelect.emit({value:s})}this.ariaActiveDescendant=t.detail.optionId;this.emitIcChange(s)};this.handleMultipleSelectChange=t=>{if(this.value){let e=this.value.slice();if(this.value.includes(t)){const i=e.indexOf(t);e.splice(i,1)}else{e.push(t);e=this.getValueSortedByOptions(e)}this.value=e.length===0?null:e}else{const e=[];e.push(t);this.value=e}};this.handleSelectAllChange=t=>{const e=t.detail.select;const i=this.ungroupedOptions.filter((t=>!t.disabled));const s=i.map((t=>t.value));let a;if(e){let t;if(this.value){t=s.filter((t=>this.value&&!this.value.includes(t)))}else{t=s}t.forEach((t=>this.icOptionSelect.emit({value:t})));a=s}else{this.value.forEach((t=>this.icOptionDeselect.emit({value:t})));a=null}this.emitIcChange(a)};this.handleMenuChange=t=>{this.open=t.detail.open;this.pressedCharacters="";this.searchable&&this.handleFocusIndicatorDisplay()};this.handleMenuKeyPress=t=>{t.cancelBubble=true;if(!this.multiple){this.handleCharacterKeyDown(t.detail.key)}};this.handleFocusIndicatorDisplay=()=>{var t;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".focus-indicator");if(e){if(this.open){e.classList.add("focus-indicator-enabled")}else{e.classList.remove("focus-indicator-enabled")}}};this.handleMouseDown=t=>{if(!this.open){t.preventDefault()}};this.isExternalFiltering=()=>this.searchable&&!!this.disableAutoFiltering;this.handleClick=t=>{var e,i;if(!this.open&&this.menu){if(this.isExternalFiltering()){this.menu.options=this.filteredOptions}else if(!this.hasTimedOut&&!this.loading&&!((e=this.noOptions)===null||e===void 0?void 0:e.length)&&(!this.searchable||this.searchableMenuItemSelected)){this.noOptions=null;this.menu.options=this.uniqueOptions}}if(t.detail!==0){(i=this.menu)===null||i===void 0?void 0:i.handleClickOpen()}};this.handleExpandIconMouseDown=t=>{var e;if(!this.disabled){t.preventDefault();(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus();this.handleClick(t)}};this.handleClear=t=>{var e,i;t.stopPropagation();this.hasTimedOut=false;clearTimeout(this.timeoutTimer);this.clearInput();this.emitIcChange(null);this.icClear.emit();if(this.searchable){this.hiddenInputValue=null;(e=this.searchableSelectElement)===null||e===void 0?void 0:e.focus()}else{(i=this.customSelectElement)===null||i===void 0?void 0:i.focus()}};this.handleCharacterKeyDown=t=>{if(this.open&&t===" "&&this.pressedCharacters.length===0){this.setMenuChange(false)}if(t.length===1&&!this.searchable){window.clearTimeout(this.characterKeyPressTimer);this.characterKeyPressTimer=window.setTimeout((()=>this.pressedCharacters=""),1e3);if(!(t===" "&&!this.pressedCharacters)){this.pressedCharacters+=t;this.handleFilter();if(!this.noOptions){this.emitIcChange(this.filteredOptions[0].value)}}}else{this.pressedCharacters=""}};this.handleNativeSelectKeyDown=t=>{if(t.key!=="Escape"&&t.key!=="Tab"||this.open){t.cancelBubble=true}this.handleCharacterKeyDown(t.key)};this.handleKeyDown=t=>{var e;if(t.key!=="Escape"&&t.key!=="Tab"||this.open){t.cancelBubble=true}const i=t.key==="ArrowDown"||t.key==="ArrowUp";if(this.menu&&!this.open){if(this.isExternalFiltering()&&(t.key==="Enter"||i)){this.menu.options=this.filteredOptions}else{if(!this.hasTimedOut){this.noOptions=null;this.menu.options=this.uniqueOptions}}}if(this.open&&t.key==="Enter"){this.setMenuChange(false)}else{if(!(i&&this.noOptions!==null)){if(!(t.key===" "&&this.pressedCharacters.length>0)){(e=this.menu)===null||e===void 0?void 0:e.handleKeyboardOpen(t)}if(!this.multiple){this.handleCharacterKeyDown(t.key)}}}};this.handleClearButtonFocus=()=>{this.clearButtonFocused=true};this.handleClearButtonBlur=t=>{var e;const i=(e=this.menu)===null||e===void 0?void 0:e.querySelector("#retry-button");if(!(this.searchableSelectElement&&t.relatedTarget===this.searchableSelectElement)&&!(i&&t.relatedTarget===i)){this.setMenuChange(false);this.handleFocusIndicatorDisplay()}this.clearButtonFocused=false};this.handleFilter=()=>{var t;const e=this.deduplicateOptions(this.searchable?[...this.uniqueOptions]:this.ungroupedOptions);let i=false;let s=[];e.map((t=>{if(t.children)i=true}));let a;if(this.searchable){a=d(e,!!this.includeDescriptionsInSearch,this.inputValueToFilter||"",this.searchMatchPosition);this.searchableMenuItemSelected=false}else{a=d(e,false,this.pressedCharacters,"start")}if(!i&&((t=a[0])===null||t===void 0?void 0:t.label)!==this.emptyOptionListText){s=a}else if(i){e.map((t=>{if(this.includeGroupTitlesInSearch){if(a.indexOf(t)!==-1){s.push(t)}else{s.push(this.getFilteredChildMenuOptions(t))}}else{s.push(this.getFilteredChildMenuOptions(t))}}))}let o=false;if(i){o=true;s.map((t=>{if(t.children&&t.children.length>0){o=false}}))}if(s.length>0&&!o){this.noOptions=null;this.filteredOptions=s}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.filteredOptions=this.noOptions}};this.triggerLoading=()=>{this.hasTimedOut=false;this.noOptions=[{label:this.loadingLabel,value:"",loading:true}];if(this.filteredOptions!==this.noOptions&&this.searchable){this.filteredOptions=this.noOptions}else if(this.uniqueOptions!==this.noOptions&&!this.searchable){this.uniqueOptions=this.noOptions}if(this.timeout){this.timeoutTimer=window.setTimeout((()=>{this.loading=false;this.hasTimedOut=true;this.noOptions=[{label:this.loadingErrorLabel,value:"",timedOut:true}];this.filteredOptions=this.noOptions;if(!this.searchable)this.uniqueOptions=this.noOptions}),this.timeout)}};this.getValueFromLabel=t=>{var e;return t&&((e=this.uniqueOptions.find((e=>e.label===t)))===null||e===void 0?void 0:e.value)};this.handleSearchableSelectInput=t=>{this.searchableSelectInputValue=t.target.value;this.emitIcInput(this.searchableSelectInputValue);if(this.value!=null){this.emitIcChange(null)}this.hiddenInputValue=null;this.inputValueToFilter=this.searchableSelectInputValue;this.setMenuChange(true);if(!this.disableAutoFiltering){this.handleFilter();this.debounceAriaLiveUpdate()}};this.updateSearchableSelectResultAriaLive=()=>{var t;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".searchable-select-results-status");if(e){if(this.noOptions!==null){e.innerText=this.emptyOptionListText}else{e.innerText=""}}};this.updateMultiSelectedCountAriaLive=()=>{var t,e;const i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".multi-select-selected-count");const s=`${(e=this.currValue)===null||e===void 0?void 0:e.length} of ${u(this.options)} selected`;if(i&&i.innerText!==s){i.innerText=s}};this.getDefaultValue=t=>this.getLabelFromValue(t)||null;this.setDefaultValue=()=>{if(!this.hasSetDefaultValue&&this.currValue){this.searchableSelectInputValue=this.searchable?this.getDefaultValue(this.currValue):null;this.initialValue=this.currValue;this.hasSetDefaultValue=true}};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=({relatedTarget:t})=>{var e;const i=t;if(i!==null&&(i.tagName==="UL"&&i.className.includes("menu")||i.tagName==="LI"&&i.className.includes("option"))){return}const s=(e=this.menu)===null||e===void 0?void 0:e.querySelector("#retry-button");const a=this.searchable&&!!this.menu&&i!==this.menu&&!Array.from(this.menu.querySelectorAll("[role='option']")).includes(i)&&!(this.clearButton&&i===this.clearButton)&&!(s&&i===s);if(a){if(!this.retryButtonClick){this.setMenuChange(false);if(!this.value){this.clearInput()}}this.handleFocusIndicatorDisplay()}this.retryButtonClick=false;this.icBlur.emit()};this.onTimeoutBlur=t=>{if(t.detail.ev.relatedTarget!==this.searchableSelectElement&&!this.blurredBecauseButtonPressed){this.setMenuChange(false);this.handleFocusIndicatorDisplay();this.icBlur.emit()}this.blurredBecauseButtonPressed=false};this.handleFormReset=()=>{this.value=this.initialValue;if(this.searchable){this.searchableSelectInputValue=this.getDefaultValue(this.value);this.hiddenInputValue=this.value}};this.clearInput=()=>{var t;this.noOptions=null;if(this.searchable){(t=this.searchableSelectElement)===null||t===void 0?void 0:t.setAttribute("value","");this.searchableSelectInputValue=null;this.filteredOptions=this.uniqueOptions}}}watchDisabledHandler(){n(this.disabled,this.el)}loadingHandler(t){t?this.triggerLoading():this.setOptions()}watchOptionsHandler(){this.setOptions()}debounceChangedHandler(t){this.updateOnChangeDebounce(t)}valueChangedHandler(){if(this.value!==this.currValue){if(this.value&&this.multiple){this.currValue=this.getMultipleOptionsString(this.value)?this.getValueSortedByOptions(this.value):null;this.updateMultiSelectedCountAriaLive()}else{this.currValue=this.getLabelFromValue(this.value)?this.value:null}}if(this.searchable&&this.value){this.searchableSelectInputValue=this.getLabelFromValue(String(this.currValue))||null}}openChangedHandler(){this.open?this.icOpen.emit():this.icClose.emit()}disconnectedCallback(){var t;p(this.el,this.handleFormReset);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){const t=this.multiple?this.getMultipleOptionsString(this.value):this.getLabelFromValue(this.value);this.currValue=t?this.value:null;this.inheritedAttributes=b(this.el,A);n(this.disabled,this.el);this.setOptionsValuesFromLabels();f(this.el,this.handleFormReset);if(!this.options.length){this.initialOptionsEmpty=true;this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}else{this.setDefaultValue();this.uniqueOptions=this.deduplicateOptions(this.options)}}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Select");if(this.loading){this.triggerLoading()}if(this.searchable){this.hiddenInputValue=this.currValue}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true})}componentDidRender(){if(this.nativeSelectElement&&!this.disabled){this.setTextColor()}}async setFocus(){if(this.nativeSelectElement){this.nativeSelectElement.focus()}else if(this.customSelectElement){this.customSelectElement.focus()}else if(this.searchableSelectElement){this.searchableSelectElement.focus()}}updateOnChangeDebounce(t){if(this.currDebounce!==t){this.currDebounce=t}}debounceAriaLiveUpdate(){clearTimeout(this.debounceAria);window.setTimeout((()=>{this.updateSearchableSelectResultAriaLive()}),800)}render(){const{size:t,disabled:e,fullWidth:a,helperText:o,hideLabel:n,label:r,menuId:l,multiple:c,name:h,options:d,placeholder:p,readonly:b,required:f,searchable:y,showClearButton:k,validationStatus:z,validationText:L,currValue:C,theme:H}=this;m(this.el,this.searchable?this.hiddenInputValue:C,h||this.inputId,e);const $=`${z===w.Error}`;const T=v(this.inputId,o!=="",g(this.validationStatus,!!this.disabled)).trim();let M=!!this.el.querySelector(`[slot="icon"]`);if(M&&(e||b&&!this.value)){M=false}const j=`${C===null||C===void 0?void 0:C.length} of ${u(this.options)} selected`;const B=c?this.getMultipleOptionsString(C):this.getLabelFromValue(C);const P=!e&&(y?this.searchableSelectInputValue:C&&!this.loading&&k);return i(s,{key:"456f6fa40aca4f93fba6e0c43c57cc171c358ede",class:{"ic-select-disabled":!!e,"ic-select-searchable":!!y,[`ic-select-${t}`]:t!=="medium","ic-select-full-width":!!a,[`ic-theme-${H}`]:H!=="inherit"},onBlur:this.onBlur},i("ic-input-container",{key:"f97234577ffc014d5da69a0ebbf8abac0a97e034",readonly:b},!n&&i("ic-input-label",{key:"a6a1bf8152904b7a845de920bd9717c76ea47f2e",for:this.inputId,label:r,helperText:o,required:f,disabled:e,readonly:b}),i("ic-input-component-container",{key:"6515fb2dca1c45d6388123ea2d75f5de57f1bc36",ref:t=>this.anchorEl=t,class:{"menu-open":this.open},size:t,fullWidth:a,disabled:e,readonly:b,validationStatus:z},M&&i("span",{key:"0f70c956b1be70903d518c3dc787fc3980a0c205",slot:"left-icon",class:{["readonly"]:!!b,["has-value"]:!!this.value}},i("slot",{key:"7e602e257167e4397fc131b118da86b0e3d38583",name:"icon"})),b?i("ic-typography",null,i("p",null,B)):x()&&!c?i("select",Object.assign({ref:t=>this.nativeSelectElement=t,disabled:e,onChange:this.handleNativeSelectChange,required:f,id:this.inputId,"aria-label":r,"aria-describedby":T,"aria-invalid":$,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.handleNativeSelectKeyDown,form:this.form},this.inheritedAttributes),i("option",{value:"",selected:true,disabled:!k},p),d.map((t=>{if(t.children){return i("optgroup",{label:t.label},t.children.map((t=>i("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label))))}else{return i("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label)}}))):y?i("div",{class:"searchable-select-container"},i("input",{class:{"select-input":true,"with-clear-button":!!this.searchableSelectInputValue},role:"combobox",autocomplete:"off","aria-label":r,"aria-describedby":T,"aria-activedescendant":this.ariaActiveDescendant,"aria-autocomplete":"list","aria-expanded":`${this.open}`,"aria-invalid":$,"aria-required":`${f}`,"aria-controls":l,ref:t=>this.searchableSelectElement=t,id:this.inputId,value:this.searchableSelectInputValue||undefined,placeholder:p,disabled:e,onInput:this.handleSearchableSelectInput,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,form:this.form}),P&&i("div",{class:"clear-button-container"},i("ic-button",{id:"clear-button",ref:t=>this.clearButton=t,"aria-label":this.searchableSelectInputValue&&(C===null||this.loading)?"Clear input":"Clear selection",class:"clear-button",innerHTML:N,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:t,variant:"icon",theme:this.clearButtonFocused?"light":"dark"}),i("div",{class:"divider"})),i("span",{onMouseDown:this.handleExpandIconMouseDown,class:{"expand-icon":true,"expand-icon-open":this.open},innerHTML:O,"aria-hidden":"true"}),i("div",{"aria-live":"polite",role:"status",class:"searchable-select-results-status"})):i("div",{class:"select-container"},i("button",{class:"select-input",ref:t=>this.customSelectElement=t,id:this.inputId,"aria-label":`${r}, ${(c&&C?`${j}, ${B}`:B)||p}${f?", required":""}`,"aria-describedby":T,"aria-invalid":$,"aria-haspopup":"listbox","aria-expanded":this.open?"true":"false","aria-owns":l,"aria-controls":l,disabled:e,onBlur:this.onBlur,onFocus:this.onFocus,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown},i("ic-typography",{variant:"body",class:{"value-text":true,"with-clear-button":!!P,placeholder:!this.loading&&c?!this.value||this.value.length<1:!this.getLabelFromValue(C)}},B||p),i("div",{class:"select-input-end"},P&&i("div",{class:"divider"}),i("span",{class:{"expand-icon":true,"expand-icon-open":this.open},innerHTML:O,"aria-hidden":"true"}))),P&&i("ic-button",{id:"clear-button","aria-label":"Clear selection",class:"clear-button",innerHTML:N,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:t,variant:"icon",theme:this.clearButtonFocused?"light":"dark"}))),(!x()||c)&&i("ic-menu",{key:"f54e79314035d2c04a47292eb9e8e2ecd4421545",class:{"no-results":this.loading||this.hasTimedOut||this.noOptions!==null&&this.noOptions[0]&&this.noOptions[0].label===this.emptyOptionListText},ref:t=>this.menu=t,inputEl:y?this.searchableSelectElement:this.customSelectElement,inputLabel:r,anchorEl:this.anchorEl,size:t,menuId:l,open:this.open,options:y?this.filteredOptions:this.uniqueOptions,value:c?C:C,fullWidth:a,selectOnEnter:this.selectOnEnter,onMenuStateChange:this.handleMenuChange,onMenuOptionSelect:this.handleCustomSelectChange,onMenuOptionSelectAll:this.handleSelectAllChange,onMenuKeyPress:this.handleMenuKeyPress,onUngroupedOptionsSet:this.setUngroupedOptions,onRetryButtonClicked:this.handleRetry,parentEl:this.el,onTimeoutBlur:this.onTimeoutBlur,activationType:this.searchable||c||this.selectOnEnter?"manual":"automatic",closeOnSelect:!c}),this.multiple&&i("div",{key:"b1a65d56087d6603846cdd9cfc8c086e49597001","aria-live":"polite",role:"status",class:"multi-select-selected-count"}),g(this.validationStatus,!!this.disabled)&&i("ic-input-validation",{key:"e5553be7be57e5ae847bcd1a4d2525b18c4d1429",class:{"menu-open":this.open},ariaLiveMode:"polite",status:z,message:L||"",for:this.inputId})))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],loading:["loadingHandler"],options:["watchOptionsHandler"],debounce:["debounceChangedHandler"],value:["valueChangedHandler"],open:["openChangedHandler"]}}};E.style=S;const W='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal);background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot="icon"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';const V=W;let G=0;const K=[...y,"title"];const U=class{constructor(i){t(this,i);this.getValidationText=e(this,"getValidationText",7);this.icBlur=e(this,"icBlur",7);this.icChange=e(this,"icChange",7);this.icFocus=e(this,"icFocus",7);this.icInput=e(this,"icInput",7);this.icKeydown=e(this,"icKeydown",7);this.icScroll=e(this,"icScroll",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.numChars=0;this.maxCharactersReached=false;this.maxCharactersWarning=false;this.minCharactersUnattained=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideCharCount=false;this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${G++}`;this.inputmode="text";this.maxCharacters=0;this.maxCharactersMessage=`Maximum input is ${this.maxCharacters} characters`;this.maxMessage=`Maximum value of ${this.max} exceeded`;this.minCharacters=0;this.minCharactersMessage=`Minimum input is ${this.minCharacters} characters`;this.minMessage=`Minimum value of ${this.min} not met`;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.rows=1;this.size="medium";this.spellcheck=false;this.theme="inherit";this.truncateValue=false;this.type="text";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value;this.checkChildHydration=()=>{var t,e;if(this.hideLabel||((e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-typography"))===null||e===void 0?void 0:e.classList.contains("hydrated"))){this.setFocus();clearInterval(this.interval)}};this.getNumberOfCharacters=t=>t!==null&&t!==undefined?t.length:0;this.getMaxValueExceeded=t=>{this.numChars=this.getNumberOfCharacters(t);if(this.type==="number"){this.minValueUnattained=!!t&&Number(t)<Number(this.min);this.maxValueExceeded=Number(t)>Number(this.max)}};this.getMaxCharactersReached=t=>{this.numChars=this.getNumberOfCharacters(t);this.maxCharactersReached=this.maxCharacters>0&&this.numChars>=this.maxCharacters;if(this.maxCharactersWarning&&!this.maxCharactersReached){this.maxCharactersWarning=false}};this.onInput=t=>{this.value=t.target.value;this.icInput.emit({value:this.value})};this.onBlur=t=>{const e=t.target;e.removeEventListener("wheel",this.onWheel);const{value:i}=e;this.numChars=i.length;this.minCharactersUnattained=this.minCharacters>0&&this.numChars<this.minCharacters;this.icBlur.emit({value:i})};this.onFocus=t=>{const e=t.target;e.addEventListener("wheel",this.onWheel);this.icFocus.emit({value:e.value})};this.onTextAreaScroll=()=>{this.icScroll.emit()};this.onWheel=t=>{const e=t.target;if(e.type==="number"){e.blur();setTimeout((()=>{e.focus()}),0)}};this.hasStatus=t=>t!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.hostMutationCallback=t=>{let e=false;t.forEach((({attributeName:t,type:i,addedNodes:s,removedNodes:a})=>{if(t&&K.includes(t)){const i=this.el.getAttribute(t);if(i){this.inheritedAttributes[t]=i}e=true}else if(i==="childList"){e=c(s,a,"icon")}}));if(e){o(this)}}}watchDisabledHandler(){n(this.disabled,this.el)}debounceChanged(){this.icChange=k(this.icChange,this.debounce)}watchValueHandler(t){let e;if(this.maxCharacters>0){e=t.substring(0,this.maxCharacters);if(e.length<t.length){this.maxCharactersWarning=true}this.value=e}else{e=t}if(this.inputEl&&this.inputEl.value!==e){this.inputEl.value=e}this.getMaxValueExceeded(e);this.getMaxCharactersReached(e);this.icChange.emit({value:e})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var t;p(this.el,this.handleFormReset);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}else if(this.maxCharacters>0){this.value=this.value.substring(0,this.maxCharacters)}this.getMaxValueExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=b(this.el,K);if(this.readonly){this.maxValueExceeded=false;this.minValueUnattained=false}f(this.el,this.handleFormReset);n(this.disabled,this.el)}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true});if(this.autofocus&&!this.disabled&&!this.readonly){this.interval=setInterval(this.checkChildHydration,50)}}handleKeyDown(t){this.icKeydown.emit({event:t});if(!t.ctrlKey&&!z.includes(t.key)){this.maxCharactersWarning=this.maxCharactersReached}}async setFocus(){var t;(t=this.inputEl)===null||t===void 0?void 0:t.focus()}render(){const{inputId:t,name:e,label:a,required:o,size:n,placeholder:r,helperText:l,hideCharCount:c,rows:h,resize:d,disabled:u,value:p,min:b,max:f,numChars:g,readonly:x,maxCharacters:y,maxCharactersMessage:k,maxCharactersWarning:z,maxCharactersReached:$,maxMessage:T,minCharacters:M,minCharactersMessage:j,minCharactersUnattained:B,minMessage:P,minValueUnattained:D,maxValueExceeded:I,validationStatus:O,validationText:N,validationInline:q,validationInlineInternal:S,spellcheck:F,inputmode:A,fullWidth:E,truncateValue:W,hiddenInput:V,theme:G,hideLabel:K,type:U,autocapitalize:_,ariaActiveDescendant:R,inheritedAttributes:Z,ariaExpanded:Q,ariaOwns:X,autocomplete:J,role:Y}=this;const tt=this.el;const et=x||u;const it=I||D||B||z?z?w.Warning:w.Error:O;const st=z?k:I?T:D?P:B?j:N;const at=x?0:y;const ot=z||I||D||it===w.Error?"assertive":"polite";const nt=this.hasStatus(it)&&!(it==w.Success&&q)&&!S;const rt=h>1;const lt=at-g;const ct=y>0?`${t}-char-count-desc`:"";const ht=`${ct} ${v(t,l!=="",nt)}`.trim();const dt=et&&!x;const ut=!!this.el.querySelector(`[slot="icon"]`)&&!dt;const pt=`${it===w.Error}`;V?m(this.el,p,e,et):L(this.el);return i(s,{key:"392b43ac248502539bc00717694c10a24818551e",class:{"ic-text-field-full-width":E,"ic-text-field-disabled":et,[`ic-theme-${G}`]:G!=="inherit"}},i("ic-input-container",{key:"59ec38e8e8e934cf48123303f68a7ca863badd83",readonly:x,disabled:et},!K&&i("ic-input-label",{key:"fa61768dd93e6d7a1ead043792b15b78b8d3fd26",for:t,label:a,helperText:l,required:o,disabled:dt,readonly:x}),i("ic-input-component-container",{key:"c6ac9c16b6c565671575ec2217e62176d7bc1359",size:n,validationStatus:it,multiLine:rt,disabled:et,readonly:x,validationInline:q,fullWidth:E},ut&&i("span",{key:"353b7a992bbce4060dc5fe29b05f96aedd0cf32a",class:{readonly:x,"has-value":this.getNumberOfCharacters(p)>0},slot:"left-icon"},i("slot",{key:"8a5cbec45bedc43908caaae9ff74bc4101f995f8",name:"icon"})),!rt?i("input",Object.assign({id:t,name:e,ref:t=>this.inputEl=t,type:U,min:b,max:f,value:p,class:{"no-left-pad":!ut&&x,readonly:x,"truncate-value":W},placeholder:r?r:"",required:o,disabled:et,readonly:x,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":a,"aria-describedby":ht,"aria-invalid":pt,"aria-activedescendant":R,"aria-expanded":Q,"aria-owns":X,autocomplete:J,autocapitalize:_,spellcheck:F,inputmode:A,role:Y,maxlength:$?y:undefined,minlength:B?M:undefined},Z)):i("textarea",Object.assign({id:t,class:{"no-resize":d===false||!!x,"no-left-pad":!ut&&!!x,readonly:!!x},name:e,ref:t=>this.inputEl=t,value:p,rows:h,required:o,disabled:et,placeholder:r,readonly:x,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onScroll:this.onTextAreaScroll,"aria-label":a,"aria-describedby":ht,"aria-invalid":pt,autocapitalize:_,spellcheck:F,inputmode:A,maxlength:$?y:undefined,minlength:B?M:undefined},Z)),C(tt,"clear-button")&&i("slot",{key:"05d080fafd37f3c5e2894968705fe2802cd24f8a",name:"clear-button"}),C(tt,"search-submit-button")&&i("slot",{key:"b4ef1fb8db068a9c547d20147e31ac798cb838b5",name:"search-submit-button"})),C(tt,"menu")&&i("slot",{key:"2f708851077d7cc70c6a90d2dae3f817ffdf469b",name:"menu"}),(!H(O)||!H(N)||at>0||I||z||B||D)&&!S&&i("ic-input-validation",{key:"d7c7b40ed97ab62e31fe09e78bf55c796948e33a",status:this.hasStatus(it)===false||it===w.Success&&q||S?"":it,message:nt?st:"",ariaLiveMode:ot,for:t,fullWidth:E},!x&&at>0&&i("div",{key:"6b6d4c6b40f66756ceafc51c6ba7a336863ce030",slot:"validation-message-adornment"},!c&&i("ic-typography",{key:"5cb893f7e84654a848bd7ec14a0820583ed5d043",variant:"caption",class:"char-count-text"},i("span",{key:"b93ac422dbea08cf3d1f139feea1fd5ee37c6755",class:"char-count"},g,"/",at)),i("span",{key:"e3b8a947bf1e4b1dc3bd93e04bb50ffaa55ac6a0",class:"remaining-char-count-desc","aria-live":"polite"},`${lt} character${lt===1?"":"s"} remaining.`),i("span",{key:"41353bf51d4e7264cc054f524b404519a953bec9",hidden:true,id:ct},"Field can contain a maximum of ",at," characters.")))))}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],debounce:["debounceChanged"],value:["watchValueHandler"]}}};U.style=V;export{B as ic_pagination,I as ic_pagination_item,E as ic_select,U as ic_text_field};
|
2
|
+
//# sourceMappingURL=p-edeb3823.entry.js.map
|