@ukic/web-components 2.1.0-beta.14 → 2.1.0-beta.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +10 -3
- package/dist/cjs/core.cjs.js.map +1 -1
- package/dist/cjs/{helpers-2021e212.js → helpers-eb53c416.js} +25 -25
- package/dist/cjs/helpers-eb53c416.js.map +1 -0
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +15 -15
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +6 -5
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +33 -36
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +4 -3
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -2
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +7 -5
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +5 -2
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-dialog.cjs.entry.js +296 -0
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-divider.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +2 -2
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +69 -27
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +3 -3
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +6 -4
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-group.cjs.entry.js +50 -21
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -3
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -8
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +12 -15
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +6 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +14 -2
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +7 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +16 -5
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -11
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +6 -3
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +35 -34
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +70 -57
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +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 +3 -3
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ic-switch.cjs.entry.js +4 -3
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +8 -6
- 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 +4 -2
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +8 -2
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +9 -18
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +2 -2
- package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js +96 -4
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-a62312a7.js → index-014e3058.js} +222 -43
- package/dist/cjs/index-014e3058.js.map +1 -0
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +13 -12
- package/dist/collection/components/ic-alert/ic-alert.e2e.js +16 -0
- package/dist/collection/components/ic-alert/ic-alert.e2e.js.map +1 -0
- package/dist/collection/components/ic-alert/ic-alert.spec.js +182 -0
- package/dist/collection/components/ic-alert/ic-alert.spec.js.map +1 -0
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.e2e.js +68 -0
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.e2e.js.map +1 -0
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.spec.js +123 -0
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.spec.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +4 -3
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.spec.js +118 -0
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.spec.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.e2e.js +41 -0
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.e2e.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +13 -13
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.spec.js +181 -0
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.spec.js.map +1 -0
- package/dist/collection/components/ic-button/ic-button.e2e.js +173 -0
- package/dist/collection/components/ic-button/ic-button.e2e.js.map +1 -0
- package/dist/collection/components/ic-button/ic-button.js +4 -6
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.spec.js +230 -0
- package/dist/collection/components/ic-button/ic-button.spec.js.map +1 -0
- package/dist/collection/components/ic-card/ic-card.css +3 -2
- package/dist/collection/components/ic-card/ic-card.e2e.js +23 -0
- package/dist/collection/components/ic-card/ic-card.e2e.js.map +1 -0
- package/dist/collection/components/ic-card/ic-card.js +2 -1
- package/dist/collection/components/ic-card/ic-card.js.map +1 -1
- package/dist/collection/components/ic-card/ic-card.spec.js +152 -0
- package/dist/collection/components/ic-card/ic-card.spec.js.map +1 -0
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +6 -4
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.e2e.js +201 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.e2e.js.map +1 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +4 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.spec.js +175 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.spec.js.map +1 -0
- package/dist/collection/components/ic-chip/ic-chip.js +4 -1
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.spec.js +110 -0
- package/dist/collection/components/ic-chip/ic-chip.spec.js.map +1 -0
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.spec.js +140 -0
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.spec.js.map +1 -0
- package/dist/collection/components/ic-data-entity/ic-data-entity.spec.js +161 -0
- package/dist/collection/components/ic-data-entity/ic-data-entity.spec.js.map +1 -0
- package/dist/collection/components/ic-data-row/ic-data-row.spec.js +185 -0
- package/dist/collection/components/ic-data-row/ic-data-row.spec.js.map +1 -0
- package/dist/collection/components/ic-dialog/ic-dialog.css +595 -0
- package/dist/collection/components/ic-dialog/ic-dialog.e2e.js +204 -0
- package/dist/collection/components/ic-dialog/ic-dialog.e2e.js.map +1 -0
- package/dist/collection/components/ic-dialog/ic-dialog.js +641 -0
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -0
- package/dist/collection/components/ic-dialog/ic-dialog.spec.js +520 -0
- package/dist/collection/components/ic-dialog/ic-dialog.spec.js.map +1 -0
- package/dist/collection/components/ic-dialog/ic-dialog.test.a11y.js +28 -0
- package/dist/collection/components/ic-dialog/ic-dialog.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-divider/ic-divider.spec.js +24 -0
- package/dist/collection/components/ic-divider/ic-divider.spec.js.map +1 -0
- package/dist/collection/components/ic-footer/ic-footer.css +2 -2
- package/dist/collection/components/ic-footer/ic-footer.e2e.js +50 -0
- package/dist/collection/components/ic-footer/ic-footer.e2e.js.map +1 -0
- package/dist/collection/components/ic-footer/ic-footer.js +1 -1
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-footer/ic-footer.spec.js +140 -0
- package/dist/collection/components/ic-footer/ic-footer.spec.js.map +1 -0
- package/dist/collection/components/ic-footer-link/ic-footer-link.spec.js +62 -0
- package/dist/collection/components/ic-footer-link/ic-footer-link.spec.js.map +1 -0
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.spec.js +98 -0
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.spec.js.map +1 -0
- package/dist/collection/components/ic-hero/ic-hero.spec.js +76 -0
- package/dist/collection/components/ic-hero/ic-hero.spec.js.map +1 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.spec.js +180 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.spec.js.map +1 -0
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +32 -4
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.spec.js +117 -0
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.spec.js.map +1 -0
- package/dist/collection/components/ic-input-container/ic-input-container.spec.js +38 -0
- package/dist/collection/components/ic-input-container/ic-input-container.spec.js.map +1 -0
- package/dist/collection/components/ic-input-label/ic-input-label.spec.js +98 -0
- package/dist/collection/components/ic-input-label/ic-input-label.spec.js.map +1 -0
- package/dist/collection/components/ic-input-validation/ic-input-validation.css +0 -8
- package/dist/collection/components/ic-input-validation/ic-input-validation.spec.js +89 -0
- package/dist/collection/components/ic-input-validation/ic-input-validation.spec.js.map +1 -0
- package/dist/collection/components/ic-link/ic-link.spec.js +203 -0
- package/dist/collection/components/ic-link/ic-link.spec.js.map +1 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.e2e.js +34 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.e2e.js.map +1 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.spec.js +141 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.spec.js.map +1 -0
- package/dist/collection/components/ic-menu/ic-menu.css +9 -1
- package/dist/collection/components/ic-menu/ic-menu.js +89 -23
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.spec.js +650 -0
- package/dist/collection/components/ic-menu/ic-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-menu-group/ic-menu-group.spec.js +94 -0
- package/dist/collection/components/ic-menu-group/ic-menu-group.spec.js.map +1 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +2 -2
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +4 -2
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.spec.js +105 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.spec.js +84 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +47 -18
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.spec.js +309 -0
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +13 -7
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.spec.js +118 -0
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.e2e.js +29 -0
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.e2e.js.map +1 -0
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +0 -6
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.spec.js +176 -0
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-page-header/ic-page-header.css +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.e2e.js +177 -0
- package/dist/collection/components/ic-page-header/ic-page-header.e2e.js.map +1 -0
- package/dist/collection/components/ic-page-header/ic-page-header.js +9 -12
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.spec.js +284 -0
- package/dist/collection/components/ic-page-header/ic-page-header.spec.js.map +1 -0
- package/dist/collection/components/ic-pagination/ic-pagination.e2e.js +128 -0
- package/dist/collection/components/ic-pagination/ic-pagination.e2e.js.map +1 -0
- package/dist/collection/components/ic-pagination/ic-pagination.js +55 -3
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
- package/dist/collection/components/ic-pagination/ic-pagination.spec.js +325 -0
- package/dist/collection/components/ic-pagination/ic-pagination.spec.js.map +1 -0
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +5 -1
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.e2e.js +30 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.e2e.js.map +1 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -3
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.spec.js +381 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.e2e.js +343 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.e2e.js.map +1 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +19 -8
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.spec.js +303 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.spec.js.map +1 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.types.js +2 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.types.js.map +1 -0
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +5 -14
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.e2e.js +1054 -0
- package/dist/collection/components/ic-search-bar/ic-search-bar.e2e.js.map +1 -0
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +12 -9
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.spec.js +570 -0
- package/dist/collection/components/ic-search-bar/ic-search-bar.spec.js.map +1 -0
- package/dist/collection/components/ic-search-bar/ic-search-bar.types.js.map +1 -1
- package/dist/collection/components/ic-section-container/ic-section-container.spec.js +69 -0
- package/dist/collection/components/ic-section-container/ic-section-container.spec.js.map +1 -0
- package/dist/collection/components/ic-select/ic-select.e2e.js +1765 -0
- package/dist/collection/components/ic-select/ic-select.e2e.js.map +1 -0
- package/dist/collection/components/ic-select/ic-select.js +46 -45
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.spec.js +1276 -0
- package/dist/collection/components/ic-select/ic-select.spec.js.map +1 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +0 -7
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.e2e.js +412 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.e2e.js.map +1 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +67 -54
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.spec.js +470 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.spec.js.map +1 -0
- package/dist/collection/components/ic-skeleton/ic-skeleton.spec.js +89 -0
- package/dist/collection/components/ic-skeleton/ic-skeleton.spec.js.map +1 -0
- package/dist/collection/components/ic-status-tag/ic-status-tag.css +2 -6
- package/dist/collection/components/ic-status-tag/ic-status-tag.spec.js +43 -0
- package/dist/collection/components/ic-status-tag/ic-status-tag.spec.js.map +1 -0
- package/dist/collection/components/ic-step/ic-step.css +5 -5
- package/dist/collection/components/ic-step/ic-step.js +1 -1
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.spec.js +176 -0
- package/dist/collection/components/ic-step/ic-step.spec.js.map +1 -0
- package/dist/collection/components/ic-stepper/ic-stepper.e2e.js +49 -0
- package/dist/collection/components/ic-stepper/ic-stepper.e2e.js.map +1 -0
- package/dist/collection/components/ic-stepper/ic-stepper.spec.js +706 -0
- package/dist/collection/components/ic-stepper/ic-stepper.spec.js.map +1 -0
- package/dist/collection/components/ic-switch/ic-switch.css +1 -1
- package/dist/collection/components/ic-switch/ic-switch.js +2 -1
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.spec.js +104 -0
- package/dist/collection/components/ic-switch/ic-switch.spec.js.map +1 -0
- package/dist/collection/components/ic-tab/ic-tab.e2e.js +32 -0
- package/dist/collection/components/ic-tab/ic-tab.e2e.js.map +1 -0
- package/dist/collection/components/ic-tab/ic-tab.js +7 -1
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.spec.js +159 -0
- package/dist/collection/components/ic-tab/ic-tab.spec.js.map +1 -0
- package/dist/collection/components/ic-tab-context/ic-tab-context.e2e.js +317 -0
- package/dist/collection/components/ic-tab-context/ic-tab-context.e2e.js.map +1 -0
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +7 -5
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.spec.js +369 -0
- package/dist/collection/components/ic-tab-context/ic-tab-context.spec.js.map +1 -0
- package/dist/collection/components/ic-tab-group/ic-tab-group.css +2 -2
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +3 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.spec.js +65 -0
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.spec.js.map +1 -0
- package/dist/collection/components/ic-text-field/ic-text-field.css +0 -4
- package/dist/collection/components/ic-text-field/ic-text-field.e2e.js +98 -0
- package/dist/collection/components/ic-text-field/ic-text-field.e2e.js.map +1 -0
- package/dist/collection/components/ic-text-field/ic-text-field.input.spec.js +236 -0
- package/dist/collection/components/ic-text-field/ic-text-field.input.spec.js.map +1 -0
- package/dist/collection/components/ic-text-field/ic-text-field.js +16 -25
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.textarea.spec.js +310 -0
- package/dist/collection/components/ic-text-field/ic-text-field.textarea.spec.js.map +1 -0
- package/dist/collection/components/ic-theme/ic-theme.e2e.js +72 -0
- package/dist/collection/components/ic-theme/ic-theme.e2e.js.map +1 -0
- package/dist/collection/components/ic-theme/ic-theme.spec.js +77 -0
- package/dist/collection/components/ic-theme/ic-theme.spec.js.map +1 -0
- package/dist/collection/components/ic-toast/ic-toast.e2e.js +82 -0
- package/dist/collection/components/ic-toast/ic-toast.e2e.js.map +1 -0
- package/dist/collection/components/ic-toast/ic-toast.spec.js +278 -0
- package/dist/collection/components/ic-toast/ic-toast.spec.js.map +1 -0
- package/dist/collection/components/ic-toast-region/ic-toast-region.spec.js +62 -0
- package/dist/collection/components/ic-toast-region/ic-toast-region.spec.js.map +1 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.css +22 -8
- package/dist/collection/components/ic-tooltip/ic-tooltip.e2e.js +115 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.e2e.js.map +1 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +26 -27
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.spec.js +128 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.spec.js.map +1 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.e2e.js +42 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.e2e.js.map +1 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.mobile.e2e.js +242 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.mobile.e2e.js.map +1 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.spec.js +286 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.spec.js.map +1 -0
- package/dist/collection/components/ic-typography/ic-typography.css +39 -0
- package/dist/collection/components/ic-typography/ic-typography.e2e.js +36 -0
- package/dist/collection/components/ic-typography/ic-typography.e2e.js.map +1 -0
- package/dist/collection/components/ic-typography/ic-typography.js +120 -2
- package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.spec.js +296 -0
- package/dist/collection/components/ic-typography/ic-typography.spec.js.map +1 -0
- package/dist/collection/testspec.setup.js +11 -0
- package/dist/collection/testspec.setup.js.map +1 -1
- package/dist/collection/utils/helpers.js +23 -24
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +24 -25
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-alert.js +1 -113
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-alert2.js +117 -0
- package/dist/components/ic-alert2.js.map +1 -0
- package/dist/components/ic-back-to-top.js +2 -2
- package/dist/components/ic-breadcrumb-group.js +15 -15
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +5 -4
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +5 -7
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +4 -3
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +5 -2
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +7 -5
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +5 -2
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +1 -1
- package/dist/components/ic-data-entity.js +1 -1
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-dialog.d.ts +11 -0
- package/dist/components/ic-dialog.js +357 -0
- package/dist/components/ic-dialog.js.map +1 -0
- package/dist/components/ic-divider2.js +2 -2
- package/dist/components/ic-footer-link-group.js +2 -2
- package/dist/components/ic-footer-link.js +2 -2
- package/dist/components/ic-footer.js +4 -4
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +2 -2
- package/dist/components/ic-horizontal-scroll2.js +2 -2
- package/dist/components/ic-input-component-container2.js +3 -3
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-container2.js +1 -1
- package/dist/components/ic-input-label2.js +2 -2
- package/dist/components/ic-input-validation2.js +3 -3
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +2 -2
- package/dist/components/ic-loading-indicator2.js +2 -2
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-item2.js +6 -4
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +69 -27
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +2 -2
- package/dist/components/ic-navigation-group.js +50 -21
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +3 -3
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +2 -8
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +12 -15
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +5 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination.js +17 -4
- package/dist/components/ic-pagination.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 +16 -5
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +5 -11
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +6 -3
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +1 -1
- package/dist/components/ic-select.js +35 -34
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +70 -57
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +1 -1
- package/dist/components/ic-status-tag.js +3 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +3 -3
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-switch.js +4 -3
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +8 -6
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +3 -3
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +4 -2
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +8 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +9 -18
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +2 -2
- package/dist/components/ic-tooltip2.js +29 -30
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +2 -2
- package/dist/components/ic-typography2.js +100 -5
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/components/index.d.ts +9 -60
- package/dist/components/index.js +1 -58
- package/dist/components/index.js.map +1 -1
- package/dist/core/core.css +41 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/index.esm.js.map +1 -1
- package/dist/core/{p-de45134c.entry.js → p-04d626ee.entry.js} +2 -2
- package/dist/core/p-04d626ee.entry.js.map +1 -0
- package/dist/core/p-06321d19.js.map +1 -1
- package/dist/core/{p-0575a77f.entry.js → p-0d325b4c.entry.js} +2 -2
- package/dist/core/p-0d325b4c.entry.js.map +1 -0
- package/dist/core/{p-6a77992e.entry.js → p-249af8ab.entry.js} +2 -2
- package/dist/core/p-249af8ab.entry.js.map +1 -0
- package/dist/core/{p-d5d9923a.entry.js → p-29d9fea1.entry.js} +2 -2
- package/dist/core/p-29d9fea1.entry.js.map +1 -0
- package/dist/core/p-2e051e1e.entry.js +2 -0
- package/dist/core/p-2e051e1e.entry.js.map +1 -0
- package/dist/core/{p-3a67718c.entry.js → p-2ec49a7e.entry.js} +2 -2
- package/dist/core/p-2ec49a7e.entry.js.map +1 -0
- package/dist/core/{p-223a214f.entry.js → p-3114a4b3.entry.js} +2 -2
- package/dist/core/p-3114a4b3.entry.js.map +1 -0
- package/dist/core/p-311c38b3.entry.js +2 -0
- package/dist/core/p-311c38b3.entry.js.map +1 -0
- package/dist/core/p-31ccdd50.entry.js +2 -0
- package/dist/core/p-31ccdd50.entry.js.map +1 -0
- package/dist/core/p-31e80ccb.entry.js +2 -0
- package/dist/core/p-31e80ccb.entry.js.map +1 -0
- package/dist/core/p-323bce82.entry.js +2 -0
- package/dist/core/p-323bce82.entry.js.map +1 -0
- package/dist/core/{p-52fd3533.entry.js → p-3918c27a.entry.js} +2 -2
- package/dist/core/p-3918c27a.entry.js.map +1 -0
- package/dist/core/p-3ce0aa02.entry.js +2 -0
- package/dist/core/p-3ce0aa02.entry.js.map +1 -0
- package/dist/core/p-44512ebe.js.map +1 -1
- package/dist/core/p-4a385752.js +2 -0
- package/dist/core/p-4a385752.js.map +1 -0
- package/dist/core/{p-312c10b0.entry.js → p-4c4fa082.entry.js} +2 -2
- package/dist/core/p-4c4fa082.entry.js.map +1 -0
- package/dist/core/{p-fc7dce3d.entry.js → p-4f7b34ed.entry.js} +2 -2
- package/dist/core/p-4f7b34ed.entry.js.map +1 -0
- package/dist/core/p-524557bc.entry.js +2 -0
- package/dist/core/p-524557bc.entry.js.map +1 -0
- package/dist/core/p-551986d1.entry.js +2 -0
- package/dist/core/p-551986d1.entry.js.map +1 -0
- package/dist/core/p-57460fa3.entry.js +2 -0
- package/dist/core/p-57460fa3.entry.js.map +1 -0
- package/dist/core/p-5fcd965f.entry.js +2 -0
- package/dist/core/p-5fcd965f.entry.js.map +1 -0
- package/dist/core/{p-e41e701a.entry.js → p-617950f8.entry.js} +2 -2
- package/dist/core/p-617950f8.entry.js.map +1 -0
- package/dist/core/{p-e384aaee.entry.js → p-68308ecd.entry.js} +2 -2
- package/dist/core/p-68308ecd.entry.js.map +1 -0
- package/dist/core/p-6c76c6ba.entry.js +2 -0
- package/dist/core/p-6c76c6ba.entry.js.map +1 -0
- package/dist/core/p-6f57b13c.js.map +1 -1
- package/dist/core/p-79914e0c.entry.js +2 -0
- package/dist/core/p-79914e0c.entry.js.map +1 -0
- package/dist/core/p-820e4c17.entry.js +2 -0
- package/dist/core/p-820e4c17.entry.js.map +1 -0
- package/dist/core/{p-3fb307e6.entry.js → p-84c8c4c7.entry.js} +2 -2
- package/dist/core/p-84c8c4c7.entry.js.map +1 -0
- package/dist/core/p-8911656b.entry.js +2 -0
- package/dist/core/p-8911656b.entry.js.map +1 -0
- package/dist/core/p-8c7f4343.js.map +1 -1
- package/dist/core/p-8d4f7027.js.map +1 -1
- package/dist/core/p-97286148.entry.js +2 -0
- package/dist/core/p-97286148.entry.js.map +1 -0
- package/dist/core/{p-454b1ecd.entry.js → p-97fd0cc1.entry.js} +2 -2
- package/dist/core/p-97fd0cc1.entry.js.map +1 -0
- package/dist/core/p-a74b8476.entry.js +2 -0
- package/dist/core/p-a74b8476.entry.js.map +1 -0
- package/dist/core/{p-9413d639.entry.js → p-a9de9aba.entry.js} +2 -2
- package/dist/core/p-a9de9aba.entry.js.map +1 -0
- package/dist/core/p-ad6c4c02.entry.js +2 -0
- package/dist/core/p-ad6c4c02.entry.js.map +1 -0
- package/dist/core/{p-a0f4e641.entry.js → p-aeef3c9d.entry.js} +2 -2
- package/dist/core/p-aeef3c9d.entry.js.map +1 -0
- package/dist/core/p-b03bd9c6.entry.js +2 -0
- package/dist/core/p-b03bd9c6.entry.js.map +1 -0
- package/dist/core/p-b0685167.entry.js +2 -0
- package/dist/core/p-b0685167.entry.js.map +1 -0
- package/dist/core/p-b35a9909.entry.js +2 -0
- package/dist/core/p-b35a9909.entry.js.map +1 -0
- package/dist/core/p-bad10f6c.entry.js +2 -0
- package/dist/core/p-bad10f6c.entry.js.map +1 -0
- package/dist/core/{p-002a63e9.entry.js → p-bda4414e.entry.js} +2 -2
- package/dist/core/p-bda4414e.entry.js.map +1 -0
- package/dist/core/p-c0333310.entry.js +2 -0
- package/dist/core/p-c0333310.entry.js.map +1 -0
- package/dist/core/p-c3f9fb1d.entry.js +2 -0
- package/dist/core/p-c3f9fb1d.entry.js.map +1 -0
- package/dist/core/{p-5d077cf7.entry.js → p-ca6820dc.entry.js} +2 -2
- package/dist/core/p-ca6820dc.entry.js.map +1 -0
- package/dist/core/p-d6694b41.entry.js +2 -0
- package/dist/core/p-d6694b41.entry.js.map +1 -0
- package/dist/core/{p-1eb0992b.entry.js → p-da4c1409.entry.js} +2 -2
- package/dist/core/p-da4c1409.entry.js.map +1 -0
- package/dist/core/p-dbe06c3b.entry.js +2 -0
- package/dist/core/p-dbe06c3b.entry.js.map +1 -0
- package/dist/core/{p-28bc3bf0.entry.js → p-df67b151.entry.js} +2 -2
- package/dist/core/p-df67b151.entry.js.map +1 -0
- package/dist/core/{p-546b620e.entry.js → p-dfd31e28.entry.js} +2 -2
- package/dist/core/p-dfd31e28.entry.js.map +1 -0
- package/dist/core/{p-dc0b9e80.entry.js → p-e3e6308b.entry.js} +2 -2
- package/dist/core/p-e3e6308b.entry.js.map +1 -0
- package/dist/core/p-ea233813.entry.js +2 -0
- package/dist/core/p-ea233813.entry.js.map +1 -0
- package/dist/core/p-ec26fc38.js.map +1 -1
- package/dist/core/{p-f3e10149.entry.js → p-ecdcae46.entry.js} +2 -2
- package/dist/core/p-ecdcae46.entry.js.map +1 -0
- package/dist/core/p-ef91c17e.entry.js +2 -0
- package/dist/core/p-ef91c17e.entry.js.map +1 -0
- package/dist/core/{p-a33a04b2.entry.js → p-f0714432.entry.js} +2 -2
- package/dist/core/p-f0714432.entry.js.map +1 -0
- package/dist/core/p-f3053872.js +3 -0
- package/dist/core/p-f3053872.js.map +1 -0
- package/dist/core/{p-47b0ed42.entry.js → p-f381e93f.entry.js} +2 -2
- package/dist/core/p-f381e93f.entry.js.map +1 -0
- package/dist/core/p-fd482bd7.entry.js +2 -0
- package/dist/core/p-fd482bd7.entry.js.map +1 -0
- package/dist/core/p-fe2c4009.entry.js +2 -0
- package/dist/core/p-fe2c4009.entry.js.map +1 -0
- package/dist/esm/core.js +7 -3
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/{helpers-b2b47a7d.js → helpers-8e57082b.js} +25 -26
- package/dist/esm/helpers-8e57082b.js.map +1 -0
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-back-to-top.entry.js +2 -2
- package/dist/esm/ic-breadcrumb-group.entry.js +15 -15
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +6 -5
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +33 -36
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +4 -3
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +5 -2
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +7 -5
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +5 -2
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +1 -1
- package/dist/esm/ic-data-entity.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js +292 -0
- package/dist/esm/ic-dialog.entry.js.map +1 -0
- package/dist/esm/ic-divider.entry.js +2 -2
- package/dist/esm/ic-footer-link-group.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/ic-horizontal-scroll.entry.js +2 -2
- package/dist/esm/ic-input-component-container_3.entry.js +69 -27
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +3 -3
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +2 -2
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +6 -4
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +2 -2
- package/dist/esm/ic-navigation-group.entry.js +50 -21
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +3 -3
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +2 -8
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +12 -15
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +6 -1
- package/dist/esm/ic-pagination-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination.entry.js +14 -2
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +7 -6
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +16 -5
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -11
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +6 -3
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +1 -1
- package/dist/esm/ic-select.entry.js +35 -34
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +70 -57
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +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 +3 -3
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +2 -2
- package/dist/esm/ic-switch.entry.js +4 -3
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +8 -6
- 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 +4 -2
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +8 -2
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +9 -18
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +2 -2
- package/dist/esm/ic-top-navigation.entry.js +2 -2
- package/dist/esm/ic-typography.entry.js +96 -4
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/{index-3b144b17.js → index-a77644e1.js} +222 -44
- package/dist/esm/index-a77644e1.js.map +1 -0
- package/dist/esm/loader.js +4 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/types/components/ic-breadcrumb/ic-breadcrumb.types.d.ts +1 -1
- package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +3 -0
- package/dist/types/components/ic-button/ic-button.types.d.ts +4 -4
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +1 -0
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
- package/dist/types/components/ic-chip/ic-chip.d.ts +1 -0
- package/dist/types/components/ic-chip/ic-chip.types.d.ts +2 -2
- package/dist/types/components/ic-classification-banner/ic-classification-banner.types.d.ts +1 -1
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +123 -0
- package/dist/types/components/ic-dialog/ic-dialog.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-footer/ic-footer.types.d.ts +1 -1
- package/dist/types/components/ic-footer-link/ic-footer-link.d.ts +1 -1
- package/dist/types/components/ic-hero/ic-hero.types.d.ts +1 -1
- package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +1 -1
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.types.d.ts +2 -2
- package/dist/types/components/ic-menu/ic-menu.d.ts +7 -0
- package/dist/types/components/ic-menu-item/ic-menu-item.types.d.ts +1 -1
- package/dist/types/components/ic-navigation-button/ic-navigation-button.types.d.ts +1 -1
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +4 -1
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +8 -1
- package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +1 -1
- package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +2 -1
- package/dist/types/components/ic-pagination-item/ic-pagination-item.types.d.ts +1 -1
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +1 -0
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +4 -3
- package/dist/types/components/ic-radio-group/ic-radio-group.types.d.ts +7 -0
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +1 -3
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -1
- package/dist/types/components/ic-search-bar/ic-search-bar.types.d.ts +1 -1
- package/dist/types/components/ic-select/ic-select.d.ts +14 -14
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +1 -0
- package/dist/types/components/ic-skeleton/ic-skeleton.types.d.ts +1 -1
- package/dist/types/components/ic-status-tag/ic-status-tag.types.d.ts +2 -2
- package/dist/types/components/ic-step/ic-step.types.d.ts +3 -3
- package/dist/types/components/ic-stepper/ic-stepper.types.d.ts +1 -1
- package/dist/types/components/ic-tab/ic-tab.d.ts +1 -0
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -1
- package/dist/types/components/ic-text-field/ic-text-field.types.d.ts +3 -3
- package/dist/types/components/ic-toast/ic-toast.types.d.ts +1 -1
- package/dist/types/components/ic-tooltip/ic-tooltip.types.d.ts +1 -1
- package/dist/types/components/ic-typography/ic-typography.d.ts +27 -0
- package/dist/types/components.d.ts +222 -42
- package/dist/types/stencil-public-runtime.d.ts +72 -15
- package/dist/types/testspec.setup.d.ts +9 -0
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/types/utils/types.d.ts +22 -22
- package/hydrate/index.d.ts +17 -16
- package/hydrate/index.js +920 -384
- package/loader/index.d.ts +9 -0
- package/package.json +5 -5
- package/dist/cjs/helpers-2021e212.js.map +0 -1
- package/dist/cjs/index-a62312a7.js.map +0 -1
- package/dist/core/p-002a63e9.entry.js.map +0 -1
- package/dist/core/p-0575a77f.entry.js.map +0 -1
- package/dist/core/p-0a41c3cb.entry.js +0 -2
- package/dist/core/p-0a41c3cb.entry.js.map +0 -1
- package/dist/core/p-100dbcec.entry.js +0 -2
- package/dist/core/p-100dbcec.entry.js.map +0 -1
- package/dist/core/p-14835d6f.entry.js +0 -2
- package/dist/core/p-14835d6f.entry.js.map +0 -1
- package/dist/core/p-1eb0992b.entry.js.map +0 -1
- package/dist/core/p-223a214f.entry.js.map +0 -1
- package/dist/core/p-276f7ecb.entry.js +0 -2
- package/dist/core/p-276f7ecb.entry.js.map +0 -1
- package/dist/core/p-28bc3bf0.entry.js.map +0 -1
- package/dist/core/p-2e949135.entry.js +0 -2
- package/dist/core/p-2e949135.entry.js.map +0 -1
- package/dist/core/p-312c10b0.entry.js.map +0 -1
- package/dist/core/p-3845b769.entry.js +0 -2
- package/dist/core/p-3845b769.entry.js.map +0 -1
- package/dist/core/p-3a67718c.entry.js.map +0 -1
- package/dist/core/p-3c23f963.entry.js +0 -2
- package/dist/core/p-3c23f963.entry.js.map +0 -1
- package/dist/core/p-3dc2ff7b.entry.js +0 -2
- package/dist/core/p-3dc2ff7b.entry.js.map +0 -1
- package/dist/core/p-3dea2867.js +0 -2
- package/dist/core/p-3dea2867.js.map +0 -1
- package/dist/core/p-3e5eb873.entry.js +0 -2
- package/dist/core/p-3e5eb873.entry.js.map +0 -1
- package/dist/core/p-3fb307e6.entry.js.map +0 -1
- package/dist/core/p-454b1ecd.entry.js.map +0 -1
- package/dist/core/p-4595f48f.entry.js +0 -2
- package/dist/core/p-4595f48f.entry.js.map +0 -1
- package/dist/core/p-47b0ed42.entry.js.map +0 -1
- package/dist/core/p-4b87445b.entry.js +0 -2
- package/dist/core/p-4b87445b.entry.js.map +0 -1
- package/dist/core/p-4c8fcfe6.entry.js +0 -2
- package/dist/core/p-4c8fcfe6.entry.js.map +0 -1
- package/dist/core/p-52fd3533.entry.js.map +0 -1
- package/dist/core/p-546b620e.entry.js.map +0 -1
- package/dist/core/p-56fe91ad.entry.js +0 -2
- package/dist/core/p-56fe91ad.entry.js.map +0 -1
- package/dist/core/p-589f6dd3.js +0 -3
- package/dist/core/p-589f6dd3.js.map +0 -1
- package/dist/core/p-5d077cf7.entry.js.map +0 -1
- package/dist/core/p-6a77992e.entry.js.map +0 -1
- package/dist/core/p-6b39f8b4.entry.js +0 -2
- package/dist/core/p-6b39f8b4.entry.js.map +0 -1
- package/dist/core/p-80eff050.entry.js +0 -2
- package/dist/core/p-80eff050.entry.js.map +0 -1
- package/dist/core/p-8780890e.entry.js +0 -2
- package/dist/core/p-8780890e.entry.js.map +0 -1
- package/dist/core/p-895bda21.entry.js +0 -2
- package/dist/core/p-895bda21.entry.js.map +0 -1
- package/dist/core/p-92c4fa7f.entry.js +0 -2
- package/dist/core/p-92c4fa7f.entry.js.map +0 -1
- package/dist/core/p-9413d639.entry.js.map +0 -1
- package/dist/core/p-a0f4e641.entry.js.map +0 -1
- package/dist/core/p-a33a04b2.entry.js.map +0 -1
- package/dist/core/p-a5bee11f.entry.js +0 -2
- package/dist/core/p-a5bee11f.entry.js.map +0 -1
- package/dist/core/p-a7fdb9a8.entry.js +0 -2
- package/dist/core/p-a7fdb9a8.entry.js.map +0 -1
- package/dist/core/p-b61e76e2.entry.js +0 -2
- package/dist/core/p-b61e76e2.entry.js.map +0 -1
- package/dist/core/p-c0813424.entry.js +0 -2
- package/dist/core/p-c0813424.entry.js.map +0 -1
- package/dist/core/p-cb437317.entry.js +0 -2
- package/dist/core/p-cb437317.entry.js.map +0 -1
- package/dist/core/p-d5d9923a.entry.js.map +0 -1
- package/dist/core/p-dc0b9e80.entry.js.map +0 -1
- package/dist/core/p-de45134c.entry.js.map +0 -1
- package/dist/core/p-de891d3d.entry.js +0 -2
- package/dist/core/p-de891d3d.entry.js.map +0 -1
- package/dist/core/p-e0f24ccd.entry.js +0 -2
- package/dist/core/p-e0f24ccd.entry.js.map +0 -1
- package/dist/core/p-e384aaee.entry.js.map +0 -1
- package/dist/core/p-e41e701a.entry.js.map +0 -1
- package/dist/core/p-e839e5dc.entry.js +0 -2
- package/dist/core/p-e839e5dc.entry.js.map +0 -1
- package/dist/core/p-ea526b54.entry.js +0 -2
- package/dist/core/p-ea526b54.entry.js.map +0 -1
- package/dist/core/p-ec8b228c.entry.js +0 -2
- package/dist/core/p-ec8b228c.entry.js.map +0 -1
- package/dist/core/p-f3e10149.entry.js.map +0 -1
- package/dist/core/p-fc7dce3d.entry.js.map +0 -1
- package/dist/esm/helpers-b2b47a7d.js.map +0 -1
- package/dist/esm/index-3b144b17.js.map +0 -1
@@ -49,22 +49,20 @@ export const debounce = (func, wait = 0) => {
|
|
49
49
|
* @param disabled If true, the input is disabled
|
50
50
|
*/
|
51
51
|
export const renderHiddenInput = (always, container, name, value, disabled) => {
|
52
|
-
if (name !== undefined) {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
container.appendChild(input);
|
63
|
-
}
|
64
|
-
input.disabled = disabled;
|
65
|
-
input.name = name;
|
66
|
-
input.value = value || "";
|
52
|
+
if (name !== undefined && (always || hasShadowDom(container))) {
|
53
|
+
const inputs = container.querySelectorAll("input.ic-input");
|
54
|
+
const inputEls = Array.from(inputs);
|
55
|
+
const filtered = inputEls.filter((el) => container === el.parentElement);
|
56
|
+
let input = filtered[0];
|
57
|
+
if (input === null || input === undefined) {
|
58
|
+
input = container.ownerDocument.createElement("input");
|
59
|
+
input.type = "hidden";
|
60
|
+
input.classList.add("ic-input");
|
61
|
+
container.appendChild(input);
|
67
62
|
}
|
63
|
+
input.disabled = disabled;
|
64
|
+
input.name = name;
|
65
|
+
input.value = value || "";
|
68
66
|
}
|
69
67
|
};
|
70
68
|
export const removeHiddenInput = (container) => {
|
@@ -239,11 +237,10 @@ export const getThemeColorBrightness = () => {
|
|
239
237
|
const themeRed = getCssProperty("--ic-theme-primary-r");
|
240
238
|
const themeGreen = getCssProperty("--ic-theme-primary-g");
|
241
239
|
const themeBlue = getCssProperty("--ic-theme-primary-b");
|
242
|
-
|
240
|
+
return ((parseInt(themeRed) * 299 +
|
243
241
|
parseInt(themeGreen) * 587 +
|
244
242
|
parseInt(themeBlue) * 114) /
|
245
|
-
1000;
|
246
|
-
return themeColorBrightness;
|
243
|
+
1000);
|
247
244
|
};
|
248
245
|
/**
|
249
246
|
* Returns if dark or light foreground colors should be used for color contrast reasons
|
@@ -405,12 +402,9 @@ export const elementOverflowsX = (element) => {
|
|
405
402
|
export const getParentElementType = (child) => child.parentElement.tagName;
|
406
403
|
export const getParentElement = (child) => child.parentElement;
|
407
404
|
export const hasClassificationBanner = () => {
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
else {
|
412
|
-
return false;
|
413
|
-
}
|
405
|
+
return document.querySelector("ic-classification-banner:not([inline='true'])")
|
406
|
+
? true
|
407
|
+
: false;
|
414
408
|
};
|
415
409
|
export const getForm = (el) => {
|
416
410
|
return el.closest("FORM");
|
@@ -431,4 +425,9 @@ export const pxToRem = (px, base = 16) => {
|
|
431
425
|
const tempPx = parseInt(px);
|
432
426
|
return `${(1 / base) * tempPx}rem`;
|
433
427
|
};
|
428
|
+
export const removeDisabledFalse = (disabled, element) => {
|
429
|
+
if (!disabled) {
|
430
|
+
element.removeAttribute("disabled");
|
431
|
+
}
|
432
|
+
};
|
434
433
|
//# sourceMappingURL=helpers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[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G,CAAC,EAAe,EAA0B,EAAE;EACjE,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,EAAe,EACf,UAAsC,EAChC,EAAE;EACR,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;EACzB,IAAI,IAAI,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;GAC5C;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,EAAe,EACf,UAAsC,EAChC,EAAE;EACR,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;EACzB,IAAI,IAAI,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;GAC/C;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAU,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE;EAC/C,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;EAC5B,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,MAAM,KAAK,CAAC;AACrC,CAAC,CAAC","sourcesContent":["import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\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]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\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\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 | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined) {\n if (always || hasShadowDom(container)) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\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(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\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): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\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 IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\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 !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\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 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): boolean => {\n if (!value) {\n return true;\n }\n\n return value.trim().length === 0;\n};\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): 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 return ungroupedOptions.find((option) => option.value === value)?.label;\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\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\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 return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\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-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n const themeColorBrightness =\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000;\n return themeColorBrightness;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): 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 = (slot: Element) => {\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 : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\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};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n};\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 for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\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 = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\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 = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n if (document.querySelector(\"ic-classification-banner:not([inline='true'])\")) {\n return true;\n } else {\n return false;\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16) => {\n const tempPx = parseInt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CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAe,EAA0B,EAAE;EACjE,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,EAAe,EACf,UAAsC,EAChC,EAAE;EACR,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;EACzB,IAAI,IAAI,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;GAC5C;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,EAAe,EACf,UAAsC,EAChC,EAAE;EACR,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;EACzB,IAAI,IAAI,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;GAC/C;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAU,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE;EAC/C,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;EAC5B,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,MAAM,KAAK,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAAiB,EACjB,OAAoB,EACpB,EAAE;EACF,IAAI,CAAC,QAAQ,EAAE;IACb,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;GACrC;AACH,CAAC,CAAC","sourcesContent":["import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\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]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\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\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 | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\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(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\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): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\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 IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\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 !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\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 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): boolean => {\n if (!value) {\n return true;\n }\n\n return value.trim().length === 0;\n};\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): 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 return ungroupedOptions.find((option) => option.value === value)?.label;\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\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\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 return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\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-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): 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 = (slot: Element) => {\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 : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\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};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n};\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 for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\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 = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\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 = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n return document.querySelector(\"ic-classification-banner:not([inline='true'])\")\n ? true\n : false;\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16) => {\n const tempPx = parseInt(px);\n return `${(1 / base) * tempPx}rem`;\n};\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n) => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n"]}
|
@@ -160,22 +160,20 @@ const debounce = (func, wait = 0) => {
|
|
160
160
|
* @param disabled If true, the input is disabled
|
161
161
|
*/
|
162
162
|
const renderHiddenInput = (always, container, name, value, disabled) => {
|
163
|
-
if (name !== undefined) {
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
container.appendChild(input);
|
174
|
-
}
|
175
|
-
input.disabled = disabled;
|
176
|
-
input.name = name;
|
177
|
-
input.value = value || "";
|
163
|
+
if (name !== undefined && (always || hasShadowDom(container))) {
|
164
|
+
const inputs = container.querySelectorAll("input.ic-input");
|
165
|
+
const inputEls = Array.from(inputs);
|
166
|
+
const filtered = inputEls.filter((el) => container === el.parentElement);
|
167
|
+
let input = filtered[0];
|
168
|
+
if (input === null || input === undefined) {
|
169
|
+
input = container.ownerDocument.createElement("input");
|
170
|
+
input.type = "hidden";
|
171
|
+
input.classList.add("ic-input");
|
172
|
+
container.appendChild(input);
|
178
173
|
}
|
174
|
+
input.disabled = disabled;
|
175
|
+
input.name = name;
|
176
|
+
input.value = value || "";
|
179
177
|
}
|
180
178
|
};
|
181
179
|
const removeHiddenInput = (container) => {
|
@@ -350,11 +348,10 @@ const getThemeColorBrightness = () => {
|
|
350
348
|
const themeRed = getCssProperty("--ic-theme-primary-r");
|
351
349
|
const themeGreen = getCssProperty("--ic-theme-primary-g");
|
352
350
|
const themeBlue = getCssProperty("--ic-theme-primary-b");
|
353
|
-
|
351
|
+
return ((parseInt(themeRed) * 299 +
|
354
352
|
parseInt(themeGreen) * 587 +
|
355
353
|
parseInt(themeBlue) * 114) /
|
356
|
-
1000;
|
357
|
-
return themeColorBrightness;
|
354
|
+
1000);
|
358
355
|
};
|
359
356
|
/**
|
360
357
|
* Returns if dark or light foreground colors should be used for color contrast reasons
|
@@ -516,12 +513,9 @@ const elementOverflowsX = (element) => {
|
|
516
513
|
const getParentElementType = (child) => child.parentElement.tagName;
|
517
514
|
const getParentElement = (child) => child.parentElement;
|
518
515
|
const hasClassificationBanner = () => {
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
else {
|
523
|
-
return false;
|
524
|
-
}
|
516
|
+
return document.querySelector("ic-classification-banner:not([inline='true'])")
|
517
|
+
? true
|
518
|
+
: false;
|
525
519
|
};
|
526
520
|
const getForm = (el) => {
|
527
521
|
return el.closest("FORM");
|
@@ -542,7 +536,12 @@ const pxToRem = (px, base = 16) => {
|
|
542
536
|
const tempPx = parseInt(px);
|
543
537
|
return `${(1 / base) * tempPx}rem`;
|
544
538
|
};
|
539
|
+
const removeDisabledFalse = (disabled, element) => {
|
540
|
+
if (!disabled) {
|
541
|
+
element.removeAttribute("disabled");
|
542
|
+
}
|
543
|
+
};
|
545
544
|
|
546
|
-
export {
|
545
|
+
export { getNavItemParentDetails as A, getParentElementType as B, getSlotContent as C, DEVICE_SIZES as D, getSlot as E, handleHiddenFormButtonClick as F, getFilteredMenuOptions as G, getLabelFromValue as H, IC_INHERITED_ARIA as I, debounceEvent as J, isEmptyString as K, isMobileOrTablet as L, getCssProperty as M, pxToRem as N, getThemeColorBrightness as O, BLACK_MIN_COLOR_BRIGHTNESS as P, hexToRgba as Q, rgbaStrToObj as R, VARIANT_ICONS as V, WHITE_MAX_COLOR_BRIGHTNESS as W, inheritAttributes as a, onComponentPropUndefinedChange as b, checkResizeObserver as c, getCurrentDeviceSize as d, addFormResetListener as e, removeFormResetListener as f, getThemeFromContext as g, renderHiddenInput as h, isSlotUsed as i, removeHiddenInput as j, getInputDescribedByText as k, hasValidationStatus as l, getInputHelperTextID as m, getInputValidationTextID as n, onComponentRequiredPropUndefined as o, errorIcon as p, slotHasContent as q, removeDisabledFalse as r, successIcon as s, getThemeForegroundColor as t, IC_DEVICE_SIZES as u, hasClassificationBanner as v, warningIcon as w, elementOverflowsX as x, getSlotElements as y, getParentElement as z };
|
547
546
|
|
548
547
|
//# sourceMappingURL=helpers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"helpers.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;MACa,aAAa,GAAG;EAC3B,OAAO,EAAE;IACP,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;GACrB;EACD,IAAI,EAAE;IACJ,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,sBAAsB;GAClC;EACD,OAAO,EAAE;IACP,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;GACrB;EACD,KAAK,EAAE;IACL,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,OAAO;GACnB;EACD,OAAO,EAAE;IACP,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;GACrB;EACD;AAEF;MACa,iBAAiB,GAAG;EAC/B,aAAa;EACb,WAAW;EACX,eAAe;EACf,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;EACd,eAAe;EACf,iBAAiB;EACjB,mBAAmB;EACnB,aAAa;EACb,cAAc;EACd,eAAe;EACf,aAAa;EACb,cAAc;EACd,mBAAmB;EACnB,YAAY;EACZ,iBAAiB;EACjB,WAAW;EACX,WAAW;EACX,eAAe;EACf,sBAAsB;EACtB;MAEW,eAAe,GAAG;EAC7B,EAAE,EAAE,GAAG;EACP,CAAC,EAAE,GAAG;EACN,CAAC,EAAE,GAAG;EACN,CAAC,EAAE,IAAI;EACP,EAAE,EAAE,KAAK;EACT;AAEK,MAAM,yBAAyB,GA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C,EAAE,CAAC,CAAC;EACzB,IAAI,IAAI,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;GAC/C;AACH,EAAE;MAEW,OAAO,GAAG,CAAC,EAAU,EAAE,IAAI,GAAG,EAAE;EAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;EAC5B,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,KAAK,CAAC;AACrC;;;;","names":[],"sources":["./src/utils/constants.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-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-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\"],\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","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\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]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\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\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 | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined) {\n if (always || hasShadowDom(container)) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\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(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\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): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\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 IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\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 !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\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 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): boolean => {\n if (!value) {\n return true;\n }\n\n return value.trim().length === 0;\n};\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): 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 return ungroupedOptions.find((option) => option.value === value)?.label;\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\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\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 return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\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-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n const themeColorBrightness =\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000;\n return themeColorBrightness;\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): 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 = (slot: Element) => {\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 : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\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};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n};\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 for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\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 = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\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 = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n if (document.querySelector(\"ic-classification-banner:not([inline='true'])\")) {\n return true;\n } else {\n return false;\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16) => {\n const tempPx = parseInt(px);\n return `${(1 / base) * tempPx}rem`;\n};\n"],"version":3}
|
1
|
+
{"file":"helpers.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;MACa,aAAa,GAAG;EAC3B,OAAO,EAAE;IACP,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;GACrB;EACD,IAAI,EAAE;IACJ,IAAI,EAAE,QAAQ;IACd,SAAS,EAA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C,aAAa,CAAC,QAAQ;MAEjB,gBAAgB,GAAG,CAAC,KAAkB,KACjD,KAAK,CAAC,cAAc;MAET,uBAAuB,GAAG;EACrC,OAAO,QAAQ,CAAC,aAAa,CAAC,+CAA+C,CAAC;MAC1E,IAAI;MACJ,KAAK,CAAC;AACZ,EAAE;AAEK,MAAM,OAAO,GAAG,CAAC,EAAe;EACrC,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAC;MAEW,oBAAoB,GAAG,CAClC,EAAe,EACf,UAAsC;EAEtC,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;EACzB,IAAI,IAAI,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;GAC5C;AACH,EAAE;MAEW,uBAAuB,GAAG,CACrC,EAAe,EACf,UAAsC;EAEtC,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;EACzB,IAAI,IAAI,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;GAC/C;AACH,EAAE;MAEW,OAAO,GAAG,CAAC,EAAU,EAAE,IAAI,GAAG,EAAE;EAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;EAC5B,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,KAAK,CAAC;AACrC,EAAE;MAEW,mBAAmB,GAAG,CACjC,QAAiB,EACjB,OAAoB;EAEpB,IAAI,CAAC,QAAQ,EAAE;IACb,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;GACrC;AACH;;;;","names":[],"sources":["./src/utils/constants.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-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-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\"],\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","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\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]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\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\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 | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\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(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\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): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\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 IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\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 !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\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 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): boolean => {\n if (!value) {\n return true;\n }\n\n return value.trim().length === 0;\n};\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): 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 return ungroupedOptions.find((option) => option.value === value)?.label;\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\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\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 return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\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-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): 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 = (slot: Element) => {\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 : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\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};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n};\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 for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\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 = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\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 = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n return document.querySelector(\"ic-classification-banner:not([inline='true'])\")\n ? true\n : false;\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16) => {\n const tempPx = parseInt(px);\n return `${(1 / base) * tempPx}rem`;\n};\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n) => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n"],"version":3}
|
@@ -1,116 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { c as closeIcon } from './close-icon.js';
|
3
|
-
import { V as VARIANT_ICONS, i as isSlotUsed } from './helpers.js';
|
4
|
-
import { I as IcThemeForegroundEnum } from './types.js';
|
5
|
-
import { d as defineCustomElement$5 } from './ic-button2.js';
|
6
|
-
import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
|
7
|
-
import { d as defineCustomElement$3 } from './ic-tooltip2.js';
|
8
|
-
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
9
|
-
|
10
|
-
const icAlertCss = "/*! 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}.container{min-height:3.5rem;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-architectural-40)}.container-info{background-color:var(--ic-status-info-background)}.container-warning{background-color:var(--ic-status-warning-background)}.container-error{background-color:var(--ic-status-error-background)}.container-success{background-color:var(--ic-status-success-background)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-architectural-500)}.divider-info{background-color:var(--ic-status-info)}.divider-warning{background-color:var(--ic-status-warning-mid)}.divider-error{background-color:var(--ic-status-error)}.divider-success{background-color:var(--ic-status-success)}.alert-icon{height:var(--ic-space-lg);width:1.375rem;margin-left:1.125rem}.alert-icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.icon-neutral>svg{fill:var(--ic-architectural-500)}:host([variant=\"info\"]) .alert-icon svg{fill:var(--ic-status-info)}:host([variant=\"warning\"]) .alert-icon svg{fill:var(--ic-status-warning-mid)}:host([variant=\"error\"]) .alert-icon svg{fill:var(--ic-status-error)}:host([variant=\"success\"]) .alert-icon svg{fill:var(--ic-status-success)}.alert-content{display:flex;align-items:center;margin-left:0.625rem;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1}.alert-message-title-above{display:inline;font-size:0}.alert-title{margin-right:var(--ic-space-xs)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-0.375rem;padding:0.375rem;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start}.alert-title{white-space:normal}.alert-action-container{margin-bottom:var(--ic-space-xs)}}@media (forced-colors: active){.container{border:var(--ic-hc-border)}}";
|
11
|
-
|
12
|
-
const Alert = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
13
|
-
constructor() {
|
14
|
-
super();
|
15
|
-
this.__registerHost();
|
16
|
-
this.__attachShadow();
|
17
|
-
this.dismiss = createEvent(this, "dismiss", 7);
|
18
|
-
this.icDismiss = createEvent(this, "icDismiss", 7);
|
19
|
-
this.dismissAction = () => {
|
20
|
-
this.dismiss.emit();
|
21
|
-
this.icDismiss.emit();
|
22
|
-
};
|
23
|
-
this.variant = "neutral";
|
24
|
-
this.heading = "";
|
25
|
-
this.message = undefined;
|
26
|
-
this.titleAbove = false;
|
27
|
-
this.dismissible = false;
|
28
|
-
this.announced = true;
|
29
|
-
this.visible = true;
|
30
|
-
this.alertTitleWrap = false;
|
31
|
-
}
|
32
|
-
handleClick() {
|
33
|
-
this.visible = !this.visible;
|
34
|
-
}
|
35
|
-
alertTitleShouldWrap() {
|
36
|
-
var _a;
|
37
|
-
const titleHeight = (_a = this.el.shadowRoot.querySelector(".alert-title")) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
38
|
-
if (titleHeight > 24)
|
39
|
-
this.alertTitleWrap = true;
|
40
|
-
}
|
41
|
-
componentDidLoad() {
|
42
|
-
this.alertTitleShouldWrap();
|
43
|
-
}
|
44
|
-
render() {
|
45
|
-
const { variant, heading, message, titleAbove, dismissible, announced, visible, } = this;
|
46
|
-
return (visible && (h(Host, { role: announced && "alert", class: {
|
47
|
-
[IcThemeForegroundEnum.Dark]: true,
|
48
|
-
} }, h("div", { class: {
|
49
|
-
["container"]: true,
|
50
|
-
[`container-${variant}`]: true,
|
51
|
-
} }, h("div", { class: "alert-icon-container" }, h("div", { class: {
|
52
|
-
["divider"]: true,
|
53
|
-
[`divider-${variant}`]: true,
|
54
|
-
} }), h("span", { class: {
|
55
|
-
["alert-icon"]: true,
|
56
|
-
["svg-container"]: true,
|
57
|
-
[`icon-${variant}`]: true,
|
58
|
-
}, innerHTML: VARIANT_ICONS[variant].icon })), h("div", { class: "alert-content" }, h("div", { class: {
|
59
|
-
["alert-message"]: true,
|
60
|
-
["alert-message-title-above"]: titleAbove || this.alertTitleWrap,
|
61
|
-
} }, heading && (h("ic-typography", { class: {
|
62
|
-
["alert-title"]: true,
|
63
|
-
["alert-title-above"]: titleAbove || this.alertTitleWrap,
|
64
|
-
}, variant: "subtitle-large" }, h("p", null, heading))), h("slot", { name: "message" }, h("ic-typography", { variant: "body" }, message))), isSlotUsed(this.el, "action") && (h("div", { class: "alert-action-container" }, h("slot", { name: "action" })))), h("div", { class: "dismiss-icon-container" }, dismissible && (h("ic-button", { class: {
|
65
|
-
["svg-container"]: true,
|
66
|
-
["dismiss-icon"]: true,
|
67
|
-
}, innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon", appearance: IcThemeForegroundEnum.Dark, title: "dismiss" })))))));
|
68
|
-
}
|
69
|
-
get el() { return this; }
|
70
|
-
static get style() { return icAlertCss; }
|
71
|
-
}, [1, "ic-alert", {
|
72
|
-
"variant": [1],
|
73
|
-
"heading": [1],
|
74
|
-
"message": [1],
|
75
|
-
"titleAbove": [4, "title-above"],
|
76
|
-
"dismissible": [4],
|
77
|
-
"announced": [4],
|
78
|
-
"visible": [32],
|
79
|
-
"alertTitleWrap": [32]
|
80
|
-
}, [[2, "icDismiss", "handleClick"]]]);
|
81
|
-
function defineCustomElement$1() {
|
82
|
-
if (typeof customElements === "undefined") {
|
83
|
-
return;
|
84
|
-
}
|
85
|
-
const components = ["ic-alert", "ic-button", "ic-loading-indicator", "ic-tooltip", "ic-typography"];
|
86
|
-
components.forEach(tagName => { switch (tagName) {
|
87
|
-
case "ic-alert":
|
88
|
-
if (!customElements.get(tagName)) {
|
89
|
-
customElements.define(tagName, Alert);
|
90
|
-
}
|
91
|
-
break;
|
92
|
-
case "ic-button":
|
93
|
-
if (!customElements.get(tagName)) {
|
94
|
-
defineCustomElement$5();
|
95
|
-
}
|
96
|
-
break;
|
97
|
-
case "ic-loading-indicator":
|
98
|
-
if (!customElements.get(tagName)) {
|
99
|
-
defineCustomElement$4();
|
100
|
-
}
|
101
|
-
break;
|
102
|
-
case "ic-tooltip":
|
103
|
-
if (!customElements.get(tagName)) {
|
104
|
-
defineCustomElement$3();
|
105
|
-
}
|
106
|
-
break;
|
107
|
-
case "ic-typography":
|
108
|
-
if (!customElements.get(tagName)) {
|
109
|
-
defineCustomElement$2();
|
110
|
-
}
|
111
|
-
break;
|
112
|
-
} });
|
113
|
-
}
|
1
|
+
import { A as Alert, d as defineCustomElement$1 } from './ic-alert2.js';
|
114
2
|
|
115
3
|
const IcAlert = Alert;
|
116
4
|
const defineCustomElement = defineCustomElement$1;
|