@ukic/web-components 2.1.0-beta.8 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/OpenInNew-f9958725.js +7 -0
- package/dist/cjs/OpenInNew-f9958725.js.map +1 -0
- package/dist/cjs/chevron-icon-2bb3a907.js +10 -0
- package/dist/cjs/chevron-icon-2bb3a907.js.map +1 -0
- package/dist/cjs/core.cjs.js +10 -3
- package/dist/cjs/core.cjs.js.map +1 -1
- package/dist/cjs/{helpers-5f391578.js → helpers-eb53c416.js} +96 -27
- package/dist/cjs/helpers-eb53c416.js.map +1 -0
- package/dist/cjs/ic-alert.cjs.entry.js +12 -35
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +6 -5
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +39 -33
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +16 -14
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +179 -104
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +46 -45
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +24 -23
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +42 -29
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +19 -15
- 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-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +38 -24
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +295 -0
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-divider.cjs.entry.js +3 -3
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +19 -18
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +24 -17
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +23 -21
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +23 -21
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +177 -0
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +300 -161
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +14 -16
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +23 -23
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +24 -0
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-menu-item.cjs.entry.js +122 -0
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-navigation-button.cjs.entry.js +20 -19
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +88 -58
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +50 -42
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +31 -37
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +25 -28
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +56 -0
- package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-pagination.cjs.entry.js +227 -0
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-popover-menu.cjs.entry.js +237 -0
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-radio-group.cjs.entry.js +43 -25
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +40 -38
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +181 -101
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +360 -177
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +116 -87
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +6 -6
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +10 -10
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +15 -15
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +21 -19
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +68 -32
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +10 -118
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +15 -4
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +32 -7
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +102 -72
- 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-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +48 -0
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-toast.cjs.entry.js +169 -0
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-top-navigation.cjs.entry.js +52 -48
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +97 -5
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-3ef30d9d.js → index-2a0c6769.js} +272 -44
- package/dist/cjs/index-2a0c6769.js.map +1 -0
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{popper-11d5f714.js → popper-d7adcfc6.js} +10 -17
- package/dist/cjs/popper-d7adcfc6.js.map +1 -0
- package/dist/cjs/types-3eb02246.js.map +1 -1
- package/dist/collection/assets/error-icon.svg +2 -2
- package/dist/collection/assets/info-icon.svg +2 -2
- package/dist/collection/assets/neutral-icon.svg +2 -2
- package/dist/collection/assets/pagination-first-last.svg +3 -0
- package/dist/collection/assets/pagination-next-previous.svg +3 -0
- package/dist/collection/assets/success-icon.svg +2 -2
- package/dist/collection/assets/warning-icon.svg +2 -2
- package/dist/collection/collection-manifest.json +20 -11
- package/dist/collection/components/ic-alert/ic-alert.css +1 -1
- package/dist/collection/components/ic-alert/ic-alert.js +51 -62
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-alert/{ic-alert.test.a11y.js → test/a11y/ic-alert.test.a11y.js} +1 -1
- package/dist/collection/components/ic-alert/test/a11y/ic-alert.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-alert/test/basic/ic-alert.e2e.js +16 -0
- package/dist/collection/components/ic-alert/test/basic/ic-alert.e2e.js.map +1 -0
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +182 -0
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -0
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +8 -4
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +5 -4
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/test/a11y/ic-back-to-top.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.e2e.js +68 -0
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.e2e.js.map +1 -0
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js +123 -0
- package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +19 -4
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +30 -28
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb/test/basic/ic-breadcrumb.spec.js +118 -0
- package/dist/collection/components/ic-breadcrumb/test/basic/ic-breadcrumb.spec.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +37 -31
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/{ic-breadcrumb-group.test.a11y.js → test/a11y/ic-breadcrumb-group.test.a11y.js} +1 -1
- package/dist/collection/components/ic-breadcrumb-group/test/a11y/ic-breadcrumb-group.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb-group/test/basic/ic-breadcrumb-group-test-examples.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb-group/test/basic/ic-breadcrumb-group.e2e.js +41 -0
- package/dist/collection/components/ic-breadcrumb-group/test/basic/ic-breadcrumb-group.e2e.js.map +1 -0
- package/dist/collection/components/ic-breadcrumb-group/test/basic/ic-breadcrumb-group.spec.js +181 -0
- package/dist/collection/components/ic-breadcrumb-group/test/basic/ic-breadcrumb-group.spec.js.map +1 -0
- package/dist/collection/components/ic-button/ic-button.css +23 -8
- package/dist/collection/components/ic-button/ic-button.js +270 -114
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/{ic-button.test.a11y.js → test/a11y/ic-button.test.a11y.js} +1 -1
- package/dist/collection/components/ic-button/test/a11y/ic-button.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-button/test/basic/ic-button.e2e.js +198 -0
- package/dist/collection/components/ic-button/test/basic/ic-button.e2e.js.map +1 -0
- package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +256 -0
- package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -0
- package/dist/collection/components/ic-card/ic-card.css +35 -10
- package/dist/collection/components/ic-card/ic-card.js +123 -122
- package/dist/collection/components/ic-card/ic-card.js.map +1 -1
- package/dist/collection/components/ic-card/{ic-card.test.a11y.js → test/a11y/ic-card.test.a11y.js} +1 -1
- package/dist/collection/components/ic-card/test/a11y/ic-card.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-card/test/basic/ic-card.e2e.js +23 -0
- package/dist/collection/components/ic-card/test/basic/ic-card.e2e.js.map +1 -0
- package/dist/collection/components/ic-card/test/basic/ic-card.spec.js +152 -0
- package/dist/collection/components/ic-card/test/basic/ic-card.spec.js.map +1 -0
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +11 -8
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +108 -76
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +3 -3
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +64 -67
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.types.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/{ic-checkbox-group.test.a11y.js → test/a11y/ic-checkbox-group.test.a11y.js} +1 -1
- package/dist/collection/components/ic-checkbox-group/test/a11y/ic-checkbox-group.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.e2e.js +201 -0
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.e2e.js.map +1 -0
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js +175 -0
- package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js.map +1 -0
- package/dist/collection/components/ic-chip/ic-chip.css +11 -10
- package/dist/collection/components/ic-chip/ic-chip.js +56 -52
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- package/dist/collection/components/ic-chip/{ic-chip.test.a11y.js → test/a11y/ic-chip.test.a11y.js} +1 -1
- package/dist/collection/components/ic-chip/test/a11y/ic-chip.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +110 -0
- package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +1 -0
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +4 -0
- package/dist/collection/components/ic-classification-banner/{ic-classification-banner.test.a11y.js → test/a11y/ic-classification-banner.test.a11y.js} +1 -1
- package/dist/collection/components/ic-classification-banner/test/a11y/ic-classification-banner.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-classification-banner/test/basic/ic-classification-banner.spec.js +140 -0
- package/dist/collection/components/ic-classification-banner/test/basic/ic-classification-banner.spec.js.map +1 -0
- package/dist/collection/components/ic-data-entity/ic-data-entity.css +1 -1
- package/dist/collection/components/ic-data-entity/{ic-data-entity.test.a11y.js → test/a11y/ic-data-entity.test.a11y.js} +1 -1
- package/dist/collection/components/ic-data-entity/test/a11y/ic-data-entity.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-data-entity/test/basic/ic-data-entity.spec.js +161 -0
- package/dist/collection/components/ic-data-entity/test/basic/ic-data-entity.spec.js.map +1 -0
- package/dist/collection/components/ic-data-row/ic-data-row.css +1 -1
- package/dist/collection/components/ic-data-row/ic-data-row.js +51 -37
- package/dist/collection/components/ic-data-row/ic-data-row.js.map +1 -1
- package/dist/collection/components/ic-data-row/{ic-data-row.test.a11y.js → test/a11y/ic-data-row.test.a11y.js} +1 -1
- package/dist/collection/components/ic-data-row/test/a11y/ic-data-row.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-data-row/test/basic/ic-data-row.spec.js +74 -0
- package/dist/collection/components/ic-data-row/test/basic/ic-data-row.spec.js.map +1 -0
- package/dist/collection/components/ic-dialog/ic-dialog.css +592 -0
- package/dist/collection/components/ic-dialog/ic-dialog.js +640 -0
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -0
- package/dist/collection/components/ic-dialog/test/a11y/ic-dialog.test.a11y.js +28 -0
- package/dist/collection/components/ic-dialog/test/a11y/ic-dialog.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.e2e.js +207 -0
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.e2e.js.map +1 -0
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +520 -0
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -0
- package/dist/collection/components/ic-divider/ic-divider.css +1 -1
- package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js +24 -0
- package/dist/collection/components/ic-divider/test/basic/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.js +51 -49
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-footer/{ic-footer.test.a11y.js → test/a11y/ic-footer.test.a11y.js} +1 -1
- package/dist/collection/components/ic-footer/test/a11y/ic-footer.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-footer/test/basic/ic-footer.e2e.js +50 -0
- package/dist/collection/components/ic-footer/test/basic/ic-footer.e2e.js.map +1 -0
- package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js +140 -0
- package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js.map +1 -0
- package/dist/collection/components/ic-footer-link/ic-footer-link.css +36 -4
- package/dist/collection/components/ic-footer-link/ic-footer-link.js +112 -15
- package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
- package/dist/collection/components/ic-footer-link/{ic-footer-link.test.a11y.js → test/a11y/ic-footer-link.test.a11y.js} +1 -1
- package/dist/collection/components/ic-footer-link/test/a11y/ic-footer-link.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js +62 -0
- package/dist/collection/components/ic-footer-link/test/basic/ic-footer-link.spec.js.map +1 -0
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +19 -18
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/{ic-footer-link-group.test.a11y.js → test/a11y/ic-footer-link-group.test.a11y.js} +1 -1
- package/dist/collection/components/ic-footer-link-group/test/a11y/ic-footer-link-group.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js +98 -0
- package/dist/collection/components/ic-footer-link-group/test/basic/ic-footer-link-group.spec.js.map +1 -0
- package/dist/collection/components/ic-hero/ic-hero.css +23 -22
- package/dist/collection/components/ic-hero/ic-hero.js +97 -95
- package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
- package/dist/collection/components/ic-hero/{ic-hero.test.a11y.js → test/a11y/ic-hero.test.a11y.js} +1 -1
- package/dist/collection/components/ic-hero/test/a11y/ic-hero.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js +76 -0
- package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js.map +1 -0
- package/dist/collection/components/ic-horizontal-scroll/assets/left-arrow.svg +3 -0
- package/dist/collection/components/ic-horizontal-scroll/assets/right-arrow.svg +3 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +535 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +232 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -0
- package/dist/collection/components/ic-horizontal-scroll/test/a11y/ic-horizontal-scroll.test.a11y.js +34 -0
- package/dist/collection/components/ic-horizontal-scroll/test/a11y/ic-horizontal-scroll.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js +180 -0
- package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js.map +1 -0
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +38 -9
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +45 -45
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +117 -0
- package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -0
- package/dist/collection/components/ic-input-container/test/basic/ic-input-container.spec.js +38 -0
- package/dist/collection/components/ic-input-container/test/basic/ic-input-container.spec.js.map +1 -0
- package/dist/collection/components/ic-input-label/ic-input-label.css +0 -4
- package/dist/collection/components/ic-input-label/ic-input-label.js +51 -51
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-label/test/basic/ic-input-label.spec.js +98 -0
- package/dist/collection/components/ic-input-label/test/basic/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.js +41 -41
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- package/dist/collection/components/ic-input-validation/test/basic/ic-input-validation.spec.js +89 -0
- package/dist/collection/components/ic-input-validation/test/basic/ic-input-validation.spec.js.map +1 -0
- package/dist/collection/components/ic-link/ic-link.css +16 -3
- package/dist/collection/components/ic-link/ic-link.js +56 -52
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-link/{ic-link.test.a11y.js → test/a11y/ic-link.test.a11y.js} +1 -1
- package/dist/collection/components/ic-link/test/a11y/ic-link.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +203 -0
- package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +1 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +5 -5
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +112 -101
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/{ic-loading-indicator.test.a11y.js → test/a11y/ic-loading-indicator.test.a11y.js} +1 -1
- package/dist/collection/components/ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.e2e.js +34 -0
- package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.e2e.js.map +1 -0
- package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js +141 -0
- package/dist/collection/components/ic-loading-indicator/test/basic/ic-loading-indicator.spec.js.map +1 -0
- package/dist/collection/components/ic-menu/ic-menu.css +52 -11
- package/dist/collection/components/ic-menu/ic-menu.js +521 -268
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +657 -0
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-menu-group/ic-menu-group.css +465 -0
- package/dist/collection/components/ic-menu-group/ic-menu-group.js +45 -0
- package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -0
- package/dist/collection/components/ic-menu-group/test/basic/ic-menu-group.spec.js +94 -0
- package/dist/collection/components/ic-menu-group/test/basic/ic-menu-group.spec.js.map +1 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +628 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +394 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.types.js +2 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.types.js.map +1 -0
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +108 -0
- package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +4 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +58 -57
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +84 -0
- package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +8 -11
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +102 -72
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/{ic-navigation-group.test.a11y.js → test/a11y/ic-navigation-group.test.a11y.js} +1 -1
- package/dist/collection/components/ic-navigation-group/test/a11y/ic-navigation-group.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js +309 -0
- package/dist/collection/components/ic-navigation-group/test/basic/ic-navigation-group.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +70 -20
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +181 -83
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/{ic-navigation-item.test.a11y.js → test/a11y/ic-navigation-item.test.a11y.js} +1 -1
- package/dist/collection/components/ic-navigation-item/test/a11y/ic-navigation-item.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js +118 -0
- package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js.map +1 -0
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +23 -18
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +34 -40
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.e2e.js +29 -0
- package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.e2e.js.map +1 -0
- package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.spec.js +176 -0
- package/dist/collection/components/ic-navigation-menu/test/basic/ic-navigation-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-page-header/ic-page-header.css +12 -1
- package/dist/collection/components/ic-page-header/ic-page-header.js +66 -69
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-page-header/{ic-page-header.test.a11y.js → test/a11y/ic-page-header.test.a11y.js} +1 -1
- package/dist/collection/components/ic-page-header/test/a11y/ic-page-header.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js +177 -0
- package/dist/collection/components/ic-page-header/test/basic/ic-page-header.e2e.js.map +1 -0
- package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js +284 -0
- package/dist/collection/components/ic-page-header/test/basic/ic-page-header.spec.js.map +1 -0
- package/dist/collection/components/ic-pagination/ic-pagination.css +486 -0
- package/dist/collection/components/ic-pagination/ic-pagination.js +498 -0
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -0
- package/dist/collection/components/ic-pagination/ic-pagination.types.js +2 -0
- package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +1 -0
- package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js +11 -0
- package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js +128 -0
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.e2e.js.map +1 -0
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +335 -0
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -0
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +581 -0
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +229 -0
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -0
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.types.js +2 -0
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.types.js.map +1 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +536 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +433 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -0
- package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js +13 -0
- package/dist/collection/components/ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js +30 -0
- package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js.map +1 -0
- package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js +381 -0
- package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.css +4 -4
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +104 -80
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- 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-group/{ic-radio-group.test.a11y.js → test/a11y/ic-radio-group.test.a11y.js} +1 -1
- package/dist/collection/components/ic-radio-group/test/a11y/ic-radio-group.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js +343 -0
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.e2e.js.map +1 -0
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +303 -0
- package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -0
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +6 -6
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +112 -96
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +18 -14
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +496 -299
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.types.js.map +1 -1
- package/dist/collection/components/ic-search-bar/{ic-search-bar.test.a11y.js → test/a11y/ic-search-bar.test.a11y.js} +1 -1
- package/dist/collection/components/ic-search-bar/test/a11y/ic-search-bar.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js +1099 -0
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js.map +1 -0
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +584 -0
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -0
- package/dist/collection/components/ic-section-container/ic-section-container.css +1 -0
- package/dist/collection/components/ic-section-container/test/basic/ic-section-container.spec.js +69 -0
- package/dist/collection/components/ic-section-container/test/basic/ic-section-container.spec.js.map +1 -0
- package/dist/collection/components/ic-select/ic-select.css +20 -19
- package/dist/collection/components/ic-select/ic-select.js +641 -356
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/{ic-select.test.a11y.js → test/a11y/ic-select.test.a11y.js} +1 -1
- package/dist/collection/components/ic-select/test/a11y/ic-select.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js +1768 -0
- package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js.map +1 -0
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +1296 -0
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +55 -46
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +156 -127
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/{ic-side-navigation.test.a11y.js → test/a11y/ic-side-navigation.test.a11y.js} +1 -1
- package/dist/collection/components/ic-side-navigation/test/a11y/ic-side-navigation.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-side-navigation/{ic-side-navigation-test-examples.js → test/basic/ic-side-navigation-test-examples.js} +90 -0
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation-test-examples.js.map +1 -0
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js +412 -0
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js.map +1 -0
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +470 -0
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -0
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +22 -22
- package/dist/collection/components/ic-skeleton/ic-skeleton.js.map +1 -1
- package/dist/collection/components/ic-skeleton/{ic-skeleton.test.a11y.js → test/a11y/ic-skeleton.test.a11y.js} +1 -1
- package/dist/collection/components/ic-skeleton/test/a11y/ic-skeleton.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-skeleton/test/basic/ic-skeleton.spec.js +89 -0
- package/dist/collection/components/ic-skeleton/test/basic/ic-skeleton.spec.js.map +1 -0
- package/dist/collection/components/ic-status-tag/ic-status-tag.css +10 -13
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +40 -40
- package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
- package/dist/collection/components/ic-status-tag/{ic-status-tag.test.a11y.js → test/a11y/ic-status-tag.test.a11y.js} +1 -1
- package/dist/collection/components/ic-status-tag/test/a11y/ic-status-tag.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js +43 -0
- package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js.map +1 -0
- package/dist/collection/components/ic-step/ic-step.css +6 -6
- package/dist/collection/components/ic-step/ic-step.js +127 -127
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-step/test/basic/ic-step.spec.js +176 -0
- package/dist/collection/components/ic-step/test/basic/ic-step.spec.js.map +1 -0
- package/dist/collection/components/ic-stepper/ic-stepper.js +41 -41
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-stepper/{ic-stepper.test.a11y.js → test/a11y/ic-stepper.test.a11y.js} +1 -1
- package/dist/collection/components/ic-stepper/test/a11y/ic-stepper.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper-test-examples.js.map +1 -0
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.e2e.js +49 -0
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.e2e.js.map +1 -0
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js +706 -0
- package/dist/collection/components/ic-stepper/test/basic/ic-stepper.spec.js.map +1 -0
- package/dist/collection/components/ic-switch/ic-switch.css +4 -4
- package/dist/collection/components/ic-switch/ic-switch.js +75 -73
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-switch/{ic-switch.test.a11y.js → test/a11y/ic-switch.test.a11y.js} +1 -1
- package/dist/collection/components/ic-switch/test/a11y/ic-switch.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js +104 -0
- package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js.map +1 -0
- package/dist/collection/components/ic-tab/ic-tab.css +4 -4
- package/dist/collection/components/ic-tab/ic-tab.js +114 -31
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab/test/basic/ic-tab.e2e.js +32 -0
- package/dist/collection/components/ic-tab/test/basic/ic-tab.e2e.js.map +1 -0
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js +159 -0
- package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js.map +1 -0
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +157 -77
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-tab-context/test/a11y/ic-tab-context.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js +317 -0
- package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.e2e.js.map +1 -0
- package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.spec.js +390 -0
- package/dist/collection/components/ic-tab-context/test/basic/ic-tab-context.spec.js.map +1 -0
- package/dist/collection/components/ic-tab-group/ic-tab-group.css +6 -120
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +40 -180
- package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.css +0 -4
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +89 -34
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/test/basic/ic-tab-panel.spec.js +65 -0
- package/dist/collection/components/ic-tab-panel/test/basic/ic-tab-panel.spec.js.map +1 -0
- package/dist/collection/components/ic-text-field/ic-text-field.css +1 -10
- package/dist/collection/components/ic-text-field/ic-text-field.js +456 -345
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/test/a11y/ic-text-field.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.e2e.js +98 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.e2e.js.map +1 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +236 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +310 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -0
- package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
- package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js +72 -0
- package/dist/collection/components/ic-theme/test/basic/ic-theme.e2e.js.map +1 -0
- package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js +77 -0
- package/dist/collection/components/ic-theme/test/basic/ic-theme.spec.js.map +1 -0
- package/dist/collection/components/ic-toast/ic-toast.css +602 -0
- package/dist/collection/components/ic-toast/ic-toast.js +386 -0
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -0
- package/dist/collection/components/ic-toast/ic-toast.types.js +2 -0
- package/dist/collection/components/ic-toast/ic-toast.types.js.map +1 -0
- package/dist/collection/components/ic-toast/test/a11y/ic-toast.test.a11y.js +16 -0
- package/dist/collection/components/ic-toast/test/a11y/ic-toast.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-toast/test/basic/ic-toast.e2e.js +82 -0
- package/dist/collection/components/ic-toast/test/basic/ic-toast.e2e.js.map +1 -0
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +278 -0
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -0
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +81 -0
- package/dist/collection/components/ic-toast-region/ic-toast-region.js.map +1 -0
- package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js +62 -0
- package/dist/collection/components/ic-toast-region/test/basic/ic-toast-region.spec.js.map +1 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.css +27 -15
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +116 -64
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/{ic-tooltip.test.a11y.js → test/a11y/ic-tooltip.test.a11y.js} +1 -1
- package/dist/collection/components/ic-tooltip/test/a11y/ic-tooltip.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js +115 -0
- package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.e2e.js.map +1 -0
- package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js +128 -0
- package/dist/collection/components/ic-tooltip/test/basic/ic-tooltip.spec.js.map +1 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +25 -48
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +108 -86
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/{ic-top-navigation.test.a11y.js → test/a11y/ic-top-navigation.test.a11y.js} +8 -1
- package/dist/collection/components/ic-top-navigation/test/a11y/ic-top-navigation.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.e2e.js +61 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.e2e.js.map +1 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.mobile.e2e.js +242 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.mobile.e2e.js.map +1 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js +299 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js.map +1 -0
- package/dist/collection/components/ic-typography/ic-typography.css +58 -1
- package/dist/collection/components/ic-typography/ic-typography.js +140 -22
- package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
- package/dist/collection/components/ic-typography/{ic-typography.test.a11y.js → test/a11y/ic-typography.test.a11y.js} +1 -1
- package/dist/collection/components/ic-typography/test/a11y/ic-typography.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js +39 -0
- package/dist/collection/components/ic-typography/test/basic/ic-typography.e2e.js.map +1 -0
- package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js +296 -0
- package/dist/collection/components/ic-typography/test/basic/ic-typography.spec.js.map +1 -0
- package/dist/collection/testspec.setup.js +21 -0
- package/dist/collection/testspec.setup.js.map +1 -1
- package/dist/collection/utils/constants.js +28 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/helpers.js +31 -27
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/OpenInNew.js +5 -0
- package/dist/components/OpenInNew.js.map +1 -0
- package/dist/components/helpers.js +89 -27
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-alert.js +1 -136
- 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 +9 -8
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +39 -33
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +16 -14
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +101 -45
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +54 -53
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +28 -28
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +49 -35
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +24 -20
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +1 -1
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-entity.js +2 -2
- package/dist/components/ic-data-entity.js.map +1 -1
- package/dist/components/ic-data-row.js +39 -25
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-dialog.d.ts +11 -0
- package/dist/components/ic-dialog.js +356 -0
- package/dist/components/ic-dialog.js.map +1 -0
- package/dist/components/ic-divider2.js +3 -3
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +22 -21
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +31 -19
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +25 -23
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +30 -28
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll.d.ts +11 -0
- package/dist/components/ic-horizontal-scroll.js +8 -0
- package/dist/components/ic-horizontal-scroll.js.map +1 -0
- package/dist/components/ic-horizontal-scroll2.js +218 -0
- package/dist/components/ic-horizontal-scroll2.js.map +1 -0
- package/dist/components/ic-input-component-container2.js +11 -12
- 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 +11 -11
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +9 -11
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +26 -26
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +49 -38
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.d.ts +11 -0
- package/dist/components/ic-menu-group.js +46 -0
- package/dist/components/ic-menu-group.js.map +1 -0
- package/dist/components/ic-menu-item.d.ts +11 -0
- package/dist/components/ic-menu-item.js +8 -0
- package/dist/components/ic-menu-item.js.map +1 -0
- package/dist/components/ic-menu-item2.js +169 -0
- package/dist/components/ic-menu-item2.js.map +1 -0
- package/dist/components/ic-menu2.js +326 -169
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +26 -25
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +91 -61
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +62 -49
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +33 -39
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +57 -36
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item.d.ts +11 -0
- package/dist/components/ic-pagination-item.js +8 -0
- package/dist/components/ic-pagination-item.js.map +1 -0
- package/dist/components/ic-pagination-item2.js +81 -0
- package/dist/components/ic-pagination-item2.js.map +1 -0
- package/dist/components/ic-pagination.d.ts +11 -0
- package/dist/components/ic-pagination.js +288 -0
- package/dist/components/ic-pagination.js.map +1 -0
- package/dist/components/ic-popover-menu.d.ts +11 -0
- package/dist/components/ic-popover-menu.js +290 -0
- package/dist/components/ic-popover-menu.js.map +1 -0
- package/dist/components/ic-radio-group.js +48 -30
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +46 -44
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +206 -122
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-section-container2.js.map +1 -1
- package/dist/components/ic-select.js +391 -200
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +123 -94
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +6 -6
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-status-tag.js +9 -9
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +18 -18
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +21 -21
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +26 -24
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +73 -36
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +33 -127
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +18 -7
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +33 -8
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +132 -97
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast-region.d.ts +11 -0
- package/dist/components/ic-toast-region.js +63 -0
- package/dist/components/ic-toast-region.js.map +1 -0
- package/dist/components/ic-toast.d.ts +11 -0
- package/dist/components/ic-toast.js +218 -0
- package/dist/components/ic-toast.js.map +1 -0
- package/dist/components/ic-tooltip2.js +1854 -49
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +70 -59
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js +101 -6
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/components/index.d.ts +9 -52
- package/dist/components/index.js +1 -50
- package/dist/components/index.js.map +1 -1
- package/dist/components/types.js.map +1 -1
- package/dist/core/core.css +47 -3
- 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-0330cb21.entry.js +2 -0
- package/dist/core/p-0330cb21.entry.js.map +1 -0
- package/dist/core/p-03d1a4a1.entry.js +2 -0
- package/dist/core/p-03d1a4a1.entry.js.map +1 -0
- package/dist/core/p-041604fc.entry.js +2 -0
- package/dist/core/p-041604fc.entry.js.map +1 -0
- package/dist/core/{p-24240e11.js → p-06321d19.js} +2 -2
- package/dist/core/p-06321d19.js.map +1 -0
- package/dist/core/p-1959ec8d.entry.js +2 -0
- package/dist/core/p-1959ec8d.entry.js.map +1 -0
- package/dist/core/p-1b9b8355.entry.js +2 -0
- package/dist/core/p-1b9b8355.entry.js.map +1 -0
- package/dist/core/p-26d5fd0f.entry.js +2 -0
- package/dist/core/p-26d5fd0f.entry.js.map +1 -0
- package/dist/core/p-27d42378.entry.js +2 -0
- package/dist/core/p-27d42378.entry.js.map +1 -0
- package/dist/core/p-2ae7687a.entry.js +2 -0
- package/dist/core/p-2ae7687a.entry.js.map +1 -0
- package/dist/core/p-332690f0.entry.js +2 -0
- package/dist/core/p-332690f0.entry.js.map +1 -0
- package/dist/core/p-39adc795.entry.js +2 -0
- package/dist/core/p-39adc795.entry.js.map +1 -0
- package/dist/core/{p-6be5e06b.entry.js → p-3adb1167.entry.js} +2 -2
- package/dist/core/p-3adb1167.entry.js.map +1 -0
- package/dist/core/p-429e4d24.entry.js +2 -0
- package/dist/core/p-429e4d24.entry.js.map +1 -0
- package/dist/core/{p-ccd078a6.entry.js → p-441e7d98.entry.js} +2 -2
- package/dist/core/p-441e7d98.entry.js.map +1 -0
- package/dist/core/p-44512ebe.js.map +1 -1
- package/dist/core/p-48301eff.entry.js +2 -0
- package/dist/core/p-48301eff.entry.js.map +1 -0
- package/dist/core/p-5144e840.entry.js +2 -0
- package/dist/core/p-5144e840.entry.js.map +1 -0
- package/dist/core/p-5c846d0a.entry.js +2 -0
- package/dist/core/p-5c846d0a.entry.js.map +1 -0
- package/dist/core/p-5c9c940f.entry.js +2 -0
- package/dist/core/p-5c9c940f.entry.js.map +1 -0
- package/dist/core/p-5dd0b02e.js +2 -0
- package/dist/core/p-5dd0b02e.js.map +1 -0
- package/dist/core/{p-c2710b13.entry.js → p-65750560.entry.js} +2 -2
- package/dist/core/p-65750560.entry.js.map +1 -0
- package/dist/core/p-6840589f.entry.js +2 -0
- package/dist/core/p-6840589f.entry.js.map +1 -0
- package/dist/core/p-69920d86.js +3 -0
- package/dist/core/p-69920d86.js.map +1 -0
- package/dist/core/p-6bad30aa.entry.js +2 -0
- package/dist/core/p-6bad30aa.entry.js.map +1 -0
- package/dist/core/p-6f57b13c.js.map +1 -1
- package/dist/core/p-7536dd31.entry.js +2 -0
- package/dist/core/p-7536dd31.entry.js.map +1 -0
- package/dist/core/p-7ae091ef.entry.js +2 -0
- package/dist/core/p-7ae091ef.entry.js.map +1 -0
- package/dist/core/p-7c0dcd00.js +2 -0
- package/dist/core/p-7c0dcd00.js.map +1 -0
- package/dist/core/p-7c46caf2.entry.js +2 -0
- package/dist/core/p-7c46caf2.entry.js.map +1 -0
- package/dist/core/{p-dd194ba9.entry.js → p-83d5bcae.entry.js} +2 -2
- package/dist/core/p-83d5bcae.entry.js.map +1 -0
- package/dist/core/p-892d9d9f.entry.js +2 -0
- package/dist/core/p-892d9d9f.entry.js.map +1 -0
- package/dist/core/p-8991f656.entry.js +2 -0
- package/dist/core/p-8991f656.entry.js.map +1 -0
- package/dist/core/p-8c45ab61.entry.js +2 -0
- package/dist/core/p-8c45ab61.entry.js.map +1 -0
- package/dist/core/p-8c7f4343.js.map +1 -1
- package/dist/core/p-8ca80000.entry.js +2 -0
- package/dist/core/p-8ca80000.entry.js.map +1 -0
- package/dist/core/p-8d4f7027.js +2 -0
- package/dist/core/p-8d4f7027.js.map +1 -0
- package/dist/core/p-90d3a41b.entry.js +2 -0
- package/dist/core/p-90d3a41b.entry.js.map +1 -0
- package/dist/core/p-95992c98.entry.js +2 -0
- package/dist/core/p-95992c98.entry.js.map +1 -0
- package/dist/core/p-96b71172.entry.js +2 -0
- package/dist/core/p-96b71172.entry.js.map +1 -0
- package/dist/core/{p-a2d3e955.entry.js → p-96bcd466.entry.js} +2 -2
- package/dist/core/p-96bcd466.entry.js.map +1 -0
- package/dist/core/p-9e551fe9.entry.js +2 -0
- package/dist/core/p-9e551fe9.entry.js.map +1 -0
- package/dist/core/{p-0672c783.entry.js → p-a29fe0c6.entry.js} +2 -2
- package/dist/core/p-a29fe0c6.entry.js.map +1 -0
- package/dist/core/{p-eaf714a3.entry.js → p-a588886f.entry.js} +2 -2
- package/dist/core/p-a588886f.entry.js.map +1 -0
- package/dist/core/{p-0f773f37.entry.js → p-a8b94619.entry.js} +2 -2
- package/dist/core/p-a8b94619.entry.js.map +1 -0
- package/dist/core/p-adceb0cf.entry.js +2 -0
- package/dist/core/p-adceb0cf.entry.js.map +1 -0
- package/dist/core/p-b698b8ad.entry.js +2 -0
- package/dist/core/p-b698b8ad.entry.js.map +1 -0
- package/dist/core/p-b6c538ea.entry.js +2 -0
- package/dist/core/p-b6c538ea.entry.js.map +1 -0
- package/dist/core/p-c012b867.entry.js +2 -0
- package/dist/core/p-c012b867.entry.js.map +1 -0
- package/dist/core/p-c5716cbc.entry.js +2 -0
- package/dist/core/p-c5716cbc.entry.js.map +1 -0
- package/dist/core/p-ca6d834e.entry.js +2 -0
- package/dist/core/p-ca6d834e.entry.js.map +1 -0
- package/dist/core/{p-97d4b6cd.entry.js → p-cbbf4b05.entry.js} +2 -2
- package/dist/core/p-cbbf4b05.entry.js.map +1 -0
- package/dist/core/p-ce791694.entry.js +2 -0
- package/dist/core/p-ce791694.entry.js.map +1 -0
- package/dist/core/p-cef93d12.entry.js +2 -0
- package/dist/core/p-cef93d12.entry.js.map +1 -0
- package/dist/core/p-d2215b72.entry.js +2 -0
- package/dist/core/p-d2215b72.entry.js.map +1 -0
- package/dist/core/p-e0ee714a.entry.js +2 -0
- package/dist/core/p-e0ee714a.entry.js.map +1 -0
- package/dist/core/p-e6370b7e.entry.js +2 -0
- package/dist/core/p-e6370b7e.entry.js.map +1 -0
- package/dist/core/p-ee11e185.entry.js +2 -0
- package/dist/core/p-ee11e185.entry.js.map +1 -0
- package/dist/core/p-f24814b8.entry.js +2 -0
- package/dist/core/p-f24814b8.entry.js.map +1 -0
- package/dist/core/p-f665242d.entry.js +2 -0
- package/dist/core/p-f665242d.entry.js.map +1 -0
- package/dist/core/p-f7695299.entry.js +2 -0
- package/dist/core/p-f7695299.entry.js.map +1 -0
- package/dist/core/p-f923d11b.entry.js +2 -0
- package/dist/core/p-f923d11b.entry.js.map +1 -0
- package/dist/esm/OpenInNew-67a881e0.js +5 -0
- package/dist/esm/OpenInNew-67a881e0.js.map +1 -0
- package/dist/esm/chevron-icon-7927f709.js +8 -0
- package/dist/esm/chevron-icon-7927f709.js.map +1 -0
- package/dist/esm/core.js +7 -3
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/{helpers-3aa2f5a5.js → helpers-85903813.js} +90 -28
- package/dist/esm/helpers-85903813.js.map +1 -0
- package/dist/esm/ic-alert.entry.js +12 -35
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +6 -5
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +39 -33
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +16 -14
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +179 -104
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +46 -45
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +24 -23
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +42 -29
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +19 -15
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +1 -1
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-entity.entry.js +2 -2
- package/dist/esm/ic-data-entity.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +38 -24
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +291 -0
- package/dist/esm/ic-dialog.entry.js.map +1 -0
- package/dist/esm/ic-divider.entry.js +3 -3
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +19 -18
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +24 -17
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +23 -21
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +23 -21
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +173 -0
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -0
- package/dist/esm/ic-input-component-container_3.entry.js +299 -160
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +11 -13
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +23 -23
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +20 -0
- package/dist/esm/ic-menu-group.entry.js.map +1 -0
- package/dist/esm/ic-menu-item.entry.js +118 -0
- package/dist/esm/ic-menu-item.entry.js.map +1 -0
- package/dist/esm/ic-navigation-button.entry.js +20 -19
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +88 -58
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +50 -42
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +31 -37
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +25 -28
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +52 -0
- package/dist/esm/ic-pagination-item.entry.js.map +1 -0
- package/dist/esm/ic-pagination.entry.js +223 -0
- package/dist/esm/ic-pagination.entry.js.map +1 -0
- package/dist/esm/ic-popover-menu.entry.js +233 -0
- package/dist/esm/ic-popover-menu.entry.js.map +1 -0
- package/dist/esm/ic-radio-group.entry.js +43 -25
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +40 -38
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +181 -101
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +360 -177
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +116 -87
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +4 -4
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +6 -6
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +10 -10
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +15 -15
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +21 -19
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +68 -32
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +10 -118
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +15 -4
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +32 -7
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +102 -72
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +44 -0
- package/dist/esm/ic-toast-region.entry.js.map +1 -0
- package/dist/esm/ic-toast.entry.js +165 -0
- package/dist/esm/ic-toast.entry.js.map +1 -0
- package/dist/esm/ic-top-navigation.entry.js +52 -48
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +97 -5
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/{index-1500de1f.js → index-fd30b77e.js} +271 -45
- package/dist/esm/index-fd30b77e.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/{components/popper.js → esm/popper-15e448b4.js} +10 -17
- package/dist/esm/popper-15e448b4.js.map +1 -0
- package/dist/esm/types-dd515332.js.map +1 -1
- package/dist/types/components/ic-alert/ic-alert.d.ts +13 -13
- package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +8 -8
- package/dist/types/components/ic-breadcrumb/ic-breadcrumb.d.ts +6 -6
- 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 +16 -9
- package/dist/types/components/ic-button/ic-button.d.ts +62 -32
- package/dist/types/components/ic-button/ic-button.types.d.ts +4 -4
- package/dist/types/components/ic-card/ic-card.d.ts +32 -32
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +29 -23
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +14 -15
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.types.d.ts +5 -0
- package/dist/types/components/ic-chip/ic-chip.d.ts +16 -15
- 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-data-row/ic-data-row.d.ts +17 -11
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +123 -0
- package/dist/types/components/ic-footer/ic-footer.d.ts +20 -20
- 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 +26 -6
- package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +8 -8
- package/dist/types/components/ic-hero/ic-hero.d.ts +24 -24
- package/dist/types/components/ic-hero/ic-hero.types.d.ts +1 -1
- package/dist/types/components/ic-horizontal-scroll/ic-horizontal-scroll.d.ts +40 -0
- package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +15 -15
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +14 -14
- package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +8 -8
- package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +1 -1
- package/dist/types/components/ic-link/ic-link.d.ts +9 -9
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +38 -37
- 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 +89 -50
- package/dist/types/components/ic-menu-group/ic-menu-group.d.ts +8 -0
- package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +74 -0
- package/dist/types/components/ic-menu-item/ic-menu-item.types.d.ts +1 -0
- package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +21 -21
- 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 +21 -18
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +47 -27
- package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +14 -14
- package/dist/types/components/ic-page-header/ic-page-header.d.ts +19 -19
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +82 -0
- package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +4 -0
- package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +47 -0
- package/dist/types/components/ic-pagination-item/ic-pagination-item.types.d.ts +1 -0
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +59 -0
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +22 -23
- 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 +32 -29
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +120 -86
- package/dist/types/components/ic-search-bar/ic-search-bar.types.d.ts +2 -1
- package/dist/types/components/ic-select/ic-select.d.ts +117 -73
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +30 -24
- package/dist/types/components/ic-side-navigation/{ic-side-navigation-test-examples.d.ts → test/basic/ic-side-navigation-test-examples.d.ts} +1 -0
- package/dist/types/components/ic-skeleton/ic-skeleton.d.ts +8 -8
- package/dist/types/components/ic-skeleton/ic-skeleton.types.d.ts +1 -1
- package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +8 -8
- package/dist/types/components/ic-status-tag/ic-status-tag.types.d.ts +2 -2
- package/dist/types/components/ic-step/ic-step.d.ts +24 -24
- package/dist/types/components/ic-step/ic-step.types.d.ts +3 -3
- package/dist/types/components/ic-stepper/ic-stepper.d.ts +17 -17
- package/dist/types/components/ic-stepper/ic-stepper.types.d.ts +1 -1
- package/dist/types/components/ic-switch/ic-switch.d.ts +23 -23
- package/dist/types/components/ic-tab/ic-tab.d.ts +25 -8
- package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +29 -20
- package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +6 -33
- package/dist/types/components/ic-tab-panel/ic-tab-panel.d.ts +27 -7
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +110 -91
- package/dist/types/components/ic-text-field/ic-text-field.types.d.ts +3 -3
- package/dist/types/components/ic-text-field/test/a11y/ic-text-field.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-theme/ic-theme.d.ts +1 -1
- package/dist/types/components/ic-toast/ic-toast.d.ts +66 -0
- package/dist/types/components/ic-toast/ic-toast.types.d.ts +1 -0
- package/dist/types/components/ic-toast/test/a11y/ic-toast.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-toast-region/ic-toast-region.d.ts +12 -0
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +22 -15
- package/dist/types/components/ic-tooltip/ic-tooltip.types.d.ts +1 -1
- package/dist/types/components/ic-tooltip/test/a11y/ic-tooltip.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +36 -32
- package/dist/types/components/ic-top-navigation/test/a11y/ic-top-navigation.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-typography/ic-typography.d.ts +31 -4
- package/dist/types/components/ic-typography/test/a11y/ic-typography.test.a11y.d.ts +1 -0
- package/dist/types/components.d.ts +954 -37
- package/dist/types/interface.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +74 -15
- package/dist/types/testspec.setup.d.ts +11 -0
- package/dist/types/utils/constants.d.ts +22 -0
- package/dist/types/utils/helpers.d.ts +2 -0
- package/dist/types/utils/types.d.ts +25 -20
- package/hydrate/index.d.ts +17 -16
- package/hydrate/index.js +4258 -2050
- package/loader/index.d.ts +9 -0
- package/package.json +9 -7
- package/dist/cjs/chevron-icon-2645d6b0.js +0 -10
- package/dist/cjs/chevron-icon-2645d6b0.js.map +0 -1
- package/dist/cjs/error-icon-9af90abc.js +0 -20
- package/dist/cjs/error-icon-9af90abc.js.map +0 -1
- package/dist/cjs/helpers-5f391578.js.map +0 -1
- package/dist/cjs/index-3ef30d9d.js.map +0 -1
- package/dist/cjs/popper-11d5f714.js.map +0 -1
- package/dist/cjs/success-icon-c8fec63d.js +0 -12
- package/dist/cjs/success-icon-c8fec63d.js.map +0 -1
- package/dist/collection/components/ic-alert/ic-alert.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-alert/ic-alert.types.js +0 -2
- package/dist/collection/components/ic-alert/ic-alert.types.js.map +0 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group-test-examples.js.map +0 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-button/ic-button.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-card/ic-card.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-chip/ic-chip.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-data-entity/ic-data-entity.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-data-row/ic-data-row.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-footer/ic-footer.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-footer-link/ic-footer-link.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-hero/ic-hero.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-link/ic-link.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-page-header/ic-page-header.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-select/ic-select.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation-test-examples.js.map +0 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-skeleton/ic-skeleton.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-stepper/ic-stepper-test-examples.js.map +0 -1
- package/dist/collection/components/ic-stepper/ic-stepper.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-switch/ic-switch.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-tab-group/assets/left-arrow.svg +0 -3
- package/dist/collection/components/ic-tab-group/assets/right-arrow.svg +0 -3
- package/dist/collection/components/ic-text-field/ic-text-field.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-typography/ic-typography.test.a11y.js.map +0 -1
- package/dist/components/error-icon.js +0 -17
- package/dist/components/error-icon.js.map +0 -1
- package/dist/components/popper.js.map +0 -1
- package/dist/components/success-icon.js +0 -10
- package/dist/components/success-icon.js.map +0 -1
- package/dist/core/p-01ebd24d.entry.js +0 -2
- package/dist/core/p-01ebd24d.entry.js.map +0 -1
- package/dist/core/p-02a6562c.entry.js +0 -2
- package/dist/core/p-02a6562c.entry.js.map +0 -1
- package/dist/core/p-03a4d9dc.entry.js +0 -2
- package/dist/core/p-03a4d9dc.entry.js.map +0 -1
- package/dist/core/p-04cf6fab.entry.js +0 -2
- package/dist/core/p-04cf6fab.entry.js.map +0 -1
- package/dist/core/p-0672c783.entry.js.map +0 -1
- package/dist/core/p-0f773f37.entry.js.map +0 -1
- package/dist/core/p-0fc9d5c8.entry.js +0 -2
- package/dist/core/p-0fc9d5c8.entry.js.map +0 -1
- package/dist/core/p-10a672d4.entry.js +0 -2
- package/dist/core/p-10a672d4.entry.js.map +0 -1
- package/dist/core/p-24240e11.js.map +0 -1
- package/dist/core/p-26fd7d7c.entry.js +0 -2
- package/dist/core/p-26fd7d7c.entry.js.map +0 -1
- package/dist/core/p-2961c45f.entry.js +0 -2
- package/dist/core/p-2961c45f.entry.js.map +0 -1
- package/dist/core/p-2a40f189.entry.js +0 -2
- package/dist/core/p-2a40f189.entry.js.map +0 -1
- package/dist/core/p-2e318c95.entry.js +0 -2
- package/dist/core/p-2e318c95.entry.js.map +0 -1
- package/dist/core/p-2ed06031.entry.js +0 -2
- package/dist/core/p-2ed06031.entry.js.map +0 -1
- package/dist/core/p-30ff49be.entry.js +0 -2
- package/dist/core/p-30ff49be.entry.js.map +0 -1
- package/dist/core/p-3c75ed36.js +0 -2
- package/dist/core/p-3c75ed36.js.map +0 -1
- package/dist/core/p-3f0232f6.entry.js +0 -2
- package/dist/core/p-3f0232f6.entry.js.map +0 -1
- package/dist/core/p-3f0ac826.entry.js +0 -2
- package/dist/core/p-3f0ac826.entry.js.map +0 -1
- package/dist/core/p-454a7f3d.entry.js +0 -2
- package/dist/core/p-454a7f3d.entry.js.map +0 -1
- package/dist/core/p-48f99591.entry.js +0 -2
- package/dist/core/p-48f99591.entry.js.map +0 -1
- package/dist/core/p-4a8c0c58.entry.js +0 -2
- package/dist/core/p-4a8c0c58.entry.js.map +0 -1
- package/dist/core/p-5368bcff.entry.js +0 -2
- package/dist/core/p-5368bcff.entry.js.map +0 -1
- package/dist/core/p-662d5b43.entry.js +0 -2
- package/dist/core/p-662d5b43.entry.js.map +0 -1
- package/dist/core/p-69512d85.entry.js +0 -2
- package/dist/core/p-69512d85.entry.js.map +0 -1
- package/dist/core/p-6bbc0cf5.entry.js +0 -2
- package/dist/core/p-6bbc0cf5.entry.js.map +0 -1
- package/dist/core/p-6be5e06b.entry.js.map +0 -1
- package/dist/core/p-6d0eaaeb.entry.js +0 -2
- package/dist/core/p-6d0eaaeb.entry.js.map +0 -1
- package/dist/core/p-86098b7e.entry.js +0 -2
- package/dist/core/p-86098b7e.entry.js.map +0 -1
- package/dist/core/p-8b383c23.entry.js +0 -2
- package/dist/core/p-8b383c23.entry.js.map +0 -1
- package/dist/core/p-97d4b6cd.entry.js.map +0 -1
- package/dist/core/p-9e684c58.entry.js +0 -2
- package/dist/core/p-9e684c58.entry.js.map +0 -1
- package/dist/core/p-a2d3e955.entry.js.map +0 -1
- package/dist/core/p-a472db51.entry.js +0 -2
- package/dist/core/p-a472db51.entry.js.map +0 -1
- package/dist/core/p-a6a77e5c.js +0 -2
- package/dist/core/p-a6a77e5c.js.map +0 -1
- package/dist/core/p-add01f10.entry.js +0 -2
- package/dist/core/p-add01f10.entry.js.map +0 -1
- package/dist/core/p-b29f210b.entry.js +0 -2
- package/dist/core/p-b29f210b.entry.js.map +0 -1
- package/dist/core/p-c2710b13.entry.js.map +0 -1
- package/dist/core/p-c6764827.entry.js +0 -2
- package/dist/core/p-c6764827.entry.js.map +0 -1
- package/dist/core/p-ccd078a6.entry.js.map +0 -1
- package/dist/core/p-d4f7a3e4.entry.js +0 -2
- package/dist/core/p-d4f7a3e4.entry.js.map +0 -1
- package/dist/core/p-d5e0c02a.js +0 -2
- package/dist/core/p-d5e0c02a.js.map +0 -1
- package/dist/core/p-d77f57d9.entry.js +0 -2
- package/dist/core/p-d77f57d9.entry.js.map +0 -1
- package/dist/core/p-dd194ba9.entry.js.map +0 -1
- package/dist/core/p-de19fed4.entry.js +0 -2
- package/dist/core/p-de19fed4.entry.js.map +0 -1
- package/dist/core/p-e5e885b1.entry.js +0 -2
- package/dist/core/p-e5e885b1.entry.js.map +0 -1
- package/dist/core/p-e94dfa43.entry.js +0 -2
- package/dist/core/p-e94dfa43.entry.js.map +0 -1
- package/dist/core/p-eaf714a3.entry.js.map +0 -1
- package/dist/core/p-ec26fc38.js +0 -2
- package/dist/core/p-ec26fc38.js.map +0 -1
- package/dist/core/p-f51f4d34.entry.js +0 -2
- package/dist/core/p-f51f4d34.entry.js.map +0 -1
- package/dist/core/p-f9370be6.js +0 -3
- package/dist/core/p-f9370be6.js.map +0 -1
- package/dist/esm/chevron-icon-98c98242.js +0 -8
- package/dist/esm/chevron-icon-98c98242.js.map +0 -1
- package/dist/esm/error-icon-1dc70ca0.js +0 -17
- package/dist/esm/error-icon-1dc70ca0.js.map +0 -1
- package/dist/esm/helpers-3aa2f5a5.js.map +0 -1
- package/dist/esm/index-1500de1f.js.map +0 -1
- package/dist/esm/popper-f860750c.js +0 -1801
- package/dist/esm/popper-f860750c.js.map +0 -1
- package/dist/esm/success-icon-75b04341.js +0 -10
- package/dist/esm/success-icon-75b04341.js.map +0 -1
- package/dist/types/components/ic-alert/ic-alert.types.d.ts +0 -1
- /package/dist/collection/{components/ic-link/assets → assets}/OpenInNew.svg +0 -0
- /package/dist/collection/components/ic-back-to-top/{ic-back-to-top.test.a11y.js → test/a11y/ic-back-to-top.test.a11y.js} +0 -0
- /package/dist/collection/components/ic-breadcrumb-group/{ic-breadcrumb-group-test-examples.js → test/basic/ic-breadcrumb-group-test-examples.js} +0 -0
- /package/dist/collection/components/ic-stepper/{ic-stepper-test-examples.js → test/basic/ic-stepper-test-examples.js} +0 -0
- /package/dist/collection/components/ic-tab-context/{ic-tab-context.test.a11y.js → test/a11y/ic-tab-context.test.a11y.js} +0 -0
- /package/dist/collection/components/ic-text-field/{ic-text-field.test.a11y.js → test/a11y/ic-text-field.test.a11y.js} +0 -0
- /package/dist/types/components/ic-alert/{ic-alert.test.a11y.d.ts → test/a11y/ic-alert.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-back-to-top/{ic-back-to-top.test.a11y.d.ts → test/a11y/ic-back-to-top.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-breadcrumb-group/{ic-breadcrumb-group.test.a11y.d.ts → test/a11y/ic-breadcrumb-group.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-breadcrumb-group/{ic-breadcrumb-group-test-examples.d.ts → test/basic/ic-breadcrumb-group-test-examples.d.ts} +0 -0
- /package/dist/types/components/ic-button/{ic-button.test.a11y.d.ts → test/a11y/ic-button.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-card/{ic-card.test.a11y.d.ts → test/a11y/ic-card.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-checkbox-group/{ic-checkbox-group.test.a11y.d.ts → test/a11y/ic-checkbox-group.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-chip/{ic-chip.test.a11y.d.ts → test/a11y/ic-chip.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-classification-banner/{ic-classification-banner.test.a11y.d.ts → test/a11y/ic-classification-banner.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-data-entity/{ic-data-entity.test.a11y.d.ts → test/a11y/ic-data-entity.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-data-row/{ic-data-row.test.a11y.d.ts → test/a11y/ic-data-row.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-footer-link-group/ic-footer-link-group.test.a11y.d.ts → ic-dialog/test/a11y/ic-dialog.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-hero/ic-hero.test.a11y.d.ts → ic-footer/test/a11y/ic-footer.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-footer/ic-footer.test.a11y.d.ts → ic-footer-link/test/a11y/ic-footer-link.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-footer-link/ic-footer-link.test.a11y.d.ts → ic-footer-link-group/test/a11y/ic-footer-link-group.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-link/ic-link.test.a11y.d.ts → ic-hero/test/a11y/ic-hero.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-loading-indicator/ic-loading-indicator.test.a11y.d.ts → ic-horizontal-scroll/test/a11y/ic-horizontal-scroll.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-navigation-group/ic-navigation-group.test.a11y.d.ts → ic-link/test/a11y/ic-link.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-navigation-item/ic-navigation-item.test.a11y.d.ts → ic-loading-indicator/test/a11y/ic-loading-indicator.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-page-header/ic-page-header.test.a11y.d.ts → ic-navigation-group/test/a11y/ic-navigation-group.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-radio-group/ic-radio-group.test.a11y.d.ts → ic-navigation-item/test/a11y/ic-navigation-item.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-search-bar/ic-search-bar.test.a11y.d.ts → ic-page-header/test/a11y/ic-page-header.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-select/ic-select.test.a11y.d.ts → ic-pagination/test/a11y/ic-pagination.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-side-navigation/ic-side-navigation.test.a11y.d.ts → ic-popover-menu/test/a11y/ic-popover-menu.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-skeleton/ic-skeleton.test.a11y.d.ts → ic-radio-group/test/a11y/ic-radio-group.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-status-tag/ic-status-tag.test.a11y.d.ts → ic-search-bar/test/a11y/ic-search-bar.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-stepper/ic-stepper.test.a11y.d.ts → ic-select/test/a11y/ic-select.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-switch/ic-switch.test.a11y.d.ts → ic-side-navigation/test/a11y/ic-side-navigation.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-tab-context/ic-tab-context.test.a11y.d.ts → ic-skeleton/test/a11y/ic-skeleton.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-text-field/ic-text-field.test.a11y.d.ts → ic-status-tag/test/a11y/ic-status-tag.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-tooltip/ic-tooltip.test.a11y.d.ts → ic-stepper/test/a11y/ic-stepper.test.a11y.d.ts} +0 -0
- /package/dist/types/components/ic-stepper/{ic-stepper-test-examples.d.ts → test/basic/ic-stepper-test-examples.d.ts} +0 -0
- /package/dist/types/components/{ic-top-navigation/ic-top-navigation.test.a11y.d.ts → ic-switch/test/a11y/ic-switch.test.a11y.d.ts} +0 -0
- /package/dist/types/components/{ic-typography/ic-typography.test.a11y.d.ts → ic-tab-context/test/a11y/ic-tab-context.test.a11y.d.ts} +0 -0
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
6
|
-
const helpers = require('./helpers-
|
5
|
+
const index = require('./index-2a0c6769.js');
|
6
|
+
const helpers = require('./helpers-eb53c416.js');
|
7
7
|
require('./types-3eb02246.js');
|
8
8
|
|
9
9
|
const icStepperCss = ":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.default:not(.aligned-left)) .step-item-list{flex:auto}:host(.compact) ul ::slotted(ic-step){display:none}:host(.compact) ul ::slotted(ic-step.show){display:flex}:host(.compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";
|
@@ -178,19 +178,24 @@ const Stepper = class {
|
|
178
178
|
});
|
179
179
|
this.resizeObserver.observe(this.el);
|
180
180
|
};
|
181
|
-
this.
|
182
|
-
this.
|
183
|
-
this.
|
184
|
-
this.
|
181
|
+
this.alignedFullWidth = true;
|
182
|
+
this.autoSetStepTitles = true;
|
183
|
+
this.lastStepWidth = 0;
|
184
|
+
this.noOfResizes = 0;
|
185
185
|
this.stepperWidth = document
|
186
186
|
.querySelector("ic-stepper")
|
187
187
|
.getBoundingClientRect().width;
|
188
|
-
this.lastStepWidth = 0;
|
189
188
|
this.stepTypes = [];
|
190
|
-
this.alignedFullWidth = true;
|
191
|
-
this.autoSetStepTitles = true;
|
192
189
|
this.variantOverride = this.variant !== "compact";
|
193
|
-
this.
|
190
|
+
this.aligned = "full-width";
|
191
|
+
this.connectorWidth = 100;
|
192
|
+
this.hideStepInfo = false;
|
193
|
+
this.variant = "default";
|
194
|
+
}
|
195
|
+
disconnectedCallback() {
|
196
|
+
if (this.resizeObserver !== null) {
|
197
|
+
this.resizeObserver.disconnect();
|
198
|
+
}
|
194
199
|
}
|
195
200
|
componentWillLoad() {
|
196
201
|
this.setStepTypes();
|
@@ -201,11 +206,6 @@ const Stepper = class {
|
|
201
206
|
componentDidLoad() {
|
202
207
|
helpers.checkResizeObserver(this.runResizeObserver);
|
203
208
|
}
|
204
|
-
disconnectedCallback() {
|
205
|
-
if (this.resizeObserver !== null) {
|
206
|
-
this.resizeObserver.disconnect();
|
207
|
-
}
|
208
|
-
}
|
209
209
|
render() {
|
210
210
|
return (index.h(index.Host, { class: {
|
211
211
|
[`${this.variant}`]: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-stepper.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,4UAA4U;;MCUpV,OAAO;;;IA2CV,mBAAc,GAAmB,IAAI,CAAC;;IAGtC,gBAAW,GAAG;MACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;MAE7D,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,IAAI,CACnC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAChD,CAAC;KACH,CAAC;;IAGM,oBAAe,GAAG;MACxB,IACE,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;QACnD,IAAI,CAAC,eAAe;QACpB,IAAI,CAAC,OAAO,KAAK,SAAS,EAC1B;QACA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC,EAA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O,KAAK,SAAS;uBAE/B,CAAC;;EA8MjC,iBAAiB;IACf,IAAI,CAAC,YAAY,EAAE,CAAC;IACpB,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;MAC9B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;KAC9B;GACF;EAED,gBAAgB;IACdC,2BAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;GAC7C;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,EAAE;MAChC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;KAClC;GACF;EAED,MAAM;IACJ,QACEC,QAACC,UAAI,IACH,KAAK,EAAE;QACL,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI;QACzB,CAAC,cAAc,GACb,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM;OACxD,IAEDD,gBAAI,KAAK,EAAC,gBAAgB,IACxBA,qBAAa,CACV,CACA,EACP;GACH;;;;;;;","names":["pxToRem","checkResizeObserver","h","Host"],"sources":["./src/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","./src/components/ic-stepper/ic-stepper.tsx"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nimport { IcStepperAlignment } from \"./ic-stepper.types\";\nimport { IcStepTypes, IcStepVariants } from \"../ic-step/ic-step.types\";\n\n@Component({\n tag: \"ic-stepper\",\n styleUrl: \"ic-stepper.css\",\n shadow: true,\n})\nexport class Stepper {\n @Element() el: HTMLIcStepperElement;\n\n /**\n * The alignment of the default stepper within its container.\n */\n @Prop() aligned?: IcStepperAlignment = \"full-width\";\n\n /**\n * The variant of the stepper.\n */\n @Prop({ mutable: true }) variant?: IcStepVariants = \"default\";\n\n /**\n * The length of the connnector between each step in pixels. Minimum length is 100px.\n */\n @Prop() connectorWidth?: number = 100;\n\n /**\n * If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\n */\n @Prop() hideStepInfo?: boolean = false;\n\n @State() stepperWidth: number = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n\n @State() lastStepWidth: number = 0;\n\n @State() stepTypes: IcStepTypes[] = [];\n\n @State() alignedFullWidth: boolean = true;\n\n @State() autoSetStepTitles: boolean = true;\n\n @State() variantOverride?: boolean = this.variant !== \"compact\";\n\n @State() noOfResizes?: number = 0;\n\n private steps: HTMLIcStepElement[];\n\n private stepsWithStepTitles: HTMLIcStepElement[];\n\n private resizeObserver: ResizeObserver = null;\n\n // Get all steps currently within this stepper\n private getChildren = (): void => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n\n this.stepsWithStepTitles = Array.from(\n this.el.querySelectorAll(\"ic-step[step-title]\")\n );\n };\n\n // Inform the user that stepTitles are required on all steps in a compact stepper\n private checkStepTitles = (): void => {\n if (\n this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\"\n ) {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(\n `The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`\n );\n }\n }\n };\n\n private setStepTypes = (): void => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n\n private setStepperWidth = (): void => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(\n `${this.stepperWidth / this.steps.length}px`\n );\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n\n private initialiseStepStates = (): void => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n } else {\n step.current = true;\n }\n\n const stepTitleArea =\n step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n } else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n } else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n } else {\n step.progress = 100;\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(\"visually-hidden\");\n }\n\n step.compactStepStyling = this.stepTypes[index];\n }\n\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = pxToRem(\n `${\n (this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)\n }px`\n );\n step.style.minWidth = pxToRem(\"148px\");\n }\n } else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n } else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = step.shadowRoot.querySelector(\n \".step > .step-top > .step-connect\"\n ) as HTMLElement;\n\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(\"visually-hidden\");\n }\n }\n });\n };\n\n private overrideVariant = () => {\n let minDefaultStepperWidth = 148 * this.steps.length;\n\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n\n if (this.variantOverride) {\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n this.getChildren();\n } else {\n this.variant = \"default\";\n this.getChildren();\n }\n }\n };\n\n private resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n componentWillLoad(): void {\n this.setStepTypes();\n if (this.variant === \"compact\") {\n this.variantOverride = false;\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 return (\n <Host\n class={{\n [`${this.variant}`]: true,\n [\"aligned-left\"]:\n this.variant === \"default\" && this.aligned === \"left\",\n }}\n >\n <ul class=\"step-item-list\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-stepper.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,4UAA4U;;MCUpV,OAAO;;;IACV,mBAAc,GAAmB,IAAI,CAAC;;IAsDtC,gBAAW,GAAG;MACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;MAE7D,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,IAAI,CACnC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAChD,CAAC;KACH,CAAC;;IAGM,oBAAe,GAAG;MACxB,IACE,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;QACnD,IAAI,CAAC,eAAe;QACpB,IAAI,CAAC,OAAO,KAAK,SAAS,EAC1B;QACA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC,EAAE;UAC1B,OAAO,CAAC,KAAK,CACX,mIAAmI,CACpI,CAAC;SACH;OACF;KACF,CAAC;IAEM,iBAAY,GAAG;MACrB,IAAI,CAAC,WAAW,EAAE,CAAC;MACnB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;MACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM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I,CAAC,eAAe,GAAG,KAAK,CAAC;KAC9B;GACF;EAED,gBAAgB;IACdC,2BAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;GAC7C;EAwMD,MAAM;IACJ,QACEC,QAACC,UAAI,IACH,KAAK,EAAE;QACL,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI;QACzB,CAAC,cAAc,GACb,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM;OACxD,IAEDD,gBAAI,KAAK,EAAC,gBAAgB,IACxBA,qBAAa,CACV,CACA,EACP;GACH;;;;;;;","names":["pxToRem","checkResizeObserver","h","Host"],"sources":["./src/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","./src/components/ic-stepper/ic-stepper.tsx"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nimport { IcStepperAlignment } from \"./ic-stepper.types\";\nimport { IcStepTypes, IcStepVariants } from \"../ic-step/ic-step.types\";\n\n@Component({\n tag: \"ic-stepper\",\n styleUrl: \"ic-stepper.css\",\n shadow: true,\n})\nexport class Stepper {\n private resizeObserver: ResizeObserver = null;\n private steps: HTMLIcStepElement[];\n private stepsWithStepTitles: HTMLIcStepElement[];\n\n @Element() el: HTMLIcStepperElement;\n\n @State() alignedFullWidth: boolean = true;\n @State() autoSetStepTitles: boolean = true;\n @State() lastStepWidth: number = 0;\n @State() noOfResizes?: number = 0;\n @State() stepperWidth: number = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n @State() stepTypes: IcStepTypes[] = [];\n @State() variantOverride?: boolean = this.variant !== \"compact\";\n\n /**\n * The alignment of the default stepper within its container.\n */\n @Prop() aligned?: IcStepperAlignment = \"full-width\";\n\n /**\n * The length of the connnector between each step in pixels. Minimum length is 100px.\n */\n @Prop() connectorWidth?: number = 100;\n\n /**\n * If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\n */\n @Prop() hideStepInfo?: boolean = false;\n\n /**\n * The variant of the stepper.\n */\n @Prop({ mutable: true }) variant?: IcStepVariants = \"default\";\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n this.setStepTypes();\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n // Get all steps currently within this stepper\n private getChildren = (): void => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n\n this.stepsWithStepTitles = Array.from(\n this.el.querySelectorAll(\"ic-step[step-title]\")\n );\n };\n\n // Inform the user that stepTitles are required on all steps in a compact stepper\n private checkStepTitles = (): void => {\n if (\n this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\"\n ) {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(\n `The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`\n );\n }\n }\n };\n\n private setStepTypes = (): void => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n\n private setStepperWidth = (): void => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(\n `${this.stepperWidth / this.steps.length}px`\n );\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n\n private initialiseStepStates = (): void => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n } else {\n step.current = true;\n }\n\n const stepTitleArea =\n step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n } else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n } else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n } else {\n step.progress = 100;\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(\"visually-hidden\");\n }\n\n step.compactStepStyling = this.stepTypes[index];\n }\n\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = pxToRem(\n `${\n (this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)\n }px`\n );\n step.style.minWidth = pxToRem(\"148px\");\n }\n } else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n } else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = step.shadowRoot.querySelector(\n \".step > .step-top > .step-connect\"\n ) as HTMLElement;\n\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(\"visually-hidden\");\n }\n }\n });\n };\n\n private overrideVariant = () => {\n let minDefaultStepperWidth = 148 * this.steps.length;\n\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n\n if (this.variantOverride) {\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n this.getChildren();\n } else {\n this.variant = \"default\";\n this.getChildren();\n }\n }\n };\n\n private resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n return (\n <Host\n class={{\n [`${this.variant}`]: true,\n [\"aligned-left\"]:\n this.variant === \"default\" && this.aligned === \"left\",\n }}\n >\n <ul class=\"step-item-list\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -2,19 +2,19 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
6
|
-
const helpers = require('./helpers-
|
5
|
+
const index = require('./index-2a0c6769.js');
|
6
|
+
const helpers = require('./helpers-eb53c416.js');
|
7
7
|
require('./types-3eb02246.js');
|
8
8
|
|
9
|
-
const icSwitchCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ic-space-xxs);cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-sm)}.ic-switch-label-small{margin-bottom:0.625rem}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:4rem;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-architectural-200);border:
|
9
|
+
const icSwitchCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ic-space-xxs);cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-sm)}.ic-switch-label-small{margin-bottom:0.625rem}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:4rem;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-architectural-200);border:var(--ic-space-1px) solid var(--ic-architectural-700);box-sizing:border-box;transition:var(--ic-transition-duration-fast)}.ic-switch-line-break{flex:1 0 100%}.ic-switch-checked-status{padding-left:var(--ic-space-xxs)}.ic-switch-toggle::before{content:\"\";width:1.333rem;height:1.333rem;border-radius:50%;position:absolute;z-index:2;top:50%;left:0.333rem;transform:translate(0, -50%);background-color:var(--ic-architectural-700);transition:var(--ic-transition-duration-slow)}.ic-switch-icon{display:inline-block;vertical-align:middle;width:0.625rem;height:0.625rem}.ic-switch-icon-circle,.ic-switch-icon-line{stroke-width:1}.ic-switch-icon-circle{stroke:var(--ic-architectural-700)}.ic-switch-icon-line{stroke:var(--ic-architectural-white)}@media (prefers-reduced-motion: reduce){.ic-switch-toggle::before{transition-duration:0ms}}.ic-switch-input:checked+.ic-switch-toggle{background-color:var(--ic-action-default);border:none}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-xl), -50%);background-color:var(--ic-architectural-white)}.ic-switch-input:not([disabled])+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-action-dark-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-action-dark-bg-active)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-action-default-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-action-default-bg-active)}.ic-switch-input:focus:not([disabled])+.ic-switch-toggle,.ic-switch-input:focus-visible:not([disabled])+.ic-switch-toggle{box-shadow:0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha)}.ic-switch-disabled{cursor:default}.ic-switch-disabled .ic-switch-icon-circle{stroke:var(--ic-architectural-300)}.ic-switch-disabled .ic-switch-icon-line{stroke:var(--ic-action-default-bg-active)}.ic-switch-input:disabled+.ic-switch-toggle{background-color:var(--ic-architectural-80);border:var(--ic-border-disabled)}.ic-switch-input:disabled~.ic-switch-checked-status{color:var(--ic-architectural-300)}.ic-switch-input:disabled+.ic-switch-toggle::before{background-color:var(--ic-architectural-300)}.ic-switch-input:disabled:checked+.ic-switch-toggle{background-color:var(--ic-status-info-background);border:var(--ic-space-1px) dashed #98c9f5}.ic-switch-input:disabled:checked+.ic-switch-toggle::before{background-color:var(--ic-architectural-white)}.ic-switch-small{gap:var(--ic-space-xxxs)}.ic-switch-small .ic-switch-checked-status{padding-left:0.375rem}.ic-switch-small .ic-switch-toggle{width:var(--ic-space-xxl);height:var(--ic-space-lg)}.ic-switch-small .ic-switch-toggle::before{width:var(--ic-space-md);height:var(--ic-space-md);left:var(--ic-space-xxs)}.ic-switch-small .ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-lg), -50%)}::slotted(*){margin-left:var(--ic-space-sm)}::slotted(svg){fill:currentcolor}@media (forced-colors: active){.ic-switch-toggle::before,.ic-switch-input:checked+.ic-switch-toggle{border:var(--ic-hc-border)}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(calc(var(--ic-space-xl) - 0.125rem), -50%)}.ic-switch-input:disabled+.ic-switch-toggle,.ic-switch-input:disabled:checked+.ic-switch-toggle,.ic-switch-input:disabled+.ic-switch-toggle::before{border-color:GrayText}.ic-switch-input:disabled~.ic-switch-checked-status{color:GrayText}.ic-switch-disabled .ic-switch-icon-circle,.ic-switch-disabled .ic-switch-icon-line{stroke:GrayText}}";
|
10
10
|
|
11
11
|
let inputIds = 0;
|
12
12
|
const Switch = class {
|
13
13
|
constructor(hostRef) {
|
14
14
|
index.registerInstance(this, hostRef);
|
15
|
+
this.icBlur = index.createEvent(this, "icBlur", 7);
|
15
16
|
this.icChange = index.createEvent(this, "icChange", 7);
|
16
17
|
this.icFocus = index.createEvent(this, "icFocus", 7);
|
17
|
-
this.icBlur = index.createEvent(this, "icBlur", 7);
|
18
18
|
this.inputId = `ic-switch-input-${inputIds++}`;
|
19
19
|
this.handleChange = () => {
|
20
20
|
this.checkedState = !this.checkedState;
|
@@ -32,35 +32,36 @@ const Switch = class {
|
|
32
32
|
this.handleFormReset = () => {
|
33
33
|
this.checkedState = this.initiallyChecked;
|
34
34
|
};
|
35
|
-
this.
|
36
|
-
this.
|
37
|
-
this.helperText = "";
|
35
|
+
this.checkedState = false;
|
36
|
+
this.initiallyChecked = this.checked;
|
38
37
|
this.checked = false;
|
39
|
-
this.small = false;
|
40
38
|
this.disabled = false;
|
39
|
+
this.helperText = "";
|
40
|
+
this.hideLabel = false;
|
41
|
+
this.label = undefined;
|
41
42
|
this.name = this.inputId;
|
42
43
|
this.showState = false;
|
44
|
+
this.small = false;
|
43
45
|
this.value = "on";
|
44
|
-
this.checkedState = false;
|
45
|
-
this.initiallyChecked = this.checked;
|
46
46
|
}
|
47
|
-
|
48
|
-
|
49
|
-
*/
|
50
|
-
async setFocus() {
|
51
|
-
if (this.el.shadowRoot.querySelector("input")) {
|
52
|
-
this.el.shadowRoot.querySelector("input").focus();
|
53
|
-
}
|
47
|
+
disconnectedCallback() {
|
48
|
+
helpers.removeFormResetListener(this.el, this.handleFormReset);
|
54
49
|
}
|
55
50
|
componentWillLoad() {
|
56
51
|
this.checkedState = this.checked;
|
57
52
|
helpers.addFormResetListener(this.el, this.handleFormReset);
|
53
|
+
helpers.removeDisabledFalse(this.disabled, this.el);
|
58
54
|
}
|
59
55
|
componentDidLoad() {
|
60
56
|
helpers.onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Switch");
|
61
57
|
}
|
62
|
-
|
63
|
-
|
58
|
+
/**
|
59
|
+
* Sets focus on the switch.
|
60
|
+
*/
|
61
|
+
async setFocus() {
|
62
|
+
if (this.el.shadowRoot.querySelector("input")) {
|
63
|
+
this.el.shadowRoot.querySelector("input").focus();
|
64
|
+
}
|
64
65
|
}
|
65
66
|
render() {
|
66
67
|
const { label, checkedState, small, disabled, name, showState, value, hideLabel, helperText, inputId, } = this;
|
@@ -75,6 +76,7 @@ const Switch = class {
|
|
75
76
|
["ic-switch-label-small"]: small,
|
76
77
|
} })), !hideLabel && index.h("span", { class: "ic-switch-line-break" }), index.h("input", { checked: checkedState, disabled: disabled, "aria-label": label, "aria-checked": checkedState ? "true" : "false", "aria-describedby": describedBy, role: "switch", class: "ic-switch-input", type: "checkbox", name: "toggle", id: inputId, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.handleChange }), index.h("span", { class: "ic-switch-toggle" }, index.h("svg", { class: "ic-switch-icon", "aria-hidden": "true", focusable: "false", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, index.h("line", { class: "ic-switch-icon-line", x1: "9", y1: small ? "2" : "1", x2: "9", y2: small ? "8" : "9" })), index.h("svg", { class: "ic-switch-icon", "aria-hidden": "true", focusable: "false", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { class: "ic-switch-icon-circle", fill: "none", cx: "5", cy: "5", r: small ? "3.335" : "4.445" }))), index.h("slot", { name: "right-adornment" }), showState && (index.h("ic-typography", { "aria-hidden": "true", variant: "label", class: "ic-switch-checked-status" }, checkedState ? "On" : "Off")))));
|
77
78
|
}
|
79
|
+
static get delegatesFocus() { return true; }
|
78
80
|
get el() { return index.getElement(this); }
|
79
81
|
};
|
80
82
|
Switch.style = icSwitchCss;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-switch.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,qhNAAqhN;;ACoBziN,IAAI,QAAQ,GAAG,CAAC,CAAC;MAUJ,MAAM;;;;;;IACT,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;IAiE1C,iBAAY,GAAG;MACrB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;MACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACjB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B,IAElCA,kBACE,KAAK,EAAC,qBAAqB,EAC3B,EAAE,EAAC,GAAG,EACN,EAAE,EAAE,KAAK,GAAG,GAAG,GAAG,GAAG,EACrB,EAAE,EAAC,GAAG,EACN,EAAE,EAAE,KAAK,GAAG,GAAG,GAAG,GAAG,GACrB,CACE,EACNA,iBACE,KAAK,EAAC,gBAAgB,iBACV,MAAM,EAClB,SAAS,EAAC,OAAO,EACjB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,IAElCA,oBACE,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,GAC5B,CACE,CACD,EACPA,kBAAM,IAAI,EAAC,iBAAiB,GAAQ,EACnC,SAAS,KACRA,0CACc,MAAM,EAClB,OAAO,EAAC,OAAO,EACf,KAAK,EAAC,0BAA0B,IAE/B,YAAY,GAAG,IAAI,GAAG,KAAK,CACd,CACjB,CACK,CACH,EACP;GACH;;;;;;;","names":["addFormResetListener","onComponentRequiredPropUndefined","removeFormResetListener","renderHiddenInput","getInputDescribedByText","h","Host"],"sources":["./src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","./src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: 0.063rem solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 0.063rem var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: 0.063rem dashed var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-background);\n border: 0.063rem dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: true,\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n /**\n * If `true`, the small styling will be applied to the switch.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n label,\n checkedState,\n small,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host>\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small,\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small,\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={small ? \"2\" : \"1\"}\n x2=\"9\"\n y2={small ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={small ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-switch.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,oiNAAoiN;;ACqBxjN,IAAI,QAAQ,GAAG,CAAC,CAAC;MAYJ,MAAM;;;;;;IACT,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;IAkG1C,iBAAY,GAAG;MACrB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;MACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACjB,OAAO,EAAE,IAAI,CAAC,YAAY;QAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAC;KACJ,CAAC;IAEM,YAAO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,qBAAqB,EAC3B,EAAE,EAAC,GAAG,EACN,EAAE,EAAE,KAAK,GAAG,GAAG,GAAG,GAAG,EACrB,EAAE,EAAC,GAAG,EACN,EAAE,EAAE,KAAK,GAAG,GAAG,GAAG,GAAG,GACrB,CACE,EACNA,iBACE,KAAK,EAAC,gBAAgB,iBACV,MAAM,EAClB,SAAS,EAAC,OAAO,EACjB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,IAElCA,oBACE,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,GAC5B,CACE,CACD,EACPA,kBAAM,IAAI,EAAC,iBAAiB,GAAQ,EACnC,SAAS,KACRA,0CACc,MAAM,EAClB,OAAO,EAAC,OAAO,EACf,KAAK,EAAC,0BAA0B,IAE/B,YAAY,GAAG,IAAI,GAAG,KAAK,CACd,CACjB,CACK,CACH,EACP;GACH;;;;;;;;","names":["removeFormResetListener","addFormResetListener","removeDisabledFalse","onComponentRequiredPropUndefined","renderHiddenInput","getInputDescribedByText","h","Host"],"sources":["./src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","./src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-architectural-200);\n border: var(--ic-space-1px) solid var(--ic-architectural-700);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-architectural-700);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-architectural-700);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-architectural-white);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-action-default);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-dark-bg-active);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: 0 0 0 var(--ic-space-1px) var(--ic-architectural-white),\n 0 0 0 0.188rem var(--ic-action-default),\n 0 0 0 0.5rem var(--ic-action-default-active-alpha);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-architectural-300);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-action-default-bg-active);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-architectural-80);\n border: var(--ic-border-disabled);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-status-info-background);\n border: var(--ic-space-1px) dashed #98c9f5;\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-architectural-white);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-hc-border);\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * If `true`, the small styling will be applied to the switch.\n */\n @Prop() small?: boolean = false;\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n render() {\n const {\n label,\n checkedState,\n small,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host>\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: small,\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: small,\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={small ? \"2\" : \"1\"}\n x2=\"9\"\n y2={small ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={small ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -2,29 +2,34 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-2a0c6769.js');
|
6
6
|
const types = require('./types-3eb02246.js');
|
7
7
|
|
8
8
|
const TabContext = class {
|
9
9
|
constructor(hostRef) {
|
10
10
|
index.registerInstance(this, hostRef);
|
11
|
-
this.
|
12
|
-
this.
|
13
|
-
|
11
|
+
this.icTabSelect = index.createEvent(this, "icTabSelect", 3);
|
12
|
+
this.tabSelect = index.createEvent(this, "tabSelect", 3);
|
13
|
+
this.newTabPanels = [];
|
14
|
+
this.newTabs = [];
|
15
|
+
// Sets attributes to link tab-group, tabs and tab-panels
|
14
16
|
this.linkTabs = () => {
|
15
17
|
this.tabs.forEach((tab, index) => {
|
16
18
|
const tabId = `ic-tab-${index}-context-${this.contextId}`;
|
17
19
|
const tabPanelId = `ic-tab-panel-${index}-context-${this.contextId}`;
|
18
20
|
const shared = `ic-tab--${index}-context-${this.contextId}`;
|
21
|
+
const contextIdAttr = "context-id";
|
19
22
|
tab.setAttribute("id", tabId);
|
20
23
|
tab.tabId = shared;
|
21
24
|
tab.tabPosition = index;
|
22
25
|
tab.setAttribute("aria-controls", tabPanelId);
|
23
|
-
tab.setAttribute(
|
26
|
+
tab.setAttribute(contextIdAttr, this.contextId);
|
27
|
+
this.tabGroup.setAttribute(contextIdAttr, this.contextId);
|
24
28
|
this.tabPanels[index].setAttribute("id", tabPanelId);
|
25
29
|
this.tabPanels[index].panelId = shared;
|
26
30
|
this.tabPanels[index].tabPosition = index;
|
27
31
|
this.tabPanels[index].setAttribute("aria-labelledby", tabId);
|
32
|
+
this.tabPanels[index].setAttribute(contextIdAttr, this.contextId);
|
28
33
|
if (this.appearance === types.IcThemeForegroundEnum.Light) {
|
29
34
|
tab.appearance = this.appearance;
|
30
35
|
this.tabPanels[index].appearance = this.appearance;
|
@@ -35,25 +40,25 @@ const TabContext = class {
|
|
35
40
|
}
|
36
41
|
};
|
37
42
|
// Gets tabs and tabpanels with the same context ID
|
43
|
+
// Using querySelector to selector the children in relation to the host
|
38
44
|
this.getChildren = () => {
|
39
|
-
this.tabGroup =
|
40
|
-
this.tabs = Array.from(this.tabGroup.querySelectorAll("ic-tab"))
|
45
|
+
this.tabGroup = this.host.querySelector("ic-tab-group");
|
46
|
+
this.tabs = Array.from(this.tabGroup.querySelectorAll("ic-tab"));
|
47
|
+
this.tabPanels = Array.from(this.host.children).filter((child) => child.tagName === "IC-TAB-PANEL");
|
41
48
|
this.enabledTabs = this.getEnabledTabs();
|
42
|
-
this.tabPanels = Array.from(this.host.querySelectorAll("ic-tab-panel"));
|
43
49
|
};
|
44
|
-
|
45
|
-
this.attatchEventListeners = () => {
|
50
|
+
this.keydownHandler = (event) => {
|
46
51
|
if (this.activationType === "automatic") {
|
47
|
-
this.
|
48
|
-
this.handleKeyBoardNavAutomatic(event);
|
49
|
-
});
|
52
|
+
this.handleKeyBoardNavAutomatic(event);
|
50
53
|
}
|
51
54
|
else {
|
52
|
-
this.
|
53
|
-
this.handleKeyBoardNavManual(event);
|
54
|
-
});
|
55
|
+
this.handleKeyBoardNavManual(event);
|
55
56
|
}
|
56
57
|
};
|
58
|
+
// Determines how keyboard navigation is to be handled based on the activation type
|
59
|
+
this.attatchEventListeners = () => {
|
60
|
+
this.tabGroup.addEventListener("keydown", this.keydownHandler);
|
61
|
+
};
|
57
62
|
// Determines whether the selected tab is being controlled within the component
|
58
63
|
// or by the user (via selectedTabIndex and onIcTabSelect)
|
59
64
|
this.setControlledMode = () => {
|
@@ -179,15 +184,29 @@ const TabContext = class {
|
|
179
184
|
if (preventDefault)
|
180
185
|
event.preventDefault();
|
181
186
|
};
|
182
|
-
this.
|
187
|
+
this.selectedTab = undefined;
|
183
188
|
this.activationType = "automatic";
|
184
|
-
this.selectedTabIndex = undefined;
|
185
189
|
this.appearance = "dark";
|
186
|
-
this.
|
190
|
+
this.contextId = "default";
|
191
|
+
this.selectedTabIndex = undefined;
|
187
192
|
}
|
188
193
|
updateSelectedTab(newValue) {
|
189
194
|
this.selectedTab = newValue;
|
190
195
|
}
|
196
|
+
componentDidLoad() {
|
197
|
+
this.setControlledMode();
|
198
|
+
this.getChildren();
|
199
|
+
this.linkTabs();
|
200
|
+
this.attatchEventListeners();
|
201
|
+
this.setInitialTab();
|
202
|
+
this.configureTabs();
|
203
|
+
}
|
204
|
+
componentWillUpdate() {
|
205
|
+
this.configureTabs();
|
206
|
+
}
|
207
|
+
disconnectedCallback() {
|
208
|
+
this.tabGroup.removeEventListener("keydown", this.keydownHandler);
|
209
|
+
}
|
191
210
|
tabClickHandler(event) {
|
192
211
|
if (this.selectedTabIndex === undefined &&
|
193
212
|
event.detail.contextId === this.contextId) {
|
@@ -199,24 +218,41 @@ const TabContext = class {
|
|
199
218
|
this.tabSelect.emit({
|
200
219
|
tabIndex: event.detail.position,
|
201
220
|
});
|
221
|
+
event.stopImmediatePropagation();
|
202
222
|
}
|
203
|
-
|
204
|
-
this.
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
223
|
+
tabCreatedHandler(ev) {
|
224
|
+
if (this.tabs && this.tabPanels) {
|
225
|
+
(ev.detail.setFocus ? this.newTabs : this.newTabPanels).push(ev.detail);
|
226
|
+
if (this.newTabs.length === this.newTabPanels.length) {
|
227
|
+
this.tabs.push(...this.newTabs);
|
228
|
+
this.tabPanels.push(...this.newTabPanels);
|
229
|
+
this.enabledTabs = this.getEnabledTabs();
|
230
|
+
this.linkTabs();
|
231
|
+
this.newTabs = [];
|
232
|
+
this.newTabPanels = [];
|
233
|
+
}
|
234
|
+
}
|
210
235
|
}
|
211
|
-
|
212
|
-
this.
|
236
|
+
tabEnabledHandler() {
|
237
|
+
this.enabledTabs = this.getEnabledTabs();
|
213
238
|
}
|
214
|
-
|
215
|
-
|
216
|
-
|
239
|
+
/**
|
240
|
+
* @internal Used to set tab/tab panel IDs when a tab/tab panel has been removed
|
241
|
+
*/
|
242
|
+
async tabRemovedHandler(hadFocus) {
|
243
|
+
this.getChildren();
|
244
|
+
this.enabledTabs = this.getEnabledTabs();
|
245
|
+
this.linkTabs();
|
246
|
+
if (this.tabs[this.selectedTab] && this.tabPanels[this.selectedTab]) {
|
247
|
+
this.tabs[this.selectedTab].selected = true;
|
248
|
+
this.tabPanels[this.selectedTab].selectedTab =
|
249
|
+
this.tabs[this.selectedTab].tabId;
|
217
250
|
}
|
218
251
|
else {
|
219
|
-
this.
|
252
|
+
this.setInitialTab();
|
253
|
+
}
|
254
|
+
if (hadFocus) {
|
255
|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BAAgB;IACd,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,EAAE,CAAC;IACnB,IAAI,CAAC,QAAQ,EAAE,CAAC;IAChB,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAC7B,IAAI,CAAC,aAAa,EAAE,CAAC;IACrB,IAAI,CAAC,aAAa,EAAE,CAAC;GACtB;EAED,mBAAmB;IACjB,IAAI,CAAC,aAAa,EAAE,CAAC;GACtB;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,cAAc,KAAK,QAAQ,EAAE;MACpC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,CAAC,KAAK,KACjD,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CACpC,CAAC;KACH;SAAM;MACL,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,CAAC,KAAK,KACjD,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,CACvC,CAAC;KACH;GACF;EAED,MAAM;IACJ,OAAOC,qBAAa,CAAC;GACtB;;;;;;;;;","names":["IcThemeForegroundEnum","h"],"sources":["./src/components/ic-tab-context/ic-tab-context.tsx"],"sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Prop,\n State,\n h,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcActivationTypes,\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\nimport {\n IcTabClickEventDetail,\n IcTabSelectEventDetail,\n} from \"../ic-tab/ic-tab.types\";\n\n@Component({\n tag: \"ic-tab-context\",\n})\nexport class TabContext {\n @Element() host: HTMLIcTabContextElement;\n\n /**\n * The unique context needed if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * Determines whether tabs have to be manually activated (by pressing 'Enter' or 'Space') when they receive focus using keyboard navigation.\n */\n @Prop() activationType?: IcActivationTypes = \"automatic\";\n\n /**\n * The selected tab to be controlled by the user. Must be used alongside the icTabSelect event to manage tab selection.\n */\n @Prop() selectedTabIndex?: number;\n\n /**\n * The appearance of the tab context, e.g dark, or light.\n */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n @State() selectedTab: number | null;\n\n @Watch(\"selectedTabIndex\")\n updateSelectedTab(newValue: number): void {\n this.selectedTab = newValue;\n }\n\n /**\n * @deprecated This event should not be used anymore. Use icTabSelect instead.\n */\n @Event() tabSelect: EventEmitter<IcTabSelectEventDetail>;\n\n /**\n * Emitted when a user selects a tab.\n */\n @Event() icTabSelect: EventEmitter<IcTabSelectEventDetail>;\n\n @Listen(\"tabClick\")\n tabClickHandler(event: CustomEvent<IcTabClickEventDetail>): void {\n if (\n this.selectedTabIndex === undefined &&\n event.detail.contextId === this.contextId\n ) {\n this.selectedTab = event.detail.position;\n }\n this.icTabSelect.emit({\n tabIndex: event.detail.position,\n });\n this.tabSelect.emit({\n tabIndex: event.detail.position,\n });\n }\n\n private controlledMode: boolean;\n private tabs: HTMLIcTabElement[];\n private enabledTabs: HTMLIcTabElement[];\n private tabPanels: HTMLIcTabPanelElement[];\n private tabGroup: HTMLIcTabGroupElement;\n private focusedTabIndex: number;\n\n // Sets attributes to link tabs and tabpanels\n private linkTabs = () => {\n this.tabs.forEach((tab, index) => {\n const tabId = `ic-tab-${index}-context-${this.contextId}`;\n const tabPanelId = `ic-tab-panel-${index}-context-${this.contextId}`;\n const shared = `ic-tab--${index}-context-${this.contextId}`;\n tab.setAttribute(\"id\", tabId);\n tab.tabId = shared;\n tab.tabPosition = index;\n tab.setAttribute(\"aria-controls\", tabPanelId);\n tab.setAttribute(\"context-id\", this.contextId);\n this.tabPanels[index].setAttribute(\"id\", tabPanelId);\n this.tabPanels[index].panelId = shared;\n this.tabPanels[index].tabPosition = index;\n this.tabPanels[index].setAttribute(\"aria-labelledby\", tabId);\n\n if (this.appearance === IcThemeForegroundEnum.Light) {\n tab.appearance = this.appearance;\n this.tabPanels[index].appearance = this.appearance;\n }\n });\n\n if (this.appearance === IcThemeForegroundEnum.Light) {\n this.tabGroup.appearance = this.appearance;\n }\n };\n\n // Gets tabs and tabpanels with the same context ID\n private getChildren = (): void => {\n this.tabGroup = Array.from(this.host.querySelectorAll(\"ic-tab-group\")).find(\n (tabGroup) => tabGroup.contextId === this.contextId\n );\n this.tabs = Array.from(this.tabGroup.querySelectorAll(\"ic-tab\")).filter(\n (tab) => tab.contextId === this.contextId\n );\n this.enabledTabs = this.getEnabledTabs();\n this.tabPanels = Array.from(this.host.querySelectorAll(\"ic-tab-panel\"));\n };\n\n // Determines how keyboard navigation is to be handled based on the activation type\n private attatchEventListeners = (): void => {\n if (this.activationType === \"automatic\") {\n this.tabGroup.addEventListener(\"keydown\", (event) => {\n this.handleKeyBoardNavAutomatic(event);\n });\n } else {\n this.tabGroup.addEventListener(\"keydown\", (event) => {\n this.handleKeyBoardNavManual(event);\n });\n }\n };\n\n // Determines whether the selected tab is being controlled within the component\n // or by the user (via selectedTabIndex and onIcTabSelect)\n private setControlledMode = (): void => {\n if (this.selectedTabIndex !== undefined) {\n this.controlledMode = true;\n this.selectedTab = this.selectedTabIndex;\n }\n };\n\n // Sets the tab that is selected on initial render\n private setInitialTab = (): void => {\n if (this.controlledMode) {\n this.selectedTab = this.selectedTabIndex;\n this.focusedTabIndex = this.selectedTabIndex;\n } else {\n const firstEnabledTabIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[0].tabId\n );\n this.selectedTab = firstEnabledTabIndex;\n this.focusedTabIndex = firstEnabledTabIndex;\n }\n };\n\n // Passes the selected tab to the tab and tab panel components\n private configureTabs = () => {\n this.enabledTabs.forEach((tab) => {\n tab.selected = tab.tabPosition === this.selectedTab;\n });\n this.tabPanels.forEach((tabPanel) => {\n tabPanel.selectedTab = this.tabs[this.selectedTab].tabId;\n });\n };\n\n private getEnabledTabs = () => {\n return Array.from(this.tabs).filter((child) => !child.disabled);\n };\n\n private getIndexOfEnabledTab = (allTabsIndex: number) => {\n return this.enabledTabs.findIndex(\n (tab) => tab.tabId === this.tabs[allTabsIndex].tabId\n );\n };\n\n // Sets focus on tab and selects it\n private keyboardSelectTab = (enabledTabIndex: number) => {\n const newIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n this.enabledTabs[enabledTabIndex].focus();\n if (!this.controlledMode) {\n this.selectedTab = newIndex;\n } else {\n this.icTabSelect.emit({ tabIndex: newIndex });\n this.tabSelect.emit({ tabIndex: newIndex });\n }\n };\n\n // Sets focus on tab without selecting it (for manual activation)\n private keyboardFocusTab = (enabledTabIndex: number) => {\n const newIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n this.enabledTabs[enabledTabIndex].focus();\n this.focusedTabIndex = newIndex;\n };\n\n private handleKeyBoardNavAutomatic = (event: KeyboardEvent) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.selectedTab);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardSelectTab(0);\n break;\n case \"End\":\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardSelectTab(enabledTabIndex + 1);\n } else {\n this.keyboardSelectTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardSelectTab(enabledTabIndex - 1);\n } else {\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n }\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault) event.preventDefault();\n };\n\n private handleKeyBoardNavManual = (event: KeyboardEvent) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.focusedTabIndex);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardFocusTab(0);\n break;\n case \"End\":\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardFocusTab(enabledTabIndex + 1);\n } else {\n this.keyboardFocusTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardFocusTab(enabledTabIndex - 1);\n } else {\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n }\n break;\n case \"Enter\":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n case \" \":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault) event.preventDefault();\n };\n\n componentDidLoad(): void {\n this.setControlledMode();\n this.getChildren();\n this.linkTabs();\n this.attatchEventListeners();\n this.setInitialTab();\n this.configureTabs();\n }\n\n componentWillUpdate(): void {\n this.configureTabs();\n }\n\n disconnectedCallback(): void {\n if (this.activationType === \"manual\") {\n this.tabGroup.removeEventListener(\"keydown\", (event) =>\n this.handleKeyBoardNavManual(event)\n );\n } else {\n this.tabGroup.removeEventListener(\"keydown\", (event) =>\n this.handleKeyBoardNavAutomatic(event)\n );\n }\n }\n\n render() {\n return <slot></slot>;\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-tab-context.entry.cjs.js","mappings":";;;;;;;MA0Ba,UAAU;;;;;IAIb,iBAAY,GAA4B,EAAE,CAAC;IAC3C,YAAO,GAAuB,EAAE,CAAC;;IAyHjC,aAAQ,GAAG;MACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK;QAC3B,MAAM,KAAK,GAAG,UAAU,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1D,MAAM,UAAU,GAAG,gBAAgB,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;QACrE,MAAM,MAAM,GAAG,WAAW,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5D,MAAM,aAAa,GAAG,YAAY,CAAC;QACnC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,K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AAC;KACtB;IAED,IAAI,QAAQ,EAAE;MACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;KACxC;GACF;EA8LD,MAAM;IACJ,OAAOC,qBAAa,CAAC;GACtB;;;;;;;;;","names":["IcThemeForegroundEnum","h"],"sources":["./src/components/ic-tab-context/ic-tab-context.tsx"],"sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Prop,\n State,\n h,\n Watch,\n Method,\n} from \"@stencil/core\";\nimport {\n IcActivationTypes,\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\nimport {\n IcTabClickEventDetail,\n IcTabSelectEventDetail,\n} from \"../ic-tab/ic-tab.types\";\n\n@Component({\n tag: \"ic-tab-context\",\n})\nexport class TabContext {\n private controlledMode: boolean;\n private enabledTabs: HTMLIcTabElement[];\n private focusedTabIndex: number;\n private newTabPanels: HTMLIcTabPanelElement[] = [];\n private newTabs: HTMLIcTabElement[] = [];\n private tabs: HTMLIcTabElement[];\n private tabGroup: HTMLIcTabGroupElement;\n private tabPanels: HTMLIcTabPanelElement[];\n\n @Element() host: HTMLIcTabContextElement;\n\n @State() selectedTab: number | null;\n\n /**\n * Determines whether tabs have to be manually activated (by pressing 'Enter' or 'Space') when they receive focus using keyboard navigation.\n */\n @Prop() activationType?: IcActivationTypes = \"automatic\";\n\n /**\n * The appearance of the tab context, e.g dark, or light.\n */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /**\n * The unique context needed if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * The selected tab to be controlled by the user. Must be used alongside the icTabSelect event to manage tab selection.\n */\n @Prop() selectedTabIndex?: number;\n\n @Watch(\"selectedTabIndex\")\n updateSelectedTab(newValue: number): void {\n this.selectedTab = newValue;\n }\n\n /**\n * Emitted when a user selects a tab.\n */\n @Event({ bubbles: false }) icTabSelect: EventEmitter<IcTabSelectEventDetail>;\n\n /**\n * @deprecated This event should not be used anymore. Use icTabSelect instead.\n */\n @Event({ bubbles: false }) tabSelect: EventEmitter<IcTabSelectEventDetail>;\n\n componentDidLoad(): void {\n this.setControlledMode();\n this.getChildren();\n this.linkTabs();\n this.attatchEventListeners();\n this.setInitialTab();\n this.configureTabs();\n }\n\n componentWillUpdate(): void {\n this.configureTabs();\n }\n\n disconnectedCallback(): void {\n this.tabGroup.removeEventListener(\"keydown\", this.keydownHandler);\n }\n\n @Listen(\"tabClick\")\n tabClickHandler(event: CustomEvent<IcTabClickEventDetail>): void {\n if (\n this.selectedTabIndex === undefined &&\n event.detail.contextId === this.contextId\n ) {\n this.selectedTab = event.detail.position;\n }\n this.icTabSelect.emit({\n tabIndex: event.detail.position,\n });\n this.tabSelect.emit({\n tabIndex: event.detail.position,\n });\n event.stopImmediatePropagation();\n }\n\n @Listen(\"tabCreated\")\n @Listen(\"tabPanelCreated\")\n tabCreatedHandler(ev: CustomEvent): void {\n if (this.tabs && this.tabPanels) {\n (ev.detail.setFocus ? this.newTabs : this.newTabPanels).push(ev.detail);\n if (this.newTabs.length === this.newTabPanels.length) {\n this.tabs.push(...this.newTabs);\n this.tabPanels.push(...this.newTabPanels);\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n this.newTabs = [];\n this.newTabPanels = [];\n }\n }\n }\n\n @Listen(\"tabEnabled\")\n tabEnabledHandler(): void {\n this.enabledTabs = this.getEnabledTabs();\n }\n\n /**\n * @internal Used to set tab/tab panel IDs when a tab/tab panel has been removed\n */\n @Method()\n async tabRemovedHandler(hadFocus?: boolean): Promise<void> {\n this.getChildren();\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n if (this.tabs[this.selectedTab] && this.tabPanels[this.selectedTab]) {\n this.tabs[this.selectedTab].selected = true;\n this.tabPanels[this.selectedTab].selectedTab =\n this.tabs[this.selectedTab].tabId;\n } else {\n this.setInitialTab();\n }\n\n if (hadFocus) {\n this.tabs[this.selectedTab].setFocus();\n }\n }\n\n // Sets attributes to link tab-group, tabs and tab-panels\n private linkTabs = () => {\n this.tabs.forEach((tab, index) => {\n const tabId = `ic-tab-${index}-context-${this.contextId}`;\n const tabPanelId = `ic-tab-panel-${index}-context-${this.contextId}`;\n const shared = `ic-tab--${index}-context-${this.contextId}`;\n const contextIdAttr = \"context-id\";\n tab.setAttribute(\"id\", tabId);\n tab.tabId = shared;\n tab.tabPosition = index;\n tab.setAttribute(\"aria-controls\", tabPanelId);\n tab.setAttribute(contextIdAttr, this.contextId);\n this.tabGroup.setAttribute(contextIdAttr, this.contextId);\n this.tabPanels[index].setAttribute(\"id\", tabPanelId);\n this.tabPanels[index].panelId = shared;\n this.tabPanels[index].tabPosition = index;\n this.tabPanels[index].setAttribute(\"aria-labelledby\", tabId);\n this.tabPanels[index].setAttribute(contextIdAttr, this.contextId);\n\n if (this.appearance === IcThemeForegroundEnum.Light) {\n tab.appearance = this.appearance;\n this.tabPanels[index].appearance = this.appearance;\n }\n });\n\n if (this.appearance === IcThemeForegroundEnum.Light) {\n this.tabGroup.appearance = this.appearance;\n }\n };\n\n // Gets tabs and tabpanels with the same context ID\n // Using querySelector to selector the children in relation to the host\n private getChildren = (): void => {\n this.tabGroup = this.host.querySelector(\"ic-tab-group\");\n this.tabs = Array.from(this.tabGroup.querySelectorAll(\"ic-tab\"));\n this.tabPanels = Array.from(this.host.children).filter(\n (child) => child.tagName === \"IC-TAB-PANEL\"\n ) as HTMLIcTabPanelElement[];\n this.enabledTabs = this.getEnabledTabs();\n };\n\n private keydownHandler = (event: KeyboardEvent) => {\n if (this.activationType === \"automatic\") {\n this.handleKeyBoardNavAutomatic(event);\n } else {\n this.handleKeyBoardNavManual(event);\n }\n };\n\n // Determines how keyboard navigation is to be handled based on the activation type\n private attatchEventListeners = (): void => {\n this.tabGroup.addEventListener(\"keydown\", this.keydownHandler);\n };\n\n // Determines whether the selected tab is being controlled within the component\n // or by the user (via selectedTabIndex and onIcTabSelect)\n private setControlledMode = (): void => {\n if (this.selectedTabIndex !== undefined) {\n this.controlledMode = true;\n this.selectedTab = this.selectedTabIndex;\n }\n };\n\n // Sets the tab that is selected on initial render\n private setInitialTab = (): void => {\n if (this.controlledMode) {\n this.selectedTab = this.selectedTabIndex;\n this.focusedTabIndex = this.selectedTabIndex;\n } else {\n const firstEnabledTabIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[0].tabId\n );\n this.selectedTab = firstEnabledTabIndex;\n this.focusedTabIndex = firstEnabledTabIndex;\n }\n };\n\n // Passes the selected tab to the tab and tab panel components\n private configureTabs = () => {\n this.enabledTabs.forEach((tab) => {\n tab.selected = tab.tabPosition === this.selectedTab;\n });\n this.tabPanels.forEach((tabPanel) => {\n tabPanel.selectedTab = this.tabs[this.selectedTab].tabId;\n });\n };\n\n private getEnabledTabs = () => {\n return Array.from(this.tabs).filter((child) => !child.disabled);\n };\n\n private getIndexOfEnabledTab = (allTabsIndex: number) => {\n return this.enabledTabs.findIndex(\n (tab) => tab.tabId === this.tabs[allTabsIndex].tabId\n );\n };\n\n // Sets focus on tab and selects it\n private keyboardSelectTab = (enabledTabIndex: number) => {\n const newIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n this.enabledTabs[enabledTabIndex].focus();\n if (!this.controlledMode) {\n this.selectedTab = newIndex;\n } else {\n this.icTabSelect.emit({ tabIndex: newIndex });\n this.tabSelect.emit({ tabIndex: newIndex });\n }\n };\n\n // Sets focus on tab without selecting it (for manual activation)\n private keyboardFocusTab = (enabledTabIndex: number) => {\n const newIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n this.enabledTabs[enabledTabIndex].focus();\n this.focusedTabIndex = newIndex;\n };\n\n private handleKeyBoardNavAutomatic = (event: KeyboardEvent) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.selectedTab);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardSelectTab(0);\n break;\n case \"End\":\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardSelectTab(enabledTabIndex + 1);\n } else {\n this.keyboardSelectTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardSelectTab(enabledTabIndex - 1);\n } else {\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n }\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault) event.preventDefault();\n };\n\n private handleKeyBoardNavManual = (event: KeyboardEvent) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.focusedTabIndex);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardFocusTab(0);\n break;\n case \"End\":\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardFocusTab(enabledTabIndex + 1);\n } else {\n this.keyboardFocusTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardFocusTab(enabledTabIndex - 1);\n } else {\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n }\n break;\n case \"Enter\":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n case \" \":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault) event.preventDefault();\n };\n\n render() {\n return <slot></slot>;\n }\n}\n"],"version":3}
|