@ukic/web-components 3.9.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/constants-8354f6e6.js +189 -0
- package/dist/cjs/constants-8354f6e6.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-a0e78e2e.js → helpers-ffe1c2d9.js} +6 -187
- package/dist/cjs/helpers-ffe1c2d9.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +2 -1
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +2 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-action-chip.cjs.entry.js +2 -1
- package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +4 -3
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +2 -1
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +27 -20
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +4 -3
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -4
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +2 -1
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js +4 -3
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +7 -4
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +2 -1
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +4 -3
- package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +4 -3
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +10 -9
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +6 -5
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +8 -7
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +12 -11
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +26 -12
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
- package/dist/cjs/ic-link.cjs.entry.js +5 -4
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +3 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +2 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -2
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -2
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +6 -5
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +8 -7
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +3 -2
- package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +6 -5
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -5
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +6 -5
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +6 -5
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +11 -10
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-select.cjs.entry.js +13 -11
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +6 -5
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +15 -14
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +4 -3
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +6 -5
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +10 -2
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +4 -3
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +2 -1
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +32 -23
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +5 -4
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +7 -6
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -3
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +4 -3
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +4 -3
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +15 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/ai-icon.svg +1 -1
- package/dist/collection/assets/error-icon.svg +4 -4
- package/dist/collection/assets/info-icon.svg +4 -4
- package/dist/collection/assets/neutral-icon.svg +4 -4
- package/dist/collection/assets/success-icon.svg +4 -4
- package/dist/collection/assets/warning-icon.svg +4 -4
- package/dist/collection/components/ic-alert/ic-alert.js +1 -1
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.stories.js +179 -0
- package/dist/collection/components/ic-button/ic-button.js +14 -8
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.stories.js +191 -0
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.stories.js +10 -10
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +5 -0
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +2 -2
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +2 -2
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +11 -28
- package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
- package/dist/collection/components/ic-data-list/ic-data-list.stories.js +30 -6
- package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
- package/dist/collection/components/ic-dialog/ic-dialog.js +5 -3
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.stories.js +40 -1
- package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
- package/dist/collection/components/ic-footer/ic-footer.stories.js +72 -0
- package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
- package/dist/collection/components/ic-hero/ic-hero.js +4 -4
- package/dist/collection/components/ic-hero/ic-hero.stories.js +72 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +8 -0
- package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
- package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
- package/dist/collection/components/ic-input-label/ic-input-label.js +2 -2
- package/dist/collection/components/ic-input-validation/ic-input-validation.css +5 -0
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +22 -6
- package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.types.js.map +1 -1
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.js +2 -2
- package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js +2 -2
- package/dist/collection/components/ic-link/ic-link.js +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +5 -5
- package/dist/collection/components/ic-menu/ic-menu.css +2 -2
- package/dist/collection/components/ic-menu/ic-menu.js +4 -4
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
- package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +4 -4
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +14 -15
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
- 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 +9 -9
- 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.stories.js +39 -0
- package/dist/collection/components/ic-select/ic-select.js +10 -9
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(multi).stories.js +8 -6
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +6 -3
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +8 -6
- package/dist/collection/components/ic-select/test/a11y/ic-select.test.a11y.js +60 -0
- package/dist/collection/components/ic-select/test/a11y/ic-select.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +4 -4
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
- package/dist/collection/components/ic-step/ic-step.js +13 -13
- package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
- package/dist/collection/components/ic-switch/ic-switch.js +4 -4
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +27 -2
- 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 +2 -2
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
- package/dist/collection/components/ic-text-field/ic-text-field.css +4 -0
- package/dist/collection/components/ic-text-field/ic-text-field.js +53 -19
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.stories.js +102 -4
- package/dist/collection/components/ic-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.js +3 -3
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.stories.js +236 -0
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +6 -4
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.js +2 -2
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/constants.js +176 -0
- package/dist/components/constants.js.map +1 -0
- package/dist/components/helpers.js +2 -174
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-action-chip.js +1 -1
- package/dist/components/ic-alert.js +3 -2
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +1 -1
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +1 -1
- package/dist/components/ic-breadcrumb-group.js +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-button2.js +17 -11
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +1 -1
- package/dist/components/ic-checkbox-group.js +3 -3
- package/dist/components/ic-checkbox.js +4 -4
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +1 -1
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-row.js +3 -3
- package/dist/components/ic-dialog.js +6 -4
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state.js +3 -3
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +3 -3
- package/dist/components/ic-footer.js +2 -1
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +5 -5
- package/dist/components/ic-horizontal-scroll2.js +7 -7
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +5 -4
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-label2.js +3 -3
- package/dist/components/ic-input-validation2.js +23 -7
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-layout-grid-item.js +2 -2
- package/dist/components/ic-layout-grid.js +2 -2
- package/dist/components/ic-link2.js +3 -2
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +5 -5
- package/dist/components/ic-menu-group.js +2 -2
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu2.js +6 -6
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +2 -1
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +2 -2
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +5 -5
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +7 -7
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination.js +4 -4
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +5 -5
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +5 -5
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +5 -5
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +10 -10
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select.js +12 -10
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +5 -5
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +14 -14
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-switch.js +5 -5
- package/dist/components/ic-tab-context.js +11 -2
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-text-field.js +31 -21
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-theme.js +3 -2
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +5 -4
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +3 -3
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +6 -4
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-typography2.js +2 -2
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/core/core.css +32 -4
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/index.esm.js +1 -1
- package/dist/core/p-01aeffca.entry.js +2 -0
- package/dist/core/{p-b52000d9.entry.js.map → p-01aeffca.entry.js.map} +1 -1
- package/dist/core/p-0201abbf.entry.js +2 -0
- package/dist/core/{p-ea778379.entry.js.map → p-0201abbf.entry.js.map} +1 -1
- package/dist/core/p-02c2c31f.entry.js +2 -0
- package/dist/core/{p-6a576a8b.entry.js.map → p-02c2c31f.entry.js.map} +1 -1
- package/dist/core/p-0809aff4.entry.js +2 -0
- package/dist/core/{p-1e2f40b0.entry.js.map → p-0809aff4.entry.js.map} +1 -1
- package/dist/core/p-19366be6.entry.js +2 -0
- package/dist/core/{p-19cf2327.entry.js.map → p-19366be6.entry.js.map} +1 -1
- package/dist/core/p-1ab63899.entry.js +2 -0
- package/dist/core/{p-ef4b5469.entry.js.map → p-1ab63899.entry.js.map} +1 -1
- package/dist/core/p-1d4dfef1.entry.js +2 -0
- package/dist/core/{p-661ae402.entry.js.map → p-1d4dfef1.entry.js.map} +1 -1
- package/dist/core/p-1dab47b1.entry.js +2 -0
- package/dist/core/{p-72a9909c.entry.js.map → p-1dab47b1.entry.js.map} +1 -1
- package/dist/core/p-23b223bf.entry.js +2 -0
- package/dist/core/{p-f309d3af.entry.js.map → p-23b223bf.entry.js.map} +1 -1
- package/dist/core/p-35ee7c53.entry.js +2 -0
- package/dist/core/{p-9eeb5e85.entry.js.map → p-35ee7c53.entry.js.map} +1 -1
- package/dist/core/{p-287e5c17.entry.js → p-37d217b5.entry.js} +2 -2
- package/dist/core/{p-df88ff5b.entry.js → p-37daa8fe.entry.js} +2 -2
- package/dist/core/p-3a78bf6e.entry.js +2 -0
- package/dist/core/{p-2f4f392f.entry.js.map → p-3a78bf6e.entry.js.map} +1 -1
- package/dist/core/p-3f55bb5b.entry.js +2 -0
- package/dist/core/p-3f55bb5b.entry.js.map +1 -0
- package/dist/core/p-402813c9.entry.js +2 -0
- package/dist/core/{p-9323c234.entry.js.map → p-402813c9.entry.js.map} +1 -1
- package/dist/core/p-402c2455.entry.js +2 -0
- package/dist/core/{p-5daa7915.entry.js.map → p-402c2455.entry.js.map} +1 -1
- package/dist/core/p-46423f42.entry.js +2 -0
- package/dist/core/{p-b0d488d0.entry.js.map → p-46423f42.entry.js.map} +1 -1
- package/dist/core/{p-45dd12ee.entry.js → p-4747c39f.entry.js} +2 -2
- package/dist/core/p-4747c39f.entry.js.map +1 -0
- package/dist/core/{p-ffac41d6.entry.js → p-492fcb51.entry.js} +2 -2
- package/dist/core/p-4a2c02b2.entry.js +2 -0
- package/dist/core/{p-711bfeed.entry.js.map → p-4a2c02b2.entry.js.map} +1 -1
- package/dist/core/p-4dd8add9.entry.js +2 -0
- package/dist/core/{p-6ed0ac48.entry.js.map → p-4dd8add9.entry.js.map} +1 -1
- package/dist/core/p-515ded3f.entry.js +2 -0
- package/dist/core/{p-41f92698.entry.js.map → p-515ded3f.entry.js.map} +1 -1
- package/dist/core/p-52a2f800.entry.js +2 -0
- package/dist/core/p-52a2f800.entry.js.map +1 -0
- package/dist/core/{p-6e8ef73c.entry.js → p-57721431.entry.js} +2 -2
- package/dist/core/p-57803949.entry.js +2 -0
- package/dist/core/{p-f6a02202.entry.js.map → p-57803949.entry.js.map} +1 -1
- package/dist/core/p-58b8d154.entry.js +2 -0
- package/dist/core/{p-cbe0d1bb.entry.js.map → p-58b8d154.entry.js.map} +1 -1
- package/dist/core/p-5c6efed3.entry.js +2 -0
- package/dist/core/{p-3dc54847.entry.js.map → p-5c6efed3.entry.js.map} +1 -1
- package/dist/core/{p-5fbc8e62.entry.js → p-5fcfcfb6.entry.js} +2 -2
- package/dist/core/p-641c26c4.js +2 -0
- package/dist/core/p-641c26c4.js.map +1 -0
- package/dist/core/p-65a3c216.entry.js +2 -0
- package/dist/core/{p-15dbccc2.entry.js.map → p-65a3c216.entry.js.map} +1 -1
- package/dist/core/p-69412f61.entry.js +2 -0
- package/dist/core/{p-21cf2beb.entry.js.map → p-69412f61.entry.js.map} +1 -1
- package/dist/core/p-69cc0f7d.entry.js +2 -0
- package/dist/core/{p-6014ab64.entry.js.map → p-69cc0f7d.entry.js.map} +1 -1
- package/dist/core/p-6ceedfa8.js +2 -0
- package/dist/core/p-6ceedfa8.js.map +1 -0
- package/dist/core/p-75a9b2e4.entry.js +2 -0
- package/dist/core/p-75a9b2e4.entry.js.map +1 -0
- package/dist/core/p-75e0278a.entry.js +2 -0
- package/dist/core/{p-4ca782eb.entry.js.map → p-75e0278a.entry.js.map} +1 -1
- package/dist/core/p-8326db29.entry.js +2 -0
- package/dist/core/{p-3e5d7a3d.entry.js.map → p-8326db29.entry.js.map} +1 -1
- package/dist/core/p-8af9413c.entry.js +2 -0
- package/dist/core/p-8af9413c.entry.js.map +1 -0
- package/dist/core/p-8d1fbbeb.entry.js +2 -0
- package/dist/core/{p-7cd4f6a6.entry.js.map → p-8d1fbbeb.entry.js.map} +1 -1
- package/dist/core/p-8d29c0fa.entry.js +2 -0
- package/dist/core/{p-52748d5c.entry.js.map → p-8d29c0fa.entry.js.map} +1 -1
- package/dist/core/{p-ea061ccf.entry.js → p-9a8bcb78.entry.js} +2 -2
- package/dist/core/{p-8b5022bc.entry.js → p-9cf6ccfd.entry.js} +2 -2
- package/dist/core/p-a468df37.entry.js +2 -0
- package/dist/core/{p-fc3b1155.entry.js.map → p-a468df37.entry.js.map} +1 -1
- package/dist/core/p-a48b581a.entry.js +2 -0
- package/dist/core/{p-9f36791b.entry.js.map → p-a48b581a.entry.js.map} +1 -1
- package/dist/core/p-a4e67ab8.entry.js +2 -0
- package/dist/core/{p-4d1a3036.entry.js.map → p-a4e67ab8.entry.js.map} +1 -1
- package/dist/core/p-aab838e5.entry.js +2 -0
- package/dist/core/{p-9c013333.entry.js.map → p-aab838e5.entry.js.map} +1 -1
- package/dist/core/p-abb9dccb.entry.js +2 -0
- package/dist/core/{p-af9c391d.entry.js.map → p-abb9dccb.entry.js.map} +1 -1
- package/dist/core/{p-999f0a5d.entry.js → p-b4a2f6fa.entry.js} +2 -2
- package/dist/core/p-b80d408f.entry.js +2 -0
- package/dist/core/p-b80d408f.entry.js.map +1 -0
- package/dist/core/p-b9018261.entry.js +2 -0
- package/dist/core/{p-0d680d19.entry.js.map → p-b9018261.entry.js.map} +1 -1
- package/dist/core/p-c81ffadd.entry.js +2 -0
- package/dist/core/{p-595a4d06.entry.js.map → p-c81ffadd.entry.js.map} +1 -1
- package/dist/core/p-cd63bcf2.entry.js +2 -0
- package/dist/core/p-cd63bcf2.entry.js.map +1 -0
- package/dist/core/p-cdd04ec2.entry.js +2 -0
- package/dist/core/{p-41ef74a7.entry.js.map → p-cdd04ec2.entry.js.map} +1 -1
- package/dist/core/p-d27e46ac.entry.js +2 -0
- package/dist/core/{p-cf631191.entry.js.map → p-d27e46ac.entry.js.map} +1 -1
- package/dist/core/p-d35f8bd4.entry.js +2 -0
- package/dist/core/{p-493eaabb.entry.js.map → p-d35f8bd4.entry.js.map} +1 -1
- package/dist/core/p-d6b3e02f.entry.js +2 -0
- package/dist/core/p-d6b3e02f.entry.js.map +1 -0
- package/dist/core/p-d7bd5aa0.entry.js +2 -0
- package/dist/core/p-d7bd5aa0.entry.js.map +1 -0
- package/dist/core/p-ed69f110.entry.js +2 -0
- package/dist/core/p-ed69f110.entry.js.map +1 -0
- package/dist/core/p-eddc5517.entry.js +2 -0
- package/dist/core/{p-313a8a2f.entry.js.map → p-eddc5517.entry.js.map} +1 -1
- package/dist/core/p-f045f59d.entry.js +2 -0
- package/dist/core/{p-317e005f.entry.js.map → p-f045f59d.entry.js.map} +1 -1
- package/dist/core/p-f086d6df.entry.js +2 -0
- package/dist/core/{p-43324339.entry.js.map → p-f086d6df.entry.js.map} +1 -1
- package/dist/core/p-f17e1525.entry.js +2 -0
- package/dist/core/{p-a77364f5.entry.js.map → p-f17e1525.entry.js.map} +1 -1
- package/dist/core/p-f78f34ce.entry.js +2 -0
- package/dist/core/{p-1d37ac1c.entry.js.map → p-f78f34ce.entry.js.map} +1 -1
- package/dist/core/p-fd488ed7.entry.js +2 -0
- package/dist/core/{p-a602a8e1.entry.js.map → p-fd488ed7.entry.js.map} +1 -1
- package/dist/core/p-ffc608a1.entry.js +2 -0
- package/dist/core/{p-8a4b12e4.entry.js.map → p-ffc608a1.entry.js.map} +1 -1
- package/dist/esm/constants-48759bda.js +176 -0
- package/dist/esm/constants-48759bda.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-56631aa0.js → helpers-d8189e9d.js} +3 -175
- package/dist/esm/helpers-d8189e9d.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +2 -1
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +2 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-action-chip.entry.js +2 -1
- package/dist/esm/ic-action-chip.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +3 -2
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +2 -1
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +2 -1
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +2 -1
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +2 -1
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +25 -18
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +2 -1
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +4 -3
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -4
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +2 -1
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js +4 -3
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +7 -4
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +2 -1
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state.entry.js +4 -3
- package/dist/esm/ic-empty-state.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +2 -1
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +4 -3
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +2 -1
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +6 -5
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +8 -7
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +12 -11
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +23 -9
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-layout-grid-item.entry.js +2 -2
- package/dist/esm/ic-layout-grid.entry.js +2 -2
- package/dist/esm/ic-link.entry.js +3 -2
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +3 -2
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +2 -1
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +2 -1
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +3 -2
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +2 -1
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +6 -5
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +8 -7
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +3 -2
- package/dist/esm/ic-pagination-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination.entry.js +6 -5
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +6 -5
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +6 -5
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +6 -5
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +11 -10
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-select.entry.js +12 -10
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +6 -5
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skip-link.entry.js +2 -2
- package/dist/esm/ic-status-tag.entry.js +4 -3
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +15 -14
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +4 -3
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +6 -5
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +10 -2
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +4 -3
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +2 -1
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +30 -21
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +3 -2
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +5 -4
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +4 -3
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +4 -3
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +2 -1
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +4 -3
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-button/ic-button.d.ts +1 -0
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +1 -0
- package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +2 -0
- package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +1 -1
- package/dist/types/components/ic-select/test/a11y/ic-select.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +4 -0
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +6 -1
- package/dist/types/components.d.ts +14 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +244 -204
- package/hydrate/index.mjs +244 -204
- package/package.json +3 -3
- package/vscode-data.json +21 -0
- package/dist/cjs/helpers-a0e78e2e.js.map +0 -1
- package/dist/core/p-0d680d19.entry.js +0 -2
- package/dist/core/p-15dbccc2.entry.js +0 -2
- package/dist/core/p-19cf2327.entry.js +0 -2
- package/dist/core/p-1d37ac1c.entry.js +0 -2
- package/dist/core/p-1e2f40b0.entry.js +0 -2
- package/dist/core/p-21cf2beb.entry.js +0 -2
- package/dist/core/p-25007ec9.js +0 -2
- package/dist/core/p-25007ec9.js.map +0 -1
- package/dist/core/p-28efe829.entry.js +0 -2
- package/dist/core/p-28efe829.entry.js.map +0 -1
- package/dist/core/p-2f4f392f.entry.js +0 -2
- package/dist/core/p-313a8a2f.entry.js +0 -2
- package/dist/core/p-317e005f.entry.js +0 -2
- package/dist/core/p-3dc54847.entry.js +0 -2
- package/dist/core/p-3e5d7a3d.entry.js +0 -2
- package/dist/core/p-41ef74a7.entry.js +0 -2
- package/dist/core/p-41f92698.entry.js +0 -2
- package/dist/core/p-43324339.entry.js +0 -2
- package/dist/core/p-45dd12ee.entry.js.map +0 -1
- package/dist/core/p-493eaabb.entry.js +0 -2
- package/dist/core/p-4ca782eb.entry.js +0 -2
- package/dist/core/p-4d1a3036.entry.js +0 -2
- package/dist/core/p-52748d5c.entry.js +0 -2
- package/dist/core/p-595a4d06.entry.js +0 -2
- package/dist/core/p-5daa7915.entry.js +0 -2
- package/dist/core/p-5f68f62b.entry.js +0 -2
- package/dist/core/p-5f68f62b.entry.js.map +0 -1
- package/dist/core/p-6014ab64.entry.js +0 -2
- package/dist/core/p-661ae402.entry.js +0 -2
- package/dist/core/p-6a576a8b.entry.js +0 -2
- package/dist/core/p-6ed0ac48.entry.js +0 -2
- package/dist/core/p-711bfeed.entry.js +0 -2
- package/dist/core/p-72a9909c.entry.js +0 -2
- package/dist/core/p-742a9181.entry.js +0 -2
- package/dist/core/p-742a9181.entry.js.map +0 -1
- package/dist/core/p-7cd4f6a6.entry.js +0 -2
- package/dist/core/p-8a4b12e4.entry.js +0 -2
- package/dist/core/p-9323c234.entry.js +0 -2
- package/dist/core/p-948f89a0.entry.js +0 -2
- package/dist/core/p-948f89a0.entry.js.map +0 -1
- package/dist/core/p-97b93ddf.entry.js +0 -2
- package/dist/core/p-97b93ddf.entry.js.map +0 -1
- package/dist/core/p-9c013333.entry.js +0 -2
- package/dist/core/p-9eeb5e85.entry.js +0 -2
- package/dist/core/p-9f36791b.entry.js +0 -2
- package/dist/core/p-a602a8e1.entry.js +0 -2
- package/dist/core/p-a77364f5.entry.js +0 -2
- package/dist/core/p-af9c391d.entry.js +0 -2
- package/dist/core/p-b0d488d0.entry.js +0 -2
- package/dist/core/p-b25d33d8.entry.js +0 -2
- package/dist/core/p-b25d33d8.entry.js.map +0 -1
- package/dist/core/p-b52000d9.entry.js +0 -2
- package/dist/core/p-cbe0d1bb.entry.js +0 -2
- package/dist/core/p-ceea1712.entry.js +0 -2
- package/dist/core/p-ceea1712.entry.js.map +0 -1
- package/dist/core/p-cf631191.entry.js +0 -2
- package/dist/core/p-e652ab09.entry.js +0 -2
- package/dist/core/p-e652ab09.entry.js.map +0 -1
- package/dist/core/p-e876e47c.entry.js +0 -2
- package/dist/core/p-e876e47c.entry.js.map +0 -1
- package/dist/core/p-ea778379.entry.js +0 -2
- package/dist/core/p-ef4b5469.entry.js +0 -2
- package/dist/core/p-f309d3af.entry.js +0 -2
- package/dist/core/p-f6a02202.entry.js +0 -2
- package/dist/core/p-fc3b1155.entry.js +0 -2
- package/dist/esm/helpers-56631aa0.js.map +0 -1
- /package/dist/core/{p-287e5c17.entry.js.map → p-37d217b5.entry.js.map} +0 -0
- /package/dist/core/{p-df88ff5b.entry.js.map → p-37daa8fe.entry.js.map} +0 -0
- /package/dist/core/{p-ffac41d6.entry.js.map → p-492fcb51.entry.js.map} +0 -0
- /package/dist/core/{p-6e8ef73c.entry.js.map → p-57721431.entry.js.map} +0 -0
- /package/dist/core/{p-5fbc8e62.entry.js.map → p-5fcfcfb6.entry.js.map} +0 -0
- /package/dist/core/{p-ea061ccf.entry.js.map → p-9a8bcb78.entry.js.map} +0 -0
- /package/dist/core/{p-8b5022bc.entry.js.map → p-9cf6ccfd.entry.js.map} +0 -0
- /package/dist/core/{p-999f0a5d.entry.js.map → p-b4a2f6fa.entry.js.map} +0 -0
@@ -3,7 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-d337cd8a.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-ffe1c2d9.js');
|
7
|
+
require('./constants-8354f6e6.js');
|
7
8
|
|
8
9
|
const icFooterLinkCss = "/*! 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:2.5rem;--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)}.ic-link-open-in-new-icon{vertical-align:middle;margin-left:var(--ic-space-xxs)}.ic-link>.ic-link-open-in-new-icon{fill:var(--ic-color-hyperlink-default)}.ic-link-open-in-new-icon>svg{width:var(--ic-space-md);height:var(--ic-space-md);fill:currentcolor}.ic-link:visited>.ic-link-open-in-new-icon{fill:var(--ic-color-hyperlink-visited)}.ic-link.light:visited>.ic-link-open-in-new-icon{fill:var(--ic-color-hyperlink-contrast-visited)}:host(.breadcrumb-link) .ic-link{display:var(--breadcrumb-link-display);align-items:var(--breadcrumb-link-align-items);gap:var(--breadcrumb-link-gap)}:host(.breadcrumb-link) .ic-link ::slotted(.back-icon){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.breadcrumb-link.current-page) a,:host(.breadcrumb-link.current-page) ::slotted(a){font-weight:normal;color:inherit;text-decoration:none;display:flex;align-items:center}:host(.breadcrumb-link.current-page) .ic-link,:host(.breadcrumb-link.current-page) ::slotted(a:focus){outline:var(--ic-hc-focus-outline);text-decoration:none}:host(.breadcrumb-link.current-page) .ic-link:visited{color:var(--ic-color-text-primary)}:host(.footer-link-light) ::part(link),:host(.footer-link-dark) ::part(link){color:var(--ic-footer-link)}:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:var(--ic-footer-logo)}:host(.footer-logo-link){transition:var(--ic-easing-transition-fast)}:host(.footer-logo-link:hover){background-color:var(--ic-footer-hover)}:host(.footer-logo-link:active){background-color:var(--ic-footer-pressed)}:host(.footer-logo-link:focus){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline)}@media (forced-colors: active){:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:currentcolor}}";
|
9
10
|
const IcFooterLinkStyle0 = icFooterLinkCss;
|
@@ -48,12 +49,12 @@ const FooterLink = class {
|
|
48
49
|
const { footerConfig, href, hreflang, referrerpolicy, rel, target, download, } = this;
|
49
50
|
const { small, grouped } = footerConfig;
|
50
51
|
const isLogoLink = !!this.el.closest("div[slot='logo']");
|
51
|
-
return (index.h(index.Host, { key: '
|
52
|
+
return (index.h(index.Host, { key: 'da89e5595b7e1b6308d72243462bd0a2f989b501', class: {
|
52
53
|
"footer-link": true,
|
53
54
|
[`footer-link-${grouped ? "grouped" : "ungrouped"}-${small ? "small" : "sparse"}`]: true,
|
54
55
|
[`footer-link-${this.foregroundColor}`]: true,
|
55
56
|
"footer-logo-link": isLogoLink,
|
56
|
-
}, role: "listitem" }, index.h("ic-link", { key: '
|
57
|
+
}, role: "listitem" }, index.h("ic-link", { key: '70cc7b6f5a7710921915f0697a2cf5b55e872d3d', class: "footer-link", href: href, hreflang: hreflang, referrerpolicy: referrerpolicy, rel: rel, download: download !== false ? download : undefined, target: target }, index.h("slot", { key: 'd21bfcaf85a37aebd6138770d80c54e779df714c' }))));
|
57
58
|
}
|
58
59
|
static get delegatesFocus() { return true; }
|
59
60
|
get el() { return index.getElement(this); }
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-footer-link.entry.cjs.js","mappings":"
|
1
|
+
{"file":"ic-footer-link.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,61JAA61J,CAAC;AACt3J,2BAAe,eAAe;;MCuBjB,UAAU;IAPvB;;QAUW,eAAU,GAAWA,oBAAY,CAAC,EAAE,CAAC;QACrC,iBAAY,GAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC9D,oBAAe,GAAsBC,oCAA4B,EAAE,CAAC;;;;QAKrE,aAAQ,GAAsB,KAAK,CAAC;KAgG7C;IArEC,iBAAiB;QACf,IAAI,CAAC,YAAY,GAAG,I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AG,IAAI;gBACT,CAAC,eAAe,IAAI,CAAC,eAAe,EAAE,GAAG,IAAI;gBAC7C,kBAAkB,EAAE,UAAU;aAC/B,EACD,IAAI,EAAC,UAAU,IAEfD,sEACE,KAAK,EAAC,aAAa,EACnB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,KAAK,KAAK,GAAG,QAAQ,GAAG,SAAS,EACnD,MAAM,EAAE,MAAM,IAEdA,oEAAQ,CACA,CACL,EACP;KACH;;;;;;;;","names":["DEVICE_SIZES","getBrandForegroundAppearance","h","Host"],"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"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.footer-link-ungrouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 2.5rem;\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.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-color-hyperlink-default);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-color-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-color-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-text-primary);\n}\n\n:host(.footer-link-light) ::part(link),\n:host(.footer-link-dark) ::part(link) {\n color: var(--ic-footer-link);\n}\n\n:host(.footer-link-light) ::slotted(svg),\n:host(.footer-link-dark) ::slotted(svg) {\n fill: var(--ic-footer-logo);\n}\n\n:host(.footer-logo-link) {\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.footer-logo-link:hover) {\n background-color: var(--ic-footer-hover);\n}\n\n:host(.footer-logo-link:active) {\n background-color: var(--ic-footer-pressed);\n}\n\n:host(.footer-logo-link:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\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 {\n DEVICE_SIZES,\n getBrandForegroundAppearance,\n} from \"../../utils/helpers\";\nimport { IcBrand, IcBrandForeground } 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: {\n delegatesFocus: true,\n },\n})\nexport class FooterLink {\n @Element() el: HTMLIcFooterLinkElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() footerConfig: FooterConfig = { small: false, grouped: false };\n @State() foregroundColor: IcBrandForeground = getBrandForegroundAppearance();\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n componentWillLoad(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n @Listen(\"footerResized\", { target: \"document\" })\n footerResizeHandler(): void {\n this.footerConfig = this.inferConfig(this.el);\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n footerBrandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.foregroundColor = ev.detail.mode;\n }\n\n private inferConfig(e: HTMLElement): FooterConfig {\n if (e.parentElement !== null) {\n if (e.parentElement.classList.contains(\"ic-footer\")) {\n return {\n small: e.parentElement.classList.contains(\"ic-footer-small\"),\n grouped: e.parentElement.classList.contains(\"ic-footer-grouped\"),\n };\n } else {\n return this.inferConfig(e.parentElement);\n }\n } else {\n return { small: false, grouped: false };\n }\n }\n\n render() {\n const {\n footerConfig,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n download,\n } = this;\n const { small, grouped } = footerConfig;\n\n const isLogoLink = !!this.el.closest(\"div[slot='logo']\");\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 \"footer-logo-link\": isLogoLink,\n }}\n role=\"listitem\"\n >\n <ic-link\n class=\"footer-link\"\n href={href}\n hreflang={hreflang}\n referrerpolicy={referrerpolicy}\n rel={rel}\n download={download !== false ? download : undefined}\n target={target}\n >\n <slot />\n </ic-link>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -3,7 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-d337cd8a.js');
|
6
|
-
const
|
6
|
+
const constants = require('./constants-8354f6e6.js');
|
7
|
+
const helpers = require('./helpers-ffe1c2d9.js');
|
7
8
|
|
8
9
|
const icFooterCss = "/*! 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;--footer-compliance-padding:1rem 0}:host(.ic-footer-sparse){--footer-links-padding:1.5rem 0;--footer-logo-margin-bottom:calc(var(--ic-space-md) + var(--ic-space-xxs));--footer-link-inner-flex-direction:row}:host(.ic-footer-small){--footer-links-padding:0 0;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.ic-footer-foreground-dark){--ic-footer-background:var(--ic-brand-color-secondary-light);--ic-footer-bottom-background:var(--ic-brand-color-tertiary-light);--ic-footer-keyline:var(--ic-state-layer-darken-20);--ic-footer-text:var(--ic-color-text-primary-light);--ic-footer-link:var(--ic-color-text-primary-light);--ic-footer-icon:var(--ic-color-icon-neutral);--ic-footer-chevron-icon:var(--ic-color-icon-neutral);--ic-footer-logo:var(--ic-color-icon-neutral);--ic-footer-hover:var(--ic-architectural-700-state-layer-10);--ic-footer-pressed:var(--ic-architectural-700-state-layer-20)}:host(.ic-footer-small.ic-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(--ic-footer-background);color:var(--ic-footer-text);--ic-typography-color:var(--ic-footer-text);border-bottom:var(--ic-space-1px) solid var(--ic-footer-keyline)}.footer-description-inner{padding:1rem 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--ic-footer-background);color:var(--ic-footer-link);--ic-typography-color:var(--ic-footer-link)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--ic-footer-bottom-background);color:var(--ic-footer-text);--ic-typography-color:var(--ic-footer-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-border-hc)}}";
|
9
10
|
const IcFooterStyle0 = icFooterCss;
|
@@ -14,7 +15,7 @@ const Footer = class {
|
|
14
15
|
this.footerResized = index.createEvent(this, "footerResized", 7);
|
15
16
|
this.resizeObserver = null;
|
16
17
|
this.hostMutationObserver = null;
|
17
|
-
this.deviceSize =
|
18
|
+
this.deviceSize = constants.IC_DEVICE_SIZES.XL;
|
18
19
|
this.foregroundColor = helpers.getBrandForegroundAppearance();
|
19
20
|
/**
|
20
21
|
* The alignment of the section containers used within the footer.
|
@@ -73,15 +74,15 @@ const Footer = class {
|
|
73
74
|
isSmall() {
|
74
75
|
const bp = this.breakpoint;
|
75
76
|
return bp === "extra small"
|
76
|
-
? this.deviceSize <
|
77
|
+
? this.deviceSize < constants.IC_DEVICE_SIZES.XS
|
77
78
|
: bp === "small"
|
78
|
-
? this.deviceSize <
|
79
|
+
? this.deviceSize < constants.IC_DEVICE_SIZES.S
|
79
80
|
: bp === "medium"
|
80
|
-
? this.deviceSize <
|
81
|
+
? this.deviceSize < constants.IC_DEVICE_SIZES.M
|
81
82
|
: bp === "large"
|
82
|
-
? this.deviceSize <
|
83
|
+
? this.deviceSize < constants.IC_DEVICE_SIZES.L
|
83
84
|
: bp === "extra large"
|
84
|
-
? this.deviceSize <
|
85
|
+
? this.deviceSize < constants.IC_DEVICE_SIZES.XL
|
85
86
|
: false;
|
86
87
|
}
|
87
88
|
render() {
|
@@ -99,10 +100,10 @@ const Footer = class {
|
|
99
100
|
// Slots will be able to infer their own color
|
100
101
|
[`ic-footer-${helpers.IcBrandForegroundEnum.Dark}`]: foregroundColor === helpers.IcBrandForegroundEnum.Dark,
|
101
102
|
[`ic-footer-${helpers.IcBrandForegroundEnum.Light}`]: foregroundColor === helpers.IcBrandForegroundEnum.Light,
|
102
|
-
} }, index.h("footer", { key: 'cfae5dcdd5a431bba915b83e5ef2ae2347d5bb6d', ref: (el) => (this.footerEl = el) }, (helpers.isSlotUsed(el, "description") || description) && (index.h("div", { key: '9f960b8fcae0e3281b177bcfe1adf365657406dc', class: "footer-description" }, index.h("ic-section-container", { key: '49455d77e8d5e9e8a1199dc0dcc00226291e9adc', aligned: aligned, fullHeight: true }, index.h("div", { key: 'dab1fa34ca43acd9ff4c354f324c7c426d53c77b', class: "footer-description-inner" }, index.h("ic-typography", { key: '484158672386c4fed447390ab0d92bfd759a9272', variant: "body" }, index.h("slot", { key: '4a500553fd0f76a8d4f7ef8410dbd927896561b1', name: "description" }, description)))))), helpers.isSlotUsed(el, "link") && (index.h("div", { key: 'ed8613714e2bf4d79cd062f55f2b716d3e0cd304', class: "footer-links" }, groupLinks && small ? (index.h("div", { class: "footer-links-inner", role: "list" }, index.h("slot", { name: "link" }))) : (index.h("ic-section-container", { fullHeight: true, aligned: aligned }, index.h("div", { class: "footer-links-inner", role: "list" }, index.h("slot", { name: "link" })))))), showComplianceSection && (index.h("div", { key: 'c3876f5fa89d39f28e64db1bc0fca90978102a01', class: "footer-compliance" }, index.h("ic-section-container", { key: '3e169ea49bcd2698b84c58f8105b0915777d8bf3', aligned: aligned, fullHeight: true }, index.h("div", { key: '9cfaa13eb736d3aa44b15db43221bf28bf4deb57', class: "footer-compliance-inner" }, helpers.isSlotUsed(el, "logo") && (index.h("div", { key: '853fdedd70405ebb2e96cec2adc6407e5ed11538', class: "footer-logo" }, index.h("slot", { key: '4eaaad7a4f17cd51cbdab414cdbadf3096891d38', name: "logo" }))), (helpers.isSlotUsed(el, "caption") || caption) && (index.h("div", { key: '44a611218c4ea0f494df1551ecb26a8687d57a95', class: "footer-caption" }, index.h("ic-typography", { key: 'b970144c7d85b7e05e319233be68cc91ef2d0476', variant: deviceSize <=
|
103
|
+
} }, index.h("footer", { key: 'cfae5dcdd5a431bba915b83e5ef2ae2347d5bb6d', ref: (el) => (this.footerEl = el) }, (helpers.isSlotUsed(el, "description") || description) && (index.h("div", { key: '9f960b8fcae0e3281b177bcfe1adf365657406dc', class: "footer-description" }, index.h("ic-section-container", { key: '49455d77e8d5e9e8a1199dc0dcc00226291e9adc', aligned: aligned, fullHeight: true }, index.h("div", { key: 'dab1fa34ca43acd9ff4c354f324c7c426d53c77b', class: "footer-description-inner" }, index.h("ic-typography", { key: '484158672386c4fed447390ab0d92bfd759a9272', variant: "body" }, index.h("slot", { key: '4a500553fd0f76a8d4f7ef8410dbd927896561b1', name: "description" }, description)))))), helpers.isSlotUsed(el, "link") && (index.h("div", { key: 'ed8613714e2bf4d79cd062f55f2b716d3e0cd304', class: "footer-links" }, groupLinks && small ? (index.h("div", { class: "footer-links-inner", role: "list" }, index.h("slot", { name: "link" }))) : (index.h("ic-section-container", { fullHeight: true, aligned: aligned }, index.h("div", { class: "footer-links-inner", role: "list" }, index.h("slot", { name: "link" })))))), showComplianceSection && (index.h("div", { key: 'c3876f5fa89d39f28e64db1bc0fca90978102a01', class: "footer-compliance" }, index.h("ic-section-container", { key: '3e169ea49bcd2698b84c58f8105b0915777d8bf3', aligned: aligned, fullHeight: true }, index.h("div", { key: '9cfaa13eb736d3aa44b15db43221bf28bf4deb57', class: "footer-compliance-inner" }, helpers.isSlotUsed(el, "logo") && (index.h("div", { key: '853fdedd70405ebb2e96cec2adc6407e5ed11538', class: "footer-logo" }, index.h("slot", { key: '4eaaad7a4f17cd51cbdab414cdbadf3096891d38', name: "logo" }))), (helpers.isSlotUsed(el, "caption") || caption) && (index.h("div", { key: '44a611218c4ea0f494df1551ecb26a8687d57a95', class: "footer-caption" }, index.h("ic-typography", { key: 'b970144c7d85b7e05e319233be68cc91ef2d0476', variant: deviceSize <= constants.IC_DEVICE_SIZES.M ? "caption" : "body" }, index.h("slot", { key: '512d173a680ddd65b3583bada7530aa67d3f1f98', name: "caption" }, caption)))), copyright && (index.h("div", { key: '604ac3c72ae99883f27fdb609202782f6069bfde', class: {
|
103
104
|
["footer-copyright"]: true,
|
104
105
|
["classification-spacing"]: helpers.hasClassificationBanner(),
|
105
|
-
} }, index.h("ic-typography", { key: '144bbc0144a865f8a55a1df5606cea9dfa87b5e8', variant: deviceSize <=
|
106
|
+
} }, index.h("ic-typography", { key: '144bbc0144a865f8a55a1df5606cea9dfa87b5e8', variant: deviceSize <= constants.IC_DEVICE_SIZES.M
|
106
107
|
? "caption-uppercase"
|
107
108
|
: "label-uppercase" }, "\u00A9 Crown Copyright"))))))))));
|
108
109
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-footer.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,y9IAAy9I,CAAC;AAC9+I,uBAAe,WAAW;;MCuCb,MAAM;IALnB;;;QAOU,mBAAc,GAA0B,IAAI,CAAC;QAC7C,yBAAoB,GAA4B,IAAI,CAAC;QAIpD,eAAU,GAAWA,uBAAe,CAAC,EAAE,CAAC;QACxC,oBAAe,GAAsBC,oCAA4B,EAAE,CAAC;;;;QAKrE,YAAO,GAAiB,MAAM,CAAC;;;;QAK/B,eAAU,GAAyB,QA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AIN,uBAAe,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM,IAGtDM,mEAAM,IAAI,EAAC,SAAS,IAAE,OAAO,CAAQ,CACvB,CACZ,CACP,EACA,SAAS,KACRA,kEACE,KAAK,EAAE;gBACL,CAAC,kBAAkB,GAAG,IAAI;gBAC1B,CAAC,wBAAwB,GAAGG,+BAAuB,EAAE;aACtD,IAEDH,4EACE,OAAO,EACL,UAAU,IAAIN,uBAAe,CAAC,CAAC;kBAC3B,mBAAmB;kBACnB,iBAAiB,6BAIT,CACZ,CACP,CACG,CACe,CACnB,CACP,CACM,CACJ,EACP;KACH;;;;;;;","names":["IC_DEVICE_SIZES","getBrandForegroundAppearance","getCurrentDeviceSize","checkResizeObserver","renderDynamicChildSlots","isSlotUsed","h","Host","IcBrandForegroundEnum","hasClassificationBanner"],"sources":["src/components/ic-footer/ic-footer.css?tag=ic-footer&encapsulation=shadow","src/components/ic-footer/ic-footer.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n\n --footer-compliance-padding: 1rem 0;\n}\n\n:host(.ic-footer-sparse) {\n --footer-links-padding: 1.5rem 0;\n --footer-logo-margin-bottom: calc(var(--ic-space-md) + var(--ic-space-xxs));\n --footer-link-inner-flex-direction: row;\n}\n\n:host(.ic-footer-small) {\n --footer-links-padding: 0 0;\n --footer-logo-margin-bottom: var(--ic-space-md);\n --footer-link-inner-flex-direction: column;\n}\n\n:host(.ic-footer-foreground-dark) {\n --ic-footer-background: var(--ic-brand-color-secondary-light);\n --ic-footer-bottom-background: var(--ic-brand-color-tertiary-light);\n --ic-footer-keyline: var(--ic-state-layer-darken-20);\n --ic-footer-text: var(--ic-color-text-primary-light);\n --ic-footer-link: var(--ic-color-text-primary-light);\n --ic-footer-icon: var(--ic-color-icon-neutral);\n --ic-footer-chevron-icon: var(--ic-color-icon-neutral);\n --ic-footer-logo: var(--ic-color-icon-neutral);\n --ic-footer-hover: var(--ic-architectural-700-state-layer-10);\n --ic-footer-pressed: var(--ic-architectural-700-state-layer-20);\n}\n\n:host(.ic-footer-small.ic-footer-ungrouped) {\n --footer-links-padding: var(--ic-space-md) 0 0 0;\n}\n\n/* Main inner footer element */\nfooter {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n/* Description */\n\n.footer-description {\n background-color: var(--ic-footer-background);\n color: var(--ic-footer-text);\n\n --ic-typography-color: var(--ic-footer-text);\n\n border-bottom: var(--ic-space-1px) solid var(--ic-footer-keyline);\n}\n\n.footer-description-inner {\n padding: 1rem 0;\n}\n\n/* Links */\n\n.footer-links {\n padding: var(--footer-links-padding);\n background-color: var(--ic-footer-background);\n color: var(--ic-footer-link);\n\n --ic-typography-color: var(--ic-footer-link);\n}\n\n.footer-links-inner {\n display: flex;\n flex-direction: var(--footer-link-inner-flex-direction);\n}\n\n/* Compliance */\n\n.footer-compliance {\n background-color: var(--ic-footer-bottom-background);\n color: var(--ic-footer-text);\n\n --ic-typography-color: var(--ic-footer-text);\n}\n\n.footer-compliance-inner {\n padding: var(--footer-compliance-padding);\n}\n\n.footer-logo {\n margin-bottom: var(--footer-logo-margin-bottom);\n display: flex;\n gap: var(--ic-space-xxl);\n}\n\n.footer-logo > ::slotted() {\n margin-right: var(--ic-space-md);\n}\n\n.footer-caption {\n margin-bottom: var(--ic-space-md);\n}\n\n.classification-spacing {\n margin-bottom: var(--ic-space-lg);\n}\n\n@media (forced-colors: active) {\n footer {\n border-top: var(--ic-border-hc);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from \"@stencil/core\";\nimport { IC_DEVICE_SIZES } from \"../../utils/constants\";\nimport {\n getCurrentDeviceSize,\n getBrandForegroundAppearance,\n checkResizeObserver,\n hasClassificationBanner,\n isSlotUsed,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcAlignment,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"../../utils/types\";\nimport { IcFooterBreakpoints } from \"./ic-footer.types\";\n\n/**\n * @slot description - Content will be rendered at the top of the footer.\n * @slot link - Content will be rendered between description and logos.\n * @slot logo - Content will be rendered underneath footer links.\n * @slot caption - Content will be rendered above Crown Copyright.\n */\n\n@Component({\n tag: \"ic-footer\",\n styleUrl: \"ic-footer.css\",\n shadow: true,\n})\nexport class Footer {\n private footerEl?: HTMLElement;\n private resizeObserver: ResizeObserver | null = null;\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcFooterElement;\n\n @State() deviceSize: number = IC_DEVICE_SIZES.XL;\n @State() foregroundColor: IcBrandForeground = getBrandForegroundAppearance();\n\n /**\n * The alignment of the section containers used within the footer.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * The screen size breakpoint at which to switch to the small layout.\n */\n @Prop() breakpoint?: IcFooterBreakpoints = \"medium\";\n\n /**\n * The caption displayed at the bottom of the footer.\n */\n @Prop() caption?: string;\n\n /**\n * If `true`, the footer will display the crown copyright at the bottom.\n */\n @Prop() copyright?: boolean = true;\n\n /**\n * The description displayed at the top of the footer.\n */\n @Prop() description?: string;\n\n /**\n * If `true`, the footer will be set up to handle link groups instead of standalone links.\n */\n @Prop() groupLinks?: boolean = false;\n\n /**\n * @internal Triggers on page resize and triggers style changes in footer links and link groups\n */\n @Event() footerResized: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n\n this.hostMutationObserver = new MutationObserver((mutationList) => {\n return renderDynamicChildSlots(mutationList, \"link\", this);\n });\n\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.foregroundColor = ev.detail.mode;\n }\n\n private isSmall() {\n const bp = this.breakpoint;\n\n return bp === \"extra small\"\n ? this.deviceSize < IC_DEVICE_SIZES.XS\n : bp === \"small\"\n ? this.deviceSize < IC_DEVICE_SIZES.S\n : bp === \"medium\"\n ? this.deviceSize < IC_DEVICE_SIZES.M\n : bp === \"large\"\n ? this.deviceSize < IC_DEVICE_SIZES.L\n : bp === \"extra large\"\n ? this.deviceSize < IC_DEVICE_SIZES.XL\n : false;\n }\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n this.footerResized.emit();\n };\n\n private runResizeObserver = () => {\n if (this.footerEl) {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.footerEl);\n }\n };\n\n render() {\n const {\n aligned,\n caption,\n copyright,\n description,\n deviceSize,\n el,\n foregroundColor,\n groupLinks,\n } = this;\n const small = this.isSmall();\n\n const showComplianceSection =\n isSlotUsed(el, \"logo\") ||\n isSlotUsed(el, \"caption\") ||\n caption ||\n copyright;\n\n return (\n <Host\n class={{\n [\"ic-footer\"]: true,\n [`ic-footer-${small ? \"small\" : \"sparse\"}`]: true,\n [`ic-footer-${groupLinks ? \"grouped\" : \"ungrouped\"}`]: true,\n [`ic-footer-foreground-${foregroundColor}`]: true,\n // Slots will be able to infer their own color\n [`ic-footer-${IcBrandForegroundEnum.Dark}`]:\n foregroundColor === IcBrandForegroundEnum.Dark,\n [`ic-footer-${IcBrandForegroundEnum.Light}`]:\n foregroundColor === IcBrandForegroundEnum.Light,\n }}\n >\n <footer ref={(el) => (this.footerEl = el)}>\n {/* Description */}\n {(isSlotUsed(el, \"description\") || description) && (\n <div class=\"footer-description\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-description-inner\">\n <ic-typography variant=\"body\">\n <slot name=\"description\">{description}</slot>\n </ic-typography>\n </div>\n </ic-section-container>\n </div>\n )}\n\n {/* Links */}\n {isSlotUsed(el, \"link\") && (\n <div class=\"footer-links\">\n {groupLinks && small ? (\n <div class=\"footer-links-inner\" role=\"list\">\n <slot name=\"link\" />\n </div>\n ) : (\n <ic-section-container fullHeight aligned={aligned}>\n <div class=\"footer-links-inner\" role=\"list\">\n <slot name=\"link\" />\n </div>\n </ic-section-container>\n )}\n </div>\n )}\n\n {/* Compliance (logo, caption, copyright) */}\n {showComplianceSection && (\n <div class=\"footer-compliance\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-compliance-inner\">\n {isSlotUsed(el, \"logo\") && (\n <div class=\"footer-logo\">\n <slot name=\"logo\" />\n </div>\n )}\n {(isSlotUsed(el, \"caption\") || caption) && (\n <div class=\"footer-caption\">\n <ic-typography\n variant={\n deviceSize <= IC_DEVICE_SIZES.M ? \"caption\" : \"body\"\n }\n >\n <slot name=\"caption\">{caption}</slot>\n </ic-typography>\n </div>\n )}\n {copyright && (\n <div\n class={{\n [\"footer-copyright\"]: true,\n [\"classification-spacing\"]: hasClassificationBanner(),\n }}\n >\n <ic-typography\n variant={\n deviceSize <= IC_DEVICE_SIZES.M\n ? \"caption-uppercase\"\n : \"label-uppercase\"\n }\n >\n © Crown Copyright\n </ic-typography>\n </div>\n )}\n </div>\n </ic-section-container>\n </div>\n )}\n </footer>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-footer.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,y9IAAy9I,CAAC;AAC9+I,uBAAe,WAAW;;MCuCb,MAAM;IALnB;;;QAOU,mBAAc,GAA0B,IAAI,CAAC;QAC7C,yBAAoB,GAA4B,IAAI,CAAC;QAIpD,eAAU,GAAWA,yBAAe,CAAC,EAAE,CAAC;QACxC,oBAAe,GAAsBC,oCAA4B,EAAE,CAAC;;;;QAKrE,YAAO,GAAiB,MAAM,CAAC;;;;QAK/B,eAAU,GAAyB,QAAQ,CAAC;;;;QAU5C,cAAS,GAAa,IAAI,CAA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AAM,IAGtDM,mEAAM,IAAI,EAAC,SAAS,IAAE,OAAO,CAAQ,CACvB,CACZ,CACP,EACA,SAAS,KACRA,kEACE,KAAK,EAAE;gBACL,CAAC,kBAAkB,GAAG,IAAI;gBAC1B,CAAC,wBAAwB,GAAGG,+BAAuB,EAAE;aACtD,IAEDH,4EACE,OAAO,EACL,UAAU,IAAIN,yBAAe,CAAC,CAAC;kBAC3B,mBAAmB;kBACnB,iBAAiB,6BAIT,CACZ,CACP,CACG,CACe,CACnB,CACP,CACM,CACJ,EACP;KACH;;;;;;;","names":["IC_DEVICE_SIZES","getBrandForegroundAppearance","getCurrentDeviceSize","checkResizeObserver","renderDynamicChildSlots","isSlotUsed","h","Host","IcBrandForegroundEnum","hasClassificationBanner"],"sources":["src/components/ic-footer/ic-footer.css?tag=ic-footer&encapsulation=shadow","src/components/ic-footer/ic-footer.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n\n --footer-compliance-padding: 1rem 0;\n}\n\n:host(.ic-footer-sparse) {\n --footer-links-padding: 1.5rem 0;\n --footer-logo-margin-bottom: calc(var(--ic-space-md) + var(--ic-space-xxs));\n --footer-link-inner-flex-direction: row;\n}\n\n:host(.ic-footer-small) {\n --footer-links-padding: 0 0;\n --footer-logo-margin-bottom: var(--ic-space-md);\n --footer-link-inner-flex-direction: column;\n}\n\n:host(.ic-footer-foreground-dark) {\n --ic-footer-background: var(--ic-brand-color-secondary-light);\n --ic-footer-bottom-background: var(--ic-brand-color-tertiary-light);\n --ic-footer-keyline: var(--ic-state-layer-darken-20);\n --ic-footer-text: var(--ic-color-text-primary-light);\n --ic-footer-link: var(--ic-color-text-primary-light);\n --ic-footer-icon: var(--ic-color-icon-neutral);\n --ic-footer-chevron-icon: var(--ic-color-icon-neutral);\n --ic-footer-logo: var(--ic-color-icon-neutral);\n --ic-footer-hover: var(--ic-architectural-700-state-layer-10);\n --ic-footer-pressed: var(--ic-architectural-700-state-layer-20);\n}\n\n:host(.ic-footer-small.ic-footer-ungrouped) {\n --footer-links-padding: var(--ic-space-md) 0 0 0;\n}\n\n/* Main inner footer element */\nfooter {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n/* Description */\n\n.footer-description {\n background-color: var(--ic-footer-background);\n color: var(--ic-footer-text);\n\n --ic-typography-color: var(--ic-footer-text);\n\n border-bottom: var(--ic-space-1px) solid var(--ic-footer-keyline);\n}\n\n.footer-description-inner {\n padding: 1rem 0;\n}\n\n/* Links */\n\n.footer-links {\n padding: var(--footer-links-padding);\n background-color: var(--ic-footer-background);\n color: var(--ic-footer-link);\n\n --ic-typography-color: var(--ic-footer-link);\n}\n\n.footer-links-inner {\n display: flex;\n flex-direction: var(--footer-link-inner-flex-direction);\n}\n\n/* Compliance */\n\n.footer-compliance {\n background-color: var(--ic-footer-bottom-background);\n color: var(--ic-footer-text);\n\n --ic-typography-color: var(--ic-footer-text);\n}\n\n.footer-compliance-inner {\n padding: var(--footer-compliance-padding);\n}\n\n.footer-logo {\n margin-bottom: var(--footer-logo-margin-bottom);\n display: flex;\n gap: var(--ic-space-xxl);\n}\n\n.footer-logo > ::slotted() {\n margin-right: var(--ic-space-md);\n}\n\n.footer-caption {\n margin-bottom: var(--ic-space-md);\n}\n\n.classification-spacing {\n margin-bottom: var(--ic-space-lg);\n}\n\n@media (forced-colors: active) {\n footer {\n border-top: var(--ic-border-hc);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from \"@stencil/core\";\nimport { IC_DEVICE_SIZES } from \"../../utils/constants\";\nimport {\n getCurrentDeviceSize,\n getBrandForegroundAppearance,\n checkResizeObserver,\n hasClassificationBanner,\n isSlotUsed,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport {\n IcAlignment,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"../../utils/types\";\nimport { IcFooterBreakpoints } from \"./ic-footer.types\";\n\n/**\n * @slot description - Content will be rendered at the top of the footer.\n * @slot link - Content will be rendered between description and logos.\n * @slot logo - Content will be rendered underneath footer links.\n * @slot caption - Content will be rendered above Crown Copyright.\n */\n\n@Component({\n tag: \"ic-footer\",\n styleUrl: \"ic-footer.css\",\n shadow: true,\n})\nexport class Footer {\n private footerEl?: HTMLElement;\n private resizeObserver: ResizeObserver | null = null;\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcFooterElement;\n\n @State() deviceSize: number = IC_DEVICE_SIZES.XL;\n @State() foregroundColor: IcBrandForeground = getBrandForegroundAppearance();\n\n /**\n * The alignment of the section containers used within the footer.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * The screen size breakpoint at which to switch to the small layout.\n */\n @Prop() breakpoint?: IcFooterBreakpoints = \"medium\";\n\n /**\n * The caption displayed at the bottom of the footer.\n */\n @Prop() caption?: string;\n\n /**\n * If `true`, the footer will display the crown copyright at the bottom.\n */\n @Prop() copyright?: boolean = true;\n\n /**\n * The description displayed at the top of the footer.\n */\n @Prop() description?: string;\n\n /**\n * If `true`, the footer will be set up to handle link groups instead of standalone links.\n */\n @Prop() groupLinks?: boolean = false;\n\n /**\n * @internal Triggers on page resize and triggers style changes in footer links and link groups\n */\n @Event() footerResized: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n\n this.hostMutationObserver = new MutationObserver((mutationList) => {\n return renderDynamicChildSlots(mutationList, \"link\", this);\n });\n\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.foregroundColor = ev.detail.mode;\n }\n\n private isSmall() {\n const bp = this.breakpoint;\n\n return bp === \"extra small\"\n ? this.deviceSize < IC_DEVICE_SIZES.XS\n : bp === \"small\"\n ? this.deviceSize < IC_DEVICE_SIZES.S\n : bp === \"medium\"\n ? this.deviceSize < IC_DEVICE_SIZES.M\n : bp === \"large\"\n ? this.deviceSize < IC_DEVICE_SIZES.L\n : bp === \"extra large\"\n ? this.deviceSize < IC_DEVICE_SIZES.XL\n : false;\n }\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n this.footerResized.emit();\n };\n\n private runResizeObserver = () => {\n if (this.footerEl) {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.footerEl);\n }\n };\n\n render() {\n const {\n aligned,\n caption,\n copyright,\n description,\n deviceSize,\n el,\n foregroundColor,\n groupLinks,\n } = this;\n const small = this.isSmall();\n\n const showComplianceSection =\n isSlotUsed(el, \"logo\") ||\n isSlotUsed(el, \"caption\") ||\n caption ||\n copyright;\n\n return (\n <Host\n class={{\n [\"ic-footer\"]: true,\n [`ic-footer-${small ? \"small\" : \"sparse\"}`]: true,\n [`ic-footer-${groupLinks ? \"grouped\" : \"ungrouped\"}`]: true,\n [`ic-footer-foreground-${foregroundColor}`]: true,\n // Slots will be able to infer their own color\n [`ic-footer-${IcBrandForegroundEnum.Dark}`]:\n foregroundColor === IcBrandForegroundEnum.Dark,\n [`ic-footer-${IcBrandForegroundEnum.Light}`]:\n foregroundColor === IcBrandForegroundEnum.Light,\n }}\n >\n <footer ref={(el) => (this.footerEl = el)}>\n {/* Description */}\n {(isSlotUsed(el, \"description\") || description) && (\n <div class=\"footer-description\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-description-inner\">\n <ic-typography variant=\"body\">\n <slot name=\"description\">{description}</slot>\n </ic-typography>\n </div>\n </ic-section-container>\n </div>\n )}\n\n {/* Links */}\n {isSlotUsed(el, \"link\") && (\n <div class=\"footer-links\">\n {groupLinks && small ? (\n <div class=\"footer-links-inner\" role=\"list\">\n <slot name=\"link\" />\n </div>\n ) : (\n <ic-section-container fullHeight aligned={aligned}>\n <div class=\"footer-links-inner\" role=\"list\">\n <slot name=\"link\" />\n </div>\n </ic-section-container>\n )}\n </div>\n )}\n\n {/* Compliance (logo, caption, copyright) */}\n {showComplianceSection && (\n <div class=\"footer-compliance\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-compliance-inner\">\n {isSlotUsed(el, \"logo\") && (\n <div class=\"footer-logo\">\n <slot name=\"logo\" />\n </div>\n )}\n {(isSlotUsed(el, \"caption\") || caption) && (\n <div class=\"footer-caption\">\n <ic-typography\n variant={\n deviceSize <= IC_DEVICE_SIZES.M ? \"caption\" : \"body\"\n }\n >\n <slot name=\"caption\">{caption}</slot>\n </ic-typography>\n </div>\n )}\n {copyright && (\n <div\n class={{\n [\"footer-copyright\"]: true,\n [\"classification-spacing\"]: hasClassificationBanner(),\n }}\n >\n <ic-typography\n variant={\n deviceSize <= IC_DEVICE_SIZES.M\n ? \"caption-uppercase\"\n : \"label-uppercase\"\n }\n >\n © Crown Copyright\n </ic-typography>\n </div>\n )}\n </div>\n </ic-section-container>\n </div>\n )}\n </footer>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -3,7 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-d337cd8a.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-ffe1c2d9.js');
|
7
|
+
require('./constants-8354f6e6.js');
|
7
8
|
|
8
9
|
const icHeroCss = "/*! 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;background-color:var(--ic-hero-background);--hero-heading-bottom-margin:var(--ic-space-md);--hero-keyline:var(--ic-hero-keyline)}:host(.ic-hero-dark){background-color:var(--ic-brand-color-secondary);--ic-hero-heading:var(--ic-color-text-primary-light);--ic-hero-body:var(--ic-color-text-primary-light);--ic-hero-secondary-heading:var(--ic-color-text-primary-light);--hero-keyline:var(--ic-brand-text-color)}.heading{--ic-typography-color:var(--ic-hero-heading)}.subheading{--ic-typography-color:var(--ic-hero-body)}.secondary-container{--ic-typography-color:var(--ic-hero-secondary-heading);display:flex;flex-direction:column;justify-content:center;border-left:var(--ic-space-xxxs) solid var(--hero-keyline)}:host(.has-background-image){background-repeat:no-repeat;background-position:right -6.25rem;background-size:auto calc(100% + 6.25rem);box-shadow:var(--ic-elevation-inset)}@media (prefers-reduced-motion){:host(.has-background-image){background-position:right -6.25rem !important}}ic-typography.heading-bottom-spacing{margin-bottom:var(--hero-heading-bottom-margin)}.section-container{display:flex;align-items:center;height:100%}.left-container{padding:var(--ic-space-xl) 0}.left-container:not(.left-container-full-width){flex-basis:50%}.left-container-full-width{width:100%}.right-container{flex-basis:50%}.interaction-container{display:flex;gap:var(--ic-space-md);margin-top:var(--ic-space-lg);flex-wrap:wrap}.secondary-subheading{margin-top:var(--ic-space-xxs)}:host([content-aligned=\"left\"]) .left-container,:host([content-aligned=\"left\"]) .interaction-container{justify-content:flex-start;text-align:left}:host([content-aligned=\"center\"]) .left-container,:host([content-aligned=\"center\"]) .interaction-container{justify-content:center;text-align:center}@media (min-width: 992px){.left-container-full-width{width:66.6%}}@media (min-width: 1044px){:host,.section-container{min-height:13rem}:host(.ic-hero-small),:host(.ic-hero-small) .section-container{min-height:10.813rem}.left-container:not(.left-container-full-width){flex-basis:66.6%}.left-container{min-height:9rem}.right-container{flex-basis:33.3%;margin-left:3.125rem}.secondary-container{min-height:9rem}.secondary-heading,.secondary-subheading{margin-left:3.938rem}}@media (min-width: 801px) and (max-width: 1043px){:host(.has-background-image){background-image:none !important}:host,.section-container{min-height:16rem}:host(.ic-hero-small),:host(.ic-hero-small) .section-container{min-height:15rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:14rem}.left-container{min-height:10rem}.secondary-container{min-height:10rem}.secondary-heading,.secondary-subheading{margin-left:5.922rem}.right-container{margin-left:3.125rem}}@media (min-width: 641px) and (max-width: 800px){:host(.has-background-image){background-image:none !important}:host(.has-right-content) .section-container{flex-wrap:wrap}:host(.has-right-content) .left-container{flex-basis:100%}:host(.has-right-content) .right-container{flex-basis:100%;margin-bottom:2.5rem}:host,.section-container{min-height:16rem}:host(.ic-hero-small),:host(.ic-hero-small) .section-container{min-height:15rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:14rem}.left-container{min-height:10rem}.secondary-container{min-height:10rem}.secondary-heading,.secondary-subheading{margin-left:2.125rem}}@media (min-width: 481px) and (max-width: 640px){:host(.has-background-image){background-image:none !important}:host,.section-container{min-height:13rem}:host(.ic-hero-small),:host(.ic-hero-small) .section-container{min-height:10.813rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:17.5rem}:host(.secondary-heading) .section-container,:host(.ic-hero-small) .section-container,.section-container{flex-direction:column;align-items:flex-start}.left-container{height:-moz-fit-content;height:fit-content}.secondary-container{height:-moz-fit-content;height:fit-content;border:none}.right-container{margin-bottom:2.5rem}}@media (max-width: 480px){:host(.has-background-image){background-image:none !important}:host,.section-container{min-height:12rem}:host,.right-container{margin-bottom:var(--ic-space-md)}:host(.ic-hero-small),:host(.ic-hero-small) .section-container{min-height:10.813rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:16.5rem}:host(.secondary-heading) .section-container,:host(.ic-hero-small) .section-container,.section-container{flex-direction:column;align-items:flex-start}.left-container{height:-moz-fit-content;height:fit-content}.secondary-container{height:-moz-fit-content;height:fit-content;border:none}}";
|
9
10
|
const IcHeroStyle0 = icHeroCss;
|
@@ -76,18 +77,18 @@ const Hero = class {
|
|
76
77
|
"background-position": scrollFactor,
|
77
78
|
};
|
78
79
|
}
|
79
|
-
return (index.h(index.Host, { key: '
|
80
|
+
return (index.h(index.Host, { key: 'aee3d892e9e8aeda5b348da837eee5c8c1e8735a', class: {
|
80
81
|
[`ic-hero-${helpers.IcBrandForegroundEnum.Dark}`]: foregroundColor === helpers.IcBrandForegroundEnum.Dark,
|
81
82
|
["has-background-image"]: backgroundImage !== undefined,
|
82
83
|
["has-right-content"]: this.rightContent,
|
83
84
|
["ic-hero-small"]: size === "small",
|
84
85
|
["secondary-heading"]: !!secondaryHeading,
|
85
|
-
}, style: style }, index.h("ic-section-container", { key: '
|
86
|
+
}, style: style }, index.h("ic-section-container", { key: '6f588f23372a118fbf316d0c5202d17af21f4e43', aligned: aligned, fullHeight: true, class: "section-container" }, index.h("div", { key: '1c34b2d8b07a045c1c801d99b4e1d707e1a99e88', class: {
|
86
87
|
["left-container"]: true,
|
87
88
|
["left-container-full-width"]: this.leftContentFullWidth,
|
88
|
-
} }, index.h("div", { key: '
|
89
|
+
} }, index.h("div", { key: '72acdd6b683c699d5e799aa83546bde5b52962db', class: "heading" }, index.h("slot", { key: '5915be3f3cd2a5329ba8beb46bc0b704693a7fec', name: "heading" }, index.h("ic-typography", { key: 'f9b16a498674c7a29e669be2b63ae3d730cbacba', variant: size === "small" ? "h2" : "h1", class: {
|
89
90
|
["heading-bottom-spacing"]: size !== "small",
|
90
|
-
} }, index.h("h2", { key: '
|
91
|
+
} }, index.h("h2", { key: '3ed6060a057a88fd332f8ef6b1d914702e6d3f40' }, heading)))), index.h("div", { key: 'a2ed35fcf9ff99f56cf80264a6374c2dc3cbfcbe', class: "subheading" }, index.h("slot", { key: '58027e2b2eeb3c49bd5322019435cb9de18cb77c', name: "subheading" }, index.h("ic-typography", { key: 'b04e16640e640e623142b2f5555e9a644c1a3929', variant: "body" }, subheading))), index.h("div", { key: '6d87fcd8ffd64077e483471c7d28ab41c7004b98', class: "interaction-container" }, index.h("slot", { key: 'e2421373570e5cf84e093971d70a75c542a0a0ba', name: "interaction" }))), (helpers.isPropDefined(secondaryHeading) || this.rightContent) && (index.h("div", { key: 'ef2bdb160da3c3558f4764b85cebb01ebdfc086f', class: "right-container" }, index.h("slot", { key: 'dc5991ad4cbc856390335cece65e15400d3752ce', name: "secondary" }, secondaryHeading && (index.h("div", { key: '059273f8fc66599aa67a11d0bfeaab113a7fd21d', class: "secondary-container" }, index.h("div", { key: '966adc1a6f9c930c52766dbc2f884691a60f58ac', class: "secondary-heading" }, index.h("ic-typography", { key: '80fd633680cc4888363567e532db41806be62c2e', variant: "h4" }, index.h("h3", { key: 'a72f5272444bbfc0941fc552a47d2e8863b8e256' }, secondaryHeading))), index.h("div", { key: '60fac396776b1eaf7950675f880a1338409f0dbd', class: "secondary-subheading" }, index.h("ic-typography", { key: '7178ff3785d3d7d5dd9b737e618a720ce64de9c8', variant: "subtitle-small" }, secondarySubheading))))))))));
|
91
92
|
}
|
92
93
|
get el() { return index.getElement(this); }
|
93
94
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-hero.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,o+NAAo+N,CAAC;AACv/N,qBAAe,SAAS;;MCqCX,IAAI;IALjB;;QAMU,yBAAoB,GAA4B,IAAI,CAAC;QAIpD,oBAAe,GAAsBA,oCAA4B,EAAE,CAAC;QACpE,iBAAY,GAAY,KAAK,CAAC;;QAE9B,yBAAoB,GAC3B,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,CAAC;QACnD,iBAAY,GAAW,cAAc,CAAC;;;;QAKvC,YAAO,GAAiB,MAAM,CAAC;;;;QAU/B,mBAAc,GAA6B,MAAM,CAAC;;;;QAKlD,8BAAyB,GAAa,KAAK,CAAC;;;;QAoB5C,SAAI,GAAoB,QAAQ,CAAC;KA+I1C;IAxIC,oBAAoB;;QAClB,MAAA,IAAI,CAAC,oBAAoB,0CAAE,UAAU,EAAE,CAAC;KACzC;IAED,iBAAiB;QACf,IAAI,CAAC,YAAY,GAAGC,s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AK,EAAC,iBAAiB,IAC1BA,mEAAM,IAAI,EAAC,WAAW,IACnB,gBAAgB,KACfA,kEAAK,KAAK,EAAC,qBAAqB,IAC9BA,kEAAK,KAAK,EAAC,mBAAmB,IAC5BA,4EAAe,OAAO,EAAC,IAAI,IACzBA,mEAAK,gBAAgB,CAAM,CACb,CACZ,EACNA,kEAAK,KAAK,EAAC,sBAAsB,IAC/BA,4EAAe,OAAO,EAAC,gBAAgB,IACpC,mBAAmB,CACN,CACZ,CACF,CACP,CACI,CACH,CACP,CACoB,CAClB,EACP;KACH;;;;;;;","names":["getBrandForegroundAppearance","slotHasContent","isSlotUsed","onComponentRequiredPropUndefined","renderDynamicChildSlots","isPropDefined","h","Host","IcBrandForegroundEnum"],"sources":["src/components/ic-hero/ic-hero.css?tag=ic-hero&encapsulation=shadow","src/components/ic-hero/ic-hero.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n background-color: var(--ic-hero-background);\n\n --hero-heading-bottom-margin: var(--ic-space-md);\n --hero-keyline: var(--ic-hero-keyline);\n}\n\n:host(.ic-hero-dark) {\n background-color: var(--ic-brand-color-secondary);\n\n --ic-hero-heading: var(--ic-color-text-primary-light);\n --ic-hero-body: var(--ic-color-text-primary-light);\n --ic-hero-secondary-heading: var(--ic-color-text-primary-light);\n --hero-keyline: var(--ic-brand-text-color);\n}\n\n.heading {\n --ic-typography-color: var(--ic-hero-heading);\n}\n\n.subheading {\n --ic-typography-color: var(--ic-hero-body);\n}\n\n.secondary-container {\n --ic-typography-color: var(--ic-hero-secondary-heading);\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-left: var(--ic-space-xxxs) solid var(--hero-keyline);\n}\n\n:host(.has-background-image) {\n background-repeat: no-repeat;\n background-position: right -6.25rem;\n background-size: auto calc(100% + 6.25rem);\n box-shadow: var(--ic-elevation-inset);\n}\n\n@media (prefers-reduced-motion) {\n :host(.has-background-image) {\n background-position: right -6.25rem !important;\n }\n}\n\nic-typography.heading-bottom-spacing {\n margin-bottom: var(--hero-heading-bottom-margin);\n}\n\n.section-container {\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.left-container {\n padding: var(--ic-space-xl) 0;\n}\n\n.left-container:not(.left-container-full-width) {\n flex-basis: 50%;\n}\n\n.left-container-full-width {\n width: 100%;\n}\n\n.right-container {\n flex-basis: 50%;\n}\n\n.interaction-container {\n display: flex;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-lg);\n flex-wrap: wrap;\n}\n\n.secondary-subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n:host([content-aligned=\"left\"]) .left-container,\n:host([content-aligned=\"left\"]) .interaction-container {\n justify-content: flex-start;\n text-align: left;\n}\n\n:host([content-aligned=\"center\"]) .left-container,\n:host([content-aligned=\"center\"]) .interaction-container {\n justify-content: center;\n text-align: center;\n}\n\n@media (min-width: 992px) {\n .left-container-full-width {\n width: 66.6%;\n }\n}\n\n@media (min-width: 1044px) {\n :host,\n .section-container {\n min-height: 13rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 10.813rem;\n }\n\n .left-container:not(.left-container-full-width) {\n flex-basis: 66.6%;\n }\n\n .left-container {\n min-height: 9rem;\n }\n\n .right-container {\n flex-basis: 33.3%;\n margin-left: 3.125rem;\n }\n\n .secondary-container {\n min-height: 9rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 3.938rem;\n }\n}\n\n@media (min-width: 801px) and (max-width: 1043px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 16rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 15rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 14rem;\n }\n\n .left-container {\n min-height: 10rem;\n }\n\n .secondary-container {\n min-height: 10rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 5.922rem;\n }\n\n .right-container {\n margin-left: 3.125rem;\n }\n}\n\n@media (min-width: 641px) and (max-width: 800px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host(.has-right-content) .section-container {\n flex-wrap: wrap;\n }\n\n :host(.has-right-content) .left-container {\n flex-basis: 100%;\n }\n\n :host(.has-right-content) .right-container {\n flex-basis: 100%;\n margin-bottom: 2.5rem;\n }\n\n :host,\n .section-container {\n min-height: 16rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 15rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 14rem;\n }\n\n .left-container {\n min-height: 10rem;\n }\n\n .secondary-container {\n min-height: 10rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 2.125rem;\n }\n}\n\n@media (min-width: 481px) and (max-width: 640px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 13rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 10.813rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 17.5rem;\n }\n\n :host(.secondary-heading) .section-container,\n :host(.ic-hero-small) .section-container,\n .section-container {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .left-container {\n height: fit-content;\n }\n\n .secondary-container {\n height: fit-content;\n border: none;\n }\n\n .right-container {\n margin-bottom: 2.5rem;\n }\n}\n\n@media (max-width: 480px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 12rem;\n }\n\n :host,\n .right-container {\n margin-bottom: var(--ic-space-md);\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 10.813rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 16.5rem;\n }\n\n :host(.secondary-heading) .section-container,\n :host(.ic-hero-small) .section-container,\n .section-container {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .left-container {\n height: fit-content;\n }\n\n .secondary-container {\n height: fit-content;\n border: none;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Listen,\n} from \"@stencil/core\";\nimport {\n IcAlignment,\n IcSizesNoLarge,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"../../utils/types\";\nimport {\n slotHasContent,\n getBrandForegroundAppearance,\n onComponentRequiredPropUndefined,\n isPropDefined,\n isSlotUsed,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport { IcHeroContentAlignments } from \"./ic-hero.types\";\n\n/**\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot interaction - Content will be rendered in the interaction area, adjacent to the title area.\n * @slot secondary - Content will be rendered in the secondary content area.\n */\n\n@Component({\n tag: \"ic-hero\",\n styleUrl: \"ic-hero.css\",\n shadow: true,\n})\nexport class Hero {\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcHeroElement;\n\n @State() foregroundColor: IcBrandForeground = getBrandForegroundAppearance();\n @State() rightContent: boolean = false;\n // set by above state\n @State() leftContentFullWidth: boolean =\n !this.rightContent && this.secondaryHeading === undefined;\n @State() scrollFactor: string = \"right -100px\";\n\n /**\n * The alignment of the hero.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * The optional background image.\n */\n @Prop() backgroundImage?: string;\n\n /**\n * The alignment of the hero content.\n */\n @Prop() contentAligned?: IcHeroContentAlignments = \"left\";\n\n /**\n * If `true`, the background image (if set) will not scroll using a parallax effect.\n */\n @Prop() disableBackgroundParallax?: boolean = false;\n\n /**\n * The heading of the hero. An <h2> level heading.\n */\n @Prop() heading?: string;\n\n /**\n * The optional secondary heading, an <h3> level heading. Replaced by slotted right content.\n */\n @Prop() secondaryHeading?: string;\n\n /**\n * The optional secondary subheading, replaced by slotted right content.\n */\n @Prop() secondarySubheading?: string;\n\n /**\n * The size of the hero component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * The description for the hero.\n */\n @Prop() subheading?: string;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.rightContent = slotHasContent(this.el, \"secondary\");\n }\n\n componentDidLoad(): void {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Hero\"\n );\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"secondary\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n componentWillRender(): void {\n this.rightContent = slotHasContent(this.el, \"secondary\");\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.foregroundColor = ev.detail.mode;\n }\n\n @Listen(\"scroll\", { target: \"document\" })\n doScroll(): void {\n if (this.disableBackgroundParallax) {\n return;\n }\n\n const scrolltotop = document.scrollingElement?.scrollTop;\n if (scrolltotop) {\n const factor = 0.4;\n const y = -100 + scrolltotop * factor;\n this.scrollFactor = \"right \" + y + \"px\";\n }\n }\n\n render() {\n const {\n aligned,\n size,\n heading,\n subheading,\n secondaryHeading,\n secondarySubheading,\n foregroundColor,\n backgroundImage,\n scrollFactor,\n } = this;\n\n let style = {};\n\n if (isPropDefined(backgroundImage)) {\n style = {\n \"background-image\": \"url(\" + backgroundImage + \")\",\n \"background-position\": scrollFactor,\n };\n }\n\n return (\n <Host\n class={{\n [`ic-hero-${IcBrandForegroundEnum.Dark}`]:\n foregroundColor === IcBrandForegroundEnum.Dark,\n [\"has-background-image\"]: backgroundImage !== undefined,\n [\"has-right-content\"]: this.rightContent,\n [\"ic-hero-small\"]: size === \"small\",\n [\"secondary-heading\"]: !!secondaryHeading,\n }}\n style={style}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight\n class=\"section-container\"\n >\n <div\n class={{\n [\"left-container\"]: true,\n [\"left-container-full-width\"]: this.leftContentFullWidth,\n }}\n >\n <div class=\"heading\">\n <slot name=\"heading\">\n <ic-typography\n variant={size === \"small\" ? \"h2\" : \"h1\"}\n class={{\n [\"heading-bottom-spacing\"]: size !== \"small\",\n }}\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n </div>\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"body\">{subheading}</ic-typography>\n </slot>\n </div>\n <div class=\"interaction-container\">\n <slot name=\"interaction\"></slot>\n </div>\n </div>\n {(isPropDefined(secondaryHeading) || this.rightContent) && (\n <div class=\"right-container\">\n <slot name=\"secondary\">\n {secondaryHeading && (\n <div class=\"secondary-container\">\n <div class=\"secondary-heading\">\n <ic-typography variant=\"h4\">\n <h3>{secondaryHeading}</h3>\n </ic-typography>\n </div>\n <div class=\"secondary-subheading\">\n <ic-typography variant=\"subtitle-small\">\n {secondarySubheading}\n </ic-typography>\n </div>\n </div>\n )}\n </slot>\n </div>\n )}\n </ic-section-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-hero.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,SAAS,GAAG,o+NAAo+N,CAAC;AACv/N,qBAAe,SAAS;;MCqCX,IAAI;IALjB;;QAMU,yBAAoB,GAA4B,IAAI,CAAC;QAIpD,oBAAe,GAAsBA,oCAA4B,EAAE,CAAC;QACpE,iBAAY,GAAY,KAAK,CAAC;;QAE9B,yBAAoB,GAC3B,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,CAAC;QACnD,iBAAY,GAAW,cAAc,CAAC;;;;QAKvC,YAAO,GAAiB,MAAM,CAAC;;;;QAU/B,mBAAc,GAA6B,MAAM,CAAC;;;;QAKlD,8BAAyB,GAAa,KAAK,CAAC;;;;QAoB5C,SAAI,GAAoB,QAAQ,CAAC;KA+I1C;IAxIC,oBAAoB;;QAClB,MAAA,IAAI,CAAC,oBAAoB,0CAAE,UAAU,EAAE,C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gBAAgB,CAAC,IAAI,IAAI,CAAC,YAAY,MACpDC,kEAAK,KAAK,EAAC,iBAAiB,IAC1BA,mEAAM,IAAI,EAAC,WAAW,IACnB,gBAAgB,KACfA,kEAAK,KAAK,EAAC,qBAAqB,IAC9BA,kEAAK,KAAK,EAAC,mBAAmB,IAC5BA,4EAAe,OAAO,EAAC,IAAI,IACzBA,mEAAK,gBAAgB,CAAM,CACb,CACZ,EACNA,kEAAK,KAAK,EAAC,sBAAsB,IAC/BA,4EAAe,OAAO,EAAC,gBAAgB,IACpC,mBAAmB,CACN,CACZ,CACF,CACP,CACI,CACH,CACP,CACoB,CAClB,EACP;KACH;;;;;;;","names":["getBrandForegroundAppearance","slotHasContent","isSlotUsed","onComponentRequiredPropUndefined","renderDynamicChildSlots","isPropDefined","h","Host","IcBrandForegroundEnum"],"sources":["src/components/ic-hero/ic-hero.css?tag=ic-hero&encapsulation=shadow","src/components/ic-hero/ic-hero.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n background-color: var(--ic-hero-background);\n\n --hero-heading-bottom-margin: var(--ic-space-md);\n --hero-keyline: var(--ic-hero-keyline);\n}\n\n:host(.ic-hero-dark) {\n background-color: var(--ic-brand-color-secondary);\n\n --ic-hero-heading: var(--ic-color-text-primary-light);\n --ic-hero-body: var(--ic-color-text-primary-light);\n --ic-hero-secondary-heading: var(--ic-color-text-primary-light);\n --hero-keyline: var(--ic-brand-text-color);\n}\n\n.heading {\n --ic-typography-color: var(--ic-hero-heading);\n}\n\n.subheading {\n --ic-typography-color: var(--ic-hero-body);\n}\n\n.secondary-container {\n --ic-typography-color: var(--ic-hero-secondary-heading);\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-left: var(--ic-space-xxxs) solid var(--hero-keyline);\n}\n\n:host(.has-background-image) {\n background-repeat: no-repeat;\n background-position: right -6.25rem;\n background-size: auto calc(100% + 6.25rem);\n box-shadow: var(--ic-elevation-inset);\n}\n\n@media (prefers-reduced-motion) {\n :host(.has-background-image) {\n background-position: right -6.25rem !important;\n }\n}\n\nic-typography.heading-bottom-spacing {\n margin-bottom: var(--hero-heading-bottom-margin);\n}\n\n.section-container {\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.left-container {\n padding: var(--ic-space-xl) 0;\n}\n\n.left-container:not(.left-container-full-width) {\n flex-basis: 50%;\n}\n\n.left-container-full-width {\n width: 100%;\n}\n\n.right-container {\n flex-basis: 50%;\n}\n\n.interaction-container {\n display: flex;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-lg);\n flex-wrap: wrap;\n}\n\n.secondary-subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n:host([content-aligned=\"left\"]) .left-container,\n:host([content-aligned=\"left\"]) .interaction-container {\n justify-content: flex-start;\n text-align: left;\n}\n\n:host([content-aligned=\"center\"]) .left-container,\n:host([content-aligned=\"center\"]) .interaction-container {\n justify-content: center;\n text-align: center;\n}\n\n@media (min-width: 992px) {\n .left-container-full-width {\n width: 66.6%;\n }\n}\n\n@media (min-width: 1044px) {\n :host,\n .section-container {\n min-height: 13rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 10.813rem;\n }\n\n .left-container:not(.left-container-full-width) {\n flex-basis: 66.6%;\n }\n\n .left-container {\n min-height: 9rem;\n }\n\n .right-container {\n flex-basis: 33.3%;\n margin-left: 3.125rem;\n }\n\n .secondary-container {\n min-height: 9rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 3.938rem;\n }\n}\n\n@media (min-width: 801px) and (max-width: 1043px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 16rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 15rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 14rem;\n }\n\n .left-container {\n min-height: 10rem;\n }\n\n .secondary-container {\n min-height: 10rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 5.922rem;\n }\n\n .right-container {\n margin-left: 3.125rem;\n }\n}\n\n@media (min-width: 641px) and (max-width: 800px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host(.has-right-content) .section-container {\n flex-wrap: wrap;\n }\n\n :host(.has-right-content) .left-container {\n flex-basis: 100%;\n }\n\n :host(.has-right-content) .right-container {\n flex-basis: 100%;\n margin-bottom: 2.5rem;\n }\n\n :host,\n .section-container {\n min-height: 16rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 15rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 14rem;\n }\n\n .left-container {\n min-height: 10rem;\n }\n\n .secondary-container {\n min-height: 10rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 2.125rem;\n }\n}\n\n@media (min-width: 481px) and (max-width: 640px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 13rem;\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 10.813rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 17.5rem;\n }\n\n :host(.secondary-heading) .section-container,\n :host(.ic-hero-small) .section-container,\n .section-container {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .left-container {\n height: fit-content;\n }\n\n .secondary-container {\n height: fit-content;\n border: none;\n }\n\n .right-container {\n margin-bottom: 2.5rem;\n }\n}\n\n@media (max-width: 480px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 12rem;\n }\n\n :host,\n .right-container {\n margin-bottom: var(--ic-space-md);\n }\n\n :host(.ic-hero-small),\n :host(.ic-hero-small) .section-container {\n min-height: 10.813rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 16.5rem;\n }\n\n :host(.secondary-heading) .section-container,\n :host(.ic-hero-small) .section-container,\n .section-container {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .left-container {\n height: fit-content;\n }\n\n .secondary-container {\n height: fit-content;\n border: none;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Listen,\n} from \"@stencil/core\";\nimport {\n IcAlignment,\n IcSizesNoLarge,\n IcBrand,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"../../utils/types\";\nimport {\n slotHasContent,\n getBrandForegroundAppearance,\n onComponentRequiredPropUndefined,\n isPropDefined,\n isSlotUsed,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport { IcHeroContentAlignments } from \"./ic-hero.types\";\n\n/**\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot interaction - Content will be rendered in the interaction area, adjacent to the title area.\n * @slot secondary - Content will be rendered in the secondary content area.\n */\n\n@Component({\n tag: \"ic-hero\",\n styleUrl: \"ic-hero.css\",\n shadow: true,\n})\nexport class Hero {\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el: HTMLIcHeroElement;\n\n @State() foregroundColor: IcBrandForeground = getBrandForegroundAppearance();\n @State() rightContent: boolean = false;\n // set by above state\n @State() leftContentFullWidth: boolean =\n !this.rightContent && this.secondaryHeading === undefined;\n @State() scrollFactor: string = \"right -100px\";\n\n /**\n * The alignment of the hero.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * The optional background image.\n */\n @Prop() backgroundImage?: string;\n\n /**\n * The alignment of the hero content.\n */\n @Prop() contentAligned?: IcHeroContentAlignments = \"left\";\n\n /**\n * If `true`, the background image (if set) will not scroll using a parallax effect.\n */\n @Prop() disableBackgroundParallax?: boolean = false;\n\n /**\n * The heading of the hero. An <h2> level heading.\n */\n @Prop() heading?: string;\n\n /**\n * The optional secondary heading, an <h3> level heading. Replaced by slotted right content.\n */\n @Prop() secondaryHeading?: string;\n\n /**\n * The optional secondary subheading, replaced by slotted right content.\n */\n @Prop() secondarySubheading?: string;\n\n /**\n * The size of the hero component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * The description for the hero.\n */\n @Prop() subheading?: string;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.rightContent = slotHasContent(this.el, \"secondary\");\n }\n\n componentDidLoad(): void {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Hero\"\n );\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"secondary\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n componentWillRender(): void {\n this.rightContent = slotHasContent(this.el, \"secondary\");\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler(ev: CustomEvent<IcBrand>): void {\n this.foregroundColor = ev.detail.mode;\n }\n\n @Listen(\"scroll\", { target: \"document\" })\n doScroll(): void {\n if (this.disableBackgroundParallax) {\n return;\n }\n\n const scrolltotop = document.scrollingElement?.scrollTop;\n if (scrolltotop) {\n const factor = 0.4;\n const y = -100 + scrolltotop * factor;\n this.scrollFactor = \"right \" + y + \"px\";\n }\n }\n\n render() {\n const {\n aligned,\n size,\n heading,\n subheading,\n secondaryHeading,\n secondarySubheading,\n foregroundColor,\n backgroundImage,\n scrollFactor,\n } = this;\n\n let style = {};\n\n if (isPropDefined(backgroundImage)) {\n style = {\n \"background-image\": \"url(\" + backgroundImage + \")\",\n \"background-position\": scrollFactor,\n };\n }\n\n return (\n <Host\n class={{\n [`ic-hero-${IcBrandForegroundEnum.Dark}`]:\n foregroundColor === IcBrandForegroundEnum.Dark,\n [\"has-background-image\"]: backgroundImage !== undefined,\n [\"has-right-content\"]: this.rightContent,\n [\"ic-hero-small\"]: size === \"small\",\n [\"secondary-heading\"]: !!secondaryHeading,\n }}\n style={style}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight\n class=\"section-container\"\n >\n <div\n class={{\n [\"left-container\"]: true,\n [\"left-container-full-width\"]: this.leftContentFullWidth,\n }}\n >\n <div class=\"heading\">\n <slot name=\"heading\">\n <ic-typography\n variant={size === \"small\" ? \"h2\" : \"h1\"}\n class={{\n [\"heading-bottom-spacing\"]: size !== \"small\",\n }}\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n </div>\n <div class=\"subheading\">\n <slot name=\"subheading\">\n <ic-typography variant=\"body\">{subheading}</ic-typography>\n </slot>\n </div>\n <div class=\"interaction-container\">\n <slot name=\"interaction\"></slot>\n </div>\n </div>\n {(isPropDefined(secondaryHeading) || this.rightContent) && (\n <div class=\"right-container\">\n <slot name=\"secondary\">\n {secondaryHeading && (\n <div class=\"secondary-container\">\n <div class=\"secondary-heading\">\n <ic-typography variant=\"h4\">\n <h3>{secondaryHeading}</h3>\n </ic-typography>\n </div>\n <div class=\"secondary-subheading\">\n <ic-typography variant=\"subtitle-small\">\n {secondarySubheading}\n </ic-typography>\n </div>\n </div>\n )}\n </slot>\n </div>\n )}\n </ic-section-container>\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -3,7 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-d337cd8a.js');
|
6
|
-
const helpers = require('./helpers-
|
6
|
+
const helpers = require('./helpers-ffe1c2d9.js');
|
7
|
+
require('./constants-8354f6e6.js');
|
7
8
|
|
8
9
|
const LeftArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
9
10
|
<path d="M13.0875 6.175L11.9125 5L6.91251 10L11.9125 15L13.0875 13.825L9.27084 10L13.0875 6.175Z"/>
|
@@ -13,7 +14,7 @@ const RightArrow = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="2
|
|
13
14
|
<path d="M8.08748 5L6.91248 6.175L10.7291 10L6.91248 13.825L8.08748 15L13.0875 10L8.08748 5Z"/>
|
14
15
|
</svg>`;
|
15
16
|
|
16
|
-
const icHorizontalScrollCss = "/*! 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{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);display:flex;max-width:100%}:host(.ic-horizontal-scroll-light){--splitter-color:var(--ic-color-keyline-lighten)}:host(.ic-horizontal-scroll-dark){--splitter-color:var(--ic-color-keyline-darken)}::slotted(*){overflow-x:scroll;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;margin:calc(var(--ic-space-xs) * -1) !important;padding:var(--ic-space-xs) !important}:host(.ic-horizontal-scroll-visible) ::slotted(*){margin:calc(var(--ic-space-xs) * -1) 0 !important;padding:var(--ic-space-xs) !important}.tabs-container::-webkit-scrollbar{display:none}.scroll-container-left,.scroll-container-right{display:flex}.scroll-container-left{margin-left:var(--ic-space-xxs)}.scroll-container-right{margin-right:var(--ic-space-xxs)}.hidden{display:none}.scroll-arrow{margin:var(--ic-space-xxs) 0}.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:var(--ic-space-1px);margin-top:var(--ic-space-xs);border-radius:var(--ic-space-1px);background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.scroll-splitter-right{margin-right:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.disabled .scroll-splitter-left,.disabled .scroll-splitter-right{background-color:transparent}:host(.ic-horizontal-scroll-dark) .disabled ic-button>svg,:host(.ic-horizontal-scroll-light) .disabled ic-button>svg{color:var(--splitter-color) !important}";
|
17
|
+
const icHorizontalScrollCss = "/*! 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{--border-bottom-color:var(--ic-architectural-300);--splitter-color:var(--ic-architectural-100);display:flex;max-width:100%}:host(.ic-horizontal-scroll-light){--splitter-color:var(--ic-color-keyline-lighten)}:host(.ic-horizontal-scroll-light) ic-button>svg{color:var(--ic-color-text-action-monochrome-dark)}:host(.ic-horizontal-scroll-dark){--splitter-color:var(--ic-color-keyline-darken)}:host(.ic-horizontal-scroll-dark) ic-button>svg{color:var(--ic-color-text-action-monochrome-light)}::slotted(*){overflow-x:scroll;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;margin:calc(var(--ic-space-xs) * -1) !important;padding:var(--ic-space-xs) !important}:host(.ic-horizontal-scroll-visible) ::slotted(*){margin:calc(var(--ic-space-xs) * -1) 0 !important;padding:var(--ic-space-xs) !important}.tabs-container::-webkit-scrollbar{display:none}.scroll-container-left,.scroll-container-right{display:flex}.scroll-container-left{margin-left:var(--ic-space-xxs)}.scroll-container-right{margin-right:var(--ic-space-xxs)}.hidden{display:none}.scroll-arrow{margin:var(--ic-space-xxs) 0}.disabled .ic-tooltip-container{display:none !important}.scroll-splitter-left,.scroll-splitter-right{display:flex;height:var(--ic-space-lg);width:var(--ic-space-1px);margin-top:var(--ic-space-xs);border-radius:var(--ic-space-1px);background-color:var(--splitter-color)}.scroll-splitter-left{margin-left:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.scroll-splitter-right{margin-right:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.disabled .scroll-splitter-left,.disabled .scroll-splitter-right{background-color:transparent}:host(.ic-horizontal-scroll-dark) .disabled ic-button>svg,:host(.ic-horizontal-scroll-light) .disabled ic-button>svg{color:var(--splitter-color) !important}";
|
17
18
|
const IcHorizontalScrollStyle0 = icHorizontalScrollCss;
|
18
19
|
|
19
20
|
const SCROLL_DELAY_MS = 200;
|
@@ -168,22 +169,22 @@ const HorizontalScroll = class {
|
|
168
169
|
}
|
169
170
|
render() {
|
170
171
|
const { firstItemVisible, lastItemVisible, itemOverflow } = this;
|
171
|
-
return (index.h(index.Host, { key: '
|
172
|
+
return (index.h(index.Host, { key: '70a4e7c8a5e6e69d64d78375798498b7807ae16a', class: {
|
172
173
|
["ic-horizontal-scroll-visible"]: itemOverflow,
|
173
174
|
["ic-horizontal-scroll-dark"]: this.appearance === helpers.IcBrandForegroundEnum.Dark,
|
174
175
|
["ic-horizontal-scroll-light"]: this.appearance === helpers.IcBrandForegroundEnum.Light,
|
175
176
|
[`ic-theme-${this.theme}`]: this.theme !== "inherit",
|
176
|
-
} }, index.h("div", { key: '
|
177
|
+
} }, index.h("div", { key: '586bf3284c05ffad1ebd3c61e44e992aa9d71c25', "aria-hidden": "true", class: {
|
177
178
|
["scroll-container-left"]: true,
|
178
179
|
["hidden"]: !itemOverflow,
|
179
180
|
["disabled"]: firstItemVisible,
|
180
|
-
}, role: "tab" }, index.h("ic-button", { key: '
|
181
|
+
}, role: "tab" }, index.h("ic-button", { key: '0125b0d48b7ae82fb580bc890450d1fb14f71a5f', class: "scroll-arrow", variant: "icon-tertiary", "aria-label": "Scroll left", theme: this.theme === "light" || this.theme === "inherit"
|
181
182
|
? "dark"
|
182
|
-
: "light", monochrome: this.monochrome, innerHTML: LeftArrow, disabled: firstItemVisible, tabindex: "-1", onClick: this.scrollLeft, onMouseDown: this.leftArrowMouseDownHandler }), index.h("span", { key: '
|
183
|
+
: "light", monochrome: this.monochrome, innerHTML: LeftArrow, disabled: firstItemVisible, tabindex: "-1", onClick: this.scrollLeft, onMouseDown: this.leftArrowMouseDownHandler }), index.h("span", { key: '363c0c48d85e455684573a12554afcf765c4ae95', class: "scroll-splitter-left" })), index.h("slot", { key: 'b12cc6de29b6345e3ef5ece250f4998252d9a54b' }), index.h("div", { key: '47d5456630571ac7e877f791401129ec6524d52b', "aria-hidden": "true", class: {
|
183
184
|
["scroll-container-right"]: true,
|
184
185
|
["hidden"]: !itemOverflow,
|
185
186
|
["disabled"]: lastItemVisible,
|
186
|
-
}, role: "tab" }, index.h("span", { key: '
|
187
|
+
}, role: "tab" }, index.h("span", { key: '13b35c95c35dc6a44464996880c7f3a3fc671b42', class: "scroll-splitter-right" }), index.h("ic-button", { key: '95434e1cf988eaa4049bcb6926d515182a7f7072', class: "scroll-arrow", variant: "icon-tertiary", "aria-label": "Scroll right", theme: this.theme === "light" || this.theme === "inherit"
|
187
188
|
? "dark"
|
188
189
|
: "light", monochrome: this.monochrome, innerHTML: RightArrow, disabled: lastItemVisible, tabindex: "-1", onClick: this.scrollRight, onMouseDown: this.rightArrowMouseDownHandler }))));
|
189
190
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-horizontal-scroll.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,s8HAAs8H,CAAC;AACr+H,iCAAe,qBAAqB;;ACoBpC,MAAM,eAAe,GAAG,GAAG,CAAC;MAOf,gBAAgB;IAL7B;;QAMU,mBAAc,GAAY,KAAK,CAAC;QAU/B,qBAAgB,GAAY,IAAI,CAAC;QACjC,iBAAY,GAAY,KAAK,CAAC;QAC9B,oBAAe,GAAY,KAAK,CAAC;;;;QAKlC,eAAU,GAAuB,SAAS,CAAC;;QAG3C,eAAU,GAAa,KAAK,CAAC;;;;QAK7B,UAAK,GAAiB,SAAS,CAAC;;;;QAKhC,iBAAY,GAAY,OAAO,CAAC;QA+EhC,iBAAY,GAAG,CAAC,KAAY;YAClC,IAAI,CAAC,gBAAgB,CACnB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAqB,CAAC,CAC5D,CAAC;SACH,CAAC;QAQM,2BAAsB,GAAG;YAC/B,IAAI,IAAI,CAAC,EAAE,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,CA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C,cAAc,EACpB,OAAO,EAAC,eAAe,gBACZ,cAAc,EACzB,KAAK,EACH,IAAI,CAAC,KAAK,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;kBAC9C,MAAM;kBACN,OAAO,EAEb,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAC,IAAI,EACb,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,WAAW,EAAE,IAAI,CAAC,0BAA0B,GACjC,CACT,CACD,EACP;KACH;;;;;;;","names":["elementOverflowsX","getSlotElements","checkResizeObserver","h","Host","IcBrandForegroundEnum"],"sources":["src/components/ic-horizontal-scroll/ic-horizontal-scroll.css?tag=ic-horizontal-scroll&encapsulation=shadow","src/components/ic-horizontal-scroll/ic-horizontal-scroll.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --border-bottom-color: var(--ic-architectural-300);\n --splitter-color: var(--ic-architectural-100);\n\n display: flex;\n max-width: 100%;\n}\n\n:host(.ic-horizontal-scroll-light) {\n --splitter-color: var(--ic-color-keyline-lighten);\n}\n\n:host(.ic-horizontal-scroll-dark) {\n --splitter-color: var(--ic-color-keyline-darken);\n}\n\n/* Slotted items container element */\n::slotted(*) {\n overflow-x: scroll;\n overflow-y: hidden;\n scroll-behavior: smooth;\n scrollbar-width: none;\n -ms-overflow-style: none;\n margin: calc(var(--ic-space-xs) * -1) !important;\n padding: var(--ic-space-xs) !important;\n}\n\n:host(.ic-horizontal-scroll-visible) ::slotted(*) {\n margin: calc(var(--ic-space-xs) * -1) 0 !important;\n padding: var(--ic-space-xs) !important;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n\n.scroll-container-left,\n.scroll-container-right {\n display: flex;\n}\n\n.scroll-container-left {\n margin-left: var(--ic-space-xxs);\n}\n\n.scroll-container-right {\n margin-right: var(--ic-space-xxs);\n}\n\n.hidden {\n display: none;\n}\n\n.scroll-arrow {\n margin: var(--ic-space-xxs) 0;\n}\n\n.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: var(--ic-space-1px);\n margin-top: var(--ic-space-xs);\n border-radius: var(--ic-space-1px);\n background-color: var(--splitter-color);\n}\n\n.scroll-splitter-left {\n margin-left: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.scroll-splitter-right {\n margin-right: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.disabled .scroll-splitter-left,\n.disabled .scroll-splitter-right {\n background-color: transparent;\n}\n\n:host(.ic-horizontal-scroll-dark) .disabled ic-button > svg,\n:host(.ic-horizontal-scroll-light) .disabled ic-button > svg {\n color: var(--splitter-color) !important;\n}\n","import {\n Component,\n Element,\n h,\n Host,\n State,\n Method,\n Prop,\n} from \"@stencil/core\";\n\nimport LeftArrow from \"./assets/left-arrow.svg\";\nimport RightArrow from \"./assets/right-arrow.svg\";\nimport { getSlotElements } from \"../../utils/helpers\";\n\nimport { checkResizeObserver, elementOverflowsX } from \"../../utils/helpers\";\nimport {\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n} from \"../../utils/types\";\n\nconst SCROLL_DELAY_MS = 200;\n\n@Component({\n tag: \"ic-horizontal-scroll\",\n styleUrl: \"./ic-horizontal-scroll.css\",\n shadow: true,\n})\nexport class HorizontalScroll {\n private buttonStateSet: boolean = false;\n private isScrolling: number;\n private itemOffsets: number[];\n private items: HTMLElement[];\n private itemsContainerEl: HTMLElement;\n private resizeObserver: ResizeObserver;\n private scrollDelay: number;\n\n @Element() el: HTMLIcHorizontalScrollElement;\n\n @State() firstItemVisible: boolean = true;\n @State() itemOverflow: boolean = false;\n @State() lastItemVisible: boolean = false;\n\n /**\n * The appearance of the horizontal scroll, e.g. dark, light or the default.\n */\n @Prop() appearance?: IcBrandForeground = \"default\";\n\n /** @internal Determines whether black variant of the tabs should be displayed. */\n @Prop() monochrome?: boolean = false;\n\n /**\n * @internal Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * @internal The name of the event that triggers focus handler logic.\n */\n @Prop() focusTrigger?: string = \"focus\";\n\n componentWillLoad(): void {\n this.itemsContainerEl = this.el.children[0] as HTMLElement;\n this.itemsContainerEl.addEventListener(\"scroll\", this.scrollHandler);\n this.items = getSlotElements(this.itemsContainerEl) as HTMLElement[];\n this.items.forEach((item) => {\n if (item.addEventListener) {\n item.addEventListener(\n this.focusTrigger as keyof HTMLElementEventMap,\n this.focusHandler\n );\n }\n });\n }\n\n componentDidLoad(): void {\n let runningTotal = 0;\n this.itemOffsets = this.items.map((item) => {\n runningTotal += item.offsetWidth;\n return runningTotal;\n });\n\n checkResizeObserver(this.runResizeObserver);\n\n // Add event listener to scroll containers as mouse events are not fired on disabled elements (ic-button's <button>)\n // 'mouseleave' needed in case the user moves their mouse while holding the arrow buttons\n // - 'mouseup' otherwise not detected and scrolling not stopped\n const scrollArrows = Array.from(\n this.el.shadowRoot?.querySelectorAll(\"div\") || []\n ) as HTMLElement[];\n [\"mouseup\", \"mouseleave\"].forEach((event) => {\n scrollArrows.forEach((arrow) =>\n arrow.addEventListener(event, this.arrowMouseUpHandler)\n );\n });\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== undefined) {\n this.resizeObserver.disconnect();\n }\n\n const scrollArrows = Array.from(\n this.el.shadowRoot?.querySelectorAll(\"div\") || []\n ) as HTMLElement[];\n [\"mouseup\", \"mouseleave\"].forEach((event) => {\n scrollArrows.forEach((arrow) =>\n arrow.removeEventListener(event, this.arrowMouseUpHandler)\n );\n });\n\n this.items?.forEach((item) => {\n if (item.removeEventListener) {\n item.removeEventListener(\n this.focusTrigger as keyof HTMLElementEventMap,\n this.focusHandler\n );\n }\n });\n\n this.itemsContainerEl?.removeEventListener(\"scroll\", this.scrollHandler);\n }\n\n /**\n * @internal if side scrolling enabled, scrolls the specified item into view.\n */\n @Method()\n async scrollItemIntoView(itemPosition: number): Promise<void> {\n this.firstItemVisible = itemPosition <= 0;\n const newScrollPos =\n itemPosition <= 0 ? 0 : this.itemOffsets[itemPosition - 1];\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + newScrollPos >=\n this.itemsContainerEl.scrollWidth;\n this.buttonStateSet = true;\n this.itemsContainerEl.scrollLeft = newScrollPos;\n }\n\n private focusHandler = (event: Event) => {\n this.itemFocusHandler(\n Array.from(this.items).indexOf(event.target as HTMLElement)\n );\n };\n\n private itemFocusHandler(itemPosition: number): void {\n if (this.itemOverflow) {\n this.scrollItemIntoView(itemPosition);\n }\n }\n\n private resizeObserverCallback = () => {\n if (this.el.clientWidth >= this.itemsContainerEl.scrollWidth) {\n this.itemOverflow = false;\n } else {\n this.itemOverflow = elementOverflowsX(this.itemsContainerEl);\n }\n\n if (this.itemOverflow) {\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + this.itemsContainerEl.scrollLeft >=\n this.itemsContainerEl.scrollWidth;\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.itemsContainerEl);\n };\n\n private scrollLeft = () => {\n this.scrollItemIntoView(this.getCurrentLeftItem() - 1);\n };\n\n private scrollRight = () => {\n this.scrollItemIntoView(this.getCurrentLeftItem() + 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 = (e: MouseEvent) => {\n e.preventDefault();\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private rightArrowMouseDownHandler = (e: MouseEvent) => {\n e.preventDefault();\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private arrowMouseUpHandler = () => {\n window.clearTimeout(this.scrollDelay);\n };\n\n private getCurrentLeftItem = (): number => {\n const index = this.itemOffsets.findIndex(\n (el) => el > Math.round(this.itemsContainerEl.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 scrollItemIntoView 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 const scrollLeft = Math.round(this.itemsContainerEl.scrollLeft);\n if (this.buttonStateSet === false) {\n this.firstItemVisible = scrollLeft === 0;\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + scrollLeft >=\n this.itemsContainerEl.scrollWidth;\n }\n this.buttonStateSet = false;\n };\n\n render() {\n const { firstItemVisible, lastItemVisible, itemOverflow } = this;\n\n return (\n <Host\n class={{\n [\"ic-horizontal-scroll-visible\"]: itemOverflow,\n [\"ic-horizontal-scroll-dark\"]:\n this.appearance === IcBrandForegroundEnum.Dark,\n [\"ic-horizontal-scroll-light\"]:\n this.appearance === IcBrandForegroundEnum.Light,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }}\n >\n <div\n aria-hidden=\"true\"\n class={{\n [\"scroll-container-left\"]: true,\n [\"hidden\"]: !itemOverflow,\n [\"disabled\"]: firstItemVisible,\n }}\n role=\"tab\"\n >\n <ic-button\n class=\"scroll-arrow\"\n variant=\"icon-tertiary\"\n aria-label=\"Scroll left\"\n theme={\n this.theme === \"light\" || this.theme === \"inherit\"\n ? \"dark\"\n : \"light\"\n }\n monochrome={this.monochrome}\n innerHTML={LeftArrow}\n disabled={firstItemVisible}\n tabindex=\"-1\"\n onClick={this.scrollLeft}\n onMouseDown={this.leftArrowMouseDownHandler}\n ></ic-button>\n <span class=\"scroll-splitter-left\"></span>\n </div>\n <slot></slot>\n <div\n aria-hidden=\"true\"\n class={{\n [\"scroll-container-right\"]: true,\n [\"hidden\"]: !itemOverflow,\n [\"disabled\"]: lastItemVisible,\n }}\n role=\"tab\"\n >\n <span class=\"scroll-splitter-right\"></span>\n <ic-button\n class=\"scroll-arrow\"\n variant=\"icon-tertiary\"\n aria-label=\"Scroll right\"\n theme={\n this.theme === \"light\" || this.theme === \"inherit\"\n ? \"dark\"\n : \"light\"\n }\n monochrome={this.monochrome}\n innerHTML={RightArrow}\n disabled={lastItemVisible}\n tabindex=\"-1\"\n onClick={this.scrollRight}\n onMouseDown={this.rightArrowMouseDownHandler}\n ></ic-button>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-horizontal-scroll.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,4oIAA4oI,CAAC;AAC3qI,iCAAe,qBAAqB;;ACoBpC,MAAM,eAAe,GAAG,GAAG,CAAC;MAOf,gBAAgB;IAL7B;;QAMU,mBAAc,GAAY,KAAK,CAAC;QAU/B,qBAAgB,GAAY,IAAI,CAAC;QACjC,iBAAY,GAAY,KAAK,CAAC;QAC9B,oBAAe,GAAY,KAAK,CAAC;;;;QAKlC,eAAU,GAAuB,SAAS,CAAC;;QAG3C,eAAU,GAAa,KAAK,CAAC;;;;QAK7B,UAAK,GAAiB,SAAS,CAAC;;;;QAKhC,iBAAY,GAAY,OAAO,CAAC;QA+EhC,iBAAY,GAAG,CAAC,KAAY;YAClC,IAAI,CAAC,gBAAgB,CACnB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAqB,CAAC,CAC5D,CAAC;SACH,CAAC;QAQM,2BAAsB,GAAG;YAC/B,IAAI,IAAI,CAAC,EAAE,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE;gBAC5D,IAAI,CAAC,YAAY,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Ac,EACzB,KAAK,EACH,IAAI,CAAC,KAAK,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;kBAC9C,MAAM;kBACN,OAAO,EAEb,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAC,IAAI,EACb,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,WAAW,EAAE,IAAI,CAAC,0BAA0B,GACjC,CACT,CACD,EACP;KACH;;;;;;;","names":["elementOverflowsX","getSlotElements","checkResizeObserver","h","Host","IcBrandForegroundEnum"],"sources":["src/components/ic-horizontal-scroll/ic-horizontal-scroll.css?tag=ic-horizontal-scroll&encapsulation=shadow","src/components/ic-horizontal-scroll/ic-horizontal-scroll.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n --border-bottom-color: var(--ic-architectural-300);\n --splitter-color: var(--ic-architectural-100);\n\n display: flex;\n max-width: 100%;\n}\n\n:host(.ic-horizontal-scroll-light) {\n --splitter-color: var(--ic-color-keyline-lighten);\n}\n\n:host(.ic-horizontal-scroll-light) ic-button > svg {\n color: var(--ic-color-text-action-monochrome-dark);\n}\n\n:host(.ic-horizontal-scroll-dark) {\n --splitter-color: var(--ic-color-keyline-darken);\n}\n\n:host(.ic-horizontal-scroll-dark) ic-button > svg {\n color: var(--ic-color-text-action-monochrome-light);\n}\n\n/* Slotted items container element */\n::slotted(*) {\n overflow-x: scroll;\n overflow-y: hidden;\n scroll-behavior: smooth;\n scrollbar-width: none;\n -ms-overflow-style: none;\n margin: calc(var(--ic-space-xs) * -1) !important;\n padding: var(--ic-space-xs) !important;\n}\n\n:host(.ic-horizontal-scroll-visible) ::slotted(*) {\n margin: calc(var(--ic-space-xs) * -1) 0 !important;\n padding: var(--ic-space-xs) !important;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n\n.scroll-container-left,\n.scroll-container-right {\n display: flex;\n}\n\n.scroll-container-left {\n margin-left: var(--ic-space-xxs);\n}\n\n.scroll-container-right {\n margin-right: var(--ic-space-xxs);\n}\n\n.hidden {\n display: none;\n}\n\n.scroll-arrow {\n margin: var(--ic-space-xxs) 0;\n}\n\n.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: var(--ic-space-1px);\n margin-top: var(--ic-space-xs);\n border-radius: var(--ic-space-1px);\n background-color: var(--splitter-color);\n}\n\n.scroll-splitter-left {\n margin-left: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.scroll-splitter-right {\n margin-right: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.disabled .scroll-splitter-left,\n.disabled .scroll-splitter-right {\n background-color: transparent;\n}\n\n:host(.ic-horizontal-scroll-dark) .disabled ic-button > svg,\n:host(.ic-horizontal-scroll-light) .disabled ic-button > svg {\n color: var(--splitter-color) !important;\n}\n","import {\n Component,\n Element,\n h,\n Host,\n State,\n Method,\n Prop,\n} from \"@stencil/core\";\n\nimport LeftArrow from \"./assets/left-arrow.svg\";\nimport RightArrow from \"./assets/right-arrow.svg\";\nimport { getSlotElements } from \"../../utils/helpers\";\n\nimport { checkResizeObserver, elementOverflowsX } from \"../../utils/helpers\";\nimport {\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcThemeMode,\n} from \"../../utils/types\";\n\nconst SCROLL_DELAY_MS = 200;\n\n@Component({\n tag: \"ic-horizontal-scroll\",\n styleUrl: \"./ic-horizontal-scroll.css\",\n shadow: true,\n})\nexport class HorizontalScroll {\n private buttonStateSet: boolean = false;\n private isScrolling: number;\n private itemOffsets: number[];\n private items: HTMLElement[];\n private itemsContainerEl: HTMLElement;\n private resizeObserver: ResizeObserver;\n private scrollDelay: number;\n\n @Element() el: HTMLIcHorizontalScrollElement;\n\n @State() firstItemVisible: boolean = true;\n @State() itemOverflow: boolean = false;\n @State() lastItemVisible: boolean = false;\n\n /**\n * The appearance of the horizontal scroll, e.g. dark, light or the default.\n */\n @Prop() appearance?: IcBrandForeground = \"default\";\n\n /** @internal Determines whether black variant of the tabs should be displayed. */\n @Prop() monochrome?: boolean = false;\n\n /**\n * @internal Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * @internal The name of the event that triggers focus handler logic.\n */\n @Prop() focusTrigger?: string = \"focus\";\n\n componentWillLoad(): void {\n this.itemsContainerEl = this.el.children[0] as HTMLElement;\n this.itemsContainerEl.addEventListener(\"scroll\", this.scrollHandler);\n this.items = getSlotElements(this.itemsContainerEl) as HTMLElement[];\n this.items.forEach((item) => {\n if (item.addEventListener) {\n item.addEventListener(\n this.focusTrigger as keyof HTMLElementEventMap,\n this.focusHandler\n );\n }\n });\n }\n\n componentDidLoad(): void {\n let runningTotal = 0;\n this.itemOffsets = this.items.map((item) => {\n runningTotal += item.offsetWidth;\n return runningTotal;\n });\n\n checkResizeObserver(this.runResizeObserver);\n\n // Add event listener to scroll containers as mouse events are not fired on disabled elements (ic-button's <button>)\n // 'mouseleave' needed in case the user moves their mouse while holding the arrow buttons\n // - 'mouseup' otherwise not detected and scrolling not stopped\n const scrollArrows = Array.from(\n this.el.shadowRoot?.querySelectorAll(\"div\") || []\n ) as HTMLElement[];\n [\"mouseup\", \"mouseleave\"].forEach((event) => {\n scrollArrows.forEach((arrow) =>\n arrow.addEventListener(event, this.arrowMouseUpHandler)\n );\n });\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== undefined) {\n this.resizeObserver.disconnect();\n }\n\n const scrollArrows = Array.from(\n this.el.shadowRoot?.querySelectorAll(\"div\") || []\n ) as HTMLElement[];\n [\"mouseup\", \"mouseleave\"].forEach((event) => {\n scrollArrows.forEach((arrow) =>\n arrow.removeEventListener(event, this.arrowMouseUpHandler)\n );\n });\n\n this.items?.forEach((item) => {\n if (item.removeEventListener) {\n item.removeEventListener(\n this.focusTrigger as keyof HTMLElementEventMap,\n this.focusHandler\n );\n }\n });\n\n this.itemsContainerEl?.removeEventListener(\"scroll\", this.scrollHandler);\n }\n\n /**\n * @internal if side scrolling enabled, scrolls the specified item into view.\n */\n @Method()\n async scrollItemIntoView(itemPosition: number): Promise<void> {\n this.firstItemVisible = itemPosition <= 0;\n const newScrollPos =\n itemPosition <= 0 ? 0 : this.itemOffsets[itemPosition - 1];\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + newScrollPos >=\n this.itemsContainerEl.scrollWidth;\n this.buttonStateSet = true;\n this.itemsContainerEl.scrollLeft = newScrollPos;\n }\n\n private focusHandler = (event: Event) => {\n this.itemFocusHandler(\n Array.from(this.items).indexOf(event.target as HTMLElement)\n );\n };\n\n private itemFocusHandler(itemPosition: number): void {\n if (this.itemOverflow) {\n this.scrollItemIntoView(itemPosition);\n }\n }\n\n private resizeObserverCallback = () => {\n if (this.el.clientWidth >= this.itemsContainerEl.scrollWidth) {\n this.itemOverflow = false;\n } else {\n this.itemOverflow = elementOverflowsX(this.itemsContainerEl);\n }\n\n if (this.itemOverflow) {\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + this.itemsContainerEl.scrollLeft >=\n this.itemsContainerEl.scrollWidth;\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.itemsContainerEl);\n };\n\n private scrollLeft = () => {\n this.scrollItemIntoView(this.getCurrentLeftItem() - 1);\n };\n\n private scrollRight = () => {\n this.scrollItemIntoView(this.getCurrentLeftItem() + 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 = (e: MouseEvent) => {\n e.preventDefault();\n this.scrollDelay = window.setTimeout(this.longScrollLeft, SCROLL_DELAY_MS);\n };\n\n private rightArrowMouseDownHandler = (e: MouseEvent) => {\n e.preventDefault();\n this.scrollDelay = window.setTimeout(this.longScrollRight, SCROLL_DELAY_MS);\n };\n\n private arrowMouseUpHandler = () => {\n window.clearTimeout(this.scrollDelay);\n };\n\n private getCurrentLeftItem = (): number => {\n const index = this.itemOffsets.findIndex(\n (el) => el > Math.round(this.itemsContainerEl.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 scrollItemIntoView 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 const scrollLeft = Math.round(this.itemsContainerEl.scrollLeft);\n if (this.buttonStateSet === false) {\n this.firstItemVisible = scrollLeft === 0;\n this.lastItemVisible =\n this.itemsContainerEl.offsetWidth + scrollLeft >=\n this.itemsContainerEl.scrollWidth;\n }\n this.buttonStateSet = false;\n };\n\n render() {\n const { firstItemVisible, lastItemVisible, itemOverflow } = this;\n\n return (\n <Host\n class={{\n [\"ic-horizontal-scroll-visible\"]: itemOverflow,\n [\"ic-horizontal-scroll-dark\"]:\n this.appearance === IcBrandForegroundEnum.Dark,\n [\"ic-horizontal-scroll-light\"]:\n this.appearance === IcBrandForegroundEnum.Light,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }}\n >\n <div\n aria-hidden=\"true\"\n class={{\n [\"scroll-container-left\"]: true,\n [\"hidden\"]: !itemOverflow,\n [\"disabled\"]: firstItemVisible,\n }}\n role=\"tab\"\n >\n <ic-button\n class=\"scroll-arrow\"\n variant=\"icon-tertiary\"\n aria-label=\"Scroll left\"\n theme={\n this.theme === \"light\" || this.theme === \"inherit\"\n ? \"dark\"\n : \"light\"\n }\n monochrome={this.monochrome}\n innerHTML={LeftArrow}\n disabled={firstItemVisible}\n tabindex=\"-1\"\n onClick={this.scrollLeft}\n onMouseDown={this.leftArrowMouseDownHandler}\n ></ic-button>\n <span class=\"scroll-splitter-left\"></span>\n </div>\n <slot></slot>\n <div\n aria-hidden=\"true\"\n class={{\n [\"scroll-container-right\"]: true,\n [\"hidden\"]: !itemOverflow,\n [\"disabled\"]: lastItemVisible,\n }}\n role=\"tab\"\n >\n <span class=\"scroll-splitter-right\"></span>\n <ic-button\n class=\"scroll-arrow\"\n variant=\"icon-tertiary\"\n aria-label=\"Scroll right\"\n theme={\n this.theme === \"light\" || this.theme === \"inherit\"\n ? \"dark\"\n : \"light\"\n }\n monochrome={this.monochrome}\n innerHTML={RightArrow}\n disabled={lastItemVisible}\n tabindex=\"-1\"\n onClick={this.scrollRight}\n onMouseDown={this.rightArrowMouseDownHandler}\n ></ic-button>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|