@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
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ic-page-header.e2e.js","sourceRoot":"","sources":["../../../src/components/ic-page-header/ic-page-header.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;EACxC,EAAE,CAAC,sEAAsE,EAAE,KAAK,IAAI,EAAE;IACpF,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAEhC,MAAM,IAAI,CAAC,UAAU,CACnB;;;;;;;;;;;;;;;;wBAgBkB,CACnB,CAAC;IAEF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEjC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,QAAQ,CAA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AAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;MAC5D,OAAO,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE1C,MAAM,iCAAiC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACjE,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;MAC5D,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;MAE9B,OAAO,UAAU,CAAC,SAAS,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,iCAAiC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;EACzD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from \"@stencil/core/testing\";\n\ndescribe(\"ic-page-header component\", () => {\n it(\"shouldn't render tooltips on the navigation items in the page header\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(\n `<ic-page-header\n heading=\"Coffee recipes\"\n sub-heading=\"This is a page header component with additional functionality and this is the text.\"\n >\n <ic-status-tag slot=\"heading-adornment\" label=\"Beta\"></ic-status-tag>\n <ic-navigation-item\n slot=\"tabs\"\n label=\"All recipes\"\n href=\"?path=/story/web-components-page-header--with-tabs\"\n selected\n ></ic-navigation-item>\n <ic-navigation-item\n slot=\"tabs\"\n label=\"Favourites\"\n href=\"?path=/story/web-components-page-header--with-tabs\"\n ></ic-navigation-item>\n </ic-page-header>`\n );\n\n await page.waitForChanges();\n\n await page.keyboard.press(\"Tab\");\n\n await page.waitForChanges();\n\n const tooltipDisplay = await page.evaluate(() => {\n const tooltip = document\n .querySelectorAll(\"ic-navigation-item\")[0]\n .shadowRoot.querySelector(\"ic-tooltip\")\n .shadowRoot.querySelector(\".ic-tooltip-container\");\n\n return window.getComputedStyle(tooltip).display;\n });\n\n expect(tooltipDisplay).toBe(\"none\");\n });\n\n it(\"should stay at the top of the page if the sticky variant is used\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(\n `<ic-top-navigation app-title=\"ApplicationName\">\n <svg\n slot=\"app-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#000000\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z\"\n />\n </svg>\n </ic-top-navigation>\n <ic-page-header\n sticky\n heading=\"Page header\"\n sub-heading=\"This is a simple page header component and this is the text.\"\n >\n <ic-status-tag slot=\"heading-adornment\" label=\"Beta\"></ic-status-tag>\n </ic-page-header>\n <ic-section-container style=\"height:800px\">\n This is an example of how the sticky variant of the page header would\n work with some content and the footer.\n </ic-section-container>\n <ic-footer\n description=\"The ICDS is maintained by the Design Practice Team. If you've got a question or want to feedback, \n please get in touch.\"\n caption=\"All content is available under the Open Government Licence v3.0, except source code and code examples which are available under the MIT Licence.\"\n >\n <ic-footer-link slot=\"link\" href=\"/\">Get Started</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Accessibility</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Styles</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Components</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Patterns</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Design toolkit</ic-footer-link>\n <div\n slot=\"logo\"\n style=\"width:100px;height:100px;display:flex;align-items:center;justify-content:center;\n background-color:var(--ic-personality-primary);color:var(--ic-personality-text);\"\n >\n Logo\n </div>\n </ic-footer>`\n );\n\n await page.waitForChanges();\n\n const pageHeaderPosition = await page.evaluate(() => {\n const pageHeader = document.querySelector(\"ic-page-header\");\n\n return window.getComputedStyle(pageHeader).position;\n });\n\n expect(pageHeaderPosition).toBe(\"sticky\");\n\n const pageHeaderTopValue = await page.evaluate(() => {\n const pageHeader = document.querySelector(\"ic-page-header\");\n window.scrollTo({ top: 700 });\n\n return pageHeader.offsetTop;\n });\n\n expect(pageHeaderTopValue).toEqual(700);\n });\n\n it(\"should not stay at the top of the page on extra small to medium device sizes if the sticky-desktop-only variant is used\", async () => {\n const page = await newE2EPage();\n\n await page.setViewport({\n width: 375,\n height: 667,\n isMobile: true,\n hasTouch: true,\n });\n\n await page.waitForChanges();\n\n await page.setContent(\n `<ic-top-navigation app-title=\"ApplicationName\">\n <svg\n slot=\"app-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#000000\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z\"\n />\n </svg>\n </ic-top-navigation>\n <ic-page-header\n sticky-desktop-only\n heading=\"Page header\"\n sub-heading=\"This is a simple page header component and this is the text. This page header is only sticky for viewport widths of 992px and above.\"\n >\n <ic-status-tag slot=\"heading-adornment\" label=\"Beta\"></ic-status-tag>\n </ic-page-header>\n <ic-section-container style=\"height:1000px\">\n This is an example of how the sticky-desktop-only variant of the page\n header would work with some content and the footer.\n </ic-section-container>\n <ic-footer\n description=\"The ICDS is maintained by the Design Practice Team. If you've got a question or want to feedback, \n please get in touch.\"\n caption=\"All content is available under the Open Government Licence v3.0, except source code and code examples which are available under the MIT Licence.\"\n >\n <ic-footer-link slot=\"link\" href=\"/\">Get Started</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Accessibility</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Styles</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Components</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Patterns</ic-footer-link>\n <ic-footer-link slot=\"link\" href=\"/\">Design toolkit</ic-footer-link>\n <div\n slot=\"logo\"\n style=\"width:100px;height:100px;display:flex;align-items:center;justify-content:center;\n background-color:var(--ic-personality-primary);color:var(--ic-personality-text);\"\n >\n Logo\n </div>\n </ic-footer>`\n );\n\n await page.waitForChanges();\n\n let pageHeaderPosition = await page.evaluate(() => {\n const pageHeader = document.querySelector(\"ic-page-header\");\n return window.getComputedStyle(pageHeader).position;\n });\n\n expect(pageHeaderPosition).toBe(\"static\");\n\n await page.evaluate(() => {\n window.scrollBy({ top: -700 });\n });\n\n await page.waitForChanges();\n\n await page.setViewport({\n width: 1920,\n height: 800,\n });\n\n await page.waitForChanges();\n\n pageHeaderPosition = await page.evaluate(() => {\n const pageHeader = document.querySelector(\"ic-page-header\");\n return window.getComputedStyle(pageHeader).position;\n });\n\n await page.waitForChanges();\n\n expect(pageHeaderPosition).toBe(\"sticky\");\n\n const pageHeaderTopValueOnLargeDesktops = await page.evaluate(() => {\n const pageHeader = document.querySelector(\"ic-page-header\");\n window.scrollBy({ top: 700 });\n\n return pageHeader.offsetTop;\n });\n\n expect(pageHeaderTopValueOnLargeDesktops).toEqual(700);\n });\n});\n"]}
|
@@ -46,23 +46,20 @@ export class PageHeader {
|
|
46
46
|
if (actionAreaHeight === undefined) {
|
47
47
|
actionAreaHeight = 0;
|
48
48
|
}
|
49
|
-
|
50
|
-
actionAreaHeight <= max &&
|
51
|
-
!this.areButtonsReversed) {
|
52
|
-
this.actionContent = this.actionContent.reverse();
|
53
|
-
this.actionContent.forEach((btn) => {
|
54
|
-
this.el.append(btn);
|
55
|
-
});
|
56
|
-
this.areButtonsReversed = !this.areButtonsReversed;
|
57
|
-
}
|
58
|
-
else if (((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||
|
59
|
-
this.deviceSize <= DEVICE_SIZES.S) &&
|
60
|
-
this.areButtonsReversed) {
|
49
|
+
const appendActionContent = () => {
|
61
50
|
this.actionContent = this.actionContent.reverse();
|
62
51
|
this.actionContent.forEach((btn) => {
|
63
52
|
this.el.append(btn);
|
64
53
|
});
|
65
54
|
this.areButtonsReversed = !this.areButtonsReversed;
|
55
|
+
};
|
56
|
+
if ((this.deviceSize > DEVICE_SIZES.S &&
|
57
|
+
actionAreaHeight <= max &&
|
58
|
+
!this.areButtonsReversed) ||
|
59
|
+
(((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||
|
60
|
+
this.deviceSize <= DEVICE_SIZES.S) &&
|
61
|
+
this.areButtonsReversed)) {
|
62
|
+
appendActionContent();
|
66
63
|
}
|
67
64
|
};
|
68
65
|
this.heading = undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-page-header.js","sourceRoot":"","sources":["../../../src/components/ic-page-header/ic-page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAIzE,OAAO,EACL,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;GASG;AAOH,M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;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder && isSlotUsed(this.el, \"actions\")) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav aria-label=\"navigation-landmark-page-header\">\n <ic-horizontal-scroll>\n <ul class=\"tabs-slot\">\n <slot name=\"tabs\" />\n </ul>\n </ic-horizontal-scroll>\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ic-page-header.js","sourceRoot":"","sources":["../../../src/components/ic-page-header/ic-page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAIzE,OAAO,EACL,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;GASG;AAOH,MAAM,OAAO,UAAU;;IAyCb,mBAAc,GAAmB,IAAI,CAAC;IAEtC,2BAAsB,GAAG,GAAG,EAAE;MACpC,IAAI,IAAI,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE;QACvD,IAAI,CAAC,iBAAiB,EAAE,CAAC;OAC1B;IACH,CAAC,CAAC;IAEM,sBAAiB,GAAG,GAAG,EAAE;MAC/B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE;QAC5C,IAAI,CAAC,sBAAsB,EAAE,CAAC;MAChC,CAAC,CAAC,CAAC;MACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC,CAAC;IAEM,sBAAiB,GAAG,GAAS,EAAE;MACrC,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAC;MACxC,IAAI,QAAQ,KAAK,IAAI,CAAC,UAAU,EAAE;QAChC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;OAC5B;MAED,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,UAA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AiC;cAC/C;gBACE,UAAI,KAAK,EAAC,WAAW;kBACnB,YAAM,IAAI,EAAC,MAAM,GAAG,CACjB,CACgB,CACnB,CACP,CACG,CACP,CACoB,CAChB,CACJ,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder && isSlotUsed(this.el, \"actions\")) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n const appendActionContent = () => {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n };\n\n if (\n (this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed) ||\n (((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed)\n ) {\n appendActionContent();\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav aria-label=\"navigation-landmark-page-header\">\n <ic-horizontal-scroll>\n <ul class=\"tabs-slot\">\n <slot name=\"tabs\" />\n </ul>\n </ic-horizontal-scroll>\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"]}
|
@@ -0,0 +1,284 @@
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
2
|
+
import { PageHeader } from "./ic-page-header";
|
3
|
+
import { DEVICE_SIZES } from "../../utils/helpers";
|
4
|
+
import { mockDeviceSize } from "../../testspec.setup";
|
5
|
+
import { Button } from "../ic-button/ic-button";
|
6
|
+
import * as helpers from "../../utils/helpers";
|
7
|
+
import { BreadcrumbGroup } from "../ic-breadcrumb-group/ic-breadcrumb-group";
|
8
|
+
import { Breadcrumb } from "../ic-breadcrumb/ic-breadcrumb";
|
9
|
+
describe("simple ic-page-header renders", () => {
|
10
|
+
it("should render with a heading & sub-heading", async () => {
|
11
|
+
const page = await newSpecPage({
|
12
|
+
components: [PageHeader],
|
13
|
+
html: `<ic-page-header heading="Page header" subheading="This is a simple page header component and this is the text."></ic-page-header>`,
|
14
|
+
});
|
15
|
+
expect(page.root).toMatchSnapshot("should render with a heading & sub-heading");
|
16
|
+
});
|
17
|
+
it("should return null for slot 'tabs'", async () => {
|
18
|
+
expect(helpers.getSlot(undefined, "tabs")).toBeNull();
|
19
|
+
});
|
20
|
+
});
|
21
|
+
describe("ic-page-header component renders additional functionality", () => {
|
22
|
+
it("should render actions", async () => {
|
23
|
+
const page = await newSpecPage({
|
24
|
+
components: [PageHeader],
|
25
|
+
html: `
|
26
|
+
<ic-page-header
|
27
|
+
heading="Page header"
|
28
|
+
subheading="This is a simple page header component and this is the text."
|
29
|
+
>
|
30
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
31
|
+
<ic-button slot="actions" variant="primary"
|
32
|
+
>Create coffee
|
33
|
+
<svg
|
34
|
+
slot="icon"
|
35
|
+
width="24"
|
36
|
+
height="24"
|
37
|
+
viewBox="0 0 24 24"
|
38
|
+
fill="none"
|
39
|
+
xmlns="http://www.w3.org/2000/svg"
|
40
|
+
>
|
41
|
+
<path
|
42
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
43
|
+
fill="currentColor"
|
44
|
+
/>
|
45
|
+
</svg>
|
46
|
+
</ic-button>
|
47
|
+
</ic-page-header>`,
|
48
|
+
});
|
49
|
+
expect(page.root).toMatchSnapshot("should render actions");
|
50
|
+
});
|
51
|
+
it("should render an input field", async () => {
|
52
|
+
const page = await newSpecPage({
|
53
|
+
components: [PageHeader],
|
54
|
+
html: `
|
55
|
+
<ic-page-header
|
56
|
+
heading="Page header"
|
57
|
+
subheading="This is a simple page header component and this is the text."
|
58
|
+
>
|
59
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
60
|
+
<ic-text-field slot="input" placeholder="Enter your input" hide-label />
|
61
|
+
</ic-page-header>`,
|
62
|
+
});
|
63
|
+
expect(page.root).toMatchSnapshot("should render an input field");
|
64
|
+
});
|
65
|
+
it("should render a stepper", async () => {
|
66
|
+
const page = await newSpecPage({
|
67
|
+
components: [PageHeader],
|
68
|
+
html: `
|
69
|
+
<ic-page-header heading="Create a coffee">
|
70
|
+
<ic-stepper slot="stepper">
|
71
|
+
<ic-step step-title="Warm kettle" step-type="completed"></ic-step>
|
72
|
+
<ic-step
|
73
|
+
step-title="Warm milk"
|
74
|
+
step-subtitle="Optional"
|
75
|
+
step-type="completed"
|
76
|
+
></ic-step>
|
77
|
+
<ic-step step-title="Pour milk" step-type="current"></ic-step>
|
78
|
+
</ic-stepper>
|
79
|
+
</ic-page-header>`,
|
80
|
+
});
|
81
|
+
expect(page.root).toMatchSnapshot("should render a stepper");
|
82
|
+
});
|
83
|
+
it("should render tabs", async () => {
|
84
|
+
const page = await newSpecPage({
|
85
|
+
components: [PageHeader],
|
86
|
+
html: `
|
87
|
+
<ic-page-header heading="Coffee recipes" subheading="This is a simple page header component and this is the text.">
|
88
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
89
|
+
<ic-navigation-item
|
90
|
+
slot="tabs"
|
91
|
+
label="All recipes"
|
92
|
+
href="/all-recipes"
|
93
|
+
selected
|
94
|
+
></ic-navigation-item>
|
95
|
+
<ic-navigation-item
|
96
|
+
slot="tabs"
|
97
|
+
label="Favourites"
|
98
|
+
href="/favourites"
|
99
|
+
></ic-navigation-item>
|
100
|
+
</ic-page-header>`,
|
101
|
+
});
|
102
|
+
expect(page.root).toMatchSnapshot("should render tabs");
|
103
|
+
});
|
104
|
+
it("should render actions, input & tabs", async () => {
|
105
|
+
const page = await newSpecPage({
|
106
|
+
components: [PageHeader],
|
107
|
+
html: `
|
108
|
+
<ic-page-header heading="Coffee recipes" subheading="This is a simple page header component and this is the text.">
|
109
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
110
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
111
|
+
<ic-button slot="actions" variant="primary"
|
112
|
+
>Create coffee
|
113
|
+
<svg
|
114
|
+
slot="icon"
|
115
|
+
width="24"
|
116
|
+
height="24"
|
117
|
+
viewBox="0 0 24 24"
|
118
|
+
fill="none"
|
119
|
+
xmlns="http://www.w3.org/2000/svg"
|
120
|
+
>
|
121
|
+
<path
|
122
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
123
|
+
fill="currentColor"
|
124
|
+
/>
|
125
|
+
</svg>
|
126
|
+
</ic-button>
|
127
|
+
<ic-navigation-item
|
128
|
+
slot="tabs"
|
129
|
+
label="All recipes"
|
130
|
+
href="/all-recipes"
|
131
|
+
selected
|
132
|
+
></ic-navigation-item>
|
133
|
+
<ic-navigation-item
|
134
|
+
slot="tabs"
|
135
|
+
label="Favourites"
|
136
|
+
href="/favourites"
|
137
|
+
></ic-navigation-item>
|
138
|
+
<ic-text-field slot="input" placeholder="Enter your input" hide-label />
|
139
|
+
</ic-page-header>`,
|
140
|
+
});
|
141
|
+
expect(page.root).toMatchSnapshot("should render actions, input & tabs");
|
142
|
+
});
|
143
|
+
it("should render actions, input & stepper", async () => {
|
144
|
+
const page = await newSpecPage({
|
145
|
+
components: [PageHeader],
|
146
|
+
html: `
|
147
|
+
<ic-page-header heading="Coffee recipes" subheading="This is a simple page header component and this is the text.">
|
148
|
+
<ic-stepper slot="stepper">
|
149
|
+
<ic-step step-title="Warm kettle" step-type="completed"></ic-step>
|
150
|
+
<ic-step
|
151
|
+
step-title="Warm milk"
|
152
|
+
step-subtitle="Optional"
|
153
|
+
step-type="completed"
|
154
|
+
></ic-step>
|
155
|
+
<ic-step step-title="Pour milk" step-type="current"></ic-step>
|
156
|
+
</ic-stepper>
|
157
|
+
<ic-status-tag slot="heading-adornment" label="Beta"></ic-status-tag>
|
158
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
159
|
+
<ic-button slot="actions" variant="primary"
|
160
|
+
>Create coffee
|
161
|
+
<svg
|
162
|
+
slot="icon"
|
163
|
+
width="24"
|
164
|
+
height="24"
|
165
|
+
viewBox="0 0 24 24"
|
166
|
+
fill="none"
|
167
|
+
xmlns="http://www.w3.org/2000/svg"
|
168
|
+
>
|
169
|
+
<path
|
170
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
171
|
+
fill="currentColor"
|
172
|
+
/>
|
173
|
+
</svg>
|
174
|
+
</ic-button>
|
175
|
+
<ic-text-field slot="input" placeholder="Enter your input" hide-label />
|
176
|
+
</ic-page-header>`,
|
177
|
+
});
|
178
|
+
expect(page.root).toMatchSnapshot("should render actions, input & stepper");
|
179
|
+
});
|
180
|
+
it("should render with breadcrumbs", async () => {
|
181
|
+
const page = await newSpecPage({
|
182
|
+
components: [PageHeader, BreadcrumbGroup, Breadcrumb],
|
183
|
+
html: `
|
184
|
+
<ic-page-header heading="Coffee recipes" subheading="This is a simple page header component and this is the text.">
|
185
|
+
<ic-breadcrumb-group slot="breadcrumbs">
|
186
|
+
<ic-breadcrumb
|
187
|
+
page-title="Breadcrumb 1"
|
188
|
+
href="/breadcrumb-1"
|
189
|
+
></ic-breadcrumb>
|
190
|
+
<ic-breadcrumb
|
191
|
+
current="true"
|
192
|
+
page-title="Breadcrumb 2"
|
193
|
+
href="/breadcrumb-2"
|
194
|
+
></ic-breadcrumb>
|
195
|
+
</ic-breadcrumb-group>
|
196
|
+
</ic-page-header>`,
|
197
|
+
});
|
198
|
+
expect(page.root).toMatchSnapshot("should render with breadcrumbs");
|
199
|
+
});
|
200
|
+
});
|
201
|
+
describe("resizeObserver for ic-page-header", () => {
|
202
|
+
it("should set the deviceSize prop correctly in resizeObserver", async () => {
|
203
|
+
const page = await newSpecPage({
|
204
|
+
components: [PageHeader, Button],
|
205
|
+
html: `
|
206
|
+
<ic-page-header
|
207
|
+
heading="Page header"
|
208
|
+
sub-heading="This is a page header component with additional functionality and this is the text."
|
209
|
+
reverse-order
|
210
|
+
>
|
211
|
+
<ic-button slot="actions" variant="primary"
|
212
|
+
>Create coffee
|
213
|
+
<svg
|
214
|
+
slot="icon"
|
215
|
+
width="24"
|
216
|
+
height="24"
|
217
|
+
viewBox="0 0 24 24"
|
218
|
+
fill="none"
|
219
|
+
xmlns="http://www.w3.org/2000/svg"
|
220
|
+
>
|
221
|
+
<path
|
222
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
223
|
+
fill="currentColor"
|
224
|
+
/>
|
225
|
+
</svg>
|
226
|
+
</ic-button>
|
227
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
228
|
+
</ic-page-header>
|
229
|
+
`,
|
230
|
+
});
|
231
|
+
await page.waitForChanges();
|
232
|
+
page.rootInstance.areButtonsReversed = true;
|
233
|
+
await page.waitForChanges();
|
234
|
+
mockDeviceSize(DEVICE_SIZES.S);
|
235
|
+
await page.rootInstance.resizeObserverCallback();
|
236
|
+
await page.waitForChanges();
|
237
|
+
expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.S);
|
238
|
+
mockDeviceSize(DEVICE_SIZES.M);
|
239
|
+
await page.rootInstance.resizeObserverCallback();
|
240
|
+
await page.waitForChanges();
|
241
|
+
expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.M);
|
242
|
+
mockDeviceSize(DEVICE_SIZES.L);
|
243
|
+
await page.rootInstance.resizeObserverCallback();
|
244
|
+
await page.waitForChanges();
|
245
|
+
expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.L);
|
246
|
+
mockDeviceSize(DEVICE_SIZES.XL);
|
247
|
+
await page.rootInstance.resizeObserverCallback();
|
248
|
+
await page.waitForChanges();
|
249
|
+
expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.XL);
|
250
|
+
});
|
251
|
+
it("shouldn't call the resizeObserver if the resizeObserver is null", async () => {
|
252
|
+
const page = await newSpecPage({
|
253
|
+
components: [PageHeader, Button],
|
254
|
+
html: `
|
255
|
+
<ic-page-header
|
256
|
+
heading="Page header"
|
257
|
+
sub-heading="This is a page header component with additional functionality and this is the text."
|
258
|
+
reverse-order
|
259
|
+
>
|
260
|
+
<ic-button slot="actions" variant="primary"
|
261
|
+
>Create coffee
|
262
|
+
<svg
|
263
|
+
slot="icon"
|
264
|
+
width="24"
|
265
|
+
height="24"
|
266
|
+
viewBox="0 0 24 24"
|
267
|
+
fill="none"
|
268
|
+
xmlns="http://www.w3.org/2000/svg"
|
269
|
+
>
|
270
|
+
<path
|
271
|
+
d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"
|
272
|
+
fill="currentColor"
|
273
|
+
/>
|
274
|
+
</svg>
|
275
|
+
</ic-button>
|
276
|
+
<ic-button slot="actions" variant="tertiary">Filter coffee</ic-button>
|
277
|
+
</ic-page-header>
|
278
|
+
`,
|
279
|
+
});
|
280
|
+
await page.rootInstance.runResizeObserver();
|
281
|
+
page.setContent("");
|
282
|
+
});
|
283
|
+
});
|
284
|
+
//# sourceMappingURL=ic-page-header.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ic-page-header.spec.js","sourceRoot":"","sources":["../../../src/components/ic-page-header/ic-page-header.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;EAC7C,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;IAC1D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,mIAAmI;KAC1I,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAC/B,4CAA4C,CAC7C,CAAC;EACJ,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;IAClD,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM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AC7D,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;IAC/E,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;MAChC,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;KAwBP;KACA,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;IAE5C,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;EACtB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from \"@stencil/core/testing\";\nimport { PageHeader } from \"./ic-page-header\";\nimport { DEVICE_SIZES } from \"../../utils/helpers\";\nimport { mockDeviceSize } from \"../../testspec.setup\";\nimport { Button } from \"../ic-button/ic-button\";\nimport * as helpers from \"../../utils/helpers\";\nimport { BreadcrumbGroup } from \"../ic-breadcrumb-group/ic-breadcrumb-group\";\nimport { Breadcrumb } from \"../ic-breadcrumb/ic-breadcrumb\";\n\ndescribe(\"simple ic-page-header renders\", () => {\n it(\"should render with a heading & sub-heading\", async () => {\n const page = await newSpecPage({\n components: [PageHeader],\n html: `<ic-page-header heading=\"Page header\" subheading=\"This is a simple page header component and this is the text.\"></ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"should render with a heading & sub-heading\"\n );\n });\n\n it(\"should return null for slot 'tabs'\", async () => {\n expect(helpers.getSlot(undefined, \"tabs\")).toBeNull();\n });\n});\n\ndescribe(\"ic-page-header component renders additional functionality\", () => {\n it(\"should render actions\", async () => {\n const page = await newSpecPage({\n components: [PageHeader],\n html: `\n <ic-page-header\n heading=\"Page header\"\n subheading=\"This is a simple page header component and this is the text.\"\n >\n <ic-button slot=\"actions\" variant=\"tertiary\">Filter coffee</ic-button>\n <ic-button slot=\"actions\" variant=\"primary\"\n >Create coffee\n <svg\n slot=\"icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-button>\n </ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render actions\");\n });\n\n it(\"should render an input field\", async () => {\n const page = await newSpecPage({\n components: [PageHeader],\n html: `\n <ic-page-header\n heading=\"Page header\"\n subheading=\"This is a simple page header component and this is the text.\"\n >\n <ic-status-tag slot=\"heading-adornment\" label=\"Beta\"></ic-status-tag>\n <ic-text-field slot=\"input\" placeholder=\"Enter your input\" hide-label />\n </ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render an input field\");\n });\n\n it(\"should render a stepper\", async () => {\n const page = await newSpecPage({\n components: [PageHeader],\n html: `\n <ic-page-header heading=\"Create a coffee\">\n <ic-stepper slot=\"stepper\">\n <ic-step step-title=\"Warm kettle\" step-type=\"completed\"></ic-step>\n <ic-step\n step-title=\"Warm milk\"\n step-subtitle=\"Optional\"\n step-type=\"completed\"\n ></ic-step>\n <ic-step step-title=\"Pour milk\" step-type=\"current\"></ic-step>\n </ic-stepper>\n </ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render a stepper\");\n });\n\n it(\"should render tabs\", async () => {\n const page = await newSpecPage({\n components: [PageHeader],\n html: `\n <ic-page-header heading=\"Coffee recipes\" subheading=\"This is a simple page header component and this is the text.\">\n <ic-status-tag slot=\"heading-adornment\" label=\"Beta\"></ic-status-tag>\n <ic-navigation-item\n slot=\"tabs\"\n label=\"All recipes\"\n href=\"/all-recipes\"\n selected\n ></ic-navigation-item>\n <ic-navigation-item\n slot=\"tabs\"\n label=\"Favourites\"\n href=\"/favourites\"\n ></ic-navigation-item>\n </ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render tabs\");\n });\n\n it(\"should render actions, input & tabs\", async () => {\n const page = await newSpecPage({\n components: [PageHeader],\n html: `\n <ic-page-header heading=\"Coffee recipes\" subheading=\"This is a simple page header component and this is the text.\">\n <ic-status-tag slot=\"heading-adornment\" label=\"Beta\"></ic-status-tag>\n <ic-button slot=\"actions\" variant=\"tertiary\">Filter coffee</ic-button>\n <ic-button slot=\"actions\" variant=\"primary\"\n >Create coffee\n <svg\n slot=\"icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-button>\n <ic-navigation-item\n slot=\"tabs\"\n label=\"All recipes\"\n href=\"/all-recipes\"\n selected\n ></ic-navigation-item>\n <ic-navigation-item\n slot=\"tabs\"\n label=\"Favourites\"\n href=\"/favourites\"\n ></ic-navigation-item>\n <ic-text-field slot=\"input\" placeholder=\"Enter your input\" hide-label />\n </ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render actions, input & tabs\");\n });\n\n it(\"should render actions, input & stepper\", async () => {\n const page = await newSpecPage({\n components: [PageHeader],\n html: `\n <ic-page-header heading=\"Coffee recipes\" subheading=\"This is a simple page header component and this is the text.\">\n <ic-stepper slot=\"stepper\">\n <ic-step step-title=\"Warm kettle\" step-type=\"completed\"></ic-step>\n <ic-step\n step-title=\"Warm milk\"\n step-subtitle=\"Optional\"\n step-type=\"completed\"\n ></ic-step>\n <ic-step step-title=\"Pour milk\" step-type=\"current\"></ic-step>\n </ic-stepper>\n <ic-status-tag slot=\"heading-adornment\" label=\"Beta\"></ic-status-tag>\n <ic-button slot=\"actions\" variant=\"tertiary\">Filter coffee</ic-button>\n <ic-button slot=\"actions\" variant=\"primary\"\n >Create coffee\n <svg\n slot=\"icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-button>\n <ic-text-field slot=\"input\" placeholder=\"Enter your input\" hide-label />\n </ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render actions, input & stepper\");\n });\n\n it(\"should render with breadcrumbs\", async () => {\n const page = await newSpecPage({\n components: [PageHeader, BreadcrumbGroup, Breadcrumb],\n html: `\n <ic-page-header heading=\"Coffee recipes\" subheading=\"This is a simple page header component and this is the text.\">\n <ic-breadcrumb-group slot=\"breadcrumbs\">\n <ic-breadcrumb\n page-title=\"Breadcrumb 1\"\n href=\"/breadcrumb-1\"\n ></ic-breadcrumb>\n <ic-breadcrumb\n current=\"true\"\n page-title=\"Breadcrumb 2\"\n href=\"/breadcrumb-2\"\n ></ic-breadcrumb>\n </ic-breadcrumb-group> \n </ic-page-header>`,\n });\n\n expect(page.root).toMatchSnapshot(\"should render with breadcrumbs\");\n });\n});\n\ndescribe(\"resizeObserver for ic-page-header\", () => {\n it(\"should set the deviceSize prop correctly in resizeObserver\", async () => {\n const page = await newSpecPage({\n components: [PageHeader, Button],\n html: `\n <ic-page-header\n heading=\"Page header\"\n sub-heading=\"This is a page header component with additional functionality and this is the text.\"\n reverse-order\n >\n <ic-button slot=\"actions\" variant=\"primary\"\n >Create coffee\n <svg\n slot=\"icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-button>\n <ic-button slot=\"actions\" variant=\"tertiary\">Filter coffee</ic-button>\n </ic-page-header>\n `,\n });\n\n await page.waitForChanges();\n\n page.rootInstance.areButtonsReversed = true;\n await page.waitForChanges();\n\n mockDeviceSize(DEVICE_SIZES.S);\n\n await page.rootInstance.resizeObserverCallback();\n await page.waitForChanges();\n\n expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.S);\n\n mockDeviceSize(DEVICE_SIZES.M);\n\n await page.rootInstance.resizeObserverCallback();\n await page.waitForChanges();\n expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.M);\n\n mockDeviceSize(DEVICE_SIZES.L);\n\n await page.rootInstance.resizeObserverCallback();\n await page.waitForChanges();\n expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.L);\n\n mockDeviceSize(DEVICE_SIZES.XL);\n\n await page.rootInstance.resizeObserverCallback();\n await page.waitForChanges();\n expect(page.rootInstance.deviceSize).toBe(DEVICE_SIZES.XL);\n });\n\n it(\"shouldn't call the resizeObserver if the resizeObserver is null\", async () => {\n const page = await newSpecPage({\n components: [PageHeader, Button],\n html: `\n <ic-page-header\n heading=\"Page header\"\n sub-heading=\"This is a page header component with additional functionality and this is the text.\"\n reverse-order\n >\n <ic-button slot=\"actions\" variant=\"primary\"\n >Create coffee\n <svg\n slot=\"icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-button>\n <ic-button slot=\"actions\" variant=\"tertiary\">Filter coffee</ic-button>\n </ic-page-header>\n `,\n });\n\n await page.rootInstance.runResizeObserver();\n\n page.setContent(\"\");\n });\n});\n"]}
|
@@ -0,0 +1,128 @@
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
2
|
+
describe("ic-pagination", () => {
|
3
|
+
it("should emit the correct page value when `page 2` is clicked", async () => {
|
4
|
+
const page = await newE2EPage();
|
5
|
+
await page.setContent(`<ic-pagination pages="15"
|
6
|
+
type="complex"
|
7
|
+
adjacent-count="1"
|
8
|
+
boundary-count="1" />`);
|
9
|
+
const pagItem = await page.find("ic-pagination >>> #pagination-item-2");
|
10
|
+
const icPageChange = await page.spyOnEvent("icPageChange");
|
11
|
+
await page.waitForChanges();
|
12
|
+
await pagItem.click();
|
13
|
+
await page.waitForChanges();
|
14
|
+
expect(icPageChange).toHaveReceivedEventDetail({ value: 2 });
|
15
|
+
});
|
16
|
+
it("should emit the correct page value when `next page` is clicked", async () => {
|
17
|
+
const page = await newE2EPage();
|
18
|
+
await page.setContent(`<ic-pagination pages="15"
|
19
|
+
type="complex"
|
20
|
+
adjacent-count="1"
|
21
|
+
boundary-count="1" />`);
|
22
|
+
const nextPage = await page.find("ic-pagination >>> #next-page-button");
|
23
|
+
const icPageChange = await page.spyOnEvent("icPageChange");
|
24
|
+
await page.waitForChanges();
|
25
|
+
await nextPage.click();
|
26
|
+
await page.waitForChanges();
|
27
|
+
expect(icPageChange).toHaveReceivedEventDetail({ value: 2 });
|
28
|
+
});
|
29
|
+
it("should emit the correct page value when `page 13` is clicked", async () => {
|
30
|
+
const page = await newE2EPage();
|
31
|
+
await page.setContent(`<ic-pagination pages="15"
|
32
|
+
type="complex"
|
33
|
+
adjacent-count="1"
|
34
|
+
boundary-count="1" />`);
|
35
|
+
const lastPage = await page.find("ic-pagination >>> #last-page-button");
|
36
|
+
const icPageChange = await page.spyOnEvent("icPageChange");
|
37
|
+
await page.waitForChanges();
|
38
|
+
await lastPage.click();
|
39
|
+
await page.waitForChanges();
|
40
|
+
const pagItem = await page.find("ic-pagination >>> #pagination-item-13");
|
41
|
+
await page.waitForChanges();
|
42
|
+
await pagItem.click();
|
43
|
+
await page.waitForChanges();
|
44
|
+
expect(icPageChange).toHaveReceivedEventDetail({ value: 13 });
|
45
|
+
});
|
46
|
+
it("should emit the correct page value when the `previous page` button is clicked", async () => {
|
47
|
+
const page = await newE2EPage();
|
48
|
+
await page.setContent(`<ic-pagination pages="15"
|
49
|
+
type="complex"
|
50
|
+
adjacent-count="1"
|
51
|
+
boundary-count="1" />`);
|
52
|
+
const lastPage = await page.find("ic-pagination >>> #last-page-button");
|
53
|
+
const icPageChange = await page.spyOnEvent("icPageChange");
|
54
|
+
await page.waitForChanges();
|
55
|
+
await lastPage.click();
|
56
|
+
await page.waitForChanges();
|
57
|
+
const previousPage = await page.find("ic-pagination >>> #previous-page-button");
|
58
|
+
await page.waitForChanges();
|
59
|
+
await previousPage.click();
|
60
|
+
await page.waitForChanges();
|
61
|
+
expect(icPageChange).toHaveReceivedEventDetail({ value: 14 });
|
62
|
+
});
|
63
|
+
it("should emit the correct page value when the `first page` button is clicked", async () => {
|
64
|
+
const page = await newE2EPage();
|
65
|
+
await page.setContent(`<ic-pagination pages="15"
|
66
|
+
type="complex"
|
67
|
+
adjacent-count="1"
|
68
|
+
boundary-count="1" />`);
|
69
|
+
const lastPage = await page.find("ic-pagination >>> #last-page-button");
|
70
|
+
const icPageChange = await page.spyOnEvent("icPageChange");
|
71
|
+
await page.waitForChanges();
|
72
|
+
await lastPage.click();
|
73
|
+
await page.waitForChanges();
|
74
|
+
const previousPage = await page.find("ic-pagination >>> #first-page-button");
|
75
|
+
await page.waitForChanges();
|
76
|
+
await previousPage.click();
|
77
|
+
await page.waitForChanges();
|
78
|
+
expect(icPageChange).toHaveReceivedEventDetail({ value: 1 });
|
79
|
+
});
|
80
|
+
it("should emit the correct page value when the midddle state is reached and the adjacent-count `page 7` button is clicked", async () => {
|
81
|
+
const page = await newE2EPage();
|
82
|
+
await page.setContent(`<ic-pagination pages="15"
|
83
|
+
type="complex"
|
84
|
+
adjacent-count="1"
|
85
|
+
boundary-count="1" />`);
|
86
|
+
const nextPage = await page.find("ic-pagination >>> #next-page-button");
|
87
|
+
const icPageChange = await page.spyOnEvent("icPageChange");
|
88
|
+
await page.waitForChanges();
|
89
|
+
await nextPage.click();
|
90
|
+
await page.waitForChanges();
|
91
|
+
await nextPage.click();
|
92
|
+
await page.waitForChanges();
|
93
|
+
await nextPage.click();
|
94
|
+
await page.waitForChanges();
|
95
|
+
await nextPage.click();
|
96
|
+
await page.waitForChanges();
|
97
|
+
await nextPage.click();
|
98
|
+
await page.waitForChanges();
|
99
|
+
const pagItem = await page.find("ic-pagination >>> #pagination-item-7");
|
100
|
+
await page.waitForChanges();
|
101
|
+
await pagItem.click();
|
102
|
+
await page.waitForChanges();
|
103
|
+
expect(icPageChange).toHaveReceivedEventDetail({ value: 7 });
|
104
|
+
});
|
105
|
+
it("should return false when the midddle state is reached and the adjacent-count `page 8` (out of bounds) button is clicked", async () => {
|
106
|
+
const page = await newE2EPage();
|
107
|
+
await page.setContent(`<ic-pagination pages="15"
|
108
|
+
type="complex"
|
109
|
+
adjacent-count="1"
|
110
|
+
boundary-count="1" />`);
|
111
|
+
const nextPage = await page.find("ic-pagination >>> #next-page-button");
|
112
|
+
await page.waitForChanges();
|
113
|
+
await nextPage.click();
|
114
|
+
await page.waitForChanges();
|
115
|
+
await nextPage.click();
|
116
|
+
await page.waitForChanges();
|
117
|
+
await nextPage.click();
|
118
|
+
await page.waitForChanges();
|
119
|
+
await nextPage.click();
|
120
|
+
await page.waitForChanges();
|
121
|
+
await nextPage.click();
|
122
|
+
await page.waitForChanges();
|
123
|
+
const pagItem = await page.find("ic-pagination >>> #pagination-item-8");
|
124
|
+
await page.waitForChanges();
|
125
|
+
expect(pagItem).toBe(null);
|
126
|
+
});
|
127
|
+
});
|
128
|
+
//# sourceMappingURL=ic-pagination.e2e.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ic-pagination.e2e.js","sourceRoot":"","sources":["../../../src/components/ic-pagination/ic-pagination.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;EAC7B,EAAE,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;IAC3E,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAEhC,MAAM,IAAI,CAAC,UAAU,CAAC;;;0BAGA,CAAC,CAAC;IAExB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,sCAAs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K,EAAE,CAAC;IACvB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IAExE,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from \"@stencil/core/testing\";\n\ndescribe(\"ic-pagination\", () => {\n it(\"should emit the correct page value when `page 2` is clicked\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(`<ic-pagination pages=\"15\"\n type=\"complex\"\n adjacent-count=\"1\"\n boundary-count=\"1\" />`);\n\n const pagItem = await page.find(\"ic-pagination >>> #pagination-item-2\");\n\n const icPageChange = await page.spyOnEvent(\"icPageChange\");\n\n await page.waitForChanges();\n\n await pagItem.click();\n\n await page.waitForChanges();\n\n expect(icPageChange).toHaveReceivedEventDetail({ value: 2 });\n });\n it(\"should emit the correct page value when `next page` is clicked\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(`<ic-pagination pages=\"15\"\n type=\"complex\"\n adjacent-count=\"1\"\n boundary-count=\"1\" />`);\n\n const nextPage = await page.find(\"ic-pagination >>> #next-page-button\");\n\n const icPageChange = await page.spyOnEvent(\"icPageChange\");\n\n await page.waitForChanges();\n\n await nextPage.click();\n\n await page.waitForChanges();\n\n expect(icPageChange).toHaveReceivedEventDetail({ value: 2 });\n });\n it(\"should emit the correct page value when `page 13` is clicked\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(`<ic-pagination pages=\"15\"\n type=\"complex\"\n adjacent-count=\"1\"\n boundary-count=\"1\" />`);\n\n const lastPage = await page.find(\"ic-pagination >>> #last-page-button\");\n\n const icPageChange = await page.spyOnEvent(\"icPageChange\");\n\n await page.waitForChanges();\n\n await lastPage.click();\n\n await page.waitForChanges();\n\n const pagItem = await page.find(\"ic-pagination >>> #pagination-item-13\");\n\n await page.waitForChanges();\n\n await pagItem.click();\n\n await page.waitForChanges();\n\n expect(icPageChange).toHaveReceivedEventDetail({ value: 13 });\n });\n it(\"should emit the correct page value when the `previous page` button is clicked\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(`<ic-pagination pages=\"15\"\n type=\"complex\"\n adjacent-count=\"1\"\n boundary-count=\"1\" />`);\n\n const lastPage = await page.find(\"ic-pagination >>> #last-page-button\");\n\n const icPageChange = await page.spyOnEvent(\"icPageChange\");\n\n await page.waitForChanges();\n\n await lastPage.click();\n\n await page.waitForChanges();\n\n const previousPage = await page.find(\n \"ic-pagination >>> #previous-page-button\"\n );\n\n await page.waitForChanges();\n\n await previousPage.click();\n\n await page.waitForChanges();\n\n expect(icPageChange).toHaveReceivedEventDetail({ value: 14 });\n });\n it(\"should emit the correct page value when the `first page` button is clicked\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(`<ic-pagination pages=\"15\"\n type=\"complex\"\n adjacent-count=\"1\"\n boundary-count=\"1\" />`);\n\n const lastPage = await page.find(\"ic-pagination >>> #last-page-button\");\n\n const icPageChange = await page.spyOnEvent(\"icPageChange\");\n\n await page.waitForChanges();\n\n await lastPage.click();\n\n await page.waitForChanges();\n\n const previousPage = await page.find(\n \"ic-pagination >>> #first-page-button\"\n );\n\n await page.waitForChanges();\n\n await previousPage.click();\n\n await page.waitForChanges();\n\n expect(icPageChange).toHaveReceivedEventDetail({ value: 1 });\n });\n it(\"should emit the correct page value when the midddle state is reached and the adjacent-count `page 7` button is clicked\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(`<ic-pagination pages=\"15\"\n type=\"complex\"\n adjacent-count=\"1\"\n boundary-count=\"1\" />`);\n\n const nextPage = await page.find(\"ic-pagination >>> #next-page-button\");\n\n const icPageChange = await page.spyOnEvent(\"icPageChange\");\n\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n\n const pagItem = await page.find(\"ic-pagination >>> #pagination-item-7\");\n\n await page.waitForChanges();\n\n await pagItem.click();\n\n await page.waitForChanges();\n\n expect(icPageChange).toHaveReceivedEventDetail({ value: 7 });\n });\n it(\"should return false when the midddle state is reached and the adjacent-count `page 8` (out of bounds) button is clicked\", async () => {\n const page = await newE2EPage();\n\n await page.setContent(`<ic-pagination pages=\"15\"\n type=\"complex\"\n adjacent-count=\"1\"\n boundary-count=\"1\" />`);\n\n const nextPage = await page.find(\"ic-pagination >>> #next-page-button\");\n\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n await nextPage.click();\n await page.waitForChanges();\n\n const pagItem = await page.find(\"ic-pagination >>> #pagination-item-8\");\n\n await page.waitForChanges();\n\n expect(pagItem).toBe(null);\n });\n});\n"]}
|