@ukic/web-components 2.1.0-beta.2 → 2.1.0-beta.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +8 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-8bc3b6d2.js → helpers-81484ceb.js} +2 -2
- package/dist/cjs/helpers-81484ceb.js.map +1 -0
- package/dist/cjs/ic-alert.cjs.entry.js +3 -1
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +26 -10
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +17 -4
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +3 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +66 -0
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -0
- 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.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +25 -20
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -3
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +12 -2
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +16 -19
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +3 -3
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +101 -13
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +162 -41
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +6 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +3 -3
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +3 -3
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-3ef30d9d.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/dismiss-icon.svg +3 -0
- package/dist/collection/assets/warning-icon-outline.svg +3 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ic-alert/ic-alert.js +20 -1
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.js +2 -2
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-card/ic-card.css +58 -14
- package/dist/collection/components/ic-card/ic-card.js +64 -8
- package/dist/collection/components/ic-card/ic-card.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +20 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +595 -0
- package/dist/collection/components/ic-chip/ic-chip.js +199 -0
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -0
- package/dist/collection/components/ic-chip/ic-chip.test.a11y.js +11 -0
- package/dist/collection/components/ic-chip/ic-chip.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-chip/ic-chip.types.js +2 -0
- package/dist/collection/components/ic-chip/ic-chip.types.js.map +1 -0
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
- package/dist/collection/components/ic-data-row/ic-data-row.css +12 -0
- package/dist/collection/components/ic-divider/ic-divider.js +1 -1
- package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
- package/dist/collection/components/ic-footer/ic-footer.js +9 -6
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
- package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +2 -2
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
- package/dist/collection/components/ic-hero/ic-hero.js +1 -1
- package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +0 -2
- package/dist/collection/components/ic-link/ic-link.js +1 -1
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +38 -2
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +39 -5
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.js +31 -23
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +2 -2
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +4 -4
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +7 -8
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +32 -0
- package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +28 -27
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.css +1 -1
- package/dist/collection/components/ic-select/ic-select.js +1 -1
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +6 -3
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
- 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 +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.css +120 -24
- package/dist/collection/components/ic-step/ic-step.js +268 -27
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.types.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper-test-examples.js +74 -0
- package/dist/collection/components/ic-stepper/ic-stepper-test-examples.js.map +1 -0
- package/dist/collection/components/ic-stepper/ic-stepper.css +15 -1
- package/dist/collection/components/ic-stepper/ic-stepper.js +206 -39
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.test.a11y.js +13 -1
- package/dist/collection/components/ic-stepper/ic-stepper.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.js +5 -2
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +29 -2
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.js +2 -2
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-theme/ic-theme.js +8 -5
- package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.css +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +22 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +8 -3
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +2 -2
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/normalize.css +440 -0
- package/dist/collection/testspec.setup.js +8 -0
- package/dist/collection/testspec.setup.js.map +1 -1
- package/dist/collection/utils/helpers.js +1 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +2 -2
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-alert.js +3 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-button2.js +2 -2
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +40 -6
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +2 -0
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.d.ts +11 -0
- package/dist/components/ic-chip.js +99 -0
- package/dist/components/ic-chip.js.map +1 -0
- 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.map +1 -1
- package/dist/components/ic-data-row.js +1 -1
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +3 -3
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +21 -6
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu2.js +23 -18
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +3 -3
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +2 -2
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +11 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +18 -21
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js.map +1 -1
- package/dist/components/ic-select.js +3 -3
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +2 -2
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-status-tag.js +5 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +117 -16
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +169 -41
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +6 -1
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +1 -1
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +3 -3
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +3 -3
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-tooltip2.js +7 -3
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +4 -4
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/core/core.css +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/normalize.css +440 -0
- package/dist/core/{p-5831bb8e.entry.js → p-050e1e7b.entry.js} +2 -2
- package/dist/core/{p-5831bb8e.entry.js.map → p-050e1e7b.entry.js.map} +1 -1
- package/dist/core/{p-31a8595f.entry.js → p-09592918.entry.js} +2 -2
- package/dist/core/{p-31a8595f.entry.js.map → p-09592918.entry.js.map} +1 -1
- package/dist/core/{p-347ec49e.entry.js → p-0b00f848.entry.js} +2 -2
- package/dist/core/p-0b00f848.entry.js.map +1 -0
- package/dist/core/p-16698d3e.entry.js +2 -0
- package/dist/core/p-16698d3e.entry.js.map +1 -0
- package/dist/core/p-18a9beea.entry.js +2 -0
- package/dist/core/p-18a9beea.entry.js.map +1 -0
- package/dist/core/{p-7b39977f.entry.js → p-1da1f2f3.entry.js} +2 -2
- package/dist/core/p-1da1f2f3.entry.js.map +1 -0
- package/dist/core/{p-2f114521.entry.js → p-217fa7de.entry.js} +2 -2
- package/dist/core/{p-2f114521.entry.js.map → p-217fa7de.entry.js.map} +1 -1
- package/dist/core/{p-cc83692e.entry.js → p-23bf0b7a.entry.js} +2 -2
- package/dist/core/{p-cc83692e.entry.js.map → p-23bf0b7a.entry.js.map} +1 -1
- package/dist/core/{p-558552f8.entry.js → p-27554319.entry.js} +2 -2
- package/dist/core/p-27554319.entry.js.map +1 -0
- package/dist/core/p-2ca96f69.entry.js +2 -0
- package/dist/core/p-2ca96f69.entry.js.map +1 -0
- package/dist/core/{p-dd3c3e3c.entry.js → p-3f4d632c.entry.js} +2 -2
- package/dist/core/p-3f4d632c.entry.js.map +1 -0
- package/dist/core/p-3f9cdcdd.entry.js +2 -0
- package/dist/core/{p-c4d3c18c.entry.js.map → p-3f9cdcdd.entry.js.map} +1 -1
- package/dist/core/p-4f1a7195.entry.js +2 -0
- package/dist/core/p-4f1a7195.entry.js.map +1 -0
- package/dist/core/p-5616cfb8.entry.js +2 -0
- package/dist/core/p-5616cfb8.entry.js.map +1 -0
- package/dist/core/p-66cad84e.entry.js +2 -0
- package/dist/core/p-66cad84e.entry.js.map +1 -0
- package/dist/core/p-6be5e06b.entry.js.map +1 -1
- package/dist/core/p-6d0eaaeb.entry.js.map +1 -1
- package/dist/core/p-6f442942.entry.js +2 -0
- package/dist/core/p-6f442942.entry.js.map +1 -0
- package/dist/core/{p-60ffb73e.entry.js → p-789e197b.entry.js} +2 -2
- package/dist/core/p-789e197b.entry.js.map +1 -0
- package/dist/core/{p-4c72f3a9.entry.js → p-7ba184da.entry.js} +2 -2
- package/dist/core/{p-4c72f3a9.entry.js.map → p-7ba184da.entry.js.map} +0 -0
- package/dist/core/p-80cd0a2d.entry.js +2 -0
- package/dist/core/p-80cd0a2d.entry.js.map +1 -0
- package/dist/core/{p-2b5c9143.entry.js → p-8470c255.entry.js} +2 -2
- package/dist/core/{p-2b5c9143.entry.js.map → p-8470c255.entry.js.map} +1 -1
- package/dist/core/p-89a925f8.entry.js +2 -0
- package/dist/core/p-89a925f8.entry.js.map +1 -0
- package/dist/core/{p-ecfb2e6b.entry.js → p-930cd4cc.entry.js} +2 -2
- package/dist/core/{p-ecfb2e6b.entry.js.map → p-930cd4cc.entry.js.map} +1 -1
- package/dist/core/{p-0118400b.entry.js → p-9b4022d7.entry.js} +2 -2
- package/dist/core/p-9b4022d7.entry.js.map +1 -0
- package/dist/core/p-9e684c58.entry.js +2 -0
- package/dist/core/p-9e684c58.entry.js.map +1 -0
- package/dist/core/{p-5e261268.entry.js → p-9fbceeb2.entry.js} +2 -2
- package/dist/core/{p-5e261268.entry.js.map → p-9fbceeb2.entry.js.map} +0 -0
- package/dist/core/p-a2d3e955.entry.js.map +1 -1
- package/dist/core/{p-9cd04875.entry.js → p-a5948fc3.entry.js} +2 -2
- package/dist/core/{p-9cd04875.entry.js.map → p-a5948fc3.entry.js.map} +1 -1
- package/dist/core/{p-23831891.js → p-a8ac8f72.js} +2 -2
- package/dist/core/p-a8ac8f72.js.map +1 -0
- package/dist/core/{p-6b34d98f.entry.js → p-ae02b008.entry.js} +2 -2
- package/dist/core/{p-6b34d98f.entry.js.map → p-ae02b008.entry.js.map} +1 -1
- package/dist/core/p-bb106092.entry.js +2 -0
- package/dist/core/p-bb106092.entry.js.map +1 -0
- package/dist/core/{p-6fba90ee.entry.js → p-bbe00cb1.entry.js} +2 -2
- package/dist/core/{p-6fba90ee.entry.js.map → p-bbe00cb1.entry.js.map} +1 -1
- package/dist/core/{p-b3dec76d.entry.js → p-c1d78a64.entry.js} +2 -2
- package/dist/core/{p-b3dec76d.entry.js.map → p-c1d78a64.entry.js.map} +1 -1
- package/dist/core/{p-0b125f26.entry.js → p-c320fa70.entry.js} +2 -2
- package/dist/core/{p-0b125f26.entry.js.map → p-c320fa70.entry.js.map} +0 -0
- package/dist/core/p-cadb531f.entry.js.map +1 -1
- package/dist/core/p-d599cf4f.entry.js +2 -0
- package/dist/core/p-d599cf4f.entry.js.map +1 -0
- package/dist/core/{p-6f6bd657.entry.js → p-e192e25d.entry.js} +2 -2
- package/dist/core/{p-6f6bd657.entry.js.map → p-e192e25d.entry.js.map} +1 -1
- package/dist/core/{p-7f04e382.entry.js → p-e810f48c.entry.js} +2 -2
- package/dist/core/{p-7f04e382.entry.js.map → p-e810f48c.entry.js.map} +1 -1
- package/dist/core/p-e93e9aa3.entry.js.map +1 -1
- package/dist/core/p-eaea567e.entry.js +2 -0
- package/dist/core/p-eaea567e.entry.js.map +1 -0
- package/dist/core/p-f5b045a5.entry.js +2 -0
- package/dist/core/p-f5b045a5.entry.js.map +1 -0
- package/dist/core/{p-10da19d2.entry.js → p-f760198e.entry.js} +2 -2
- package/dist/core/{p-10da19d2.entry.js.map → p-f760198e.entry.js.map} +0 -0
- package/dist/core/{p-c6dd4f47.entry.js → p-fd0c6039.entry.js} +2 -2
- package/dist/core/p-fd0c6039.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-3d41833c.js → helpers-46e5291b.js} +3 -3
- package/dist/esm/helpers-46e5291b.js.map +1 -0
- package/dist/esm/ic-alert.entry.js +3 -1
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +26 -10
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +17 -4
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +3 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +62 -0
- package/dist/esm/ic-chip.entry.js.map +1 -0
- 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.map +1 -1
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +3 -3
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +25 -20
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +3 -3
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +12 -2
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +16 -19
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +3 -3
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +4 -3
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +101 -13
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +162 -41
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +6 -1
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +1 -1
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +3 -3
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +3 -3
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-1500de1f.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-alert/ic-alert.d.ts +5 -1
- package/dist/types/components/ic-card/ic-card.d.ts +20 -3
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +5 -1
- package/dist/types/components/ic-chip/ic-chip.d.ts +40 -0
- package/dist/types/components/ic-chip/ic-chip.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-chip/ic-chip.types.d.ts +2 -0
- package/dist/types/components/ic-footer/ic-footer.d.ts +2 -2
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +5 -0
- package/dist/types/components/ic-menu/ic-menu.d.ts +5 -4
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +1 -1
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +5 -1
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +3 -4
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +1 -1
- package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
- package/dist/types/components/ic-step/ic-step.d.ts +35 -6
- package/dist/types/components/ic-step/ic-step.types.d.ts +2 -0
- package/dist/types/components/ic-stepper/ic-stepper-test-examples.d.ts +4 -0
- package/dist/types/components/ic-stepper/ic-stepper.d.ts +23 -6
- package/dist/types/components/ic-tab/ic-tab.d.ts +1 -1
- package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +6 -2
- package/dist/types/components/ic-theme/ic-theme.d.ts +2 -2
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +4 -0
- package/dist/types/components.d.ts +161 -43
- package/dist/types/testspec.setup.d.ts +1 -0
- package/hydrate/index.js +572 -210
- package/package.json +3 -3
- package/dist/cjs/helpers-8bc3b6d2.js.map +0 -1
- package/dist/core/p-001651fc.entry.js +0 -2
- package/dist/core/p-001651fc.entry.js.map +0 -1
- package/dist/core/p-0118400b.entry.js.map +0 -1
- package/dist/core/p-07cd789d.entry.js +0 -2
- package/dist/core/p-07cd789d.entry.js.map +0 -1
- package/dist/core/p-23831891.js.map +0 -1
- package/dist/core/p-2e9f3011.entry.js +0 -2
- package/dist/core/p-2e9f3011.entry.js.map +0 -1
- package/dist/core/p-347ec49e.entry.js.map +0 -1
- package/dist/core/p-39ae284e.entry.js +0 -2
- package/dist/core/p-39ae284e.entry.js.map +0 -1
- package/dist/core/p-558552f8.entry.js.map +0 -1
- package/dist/core/p-60ffb73e.entry.js.map +0 -1
- package/dist/core/p-69650186.entry.js +0 -2
- package/dist/core/p-69650186.entry.js.map +0 -1
- package/dist/core/p-7093d214.entry.js +0 -2
- package/dist/core/p-7093d214.entry.js.map +0 -1
- package/dist/core/p-7577c6a3.entry.js +0 -2
- package/dist/core/p-7577c6a3.entry.js.map +0 -1
- package/dist/core/p-7b39977f.entry.js.map +0 -1
- package/dist/core/p-7f632414.entry.js +0 -2
- package/dist/core/p-7f632414.entry.js.map +0 -1
- package/dist/core/p-88b15005.entry.js +0 -2
- package/dist/core/p-88b15005.entry.js.map +0 -1
- package/dist/core/p-898607d0.entry.js +0 -2
- package/dist/core/p-898607d0.entry.js.map +0 -1
- package/dist/core/p-ac43322e.entry.js +0 -2
- package/dist/core/p-ac43322e.entry.js.map +0 -1
- package/dist/core/p-c4d3c18c.entry.js +0 -2
- package/dist/core/p-c6dd4f47.entry.js.map +0 -1
- package/dist/core/p-cf5e8a55.entry.js +0 -2
- package/dist/core/p-cf5e8a55.entry.js.map +0 -1
- package/dist/core/p-dd3c3e3c.entry.js.map +0 -1
- package/dist/core/p-e4551421.entry.js +0 -2
- package/dist/core/p-e4551421.entry.js.map +0 -1
- package/dist/esm/helpers-3d41833c.js.map +0 -1
@@ -5,45 +5,133 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-3ef30d9d.js');
|
6
6
|
const checkIcon = require('./check-icon-999d9877.js');
|
7
7
|
|
8
|
-
const
|
8
|
+
const warningIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
9
|
+
<path d="M7.99935 4.32666L13.0193 13H2.97935L7.99935 4.32666ZM7.99935 1.66666L0.666016 14.3333H15.3327L7.99935 1.66666ZM8.66602 11H7.33268V12.3333H8.66602V11ZM8.66602 6.99999H7.33268V9.66666H8.66602V6.99999Z" fill="currentColor"/>
|
10
|
+
</svg>`;
|
11
|
+
|
12
|
+
const icStepCss = ":host{display:flex;flex:auto}.step{display:flex;flex:1 1 0}.step-icon{display:flex;justify-content:center}.step-title,.step-subtitle,.step-status,.next-step{white-space:pre-line}.visually-hidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}:host(.compact){-moz-column-gap:var(--ic-space-sm);column-gap:var(--ic-space-sm);--compact-step-inner-color:var(--ic-theme-primary);--compact-step-circular-line-width:var(--ic-space-xxs)}:host(.compact) .step{-moz-column-gap:var(--ic-space-sm);column-gap:var(--ic-space-sm)}:host(.compact) .step:not(.current){display:none;opacity:0;visibility:hidden}.compact-step-progress-indicator{margin:var(--ic-space-xs) 0 0}:host(.compact) .step-title-area{display:flex;flex-direction:column;width:228px}.info-line{display:flex;-moz-column-gap:var(--ic-space-xs);column-gap:var(--ic-space-xs)}.step-status{display:flex;color:var(--ic-color-secondary-text);-moz-column-gap:var(--ic-space-xxxs);column-gap:var(--ic-space-xxxs)}.compact-step-completed .step-status{color:var(--ic-status-success)}.compact-step-disabled :is(.step-title,.step-status){color:var(--ic-color-tertiary-text)}.step-num{color:var(--ic-color-secondary-text);white-space:nowrap}:host(.compact) .step-icon{margin:var(--ic-space-xxxs)}:host(.compact) .step-icon svg{width:16px;height:16px}:host(.default) .step{flex-direction:column}:host(.default.last-step){flex-grow:initial}.step-top{display:flex;width:100%;align-items:center;align-self:flex-start;height:40px}:host(.default) .step-icon{border-radius:50%}.step-icon-inner{width:var(--ic-space-xl);height:var(--ic-space-xl);display:flex;justify-content:center;align-items:center;border-radius:50%}:host(.default) .current{color:var(--ic-theme-primary)}:host(.default) .step-title-area{margin:var(--ic-space-xs) 0;padding-right:var(--ic-space-xs);width:100%}:host(.default) .step-title,.step-subtitle{width:-moz-fit-content;width:fit-content}.step-subtitle{color:var(--ic-color-tertiary-text)}.current .step-subtitle{color:var(--ic-color-primary-text)}:host(.default) .completed{color:var(--ic-status-success)}.active .step-icon-inner{box-shadow:inset var(--ic-architectural-200) 0 0 0 2px}.current .step-icon-inner{background-color:var(--ic-theme-primary);color:white}.disabled{color:var(--ic-architectural-200)}.disabled .step-icon-inner{border:1px dashed var(--ic-architectural-200);width:calc(var(--ic-space-xl) - var(--ic-space-xxxs));height:calc(var(--ic-space-xl) - var(--ic-space-xxxs))}.disabled .step-title-area{color:var(--ic-color-tertiary-text)}.completed .step-icon-inner{background:var(--ic-status-success);box-shadow:inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);border-radius:100%}:host(.default) .current .step-icon{border:var(--ic-space-xxxs) solid var(--ic-theme-primary);padding:var(--ic-space-xxxs);margin:0 calc(-1 * var(--ic-space-xxxs));}.step-connect{height:var(--ic-space-xxxs);background-color:var(--ic-architectural-200);margin:0 var(--ic-space-xs);border-radius:var(--ic-space-xxs);width:100%}.aligned-full-width.step-connect{min-width:100px;width:100%}.disabled .step-connect{height:0;background-color:rgb(0 0 0 / 0%);border-top:2px dashed var(--ic-architectural-200);border-radius:0}.completed .step-connect{background-color:var(--ic-status-success)}.step-connect-inner{width:70%;display:flex;flex:auto;height:var(--ic-space-xxxs);border-radius:var(--ic-space-xxs);background-color:var(--ic-theme-primary)}.step-icon-inner .check-icon{padding-top:var(--ic-space-xxs)}.step-icon-inner .check-icon svg{width:var(--ic-space-md);height:auto}.step-icon-inner .check-icon>svg>path{fill:var(--ic-color-white-text)}@media (forced-colors: active){.compact-step-disabled :is(.step-title,.step-status){color:GrayText}.step-connect:not(.disabled .step-connect){border:var(--ic-hc-border)}.active .step-icon-inner,.completed .step-icon-inner,.current .step-icon-inner{forced-color-adjust:none;box-shadow:inset canvastext 0 0 0 2px;background-color:transparent;color:canvastext}:host(.default) .current .step-icon{padding:0;border:none}.disabled,.disabled .step-title-area{color:GrayText}.step-connect-inner,.completed .step-connect{background-color:canvastext}.step-icon-inner .check-icon>svg>path{fill:canvastext}}";
|
9
13
|
|
10
14
|
const Step = class {
|
11
15
|
constructor(hostRef) {
|
12
16
|
index.registerInstance(this, hostRef);
|
13
|
-
this.
|
17
|
+
this.variant = undefined;
|
14
18
|
this.stepTitle = undefined;
|
15
19
|
this.stepSubtitle = undefined;
|
20
|
+
this.stepStatus = undefined;
|
21
|
+
this.stepType = "active";
|
22
|
+
this.current = false;
|
23
|
+
this.compactStepStyling = undefined;
|
16
24
|
this.stepNum = undefined;
|
17
25
|
this.lastStep = undefined;
|
26
|
+
this.lastStepNum = undefined;
|
27
|
+
this.nextStepTitle = undefined;
|
28
|
+
this.progress = undefined;
|
18
29
|
}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
icon = (index.h("ic-typography", { variant: "subtitle-small" }, index.h("span", { class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
|
30
|
+
stepTypeChangeHandler() {
|
31
|
+
if (this.variant === "compact" && this.stepType === "current") {
|
32
|
+
this.current = true;
|
23
33
|
}
|
24
34
|
else {
|
25
|
-
|
35
|
+
this.current = false;
|
26
36
|
}
|
37
|
+
}
|
38
|
+
render() {
|
39
|
+
// ARIA LABEL
|
27
40
|
let ariaLabel = "";
|
28
41
|
if (this.stepType === "completed") {
|
29
42
|
ariaLabel = ". Completed step";
|
30
43
|
}
|
31
44
|
else if (this.stepType === "disabled") {
|
32
|
-
ariaLabel = ".
|
45
|
+
ariaLabel = ". Non-required step";
|
46
|
+
}
|
47
|
+
else if (this.stepStatus === "required") {
|
48
|
+
ariaLabel = ". Required step";
|
49
|
+
}
|
50
|
+
else if (this.stepStatus === "optional") {
|
51
|
+
ariaLabel = ". Optional step";
|
52
|
+
}
|
53
|
+
// STEP STATUS
|
54
|
+
let stepStatus;
|
55
|
+
if (this.stepStatus) {
|
56
|
+
stepStatus = this.stepStatus[0].toUpperCase() + this.stepStatus.slice(1);
|
57
|
+
}
|
58
|
+
// STEP TYPE
|
59
|
+
let stepType;
|
60
|
+
if (this.stepType === "disabled" ||
|
61
|
+
this.compactStepStyling === "disabled") {
|
62
|
+
stepType = "Not required";
|
63
|
+
}
|
64
|
+
else if (this.compactStepStyling === "completed") {
|
65
|
+
stepType = "Completed";
|
66
|
+
}
|
67
|
+
// STATUS ICON FOR COMPACT STEP
|
68
|
+
let statusIcon;
|
69
|
+
if (this.stepType === "completed" ||
|
70
|
+
this.compactStepStyling === "completed") {
|
71
|
+
statusIcon = (index.h("span", { class: "check-icon step-icon", "aria-hidden": "true", innerHTML: checkIcon.Check }));
|
72
|
+
}
|
73
|
+
else if (this.stepType === "disabled" ||
|
74
|
+
this.compactStepStyling === "disabled") {
|
75
|
+
statusIcon = (index.h("span", { class: "warning-icon step-icon", "aria-hidden": "true", innerHTML: warningIcon }));
|
76
|
+
}
|
77
|
+
// COMPACT STEP COMPONENT
|
78
|
+
const compactStep = (index.h("div", { class: {
|
79
|
+
["step"]: true,
|
80
|
+
["current"]: this.current,
|
81
|
+
[`compact-step-${this.compactStepStyling}`]: !!this.compactStepStyling,
|
82
|
+
} }, index.h("ic-loading-indicator", { class: {
|
83
|
+
"compact-step-progress-indicator": true,
|
84
|
+
"not-required": this.stepType === "disabled" ||
|
85
|
+
this.compactStepStyling === "disabled",
|
86
|
+
}, "aria-hidden": "true", size: "small", "inner-label": this.stepNum, progress: this.progress }), index.h("div", { class: "step-title-area" }, index.h("ic-typography", { variant: "h4", class: "step-title" }, this.stepTitle), index.h("div", { class: "info-line" }, index.h("ic-typography", { variant: "caption", class: "step-num" }, `${this.stepNum} of ${this.lastStepNum}`, index.h("span", { class: "visually-hidden" }, " steps")), (this.stepSubtitle ||
|
87
|
+
this.stepType === "completed" ||
|
88
|
+
this.stepType === "disabled" ||
|
89
|
+
(this.variant === "compact" &&
|
90
|
+
!!this.compactStepStyling &&
|
91
|
+
this.compactStepStyling !== "active") ||
|
92
|
+
!!this.stepStatus) && (index.h("div", { class: "step-status" }, statusIcon && statusIcon, (this.stepSubtitle || stepType) && (index.h("ic-typography", { variant: "caption" }, this.stepSubtitle !== null &&
|
93
|
+
this.stepSubtitle !== undefined
|
94
|
+
? this.stepSubtitle
|
95
|
+
: this.stepType === "disabled" ||
|
96
|
+
(this.variant === "compact" &&
|
97
|
+
this.compactStepStyling === "disabled") ||
|
98
|
+
this.stepType === "completed" ||
|
99
|
+
(this.variant === "compact" &&
|
100
|
+
this.compactStepStyling === "completed")
|
101
|
+
? stepType
|
102
|
+
: this.stepStatus && stepStatus))))), this.lastStep ? (index.h("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Last step")) : (this.nextStepTitle !== undefined && (index.h("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Next", index.h("span", { class: "visually-hidden" }, " step is"), ":", " ", this.nextStepTitle))))));
|
103
|
+
// ICON FOR DEFAULT STEP
|
104
|
+
let icon;
|
105
|
+
if (this.stepType !== "completed") {
|
106
|
+
icon = (index.h("ic-typography", { variant: "subtitle-small" }, index.h("span", { class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
icon = (index.h("div", { class: "step-icon-inner", "aria-hidden": "true" }, index.h("span", { class: "check-icon", innerHTML: checkIcon.Check })));
|
33
110
|
}
|
111
|
+
// STEP CONNECT FOR DEFAULT STEP
|
34
112
|
const partialBar = this.stepType === "current" && (index.h("div", { class: "step-connect-inner" }));
|
35
113
|
const finalStep = !this.lastStep && (index.h("div", { class: {
|
36
114
|
["step-connect"]: true,
|
37
|
-
["aligned-full-width"]: this.el.parentElement.classList.contains("
|
115
|
+
["aligned-full-width"]: this.el.parentElement.classList.contains("default") &&
|
116
|
+
!this.el.parentElement.classList.contains("aligned-left"),
|
38
117
|
} }, partialBar));
|
39
|
-
|
40
|
-
|
41
|
-
} }, index.h("div", { class: {
|
118
|
+
// DEFAULT STEP COMPONENT
|
119
|
+
const defaultStep = (index.h("div", { class: {
|
42
120
|
["step"]: true,
|
43
121
|
[`${this.stepType}`]: true,
|
44
|
-
} }, index.h("div", { class: "step-top" }, index.h("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle) && (index.h("div", { class: "step-title-area" }, this.stepTitle && (index.h("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepSubtitle && (index.h("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle
|
122
|
+
} }, index.h("div", { class: "step-top" }, index.h("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle || this.stepStatus) && (index.h("div", { class: "step-title-area" }, this.stepTitle && (index.h("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepTitle && (this.stepSubtitle || this.stepStatus) && (index.h("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle !== null && this.stepSubtitle !== undefined
|
123
|
+
? this.stepSubtitle
|
124
|
+
: stepStatus))))));
|
125
|
+
return (index.h(index.Host, { role: "listitem", "aria-label": `Step ${this.stepNum}${ariaLabel}`, "aria-current": (this.current || this.stepType === "current") && "step", class: {
|
126
|
+
["aligned-full-width"]: this.el.parentElement.classList.contains("default") &&
|
127
|
+
!this.el.parentElement.classList.contains("aligned-left"),
|
128
|
+
[`${this.variant}`]: true,
|
129
|
+
} }, this.variant === "compact" ? compactStep : defaultStep));
|
45
130
|
}
|
46
131
|
get el() { return index.getElement(this); }
|
132
|
+
static get watchers() { return {
|
133
|
+
"stepType": ["stepTypeChangeHandler"]
|
134
|
+
}; }
|
47
135
|
};
|
48
136
|
Step.style = icStepCss;
|
49
137
|
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-step.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,uoFAAuoF;;MCS5oF,IAAI;;;oBAKkB,QAAQ;;;;;;EAsBzC,MAAM;IACJ,IAAI,IAAI,CAAC;IACT,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,EAAE;MACjC,IAAI,IACFA,2BAAe,OAAO,EAAC,gBAAgB,IACrCA,kBAAM,KAAK,EAAC,iBAAiB,iBAAa,MAAM,IAC7C,IAAI,CAAC,OAAO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,CACN,EACL,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,YAAY,MACnCA,iBAAK,KAAK,EAAC,iBAAiB,IACzB,IAAI,CAAC,SAAS,KACbA,2BAAe,OAAO,EAAC,gBAAgB,EAAC,KAAK,EAAC,YAAY,IACvD,IAAI,CAAC,SAAS,CACD,CACjB,EACA,IAAI,CAAC,YAAY,KAChBA,2BAAe,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,eAAe,IACnD,IAAI,CAAC,YAAY,CACJ,CACjB,CACG,CACP,CACG,CACD,EACP;GACH;;;;;;;","names":["h","checkIcon","Host"],"sources":["./src/components/ic-step/ic-step.css?tag=ic-step&encapsulation=shadow","./src/components/ic-step/ic-step.tsx"],"sourcesContent":[":host {\n display: flex;\n flex: auto;\n}\n\n:host(.last-step) {\n flex-grow: initial;\n}\n\n.step {\n display: flex;\n flex-direction: column;\n flex: 1 1 0;\n}\n\n.step-top {\n display: flex;\n width: 100%;\n align-items: center;\n align-self: flex-start;\n height: 40px;\n}\n\n.step-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n}\n\n.step-icon-inner {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n}\n\n.current {\n color: var(--ic-theme-primary);\n}\n\n.step-title-area {\n margin: var(--ic-space-xs) 0;\n padding-right: var(--ic-space-xs);\n}\n\n.step-title,\n.step-subtitle {\n width: fit-content;\n}\n\n.step-subtitle {\n color: var(--ic-color-tertiary-text);\n}\n\n.current .step-subtitle {\n color: var(--ic-color-primary-text);\n}\n\n.completed {\n color: var(--ic-status-success);\n}\n\n.active .step-icon-inner {\n box-shadow: inset var(--ic-architectural-200) 0 0 0 2px;\n}\n\n.current .step-icon-inner {\n background-color: var(--ic-theme-primary);\n color: white;\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.disabled .step-icon {\n border: 1px dashed var(--ic-architectural-200);\n width: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n height: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n}\n\n.disabled .step-title-area {\n color: var(--ic-color-tertiary-text);\n}\n\n.completed .step-icon-inner {\n background: var(--ic-status-success);\n box-shadow: inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);\n border-radius: 100%;\n}\n\n.current .step-icon {\n border: var(--ic-space-xxxs) solid var(--ic-theme-primary);\n padding: var(--ic-space-xxxs);\n margin: 0 calc(-1 * var(--ic-space-xxxs)); /* compensating for the circle being bigger than other steps */\n}\n\n.step-connect {\n height: var(--ic-space-xxxs);\n background-color: var(--ic-architectural-200);\n margin: 0 var(--ic-space-xs);\n border-radius: var(--ic-space-xxs);\n width: 100%;\n}\n\n.aligned-full-width.step-connect {\n min-width: 100px;\n width: 100%;\n}\n\n.disabled .step-connect {\n height: 0;\n background-color: rgb(0 0 0 / 0%);\n border-top: 2px dashed var(--ic-architectural-200);\n border-radius: 0;\n}\n\n.completed .step-connect {\n background-color: var(--ic-status-success);\n}\n\n.step-connect-inner {\n width: 70%;\n display: flex;\n flex: auto;\n height: var(--ic-space-xxxs);\n border-radius: var(--ic-space-xxs);\n background-color: var(--ic-theme-primary);\n}\n\n.check-icon {\n padding-top: var(--ic-space-xxs);\n}\n\n.check-icon svg {\n width: 16px;\n height: 16px;\n}\n\n.check-icon > svg > path {\n fill: white;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .step-connect:not(.disabled .step-connect) {\n border: var(--ic-hc-border);\n }\n\n .active .step-icon-inner,\n .completed .step-icon-inner,\n .current .step-icon-inner {\n forced-color-adjust: none;\n box-shadow: inset canvastext 0 0 0 2px;\n background-color: transparent;\n color: canvastext;\n }\n\n .current .step-icon {\n padding: 0;\n border: none;\n }\n\n .disabled,\n .disabled .step-title-area {\n color: Graytext;\n }\n\n .step-connect-inner,\n .completed .step-connect {\n background-color: canvastext;\n }\n\n .check-icon > svg > path {\n fill: canvastext;\n }\n}\n","import { Component, Host, h, Prop, Element } from \"@stencil/core\";\nimport checkIcon from \"../../assets/check-icon.svg\";\nimport { IcStepTypes } from \"./ic-step.types\";\n\n@Component({\n tag: \"ic-step\",\n styleUrl: \"ic-step.css\",\n shadow: true,\n})\nexport class Step {\n @Element() el: HTMLIcStepElement;\n /**\n * The state of the step within the stepper.\n */\n @Prop() stepType?: IcStepTypes = \"active\";\n\n /**\n * The name of the step within the stepper.\n */\n @Prop() stepTitle?: string;\n\n /**\n * The additional information about the step.\n */\n @Prop() stepSubtitle?: string;\n\n /**\n * @internal The step number, managed by ic-stepper.\n */\n @Prop() stepNum?: number;\n\n /**\n * @internal If `true`, the step will be marked as being the last one in the series. This is managed by ic-stepper.\n */\n @Prop() lastStep?: boolean;\n\n render() {\n let icon;\n if (this.stepType !== \"completed\") {\n icon = (\n <ic-typography variant=\"subtitle-small\">\n <span class=\"step-icon-inner\" aria-hidden=\"true\">\n {this.stepNum}\n </span>\n </ic-typography>\n );\n } else {\n icon = (\n <div class=\"step-icon-inner\" aria-hidden=\"true\">\n <span class=\"check-icon\" innerHTML={checkIcon}></span>\n </div>\n );\n }\n\n let ariaLabel = \"\";\n\n if (this.stepType === \"completed\") {\n ariaLabel = \". Completed step\";\n } else if (this.stepType === \"disabled\") {\n ariaLabel = \". Disabled step\";\n }\n\n const partialBar = this.stepType === \"current\" && (\n <div class=\"step-connect-inner\"></div>\n );\n const finalStep = !this.lastStep && (\n <div\n class={{\n [\"step-connect\"]: true,\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"aligned-full-width\"),\n }}\n >\n {partialBar}\n </div>\n );\n\n return (\n <Host\n role=\"listitem\"\n aria-label={`Step ${this.stepNum}${ariaLabel}`}\n aria-current={this.stepType == \"current\" ? \"step\" : null}\n class={{\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"aligned-full-width\"),\n }}\n >\n <div\n class={{\n [\"step\"]: true,\n [`${this.stepType}`]: true,\n }}\n >\n <div class=\"step-top\">\n <div class=\"step-icon\">{icon}</div>\n {finalStep}\n </div>\n {(this.stepTitle || this.stepSubtitle) && (\n <div class=\"step-title-area\">\n {this.stepTitle && (\n <ic-typography variant=\"subtitle-large\" class=\"step-title\">\n {this.stepTitle}\n </ic-typography>\n )}\n {this.stepSubtitle && (\n <ic-typography variant=\"caption\" class=\"step-subtitle\">\n {this.stepSubtitle}\n </ic-typography>\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-step.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,uoIAAuoI;;MCU5oI,IAAI;;;;;;;oBAyBkB,QAAQ;mBAKI,KAAK;;;;;;;;EAiClD,qBAAqB;IACnB,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;MAC7D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACrB;SAAM;MACL,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;GACF;EAED,MAAM;;IAEJ,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,EAAE;MACjC,SAAS,GAAG,kBAAkB,CAAC;KAChC;SAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;MACvC,SAAS,GAAG,qBAAqB,CAAC;KACnC;SAAM,IAAI,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE;MACzC,SAAS,GAAG,iBAAiB,CAAC;KAC/B;SAAM,IAAI,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE;MACzC,SAAS,GAAG,iBAAiB,CAAC;KAC/B;;IAGD,IAAI,UAAU,CAAC;IACf,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC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AAI,CAAC,SAAS,KACbA,2BAAe,OAAO,EAAC,gBAAgB,EAAC,KAAK,EAAC,YAAY,IACvD,IAAI,CAAC,SAAS,CACD,CACjB,EACA,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,CAAC,KACvDA,2BAAe,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,eAAe,IACnD,IAAI,CAAC,YAAY,KAAK,IAAI,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS;QAC1D,IAAI,CAAC,YAAY;QACjB,UAAU,CACA,CACjB,CACG,CACP,CACG,CACP,CAAC;IAEF,QACEA,QAACE,UAAI,IACH,IAAI,EAAC,UAAU,gBACH,QAAQ,IAAI,CAAC,OAAO,GAAG,SAAS,EAAE,kBAChC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,KAAK,MAAM,EACrE,KAAK,EAAE;QACL,CAAC,oBAAoB,GACnB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;UACnD,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC3D,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI;OAC1B,IAEA,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,WAAW,GAAG,WAAW,CAClD,EACP;GACH;;;;;;;;;;","names":["h","checkIcon","Host"],"sources":["./src/components/ic-step/ic-step.css?tag=ic-step&encapsulation=shadow","./src/components/ic-step/ic-step.tsx"],"sourcesContent":["/* SHARED STYLING */\n:host {\n display: flex;\n flex: auto;\n}\n\n.step {\n display: flex;\n flex: 1 1 0;\n}\n\n.step-icon {\n display: flex;\n justify-content: center;\n}\n\n.step-title,\n.step-subtitle,\n.step-status,\n.next-step {\n white-space: pre-line;\n}\n\n.visually-hidden {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n/* COMPACT STEP STYLING */\n:host(.compact) {\n column-gap: var(--ic-space-sm);\n\n --compact-step-inner-color: var(--ic-theme-primary);\n --compact-step-circular-line-width: var(--ic-space-xxs);\n}\n\n:host(.compact) .step {\n column-gap: var(--ic-space-sm);\n}\n\n:host(.compact) .step:not(.current) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n\n.compact-step-progress-indicator {\n margin: var(--ic-space-xs) 0 0;\n}\n\n:host(.compact) .step-title-area {\n display: flex;\n flex-direction: column;\n width: 228px;\n}\n\n.info-line {\n display: flex;\n column-gap: var(--ic-space-xs);\n}\n\n.step-status {\n display: flex;\n color: var(--ic-color-secondary-text);\n column-gap: var(--ic-space-xxxs);\n}\n\n.compact-step-completed .step-status {\n color: var(--ic-status-success);\n}\n\n.compact-step-disabled :is(.step-title, .step-status) {\n color: var(--ic-color-tertiary-text);\n}\n\n.step-num {\n color: var(--ic-color-secondary-text);\n white-space: nowrap;\n}\n\n:host(.compact) .step-icon {\n margin: var(--ic-space-xxxs);\n}\n\n:host(.compact) .step-icon svg {\n width: 16px;\n height: 16px;\n}\n\n/* DEFAULT STEP STYLING */\n:host(.default) .step {\n flex-direction: column;\n}\n\n:host(.default.last-step) {\n flex-grow: initial;\n}\n\n.step-top {\n display: flex;\n width: 100%;\n align-items: center;\n align-self: flex-start;\n height: 40px;\n}\n\n:host(.default) .step-icon {\n border-radius: 50%;\n}\n\n.step-icon-inner {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n}\n\n:host(.default) .current {\n color: var(--ic-theme-primary);\n}\n\n:host(.default) .step-title-area {\n margin: var(--ic-space-xs) 0;\n padding-right: var(--ic-space-xs);\n width: 100%;\n}\n\n:host(.default) .step-title,\n.step-subtitle {\n width: fit-content;\n}\n\n.step-subtitle {\n color: var(--ic-color-tertiary-text);\n}\n\n.current .step-subtitle {\n color: var(--ic-color-primary-text);\n}\n\n:host(.default) .completed {\n color: var(--ic-status-success);\n}\n\n.active .step-icon-inner {\n box-shadow: inset var(--ic-architectural-200) 0 0 0 2px;\n}\n\n.current .step-icon-inner {\n background-color: var(--ic-theme-primary);\n color: white;\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.disabled .step-icon-inner {\n border: 1px dashed var(--ic-architectural-200);\n width: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n height: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n}\n\n.disabled .step-title-area {\n color: var(--ic-color-tertiary-text);\n}\n\n.completed .step-icon-inner {\n background: var(--ic-status-success);\n box-shadow: inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);\n border-radius: 100%;\n}\n\n:host(.default) .current .step-icon {\n border: var(--ic-space-xxxs) solid var(--ic-theme-primary);\n padding: var(--ic-space-xxxs);\n margin: 0 calc(-1 * var(--ic-space-xxxs));\n /* compensating for the circle being bigger than other steps */\n}\n\n.step-connect {\n height: var(--ic-space-xxxs);\n background-color: var(--ic-architectural-200);\n margin: 0 var(--ic-space-xs);\n border-radius: var(--ic-space-xxs);\n width: 100%;\n}\n\n.aligned-full-width.step-connect {\n min-width: 100px;\n width: 100%;\n}\n\n.disabled .step-connect {\n height: 0;\n background-color: rgb(0 0 0 / 0%);\n border-top: 2px dashed var(--ic-architectural-200);\n border-radius: 0;\n}\n\n.completed .step-connect {\n background-color: var(--ic-status-success);\n}\n\n.step-connect-inner {\n width: 70%;\n display: flex;\n flex: auto;\n height: var(--ic-space-xxxs);\n border-radius: var(--ic-space-xxs);\n background-color: var(--ic-theme-primary);\n}\n\n.step-icon-inner .check-icon {\n padding-top: var(--ic-space-xxs);\n}\n\n.step-icon-inner .check-icon svg {\n width: var(--ic-space-md);\n height: auto;\n}\n\n.step-icon-inner .check-icon > svg > path {\n fill: var(--ic-color-white-text);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n /* COMPACT STEP */\n .compact-step-disabled :is(.step-title, .step-status) {\n color: GrayText;\n }\n\n /* DEFAULT STEP */\n .step-connect:not(.disabled .step-connect) {\n border: var(--ic-hc-border);\n }\n\n .active .step-icon-inner,\n .completed .step-icon-inner,\n .current .step-icon-inner {\n forced-color-adjust: none;\n box-shadow: inset canvastext 0 0 0 2px;\n background-color: transparent;\n color: canvastext;\n }\n\n :host(.default) .current .step-icon {\n padding: 0;\n border: none;\n }\n\n .disabled,\n .disabled .step-title-area {\n color: GrayText;\n }\n\n .step-connect-inner,\n .completed .step-connect {\n background-color: canvastext;\n }\n\n .step-icon-inner .check-icon > svg > path {\n fill: canvastext;\n }\n}\n","import { Component, Host, h, Prop, Element, Watch } from \"@stencil/core\";\nimport checkIcon from \"../../assets/check-icon.svg\";\nimport warningIcon from \"../../assets/warning-icon-outline.svg\";\nimport { IcStepVariants, IcStepStatuses, IcStepTypes } from \"./ic-step.types\";\n\n@Component({\n tag: \"ic-step\",\n styleUrl: \"ic-step.css\",\n shadow: true,\n})\nexport class Step {\n @Element() el: HTMLIcStepElement;\n /**\n * @internal The variant of the step. This is managed by ic-stepper.\n */\n @Prop() variant!: IcStepVariants;\n\n /**\n * The title of the step within the stepper.\n */\n @Prop() stepTitle?: string;\n\n /**\n * Additional information about the step. Use this prop to override the default step status messaging displayed when selecting a step type or step status.\n */\n @Prop() stepSubtitle?: string;\n\n /**\n * The status of the step. Use this prop to display a status message on the step if it is required or optional.\n */\n @Prop() stepStatus?: IcStepStatuses;\n\n /**\n * The state of the step within the stepper.\n */\n @Prop() stepType?: IcStepTypes = \"active\";\n\n /**\n * @internal If `true`, and a compact stepper is being used, the current step will be the only step in view.\n */\n @Prop({ mutable: true }) current?: boolean = false;\n\n /**\n * @internal If a compact stepper is being used, this sets the styling of the step.\n */\n @Prop() compactStepStyling?: IcStepTypes;\n\n /**\n * @internal The step number, managed by ic-stepper.\n */\n @Prop() stepNum?: number;\n\n /**\n * @internal If `true`, the step will be marked as being the last one in the series. This is managed by ic-stepper.\n */\n @Prop() lastStep!: boolean;\n\n /**\n * @internal The step number of the final step. This is managed by ic-stepper.\n */\n @Prop() lastStepNum?: number;\n\n /**\n * @internal The name of the next step. This is managed by ic-stepper.\n */\n @Prop() nextStepTitle?: string;\n\n /**\n * @internal The progress of the next step, calculated by dividing the current step number by the total number of steps. This is managed by ic-stepper.\n */\n @Prop() progress?: number;\n\n @Watch(\"stepType\")\n stepTypeChangeHandler(): void {\n if (this.variant === \"compact\" && this.stepType === \"current\") {\n this.current = true;\n } else {\n this.current = false;\n }\n }\n\n render() {\n // ARIA LABEL\n let ariaLabel = \"\";\n\n if (this.stepType === \"completed\") {\n ariaLabel = \". Completed step\";\n } else if (this.stepType === \"disabled\") {\n ariaLabel = \". Non-required step\";\n } else if (this.stepStatus === \"required\") {\n ariaLabel = \". Required step\";\n } else if (this.stepStatus === \"optional\") {\n ariaLabel = \". Optional step\";\n }\n\n // STEP STATUS\n let stepStatus;\n if (this.stepStatus) {\n stepStatus = this.stepStatus[0].toUpperCase() + this.stepStatus.slice(1);\n }\n\n // STEP TYPE\n let stepType;\n if (\n this.stepType === \"disabled\" ||\n this.compactStepStyling === \"disabled\"\n ) {\n stepType = \"Not required\";\n } else if (this.compactStepStyling === \"completed\") {\n stepType = \"Completed\";\n }\n\n // STATUS ICON FOR COMPACT STEP\n let statusIcon;\n if (\n this.stepType === \"completed\" ||\n this.compactStepStyling === \"completed\"\n ) {\n statusIcon = (\n <span\n class=\"check-icon step-icon\"\n aria-hidden=\"true\"\n innerHTML={checkIcon}\n ></span>\n );\n } else if (\n this.stepType === \"disabled\" ||\n this.compactStepStyling === \"disabled\"\n ) {\n statusIcon = (\n <span\n class=\"warning-icon step-icon\"\n aria-hidden=\"true\"\n innerHTML={warningIcon}\n ></span>\n );\n }\n\n // COMPACT STEP COMPONENT\n const compactStep = (\n <div\n class={{\n [\"step\"]: true,\n [\"current\"]: this.current,\n [`compact-step-${this.compactStepStyling}`]:\n !!this.compactStepStyling,\n }}\n >\n <ic-loading-indicator\n class={{\n \"compact-step-progress-indicator\": true,\n \"not-required\":\n this.stepType === \"disabled\" ||\n this.compactStepStyling === \"disabled\",\n }}\n aria-hidden=\"true\"\n size=\"small\"\n inner-label={this.stepNum}\n progress={this.progress}\n ></ic-loading-indicator>\n <div class=\"step-title-area\">\n <ic-typography variant=\"h4\" class=\"step-title\">\n {this.stepTitle}\n </ic-typography>\n <div class=\"info-line\">\n <ic-typography variant=\"caption\" class=\"step-num\">\n {`${this.stepNum} of ${this.lastStepNum}`}\n <span class=\"visually-hidden\"> steps</span>\n </ic-typography>\n {(this.stepSubtitle ||\n this.stepType === \"completed\" ||\n this.stepType === \"disabled\" ||\n (this.variant === \"compact\" &&\n !!this.compactStepStyling &&\n this.compactStepStyling !== \"active\") ||\n !!this.stepStatus) && (\n <div class=\"step-status\">\n {statusIcon && statusIcon}\n {(this.stepSubtitle || stepType) && (\n <ic-typography variant=\"caption\">\n {this.stepSubtitle !== null &&\n this.stepSubtitle !== undefined\n ? this.stepSubtitle\n : this.stepType === \"disabled\" ||\n (this.variant === \"compact\" &&\n this.compactStepStyling === \"disabled\") ||\n this.stepType === \"completed\" ||\n (this.variant === \"compact\" &&\n this.compactStepStyling === \"completed\")\n ? stepType\n : this.stepStatus && stepStatus}\n </ic-typography>\n )}\n </div>\n )}\n </div>\n {this.lastStep ? (\n <ic-typography variant=\"subtitle-small\" class=\"next-step\">\n Last step\n </ic-typography>\n ) : (\n this.nextStepTitle !== undefined && (\n <ic-typography variant=\"subtitle-small\" class=\"next-step\">\n Next<span class=\"visually-hidden\"> step is</span>:{\" \"}\n {this.nextStepTitle}\n </ic-typography>\n )\n )}\n </div>\n </div>\n );\n\n // ICON FOR DEFAULT STEP\n let icon;\n if (this.stepType !== \"completed\") {\n icon = (\n <ic-typography variant=\"subtitle-small\">\n <span class=\"step-icon-inner\" aria-hidden=\"true\">\n {this.stepNum}\n </span>\n </ic-typography>\n );\n } else {\n icon = (\n <div class=\"step-icon-inner\" aria-hidden=\"true\">\n <span class=\"check-icon\" innerHTML={checkIcon}></span>\n </div>\n );\n }\n\n // STEP CONNECT FOR DEFAULT STEP\n const partialBar = this.stepType === \"current\" && (\n <div class=\"step-connect-inner\"></div>\n );\n\n const finalStep = !this.lastStep && (\n <div\n class={{\n [\"step-connect\"]: true,\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"default\") &&\n !this.el.parentElement.classList.contains(\"aligned-left\"),\n }}\n >\n {partialBar}\n </div>\n );\n\n // DEFAULT STEP COMPONENT\n const defaultStep = (\n <div\n class={{\n [\"step\"]: true,\n [`${this.stepType}`]: true,\n }}\n >\n <div class=\"step-top\">\n <div class=\"step-icon\">{icon}</div>\n {finalStep}\n </div>\n {(this.stepTitle || this.stepSubtitle || this.stepStatus) && (\n <div class=\"step-title-area\">\n {this.stepTitle && (\n <ic-typography variant=\"subtitle-large\" class=\"step-title\">\n {this.stepTitle}\n </ic-typography>\n )}\n {this.stepTitle && (this.stepSubtitle || this.stepStatus) && (\n <ic-typography variant=\"caption\" class=\"step-subtitle\">\n {this.stepSubtitle !== null && this.stepSubtitle !== undefined\n ? this.stepSubtitle\n : stepStatus}\n </ic-typography>\n )}\n </div>\n )}\n </div>\n );\n\n return (\n <Host\n role=\"listitem\"\n aria-label={`Step ${this.stepNum}${ariaLabel}`}\n aria-current={(this.current || this.stepType === \"current\") && \"step\"}\n class={{\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"default\") &&\n !this.el.parentElement.classList.contains(\"aligned-left\"),\n [`${this.variant}`]: true,\n }}\n >\n {this.variant === \"compact\" ? compactStep : defaultStep}\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -3,76 +3,197 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-3ef30d9d.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-81484ceb.js');
|
7
7
|
require('./types-3eb02246.js');
|
8
8
|
|
9
|
-
const icStepperCss = ":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.aligned-
|
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}";
|
10
10
|
|
11
|
-
const
|
11
|
+
const Stepper = class {
|
12
12
|
constructor(hostRef) {
|
13
13
|
index.registerInstance(this, hostRef);
|
14
14
|
this.resizeObserver = null;
|
15
|
-
|
16
|
-
* Get all steps currently within this stepper
|
17
|
-
*/
|
15
|
+
// Get all steps currently within this stepper
|
18
16
|
this.getChildren = () => {
|
19
17
|
this.steps = Array.from(this.el.querySelectorAll("ic-step"));
|
18
|
+
this.stepsWithStepTitles = Array.from(this.el.querySelectorAll("ic-step[step-title]"));
|
19
|
+
};
|
20
|
+
// Inform the user that stepTitles are required on all steps in a compact stepper
|
21
|
+
this.checkStepTitles = () => {
|
22
|
+
if (this.stepsWithStepTitles.length < this.steps.length &&
|
23
|
+
this.variantOverride &&
|
24
|
+
this.variant === "compact") {
|
25
|
+
this.noOfResizes = this.noOfResizes + 1;
|
26
|
+
if (this.noOfResizes === 1) {
|
27
|
+
console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
};
|
31
|
+
this.setStepTypes = () => {
|
32
|
+
this.getChildren();
|
33
|
+
this.stepTypes = [];
|
34
|
+
for (let i = 0; i < this.steps.length; i++) {
|
35
|
+
this.stepTypes.push("active");
|
36
|
+
}
|
37
|
+
};
|
38
|
+
this.setStepperWidth = () => {
|
39
|
+
this.alignedFullWidth =
|
40
|
+
this.variant === "default" && this.aligned === "full-width";
|
41
|
+
const lastStep = this.steps[this.steps.length - 1];
|
42
|
+
lastStep.style.maxWidth = "none";
|
43
|
+
if (this.alignedFullWidth) {
|
44
|
+
this.stepperWidth = this.el.offsetWidth;
|
45
|
+
lastStep.style.maxWidth = `${this.stepperWidth / this.steps.length}px`;
|
46
|
+
this.lastStepWidth = lastStep.offsetWidth;
|
47
|
+
}
|
20
48
|
};
|
21
49
|
this.initialiseStepStates = () => {
|
22
50
|
this.steps.forEach((step, index) => {
|
51
|
+
// Set variant
|
52
|
+
step.variant = this.variant;
|
23
53
|
// Assign stepNum to each step
|
24
54
|
step.stepNum = index + 1;
|
25
|
-
//Assign lastStep to final step
|
55
|
+
// Assign lastStep to final step
|
26
56
|
step.lastStep = index === this.steps.length - 1;
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
57
|
+
step.lastStepNum = this.steps.length;
|
58
|
+
if (step.stepType !== "current") {
|
59
|
+
step.current = false;
|
60
|
+
this.stepTypes[index] = step.stepType;
|
61
|
+
}
|
62
|
+
else {
|
63
|
+
step.current = true;
|
64
|
+
}
|
65
|
+
const stepTitleArea = step.shadowRoot &&
|
66
|
+
step.shadowRoot.querySelector(".step > .step-title-area");
|
67
|
+
if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {
|
68
|
+
if (this.variant === "compact") {
|
69
|
+
this.autoSetStepTitles = true;
|
70
|
+
if (this.autoSetStepTitles) {
|
71
|
+
step.stepTitle = "Step " + step.stepNum;
|
72
|
+
stepTitleArea &&
|
73
|
+
stepTitleArea
|
74
|
+
.querySelector(".step-title")
|
75
|
+
.setAttribute("aria-hidden", "true");
|
76
|
+
}
|
77
|
+
}
|
78
|
+
if (this.variant === "default") {
|
79
|
+
this.autoSetStepTitles = false;
|
80
|
+
if (!this.autoSetStepTitles) {
|
81
|
+
step.stepTitle = undefined;
|
82
|
+
stepTitleArea &&
|
83
|
+
stepTitleArea
|
84
|
+
.querySelector(".step-title")
|
85
|
+
.removeAttribute("aria-hidden");
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
if (this.variant === "compact") {
|
90
|
+
if (step.current === true || step.stepType === "current") {
|
91
|
+
step.classList.remove("hide");
|
92
|
+
step.classList.add("show");
|
93
|
+
}
|
94
|
+
else if (step.classList.contains("show")) {
|
95
|
+
step.classList.remove("show");
|
96
|
+
step.classList.add("hide");
|
97
|
+
}
|
98
|
+
if (!step.lastStep) {
|
99
|
+
step.nextStepTitle = this.steps[index + 1].stepTitle;
|
100
|
+
step.progress = (step.stepNum / this.steps.length) * 100;
|
101
|
+
}
|
102
|
+
else if (step.lastStep && this.stepTypes[index] !== "completed") {
|
103
|
+
step.progress = 95;
|
104
|
+
}
|
105
|
+
else {
|
106
|
+
step.progress = 100;
|
31
107
|
}
|
32
|
-
if (this.
|
33
|
-
|
108
|
+
if (this.hideStepInfo && stepTitleArea !== null) {
|
109
|
+
stepTitleArea.classList.remove("visually-hidden");
|
110
|
+
}
|
111
|
+
step.compactStepStyling = this.stepTypes[index];
|
112
|
+
}
|
113
|
+
if (this.variant === "default") {
|
114
|
+
if (!step.lastStep) {
|
115
|
+
if (this.alignedFullWidth) {
|
116
|
+
step.style.width = `${(this.stepperWidth - this.lastStepWidth) / (this.steps.length - 1)}px`;
|
117
|
+
step.style.minWidth = "148px";
|
118
|
+
}
|
119
|
+
}
|
120
|
+
else if (step.lastStep) {
|
121
|
+
step.classList.add("last-step");
|
122
|
+
if (this.alignedFullWidth) {
|
123
|
+
step.style.maxWidth = `${this.lastStepWidth}px`;
|
124
|
+
}
|
125
|
+
else {
|
126
|
+
step.style.maxWidth =
|
127
|
+
this.connectorWidth > 100
|
128
|
+
? `${this.connectorWidth + 48}px`
|
129
|
+
: "148px";
|
130
|
+
}
|
131
|
+
}
|
132
|
+
if (this.aligned === "left") {
|
133
|
+
step.style.width =
|
134
|
+
this.connectorWidth > 100
|
135
|
+
? `${this.connectorWidth + 48}px`
|
136
|
+
: "148px";
|
137
|
+
const stepConnect = step.shadowRoot.querySelector(".step > .step-top > .step-connect");
|
138
|
+
if (stepConnect) {
|
139
|
+
stepConnect.style.width =
|
140
|
+
this.connectorWidth > 100 ? `${this.connectorWidth}px` : "100px";
|
141
|
+
}
|
142
|
+
}
|
143
|
+
if (this.hideStepInfo && stepTitleArea !== null) {
|
144
|
+
stepTitleArea.classList.add("visually-hidden");
|
34
145
|
}
|
35
146
|
}
|
36
147
|
});
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
148
|
+
};
|
149
|
+
this.overrideVariant = () => {
|
150
|
+
let minDefaultStepperWidth = 148 * this.steps.length;
|
151
|
+
if (this.aligned === "left" && this.connectorWidth > 100) {
|
152
|
+
minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;
|
153
|
+
}
|
154
|
+
if (this.variantOverride) {
|
155
|
+
if (this.el.clientWidth < minDefaultStepperWidth) {
|
156
|
+
this.variant = "compact";
|
157
|
+
this.getChildren();
|
41
158
|
}
|
42
|
-
|
43
|
-
this.
|
44
|
-
|
45
|
-
stepConnect.style.width =
|
46
|
-
this.connectorWidth > 100 ? `${this.connectorWidth}px` : "100px";
|
159
|
+
else {
|
160
|
+
this.variant = "default";
|
161
|
+
this.getChildren();
|
47
162
|
}
|
48
163
|
}
|
49
164
|
};
|
165
|
+
this.resizeObserverCallback = () => {
|
166
|
+
this.getChildren();
|
167
|
+
this.checkStepTitles();
|
168
|
+
this.overrideVariant();
|
169
|
+
this.setStepperWidth();
|
170
|
+
this.initialiseStepStates();
|
171
|
+
};
|
50
172
|
this.runResizeObserver = () => {
|
51
173
|
this.resizeObserver = new ResizeObserver(() => {
|
52
|
-
this.
|
53
|
-
this.getChildren();
|
54
|
-
this.initialiseStepStates();
|
174
|
+
this.resizeObserverCallback();
|
55
175
|
});
|
56
176
|
this.resizeObserver.observe(this.el);
|
57
177
|
};
|
58
|
-
this.setStepperWidth = () => {
|
59
|
-
this.stepperWidth = this.el.offsetWidth;
|
60
|
-
const allSteps = document.querySelectorAll("ic-step");
|
61
|
-
const lastStep = allSteps[allSteps.length - 1];
|
62
|
-
lastStep.style.maxWidth = "none";
|
63
|
-
if (lastStep.classList.contains("aligned-full-width")) {
|
64
|
-
lastStep.style.maxWidth = `${this.stepperWidth / allSteps.length}px`;
|
65
|
-
}
|
66
|
-
this.lastStepWidth = lastStep.offsetWidth;
|
67
|
-
this.getChildren();
|
68
|
-
this.initialiseStepStates();
|
69
|
-
};
|
70
178
|
this.aligned = "full-width";
|
179
|
+
this.variant = "default";
|
71
180
|
this.connectorWidth = 100;
|
181
|
+
this.hideStepInfo = false;
|
72
182
|
this.stepperWidth = document
|
73
183
|
.querySelector("ic-stepper")
|
74
184
|
.getBoundingClientRect().width;
|
75
185
|
this.lastStepWidth = 0;
|
186
|
+
this.stepTypes = [];
|
187
|
+
this.alignedFullWidth = true;
|
188
|
+
this.autoSetStepTitles = true;
|
189
|
+
this.variantOverride = this.variant !== "compact";
|
190
|
+
this.noOfResizes = 0;
|
191
|
+
}
|
192
|
+
componentWillLoad() {
|
193
|
+
this.setStepTypes();
|
194
|
+
if (this.variant === "compact") {
|
195
|
+
this.variantOverride = false;
|
196
|
+
}
|
76
197
|
}
|
77
198
|
componentDidLoad() {
|
78
199
|
helpers.checkResizeObserver(this.runResizeObserver);
|
@@ -84,14 +205,14 @@ const IcStepper = class {
|
|
84
205
|
}
|
85
206
|
render() {
|
86
207
|
return (index.h(index.Host, { class: {
|
87
|
-
[
|
88
|
-
["aligned-
|
208
|
+
[`${this.variant}`]: true,
|
209
|
+
["aligned-left"]: this.variant === "default" && this.aligned === "left",
|
89
210
|
} }, index.h("ul", { class: "step-item-list" }, index.h("slot", null))));
|
90
211
|
}
|
91
212
|
get el() { return index.getElement(this); }
|
92
213
|
};
|
93
|
-
|
214
|
+
Stepper.style = icStepperCss;
|
94
215
|
|
95
|
-
exports.ic_stepper =
|
216
|
+
exports.ic_stepper = Stepper;
|
96
217
|
|
97
218
|
//# sourceMappingURL=ic-stepper.cjs.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-stepper.entry.cjs.js","mappings":";;;;;;;;AAAA,MAA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AAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QACrD,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC;OACtE;MACD,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC;MAC1C,IAAI,CAAC,WAAW,EAAE,CAAC;MACnB,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC7B,CAAC;mBAjFqC,YAAY;0BAKjB,GAAG;wBAEL,QAAQ;OACrC,aAAa,CAAC,YAAY,CAAC;OAC3B,qBAAqB,EAAE,CAAC,KAAK;yBAEC,CAAC;;EAwElC,gBAAgB;IACdA,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,cAAc,GAAG,IAAI,CAAC,OAAO,KAAK,MAAM;QACzC,CAAC,oBAAoB,GAAG,IAAI,CAAC,OAAO,KAAK,YAAY;OACtD,IAEDD,gBAAI,KAAK,EAAC,gBAAgB,IACxBA,qBAAa,CACV,CACA,EACP;GACH;;;;;;;","names":["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(.aligned-full-width) .step-item-list {\n flex: auto;\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\nimport { IcStepperAlignment } from \"./ic-stepper.types\";\n\n@Component({\n tag: \"ic-stepper\",\n styleUrl: \"ic-stepper.css\",\n shadow: true,\n})\nexport class IcStepper {\n @Element() el: HTMLIcStepperElement;\n\n /**\n * The alignment of the 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 @State() stepperWidth: number = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n\n @State() lastStepWidth: number = 0;\n\n private steps: HTMLIcStepElement[];\n\n private resizeObserver: ResizeObserver = null;\n\n /**\n * Get all steps currently within this stepper\n */\n private getChildren = (): void => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n };\n\n private initialiseStepStates = (): void => {\n this.steps.forEach((step, index) => {\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\n if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.el.classList.contains(\"aligned-full-width\")) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n }\n if (this.el.classList.contains(\"aligned-left\")) {\n step.style.maxWidth = `${this.connectorWidth + 48}px`;\n }\n }\n });\n\n for (let i = 0; i < this.steps.length - 1; i++) {\n if (this.el.classList.contains(\"aligned-full-width\")) {\n this.steps[i].style.width = `${\n (this.stepperWidth - this.lastStepWidth) / (this.steps.length - 1)\n }px`;\n this.steps[i].style.minWidth = \"148px\";\n }\n\n if (this.el.classList.contains(\"aligned-left\")) {\n this.steps[i].style.width = `${this.connectorWidth + 48}px`;\n const stepConnect = this.steps[i].shadowRoot.querySelector(\n \"div > .step-top > .step-connect\"\n ) as HTMLElement;\n stepConnect.style.width =\n this.connectorWidth > 100 ? `${this.connectorWidth}px` : \"100px\";\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.setStepperWidth();\n this.getChildren();\n this.initialiseStepStates();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private setStepperWidth = (): void => {\n this.stepperWidth = this.el.offsetWidth;\n const allSteps = document.querySelectorAll(\"ic-step\");\n const lastStep = allSteps[allSteps.length - 1];\n lastStep.style.maxWidth = \"none\";\n if (lastStep.classList.contains(\"aligned-full-width\")) {\n lastStep.style.maxWidth = `${this.stepperWidth / allSteps.length}px`;\n }\n this.lastStepWidth = lastStep.offsetWidth;\n this.getChildren();\n this.initialiseStepStates();\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 [\"aligned-left\"]: this.aligned === \"left\",\n [\"aligned-full-width\"]: this.aligned === \"full-width\",\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;;;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,EAAE;UAC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ACF;EAED,gBAAgB;IACdA,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":["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 } 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 = `${this.stepperWidth / this.steps.length}px`;\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 = `${\n (this.stepperWidth - this.lastStepWidth) / (this.steps.length - 1)\n }px`;\n step.style.minWidth = \"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 ? `${this.connectorWidth + 48}px`\n : \"148px\";\n }\n }\n\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? `${this.connectorWidth + 48}px`\n : \"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 ? `${this.connectorWidth}px` : \"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}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-3ef30d9d.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-81484ceb.js');
|
7
7
|
require('./types-3eb02246.js');
|
8
8
|
|
9
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:10px}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:64px;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-architectural-200);border: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:21.33px;height:21.33px;border-radius:50%;position:absolute;z-index:2;top:50%;left:5.33px;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:10px;height:10px}.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 12px var(--ic-action-dark-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 12px var(--ic-action-dark-bg-active)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 12px var(--ic-action-default-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 12px 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 1px var(--ic-architectural-white),\n 0 0 0 3px var(--ic-action-default),\n 0 0 0 8px 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:1px dashed var(--ic-architectural-300)}.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: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:6px}.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) - 2px), -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}}";
|