@ukic/web-components 2.1.0-beta.1 → 2.1.0-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -0
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +18 -8
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +29 -11
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +2 -0
- 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.map +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js.map +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 +2 -2
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +19 -18
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +10 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +16 -2
- 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 +2 -7
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +8 -4
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- 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 +161 -40
- 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.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-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 +27 -8
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +17 -7
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +4 -4
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +2 -2
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.js +13 -13
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-card/ic-card.js +10 -10
- package/dist/collection/components/ic-card/ic-card.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +29 -10
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +10 -10
- 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 +5 -5
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
- package/dist/collection/components/ic-data-entity/ic-data-entity.js +2 -2
- package/dist/collection/components/ic-data-entity/ic-data-entity.js.map +1 -1
- package/dist/collection/components/ic-data-row/ic-data-row.css +12 -0
- package/dist/collection/components/ic-data-row/ic-data-row.js +3 -3
- package/dist/collection/components/ic-data-row/ic-data-row.js.map +1 -1
- 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 +19 -16
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-footer-link/ic-footer-link.css +7 -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 +3 -3
- 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 +10 -10
- 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-input-component-container/ic-input-component-container.js +8 -8
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
- package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
- package/dist/collection/components/ic-input-container/ic-input-container.js.map +1 -1
- package/dist/collection/components/ic-input-label/ic-input-label.js +8 -8
- package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +5 -5
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- package/dist/collection/components/ic-link/ic-link.js +7 -7
- 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 +45 -9
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-menu/ic-menu.css +1 -1
- package/dist/collection/components/ic-menu/ic-menu.js +35 -31
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +5 -5
- 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 +4 -4
- 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 +10 -10
- 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 +3 -3
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.css +1 -0
- package/dist/collection/components/ic-page-header/ic-page-header.js +8 -8
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +10 -10
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +34 -17
- 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 +51 -30
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-section-container/ic-section-container.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.css +1 -1
- package/dist/collection/components/ic-select/ic-select.js +19 -24
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +5 -13
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +24 -17
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-skeleton/ic-skeleton.css +1 -1
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skeleton/ic-skeleton.js.map +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.css +120 -24
- package/dist/collection/components/ic-step/ic-step.js +269 -28
- 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-switch/ic-switch.css +1 -1
- package/dist/collection/components/ic-switch/ic-switch.js +7 -7
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.js +9 -6
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +31 -4
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +4 -4
- package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.js +28 -28
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-theme/ic-theme.js +9 -6
- 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 +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +7 -7
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.js +1 -1
- package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
- package/dist/collection/testspec.setup.js +8 -0
- package/dist/collection/testspec.setup.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 +18 -8
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +3 -3
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +1 -1
- 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.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 +2 -2
- 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-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js.map +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 +24 -7
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu2.js +18 -17
- 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 +1 -1
- 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 +10 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +18 -3
- 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 +2 -7
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +9 -5
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +1 -1
- package/dist/components/ic-skeleton.js.map +1 -1
- 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 +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.map +1 -1
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +2 -2
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-tooltip2.js +7 -3
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- 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.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-0118400b.entry.js.map +1 -1
- package/dist/core/p-07cd789d.entry.js.map +1 -1
- package/dist/core/p-0b125f26.entry.js.map +1 -1
- package/dist/core/p-0d77bd0c.entry.js +2 -0
- package/dist/core/p-0d77bd0c.entry.js.map +1 -0
- package/dist/core/p-10da19d2.entry.js.map +1 -1
- package/dist/core/p-272c7abd.entry.js.map +1 -1
- package/dist/core/p-2b5c9143.entry.js +2 -0
- package/dist/core/p-2b5c9143.entry.js.map +1 -0
- package/dist/core/p-2f114521.entry.js.map +1 -1
- package/dist/core/p-31a8595f.entry.js.map +1 -1
- package/dist/core/{p-7b39977f.entry.js → p-3a068a45.entry.js} +2 -2
- package/dist/core/p-3a068a45.entry.js.map +1 -0
- package/dist/core/{p-e590f1d2.entry.js → p-4c72f3a9.entry.js} +2 -2
- package/dist/core/{p-e590f1d2.entry.js.map → p-4c72f3a9.entry.js.map} +1 -1
- package/dist/core/{p-ae81dffa.entry.js → p-5831bb8e.entry.js} +2 -2
- package/dist/core/p-5831bb8e.entry.js.map +1 -0
- package/dist/core/p-5d76bbad.entry.js +2 -0
- package/dist/core/p-5d76bbad.entry.js.map +1 -0
- package/dist/core/p-5e261268.entry.js.map +1 -1
- package/dist/core/p-60ffb73e.entry.js.map +1 -1
- package/dist/core/p-6308f1f2.entry.js +2 -0
- package/dist/core/p-6308f1f2.entry.js.map +1 -0
- package/dist/core/{p-c6dd4f47.entry.js → p-66f3f02b.entry.js} +2 -2
- package/dist/core/p-66f3f02b.entry.js.map +1 -0
- package/dist/core/p-69650186.entry.js.map +1 -1
- package/dist/core/p-6b34d98f.entry.js.map +1 -1
- package/dist/core/p-6be5e06b.entry.js.map +1 -1
- package/dist/core/p-6d0eaaeb.entry.js.map +1 -1
- package/dist/core/p-6f6bd657.entry.js.map +1 -1
- package/dist/core/{p-1337db5e.entry.js → p-6fba90ee.entry.js} +2 -2
- package/dist/core/p-6fba90ee.entry.js.map +1 -0
- package/dist/core/{p-558552f8.entry.js → p-7881b94e.entry.js} +2 -2
- package/dist/core/p-7881b94e.entry.js.map +1 -0
- package/dist/core/{p-8ddeb574.entry.js → p-7f04e382.entry.js} +2 -2
- package/dist/core/{p-8ddeb574.entry.js.map → p-7f04e382.entry.js.map} +1 -1
- package/dist/core/p-7f632414.entry.js.map +1 -1
- package/dist/core/p-80cd0a2d.entry.js +2 -0
- package/dist/core/p-80cd0a2d.entry.js.map +1 -0
- package/dist/core/{p-df5caf13.entry.js → p-8144e941.entry.js} +2 -2
- package/dist/core/p-8144e941.entry.js.map +1 -0
- package/dist/core/p-9cd04875.entry.js.map +1 -1
- package/dist/core/p-9e684c58.entry.js +2 -0
- package/dist/core/p-9e684c58.entry.js.map +1 -0
- package/dist/core/{p-02799e26.entry.js → p-a2d3e955.entry.js} +2 -2
- package/dist/core/{p-02799e26.entry.js.map → p-a2d3e955.entry.js.map} +1 -1
- package/dist/core/{p-1721bcf3.entry.js → p-b24145f7.entry.js} +2 -2
- package/dist/core/p-b24145f7.entry.js.map +1 -0
- package/dist/core/p-b3dec76d.entry.js.map +1 -1
- package/dist/core/{p-347ec49e.entry.js → p-bf89bcd3.entry.js} +2 -2
- package/dist/core/p-bf89bcd3.entry.js.map +1 -0
- package/dist/core/p-c4d3c18c.entry.js.map +1 -1
- package/dist/core/p-c85689e3.entry.js +2 -0
- package/dist/core/p-c85689e3.entry.js.map +1 -0
- package/dist/core/p-c8ce6147.entry.js +2 -0
- package/dist/core/p-c8ce6147.entry.js.map +1 -0
- package/dist/core/p-cadb531f.entry.js.map +1 -1
- package/dist/core/p-cc83692e.entry.js.map +1 -1
- package/dist/core/p-dd3c3e3c.entry.js.map +1 -1
- package/dist/core/p-e93e9aa3.entry.js.map +1 -1
- package/dist/core/p-ecfb2e6b.entry.js.map +1 -1
- package/dist/core/p-fa7bc907.entry.js +2 -0
- package/dist/core/p-fa7bc907.entry.js.map +1 -0
- package/dist/core/p-fbde8a26.entry.js +2 -0
- package/dist/core/p-fbde8a26.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-alert.entry.js +2 -0
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +18 -8
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +29 -11
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +2 -0
- 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.map +1 -1
- package/dist/esm/ic-data-entity.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js.map +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 +2 -2
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +19 -18
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +2 -2
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +10 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +16 -2
- 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 +2 -7
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +8 -4
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +1 -1
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- 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 +161 -40
- 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.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-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 +12 -8
- package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +1 -0
- package/dist/types/components/ic-breadcrumb/ic-breadcrumb.d.ts +5 -5
- package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +2 -2
- package/dist/types/components/ic-button/ic-button.d.ts +10 -10
- package/dist/types/components/ic-card/ic-card.d.ts +8 -8
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +14 -10
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +9 -9
- 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-classification-banner/ic-classification-banner.d.ts +5 -5
- package/dist/types/components/ic-data-entity/ic-data-entity.d.ts +2 -2
- package/dist/types/components/ic-data-row/ic-data-row.d.ts +3 -3
- package/dist/types/components/ic-footer/ic-footer.d.ts +12 -12
- package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +1 -1
- package/dist/types/components/ic-hero/ic-hero.d.ts +9 -9
- package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +8 -8
- package/dist/types/components/ic-input-container/ic-input-container.d.ts +2 -2
- package/dist/types/components/ic-input-label/ic-input-label.d.ts +8 -8
- package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +5 -5
- package/dist/types/components/ic-link/ic-link.d.ts +6 -6
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +8 -3
- package/dist/types/components/ic-menu/ic-menu.d.ts +14 -14
- package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +5 -5
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +2 -2
- package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +7 -7
- package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +2 -2
- package/dist/types/components/ic-page-header/ic-page-header.d.ts +10 -8
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +10 -10
- package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +13 -11
- package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +28 -25
- package/dist/types/components/ic-section-container/ic-section-container.d.ts +2 -2
- package/dist/types/components/ic-select/ic-select.d.ts +18 -18
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +12 -12
- package/dist/types/components/ic-skeleton/ic-skeleton.d.ts +2 -2
- package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +1 -1
- package/dist/types/components/ic-step/ic-step.d.ts +37 -8
- 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-switch/ic-switch.d.ts +7 -7
- package/dist/types/components/ic-tab/ic-tab.d.ts +5 -5
- package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +8 -4
- package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +4 -4
- package/dist/types/components/ic-tab-panel/ic-tab-panel.d.ts +2 -2
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +30 -30
- package/dist/types/components/ic-theme/ic-theme.d.ts +3 -3
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +4 -0
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +6 -6
- package/dist/types/components/ic-typography/ic-typography.d.ts +1 -1
- package/dist/types/components.d.ts +625 -535
- package/dist/types/testspec.setup.d.ts +1 -0
- package/hydrate/index.js +574 -212
- package/package.json +3 -3
- package/dist/core/p-1337db5e.entry.js.map +0 -1
- package/dist/core/p-1721bcf3.entry.js.map +0 -1
- package/dist/core/p-33a45ace.entry.js +0 -2
- package/dist/core/p-33a45ace.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-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-7b11e1dc.entry.js +0 -2
- package/dist/core/p-7b11e1dc.entry.js.map +0 -1
- package/dist/core/p-7b39977f.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-ae81dffa.entry.js.map +0 -1
- package/dist/core/p-b5a988c0.entry.js +0 -2
- package/dist/core/p-b5a988c0.entry.js.map +0 -1
- package/dist/core/p-c6dd4f47.entry.js.map +0 -1
- package/dist/core/p-df5caf13.entry.js.map +0 -1
- package/dist/core/p-e106305b.entry.js +0 -2
- package/dist/core/p-e106305b.entry.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["src/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","src/components/ic-breadcrumb/ic-breadcrumb.tsx"],"names":["icBreadcrumbCss","Breadcrumb","this","renderDefaultBreadcrumb","current","pageTitle","describedById","href","hasPageTitle","undefined","h","class","current-page-container","isSlotUsed","el","name","aria-describedby","showBackIcon","innerHTML","backIcon","setSlottedCurrentPageClass","icLink","querySelector","classList","remove","hasCurrentPageClass","contains","add","[object Object]","toLowerCase","replace","hasHref","Host","back","aria-current","role","chevronIcon","aria-hidden","id"],"mappings":"2WAAA,MAAMA,EAAkB,i9CCYXC,EAAU,+BAwBbC,KAAAC,wBAA0B,CAChCC,EACAC,EACAC,EACAC,KAEA,MAAMC,EACJH,IAAc,MAAQA,IAAcI,WAAaJ,IAAc,GAEjE,GAAID,GAAWI,EAAc,CAC3B,OACEE,EAAA,OAAA,CACEC,MAAO,CACLC,yBAA0BR,IAG3BS,EAAWX,KAAKY,GAAI,SAAWJ,EAAA,OAAA,CAAMK,KAAK,SAC1CV,GAKP,OACEK,EAAA,UAAA,CACEH,KAAMA,EACNI,MAAM,kBAAiBK,mBACLd,KAAKe,cAAgBX,GAAiBA,GAEvDJ,KAAKe,cACJP,EAAA,MAAA,CAAKC,MAAM,YAAYO,UAAWC,IAEnCN,EAAWX,KAAKY,GAAI,SAAWJ,EAAA,OAAA,CAAMK,KAAK,SAC1CV,IAKCH,KAAAkB,2BAA6B,KACnC,MAAMC,EAASnB,KAAKY,GAAGQ,cAAc,WACrC,GAAID,EAAQ,CACVA,EAAOE,UAAUC,OAAO,gBACxB,GAAItB,KAAKE,QAAS,CAChB,MAAMqB,EAAsBJ,EAAOE,UAAUG,SAAS,gBACtD,IAAKD,EAAqB,CACxBJ,EAAOE,UAAUI,IAAI,kBAAmB,8EAnDpB,wBAKqB,MAoDjDC,sBACE1B,KAAKkB,6BAGPQ,SACE,MAAMxB,QAAEA,EAAOG,KAAEA,EAAIF,UAAEA,GAAcH,KACrC,MAAMI,EAAgB,GACpBD,GAAaA,EAAUwB,cAAcC,QAAQ,IAAK,mBAGpD,MAAMtB,EACJH,IAAc,MAAQA,IAAcI,WAAaJ,IAAc,GACjE,MAAM0B,EAAUxB,IAAS,MAAQA,IAASE,WAAaF,IAAS,GAEhE,OACEG,EAACsB,EAAI,CACHrB,MAAO,CACLsB,KAAM/B,KAAKe,cACZiB,eACa9B,GAAW,OACzB+B,KAAK,YAELzB,EAAA,MAAA,CAAKC,MAAM,cACTD,EAAA,OAAA,CAAMQ,UAAWkB,EAAazB,MAAM,UAAS0B,cAAa,SACzDnC,KAAKe,cAAgBX,GACpBI,EAAA,OAAA,CACE4B,GAAIhC,EACJK,MAAM,QACN,WAAWN,KAEdG,GAAgBuB,EACf7B,KAAKC,wBACHC,EACAC,EACAC,EACAC,GAGFG,EAAA,OAAA","sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg {\n color: var(--ic-architectural-400);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-hyperlink);\n}\n\n:host(.back) {\n display: flex;\n align-items: center;\n}\n\n:host(.back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color:
|
1
|
+
{"version":3,"sources":["src/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","src/components/ic-breadcrumb/ic-breadcrumb.tsx"],"names":["icBreadcrumbCss","Breadcrumb","this","renderDefaultBreadcrumb","current","pageTitle","describedById","href","hasPageTitle","undefined","h","class","current-page-container","isSlotUsed","el","name","aria-describedby","showBackIcon","innerHTML","backIcon","setSlottedCurrentPageClass","icLink","querySelector","classList","remove","hasCurrentPageClass","contains","add","[object Object]","toLowerCase","replace","hasHref","Host","back","aria-current","role","chevronIcon","aria-hidden","id"],"mappings":"2WAAA,MAAMA,EAAkB,i9CCYXC,EAAU,+BAwBbC,KAAAC,wBAA0B,CAChCC,EACAC,EACAC,EACAC,KAEA,MAAMC,EACJH,IAAc,MAAQA,IAAcI,WAAaJ,IAAc,GAEjE,GAAID,GAAWI,EAAc,CAC3B,OACEE,EAAA,OAAA,CACEC,MAAO,CACLC,yBAA0BR,IAG3BS,EAAWX,KAAKY,GAAI,SAAWJ,EAAA,OAAA,CAAMK,KAAK,SAC1CV,GAKP,OACEK,EAAA,UAAA,CACEH,KAAMA,EACNI,MAAM,kBAAiBK,mBACLd,KAAKe,cAAgBX,GAAiBA,GAEvDJ,KAAKe,cACJP,EAAA,MAAA,CAAKC,MAAM,YAAYO,UAAWC,IAEnCN,EAAWX,KAAKY,GAAI,SAAWJ,EAAA,OAAA,CAAMK,KAAK,SAC1CV,IAKCH,KAAAkB,2BAA6B,KACnC,MAAMC,EAASnB,KAAKY,GAAGQ,cAAc,WACrC,GAAID,EAAQ,CACVA,EAAOE,UAAUC,OAAO,gBACxB,GAAItB,KAAKE,QAAS,CAChB,MAAMqB,EAAsBJ,EAAOE,UAAUG,SAAS,gBACtD,IAAKD,EAAqB,CACxBJ,EAAOE,UAAUI,IAAI,kBAAmB,8EAnDpB,wBAKqB,MAoDjDC,sBACE1B,KAAKkB,6BAGPQ,SACE,MAAMxB,QAAEA,EAAOG,KAAEA,EAAIF,UAAEA,GAAcH,KACrC,MAAMI,EAAgB,GACpBD,GAAaA,EAAUwB,cAAcC,QAAQ,IAAK,mBAGpD,MAAMtB,EACJH,IAAc,MAAQA,IAAcI,WAAaJ,IAAc,GACjE,MAAM0B,EAAUxB,IAAS,MAAQA,IAASE,WAAaF,IAAS,GAEhE,OACEG,EAACsB,EAAI,CACHrB,MAAO,CACLsB,KAAM/B,KAAKe,cACZiB,eACa9B,GAAW,OACzB+B,KAAK,YAELzB,EAAA,MAAA,CAAKC,MAAM,cACTD,EAAA,OAAA,CAAMQ,UAAWkB,EAAazB,MAAM,UAAS0B,cAAa,SACzDnC,KAAKe,cAAgBX,GACpBI,EAAA,OAAA,CACE4B,GAAIhC,EACJK,MAAM,QACN,WAAWN,KAEdG,GAAgBuB,EACf7B,KAAKC,wBACHC,EACAC,EACAC,EACAC,GAGFG,EAAA,OAAA","sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg {\n color: var(--ic-architectural-400);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-hyperlink);\n}\n\n:host(.back) {\n display: flex;\n align-items: center;\n}\n\n:host(.back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n","import { Component, Host, Prop, h, Element } from \"@stencil/core\";\nimport { IcBreadcrumbDefault } from \"./ic-breadcrumb.types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { isSlotUsed } from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-breadcrumb\",\n styleUrl: \"ic-breadcrumb.css\",\n shadow: true,\n})\nexport class Breadcrumb {\n /**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\n\n @Element() el: HTMLIcBreadcrumbElement;\n /**\n * The title of the breadcrumb.\n */\n @Prop() pageTitle!: string;\n /**\n * The URL that the breadcrumb link points to.\n */\n @Prop() href?: string;\n /**\n * If `true`, aria-current will be set on the breadcrumb.\n */\n @Prop() current?: boolean = false;\n\n /**\n * @internal If `true`, back icon will be displayed.\n */\n @Prop({ reflect: true }) showBackIcon: boolean = false;\n\n private renderDefaultBreadcrumb = (\n current: boolean,\n pageTitle: string,\n describedById: string,\n href: string\n ): IcBreadcrumbDefault => {\n const hasPageTitle =\n pageTitle !== null && pageTitle !== undefined && pageTitle !== \"\";\n\n if (current && hasPageTitle) {\n return (\n <span\n class={{\n \"current-page-container\": current,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </span>\n );\n }\n\n return (\n <ic-link\n href={href}\n class=\"breadcrumb-link\"\n aria-describedby={this.showBackIcon && describedById && describedById}\n >\n {this.showBackIcon && (\n <div class=\"back-icon\" innerHTML={backIcon}></div>\n )}\n {isSlotUsed(this.el, \"icon\") && <slot name=\"icon\"></slot>}\n {pageTitle}\n </ic-link>\n );\n };\n\n private setSlottedCurrentPageClass = () => {\n const icLink = this.el.querySelector(\"ic-link\");\n if (icLink) {\n icLink.classList.remove(\"current-page\");\n if (this.current) {\n const hasCurrentPageClass = icLink.classList.contains(\"current-page\");\n if (!hasCurrentPageClass) {\n icLink.classList.add(\"breadcrumb-link\", \"current-page\");\n }\n }\n }\n };\n\n componentWillRender(): void {\n this.setSlottedCurrentPageClass();\n }\n\n render() {\n const { current, href, pageTitle } = this;\n const describedById = `${\n pageTitle && pageTitle.toLowerCase().replace(\" \", \"-\")\n }-describedby`;\n\n const hasPageTitle =\n pageTitle !== null && pageTitle !== undefined && pageTitle !== \"\";\n const hasHref = href !== null && href !== undefined && href !== \"\";\n\n return (\n <Host\n class={{\n back: this.showBackIcon,\n }}\n aria-current={current && \"page\"}\n role=\"listitem\"\n >\n <div class=\"breadcrumb\">\n <span innerHTML={chevronIcon} class=\"chevron\" aria-hidden=\"true\" />\n {this.showBackIcon && describedById && (\n <span\n id={describedById}\n class=\"hide\"\n >{`Back to ${pageTitle}`}</span>\n )}\n {hasPageTitle && hasHref ? (\n this.renderDefaultBreadcrumb(\n current,\n pageTitle,\n describedById,\n href\n )\n ) : (\n <slot />\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,h as o,H as e,g as i}from"./p-f9370be6.js";import{D as n,k as r}from"./p-23831891.js";import"./p-6f57b13c.js";const s='/*! 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(.footer-link-ungrouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:40px;--footer-link-margin-bottom:0}:host(.footer-link-ungrouped-small){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-small){--footer-link-margin-left:var(--ic-space-md);--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link){margin-left:var(--footer-link-margin-left);margin-right:var(--footer-link-margin-right);margin-bottom:var(--footer-link-margin-bottom)}:host(.footer-link) a,:host(.footer-link) a ::slotted(a){display:block;font-weight:var(--ic-font-weight-bold);color:inherit;width:-moz-fit-content;width:fit-content;font-size:var(--ic-font-size-regular)}:host(.footer-link) a:link,:host(.footer-link) a ::slotted(a:link){color:inherit;text-decoration:underline;font-weight:var(--ic-font-weight-bold)}:host(.footer-link) a:link>::slotted(svg),:host(.footer-link) a:link>::slotted(img),:host(.footer-link) a ::slotted(a:link>::slotted(svg)),:host(.footer-link) a ::slotted(a:link>::slotted(img)){padding:var(--ic-space-xxxs);pointer-events:none;transition:var(--ic-easing-transition-fast)}:host(.footer-link-light) ::slotted(svg){fill:var(--ic-architectural-white)}:host(.footer-link-dark) ::slotted(svg){fill:var(--ic-architectural-black)}:host(.footer-link) a:link:hover,:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:hover),:host(.footer-link) a ::slotted(a:link:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%}:host(.footer-link) a:link:hover,:host(.footer-link) a ::slotted(a:link:hover){outline:none}:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:focus){outline:var(--ic-hc-focus-outline)}:host(.footer-link) a:link:focus>::slotted(svg),:host(.footer-link) a:link:focus>::slotted(img),:host(.footer-link) a ::slotted(a:link:focus>::slotted(svg)),:host(.footer-link) a ::slotted(a:link:focus>::slotted(img)){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius)}:host(.footer-link) a:focus,:host(.footer-link) a ::slotted(a:focus){border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);transition:var(--ic-transition-duration-fast)}:host(.footer-link) a:link:active,:host(.footer-link) a:link:focus:active,:host(.footer-link) a:link:visited:active,:host(.footer-link) a ::slotted(a:link:active),:host(.footer-link) a ::slotted(a:link:focus:active),:host(.footer-link) a ::slotted(a:link:visited:active){color:inherit;text-decoration:none}:host(.footer-link) a:hover,:host(.footer-link) a ::slotted(a:hover){text-decoration:none}@media (forced-colors: active){:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:currentcolor}}';const
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,h as o,H as e,g as i}from"./p-f9370be6.js";import{D as n,k as r}from"./p-23831891.js";import"./p-6f57b13c.js";const s='/*! 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(.footer-link-ungrouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:40px;--footer-link-margin-bottom:0}:host(.footer-link-ungrouped-small){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-small){--footer-link-margin-left:var(--ic-space-md);--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link){margin-left:var(--footer-link-margin-left);margin-right:var(--footer-link-margin-right);margin-bottom:var(--footer-link-margin-bottom)}:host(.footer-link) a,:host(.footer-link) a ::slotted(a){display:block;font-weight:var(--ic-font-weight-bold);color:inherit;width:-moz-fit-content;width:fit-content;font-size:var(--ic-font-size-regular)}:host(.footer-link) a:link,:host(.footer-link) a ::slotted(a:link){color:inherit;text-decoration:underline;font-weight:var(--ic-font-weight-bold)}:host(.footer-link) a:link>::slotted(svg),:host(.footer-link) a:link>::slotted(img),:host(.footer-link) a ::slotted(a:link>::slotted(svg)),:host(.footer-link) a ::slotted(a:link>::slotted(img)){padding:var(--ic-space-xxxs);pointer-events:none;transition:var(--ic-easing-transition-fast)}:host(.footer-link-light) ::slotted(svg){fill:var(--ic-architectural-white)}:host(.footer-link-dark) ::slotted(svg){fill:var(--ic-architectural-black)}:host(.footer-link) a:link:hover,:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:hover),:host(.footer-link) a ::slotted(a:link:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%}:host(.footer-link) a:link:hover,:host(.footer-link) a ::slotted(a:link:hover){outline:none}:host(.footer-link) a:link:focus,:host(.footer-link) a ::slotted(a:link:focus){outline:var(--ic-hc-focus-outline)}:host(.footer-link) a:link:focus>::slotted(svg),:host(.footer-link) a:link:focus>::slotted(img),:host(.footer-link) a ::slotted(a:link:focus>::slotted(svg)),:host(.footer-link) a ::slotted(a:link:focus>::slotted(img)){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius)}:host(.footer-link) a:focus,:host(.footer-link) a ::slotted(a:focus){border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);transition:var(--ic-transition-duration-fast)}:host(.footer-link) a:link:active,:host(.footer-link) a:link:focus:active,:host(.footer-link) a:link:visited:active,:host(.footer-link) a ::slotted(a:link:active),:host(.footer-link) a ::slotted(a:link:focus:active),:host(.footer-link) a ::slotted(a:link:visited:active){color:inherit;text-decoration:none}:host(.footer-link) a:hover,:host(.footer-link) a ::slotted(a:hover){text-decoration:none}@media screen and (min-width: 769px){:host(.footer-link.footer-link-ungrouped-sparse:last-of-type){margin-right:0}}@media (forced-colors: active){:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:currentcolor}}';const a=class{constructor(o){t(this,o);this.href=null;this.footerConfig={small:false,grouped:false};this.deviceSize=n.XL;this.foregroundColor=r()}inferConfig(t){if(t.parentElement!==null){if(t.parentElement.classList.contains("footer")){return{small:t.parentElement.classList.contains("footer-small"),grouped:t.parentElement.classList.contains("footer-grouped")}}else{return this.inferConfig(t.parentElement)}}else{return{small:false,grouped:false}}}footerResizeHandler(){this.footerConfig=this.inferConfig(this.el)}footerThemeChangeHandler(t){const o=t.detail;this.foregroundColor=o.mode}componentWillLoad(){this.footerConfig=this.inferConfig(this.el)}render(){const{footerConfig:t,href:i}=this;const{small:n,grouped:r}=t;return o(e,{class:{"footer-link":true,[`footer-link-${r?"grouped":"ungrouped"}-${n?"small":"sparse"}`]:true,[`footer-link-${this.foregroundColor}`]:true}},o("a",{href:i},o("slot",null)))}get el(){return i(this)}};a.style=s;export{a as ic_footer_link};
|
2
|
+
//# sourceMappingURL=p-5831bb8e.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/components/ic-footer-link/ic-footer-link.css?tag=ic-footer-link&encapsulation=shadow","src/components/ic-footer-link/ic-footer-link.tsx"],"names":["icFooterLinkCss","FooterLink","small","grouped","DEVICE_SIZES","XL","getThemeForegroundColor","[object Object]","e","parentElement","classList","contains","this","inferConfig","footerConfig","el","ev","theme","detail","foregroundColor","mode","href","h","Host","class","footer-link"],"mappings":"4HAAA,MAAMA,EAAkB,42KCmBXC,EAAU,yCAMG,uBAEc,CAAEC,MAAO,MAAOC,QAAS,uBAEjCC,EAAaC,wBAEGC,IAEtCC,YAAYC,GAClB,GAAIA,EAAEC,gBAAkB,KAAM,CAC5B,GAAID,EAAEC,cAAcC,UAAUC,SAAS,UAAW,CAChD,MAAO,CACLT,MAAOM,EAAEC,cAAcC,UAAUC,SAAS,gBAC1CR,QAASK,EAAEC,cAAcC,UAAUC,SAAS,uBAEzC,CACL,OAAOC,KAAKC,YAAYL,EAAEC,oBAEvB,CACL,MAAO,CAAEP,MAAO,MAAOC,QAAS,QAKpCI,sBACEK,KAAKE,aAAeF,KAAKC,YAAYD,KAAKG,IAI5CR,yBAAyBS,GACvB,MAAMC,EAAiBD,EAAGE,OAC1BN,KAAKO,gBAAkBF,EAAMG,KAG/Bb,oBACEK,KAAKE,aAAeF,KAAKC,YAAYD,KAAKG,IAG5CR,SACE,MAAMO,aAAEA,EAAYO,KAAEA,GAAST,KAC/B,MAAMV,MAAEA,EAAKC,QAAEA,GAAYW,EAE3B,OACEQ,EAACC,EAAI,CACHC,MAAO,CACLC,cAAe,KACflB,CAAC,eAAeJ,EAAU,UAAY,eACpCD,EAAQ,QAAU,YACf,KACLK,CAAC,eAAeK,KAAKO,mBAAoB,OAG3CG,EAAA,IAAA,CAAGD,KAAMA,GACPC,EAAA,OAAA","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host(.footer-link-ungrouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 40px;\n --footer-link-margin-bottom: 0;\n}\n\n:host(.footer-link-ungrouped-small) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-small) {\n --footer-link-margin-left: var(--ic-space-md);\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link) {\n margin-left: var(--footer-link-margin-left);\n margin-right: var(--footer-link-margin-right);\n margin-bottom: var(--footer-link-margin-bottom);\n}\n\n/* Link styling */\n\n:host(.footer-link) a,\n:host(.footer-link) a ::slotted(a) {\n display: block;\n font-weight: var(--ic-font-weight-bold);\n color: inherit;\n width: fit-content;\n font-size: var(--ic-font-size-regular);\n}\n\n:host(.footer-link) a:link,\n:host(.footer-link) a ::slotted(a:link) {\n color: inherit;\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n}\n\n:host(.footer-link) a:link > ::slotted(svg),\n:host(.footer-link) a:link > ::slotted(img),\n:host(.footer-link) a ::slotted(a:link > ::slotted(svg)),\n:host(.footer-link) a ::slotted(a:link > ::slotted(img)) {\n padding: var(--ic-space-xxxs);\n pointer-events: none;\n transition: var(--ic-easing-transition-fast);\n}\n\n/*\nThere's an apparent defect in Chrome that means this isn't always re-rendered if changed.\nNot an issue in Safari. Line 73-79 implement the same function but less clean.\n\na:link > ::slotted(svg) ,\na:link:visited > ::slotted(svg) {\n fill: var(--ic-theme-text);\n}\n*/\n\n:host(.footer-link-light) ::slotted(svg) {\n fill: var(--ic-architectural-white);\n}\n\n:host(.footer-link-dark) ::slotted(svg) {\n fill: var(--ic-architectural-black);\n}\n\n:host(.footer-link) a:link:hover,\n:host(.footer-link) a:link:focus,\n:host(.footer-link) a ::slotted(a:link:hover),\n:host(.footer-link) a ::slotted(a:link:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n:host(.footer-link) a:link:hover,\n:host(.footer-link) a ::slotted(a:link:hover) {\n outline: none;\n}\n\n:host(.footer-link) a:link:focus,\n:host(.footer-link) a ::slotted(a:link:focus) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.footer-link) a:link:focus > ::slotted(svg),\n:host(.footer-link) a:link:focus > ::slotted(img),\n:host(.footer-link) a ::slotted(a:link:focus > ::slotted(svg)),\n:host(.footer-link) a ::slotted(a:link:focus > ::slotted(img)) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.footer-link) a:focus,\n:host(.footer-link) a ::slotted(a:focus) {\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n transition: var(--ic-transition-duration-fast);\n}\n\n:host(.footer-link) a:link:active,\n:host(.footer-link) a:link:focus:active,\n:host(.footer-link) a:link:visited:active,\n:host(.footer-link) a ::slotted(a:link:active),\n:host(.footer-link) a ::slotted(a:link:focus:active),\n:host(.footer-link) a ::slotted(a:link:visited:active) {\n color: inherit;\n text-decoration: none;\n}\n\n:host(.footer-link) a:hover,\n:host(.footer-link) a ::slotted(a:hover) {\n text-decoration: none;\n}\n\n@media screen and (min-width: 769px) {\n :host(.footer-link.footer-link-ungrouped-sparse:last-of-type) {\n margin-right: 0;\n }\n}\n\n@media (forced-colors: active) {\n :host(.footer-link-light) ::slotted(svg),\n :host(.footer-link-dark) ::slotted(svg) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Listen,\n Prop,\n h,\n State,\n} from \"@stencil/core\";\nimport { DEVICE_SIZES, getThemeForegroundColor } from \"../../utils/helpers\";\nimport { IcTheme, IcThemeForeground } from \"../../utils/types\";\n\ntype FooterConfig = { small: boolean; grouped: boolean };\n\n@Component({\n tag: \"ic-footer-link\",\n styleUrl: \"ic-footer-link.css\",\n shadow: true,\n})\nexport class FooterLink {\n @Element() el: HTMLIcFooterLinkElement;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n @State() footerConfig: FooterConfig = { small: false, grouped: false };\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n\n private inferConfig(e: HTMLElement): FooterConfig {\n if (e.parentElement !== null) {\n if (e.parentElement.classList.contains(\"footer\")) {\n return {\n small: e.parentElement.classList.contains(\"footer-small\"),\n grouped: e.parentElement.classList.contains(\"footer-grouped\"),\n };\n } else {\n return this.inferConfig(e.parentElement);\n }\n } else {\n return { small: false, grouped: false };\n }\n }\n\n @Listen(\"footerResized\", { target: \"document\" })\n footerResizeHandler(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n footerThemeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n\n componentWillLoad(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n render() {\n const { footerConfig, href } = this;\n const { small, grouped } = footerConfig;\n\n return (\n <Host\n class={{\n \"footer-link\": true,\n [`footer-link-${grouped ? \"grouped\" : \"ungrouped\"}-${\n small ? \"small\" : \"sparse\"\n }`]: true,\n [`footer-link-${this.foregroundColor}`]: true,\n }}\n >\n <a href={href}>\n <slot />\n </a>\n </Host>\n );\n }\n}\n"]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,h as i,H as s,g as h}from"./p-f9370be6.js";import{c as e}from"./p-23831891.js";import"./p-6f57b13c.js";const l=":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}";const p=class{constructor(i){t(this,i);this.resizeObserver=null;this.getChildren=()=>{this.steps=Array.from(this.el.querySelectorAll("ic-step"));this.stepsWithStepTitles=Array.from(this.el.querySelectorAll("ic-step[step-title]"))};this.checkStepTitles=()=>{if(this.stepsWithStepTitles.length<this.steps.length&&this.variantOverride&&this.variant==="compact"){this.noOfResizes=this.noOfResizes+1;if(this.noOfResizes===1){console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`)}}};this.setStepTypes=()=>{this.getChildren();this.stepTypes=[];for(let t=0;t<this.steps.length;t++){this.stepTypes.push("active")}};this.setStepperWidth=()=>{this.alignedFullWidth=this.variant==="default"&&this.aligned==="full-width";const t=this.steps[this.steps.length-1];t.style.maxWidth="none";if(this.alignedFullWidth){this.stepperWidth=this.el.offsetWidth;t.style.maxWidth=`${this.stepperWidth/this.steps.length}px`;this.lastStepWidth=t.offsetWidth}};this.initialiseStepStates=()=>{this.steps.forEach(((t,i)=>{t.variant=this.variant;t.stepNum=i+1;t.lastStep=i===this.steps.length-1;t.lastStepNum=this.steps.length;if(t.stepType!=="current"){t.current=false;this.stepTypes[i]=t.stepType}else{t.current=true}const s=t.shadowRoot&&t.shadowRoot.querySelector(".step > .step-title-area");if(this.stepsWithStepTitles.length==0&&this.variantOverride){if(this.variant==="compact"){this.autoSetStepTitles=true;if(this.autoSetStepTitles){t.stepTitle="Step "+t.stepNum;s&&s.querySelector(".step-title").setAttribute("aria-hidden","true")}}if(this.variant==="default"){this.autoSetStepTitles=false;if(!this.autoSetStepTitles){t.stepTitle=undefined;s&&s.querySelector(".step-title").removeAttribute("aria-hidden")}}}if(this.variant==="compact"){if(t.current===true||t.stepType==="current"){t.classList.remove("hide");t.classList.add("show")}else if(t.classList.contains("show")){t.classList.remove("show");t.classList.add("hide")}if(!t.lastStep){t.nextStepTitle=this.steps[i+1].stepTitle;t.progress=t.stepNum/this.steps.length*100}else if(t.lastStep&&this.stepTypes[i]!=="completed"){t.progress=95}else{t.progress=100}if(this.hideStepInfo&&s!==null){s.classList.remove("visually-hidden")}t.compactStepStyling=this.stepTypes[i]}if(this.variant==="default"){if(!t.lastStep){if(this.alignedFullWidth){t.style.width=`${(this.stepperWidth-this.lastStepWidth)/(this.steps.length-1)}px`;t.style.minWidth="148px"}}else if(t.lastStep){t.classList.add("last-step");if(this.alignedFullWidth){t.style.maxWidth=`${this.lastStepWidth}px`}else{t.style.maxWidth=this.connectorWidth>100?`${this.connectorWidth+48}px`:"148px"}}if(this.aligned==="left"){t.style.width=this.connectorWidth>100?`${this.connectorWidth+48}px`:"148px";const i=t.shadowRoot.querySelector(".step > .step-top > .step-connect");if(i){i.style.width=this.connectorWidth>100?`${this.connectorWidth}px`:"100px"}}if(this.hideStepInfo&&s!==null){s.classList.add("visually-hidden")}}}))};this.overrideVariant=()=>{let t=148*this.steps.length;if(this.aligned==="left"&&this.connectorWidth>100){t=(this.connectorWidth+48)*this.steps.length}if(this.variantOverride){if(this.el.clientWidth<t){this.variant="compact";this.getChildren()}else{this.variant="default";this.getChildren()}}};this.resizeObserverCallback=()=>{this.getChildren();this.checkStepTitles();this.overrideVariant();this.setStepperWidth();this.initialiseStepStates()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.aligned="full-width";this.variant="default";this.connectorWidth=100;this.hideStepInfo=false;this.stepperWidth=document.querySelector("ic-stepper").getBoundingClientRect().width;this.lastStepWidth=0;this.stepTypes=[];this.alignedFullWidth=true;this.autoSetStepTitles=true;this.variantOverride=this.variant!=="compact";this.noOfResizes=0}componentWillLoad(){this.setStepTypes();if(this.variant==="compact"){this.variantOverride=false}}componentDidLoad(){e(this.runResizeObserver)}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}render(){return i(s,{class:{[`${this.variant}`]:true,["aligned-left"]:this.variant==="default"&&this.aligned==="left"}},i("ul",{class:"step-item-list"},i("slot",null)))}get el(){return h(this)}};p.style=l;export{p as ic_stepper};
|
2
|
+
//# sourceMappingURL=p-5d76bbad.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","src/components/ic-stepper/ic-stepper.tsx"],"names":["icStepperCss","Stepper","this","resizeObserver","getChildren","steps","Array","from","el","querySelectorAll","stepsWithStepTitles","checkStepTitles","length","variantOverride","variant","noOfResizes","console","error","setStepTypes","stepTypes","i","push","setStepperWidth","alignedFullWidth","aligned","lastStep","style","maxWidth","stepperWidth","offsetWidth","lastStepWidth","initialiseStepStates","forEach","step","index","stepNum","lastStepNum","stepType","current","stepTitleArea","shadowRoot","querySelector","autoSetStepTitles","stepTitle","setAttribute","undefined","removeAttribute","classList","remove","add","contains","nextStepTitle","progress","hideStepInfo","compactStepStyling","width","minWidth","connectorWidth","stepConnect","overrideVariant","minDefaultStepperWidth","clientWidth","resizeObserverCallback","runResizeObserver","ResizeObserver","observe","document","getBoundingClientRect","[object Object]","checkResizeObserver","disconnect","h","Host","class"],"mappings":"qHAAA,MAAMA,EAAe,mVCURC,EAAO,+BA2CVC,KAAAC,eAAiC,KAGjCD,KAAAE,YAAc,KACpBF,KAAKG,MAAQC,MAAMC,KAAKL,KAAKM,GAAGC,iBAAiB,YAEjDP,KAAKQ,oBAAsBJ,MAAMC,KAC/BL,KAAKM,GAAGC,iBAAiB,yBAKrBP,KAAAS,gBAAkB,KACxB,GACET,KAAKQ,oBAAoBE,OAASV,KAAKG,MAAMO,QAC7CV,KAAKW,iBACLX,KAAKY,UAAY,UACjB,CACAZ,KAAKa,YAAcb,KAAKa,YAAc,EACtC,GAAIb,KAAKa,cAAgB,EAAG,CAC1BC,QAAQC,MACN,wIAMAf,KAAAgB,aAAe,KACrBhB,KAAKE,cACLF,KAAKiB,UAAY,GACjB,IAAK,IAAIC,EAAI,EAAGA,EAAIlB,KAAKG,MAAMO,OAAQQ,IAAK,CAC1ClB,KAAKiB,UAAUE,KAAK,YAIhBnB,KAAAoB,gBAAkB,KACxBpB,KAAKqB,iBACHrB,KAAKY,UAAY,WAAaZ,KAAKsB,UAAY,aAEjD,MAAMC,EAAWvB,KAAKG,MAAMH,KAAKG,MAAMO,OAAS,GAChDa,EAASC,MAAMC,SAAW,OAE1B,GAAIzB,KAAKqB,iBAAkB,CACzBrB,KAAK0B,aAAe1B,KAAKM,GAAGqB,YAC5BJ,EAASC,MAAMC,SAAW,GAAGzB,KAAK0B,aAAe1B,KAAKG,MAAMO,WAC5DV,KAAK4B,cAAgBL,EAASI,cAI1B3B,KAAA6B,qBAAuB,K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,QAAU,UACfZ,KAAKE,iBAKHF,KAAA4D,uBAAyB,KAC/B5D,KAAKE,cACLF,KAAKS,kBACLT,KAAKyD,kBACLzD,KAAKoB,kBACLpB,KAAK6B,wBAGC7B,KAAA6D,kBAAoB,KAC1B7D,KAAKC,eAAiB,IAAI6D,gBAAe,KACvC9D,KAAK4D,4BAEP5D,KAAKC,eAAe8D,QAAQ/D,KAAKM,kBAnOI,0BAKa,8BAKlB,sBAKD,wBAED0D,SAC7BzB,cAAc,cACd0B,wBAAwBZ,yBAEM,iBAEG,yBAEC,4BAEC,0BAEDrD,KAAKY,UAAY,2BAEtB,EAuMhCsD,oBACElE,KAAKgB,eACL,GAAIhB,KAAKY,UAAY,UAAW,CAC9BZ,KAAKW,gBAAkB,OAI3BuD,mBACEC,EAAoBnE,KAAK6D,mBAG3BK,uBACE,GAAIlE,KAAKC,iBAAmB,KAAM,CAChCD,KAAKC,eAAemE,cAIxBF,SACE,OACEG,EAACC,EAAI,CACHC,MAAO,CACLL,CAAC,GAAGlE,KAAKY,WAAY,KACrBsD,CAAC,gBACClE,KAAKY,UAAY,WAAaZ,KAAKsB,UAAY,SAGnD+C,EAAA,KAAA,CAAIE,MAAM,kBACRF,EAAA,OAAA","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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["src/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","src/components/ic-tab-group/ic-tab-group.tsx"],"names":["icTabGroupCss","SCROLL_DELAY_MS","TabGroup","this","buttonStateSet","resizeObserverCallback","tabGroupEl","undefined","host","shadowRoot","querySelector","tabOverflow","elementOverflowsX","lastTabVisible","offsetWidth","scrollLeft","scrollWidth","runResizeObserver","resizeObserver","ResizeObserver","observe","splitterEl","scrollTabIntoView","getCurrentLeftTab","scrollRight","longScrollRight","scrollDelay","window","setTimeout","longScrollLeft","leftArrowMouseDownHandler","rightArrowMouseDownHandler","arrowMouseUpHandler","clearTimeout","index","tabOffsets","findIndex","el","scrollHandler","isScrolling","scrollStopped","firstTabVisible","[object Object]","tabNumber","newScrollPos","event","detail","position","tabs","Array","from","querySelectorAll","runningTotal","map","tab","checkResizeObserver","onComponentRequiredPropUndefined","prop","label","propName","disconnect","inline","appearance","h","Host","role","aria-label","class","IcThemeForegroundEnum","Light","aria-hidden","id","placement","target","innerHTML","LeftArrow","onClick","onMouseDown","onMouseUp","ref","onScroll","RightArrow"],"mappings":"mhBAAA,MAAMA,EAAgB,uiFCyBtB,MAAMC,EAAkB,UAOXC,EAAQ,+BAgCXC,KAAAC,eAA0B,MAsB1BD,KAAAE,uBAAyB,KAC/B,GAAIF,KAAKG,aAAe,MAAQH,KAAKG,aAAeC,UAAW,CAC7DJ,KAAKG,WAAaH,KAAKK,KAAKC,WAAWC,cAAc,mBAEvDP,KAAKQ,YAAcC,EAAkBT,KAAKG,YAC1C,GAAIH,KAAKQ,YAAa,CACpBR,KAAKU,eACHV,KAAKG,W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A,OAAA,CAAMI,MAAM,0BAGhBJ,EAAA,MAAA,CACEI,MAAM,iBACNY,IAAM1C,GAAQlC,KAAKG,WAAa+B,EAChC2C,SAAU7E,KAAKmC,eAEfyB,EAAA,OAAA,OAED5D,KAAKQ,aACJoD,EAAA,MAAA,CAAAO,cACc,OACZC,GAAG,yBACHJ,MAAO,CACLzB,CAAC,oBAAqB,KACtBA,CAAC,WAAY/B,EACb+B,CAAC,YAAa7B,IAGhBkD,EAAA,OAAA,CAAMI,MAAM,0BACZJ,EAAA,aAAA,CACES,UAAU,eACVd,MAAM,eACNe,OAAO,eAEPV,EAAA,OAAA,CACEQ,GAAG,cACHJ,MAAM,eACNO,UAAWO,EACXL,QAASzE,KAAKqB,YACdqD,YAAa1E,KAAK4B,2BAClB+C,UAAW3E,KAAK6B,yBAO1B+B,EAAA,MAAA,CAAAO,cACc,OACZH,MAAO,CACLzB,CAAC,mBAAoB,KACrBA,CAAC,UAAWmB,GAEdkB,IAAM1C,GAAQlC,KAAKkB,WAAagB","sourcesContent":[":host {\n --border-bottom-color: var(--ic-architectural-300);\n --splitter-color: var(--ic-architectural-100);\n --tab-scroll-focus: var(--ic-border-focus);\n --tab-scroll-fill: var(--ic-action-default);\n --tab-scroll-disabled-fill: var(--ic-architectural-300);\n --tab-scroll-hover: var(--ic-action-default-bg-hover);\n --tab-scroll-active: var(--ic-action-default-bg-active);\n\n display: block;\n margin-bottom: var(--ic-space-md);\n margin-left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.light) {\n --splitter-color: var(--ic-architectural-white);\n --tab-scroll-focus: var(--ic-border-focus-dark);\n --tab-scroll-fill: var(--ic-action-light);\n --tab-scroll-disabled-fill: var(--ic-architectural-500);\n --tab-scroll-hover: var(--ic-action-dark-bg-hover);\n --tab-scroll-active: var(--ic-action-dark-bg-active);\n}\n\n:host([inline]) {\n margin-bottom: 0;\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n overflow-y: hidden;\n overflow-x: scroll;\n height: 100%;\n align-items: center;\n padding: var(--ic-space-xs);\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n margin: calc(-1 * var(--ic-space-xs)) 0;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n\n.ic-tab-group-container {\n display: flex;\n align-items: center;\n}\n\n:host(.light.ic-tab-group-not-inline) {\n --border-bottom-color: var(--ic-architectural-white);\n}\n\n.scroll-container {\n display: flex;\n}\n\n.scroll-container.hidden {\n display: none;\n}\n\n.scroll-container:first-child {\n margin-left: var(--ic-space-xs);\n}\n\n.scroll-arrow {\n display: flex;\n width: 36px;\n height: 36px;\n margin: var(--ic-space-xxs) var(--ic-space-xxxs);\n align-items: center;\n justify-content: center;\n fill: var(--tab-scroll-fill);\n cursor: pointer;\n}\n\n.scroll-arrow:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.scroll-arrow:hover {\n background-color: var(--tab-scroll-hover);\n}\n\n.scroll-arrow:active {\n background-color: var(--tab-scroll-active);\n}\n\n.scroll-container.disabled .scroll-arrow {\n fill: var(--tab-scroll-disabled-fill);\n cursor: default;\n}\n\n.scroll-container.disabled .scroll-arrow:hover,\n.scroll-container.disabled .scroll-arrow:active,\n.scroll-container.disabled .scroll-arrow:focus {\n background-color: unset;\n box-shadow: none;\n}\n\n.scroll-container.disabled .ic-tooltip-container {\n display: none !important;\n}\n\n.scroll-splitter-left,\n.scroll-splitter-right {\n display: flex;\n height: var(--ic-space-lg);\n width: 1px;\n margin-top: 10px;\n background-color: var(--splitter-color);\n}\n\n.scroll-splitter-left {\n margin-left: var(--ic-space-xxxs);\n}\n\n.scroll-splitter-right {\n margin-right: var(--ic-space-xxxs);\n}\n\n.scroll-container.disabled .scroll-splitter-left,\n.scroll-container.disabled .scroll-splitter-right {\n display: none;\n}\n\n.ic-tab-splitter {\n display: block;\n background-color: var(--border-bottom-color);\n height: 1px;\n right: 0;\n left: 0;\n margin-left: var(--ic-space-xs);\n}\n\n.ic-tab-splitter.hidden {\n height: 0;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Method,\n Listen,\n} from \"@stencil/core\";\n\nimport LeftArrow from \"./assets/left-arrow.svg\";\nimport RightArrow from \"./assets/right-arrow.svg\";\n\nimport {\n checkResizeObserver,\n elementOverflowsX,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IcTabClickEventDetail } from \"../ic-tab/ic-tab.types\";\nimport {\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\nconst SCROLL_DELAY_MS = 200;\n\n@Component({\n tag: \"ic-tab-group\",\n styleUrl: \"ic-tab-group.css\",\n shadow: true,\n})\nexport class TabGroup {\n @Element() host: HTMLIcTabGroupElement;\n\n /**\n * Provide a unique context if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * Use when tabs and tab panels are to be positioned separately.\n */\n @Prop({ reflect: true }) inline?: boolean = false;\n\n /**\n * Provide a label to describe the purpose of the set of tabs to screen reader users.\n */\n @Prop() label!: string;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n @State() firstTabVisible: boolean = true;\n @State() lastTabVisible: boolean = false;\n @State() tabOverflow: boolean = false;\n\n private tabs: HTMLIcTabElement[];\n private tabOffsets: number[];\n private tabGroupEl: HTMLElement;\n private splitterEl: HTMLElement;\n private resizeObserver: ResizeObserver;\n private isScrolling: number;\n private scrollDelay: number;\n private buttonStateSet: boolean = false;\n\n /**\n * @internal if tab side scrolling enabled, scrolls the specified tab into view\n */\n @Method()\n async scrollTabIntoView(tabNumber: number): Promise<void> {\n this.firstTabVisible = tabNumber <= 0;\n const newScrollPos = tabNumber <= 0 ? 0 : this.tabOffsets[tabNumber - 1];\n this.lastTabVisible =\n this.tabGroupEl.offsetWidth + newScrollPos >= this.tabGroupEl.scrollWidth;\n this.buttonStateSet = true;\n this.tabGroupEl.scrollLeft = newScrollPos;\n }\n\n @Listen(\"tabFocus\")\n tabFocusHandler(event: CustomEvent<IcTabClickEventDetail>): void {\n if (this.tabOverflow) {\n this.scrollTabIntoView(event.detail.position);\n }\n }\n\n private resizeObserverCallback = () => {\n if (this.tabGroupEl === null || this.tabGroupEl === undefined) {\n this.tabGroupEl = this.host.shadowRoot.querySelector(\".tabs-container\");\n }\n this.tabOverflow = elementOverflowsX(this.tabGroupEl);\n if (this.tabOverflow) {\n this.lastTabVisible =\n this.tabGroupEl.offsetWidth + this.tabGroupEl.scrollLeft >=\n this.tabGroupEl.scrollWidth;\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.splitterEl);\n };\n\n private scrollLeft = () => {\n this.scrollTabIntoView(this.getCurrentLeftTab() - 1);\n };\n\n private scrollRight = () => {\n this.scrollTabIntoView(this.getCurrentLeftTab() + 1);\n };\n\n private longScrollRight = () => {\n this.scrollRight();\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private longScrollLeft = () => {\n this.scrollLeft();\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private leftArrowMouseDownHandler = () => {\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private rightArrowMouseDownHandler = () => {\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private arrowMouseUpHandler = () => {\n window.clearTimeout(this.scrollDelay);\n };\n\n private getCurrentLeftTab = (): number => {\n const index = this.tabOffsets.findIndex(\n (el) => el > this.tabGroupEl.scrollLeft\n );\n return index < 0 ? 0 : index;\n };\n\n private scrollHandler = () => {\n window.clearTimeout(this.isScrolling);\n // Set a timeout to run after scrolling ends\n this.isScrolling = window.setTimeout(this.scrollStopped, 50);\n };\n\n private scrollStopped = () => {\n // if scrollTabIntoView has been called, the button states will already be set\n // can't just handle it here as it causes strange jumping behaviour in positioning\n if (this.buttonStateSet === false) {\n this.firstTabVisible = this.tabGroupEl.scrollLeft === 0;\n this.lastTabVisible =\n this.tabGroupEl.offsetWidth + this.tabGroupEl.scrollLeft >=\n this.tabGroupEl.scrollWidth;\n }\n this.buttonStateSet = false;\n };\n\n componentDidLoad(): void {\n this.tabs = Array.from(this.host.querySelectorAll(\"ic-tab\"));\n let runningTotal = 0;\n this.tabOffsets = this.tabs.map((tab) => {\n runningTotal += tab.offsetWidth;\n return runningTotal;\n });\n checkResizeObserver(this.runResizeObserver);\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tab List\"\n );\n }\n\n disconnectedCallback(): void {\n this.resizeObserver.disconnect();\n }\n\n render() {\n const {\n inline,\n appearance,\n label,\n firstTabVisible,\n lastTabVisible,\n tabOverflow,\n } = this;\n\n return (\n <Host\n role=\"tablist\"\n aria-label={label}\n class={{\n [\"light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"ic-tab-group-not-inline\"]: !inline,\n }}\n >\n <div class=\"ic-tab-group-container\">\n {this.tabOverflow && (\n <div\n aria-hidden=\"true\"\n id=\"scroll-container-left\"\n class={{\n [\"scroll-container\"]: true,\n [\"hidden\"]: !tabOverflow,\n [\"disabled\"]: firstTabVisible,\n }}\n >\n <ic-tooltip\n placement=\"bottom-start\"\n label=\"Scroll left\"\n target=\"left-arrow\"\n >\n <span\n id=\"left-arrow\"\n class=\"scroll-arrow\"\n innerHTML={LeftArrow}\n onClick={this.scrollLeft}\n onMouseDown={this.leftArrowMouseDownHandler}\n onMouseUp={this.arrowMouseUpHandler}\n ></span>\n </ic-tooltip>\n <span class=\"scroll-splitter-left\"></span>\n </div>\n )}\n <div\n class=\"tabs-container\"\n ref={(el) => (this.tabGroupEl = el)}\n onScroll={this.scrollHandler}\n >\n <slot></slot>\n </div>\n {this.tabOverflow && (\n <div\n aria-hidden=\"true\"\n id=\"scroll-container-right\"\n class={{\n [\"scroll-container\"]: true,\n [\"hidden\"]: !tabOverflow,\n [\"disabled\"]: lastTabVisible,\n }}\n >\n <span class=\"scroll-splitter-right\"></span>\n <ic-tooltip\n placement=\"bottom-start\"\n label=\"Scroll right\"\n target=\"right-arrow\"\n >\n <span\n id=\"right-arrow\"\n class=\"scroll-arrow\"\n innerHTML={RightArrow}\n onClick={this.scrollRight}\n onMouseDown={this.rightArrowMouseDownHandler}\n onMouseUp={this.arrowMouseUpHandler}\n ></span>\n </ic-tooltip>\n </div>\n )}\n </div>\n\n <div\n aria-hidden=\"true\"\n class={{\n [\"ic-tab-splitter\"]: true,\n [\"hidden\"]: inline,\n }}\n ref={(el) => (this.splitterEl = el)}\n ></div>\n </Host>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"sources":["src/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","src/components/ic-tab-group/ic-tab-group.tsx"],"names":["icTabGroupCss","SCROLL_DELAY_MS","TabGroup","this","buttonStateSet","resizeObserverCallback","tabGroupEl","undefined","host","shadowRoot","querySelector","tabOverflow","elementOverflowsX","lastTabVisible","offsetWidth","scrollLeft","scrollWidth","runResizeObserver","resizeObserver","ResizeObserver","observe","splitterEl","scrollTabIntoView","getCurrentLeftTab","scrollRight","longScrollRight","scrollDelay","window","setTimeout","longScrollLeft","leftArrowMouseDownHandler","rightArrowMouseDownHandler","arrowMouseUpHandler","clearTimeout","index","tabOffsets","findIndex","el","scrollHandler","isScrolling","scrollStopped","firstTabVisible","[object Object]","tabNumber","newScrollPos","event","detail","position","tabs","Array","from","querySelectorAll","runningTotal","map","tab","checkResizeObserver","onComponentRequiredPropUndefined","prop","label","propName","disconnect","inline","appearance","h","Host","role","aria-label","class","IcThemeForegroundEnum","Light","aria-hidden","id","placement","target","innerHTML","LeftArrow","onClick","onMouseDown","onMouseUp","ref","onScroll","RightArrow"],"mappings":"mhBAAA,MAAMA,EAAgB,uiFCyBtB,MAAM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wBACHJ,MAAO,CACLzB,CAAC,oBAAqB,KACtBA,CAAC,WAAY/B,EACb+B,CAAC,YAAaD,IAGhBsB,EAAA,aAAA,CACES,UAAU,eACVd,MAAM,cACNe,OAAO,cAEPV,EAAA,OAAA,CACEQ,GAAG,aACHJ,MAAM,eACNO,UAAWC,EACXC,QAASzE,KAAKY,WACd8D,YAAa1E,KAAK2B,0BAClBgD,UAAW3E,KAAK6B,uBAGpB+B,EAAA,OAAA,CAAMI,MAAM,0BAGhBJ,EAAA,MAAA,CACEI,MAAM,iBACNY,IAAM1C,GAAQlC,KAAKG,WAAa+B,EAChC2C,SAAU7E,KAAKmC,eAEfyB,EAAA,OAAA,OAED5D,KAAKQ,aACJoD,EAAA,MAAA,CAAAO,cACc,OACZC,GAAG,yBACHJ,MAAO,CACLzB,CAAC,oBAAqB,KACtBA,CAAC,WAAY/B,EACb+B,CAAC,YAAa7B,IAGhBkD,EAAA,OAAA,CAAMI,MAAM,0BACZJ,EAAA,aAAA,CACES,UAAU,eACVd,MAAM,eACNe,OAAO,eAEPV,EAAA,OAAA,CACEQ,GAAG,cACHJ,MAAM,eACNO,UAAWO,EACXL,QAASzE,KAAKqB,YACdqD,YAAa1E,KAAK4B,2BAClB+C,UAAW3E,KAAK6B,yBAO1B+B,EAAA,MAAA,CAAAO,cACc,OACZH,MAAO,CACLzB,CAAC,mBAAoB,KACrBA,CAAC,UAAWmB,GAEdkB,IAAM1C,GAAQlC,KAAKkB,WAAagB","sourcesContent":[":host {\n --border-bottom-color: var(--ic-architectural-300);\n --splitter-color: var(--ic-architectural-100);\n --tab-scroll-focus: var(--ic-border-focus);\n --tab-scroll-fill: var(--ic-action-default);\n --tab-scroll-disabled-fill: var(--ic-architectural-300);\n --tab-scroll-hover: var(--ic-action-default-bg-hover);\n --tab-scroll-active: var(--ic-action-default-bg-active);\n\n display: block;\n margin-bottom: var(--ic-space-md);\n margin-left: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.light) {\n --splitter-color: var(--ic-architectural-white);\n --tab-scroll-focus: var(--ic-border-focus-dark);\n --tab-scroll-fill: var(--ic-action-light);\n --tab-scroll-disabled-fill: var(--ic-architectural-500);\n --tab-scroll-hover: var(--ic-action-dark-bg-hover);\n --tab-scroll-active: var(--ic-action-dark-bg-active);\n}\n\n:host([inline]) {\n margin-bottom: 0;\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n overflow-y: hidden;\n overflow-x: scroll;\n height: 100%;\n align-items: center;\n padding: var(--ic-space-xs);\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n margin: calc(-1 * var(--ic-space-xs)) 0;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n\n.ic-tab-group-container {\n display: flex;\n align-items: center;\n}\n\n:host(.light.ic-tab-group-not-inline) {\n --border-bottom-color: var(--ic-architectural-white);\n}\n\n.scroll-container {\n display: flex;\n}\n\n.scroll-container.hidden {\n display: none;\n}\n\n.scroll-container:first-child {\n margin-left: var(--ic-space-xs);\n}\n\n.scroll-arrow {\n display: flex;\n width: 36px;\n height: 36px;\n margin: var(--ic-space-xxs) var(--ic-space-xxxs);\n align-items: center;\n justify-content: center;\n fill: var(--tab-scroll-fill);\n cursor: pointer;\n}\n\n.scroll-arrow:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.scroll-arrow:hover {\n background-color: var(--tab-scroll-hover);\n}\n\n.scroll-arrow:active {\n background-color: var(--tab-scroll-active);\n}\n\n.scroll-container.disabled .scroll-arrow {\n fill: var(--tab-scroll-disabled-fill);\n cursor: default;\n}\n\n.scroll-container.disabled .scroll-arrow:hover,\n.scroll-container.disabled .scroll-arrow:active,\n.scroll-container.disabled .scroll-arrow:focus {\n background-color: unset;\n box-shadow: none;\n}\n\n.scroll-container.disabled .ic-tooltip-container {\n display: none !important;\n}\n\n.scroll-splitter-left,\n.scroll-splitter-right {\n display: flex;\n height: var(--ic-space-lg);\n width: 1px;\n margin-top: 10px;\n background-color: var(--splitter-color);\n}\n\n.scroll-splitter-left {\n margin-left: var(--ic-space-xxxs);\n}\n\n.scroll-splitter-right {\n margin-right: var(--ic-space-xxxs);\n}\n\n.scroll-container.disabled .scroll-splitter-left,\n.scroll-container.disabled .scroll-splitter-right {\n display: none;\n}\n\n.ic-tab-splitter {\n display: block;\n background-color: var(--border-bottom-color);\n height: 1px;\n right: 0;\n left: 0;\n margin-left: var(--ic-space-xs);\n}\n\n.ic-tab-splitter.hidden {\n height: 0;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Method,\n Listen,\n} from \"@stencil/core\";\n\nimport LeftArrow from \"./assets/left-arrow.svg\";\nimport RightArrow from \"./assets/right-arrow.svg\";\n\nimport {\n checkResizeObserver,\n elementOverflowsX,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IcTabClickEventDetail } from \"../ic-tab/ic-tab.types\";\nimport {\n IcThemeForegroundNoDefault,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\nconst SCROLL_DELAY_MS = 200;\n\n@Component({\n tag: \"ic-tab-group\",\n styleUrl: \"ic-tab-group.css\",\n shadow: true,\n})\nexport class TabGroup {\n @Element() host: HTMLIcTabGroupElement;\n\n /**\n * The unique context needed if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * If `true`, the tabs and tab panels will be positioned separately.\n */\n @Prop({ reflect: true }) inline?: boolean = false;\n\n /**\n * The label to describe the purpose of the set of tabs to screen reader users.\n */\n @Prop() label!: string;\n\n /** @internal The appearance of the tab group, e.g dark, or light. */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n @State() firstTabVisible: boolean = true;\n @State() lastTabVisible: boolean = false;\n @State() tabOverflow: boolean = false;\n\n private tabs: HTMLIcTabElement[];\n private tabOffsets: number[];\n private tabGroupEl: HTMLElement;\n private splitterEl: HTMLElement;\n private resizeObserver: ResizeObserver;\n private isScrolling: number;\n private scrollDelay: number;\n private buttonStateSet: boolean = false;\n\n /**\n * @internal if tab side scrolling enabled, scrolls the specified tab into view\n */\n @Method()\n async scrollTabIntoView(tabNumber: number): Promise<void> {\n this.firstTabVisible = tabNumber <= 0;\n const newScrollPos = tabNumber <= 0 ? 0 : this.tabOffsets[tabNumber - 1];\n this.lastTabVisible =\n this.tabGroupEl.offsetWidth + newScrollPos >= this.tabGroupEl.scrollWidth;\n this.buttonStateSet = true;\n this.tabGroupEl.scrollLeft = newScrollPos;\n }\n\n @Listen(\"tabFocus\")\n tabFocusHandler(event: CustomEvent<IcTabClickEventDetail>): void {\n if (this.tabOverflow) {\n this.scrollTabIntoView(event.detail.position);\n }\n }\n\n private resizeObserverCallback = () => {\n if (this.tabGroupEl === null || this.tabGroupEl === undefined) {\n this.tabGroupEl = this.host.shadowRoot.querySelector(\".tabs-container\");\n }\n this.tabOverflow = elementOverflowsX(this.tabGroupEl);\n if (this.tabOverflow) {\n this.lastTabVisible =\n this.tabGroupEl.offsetWidth + this.tabGroupEl.scrollLeft >=\n this.tabGroupEl.scrollWidth;\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.splitterEl);\n };\n\n private scrollLeft = () => {\n this.scrollTabIntoView(this.getCurrentLeftTab() - 1);\n };\n\n private scrollRight = () => {\n this.scrollTabIntoView(this.getCurrentLeftTab() + 1);\n };\n\n private longScrollRight = () => {\n this.scrollRight();\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private longScrollLeft = () => {\n this.scrollLeft();\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private leftArrowMouseDownHandler = () => {\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private rightArrowMouseDownHandler = () => {\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private arrowMouseUpHandler = () => {\n window.clearTimeout(this.scrollDelay);\n };\n\n private getCurrentLeftTab = (): number => {\n const index = this.tabOffsets.findIndex(\n (el) => el > this.tabGroupEl.scrollLeft\n );\n return index < 0 ? 0 : index;\n };\n\n private scrollHandler = () => {\n window.clearTimeout(this.isScrolling);\n // Set a timeout to run after scrolling ends\n this.isScrolling = window.setTimeout(this.scrollStopped, 50);\n };\n\n private scrollStopped = () => {\n // if scrollTabIntoView has been called, the button states will already be set\n // can't just handle it here as it causes strange jumping behaviour in positioning\n if (this.buttonStateSet === false) {\n this.firstTabVisible = this.tabGroupEl.scrollLeft === 0;\n this.lastTabVisible =\n this.tabGroupEl.offsetWidth + this.tabGroupEl.scrollLeft >=\n this.tabGroupEl.scrollWidth;\n }\n this.buttonStateSet = false;\n };\n\n componentDidLoad(): void {\n this.tabs = Array.from(this.host.querySelectorAll(\"ic-tab\"));\n let runningTotal = 0;\n this.tabOffsets = this.tabs.map((tab) => {\n runningTotal += tab.offsetWidth;\n return runningTotal;\n });\n checkResizeObserver(this.runResizeObserver);\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tab List\"\n );\n }\n\n disconnectedCallback(): void {\n this.resizeObserver.disconnect();\n }\n\n render() {\n const {\n inline,\n appearance,\n label,\n firstTabVisible,\n lastTabVisible,\n tabOverflow,\n } = this;\n\n return (\n <Host\n role=\"tablist\"\n aria-label={label}\n class={{\n [\"light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"ic-tab-group-not-inline\"]: !inline,\n }}\n >\n <div class=\"ic-tab-group-container\">\n {this.tabOverflow && (\n <div\n aria-hidden=\"true\"\n id=\"scroll-container-left\"\n class={{\n [\"scroll-container\"]: true,\n [\"hidden\"]: !tabOverflow,\n [\"disabled\"]: firstTabVisible,\n }}\n >\n <ic-tooltip\n placement=\"bottom-start\"\n label=\"Scroll left\"\n target=\"left-arrow\"\n >\n <span\n id=\"left-arrow\"\n class=\"scroll-arrow\"\n innerHTML={LeftArrow}\n onClick={this.scrollLeft}\n onMouseDown={this.leftArrowMouseDownHandler}\n onMouseUp={this.arrowMouseUpHandler}\n ></span>\n </ic-tooltip>\n <span class=\"scroll-splitter-left\"></span>\n </div>\n )}\n <div\n class=\"tabs-container\"\n ref={(el) => (this.tabGroupEl = el)}\n onScroll={this.scrollHandler}\n >\n <slot></slot>\n </div>\n {this.tabOverflow && (\n <div\n aria-hidden=\"true\"\n id=\"scroll-container-right\"\n class={{\n [\"scroll-container\"]: true,\n [\"hidden\"]: !tabOverflow,\n [\"disabled\"]: lastTabVisible,\n }}\n >\n <span class=\"scroll-splitter-right\"></span>\n <ic-tooltip\n placement=\"bottom-start\"\n label=\"Scroll right\"\n target=\"right-arrow\"\n >\n <span\n id=\"right-arrow\"\n class=\"scroll-arrow\"\n innerHTML={RightArrow}\n onClick={this.scrollRight}\n onMouseDown={this.rightArrowMouseDownHandler}\n onMouseUp={this.arrowMouseUpHandler}\n ></span>\n </ic-tooltip>\n </div>\n )}\n </div>\n\n <div\n aria-hidden=\"true\"\n class={{\n [\"ic-tab-splitter\"]: true,\n [\"hidden\"]: inline,\n }}\n ref={(el) => (this.splitterEl = el)}\n ></div>\n </Host>\n );\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"names":["icTextFieldCss","inputIds","TextField","this","inheritedAttributes","showLeftIcon","hasLeftIconSlot","onInput","ev","value","target","icInput","emit","onBlur","icBlur","onFocus","icFocus","isTextArea","rows","hasStatus","status","disabled","showStatusText","IcInformationStatus","Success","validationInline","handleFormReset","initialValue","inputId","undefined","[object Object]","icChange","debounceEvent","debounce","newValue","inputEl","maxLength","numChars","length","maxLengthExceeded","focus","icKeydown","event","cancelBubble","iconEl","el","querySelector","debounceChanged","watchValueHandler","inheritAttributes","IC_INHERITED_ARIA","readonly","addFormResetListener","onComponentRequiredPropUndefined","prop","label","propName","removeFormResetListener","name","required","small","placeholder","helperText","resize","validationStatus","validationText","spellcheck","inputmode","fullWidth","truncateValue","hiddenInput","disabledMode","placeholderText","currentStatus","Error","currentValidationText","maxNumChars","messageAriaLive","multiline","hiddenCharCountDescId","describedBy","getInputDescribedByText","trim","invalid","disabledText","renderHiddenInput","h","Host","class","hideLabel","for","multiLine","slot","Object","assign","id","ref","type","aria-label","aria-describedby","aria-invalid","aria-activedescendant","ariaActiveDescendant","aria-expanded","ariaExpanded","aria-owns","ariaOwns","autocomplete","autocapitalize","autoFocus","role","isEmptyString","message","ariaLiveMode","variant","aria-live","hidden"],"mappings":"gMAAA,MAAMA,EAAiB,w9HCsCvB,IAAIC,EAAW,QAUFC,EAAS,wMAIZC,KAAAC,oBAAgD,GAuHhDD,KAAAE,aAAwBF,KAAKG,kBA8G7BH,KAAAI,QAAWC,IACjBL,KAAKM,MAASD,EAAGE,OAA4BD,MAC7CN,KAAKQ,QAAQC,KAAK,CAAEH,MAAON,KAAKM,SAO1BN,KAAAU,OAAUL,IAChB,MAAMC,EAASD,EAAGE,OAA4BD,MAC9CN,KAAKW,OAAOF,KAAK,CAAEH,MAAOA,KAOpBN,KAAAY,QAAWP,IACjB,MAAMC,EAASD,EAAGE,OAA4BD,MAC9CN,KAAKa,QAAQJ,KAAK,CAAEH,MAAOA,KAQrBN,KAAAc,WAAa,IACZd,KAAKe,KAAO,EAWbf,KAAAgB,UAAaC,GACZA,IAAW,KAAOjB,KAAKkB,SAGxBlB,KAAAmB,eAAkBF,IACxB,GACEjB,KAAKgB,UAAUC,MACbA,GAAUG,EAAoBC,SAAWrB,KAAKsB,kBAChD,CACA,OAAO,KAET,OAAO,OAGDtB,KAAAuB,gBAAkB,KACxBvB,KAAKM,MAAQN,KAAKwB,2BAjRO,uBAAuB1B,yCAUtB,oBAIA,oBAKA,uBAKE,kBAMD,qBAKA,sBAKA,aAKN,cAKG,iBAKD,iBAK+B,kBAK5B,wBAK2B,uBAKtB,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AQV,KAAKU,OACbE,QAASZ,KAAKY,QAAOmF,aACT3C,EAAK4C,mBACCnB,EAAWoB,eACfjB,EACdyB,eAAgBzG,KAAKyG,eACrBC,UAAW1G,KAAK0G,UAChB3C,WAAYA,EACZC,UAAWA,GACPhE,KAAKC,sBAGbkF,EAAA,OAAA,CAAM5B,KAAK,iBACX4B,EAAA,OAAA,CAAM5B,KAAK,0BAEb4B,EAAA,OAAA,CAAM5B,KAAK,WACRqD,EAAc/C,KACd+C,EAAc9C,IACfW,EAAc,IACdU,EAAA,sBAAA,CACElE,OACEjB,KAAKgB,UAAUsD,KAAmB,OACjCA,IAAkBlD,EAAoBC,SACrCC,EACE,GACAgD,EAENuC,QAAS1F,EAAiBqD,EAAwB,GAClDsC,aAAcpC,EACda,IAAK9D,EACLwC,UAAWA,IAETjB,GAAYyB,EAAc,GAC1BU,EAAA,MAAA,CAAKM,KAAK,gCACRN,EAAA,gBAAA,CACE4B,QAAQ,UACR1B,MAAO,CACL1D,CAAC,iBAAkB,KACnBA,CAAC,YAAaS,EACdT,CAAC,YAAasD,IAGhBE,EAAA,OAAA,CAAA6B,YACY,SACVpB,GAAI,GAAGnE,cACP4D,MAAM,aAELnD,EAAQ,IAAGuC,GAEdU,EAAA,OAAA,CAAM8B,OAAQ,KAAMrB,GAAIhB,GAAqB,kCACXH,EAAW","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field \n */\n display: block;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 6px;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n.fullwidth {\n position: relative;\n width: 100%;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n}\n\n.exceeded {\n color: var(--ic-status-error);\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n} from \"@stencil/core\";\n\nimport {\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n} from \"../../interface\";\nimport { IcInformationStatus } from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n @Element() el: HTMLIcTextFieldElement;\n\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input\n * @slot menu - an ic-menu component will appear below the input\n */\n\n /**\n * Provide an id for the input\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * Provide a label for the input.\n */\n @Prop() label!: string;\n\n /**\n * Specify if the input requires a value.\n */\n @Prop() required: boolean = false;\n /**\n * Specify whether the input is disabled.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Specify whether the input is read only.\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Provide a placeholder value to display.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * Specify whether the component fills the full width of the container.\n * If true, this overrides the --input-width css prop.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * Hides the label and applies the required label value as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * Provide helper text to display additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * Specify the number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * Allow resizing of a multiline text area\n */\n @Prop() resize: boolean = false;\n\n /**\n * Specify whether small styling is to be applied to the element.\n */\n @Prop() small: boolean = false;\n\n /**\n * Value of TextField.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n\n /**\n * Maximum number of characters that can be entered in the field.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * Provide validation state - 'error' | 'warning' | 'success'\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * Provide validation state - 'error' | 'warning' | 'success'\n */\n @Prop() validationText: string = \"\";\n\n /**\n * Show icon in input control - only applies when validationStatus ='success'\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n private showLeftIcon: boolean = this.hasLeftIconSlot();\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * @internal Used to identify the active element when focus is on the ic-menu items\n */\n @Prop() ariaActiveDescendant?: string;\n /**\n * @internal This boolean sets an ellipsis at the end of the value if the value is longer than the container\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * @internal Used to stop rendering of hidden form input for form submission;\n */\n @Prop() hiddenInput: boolean = true;\n\n @State() numChars: number = 0;\n @State() maxLengthExceeded: boolean = false;\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n if (this.maxLength > 0) {\n this.numChars = newValue.length;\n if (newValue.length > this.maxLength) {\n this.maxLengthExceeded = true;\n } else {\n this.maxLengthExceeded = false;\n }\n }\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * Sets focus on the native `input`\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.inputEl) {\n this.inputEl.focus();\n }\n }\n\n //stop keydown event bubbling up to storybook\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n ev.cancelBubble = true;\n }\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icBlur.emit({ value: value });\n };\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n private onFocus = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icFocus.emit({ value: value });\n };\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n private isTextArea = (): boolean => {\n return this.rows > 1;\n };\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n if (iconEl != null) {\n return true;\n }\n return false;\n }\n\n private hasStatus = (status: IcInformationStatusOrEmpty): boolean => {\n return status !== \"\" && !this.disabled;\n };\n\n private showStatusText = (status: IcInformationStatusOrEmpty): boolean => {\n if (\n this.hasStatus(status) &&\n !(status == IcInformationStatus.Success && this.validationInline)\n ) {\n return true;\n }\n return false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n componentWillLoad(): void {\n this.watchValueHandler(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n \"aria-autocomplete\",\n \"aria-haspopup\",\n ]);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n validationStatus,\n validationText,\n validationInline,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : disabled;\n\n const placeholderText = disabled ? \"\" : placeholder;\n\n const currentStatus = maxLengthExceeded\n ? IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? \"Maximum length exceeded\"\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n\n const messageAriaLive =\n maxLengthExceeded ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText = this.showStatusText(currentStatus);\n const multiline = this.isTextArea();\n const hiddenCharCountDescId =\n maxLength > 0 ? inputId + \"-charcount-desc\" : \"\";\n const describedBy = (\n hiddenCharCountDescId +\n \" \" +\n getInputDescribedByText(inputId, helperText !== \"\", showStatusText)\n ).trim();\n\n if (this.showLeftIcon) {\n if (!readonly && disabledMode) {\n this.showLeftIcon = false;\n }\n }\n\n const invalid =\n currentStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n const disabledText = disabledMode && !readonly;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n small={small}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {this.showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline && (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n value={value}\n class={{\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholderText}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n {...this.inheritedAttributes}\n ></input>\n )}\n {multiline && (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholderText}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n <slot name=\"clear-button\"></slot>\n <slot name=\"search-submit-button\"></slot>\n </ic-input-component-container>\n <slot name=\"menu\"></slot>\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0) && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline)\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"exceeded\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"names":["icTextFieldCss","inputIds","TextField","this","inheritedAttributes","showLeftIcon","hasLeftIconSlot","onInput","ev","value","target","icInput","emit","onBlur","icBlur","onFocus","icFocus","isTextArea","rows","hasStatus","status","disabled","showStatusText","IcInformationStatus","Success","validationInline","handleFormReset","initialValue","inputId","undefined","[object Object]","icChange","debounceEvent","debounce","newValue","inputEl","maxLength","numChars","length","maxLengthExceeded","focus","icKeydown","event","cancelBubble","iconEl","el","querySelector","debounceChanged","watchValueHandler","inheritAttributes","IC_INHERITED_ARIA","readonly","addFormResetListener","onComponentRequiredPropUndefined","prop","label","propName","removeFormResetListener","name","required","small","placeholder","helperText","resize","validationStatus","validationText","spellcheck","inputmode","fullWidth","truncateValue","hiddenInput","disabledMode","placeholderText","currentStatus","Error","currentValidationText","maxNumChars","messageAriaLive","multiline","hiddenCharCountDescId","describedBy","getInputDescribedByText","trim","invalid","disabledText","renderHiddenInput","h","Host","class","hideLabel","for","multiLine","slot","Object","assign","id","ref","type","aria-label","aria-describedby","aria-invalid","aria-activedescendant","ariaActiveDescendant","aria-expanded","ariaExpanded","aria-owns","ariaOwns","autocomplete","autocapitalize","autoFocus","role","isEmptyString","message","ariaLiveMode","variant","aria-live","hidden"],"mappings":"gMAAA,MAAMA,EAAiB,w9HCsCvB,IAAIC,EAAW,QAUFC,EAAS,wMAIZC,KAAAC,oBAAgD,GAuHhDD,KAAAE,aAAwBF,KAAKG,kBA8G7BH,KAAAI,QAAWC,IACjBL,KAAKM,MAASD,EAAGE,OAA4BD,MAC7CN,KAAKQ,QAAQC,KAAK,CAAEH,MAAON,KAAKM,SAO1BN,KAAAU,OAAUL,IAChB,MAAMC,EAASD,EAAGE,OAA4BD,MAC9CN,KAAKW,OAAOF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I,GAAGnE,cACP4D,MAAM,aAELnD,EAAQ,IAAGuC,GAEdU,EAAA,OAAA,CAAM8B,OAAQ,KAAMrB,GAAIhB,GAAqB,kCACXH,EAAW","sourcesContent":["@import \"../../global/normalise.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field \n */\n display: block;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 6px;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n.fullwidth {\n position: relative;\n width: 100%;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n}\n\n.exceeded {\n color: var(--ic-status-error);\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n} from \"@stencil/core\";\n\nimport {\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n} from \"../../interface\";\nimport { IcInformationStatus } from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n @Element() el: HTMLIcTextFieldElement;\n\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private inheritedAttributes: { [k: string]: unknown } = {};\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * If `true`, the small styling will be applied to the text field.\n */\n @Prop({ reflect: true }) small: boolean = false;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n\n /**\n * The maximum number of characters that can be entered in the field.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n private showLeftIcon: boolean = this.hasLeftIconSlot();\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n @State() numChars: number = 0;\n @State() maxLengthExceeded: boolean = false;\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n if (this.maxLength > 0) {\n this.numChars = newValue.length;\n if (newValue.length > this.maxLength) {\n this.maxLengthExceeded = true;\n } else {\n this.maxLengthExceeded = false;\n }\n }\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * Sets focus on the native `input`\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.inputEl) {\n this.inputEl.focus();\n }\n }\n\n //stop keydown event bubbling up to storybook\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n ev.cancelBubble = true;\n }\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icBlur.emit({ value: value });\n };\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n private onFocus = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.icFocus.emit({ value: value });\n };\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n private isTextArea = (): boolean => {\n return this.rows > 1;\n };\n\n private hasLeftIconSlot(): boolean {\n const iconEl = this.el.querySelector(`[slot=\"icon\"]`);\n if (iconEl != null) {\n return true;\n }\n return false;\n }\n\n private hasStatus = (status: IcInformationStatusOrEmpty): boolean => {\n return status !== \"\" && !this.disabled;\n };\n\n private showStatusText = (status: IcInformationStatusOrEmpty): boolean => {\n if (\n this.hasStatus(status) &&\n !(status == IcInformationStatus.Success && this.validationInline)\n ) {\n return true;\n }\n return false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n componentWillLoad(): void {\n this.watchValueHandler(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"title\",\n \"aria-autocomplete\",\n \"aria-haspopup\",\n ]);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n validationStatus,\n validationText,\n validationInline,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : disabled;\n\n const placeholderText = disabled ? \"\" : placeholder;\n\n const currentStatus = maxLengthExceeded\n ? IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? \"Maximum length exceeded\"\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n\n const messageAriaLive =\n maxLengthExceeded ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText = this.showStatusText(currentStatus);\n const multiline = this.isTextArea();\n const hiddenCharCountDescId =\n maxLength > 0 ? inputId + \"-charcount-desc\" : \"\";\n const describedBy = (\n hiddenCharCountDescId +\n \" \" +\n getInputDescribedByText(inputId, helperText !== \"\", showStatusText)\n ).trim();\n\n if (this.showLeftIcon) {\n if (!readonly && disabledMode) {\n this.showLeftIcon = false;\n }\n }\n\n const invalid =\n currentStatus === IcInformationStatus.Error ? \"true\" : \"false\";\n const disabledText = disabledMode && !readonly;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n small={small}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {this.showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline && (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n value={value}\n class={{\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholderText}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n {...this.inheritedAttributes}\n ></input>\n )}\n {multiline && (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !this.showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholderText}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n <slot name=\"clear-button\"></slot>\n <slot name=\"search-submit-button\"></slot>\n </ic-input-component-container>\n <slot name=\"menu\"></slot>\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0) && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline)\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"exceeded\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as i,h as t,H as e,g as o,c as s}from"./p-f9370be6.js";import{a as n}from"./p-6f57b13c.js";import{s as a}from"./p-ae6aa67f.js";import{i as r,a as c}from"./p-23831891.js";import{C as l}from"./p-1e7b4310.js";import{c as h}from"./p-ec26fc38.js";const d="ic-input-component-container{display:flex;border:1px solid var(--border-color, var(--ic-architectural-400));border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-slow);height:40px;width:var(--input-width, 320px);padding:1px;background-color:var(--ic-architectural-white);box-sizing:border-box;position:relative;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.fullwidth{width:100%}ic-input-component-container.disabled,ic-input-component-container.disabled:hover{border:1px dashed var(--ic-architectural-200)}ic-input-component-container.readonly,ic-input-component-container.readonly:hover{border:none;padding:0}ic-input-component-container.error{border:var(--ic-space-xxxs) solid var(--ic-status-error);padding:0}ic-input-component-container.warning{border:var(--ic-space-xxxs) solid var(--ic-status-warning-mid);padding:0}ic-input-component-container.success{border:var(--ic-space-xxxs) solid var(--ic-status-success);padding:0}ic-input-component-container.small{height:var(--ic-space-xl)}ic-input-component-container.multiline{height:auto}ic-input-component-container .icon-container{margin-top:var(--ic-space-xxs);margin-left:7px;display:flex;align-items:center}ic-input-component-container.multiline .icon-container,ic-input-component-container.multiline.small .icon-container{margin-top:6px;display:block}ic-input-component-container.readonly .icon-container{margin-left:-5px}ic-input-component-container.disabled ::-moz-placeholder{display:none}ic-input-component-container.disabled ::placeholder{display:none}ic-input-component-container .inline-success{margin:var(--ic-space-xs) 6px;display:flex;align-items:center}ic-input-component-container.dark:hover{--border-color:var(--ic-architectural-400)}ic-input-component-container .inline-success>svg{fill:var(--ic-status-success)}ic-input-component-container:hover{border-color:var(--ic-action-dark-hover);color:var(--ic-action-dark-hover)}.focus-indicator{display:flex;width:100%;margin:-2px;padding:2px;border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.focus-indicator:focus-within,.focus-indicator-enabled{box-shadow:var(--ic-border-focus)}.focus-indicator.dark:focus-within{box-shadow:var(--ic-border-focus)}@media (forced-colors: active){ic-input-component-container,.focus-indicator{transition:none}ic-input-component-container:focus-within{border:1px solid Highlight;outline:2px solid Highlight}ic-input-component-container.disabled,ic-input-component-container.disabled:hover{border:1px dashed GrayText}}";const p=class{constructor(t){i(this,t);this.disabled=false;this.readonly=false;this.validationStatus="";this.small=false;this.multiLine=false;this.validationInline=false;this.dark=false;this.fullWidth=false}render(){const{small:i,validationStatus:o,disabled:s,readonly:c,multiLine:l,fullWidth:h,dark:d,validationInline:p}=this;const u=this.validationStatus!==""&&!this.disabled&&!this.readonly?true:false;return t(e,{class:{["small"]:i,[o]:u,["disabled"]:s,["readonly"]:c,["multiline"]:l,["fullwidth"]:h,["dark"]:d}},t("div",{class:{"focus-indicator":true,dark:d}},r(this.host,"left-icon")&&t("div",{class:{["icon-container"]:true}},t("slot",{name:"left-icon"})),t("slot",null),p&&o===n.Success&&t("span",{class:{["inline-success"]:true},innerHTML:a})))}get host(){return o(this)}};p.style=d;const u="ic-input-container .component-container{display:flex;flex-direction:column;position:relative}";const f=class{constructor(t){i(this,t);this.disabled=false;this.readonly=false}render(){return t(e,null,t("div",{class:{["component-container"]:true,["disabled"]:this.disabled,["readonly"]:this.readonly}},t("slot",null)))}};f.style=u;const b='/*! 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}@media (prefers-reduced-motion: no-preference){:host([open]) .menu{transition:max-height var(--ic-transition-duration-slow)}}:host{border-radius:var(--ic-border-radius);max-height:0;width:var(--input-width, 320px);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);position:relative;z-index:var(--ic-z-index-popup-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay)}:host(:not(.no-focus):focus-within){box-shadow:var(--ic-border-focus)}.menu{text-decoration:none;list-style-type:none;border:1px solid var(--ic-architectural-400);border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;max-height:0;overflow-y:hidden}.menu-scroll{overflow-y:auto}.menu:focus-visible{outline:none}:host([open]){max-height:none;display:block}:host([open]) .menu{visibility:visible;max-height:322px}:host(.full-width){width:100%}.option{padding:8px 7px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}:host([small]) .option{padding:4px 7px}.option:last-child{border-radius:0 0 1px 1px}.option:first-child{border-radius:1px 1px 0 0}.option:not(.disabled-option):hover{background-color:var(--ic-action-dark-bg-hover)}.option:not(.disabled-option):active{background-color:var(--ic-action-dark-bg-active)}.option:focus-visible{outline:var(--ic-hc-focus-outline)}.option:not(.disabled-option) .option-description{color:var(--ic-color-secondary-text)}.option-text-container{pointer-events:none}.check-icon{height:24px;margin-left:8px;pointer-events:none}.focused-option .check-icon *{fill:currentcolor}.option-group-title{padding:24px 7px 8px;color:var(--ic-color-tertiary-text)}:host([small]) .option-group-title{padding:12px 7px 4px}.last-recommended-option{border-bottom:1px solid var(--ic-architectural-400)}.disabled-option{color:var(--ic-architectural-200);cursor:default;pointer-events:none}.focused-option,.focused-option .option-description{background-color:var(--ic-focus-blue) !important;color:var(--ic-color-white-text) !important}:host(.no-results) li{cursor:no-drop}:host(.no-results) li:hover{background-color:transparent}@media (forced-colors: active){.focused-option:focus{outline:none;border:2px solid transparent}}';const m=class{constructor(e){i(this,e);this.icOptionSelect=s(this,"icOptionSelect",7);this.icMenuStateChange=s(this,"icMenuStateChange",7);this.menuOptionId=s(this,"menuOptionId",7);this.ungroupedOptions=[];this.preventClickOpen=false;this.handleMenuChange=(i,t)=>{if(!i)this.popperInstance.destroy();this.icMenuStateChange.emit({open:i,focusInput:t});if(!i&&t!==false){this.inputEl.focus();this.preventClickOpen=false}};this.setNextOptionValue=i=>{if(this.ungroupedOptions[i+1]){this.icOptionSelect.emit({value:this.ungroupedOptions[i+1].value,optionId:this.getOptionId(this.ungroupedOptions[i+1].value)})}else{this.icOptionSelect.emit({value:this.ungroupedOptions[0].value,optionId:this.getOptionId(this.ungroupedOptions[0].value)})}};this.setPreviousOptionValue=i=>{if(this.ungroupedOptions[i-1]){this.icOptionSelect.emit({value:this.ungroupedOptions[i-1].value,optionId:this.getOptionId(this.ungroupedOptions[i-1].value)})}else{this.icOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1].value,optionId:this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length-1].value)})}};this.arrowBehaviour=i=>{i.preventDefault();this.handleMenuChange(true)};this.setHighlightedOption=i=>{this.optionHighlighted=this.options[i].value||undefined};this.autoSetInputValueKeyboardOpen=i=>{var t;const e=this.ungroupedOptions.findIndex((i=>i.value===this.value));const o=((t=this.inputEl)===null||t===void 0?void 0:t.tagName)==="INPUT";switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);this.setNextOptionValue(e);break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);this.setPreviousOptionValue(e);break;case" ":case"Enter":if(i.target.id!=="clear-button"){this.handleMenuChange(true)}break;case"Backspace":if(o){this.inputEl.focus()}break;default:if(o&&i.key!=="Tab"){this.inputEl.focus()}break}};this.manSetInputValueKeyboardOpen=i=>{const t=this.options.findIndex((i=>i.value===this.optionHighlighted));const e=i=>Array.from(this.host.shadowRoot.querySelectorAll("li"))[i].id;const o=this.parentEl.tagName==="IC-SEARCH-BAR";switch(i.key){case"ArrowDown":this.arrowBehaviour(i);if(t<this.options.length-1){this.setHighlightedOption(t+1);this.menuOptionId.emit({optionId:e(t+1)})}else{this.setHighlightedOption(0);this.menuOptionId.emit({optionId:e(0)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"ArrowUp":this.arrowBehaviour(i);if(t<=0||t>this.options.length+1){this.setHighlightedOption(this.options.length-1);this.menuOptionId.emit({optionId:e(this.options.length-1)})}else{this.setHighlightedOption(t-1);this.menuOptionId.emit({optionId:e(t-1)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"Enter":i.preventDefault();this.setInputValue(t);break;case"Escape":this.handleMenuChange(false);this.menuOptionId.emit({optionId:undefined});break;case"Shift":case"Tab":this.preventIncorrectTabOrder=true;break;case"Backspace":if(o){this.parentEl.setFocus();this.focusFromSearchKeypress=true;this.setHighlightedOption(0)}break;default:if(o&&i.key!=="Tab"){this.parentEl.setFocus();this.focusFromSearchKeypress=true;this.setHighlightedOption(0)}break}};this.setInputValue=i=>{var t;if(this.options[i]){this.icOptionSelect.emit({value:(t=this.options[i])===null||t===void 0?void 0:t.value});this.optionHighlighted=undefined;this.menuOptionId.emit({optionId:undefined})}this.handleMenuChange(false)};this.handleOptionClick=i=>{const{value:t,label:e}=i.target.dataset;this.icOptionSelect.emit({value:t,label:e});this.handleMenuChange(false)};this.handleBlur=i=>{if(i.relatedTarget!==this.inputEl){if(!this.menu.contains(i.relatedTarget)){this.handleMenuChange(false,false)}}else{this.handleMenuChange(false);this.preventClickOpen=true}};this.handleMenuKeyDown=i=>{if(this.activationType==="automatic"){this.autoSetValueOnMenuKeyDown(i)}};this.autoSetValueOnMenuKeyDown=i=>{i.cancelBubble=true;const t=this.ungroupedOptions.findIndex((i=>i.value===this.value));const e=this.inputEl.tagName==="INPUT";switch(i.key){case"ArrowUp":i.preventDefault();this.setPreviousOptionValue(t);this.keyboardNav=true;break;case"ArrowDown":i.preventDefault();this.setNextOptionValue(t);this.keyboardNav=true;break;case"Home":this.icOptionSelect.emit({value:this.ungroupedOptions[0].value});this.keyboardNav=true;break;case"End":this.icOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1].value});this.keyboardNav=true;break;case" ":case"Enter":case"Escape":this.handleMenuChange(false);break;case"Backspace":if(e){this.inputEl.focus()}break;case"Shift":break;default:if(e&&i.key!=="Tab"){this.inputEl.focus()}break}};this.handleMenuKeyUp=i=>{if(i.key==="Tab"&&i.shiftKey){this.preventClickOpen=false}};this.getOptionId=i=>`${this.menuId}-${i}`;this.getOptionAriaLabel=(i,t)=>{let e=i.label;if(i.description){e=`${e}, ${i.description}`}if(t){return`${e}, ${t.label} group`}else{return e}};this.getSortedOptions=i=>i.sort(((i,t)=>i.recommended&&!t.recommended?-1:0));this.isManualMode=this.activationType==="manual";this.scrollToSelected=i=>{const t=i.querySelector(".option[aria-selected]");if(t){const e=t.offsetTop+t.offsetHeight;if(e>i.scrollTop+i.offsetHeight||e<i.scrollTop+i.offsetHeight){i.scrollTop=t.offsetTop}t.focus()}};this.loadUngroupedOptions=()=>{if(this.options.length>0){this.options.map((i=>{if(i.children){i.children.map((i=>!i.disabled&&this.ungroupedOptions.push(i)))}else if(!i.disabled){this.ungroupedOptions.push(i)}}))}this.ungroupedOptions=this.getSortedOptions(this.ungroupedOptions)};this.displayOption=(i,e,o)=>{const{open:s,value:n}=this;return t("li",{id:this.getOptionId(i.value),class:{option:true,"focused-option":this.isManualMode?(this.keyboardNav||this.initialOptionsListRender)&&i.value===this.optionHighlighted:this.keyboardNav&&i.value===n,"last-recommended-option":i.recommended&&this.options[e+1]&&!this.options[e+1].recommended,"disabled-option":i.disabled},role:"option",tabindex:s&&(i.value===n||i.value===this.optionHighlighted)&&this.keyboardNav?"0":"-1","aria-label":this.getOptionAriaLabel(i,o),"aria-selected":i.value===n,"aria-disabled":i.disabled?"true":"false",onClick:this.handleOptionClick,onBlur:this.handleBlur,onMouseDown:i=>i.preventDefault(),"data-value":i.value,"data-label":i.label},t("div",{class:"option-text-container"},t("ic-typography",{variant:"body","aria-hidden":"true"},t("p",null,i.label)),i.description&&t("ic-typography",{id:`${this.getOptionId(i.value)}-description`,class:"option-description",variant:"caption","aria-hidden":"true"},t("p",null,i.description))),i.value===n&&this.parentEl.tagName!=="IC-SEARCH-BAR"&&t("span",{class:"check-icon",innerHTML:l}))};this.open=undefined;this.options=undefined;this.small=false;this.menuId=undefined;this.value=undefined;this.activationType="automatic";this.inputEl=undefined;this.parentEl=undefined;this.inputLabel=undefined;this.anchorEl=undefined;this.fullWidth=false;this.autoFocusOnSelected=true;this.keyboardNav=false;this.optionHighlighted=undefined;this.focusFromSearchKeypress=false;this.initialOptionsListRender=false;this.preventIncorrectTabOrder=false}watchOptionsHandler(){this.ungroupedOptions=[];this.loadUngroupedOptions()}handleClearListener(){this.optionHighlighted=""}handleSubmitSearch(){const i=this.options.findIndex((i=>i.value===this.optionHighlighted));this.setInputValue(i)}async handleClickOpen(){if(!this.preventClickOpen){this.icMenuStateChange.emit({open:!this.open});this.keyboardNav=false}this.preventClickOpen=false}async handleKeyboardOpen(i){this.keyboardNav=false;if(this.activationType==="automatic"){this.autoSetInputValueKeyboardOpen(i)}else{this.keyboardNav=true;this.manSetInputValueKeyboardOpen(i)}}async handleSetFirstOption(){this.setHighlightedOption(0)}connectedCallback(){var i;if(((i=this.parentEl)===null||i===void 0?void 0:i.tagName)==="IC-SEARCH-BAR"){this.setHighlightedOption(0);this.initialOptionsListRender=true}}componentWillLoad(){this.loadUngroupedOptions()}componentDidLoad(){let i=0;this.host.shadowRoot.querySelectorAll(".option").forEach((t=>i+=t.clientHeight));if(i>=320){this.menu.classList.add("menu-scroll")}c([{prop:this.open,propName:"open"},{prop:this.options,propName:"options"},{prop:this.menuId,propName:"menu-id"},{prop:this.inputLabel,propName:"input-label"}],"Menu")}componentDidRender(){if(this.open){this.popperInstance=h(this.anchorEl,this.host,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,7]}},{name:"flip",options:{fallbackPlacements:["top"],rootBoundary:"viewport"}}]})}}componentDidUpdate(){const i=this.options.some((i=>i.value===this.value));const t=this.optionHighlighted!==null&&this.optionHighlighted!==undefined&&this.optionHighlighted!=="";if(this.open&&this.options.length!==0){if(this.value&&this.keyboardNav&&i&&this.autoFocusOnSelected){this.scrollToSelected(this.menu)}else if(this.inputEl.tagName!=="IC-TEXT-FIELD"&&this.inputEl.tagName!=="INPUT"){this.menu.focus()}else if(t&&!this.focusFromSearchKeypress&&!this.preventIncorrectTabOrder){const i=this.host.shadowRoot.querySelector(`li[data-value="${this.optionHighlighted}"]`);if(i){i.focus()}}}}render(){var i,o;const{inputLabel:s,options:n,menuId:a,value:r,fullWidth:c}=this;return t(e,{class:{"full-width":c,"no-focus":((i=this.inputEl)===null||i===void 0?void 0:i.tagName)==="INPUT"}},n.length!==0&&t("ul",{id:a,class:"menu",role:"listbox","aria-label":s,"aria-activedescendant":r!=null&&r!==""?this.getOptionId(r):"",tabindex:open&&!this.keyboardNav&&((o=this.inputEl)===null||o===void 0?void 0:o.tagName)!=="INPUT"?"0":"-1",ref:i=>this.menu=i,onKeyDown:this.handleMenuKeyDown,onKeyUp:this.handleMenuKeyUp,onBlur:this.handleBlur},this.getSortedOptions(n).map(((i,e)=>{if(i.children){if(i.children.length>0){return t("div",null,t("ic-typography",{class:"option-group-title",role:"presentation",variant:"subtitle-small"},t("p",null,i.label)),i.children.map((t=>this.displayOption(t,e,i))))}else{return null}}else{return this.displayOption(i,e)}}))))}get host(){return o(this)}static get watchers(){return{options:["watchOptionsHandler"]}}};m.style=b;export{p as ic_input_component_container,f as ic_input_container,m as ic_menu};
|
2
|
+
//# sourceMappingURL=p-6308f1f2.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/components/ic-input-component-container/ic-input-component-container.css?tag=ic-input-component-container","src/components/ic-input-component-container/ic-input-component-container.tsx","src/components/ic-input-container/ic-input-container.css?tag=ic-input-container","src/components/ic-input-container/ic-input-container.tsx","src/components/ic-menu/ic-menu.css?tag=ic-menu&encapsulation=shadow","src/components/ic-menu/ic-menu.tsx"],"names":["icInputComponentContainerCss","InputComponentContainer","[object Object]","small","validationStatus","disabled","readonly","multiLine","fullWidth","dark","validationInline","this","hasValidationStatus","h","Host","class","focus-indicator","isSlotUsed","host","name","IcInformationStatus","Success","innerHTML","successIcon","icInputContainerCss","InputContainer","icMenuCss","Menu","ungroupedOptions","preventClickOpen","handleMenuChange","open","focusInput","popperInstance","destroy","icMenuStateChange","emit","inputEl","focus","setNextOptionValue","selectedOptionIndex","icOptionSelect","value","optionId","getOptionId","setPreviousOptionValue","length","arrowBehaviour","event","preventDefault","setHighlightedOption","highlightedIndex","optionHighlighted","options","undefined","autoSetInputValueKeyboardOpen","findIndex","option","isSearchableSelect","_a","tagName","key","keyboardNav","target","id","manSetInputValueKeyboardOpen","highlightedOptionIndex","index","Array","from","shadowRoot","querySelectorAll","isSearchBar","parentEl","menuOptionId","preventIncorrectTabOrder","focusFromSearchKeypress","setInputValue","setFocus","handleOptionClick","label","dataset","handleBlur","relatedTarget","menu","contains","handleMenuKeyDown","activationType","autoSetValueOnMenuKeyDown","cancelBubble","handleMenuKeyUp","shiftKey","menuId","getOptionAriaLabel","parentOption","ariaLabel","description","getSortedOptions","sort","optionA","optionB","recommended","isManualMode","scrollToSelected","selectedOption","querySelector","elTop","offsetTop","offsetHeight","scrollTop","loadUngroupedOptions","map","children","push","displayOption","focused-option","initialOptionsListRender","last-recommended-option","disabled-option","role","tabindex","aria-label","aria-selected","aria-disabled","onClick","onBlur","onMouseDown","data-value","data-label","variant","aria-hidden","Check","optionsHeight","forEach","clientHeight","classList","add","onComponentRequiredPropUndefined","prop","propName","inputLabel","createPopper","anchorEl","placement","modifiers","offset","fallbackPlacements","rootBoundary","inputValueInOptions","some","optionHighlightedIsSet","autoFocusOnSelected","highlightedEl","full-width","no-focus","aria-activedescendant","_b","ref","el","onKeyDown","onKeyUp","childOption"],"mappings":"2PAAA,MAAMA,EAA+B,+/ECgBxBC,EAAuB,6CAIN,oBAIA,4BAI2B,cAI9B,qBAII,4BAIO,gBAKX,qBAKI,MAI7BC,SACE,MAAMC,MACJA,EAAKC,iBACLA,EAAgBC,SAChBA,EAAQC,SACRA,EAAQC,UACRA,EAASC,UACTA,EAASC,KACTA,EAAIC,iBACJA,GACEC,KACJ,MAAMC,EACJD,KAAKP,mBAAqB,KAAOO,KAAKN,WAAaM,KAAKL,SACpD,KACA,MACN,OACEO,EAACC,EAAI,CACHC,MAAO,CACLb,CAAC,SAAUC,EACXD,CAACE,GAAmBQ,EACpBV,CAAC,YAAaG,EACdH,CAAC,YAAaI,EACdJ,CAAC,aAAcK,EACfL,CAAC,aAAcM,EACfN,CAAC,QAASO,IAGZI,EAAA,MAAA,CACEE,MAAO,CACLC,kBAAmB,KACnBP,KAAMA,IAGPQ,EAAWN,KAAKO,KAAM,cACrBL,EAAA,MAAA,CACEE,MAAO,CACLb,CAAC,kBAAmB,OAGtBW,EAAA,OAAA,CAAMM,KAAK,eAGfN,EAAA,OAAA,MAECH,GACCN,IAAqBgB,EAAoBC,SACvCR,EAAA,OAAA,CACEE,MAAO,CACLb,CAAC,kBAAmB,MAEtBoB,UAAWC,4CCxG3B,MAAMC,EAAsB,sGCMfC,EAAc,6CAII,oBAKA,MAE7BvB,SACE,OACEW,EAACC,EAAI,KACHD,EAAA,MAAA,CACEE,MAAO,CACLb,CAAC,uBAAwB,KACzBA,CAAC,YAAaS,KAAKN,SACnBH,CAAC,YAAa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,iBAAiB5C,GAAS0D,KAAI,CAACtD,EAAQU,KAC3C,GAAIV,EAAOuD,SAAU,CACnB,GAAIvD,EAAOuD,SAASlE,OAAS,EAAG,CAC9B,OACEjC,EAAA,MAAA,KACEA,EAAA,gBAAA,CACEE,MAAM,qBACNwG,KAAK,eACLU,QAAQ,kBAERpH,EAAA,IAAA,KAAI4C,EAAOuB,QAEZvB,EAAOuD,SAASD,KAAKkD,GACpBtJ,KAAKuG,cAAc+C,EAAa9F,EAAOV,UAIxC,CACL,OAAO,UAEJ,CACL,OAAO9C,KAAKuG,cAAczD,EAAQU","sourcesContent":["ic-input-component-container {\n /**\n * @prop --border-color: Border colour of the input component container\n */\n\n display: flex;\n border: 1px solid var(--border-color, var(--ic-architectural-400));\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-slow);\n height: 40px;\n width: var(--input-width, 320px);\n padding: 1px;\n background-color: var(--ic-architectural-white);\n box-sizing: border-box;\n position: relative;\n fill: var(--ic-architectural-400);\n outline: none;\n}\n\nic-input-component-container.fullwidth {\n width: 100%;\n}\n\nic-input-component-container.disabled,\nic-input-component-container.disabled:hover {\n border: 1px dashed var(--ic-architectural-200);\n}\n\nic-input-component-container.readonly,\nic-input-component-container.readonly:hover {\n border: none;\n padding: 0;\n}\n\nic-input-component-container.error {\n border: var(--ic-space-xxxs) solid var(--ic-status-error);\n padding: 0;\n}\n\nic-input-component-container.warning {\n border: var(--ic-space-xxxs) solid var(--ic-status-warning-mid);\n padding: 0;\n}\n\nic-input-component-container.success {\n border: var(--ic-space-xxxs) solid var(--ic-status-success);\n padding: 0;\n}\n\nic-input-component-container.small {\n height: var(--ic-space-xl);\n}\n\nic-input-component-container.multiline {\n height: auto;\n}\n\nic-input-component-container .icon-container {\n margin-top: var(--ic-space-xxs);\n margin-left: 7px;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.multiline .icon-container,\nic-input-component-container.multiline.small .icon-container {\n margin-top: 6px;\n display: block;\n}\n\nic-input-component-container.readonly .icon-container {\n margin-left: -5px;\n}\n\nic-input-component-container.disabled ::placeholder {\n display: none;\n}\n\nic-input-component-container .inline-success {\n margin: var(--ic-space-xs) 6px;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.dark:hover {\n --border-color: var(--ic-architectural-400);\n}\n\nic-input-component-container .inline-success > svg {\n fill: var(--ic-status-success);\n}\n\nic-input-component-container:hover {\n border-color: var(--ic-action-dark-hover);\n color: var(--ic-action-dark-hover);\n}\n\n.focus-indicator {\n display: flex;\n width: 100%;\n margin: -2px;\n padding: 2px;\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n}\n\n.focus-indicator:focus-within,\n.focus-indicator-enabled {\n box-shadow: var(--ic-border-focus);\n}\n\n.focus-indicator.dark:focus-within {\n box-shadow: var(--ic-border-focus);\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n ic-input-component-container,\n .focus-indicator {\n transition: none;\n }\n\n ic-input-component-container:focus-within {\n border: 1px solid Highlight;\n outline: 2px solid Highlight;\n }\n\n ic-input-component-container.disabled,\n ic-input-component-container.disabled:hover {\n border: 1px dashed GrayText;\n }\n}\n","import { Component, Element, Host, Prop, h } from \"@stencil/core\";\n\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n} from \"../../utils/types\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport { isSlotUsed } from \"../../utils/helpers\";\n\n/**\n * @slot left-icon - Content will be placed to the left of the input.\n */\n@Component({\n tag: \"ic-input-component-container\",\n styleUrl: \"ic-input-component-container.css\",\n})\nexport class InputComponentContainer {\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly: boolean = false;\n /**\n * The validation status of the input component container - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n /**\n * If `true`, the small styling will be applied to the input component container.\n */\n @Prop() small: boolean = false;\n /**\n * If `true`, the input component container will allow for multiple lines.\n */\n @Prop() multiLine: boolean = false;\n /**\n * If `true`, the validation will display inline.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * If `true`, the dark variant of the input component container will be displayed.\n */\n @Prop() dark?: boolean = false;\n\n /**\n * If `true`, the input component container will fill the width of the container it is in.\n */\n @Prop() fullWidth: boolean = false;\n\n @Element() host: HTMLIcInputComponentContainerElement;\n\n render() {\n const {\n small,\n validationStatus,\n disabled,\n readonly,\n multiLine,\n fullWidth,\n dark,\n validationInline,\n } = this;\n const hasValidationStatus =\n this.validationStatus !== \"\" && !this.disabled && !this.readonly\n ? true\n : false;\n return (\n <Host\n class={{\n [\"small\"]: small,\n [validationStatus]: hasValidationStatus,\n [\"disabled\"]: disabled,\n [\"readonly\"]: readonly,\n [\"multiline\"]: multiLine,\n [\"fullwidth\"]: fullWidth,\n [\"dark\"]: dark,\n }}\n >\n <div\n class={{\n \"focus-indicator\": true,\n dark: dark,\n }}\n >\n {isSlotUsed(this.host, \"left-icon\") && (\n <div\n class={{\n [\"icon-container\"]: true,\n }}\n >\n <slot name=\"left-icon\" />\n </div>\n )}\n <slot></slot>\n\n {validationInline &&\n validationStatus === IcInformationStatus.Success && (\n <span\n class={{\n [\"inline-success\"]: true,\n }}\n innerHTML={successIcon}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n","ic-input-container .component-container {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: \"ic-input-container\",\n styleUrl: \"ic-input-container.css\",\n})\nexport class InputContainer {\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly?: boolean = false;\n\n render() {\n return (\n <Host>\n <div\n class={{\n [\"component-container\"]: true,\n [\"disabled\"]: this.disabled,\n [\"readonly\"]: this.readonly,\n }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n","@import \"../../global/normalise.css\";\n\n@media (prefers-reduced-motion: no-preference) {\n :host([open]) .menu {\n transition: max-height var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n max-height: 0;\n width: var(--input-width, 320px);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popup-menu);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n}\n\n:host(:not(.no-focus):focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu {\n text-decoration: none;\n list-style-type: none;\n border: 1px solid var(--ic-architectural-400);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n max-height: 0;\n overflow-y: hidden;\n}\n\n.menu-scroll {\n overflow-y: auto;\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host([open]) {\n max-height: none;\n display: block;\n}\n\n:host([open]) .menu {\n visibility: visible;\n max-height: 322px;\n}\n\n:host(.full-width) {\n width: 100%;\n}\n\n.option {\n padding: 8px 7px;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n:host([small]) .option {\n padding: 4px 7px;\n}\n\n.option:last-child {\n border-radius: 0 0 1px 1px;\n}\n\n.option:first-child {\n border-radius: 1px 1px 0 0;\n}\n\n.option:not(.disabled-option):hover {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.option:not(.disabled-option):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.option:focus-visible {\n outline: var(--ic-hc-focus-outline);\n}\n\n.option:not(.disabled-option) .option-description {\n color: var(--ic-color-secondary-text);\n}\n\n.option-text-container {\n pointer-events: none;\n}\n\n.check-icon {\n height: 24px;\n margin-left: 8px;\n pointer-events: none;\n}\n\n.focused-option .check-icon * {\n fill: currentcolor;\n}\n\n.option-group-title {\n padding: 24px 7px 8px;\n color: var(--ic-color-tertiary-text);\n}\n\n:host([small]) .option-group-title {\n padding: 12px 7px 4px;\n}\n\n.last-recommended-option {\n border-bottom: 1px solid var(--ic-architectural-400);\n}\n\n.disabled-option {\n color: var(--ic-architectural-200);\n cursor: default;\n pointer-events: none;\n}\n\n.focused-option,\n.focused-option .option-description {\n background-color: var(--ic-focus-blue) !important;\n color: var(--ic-color-white-text) !important;\n}\n\n:host(.no-results) li {\n cursor: no-drop;\n}\n\n:host(.no-results) li:hover {\n background-color: transparent;\n}\n\n@media (forced-colors: active) {\n .focused-option:focus {\n outline: none;\n border: 2px solid transparent;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n Method,\n Listen,\n State,\n Watch,\n} from \"@stencil/core\";\nimport { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\n\nimport { IcActivationTypes, IcMenuOption } from \"../../utils/types\";\nimport Check from \"../../assets/check-icon.svg\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport {\n IcOptionSelectEventDetail,\n IcMenuChangeEventDetail,\n IcMenuOptionIdEventDetail,\n} from \"./ic-menu.types\";\n\n@Component({\n tag: \"ic-menu\",\n styleUrl: \"ic-menu.css\",\n shadow: true,\n})\nexport class Menu {\n @Element() host: HTMLIcMenuElement;\n\n /**\n * If `true`, the menu will be displayed open.\n */\n @Prop({ reflect: true }) open!: boolean;\n\n /**\n * The possible menu selection options.\n */\n @Prop() options!: IcMenuOption[];\n\n /**\n * If `true`, the small styling will be applied to the menu.\n */\n @Prop({ reflect: true }) small?: boolean = false;\n\n /**\n * The ID of the menu.\n */\n @Prop() menuId!: string;\n\n /**\n * The value of the currently selected option.\n */\n @Prop() value!: string;\n\n /**\n * Determines whether options manually set as values (by pressing 'Enter') when they receive focus using keyboard navigation.\n */\n @Prop() activationType?: IcActivationTypes = \"automatic\";\n\n /**\n * The reference to the input element.\n */\n @Prop() inputEl!: HTMLElement;\n\n /**\n * @internal - The parent element if ic-menu is nested inside another component.\n */\n @Prop() parentEl?: HTMLElement;\n\n /**\n * The label for the input element.\n */\n @Prop() inputLabel!: string;\n\n /**\n * The reference to an anchor element the menu will position itself from when rendered.\n */\n @Prop() anchorEl!: HTMLElement;\n\n /**\n * If `true`, the menu will fill the width of the container.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * @internal If `true`, autofocus will be applied on selected item when menu is open.\n */\n @Prop() autoFocusOnSelected: boolean = true;\n\n @State() keyboardNav: boolean = false;\n @State() optionHighlighted: string;\n @State() focusFromSearchKeypress: boolean = false;\n @State() initialOptionsListRender: boolean = false;\n @State() preventIncorrectTabOrder: boolean = false;\n\n @Watch(\"options\")\n watchOptionsHandler(): void {\n this.ungroupedOptions = [];\n this.loadUngroupedOptions();\n }\n\n /**\n * Emitted when an option is selected.\n */\n @Event() icOptionSelect!: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when state of menu changes (i.e. open or close).\n */\n @Event() icMenuStateChange!: EventEmitter<IcMenuChangeEventDetail>;\n\n /**\n * @internal Emitted when an option has been highlighted\n */\n @Event() menuOptionId: EventEmitter<IcMenuOptionIdEventDetail>;\n\n @Listen(\"icClear\", { target: \"document\" })\n handleClearListener(): void {\n this.optionHighlighted = \"\";\n }\n\n @Listen(\"icSubmitSearch\", { target: \"document\" })\n handleSubmitSearch(): void {\n const highlightedOptionIndex = this.options.findIndex(\n (option) => option.value === this.optionHighlighted\n );\n\n this.setInputValue(highlightedOptionIndex);\n }\n\n private menu: HTMLUListElement;\n private ungroupedOptions: IcMenuOption[] = [];\n private popperInstance: PopperInstance;\n\n // Prevents menu re-opening immediately after it is closed on blur when clicking input\n private preventClickOpen: boolean = false;\n\n private handleMenuChange = (open: boolean, focusInput?: boolean): void => {\n if (!open) this.popperInstance.destroy();\n this.icMenuStateChange.emit({ open, focusInput });\n\n if (!open && focusInput !== false) {\n this.inputEl.focus();\n this.preventClickOpen = false;\n }\n };\n\n private setNextOptionValue = (selectedOptionIndex: number): void => {\n if (this.ungroupedOptions[selectedOptionIndex + 1]) {\n this.icOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex + 1].value,\n optionId: this.getOptionId(\n this.ungroupedOptions[selectedOptionIndex + 1].value\n ),\n });\n } else {\n this.icOptionSelect.emit({\n value: this.ungroupedOptions[0].value,\n optionId: this.getOptionId(this.ungroupedOptions[0].value),\n });\n }\n };\n\n private setPreviousOptionValue = (selectedOptionIndex: number): void => {\n if (this.ungroupedOptions[selectedOptionIndex - 1]) {\n this.icOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex - 1].value,\n optionId: this.getOptionId(\n this.ungroupedOptions[selectedOptionIndex - 1].value\n ),\n });\n } else {\n this.icOptionSelect.emit({\n value: this.ungroupedOptions[this.ungroupedOptions.length - 1].value,\n optionId: this.getOptionId(\n this.ungroupedOptions[this.ungroupedOptions.length - 1].value\n ),\n });\n }\n };\n\n /**\n * If menu is opened with the mouse, emit icMenuStateChange custom event.\n */\n @Method()\n async handleClickOpen(): Promise<void> {\n if (!this.preventClickOpen) {\n this.icMenuStateChange.emit({ open: !this.open });\n this.keyboardNav = false;\n }\n this.preventClickOpen = false;\n }\n\n /**\n * Used alongside activationType\n * If menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.\n * @param {KeyboardEvent} event - keyboard event\n */\n @Method()\n async handleKeyboardOpen(event: KeyboardEvent): Promise<void> {\n this.keyboardNav = false;\n\n if (this.activationType === \"automatic\") {\n this.autoSetInputValueKeyboardOpen(event);\n } else {\n this.keyboardNav = true;\n this.manSetInputValueKeyboardOpen(event);\n }\n }\n\n /**\n * @internal Used to highlight the first option in the menu.\n */\n @Method()\n async handleSetFirstOption(): Promise<void> {\n this.setHighlightedOption(0);\n }\n\n private arrowBehaviour = (event: KeyboardEvent): void => {\n event.preventDefault();\n this.handleMenuChange(true);\n };\n\n private setHighlightedOption = (highlightedIndex: number): void => {\n this.optionHighlighted = this.options[highlightedIndex].value || undefined;\n };\n\n private autoSetInputValueKeyboardOpen = (event: KeyboardEvent) => {\n const selectedOptionIndex = this.ungroupedOptions.findIndex(\n (option) => option.value === this.value\n );\n\n const isSearchableSelect = this.inputEl?.tagName === \"INPUT\";\n\n switch (event.key) {\n case \"ArrowDown\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setNextOptionValue(selectedOptionIndex);\n break;\n case \"ArrowUp\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setPreviousOptionValue(selectedOptionIndex);\n break;\n case \" \":\n case \"Enter\":\n if ((event.target as HTMLElement).id !== \"clear-button\") {\n this.handleMenuChange(true);\n }\n break;\n case \"Backspace\":\n if (isSearchableSelect) {\n this.inputEl.focus();\n }\n break;\n default:\n if (isSearchableSelect && event.key !== \"Tab\") {\n this.inputEl.focus();\n }\n break;\n }\n };\n\n private manSetInputValueKeyboardOpen = (event: KeyboardEvent) => {\n const highlightedOptionIndex = this.options.findIndex(\n (option) => option.value === this.optionHighlighted\n );\n\n const getOptionId = (index: number): string =>\n Array.from(this.host.shadowRoot.querySelectorAll(\"li\"))[index].id;\n\n const isSearchBar = this.parentEl.tagName === \"IC-SEARCH-BAR\";\n\n switch (event.key) {\n case \"ArrowDown\":\n this.arrowBehaviour(event);\n if (highlightedOptionIndex < this.options.length - 1) {\n this.setHighlightedOption(highlightedOptionIndex + 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex + 1),\n });\n } else {\n this.setHighlightedOption(0);\n this.menuOptionId.emit({\n optionId: getOptionId(0),\n });\n }\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"ArrowUp\":\n this.arrowBehaviour(event);\n if (\n highlightedOptionIndex <= 0 ||\n highlightedOptionIndex > this.options.length + 1\n ) {\n this.setHighlightedOption(this.options.length - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(this.options.length - 1),\n });\n } else {\n this.setHighlightedOption(highlightedOptionIndex - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex - 1),\n });\n }\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"Enter\":\n event.preventDefault();\n this.setInputValue(highlightedOptionIndex);\n break;\n case \"Escape\":\n this.handleMenuChange(false);\n this.menuOptionId.emit({ optionId: undefined });\n break;\n case \"Shift\":\n case \"Tab\":\n this.preventIncorrectTabOrder = true;\n break;\n case \"Backspace\":\n if (isSearchBar) {\n (this.parentEl as HTMLIcSearchBarElement).setFocus();\n this.focusFromSearchKeypress = true;\n this.setHighlightedOption(0);\n }\n break;\n default:\n if (isSearchBar && event.key !== \"Tab\") {\n (this.parentEl as HTMLIcSearchBarElement).setFocus();\n this.focusFromSearchKeypress = true;\n this.setHighlightedOption(0);\n }\n break;\n }\n };\n\n private setInputValue = (highlightedOptionIndex: number) => {\n if (this.options[highlightedOptionIndex]) {\n this.icOptionSelect.emit({\n value: this.options[highlightedOptionIndex]?.value,\n });\n this.optionHighlighted = undefined;\n this.menuOptionId.emit({ optionId: undefined });\n }\n this.handleMenuChange(false);\n };\n\n private handleOptionClick = (event: Event): void => {\n const { value, label } = (event.target as HTMLLIElement).dataset;\n this.icOptionSelect.emit({ value, label });\n this.handleMenuChange(false);\n };\n\n private handleBlur = (event: FocusEvent): void => {\n if (event.relatedTarget !== this.inputEl) {\n if (!this.menu.contains(event.relatedTarget as HTMLElement)) {\n this.handleMenuChange(false, false);\n }\n } else {\n this.handleMenuChange(false);\n this.preventClickOpen = true;\n }\n };\n\n private handleMenuKeyDown = (event: KeyboardEvent) => {\n if (this.activationType === \"automatic\") {\n this.autoSetValueOnMenuKeyDown(event);\n }\n };\n\n private autoSetValueOnMenuKeyDown = (event: KeyboardEvent): void => {\n event.cancelBubble = true;\n const selectedOptionIndex = this.ungroupedOptions.findIndex(\n (option) => option.value === this.value\n );\n\n const isSearchableSelect = this.inputEl.tagName === \"INPUT\";\n\n switch (event.key) {\n case \"ArrowUp\":\n event.preventDefault();\n this.setPreviousOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n break;\n case \"ArrowDown\":\n event.preventDefault();\n this.setNextOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n break;\n case \"Home\":\n this.icOptionSelect.emit({\n value: this.ungroupedOptions[0].value,\n });\n this.keyboardNav = true;\n break;\n case \"End\":\n this.icOptionSelect.emit({\n value: this.ungroupedOptions[this.ungroupedOptions.length - 1].value,\n });\n this.keyboardNav = true;\n break;\n case \" \":\n case \"Enter\":\n case \"Escape\":\n this.handleMenuChange(false);\n break;\n case \"Backspace\":\n if (isSearchableSelect) {\n this.inputEl.focus();\n }\n break;\n case \"Shift\":\n break;\n default:\n if (isSearchableSelect && event.key !== \"Tab\") {\n this.inputEl.focus();\n }\n break;\n }\n };\n\n private handleMenuKeyUp = (event: KeyboardEvent): void => {\n if (event.key === \"Tab\" && event.shiftKey) {\n this.preventClickOpen = false;\n }\n };\n\n private getOptionId = (value: string): string => {\n return `${this.menuId}-${value}`;\n };\n\n private getOptionAriaLabel = (\n option: IcMenuOption,\n parentOption: IcMenuOption\n ): string => {\n let ariaLabel = option.label;\n\n if (option.description) {\n ariaLabel = `${ariaLabel}, ${option.description}`;\n }\n\n if (parentOption) {\n return `${ariaLabel}, ${parentOption.label} group`;\n } else {\n return ariaLabel;\n }\n };\n\n private getSortedOptions = (options: IcMenuOption[]): IcMenuOption[] => {\n return options.sort((optionA, optionB) =>\n optionA.recommended && !optionB.recommended ? -1 : 0\n );\n };\n\n private isManualMode = this.activationType === \"manual\";\n\n private scrollToSelected = (menu: HTMLUListElement) => {\n const selectedOption = menu.querySelector(\n \".option[aria-selected]\"\n ) as HTMLElement;\n\n if (selectedOption) {\n const elTop = selectedOption.offsetTop + selectedOption.offsetHeight;\n if (\n elTop > menu.scrollTop + menu.offsetHeight ||\n elTop < menu.scrollTop + menu.offsetHeight\n ) {\n menu.scrollTop = selectedOption.offsetTop;\n }\n selectedOption.focus();\n }\n };\n\n private loadUngroupedOptions = () => {\n if (this.options.length > 0) {\n this.options.map((option) => {\n if (option.children) {\n option.children.map(\n (option) => !option.disabled && this.ungroupedOptions.push(option)\n );\n } else if (!option.disabled) {\n this.ungroupedOptions.push(option);\n }\n });\n }\n this.ungroupedOptions = this.getSortedOptions(this.ungroupedOptions);\n };\n\n connectedCallback(): void {\n if (this.parentEl?.tagName === \"IC-SEARCH-BAR\") {\n this.setHighlightedOption(0);\n this.initialOptionsListRender = true;\n }\n }\n\n componentWillLoad(): void {\n this.loadUngroupedOptions();\n }\n\n componentDidLoad(): void {\n let optionsHeight = 0;\n this.host.shadowRoot\n .querySelectorAll(\".option\")\n .forEach((option) => (optionsHeight += option.clientHeight));\n if (optionsHeight >= 320) {\n this.menu.classList.add(\"menu-scroll\");\n }\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.open, propName: \"open\" },\n { prop: this.options, propName: \"options\" },\n { prop: this.menuId, propName: \"menu-id\" },\n { prop: this.inputLabel, propName: \"input-label\" },\n //NOTE: no check for value, input-el or anchor-el as otherwise get console errors on first load of select component\n ],\n \"Menu\"\n );\n }\n\n componentDidRender(): void {\n if (this.open) {\n this.popperInstance = createPopper(this.anchorEl, this.host, {\n placement: \"bottom\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 7],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n }\n }\n\n componentDidUpdate(): void {\n const inputValueInOptions: boolean = this.options.some(\n (option) => option.value === this.value\n );\n\n const optionHighlightedIsSet =\n this.optionHighlighted !== null &&\n this.optionHighlighted !== undefined &&\n this.optionHighlighted !== \"\";\n\n if (this.open && this.options.length !== 0) {\n if (\n this.value &&\n this.keyboardNav &&\n inputValueInOptions &&\n this.autoFocusOnSelected\n ) {\n this.scrollToSelected(this.menu);\n } else if (\n this.inputEl.tagName !== \"IC-TEXT-FIELD\" &&\n this.inputEl.tagName !== \"INPUT\"\n ) {\n this.menu.focus();\n } else if (\n optionHighlightedIsSet &&\n !this.focusFromSearchKeypress &&\n !this.preventIncorrectTabOrder\n ) {\n const highlightedEl = this.host.shadowRoot.querySelector(\n `li[data-value=\"${this.optionHighlighted}\"]`\n ) as HTMLElement;\n\n if (highlightedEl) {\n highlightedEl.focus();\n }\n }\n }\n }\n\n private displayOption = (\n option: IcMenuOption,\n index?: number,\n parentOption?: IcMenuOption\n ): HTMLLIElement => {\n const { open, value } = this;\n\n return (\n <li\n id={this.getOptionId(option.value)}\n class={{\n option: true,\n \"focused-option\": this.isManualMode\n ? (this.keyboardNav || this.initialOptionsListRender) &&\n option.value === this.optionHighlighted\n : this.keyboardNav && option.value === value,\n \"last-recommended-option\":\n option.recommended &&\n this.options[index + 1] &&\n !this.options[index + 1].recommended,\n \"disabled-option\": option.disabled,\n }}\n role=\"option\"\n tabindex={\n open &&\n (option.value === value || option.value === this.optionHighlighted) &&\n this.keyboardNav\n ? \"0\"\n : \"-1\"\n }\n aria-label={this.getOptionAriaLabel(option, parentOption)}\n aria-selected={option.value === value}\n aria-disabled={option.disabled ? \"true\" : \"false\"}\n onClick={this.handleOptionClick}\n onBlur={this.handleBlur}\n onMouseDown={(event) => event.preventDefault()}\n data-value={option.value}\n data-label={option.label}\n >\n <div class=\"option-text-container\">\n <ic-typography variant=\"body\" aria-hidden=\"true\">\n <p>{option.label}</p>\n </ic-typography>\n {option.description && (\n <ic-typography\n id={`${this.getOptionId(option.value)}-description`}\n class=\"option-description\"\n variant=\"caption\"\n aria-hidden=\"true\"\n >\n <p>{option.description}</p>\n </ic-typography>\n )}\n </div>\n {option.value === value &&\n this.parentEl.tagName !== \"IC-SEARCH-BAR\" && (\n <span class=\"check-icon\" innerHTML={Check} />\n )}\n </li>\n );\n };\n\n render() {\n const { inputLabel, options, menuId, value, fullWidth } = this;\n\n return (\n <Host\n class={{\n \"full-width\": fullWidth,\n \"no-focus\": this.inputEl?.tagName === \"INPUT\",\n }}\n >\n {options.length !== 0 && (\n <ul\n id={menuId}\n class=\"menu\"\n role=\"listbox\"\n aria-label={inputLabel}\n aria-activedescendant={\n value != null && value !== \"\" ? this.getOptionId(value) : \"\"\n }\n tabindex={\n open && !this.keyboardNav && this.inputEl?.tagName !== \"INPUT\"\n ? \"0\"\n : \"-1\"\n }\n ref={(el) => (this.menu = el)}\n onKeyDown={this.handleMenuKeyDown}\n onKeyUp={this.handleMenuKeyUp}\n onBlur={this.handleBlur}\n >\n {this.getSortedOptions(options).map((option, index) => {\n if (option.children) {\n if (option.children.length > 0) {\n return (\n <div>\n <ic-typography\n class=\"option-group-title\"\n role=\"presentation\"\n variant=\"subtitle-small\"\n >\n <p>{option.label}</p>\n </ic-typography>\n {option.children.map((childOption) =>\n this.displayOption(childOption, index, option)\n )}\n </div>\n );\n } else {\n return null;\n }\n } else {\n return this.displayOption(option, index);\n }\n })}\n </ul>\n )}\n </Host>\n );\n }\n}\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as t,h as o,H as i,g as r}from"./p-f9370be6.js";import{g as n,I as a,k as s,c as l,l as c}from"./p-23831891.js";import{I as d}from"./p-6f57b13c.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.footer-sparse){--footer-links-padding:24px 0;--footer-compliance-padding:24px 0 8px 0;--footer-logo-margin-bottom:var(--ic-space-lg);--footer-link-inner-flex-direction:row}:host(.footer-small){--footer-links-padding:0 0;--footer-compliance-padding:16px 0 8px;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.footer-light){--footer-theme-secondary:var(--ic-theme-secondary);--footer-theme-tertiary:var(--ic-theme-tertiary);--footer-keyline:var(--ic-keyline-lighten)}:host(.footer-dark){--footer-theme-secondary:var(--ic-theme-secondary-light);--footer-theme-tertiary:var(--ic-theme-tertiary-light);--footer-keyline:var(--ic-keyline-darken)}:host(.footer-small.footer-ungrouped){--footer-links-padding:var(--ic-space-md) 0 0 0}footer{display:flex;flex-direction:column;width:100%}.footer-description{background-color:var(--footer-theme-secondary);color:var(--ic-theme-text);border-bottom:var(--footer-keyline)}.footer-description-inner{padding:16px 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--footer-theme-secondary);color:var(--ic-theme-text)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--footer-theme-tertiary);color:var(--ic-theme-text)}.footer-compliance-inner{padding:var(--footer-compliance-padding)}.footer-logo{margin-bottom:var(--footer-logo-margin-bottom);display:flex;gap:var(--ic-space-xxl)}.footer-logo>::slotted(){margin-right:var(--ic-space-md)}.footer-caption{margin-bottom:var(--ic-space-md)}.classification-spacing{margin-bottom:var(--ic-space-lg)}@media (forced-colors: active){footer{border-top:var(--ic-hc-border)}}';const m=class{constructor(o){e(this,o);this.
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as t,h as o,H as i,g as r}from"./p-f9370be6.js";import{g as n,I as a,k as s,c as l,l as c}from"./p-23831891.js";import{I as d}from"./p-6f57b13c.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.footer-sparse){--footer-links-padding:24px 0;--footer-compliance-padding:24px 0 8px 0;--footer-logo-margin-bottom:var(--ic-space-lg);--footer-link-inner-flex-direction:row}:host(.footer-small){--footer-links-padding:0 0;--footer-compliance-padding:16px 0 8px;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.footer-light){--footer-theme-secondary:var(--ic-theme-secondary);--footer-theme-tertiary:var(--ic-theme-tertiary);--footer-keyline:var(--ic-keyline-lighten)}:host(.footer-dark){--footer-theme-secondary:var(--ic-theme-secondary-light);--footer-theme-tertiary:var(--ic-theme-tertiary-light);--footer-keyline:var(--ic-keyline-darken)}:host(.footer-small.footer-ungrouped){--footer-links-padding:var(--ic-space-md) 0 0 0}footer{display:flex;flex-direction:column;width:100%}.footer-description{background-color:var(--footer-theme-secondary);color:var(--ic-theme-text);border-bottom:var(--footer-keyline)}.footer-description-inner{padding:16px 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--footer-theme-secondary);color:var(--ic-theme-text)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--footer-theme-tertiary);color:var(--ic-theme-text)}.footer-compliance-inner{padding:var(--footer-compliance-padding)}.footer-logo{margin-bottom:var(--footer-logo-margin-bottom);display:flex;gap:var(--ic-space-xxl)}.footer-logo>::slotted(){margin-right:var(--ic-space-md)}.footer-caption{margin-bottom:var(--ic-space-md)}.classification-spacing{margin-bottom:var(--ic-space-lg)}@media (forced-colors: active){footer{border-top:var(--ic-hc-border)}}';const m=class{constructor(o){e(this,o);this.footerResized=t(this,"footerResized",7);this.resizeObserverCallback=e=>{if(e!==this.deviceSize){this.deviceSize=e}this.footerResized.emit()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const e=n();this.resizeObserverCallback(e)}));this.resizeObserver.observe(this.footerEl)};this.description=undefined;this.aligned="left";this.breakpoint="medium";this.groupLinks=false;this.caption=undefined;this.copyright=true;this.deviceSize=a.XL;this.foregroundColor=s()}isSmall(){const e=this.breakpoint;return e==="extra small"?this.deviceSize<a.XS:e==="small"?this.deviceSize<a.S:e==="medium"?this.deviceSize<a.M:e==="large"?this.deviceSize<a.L:e==="extra large"?this.deviceSize<a.XL:false}themeChangeHandler(e){const t=e.detail;this.foregroundColor=t.mode}componentWillLoad(){this.deviceSize=n()}componentDidLoad(){l(this.runResizeObserver)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){const{aligned:e,caption:t,copyright:r,description:n,groupLinks:s,foregroundColor:l}=this;const p=this.isSmall();return o(i,{class:{footer:true,[`footer-${p?"small":"sparse"}`]:true,[`footer-${s?"grouped":"ungrouped"}`]:true,[`footer-${l}`]:true,[d.Dark]:l===d.Dark,[d.Light]:l===d.Light}},o("footer",{ref:e=>this.footerEl=e},o("div",{class:"footer-description"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-description-inner"},o("ic-typography",{variant:"body"},o("slot",{name:"description"},n))))),o("div",{class:"footer-links"},s&&p?o("div",{class:"footer-links-inner"},o("slot",{name:"link"})):o("ic-section-container",{fullHeight:true,aligned:e},o("div",{class:"footer-links-inner"},o("slot",{name:"link"})))),o("div",{class:"footer-compliance"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-compliance-inner"},o("div",{class:"footer-logo"},o("slot",{name:"logo"})),o("div",{class:"footer-caption"},o("ic-typography",{variant:this.deviceSize<=a.M?"caption":"body"},o("slot",{name:"caption"},t))),r&&o("div",{class:{["footer-copyright"]:true,["classification-spacing"]:c()}},o("ic-typography",{variant:this.deviceSize<=a.M?"caption-uppercase":"label-uppercase"},"© Crown Copyright")))))))}get el(){return r(this)}};m.style=p;export{m as ic_footer};
|
2
|
+
//# sourceMappingURL=p-66f3f02b.entry.js.map
|