@ukic/web-components 3.10.0 → 3.12.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-3a9ba64a.js +191 -0
- package/dist/cjs/constants-3a9ba64a.js.map +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-a0e78e2e.js → helpers-478d1107.js} +6 -187
- package/dist/cjs/helpers-478d1107.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 +8 -4
- 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 +7 -5
- 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 +7 -6
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1388 -12
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +27 -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 +15 -7
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +7 -6
- 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 +21 -13
- 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 +67 -54
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +21 -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 +16 -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-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.css +3 -3
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +5 -2
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +11 -28
- package/dist/collection/components/ic-chip/ic-chip.css +4 -0
- package/dist/collection/components/ic-chip/ic-chip.js +4 -3
- package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
- 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-link/ic-footer-link.js +2 -2
- package/dist/collection/components/ic-hero/ic-hero.js +4 -4
- 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 +9 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.js +27 -10
- package/dist/collection/components/ic-input-validation/ic-input-validation.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 +6 -5
- 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.css +2 -2
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +40 -7
- 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 +178 -15
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +37 -1
- 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-select/ic-select.js +44 -11
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(multi).stories.js +22 -8
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +16 -3
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +119 -10
- 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 +89 -53
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.types.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.js +43 -2
- package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.stories.js +75 -0
- 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-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/common-helpers.js +17 -0
- package/dist/collection/utils/common-helpers.js.map +1 -0
- package/dist/collection/utils/constants.js +1 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/constants.js +177 -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-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 +7 -4
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +4 -4
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +6 -5
- package/dist/components/ic-chip.js.map +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 +6 -6
- 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 +24 -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 +1383 -7
- 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-popover-menu.js +5 -5
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +15 -7
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -6
- 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 +21 -12
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +5 -5
- 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-step.js +67 -54
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +20 -2
- package/dist/components/ic-stepper.js.map +1 -1
- 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-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-0123dde7.entry.js +2 -0
- package/dist/core/p-0123dde7.entry.js.map +1 -0
- package/dist/core/p-01e018cb.entry.js +2 -0
- package/dist/core/{p-f309d3af.entry.js.map → p-01e018cb.entry.js.map} +1 -1
- package/dist/core/p-02af2b59.entry.js +2 -0
- package/dist/core/{p-ef4b5469.entry.js.map → p-02af2b59.entry.js.map} +1 -1
- package/dist/core/p-05036675.entry.js +2 -0
- package/dist/core/p-05036675.entry.js.map +1 -0
- package/dist/core/p-0c36ce84.entry.js +2 -0
- package/dist/core/{p-661ae402.entry.js.map → p-0c36ce84.entry.js.map} +1 -1
- package/dist/core/p-0ec76cff.entry.js +2 -0
- package/dist/core/{p-1d37ac1c.entry.js.map → p-0ec76cff.entry.js.map} +1 -1
- package/dist/core/p-13e093d0.entry.js +2 -0
- package/dist/core/{p-9eeb5e85.entry.js.map → p-13e093d0.entry.js.map} +1 -1
- package/dist/core/p-1423bd4a.entry.js +2 -0
- package/dist/core/{p-9f36791b.entry.js.map → p-1423bd4a.entry.js.map} +1 -1
- package/dist/core/p-2126d37b.entry.js +2 -0
- package/dist/core/{p-0c0c6a9e.entry.js.map → p-2126d37b.entry.js.map} +1 -1
- package/dist/core/p-228bc12d.entry.js +2 -0
- package/dist/core/{p-41f92698.entry.js.map → p-228bc12d.entry.js.map} +1 -1
- package/dist/core/p-25bef09d.entry.js +2 -0
- package/dist/core/{p-cf631191.entry.js.map → p-25bef09d.entry.js.map} +1 -1
- package/dist/core/p-27e67d45.entry.js +2 -0
- package/dist/core/{p-313a8a2f.entry.js.map → p-27e67d45.entry.js.map} +1 -1
- package/dist/core/p-2800fc30.entry.js +2 -0
- package/dist/core/{p-6ed0ac48.entry.js.map → p-2800fc30.entry.js.map} +1 -1
- package/dist/core/p-33582352.entry.js +2 -0
- package/dist/core/{p-317e005f.entry.js.map → p-33582352.entry.js.map} +1 -1
- package/dist/core/p-33789b23.entry.js +3 -0
- package/dist/core/p-33789b23.entry.js.map +1 -0
- 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-3e36f281.entry.js +2 -0
- package/dist/core/{p-711bfeed.entry.js.map → p-3e36f281.entry.js.map} +1 -1
- package/dist/core/p-45097448.entry.js +2 -0
- package/dist/core/{p-cbe0d1bb.entry.js.map → p-45097448.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-514daffe.entry.js +2 -0
- package/dist/core/p-514daffe.entry.js.map +1 -0
- package/dist/core/p-54803e3b.entry.js +2 -0
- package/dist/core/{p-2f4f392f.entry.js.map → p-54803e3b.entry.js.map} +1 -1
- package/dist/core/{p-6e8ef73c.entry.js → p-57721431.entry.js} +2 -2
- package/dist/core/{p-5fbc8e62.entry.js → p-5fcfcfb6.entry.js} +2 -2
- package/dist/core/p-6058d4c9.entry.js +2 -0
- package/dist/core/{p-ea778379.entry.js.map → p-6058d4c9.entry.js.map} +1 -1
- package/dist/core/p-675bb3e4.entry.js +2 -0
- package/dist/core/{p-52748d5c.entry.js.map → p-675bb3e4.entry.js.map} +1 -1
- package/dist/core/p-6dbe70f1.entry.js +2 -0
- package/dist/core/{p-4ca782eb.entry.js.map → p-6dbe70f1.entry.js.map} +1 -1
- package/dist/core/p-6e139e6e.entry.js +2 -0
- package/dist/core/{p-0d680d19.entry.js.map → p-6e139e6e.entry.js.map} +1 -1
- package/dist/core/p-80317cd1.entry.js +2 -0
- package/dist/core/{p-9c013333.entry.js.map → p-80317cd1.entry.js.map} +1 -1
- package/dist/core/p-80e0f66e.entry.js +2 -0
- package/dist/core/{p-493eaabb.entry.js.map → p-80e0f66e.entry.js.map} +1 -1
- package/dist/core/p-813ad03c.entry.js +2 -0
- package/dist/core/{p-6a576a8b.entry.js.map → p-813ad03c.entry.js.map} +1 -1
- package/dist/core/p-8558b9b7.entry.js +2 -0
- package/dist/core/{p-21cf2beb.entry.js.map → p-8558b9b7.entry.js.map} +1 -1
- package/dist/core/p-8684efeb.entry.js +2 -0
- package/dist/core/{p-fc3b1155.entry.js.map → p-8684efeb.entry.js.map} +1 -1
- package/dist/core/p-8b99a806.entry.js +2 -0
- package/dist/core/{p-8a4b12e4.entry.js.map → p-8b99a806.entry.js.map} +1 -1
- package/dist/core/p-93479c36.entry.js +2 -0
- package/dist/core/{p-19cf2327.entry.js.map → p-93479c36.entry.js.map} +1 -1
- package/dist/core/p-95d3d1a7.entry.js +2 -0
- package/dist/core/{p-6014ab64.entry.js.map → p-95d3d1a7.entry.js.map} +1 -1
- package/dist/core/p-99793b64.entry.js +2 -0
- package/dist/core/p-99793b64.entry.js.map +1 -0
- 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-a06c1e4e.entry.js +2 -0
- package/dist/core/{p-f6a02202.entry.js.map → p-a06c1e4e.entry.js.map} +1 -1
- package/dist/core/p-a1857d24.entry.js +2 -0
- package/dist/core/p-a1857d24.entry.js.map +1 -0
- package/dist/core/p-a1e2e029.entry.js +2 -0
- package/dist/core/{p-a77364f5.entry.js.map → p-a1e2e029.entry.js.map} +1 -1
- package/dist/core/p-abd88929.entry.js +2 -0
- package/dist/core/{p-af9c391d.entry.js.map → p-abd88929.entry.js.map} +1 -1
- package/dist/core/p-b0376079.entry.js +2 -0
- package/dist/core/{p-41ef74a7.entry.js.map → p-b0376079.entry.js.map} +1 -1
- package/dist/core/p-b1838ad8.entry.js +2 -0
- package/dist/core/p-b1838ad8.entry.js.map +1 -0
- package/dist/core/{p-999f0a5d.entry.js → p-b4a2f6fa.entry.js} +2 -2
- package/dist/core/p-b57e59b7.js +2 -0
- package/dist/core/p-b57e59b7.js.map +1 -0
- package/dist/core/p-b9bdd9a9.entry.js +2 -0
- package/dist/core/p-b9bdd9a9.entry.js.map +1 -0
- package/dist/core/p-bddf799a.js +2 -0
- package/dist/core/p-bddf799a.js.map +1 -0
- package/dist/core/p-c04e1fab.entry.js +2 -0
- package/dist/core/{p-1e2f40b0.entry.js.map → p-c04e1fab.entry.js.map} +1 -1
- package/dist/core/p-c2d5e301.entry.js +2 -0
- package/dist/core/p-c2d5e301.entry.js.map +1 -0
- package/dist/core/p-c975cced.entry.js +2 -0
- package/dist/core/{p-15dbccc2.entry.js.map → p-c975cced.entry.js.map} +1 -1
- package/dist/core/p-cc00cbce.entry.js +2 -0
- package/dist/core/p-cc00cbce.entry.js.map +1 -0
- package/dist/core/p-cf868a24.entry.js +2 -0
- package/dist/core/p-cf868a24.entry.js.map +1 -0
- package/dist/core/p-d58ad080.entry.js +2 -0
- package/dist/core/{p-b52000d9.entry.js.map → p-d58ad080.entry.js.map} +1 -1
- package/dist/core/p-de32a223.entry.js +2 -0
- package/dist/core/{p-43324339.entry.js.map → p-de32a223.entry.js.map} +1 -1
- package/dist/core/p-e6dacbe2.entry.js +2 -0
- package/dist/core/{p-b0d488d0.entry.js.map → p-e6dacbe2.entry.js.map} +1 -1
- package/dist/core/p-e9d28e02.entry.js +2 -0
- package/dist/core/p-e9d28e02.entry.js.map +1 -0
- package/dist/core/p-ea06792a.entry.js +2 -0
- package/dist/core/{p-72a9909c.entry.js.map → p-ea06792a.entry.js.map} +1 -1
- package/dist/core/p-eb0e7153.entry.js +2 -0
- package/dist/core/{p-3dc54847.entry.js.map → p-eb0e7153.entry.js.map} +1 -1
- package/dist/core/p-f609ca37.entry.js +2 -0
- package/dist/core/{p-9323c234.entry.js.map → p-f609ca37.entry.js.map} +1 -1
- package/dist/core/p-fb69fbc0.entry.js +2 -0
- package/dist/core/{p-7cd4f6a6.entry.js.map → p-fb69fbc0.entry.js.map} +1 -1
- package/dist/core/p-fb734a59.entry.js +2 -0
- package/dist/core/p-fb734a59.entry.js.map +1 -0
- package/dist/esm/constants-7960cba4.js +177 -0
- package/dist/esm/constants-7960cba4.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-56631aa0.js → helpers-4ddac6ed.js} +3 -175
- package/dist/esm/helpers-4ddac6ed.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 +8 -4
- 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 +7 -5
- 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 +7 -6
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +1388 -12
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +24 -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 +15 -7
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +7 -6
- 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 +20 -12
- 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 +67 -54
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +21 -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 +4 -3
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +6 -2
- package/dist/types/components/ic-select/ic-select.d.ts +5 -1
- package/dist/types/components/ic-select/test/a11y/ic-select.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-step/ic-step.d.ts +5 -1
- package/dist/types/components/ic-step/ic-step.types.d.ts +10 -0
- package/dist/types/components/ic-stepper/ic-stepper.d.ts +5 -1
- 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 +51 -9
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interface.d.ts +0 -1
- package/dist/types/utils/common-helpers.d.ts +2 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/types.d.ts +2 -0
- package/hydrate/index.js +1721 -254
- package/hydrate/index.mjs +1721 -254
- package/package.json +5 -4
- package/vscode-data.json +51 -0
- package/dist/cjs/helpers-a0e78e2e.js.map +0 -1
- package/dist/collection/components/ic-input-validation/ic-input-validation.types.js +0 -2
- package/dist/collection/components/ic-input-validation/ic-input-validation.types.js.map +0 -1
- package/dist/core/p-0c0c6a9e.entry.js +0 -2
- 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-3e5d7a3d.entry.js.map +0 -1
- 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-47f6dac2.entry.js +0 -2
- package/dist/core/p-47f6dac2.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-4d1a3036.entry.js.map +0 -1
- package/dist/core/p-52748d5c.entry.js +0 -2
- package/dist/core/p-595a4d06.entry.js +0 -2
- package/dist/core/p-595a4d06.entry.js.map +0 -1
- 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-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-a602a8e1.entry.js.map +0 -1
- 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-b52000d9.entry.js +0 -2
- package/dist/core/p-bb4ce810.entry.js +0 -2
- package/dist/core/p-bb4ce810.entry.js.map +0 -1
- 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/types/components/ic-input-validation/ic-input-validation.types.d.ts +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
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icInputLabelCss","IcInputLabelStyle0","InputLabel","constructor","hostRef","this","disabled","helperText","hideLabel","readonly","required","status","useLabelTag","isHelperTextSlotUsed","slot","assignedEls","assignedElements","length","el","tagName","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","render","labelText","helperTextId","for","getInputHelperTextID","helperTextClass","helpertext","helperTextSlot","querySelector","h","Host","key","class","variant","htmlFor","id","name","icInputValidationCss","IcInputValidationStyle0","ICON","IcInformationStatus","Warning","warningIcon","Error","errorIcon","Success","successIcon","INVISIBLE_CHAR","InputValidation","ariaLiveMode","fullWidth","watchMessageHandler","newValue","messageEl","textContent","setTimeout","message","displayIcon","innerHTML","getInputValidationTextID","ref"],"sources":["src/components/ic-input-label/ic-input-label.css?tag=ic-input-label","src/components/ic-input-label/ic-input-label.tsx","src/components/ic-input-validation/ic-input-validation.css?tag=ic-input-validation","src/components/ic-input-validation/ic-input-validation.tsx"],"sourcesContent":["ic-input-label {\n margin-bottom: var(--ic-space-xs);\n\n --ic-typography-color: var(\n --ic-input-label-text-color,\n var(--ic-color-text-primary)\n );\n}\n\nic-input-label.with-helper {\n margin-bottom: 0;\n}\n\nic-input-label.ic-input-label-readonly {\n --ic-typography-color: var(--ic-input-label-readonly-typography-color);\n}\n\nic-input-label .helpertext,\nic-input-label .helpertext ::slotted(*) {\n margin-top: var(--ic-space-xxxs);\n padding-bottom: var(--ic-input-label-helpertext-padding, 0);\n\n --ic-typography-color: var(\n --ic-input-label-helper-text-color,\n var(--ic-color-text-secondary)\n );\n}\n\nic-input-label .helpertext-normal {\n --ic-typography-color: var(\n --ic-input-label-helper-text-color,\n var(--ic-color-text-secondary)\n );\n}\n\nic-input-label .helpertext-readonly {\n --ic-typography-color: var(--ic-input-label-readonly-helpertext-color);\n}\n\nic-input-label .readonly-label {\n --ic-typography-color: var(--ic-input-label-readonly-label-color);\n}\n\nic-input-label .error-label {\n --ic-typography-color: var(--ic-input-label-error-label-color);\n}\n","import { Component, Element, Host, Prop, h } from \"@stencil/core\";\n\nimport {\n getInputHelperTextID,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-input-label\",\n styleUrl: \"./ic-input-label.css\",\n})\nexport class InputLabel {\n @Element() el: HTMLIcInputLabelElement;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The ID of the form element the label is bound to.\n */\n @Prop() for?: string;\n\n /**\n * The helper text that will be displayed.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * The label will be visually hidden.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The text content of the label.\n */\n @Prop() label!: string;\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly: boolean = false;\n\n /**\n * If `true`, the input label will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The status of the label - e.g. 'error'.\n */\n @Prop() status: \"error\" | \"\" = \"\";\n\n /**\n * @internal If `true`, wraps label text in label tag\n */\n @Prop() useLabelTag: boolean = true;\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Input Label\"\n );\n }\n\n private isHelperTextSlotUsed = (slot: Element | null): boolean => {\n const assignedEls = (slot as HTMLSlotElement)?.assignedElements();\n if (assignedEls && assignedEls.length) {\n for (const el of assignedEls) {\n if (el.tagName === \"SLOT\") {\n // Recursion needed for when slot is forwarded multiple times - through child components\n // (e.g. in date picker)\n if (this.isHelperTextSlotUsed(el as HTMLSlotElement)) {\n return true;\n }\n } else {\n // Found an assigned element which is not a nested <slot>\n return true;\n }\n }\n }\n return false;\n };\n\n render() {\n const {\n disabled,\n readonly,\n label,\n required,\n helperText,\n status,\n hideLabel,\n useLabelTag,\n } = this;\n const labelText = required ? label + \" *\" : label;\n const helperTextId = this.for && getInputHelperTextID(this.for);\n const helperTextClass = {\n helpertext: true,\n \"helpertext-normal\": !disabled && !readonly,\n \"helpertext-readonly\": readonly,\n };\n\n const helperTextSlot = this.el.querySelector(\"slot[name='helper-text']\");\n\n return (\n <Host\n class={{\n \"ic-input-label-disabled\": !!disabled,\n \"ic-input-label-readonly\": readonly,\n \"with-helper\":\n this.isHelperTextSlotUsed(helperTextSlot) || helperText !== \"\",\n }}\n >\n {!hideLabel && (\n <ic-typography\n variant=\"label\"\n class={{\n \"readonly-label\": readonly,\n \"error-label\": status === \"error\" && !(readonly || disabled),\n }}\n >\n {readonly || !useLabelTag ? (\n `${labelText}`\n ) : (\n <label htmlFor={this.for}>{labelText}</label>\n )}\n </ic-typography>\n )}\n {this.isHelperTextSlotUsed(helperTextSlot) ? (\n <span id={helperTextId} class={helperTextClass}>\n <slot name=\"helper-text\"></slot>\n </span>\n ) : (\n helperText !== \"\" && (\n <ic-typography variant=\"caption\" class={helperTextClass}>\n <span id={helperTextId}>{helperText}</span>\n </ic-typography>\n )\n )}\n </Host>\n );\n }\n}\n","ic-input-validation {\n width: var(--input-width, 20rem);\n display: flex;\n}\n\nic-input-validation.ic-input-validation-with-status {\n margin-top: var(--ic-space-xs);\n}\n\nic-input-validation.ic-input-validation-full-width {\n width: 100%;\n}\n\nic-input-validation span.status-icon {\n padding-right: var(--ic-space-xxs);\n}\n\nic-input-validation span.status-icon > svg {\n height: 1.25rem;\n width: 1.25rem;\n}\n\nic-input-validation span.icon-success > svg {\n fill: var(--ic-input-validation-success-icon-color);\n}\n\nic-input-validation span.icon-error > svg {\n fill: var(--ic-input-validation-error, var(--ic-atoms-status-icon-error));\n}\n\nic-input-validation span.icon-warning > svg {\n fill: var(--ic-input-validation-warning-icon-color);\n}\n\nic-input-validation .statustext {\n flex-grow: 1;\n color: var(\n --ic-input-validation-status-text-color,\n var(--ic-color-text-primary)\n );\n\n --ic-typography-color: var(\n --ic-input-validation-status-text-color,\n var(--ic-color-text-primary)\n );\n}\n\nic-input-validation .sr-only {\n position: absolute;\n left: -9999px;\n}\n","import { Element, Component, Host, Prop, h, Watch } from \"@stencil/core\";\n\nimport {\n IcAriaLive,\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n} from \"../../utils/types\";\nimport errorIcon from \"../../assets/error-icon.svg\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport warningIcon from \"../../assets/warning-icon.svg\";\n\nimport {\n getInputValidationTextID,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\n\nconst ICON = {\n [IcInformationStatus.Warning]: warningIcon,\n [IcInformationStatus.Error]: errorIcon,\n [IcInformationStatus.Success]: successIcon,\n};\nconst INVISIBLE_CHAR = \"\\u200B\";\n\n/**\n * @slot validation-message-adornment - Content will be placed to the right of the validation message.\n */\n@Component({\n tag: \"ic-input-validation\",\n styleUrl: \"ic-input-validation.css\",\n})\nexport class InputValidation {\n private messageEl!: HTMLSpanElement;\n\n @Element() el: HTMLIcInputValidationElement;\n\n /**\n * The ARIA live mode to apply to the message.\n */\n @Prop() ariaLiveMode?: IcAriaLive = \"polite\";\n\n /**\n * The ID of the form element the validation is bound to.\n */\n @Prop() for?: string;\n\n /**\n * If `true`, the input validation will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The validation message to display.\n */\n @Prop() message!: string;\n @Watch(\"message\")\n watchMessageHandler(newValue: string) {\n // Force detectable DOM changes\n // Invisible character used as screen readers can ignore whitespace changes e.g. \"\" and \" \"\n this.messageEl.textContent = INVISIBLE_CHAR;\n setTimeout(() => {\n this.messageEl.textContent = newValue;\n }, 200); // Delay to help ensure screen readers detect change\n }\n\n /**\n * The status of the validation - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() status?: IcInformationStatusOrEmpty = \"\";\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.message, propName: \"message\" }],\n \"Input Validation\"\n );\n this.messageEl.textContent = INVISIBLE_CHAR;\n }\n\n render() {\n const { ariaLiveMode, fullWidth, status, message } = this;\n const displayIcon = status !== \"\" ? ICON[status!] : \"\";\n return (\n <Host\n class={{\n [`ic-input-validation-${status}`]: status !== \"\",\n \"ic-input-validation-full-width\": !!fullWidth,\n \"ic-input-validation-with-status\": status !== \"\",\n }}\n >\n {displayIcon !== \"\" && (\n <span\n class={{\n \"status-icon\": true,\n [`icon-${status}`]: true,\n }}\n innerHTML={displayIcon}\n />\n )}\n <ic-typography variant=\"caption\" class=\"statustext\">\n <span id={this.for && getInputValidationTextID(this.for)}>\n {message}\n </span>\n {/* Separate aria-live region to avoid flashing due to textContent delay */}\n <span\n ref={(el) => (this.messageEl = el as HTMLSpanElement)}\n class=\"sr-only\"\n aria-live={ariaLiveMode}\n ></span>\n </ic-typography>\n <slot name=\"validation-message-adornment\"></slot>\n </Host>\n );\n }\n}\n"],"mappings":"oKAAA,MAAMA,EAAkB,6+BACxB,MAAAC,EAAeD,E,MCUFE,EAAU,MAJvB,WAAAC,CAAAC,G,UAUUC,KAAAC,SAAqB,MAUrBD,KAAAE,WAAqB,GAKrBF,KAAAG,UAAqB,MAUrBH,KAAAI,SAAoB,MAKpBJ,KAAAK,SAAoB,MAKpBL,KAAAM,OAAuB,GAKvBN,KAAAO,YAAuB,KASvBP,KAAAQ,qBAAwBC,IAC9B,MAAMC,EAAeD,IAAwB,MAAxBA,SAAI,SAAJA,EAA0BE,mBAC/C,GAAID,GAAeA,EAAYE,OAAQ,CACrC,IAAK,MAAMC,KAAMH,EAAa,CAC5B,GAAIG,EAAGC,UAAY,OAAQ,CAGzB,GAAId,KAAKQ,qBAAqBK,GAAwB,CACpD,OAAO,I,MAEJ,CAEL,OAAO,I,GAIb,OAAO,KAAK,C,CAvBd,gBAAAE,GACEC,EACE,CAAC,CAAEC,KAAMjB,KAAKkB,MAAOC,SAAU,UAC/B,c,CAuBJ,MAAAC,GACE,MAAMnB,SACJA,EAAQG,SACRA,EAAQc,MACRA,EAAKb,SACLA,EAAQH,WACRA,EAAUI,OACVA,EAAMH,UACNA,EAASI,YACTA,GACEP,KACJ,MAAMqB,EAAYhB,EAAWa,EAAQ,KAAOA,EAC5C,MAAMI,EAAetB,KAAKuB,KAAOC,EAAqBxB,KAAKuB,KAC3D,MAAME,E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D,MAAMyD,EAAcnD,IAAW,GAAKiC,EAAKjC,GAAW,GACpD,OACEuB,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,CACL,CAAC,uBAAuB1B,KAAWA,IAAW,GAC9C,mCAAoC4C,EACpC,kCAAmC5C,IAAW,KAG/CmD,IAAgB,IACf5B,EAAA,QAAAE,IAAA,2CACEC,MAAO,CACL,cAAe,KACf,CAAC,QAAQ1B,KAAW,MAEtBoD,UAAWD,IAGf5B,EAAA,iBAAAE,IAAA,2CAAeE,QAAQ,UAAUD,MAAM,cACrCH,EAAA,QAAAE,IAAA,2CAAMI,GAAInC,KAAKuB,KAAOoC,EAAyB3D,KAAKuB,MACjDiC,GAGH3B,EAAA,QAAAE,IAAA,2CACE6B,IAAM/C,GAAQb,KAAKqD,UAAYxC,EAC/BmB,MAAM,UAAS,YACJiB,KAGfpB,EAAA,QAAAE,IAAA,2CAAMK,KAAK,iC","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as e,c as t,h as i,H as a,g as o}from"./p-8e4e97b4.js";import{r,o as l,q as c,s as n}from"./p-b57e59b7.js";import"./p-bddf799a.js";const s='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-text-color:var(--ic-checkbox-group-label);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle);--ic-input-validation-error:var(--ic-checkbox-state-icon-error);--ic-input-validation-status-text-color:var(--ic-checkbox-state-text)}:host(.ic-checkbox-group-disabled){--ic-input-label-text-color:var(--ic-checkbox-group-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-checkbox-group-subtitle-disabled\n )}ic-input-label.error{color:var(--ic-checkbox-group-label-error);--ic-typography-color:var(--ic-checkbox-group-label-error);--ic-input-label-helper-text-color:var(--ic-checkbox-group-subtitle-error)}ic-input-label:not(.with-helper) .ic-typography-label,ic-input-label .helpertext{margin-bottom:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-small) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-label:not(.with-helper) .ic-typography-label,:host(.ic-checkbox-group-large) ic-input-label .helpertext{margin-bottom:calc(var(--ic-space-sm) * 1.5)}ic-input-label .helpertext{display:block}ic-input-validation.show-validation{margin-top:var(--ic-space-sm)}:host(.ic-checkbox-group-small) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) / 2)}:host(.ic-checkbox-group-large) ic-input-validation.show-validation{margin-top:calc(var(--ic-space-sm) * 1.5)}.checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxs))}:host(.ic-checkbox-group-small) .checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxxs))}.screen-reader-only-text{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}.screen-reader-only-text:dir(rtl){right:-9999px}';const b=s;const d="ic-checkbox";const p=class{constructor(i){e(this,i);this.icChange=t(this,"icChange",7);this.disabled=false;this.helperText="";this.hideLabel=false;this.required=false;this.size="medium";this.theme="inherit";this.validationStatus="";this.validationText=""}watchDisabledHandler(){r(this.disabled,this.el)}labelNameHandler(e,t,i){Array.from(this.el.querySelectorAll(d)).forEach((a=>{if(i==="label")a.groupLabel=e;else if(a.name===t){a.name=e}}))}watchThemeHandler(e){Array.from(this.el.querySelectorAll(d)).forEach((t=>{t.theme=e}))}handleChange(e){if(e.target.tagName==="IC-TEXT-FIELD"){e.stopImmediatePropagation()}}componentWillLoad(){r(this.disabled,this.el);this.watchThemeHandler(this.theme)}componentDidLoad(){l([{prop:this.label,propName:"label"},{prop:this.name,propName:"name"}],"Checkbox Group")}selectHandler({target:e}){const t=Array.from(this.el.querySelectorAll(d)).filter((({checked:e,disabled:t})=>e&&!t));this.icChange.emit({value:t.map((({value:e})=>e)),checkedOptions:t.map((e=>{var t;return{checkbox:e,textFieldValue:(t=e.querySelector("ic-text-field"))===null||t===void 0?void 0:t.value}})),selectedOption:e})}render(){const{disabled:e,helperText:t,hideLabel:o,label:r,name:l,required:s,size:b,theme:d,validationStatus:p,validationText:h}=this;const u=c(this.el,l,t!=="",p!=="");const m=p==="error"||s||o;const g=n(p,e);return i(a,{key:"6d5ed4db589400cd64aeed3bccd46087858d2902",class:{"ic-checkbox-group-disabled":!!e,[`ic-checkbox-group-${b}`]:true,[`ic-theme-${d}`]:d!=="inherit"}},m&&i("span",{key:"2fc368a571755ad3125067498b17b52ce8933e8f",id:"screenReaderOnlyText",class:"screen-reader-only-text","aria-hidden":"true"},r," ",p==="error"?"invalid data ":null," ",s?"required":null),i("fieldset",{key:"6b7d3155fa0479fbd51c5e5100945ee4995dfadf",id:l,"aria-labelledby":`${m?"screenReaderOnlyText":""} ${u}`.trim(),disabled:e},!o&&i("legend",{key:"469a466275aa307d6ca876ec18a79bb5d29167b8"},i("ic-input-label",{key:"4cd2e89ab463ea9c7438fb1759faddf6df8750d1",class:{[`${p}`]:true},label:r,helperText:t,required:s,disabled:e,useLabelTag:false},i("slot",{key:"0b0b0a5028039ef6d487d441ebd28f47f32200b7",name:"helper-text",slot:"helper-text"}))),i("div",{key:"747fea859cd5a3bbd474454b408f648169b5fe45",class:"checkboxes-container"},i("slot",{key:"200a6c033ff1243e8778aec3c91a22213f5082f5"}))),g&&i("ic-input-validation",{key:"df907eeb4348050b37357f27405b3ef548990163",class:{"show-validation":g},for:l,ariaLiveMode:"polite",status:p,message:h}))}get el(){return o(this)}static get watchers(){return{disabled:["watchDisabledHandler"],label:["labelNameHandler"],name:["labelNameHandler"],theme:["watchThemeHandler"]}}};p.style=b;export{p as ic_checkbox_group};
|
2
|
+
//# sourceMappingURL=p-cf868a24.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icCheckboxGroupCss","IcCheckboxGroupStyle0","CHECKBOX_SELECTOR","CheckboxGroup","constructor","hostRef","this","disabled","helperText","hideLabel","required","size","theme","validationStatus","validationText","watchDisabledHandler","removeDisabledFalse","el","labelNameHandler","newValue","oldValue","propName","Array","from","querySelectorAll","forEach","checkbox","groupLabel","name","watchThemeHandler","handleChange","ev","target","tagName","stopImmediatePropagation","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","label","selectHandler","checkedOptions","filter","checked","icChange","emit","value","map","opt","textFieldValue","_a","querySelector","selectedOption","render","describedBy","getInputDescribedByText","renderSRText","showValidation","hasValidationStatus","h","Host","key","class","id","trim","useLabelTag","slot","for","ariaLiveMode","status","message"],"sources":["src/components/ic-checkbox-group/ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","src/components/ic-checkbox-group/ic-checkbox-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n\n --ic-input-label-text-color: var(--ic-checkbox-group-label);\n --ic-input-label-helper-text-color: var(--ic-checkbox-group-subtitle);\n --ic-input-validation-error: var(--ic-checkbox-state-icon-error);\n --ic-input-validation-status-text-color: var(--ic-checkbox-state-text);\n}\n\n:host(.ic-checkbox-group-disabled) {\n --ic-input-label-text-color: var(--ic-checkbox-group-label-disabled);\n --ic-input-label-helper-text-color: var(\n --ic-checkbox-group-subtitle-disabled\n );\n}\n\nic-input-label.error {\n color: var(--ic-checkbox-group-label-error);\n\n --ic-typography-color: var(--ic-checkbox-group-label-error);\n --ic-input-label-helper-text-color: var(--ic-checkbox-group-subtitle-error);\n}\n\nic-input-label:not(.with-helper) .ic-typography-label,\nic-input-label .helpertext {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.ic-checkbox-group-small)\n ic-input-label:not(.with-helper)\n .ic-typography-label,\n:host(.ic-checkbox-group-small) ic-input-label .helpertext {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\n:host(.ic-checkbox-group-large)\n ic-input-label:not(.with-helper)\n .ic-typography-label,\n:host(.ic-checkbox-group-large) ic-input-label .helpertext {\n margin-bottom: calc(var(--ic-space-sm) * 1.5);\n}\n\nic-input-label .helpertext {\n display: block;\n}\n\nic-input-validation.show-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.ic-checkbox-group-small) ic-input-validation.show-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n:host(.ic-checkbox-group-large) ic-input-validation.show-validation {\n margin-top: calc(var(--ic-space-sm) * 1.5);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-checkbox-group-small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n\n.screen-reader-only-text:dir(rtl) {\n right: -9999px;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport {\n IcInformationStatusOrEmpty,\n IcSizes,\n IcThemeMode,\n} from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-checkbox-group.types\";\n\nconst CHECKBOX_SELECTOR = \"ic-checkbox\";\n\n/**\n * @slot helper-text - Content is set as the helper text for the checkbox group.\n */\n@Component({\n tag: \"ic-checkbox-group\",\n styleUrl: \"ic-checkbox-group.css\",\n shadow: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class CheckboxGroup {\n @Element() el: HTMLIcCheckboxGroupElement;\n\n /**\n * If `true`, the checkbox group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The label for the checkbox group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n @Watch(\"label\")\n @Watch(\"name\")\n labelNameHandler(\n newValue: string,\n oldValue: string,\n propName: \"label\" | \"name\"\n ): void {\n Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach(\n (checkbox) => {\n if (propName === \"label\") checkbox.groupLabel = newValue;\n else if (checkbox.name === oldValue) {\n // If the checkbox name has been set by the parent, then override it\n checkbox.name = newValue;\n }\n }\n );\n }\n\n /**\n * If `true`, the checkbox group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The size of the checkboxes to be displayed. This does not affect the font size of the label.\n */\n @Prop() size: IcSizes = \"medium\";\n\n /**\n * 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 @Watch(\"theme\")\n watchThemeHandler(newValue: IcThemeMode): void {\n Array.from(this.el.querySelectorAll(CHECKBOX_SELECTOR)).forEach(\n (checkbox) => {\n checkbox.theme = newValue;\n }\n );\n }\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * Emitted when a checkbox is checked.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icChange\")\n handleChange(ev: CustomEvent): void {\n //don't pass on the event if it has come from slotted text field\n //otherwise any icChange handler bound to the checkbox group will also run\n if ((ev.target as HTMLElement).tagName === \"IC-TEXT-FIELD\") {\n ev.stopImmediatePropagation();\n }\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n this.watchThemeHandler(this.theme);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Checkbox Group\"\n );\n }\n\n @Listen(\"icCheck\")\n selectHandler({ target }: CustomEvent): void {\n const checkedOptions = Array.from(\n this.el.querySelectorAll(CHECKBOX_SELECTOR)\n ).filter(({ checked, disabled }) => checked && !disabled);\n this.icChange.emit({\n value: checkedOptions.map(({ value }) => value),\n checkedOptions: checkedOptions.map((opt) => ({\n checkbox: opt,\n textFieldValue: opt.querySelector(\"ic-text-field\")?.value,\n })),\n selectedOption: target as HTMLIcCheckboxElement,\n });\n }\n\n render() {\n const {\n disabled,\n helperText,\n hideLabel,\n label,\n name,\n required,\n size,\n theme,\n validationStatus,\n validationText,\n } = this;\n\n const describedBy = getInputDescribedByText(\n this.el,\n name,\n helperText !== \"\",\n validationStatus !== \"\"\n );\n\n const renderSRText = validationStatus === \"error\" || required || hideLabel;\n\n const showValidation = hasValidationStatus(validationStatus, disabled);\n\n return (\n <Host\n class={{\n \"ic-checkbox-group-disabled\": !!disabled,\n [`ic-checkbox-group-${size}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n {renderSRText && (\n <span\n id=\"screenReaderOnlyText\"\n class=\"screen-reader-only-text\"\n aria-hidden=\"true\"\n >\n {label} {validationStatus === \"error\" ? \"invalid data \" : null}{\" \"}\n {required ? \"required\" : null}\n </span>\n )}\n <fieldset\n id={name}\n aria-labelledby={`${\n renderSRText ? \"screenReaderOnlyText\" : \"\"\n } ${describedBy}`.trim()}\n disabled={disabled}\n >\n {!hideLabel && (\n <legend>\n <ic-input-label\n class={{ [`${validationStatus}`]: true }}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n useLabelTag={false}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n </legend>\n )}\n <div class=\"checkboxes-container\">\n <slot></slot>\n </div>\n </fieldset>\n {showValidation && (\n <ic-input-validation\n class={{\n \"show-validation\": showValidation,\n }}\n for={name}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,MAAO,CACL,kBAAmBL,GAErBU,IAAKvC,EACLwC,aAAa,SACbC,OAAQxD,EACRyD,QAASxD,I","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as e,h as t,H as a}from"./p-8e4e97b4.js";import{o as i}from"./p-b57e59b7.js";import"./p-bddf799a.js";const r='/*! 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}.tag{padding:var(--ic-space-xxs) var(--ic-space-sm);font-size:0.875rem;border-radius:var(--ic-space-md);display:inline-block;min-width:2.5rem;text-align:center;--ic-typography-color:var(--ic-status-tag-text)}.small{padding:var(--ic-space-xxxs) var(--ic-space-sm);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.large{padding:var(--ic-space-xs) var(--ic-space-sm);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.filled-neutral{background-color:var(--ic-status-tag-neutral)}.filled-success{background-color:var(--ic-status-tag-success)}.filled-warning{background-color:var(--ic-status-tag-warning);--ic-typography-color:var(--ic-status-tag-filled-warning-text)}.filled-danger{background-color:var(--ic-status-tag-error)}.outlined{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined.small{padding:var(--ic-space-1px) calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px))}.outlined-neutral{background-color:var(--ic-status-tag-outlined-background-neutral);border:var(--ic-border-width) solid var(--ic-status-tag-outlined-neutral);--ic-typography-color:var(--ic-status-tag-text-inverted)}.outlined-success{background-color:var(--ic-status-tag-outlined-background-success);border:var(--ic-border-width) solid var(--ic-status-tag-outlined-success);--ic-typography-color:var(--ic-status-tag-text-inverted)}.outlined-warning{background-color:var(--ic-status-tag-outlined-background-warning);border:var(--ic-border-width) solid var(--ic-status-tag-outlined-warning);--ic-typography-color:var(--ic-status-tag-text-inverted)}.outlined-danger{background-color:var(--ic-status-tag-outlined-background-error);border:var(--ic-border-width) solid var(--ic-status-tag-outlined-error);--ic-typography-color:var(--ic-status-tag-text-inverted)}@media (forced-colors: active){.tag{border:var(--ic-border-hc);-ms-high-contrast-adjust:none;forced-color-adjust:none;--ic-typography-color:var(--ic-status-tag-text)}}';const o=r;const s=class{constructor(t){e(this,t);this.announced=false;this.size="medium";this.status="neutral";this.theme="inherit";this.uppercase=true;this.variant="filled"}componentDidLoad(){i([{prop:this.label,propName:"label"}],"Status Tag")}render(){const{label:e,status:i,variant:r,size:o,announced:s,theme:n,uppercase:c}=this;return t(a,{key:"294225d51b55c99b24e3eaf077fe5c62008004db",class:{[`ic-theme-${n}`]:n!=="inherit"},role:s?"status":null,"aria-label":"Status"},t("strong",{key:"c35594ae01f0e7769381c18a43aa58e21997f0da",class:{["tag"]:true,[`${r}-${i}`]:true,["outlined"]:r==="outlined",[`${o}`]:true}},t("ic-typography",{key:"0ccc4949134d73f83cee64ec456d1a3f42054b9e",variant:c?"label-uppercase":"label","apply-vertical-margins":false},t("span",{key:"4fbe4a1f344e5ced1878ae7e3ac6debfb6a91389"},e))))}};s.style=o;export{s as ic_status_tag};
|
2
|
+
//# sourceMappingURL=p-d58ad080.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["icStatusTagCss","IcStatusTagStyle0","StatusTag","constructor","hostRef","this","announced","size","status","theme","uppercase","variant","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","render","h","Host","key","class","role"],"sources":["src/components/ic-status-tag/ic-status-tag.css?tag=ic-status-tag&encapsulation=shadow","src/components/ic-status-tag/ic-status-tag.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n.tag {\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n display: inline-block;\n min-width: 2.5rem;\n text-align: center;\n\n --ic-typography-color: var(--ic-status-tag-text);\n}\n\n.small {\n padding: var(--ic-space-xxxs) var(--ic-space-sm);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.large {\n padding: var(--ic-space-xs) var(--ic-space-sm);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.filled-neutral {\n background-color: var(--ic-status-tag-neutral);\n}\n\n.filled-success {\n background-color: var(--ic-status-tag-success);\n}\n\n.filled-warning {\n background-color: var(--ic-status-tag-warning);\n\n --ic-typography-color: var(--ic-status-tag-filled-warning-text);\n}\n\n.filled-danger {\n background-color: var(--ic-status-tag-error);\n}\n\n.outlined {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined.small {\n padding: var(--ic-space-1px) calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined-neutral {\n background-color: var(--ic-status-tag-outlined-background-neutral);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-neutral);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n.outlined-success {\n background-color: var(--ic-status-tag-outlined-background-success);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-success);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n.outlined-warning {\n background-color: var(--ic-status-tag-outlined-background-warning);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-warning);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n.outlined-danger {\n background-color: var(--ic-status-tag-outlined-background-error);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-error);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n@media (forced-colors: active) {\n .tag {\n border: var(--ic-border-hc);\n -ms-high-contrast-adjust: none;\n forced-color-adjust: none;\n\n --ic-typography-color: var(--ic-status-tag-text);\n }\n}\n","import { Component, Host, h, Prop } from \"@stencil/core\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport { IcStatusTagStatuses } from \"./ic-status-tag.types\";\nimport { IcEmphasisType, IcSizes } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-status-tag\",\n styleUrl: \"ic-status-tag.css\",\n shadow: true,\n})\nexport class StatusTag {\n /**\n * If `true`, role='status' is added to the component and it will act as an 'aria-live' region.\n * Screen readers will announce changes to the `label`, but not the initial value.\n */\n @Prop() announced?: boolean = false;\n\n /**\n * The content rendered within the status tag.\n */\n @Prop() label!: string;\n\n /**\n * The size of the status tag component.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The colour of the status tag.\n */\n @Prop() status?: IcStatusTagStatuses = \"neutral\";\n\n /**\n * 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?: \"dark\" | \"light\" | \"inherit\" = \"inherit\";\n\n /**\n * The letter case of the status tag's label.\n */\n @Prop() uppercase?: boolean = true;\n\n /**\n * The emphasis of the status tag.\n */\n @Prop() variant?: IcEmphasisType = \"filled\";\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Status Tag\"\n );\n }\n\n render() {\n const { label, status, variant, size, announced, theme, uppercase } = this;\n return (\n <Host\n class={{ [`ic-theme-${theme}`]: theme !== \"inherit\" }}\n role={announced ? \"status\" : null}\n aria-label=\"Status\"\n >\n <strong\n class={{\n [\"tag\"]: true,\n [`${variant}-${status}`]: true,\n [\"outlined\"]: variant === \"outlined\",\n [`${size}`]: true,\n }}\n >\n <ic-typography\n variant={uppercase ? \"label-uppercase\" : \"label\"}\n apply-vertical-margins={false}\n >\n <span>{label}</span>\n </ic-typography>\n </strong>\n </Host>\n );\n }\n}\n"],"mappings":"
|
1
|
+
{"version":3,"names":["icStatusTagCss","IcStatusTagStyle0","StatusTag","constructor","hostRef","this","announced","size","status","theme","uppercase","variant","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","render","h","Host","key","class","role"],"sources":["src/components/ic-status-tag/ic-status-tag.css?tag=ic-status-tag&encapsulation=shadow","src/components/ic-status-tag/ic-status-tag.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n.tag {\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n display: inline-block;\n min-width: 2.5rem;\n text-align: center;\n\n --ic-typography-color: var(--ic-status-tag-text);\n}\n\n.small {\n padding: var(--ic-space-xxxs) var(--ic-space-sm);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.large {\n padding: var(--ic-space-xs) var(--ic-space-sm);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.filled-neutral {\n background-color: var(--ic-status-tag-neutral);\n}\n\n.filled-success {\n background-color: var(--ic-status-tag-success);\n}\n\n.filled-warning {\n background-color: var(--ic-status-tag-warning);\n\n --ic-typography-color: var(--ic-status-tag-filled-warning-text);\n}\n\n.filled-danger {\n background-color: var(--ic-status-tag-error);\n}\n\n.outlined {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined.small {\n padding: var(--ic-space-1px) calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px))\n calc(var(--ic-space-sm) - var(--ic-space-1px));\n}\n\n.outlined-neutral {\n background-color: var(--ic-status-tag-outlined-background-neutral);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-neutral);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n.outlined-success {\n background-color: var(--ic-status-tag-outlined-background-success);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-success);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n.outlined-warning {\n background-color: var(--ic-status-tag-outlined-background-warning);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-warning);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n.outlined-danger {\n background-color: var(--ic-status-tag-outlined-background-error);\n border: var(--ic-border-width) solid var(--ic-status-tag-outlined-error);\n\n --ic-typography-color: var(--ic-status-tag-text-inverted);\n}\n\n@media (forced-colors: active) {\n .tag {\n border: var(--ic-border-hc);\n -ms-high-contrast-adjust: none;\n forced-color-adjust: none;\n\n --ic-typography-color: var(--ic-status-tag-text);\n }\n}\n","import { Component, Host, h, Prop } from \"@stencil/core\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport { IcStatusTagStatuses } from \"./ic-status-tag.types\";\nimport { IcEmphasisType, IcSizes } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-status-tag\",\n styleUrl: \"ic-status-tag.css\",\n shadow: true,\n})\nexport class StatusTag {\n /**\n * If `true`, role='status' is added to the component and it will act as an 'aria-live' region.\n * Screen readers will announce changes to the `label`, but not the initial value.\n */\n @Prop() announced?: boolean = false;\n\n /**\n * The content rendered within the status tag.\n */\n @Prop() label!: string;\n\n /**\n * The size of the status tag component.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The colour of the status tag.\n */\n @Prop() status?: IcStatusTagStatuses = \"neutral\";\n\n /**\n * 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?: \"dark\" | \"light\" | \"inherit\" = \"inherit\";\n\n /**\n * The letter case of the status tag's label.\n */\n @Prop() uppercase?: boolean = true;\n\n /**\n * The emphasis of the status tag.\n */\n @Prop() variant?: IcEmphasisType = \"filled\";\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Status Tag\"\n );\n }\n\n render() {\n const { label, status, variant, size, announced, theme, uppercase } = this;\n return (\n <Host\n class={{ [`ic-theme-${theme}`]: theme !== \"inherit\" }}\n role={announced ? \"status\" : null}\n aria-label=\"Status\"\n >\n <strong\n class={{\n [\"tag\"]: true,\n [`${variant}-${status}`]: true,\n [\"outlined\"]: variant === \"outlined\",\n [`${size}`]: true,\n }}\n >\n <ic-typography\n variant={uppercase ? \"label-uppercase\" : \"label\"}\n apply-vertical-margins={false}\n >\n <span>{label}</span>\n </ic-typography>\n </strong>\n </Host>\n );\n }\n}\n"],"mappings":"8GAAA,MAAMA,EAAiB,05IACvB,MAAAC,EAAeD,E,MCSFE,EAAS,MALtB,WAAAC,CAAAC,G,UAUUC,KAAAC,UAAsB,MAUtBD,KAAAE,KAAiB,SAKjBF,KAAAG,OAA+B,UAK/BH,KAAAI,MAAuC,UAKvCJ,KAAAK,UAAsB,KAKtBL,KAAAM,QAA2B,Q,CAEnC,gBAAAC,GACEC,EACE,CAAC,CAAEC,KAAMT,KAAKU,MAAOC,SAAU,UAC/B,a,CAIJ,MAAAC,GACE,MAAMF,MAAEA,EAAKP,OAAEA,EAAMG,QAAEA,EAAOJ,KAAEA,EAAID,UAAEA,EAASG,MAAEA,EAAKC,UAAEA,GAAcL,KACtE,OACEa,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,CAAE,CAAC,YAAYZ,KAAUA,IAAU,WAC1Ca,KAAMhB,EAAY,SAAW,KAAI,aACtB,UAEXY,EAAA,UAAAE,IAAA,2CACEC,MAAO,CACL,CAAC,OAAQ,KACT,CAAC,GAAGV,KAAWH,KAAW,KAC1B,CAAC,YAAaG,IAAY,WAC1B,CAAC,GAAGJ,KAAS,OAGfW,EAAA,iBAAAE,IAAA,2CACET,QAASD,EAAY,kBAAoB,QAAO,yBACxB,OAExBQ,EAAA,QAAAE,IAAA,4CAAOL,K","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as e,c as t,h as i,H as o,g as s}from"./p-8e4e97b4.js";import{u as n,e as a}from"./p-b57e59b7.js";import{c as r}from"./p-68a5aaff.js";import"./p-bddf799a.js";const l='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host{border-radius:var(--ic-border-radius);color:var(--ic-popover-nav-text);--ic-typography-color:var(--ic-popover-nav-text);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-color:var(--ic-popover-border);border-radius:var(--ic-border-radius);background-color:var(--ic-popover-background);visibility:hidden;height:0;display:flex;flex-direction:column}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.ic-popover-menu-open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.ic-popover-menu-open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{--ic-typography-color:var(--ic-popover-parent-label);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}';const c=l;const d="div.menu-body";const h=class{constructor(i){e(this,i);this.icPopoverClosed=t(this,"icPopoverClosed",7);this.ARIA_LABEL="aria-label";this.popoverMenuEls=[];this.openingFromChild=false;this.openingFromParent=false;this.popperProps={};this.fixedPositioning=false;this.submenuLevel=1;this.theme="inherit";this.open=undefined;this.setButtonFocus=()=>{var e;(e=this.popoverMenuEls[this.currentFocus])===null||e===void 0?void 0:e.focus()};this.findAnchorEl=e=>{let t=null;if(!e){this.submenuId===undefined&&console.error("No anchor specified for popover component")}else{t=document.querySelector(e.indexOf("#")===0?e:"#"+e);if(t===null){console.error(`Popover anchor element '${e}' not found`)}}return t};this.isNotPopoverMenuEl=e=>{const{id:t,tagName:i}=e.target;return t!==this.anchor&&i!=="IC-MENU-ITEM"&&i!=="IC-MENU-GROUP"&&i!=="IC-POPOVER-MENU"};this.getNextItemToSelect=(e,t)=>{const i=this.popoverMenuEls.length-1;if(e<1){e=0}let o=t?e+1:e-1;if(o<0){o=i}else if(o>i){o=0}return o};this.addMenuItems=e=>{var t;for(let i=0;i<e.length;i++){const o=e[i];if(o.tagName==="IC-MENU-ITEM"){this.popoverMenuEls.push(o)}else if(o.tagName==="IC-MENU-GROUP"){const e=(t=o.shadowRoot)===null||t===void 0?void 0:t.querySelector(".menu-items-wrapper");if(e){const t=n(e);t&&this.addMenuItems(t)}}}};this.getMenuAriaLabel=()=>{const e=this.el.getAttribute(this.ARIA_LABEL);if(a(this.submenuId)){return`${e}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`}else{return e}};this.handleBackButtonClick=()=>{var e;(e=this.parentPopover)===null||e===void 0?void 0:e.openFromChild();this.open=false};this.initPopperJS=()=>{if(this.anchorEl){this.popperInstance=r(this.anchorEl,this.el,Object.assign({strategy:this.fixedPositioning?"fixed":"absolute",placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"flip",options:{fallbackPlacements:["top-start","top-end","bottom-end"],rootBoundary:"viewport"}}]},this.popperProps))}}}watchOpenHandler(){var e;const t=(e=this.el.parentElement)===null||e===void 0?void 0:e.querySelectorAll(`ic-popover-menu`);if(this.open){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}if(this.parentPopover!==undefined&&!this.popoverMenuEls.some((e=>e.id))){this.backButton&&this.popoverMenuEls.unshift(this.backButton)}this.currentFocus=0;setTimeout(this.setButtonFocus,50)}else if(this.popperInstance){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}this.popperInstance.destroy();this.popperInstance=null}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}componentDidLoad(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(d);if(t){const e=n(t);if(e!==null){this.addMenuItems(e)}}if(this.submenuId===undefined&&this.el.getAttribute(this.ARIA_LABEL)===null){console.error(`No aria-label specified for popover menu component - aria-label required`)}this.watchOpenHandler()}componentWillRender(){this.anchorEl=this.findAnchorEl(this.anchor)}componentDidRender(){if(this.open&&!this.popperInstance){this.initPopperJS()}}handleMenuItemClick(e){if(!e.detail.submenuTriggerFor&&e.detail.label!=="Back"){this.closeMenu(false,e.detail)}}handleSubmenuChange(e){const t=e.target;this.open=false;const i=document.querySelector(`ic-popover-menu[submenu-id=${t.submenuTriggerFor}]`);i.parentPopover=this.el;i.anchor=this.anchor;i.ariaLabel=this.el.getAttribute(this.ARIA_LABEL);i.openFromParent();i.submenuLevel=this.submenuLevel+1;i.parentLabel=t.label}handleClick(e){if(this.open&&this.isNotPopoverMenuEl(e)){this.closeMenu()}}handleKeyDown(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault();this.currentFocus=this.getNextItemToSelect(this.currentFocus,e.key==="ArrowDown");this.setButtonFocus();break;case"Home":this.currentFocus=0;this.setButtonFocus();break;case"End":this.currentFocus=this.popoverMenuEls.length-1;this.setButtonFocus();break;case"Escape":case"Tab":e.preventDefault();if(this.open){this.closeMenu(true);this.el.blur()}break}}async openFromChild(){this.open=true;this.openingFromChild=true;setTimeout((()=>this.openingFromChild=false),1e3)}async openFromParent(){this.open=true;this.openingFromParent=true;setTimeout((()=>this.openingFromParent=false),1e3)}async closeMenu(e=false,t){var i;this.open=false;if(this.parentPopover){this.parentPopover.closeMenu(e,t)}else{if(e){(i=this.anchorEl)===null||i===void 0?void 0:i.focus()}this.icPopoverClosed.emit(t)}}async setExternalPopperProps(e){this.popperProps=e}render(){return i(o,{key:"b3b80be668dab0b1bf8e9c86a92871a2ccf7fa05",class:{["ic-popover-menu-open"]:!!this.open,[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},i("div",{key:"2354b0125ce713af1824928f0f63bfc4e1a51539",id:this.parentPopover===undefined?`ic-popover-submenu-${this.submenuId}`:"",class:{menu:true}},i("span",{key:"a0fe248c348b955225eb3cbd9d4713dd4d2260f5",class:{"opening-from-parent":this.openingFromParent,"opening-from-child":this.openingFromChild}},a(this.submenuId)&&i("span",{key:"b0f4cd227ca7e89a65a05ff7e168c902d90fbd27"},i("span",{key:"2cae5777f8e07730803524dca57d2489755af132",role:"menu"},i("ic-menu-item",{key:"65be6ed2c83365bfc8888f9d1232fe34b61b9547",class:"ic-popover-submenu-back-button",ref:e=>this.backButton=e,label:"Back",onClick:this.handleBackButtonClick,id:`ic-popover-submenu-back-button-${this.submenuLevel}`},i("svg",{key:"51312621130f75922f672a78e96c5f143844fd23",slot:"icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"submenu-back-icon"},i("path",{key:"db43490c2526d8aef7b985109b0592d6e47d97fb",d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})))),i("ic-typography",{key:"d1f5dea7708ece652f7033fc879ebd2ecf9485e4",variant:"subtitle-small",class:"parent-label"},this.parentLabel)),i("div",{key:"57da0710affbfada09d7bb4f040b235bbd86bee4",class:"menu-body","aria-label":this.getMenuAriaLabel(),role:"menu"},i("slot",{key:"745f05595c859f9c6259716dc4c4635d66cd95fc"})))))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{open:["watchOpenHandler"]}}};h.style=c;export{h as ic_popover_menu};
|
2
|
+
//# sourceMappingURL=p-de32a223.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["icPopoverMenuCss","IcPopoverMenuStyle0","MENU_SELECTOR","PopoverMenu","constructor","hostRef","this","ARIA_LABEL","popoverMenuEls","openingFromChild","openingFromParent","popperProps","fixedPositioning","submenuLevel","theme","open","undefined","setButtonFocus","_a","currentFocus","focus","findAnchorEl","anchor","anchorElement","submenuId","console","error","document","querySelector","indexOf","isNotPopoverMenuEl","ev","id","tagName","target","getNextItemToSelect","currentItem","movingDown","numButtons","length","nextItem","addMenuItems","elements","i","el","push","groupSlotWrapper","shadowRoot","menuGroupElements","getSlotElements","getMenuAriaLabel","ariaLabel","getAttribute","isPropDefined","parentLabel","handleBackButtonClick","parentPopover","openFromChild","initPopperJS","anchorEl","popperInstance","createPopper","Object","assign","strategy","placement","modifiers","name","options","offset","fallbackPlacements","rootBoundary","watchOpenHandler","popoverArr","parentElement","querySelectorAll","forEach","popover","some","menuItem","backButton","unshift","setTimeout","destroy","disconnectedCallback","componentDidLoad","slotWrapper","popoverMenuElements","componentWillRender","componentDidRender","handleMenuItemClick","detail","submenuTriggerFor","label","closeMenu","handleSubmenuChange","childEl","openFromParent","handleClick","handleKeyDown","key","preventDefault","blur","setFocusToAnchor","menuElement","icPopoverClosed","emit","setExternalPopperProps","props","render","h","Host","class","menu","role","ref","onClick","slot","viewBox","fill","xmlns","d","variant"],"sources":["src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-popover-nav-text);\n\n --ic-typography-color: var(--ic-popover-nav-text);\n\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-color: var(--ic-popover-border);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-popover-background);\n visibility: hidden;\n height: 0;\n display: flex;\n flex-direction: column;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.ic-popover-menu-open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.ic-popover-menu-open) .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n --ic-typography-color: var(--ic-popover-parent-label);\n\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport {\n createPopper,\n Instance as PopperInstance,\n Options,\n} from \"@popperjs/core\";\nimport { IcThemeMode } from \"../../utils/types\";\n\nconst MENU_SELECTOR = \"div.menu-body\";\n\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n private anchorEl: HTMLElement | null;\n private ARIA_LABEL: string = \"aria-label\";\n private backButton?: HTMLIcMenuItemElement;\n private currentFocus: number;\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n private popperInstance: PopperInstance | null;\n\n @Element() el: HTMLIcPopoverMenuElement;\n\n @State() openingFromChild: boolean = false;\n @State() openingFromParent: boolean = false;\n @State() popperProps: Partial<Options> = {};\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor?: string;\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() fixedPositioning: boolean = false;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel?: number = 1;\n\n /**\n * 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 * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open?: boolean | undefined =\n undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n const popoverArr = this.el.parentElement?.querySelectorAll(\n `ic-popover-menu`\n ) as NodeListOf<HTMLIcPopoverMenuElement>;\n if (this.open) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.backButton && this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n } else if (this.popperInstance) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n /**\n * Emitted when the popover menu is closed.\n */\n @Event() icPopoverClosed: EventEmitter<HTMLIcMenuItemElement>;\n\n disconnectedCallback(): void {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.el.shadowRoot?.querySelector(MENU_SELECTOR);\n if (slotWrapper) {\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n }\n\n if (\n this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n\n this.watchOpenHandler();\n }\n\n componentWillRender(): void {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n\n componentDidRender(): void {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(ev: CustomEvent<HTMLIcMenuItemElement>): void {\n if (!ev.detail.submenuTriggerFor && ev.detail.label !== \"Back\") {\n this.closeMenu(false, ev.detail);\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel! + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(\n this.currentFocus,\n ev.key === \"ArrowDown\"\n );\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n ev.preventDefault();\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string | undefined): HTMLElement | null => {\n let anchorElement: HTMLElement | null = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const { id, tagName } = ev.target as HTMLElement;\n return (\n id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n /**\n * @internal Close the menu, emit icPopoverClosed of the root popover\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n @Method()\n async closeMenu(\n setFocusToAnchor = false,\n menuElement?: HTMLIcMenuItemElement\n ): Promise<void> {\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor, menuElement);\n } else {\n if (setFocusToAnchor) {\n this.anchorEl?.focus();\n }\n this.icPopoverClosed.emit(menuElement);\n }\n }\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of the popover menu\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot?.querySelector(\n \".menu-items-wrapper\"\n );\n if (groupSlotWrapper) {\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n menuGroupElements && this.addMenuItems(menuGroupElements);\n }\n }\n }\n };\n\n private getMenuAriaLabel = (): string | null => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover?.openFromChild();\n this.open = false;\n };\n\n private initPopperJS = () => {\n if (this.anchorEl) {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n strategy: this.fixedPositioning ? \"fixed\" : \"absolute\",\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n ...this.popperProps,\n });\n }\n };\n\n render() {\n return (\n <Host\n class={{\n [\"ic-popover-menu-open\"]: !!this.open,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }}\n >\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n >\n <span\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {isPropDefined(this.submenuId) && (\n <span>\n <span role=\"menu\">\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n </span>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </span>\n )}\n <div\n class=\"menu-body\"\n aria-label={this.getMenuAriaLabel()}\n role=\"menu\"\n >\n <slot></slot>\n </div>\n </span>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"+IAAA,MAAMA,EAAmB,0hIACzB,MAAAC,EAAeD,ECoBf,MAAME,EAAgB,gB,MASTC,EAAW,MAPxB,WAAAC,CAAAC,G,2DASUC,KAAAC,WAAqB,aAGrBD,KAAAE,eAA0C,GAKzCF,KAAAG,iBAA4B,MAC5BH,KAAAI,kBAA6B,MAC7BJ,KAAAK,YAAgC,GAUjCL,KAAAM,iBAA4B,MAoB5BN,KAAAO,aAAwB,EAKxBP,KAAAQ,MAAsB,UAKUR,KAAAS,KACtCC,UA8KMV,KAAAW,eAAiB,K,OACvBC,EAAAZ,KAAKE,eAAeF,KAAKa,iBAAa,MAAAD,SAAA,SAAAA,EAAEE,OAAO,EAIzCd,KAAAe,aAAgBC,IACtB,IAAIC,EAAoC,KACxC,IAAKD,EAAQ,CACXhB,KAAKkB,YAAcR,WACjBS,QAAQC,MAAM,4C,KACX,CACLH,EAAgBI,SAASC,cACvBN,EAAOO,QAAQ,OAAS,EAAIP,EAAS,IAAMA,GAE7C,GAAIC,IAAkB,KAAM,CAC1BE,QAAQC,MAAM,2BAA2BJ,e,EAG7C,OAAOC,CAAa,EAGdjB,KAAAwB,mBAAsBC,IAC5B,MAAMC,GAAEA,EAAEC,QAAEA,GAAYF,EAAGG,OAC3B,OACEF,IAAO1B,KAAKgB,QACZW,IAAY,gBACZA,IAAY,iBACZA,IAAY,iBAAiB,EAiCzB3B,KAAA6B,oBAAsB,CAC5BC,EACAC,KAEA,MAAMC,EAAahC,KAAKE,eAAe+B,OAAS,EAEhD,GAAIH,EAAc,EAAG,CACnBA,EAAc,C,CAGhB,IAAII,EAAWH,EAAaD,EAAc,EAAIA,EAAc,EAG5D,GAAII,EAAW,EAAG,CAChBA,EAAWF,C,MACN,GAAIE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ID,EAAkB,EACpBrF,EAAAZ,KAAKqD,YAAQ,MAAAzC,SAAA,SAAAA,EAAEE,O,CAEjBd,KAAKmG,gBAAgBC,KAAKF,E,EAS9B,4BAAMG,CAAmDC,GACvDtG,KAAKK,YAAciG,C,CAkFrB,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAX,IAAA,2CACHY,MAAO,CACL,CAAC,0BAA2B1G,KAAKS,KACjC,CAAC,YAAYT,KAAKQ,SAAUR,KAAKQ,QAAU,YAG7CgG,EAAA,OAAAV,IAAA,2CACEpE,GACE1B,KAAKkD,gBAAkBxC,UACnB,sBAAsBV,KAAKkB,YAC3B,GAENwF,MAAO,CACLC,KAAM,OAGRH,EAAA,QAAAV,IAAA,2CACEY,MAAO,CACL,sBAAuB1G,KAAKI,kBAC5B,qBAAsBJ,KAAKG,mBAG5B4C,EAAc/C,KAAKkB,YAClBsF,EAAA,QAAAV,IAAA,4CACEU,EAAA,QAAAV,IAAA,2CAAMc,KAAK,QACTJ,EAAA,gBAAAV,IAAA,2CACEY,MAAM,iCACNG,IAAMvE,GAAQtC,KAAK0E,WAAapC,EAChCiD,MAAM,OACNuB,QAAS9G,KAAKiD,sBACdvB,GAAI,kCAAkC1B,KAAKO,gBAE3CiG,EAAA,OAAAV,IAAA,2CACEiB,KAAK,OACLC,QAAQ,YACRC,KAAK,OACLC,MAAM,6BACNR,MAAM,qBAENF,EAAA,QAAAV,IAAA,2CACEqB,EAAE,oEACFF,KAAK,oBAKbT,EAAA,iBAAAV,IAAA,2CAAesB,QAAQ,iBAAiBV,MAAM,gBAC3C1G,KAAKgD,cAIZwD,EAAA,OAAAV,IAAA,2CACEY,MAAM,YAAW,aACL1G,KAAK4C,mBACjBgE,KAAK,QAELJ,EAAA,QAAAV,IAAA,gD","ignoreList":[]}
|
1
|
+
{"version":3,"names":["icPopoverMenuCss","IcPopoverMenuStyle0","MENU_SELECTOR","PopoverMenu","constructor","hostRef","this","ARIA_LABEL","popoverMenuEls","openingFromChild","openingFromParent","popperProps","fixedPositioning","submenuLevel","theme","open","undefined","setButtonFocus","_a","currentFocus","focus","findAnchorEl","anchor","anchorElement","submenuId","console","error","document","querySelector","indexOf","isNotPopoverMenuEl","ev","id","tagName","target","getNextItemToSelect","currentItem","movingDown","numButtons","length","nextItem","addMenuItems","elements","i","el","push","groupSlotWrapper","shadowRoot","menuGroupElements","getSlotElements","getMenuAriaLabel","ariaLabel","getAttribute","isPropDefined","parentLabel","handleBackButtonClick","parentPopover","openFromChild","initPopperJS","anchorEl","popperInstance","createPopper","Object","assign","strategy","placement","modifiers","name","options","offset","fallbackPlacements","rootBoundary","watchOpenHandler","popoverArr","parentElement","querySelectorAll","forEach","popover","some","menuItem","backButton","unshift","setTimeout","destroy","disconnectedCallback","componentDidLoad","slotWrapper","popoverMenuElements","componentWillRender","componentDidRender","handleMenuItemClick","detail","submenuTriggerFor","label","closeMenu","handleSubmenuChange","childEl","openFromParent","handleClick","handleKeyDown","key","preventDefault","blur","setFocusToAnchor","menuElement","icPopoverClosed","emit","setExternalPopperProps","props","render","h","Host","class","menu","role","ref","onClick","slot","viewBox","fill","xmlns","d","variant"],"sources":["src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-popover-nav-text);\n\n --ic-typography-color: var(--ic-popover-nav-text);\n\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-color: var(--ic-popover-border);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-popover-background);\n visibility: hidden;\n height: 0;\n display: flex;\n flex-direction: column;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.ic-popover-menu-open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.ic-popover-menu-open) .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n --ic-typography-color: var(--ic-popover-parent-label);\n\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport {\n createPopper,\n Instance as PopperInstance,\n Options,\n} from \"@popperjs/core\";\nimport { IcThemeMode } from \"../../utils/types\";\n\nconst MENU_SELECTOR = \"div.menu-body\";\n\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n private anchorEl: HTMLElement | null;\n private ARIA_LABEL: string = \"aria-label\";\n private backButton?: HTMLIcMenuItemElement;\n private currentFocus: number;\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n private popperInstance: PopperInstance | null;\n\n @Element() el: HTMLIcPopoverMenuElement;\n\n @State() openingFromChild: boolean = false;\n @State() openingFromParent: boolean = false;\n @State() popperProps: Partial<Options> = {};\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor?: string;\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() fixedPositioning: boolean = false;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel?: number = 1;\n\n /**\n * 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 * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open?: boolean | undefined =\n undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n const popoverArr = this.el.parentElement?.querySelectorAll(\n `ic-popover-menu`\n ) as NodeListOf<HTMLIcPopoverMenuElement>;\n if (this.open) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.backButton && this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n } else if (this.popperInstance) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n /**\n * Emitted when the popover menu is closed.\n */\n @Event() icPopoverClosed: EventEmitter<HTMLIcMenuItemElement>;\n\n disconnectedCallback(): void {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.el.shadowRoot?.querySelector(MENU_SELECTOR);\n if (slotWrapper) {\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n }\n\n if (\n this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n\n this.watchOpenHandler();\n }\n\n componentWillRender(): void {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n\n componentDidRender(): void {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(ev: CustomEvent<HTMLIcMenuItemElement>): void {\n if (!ev.detail.submenuTriggerFor && ev.detail.label !== \"Back\") {\n this.closeMenu(false, ev.detail);\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel! + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(\n this.currentFocus,\n ev.key === \"ArrowDown\"\n );\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n ev.preventDefault();\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string | undefined): HTMLElement | null => {\n let anchorElement: HTMLElement | null = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const { id, tagName } = ev.target as HTMLElement;\n return (\n id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n /**\n * @internal Close the menu, emit icPopoverClosed of the root popover\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n @Method()\n async closeMenu(\n setFocusToAnchor = false,\n menuElement?: HTMLIcMenuItemElement\n ): Promise<void> {\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor, menuElement);\n } else {\n if (setFocusToAnchor) {\n this.anchorEl?.focus();\n }\n this.icPopoverClosed.emit(menuElement);\n }\n }\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of the popover menu\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot?.querySelector(\n \".menu-items-wrapper\"\n );\n if (groupSlotWrapper) {\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n menuGroupElements && this.addMenuItems(menuGroupElements);\n }\n }\n }\n };\n\n private getMenuAriaLabel = (): string | null => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover?.openFromChild();\n this.open = false;\n };\n\n private initPopperJS = () => {\n if (this.anchorEl) {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n strategy: this.fixedPositioning ? \"fixed\" : \"absolute\",\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n ...this.popperProps,\n });\n }\n };\n\n render() {\n return (\n <Host\n class={{\n [\"ic-popover-menu-open\"]: !!this.open,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }}\n >\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n >\n <span\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {isPropDefined(this.submenuId) && (\n <span>\n <span role=\"menu\">\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n </span>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </span>\n )}\n <div\n class=\"menu-body\"\n aria-label={this.getMenuAriaLabel()}\n role=\"menu\"\n >\n <slot></slot>\n </div>\n </span>\n </div>\n </Host>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KAAKK,YAAciG,C,CAkFrB,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAX,IAAA,2CACHY,MAAO,CACL,CAAC,0BAA2B1G,KAAKS,KACjC,CAAC,YAAYT,KAAKQ,SAAUR,KAAKQ,QAAU,YAG7CgG,EAAA,OAAAV,IAAA,2CACEpE,GACE1B,KAAKkD,gBAAkBxC,UACnB,sBAAsBV,KAAKkB,YAC3B,GAENwF,MAAO,CACLC,KAAM,OAGRH,EAAA,QAAAV,IAAA,2CACEY,MAAO,CACL,sBAAuB1G,KAAKI,kBAC5B,qBAAsBJ,KAAKG,mBAG5B4C,EAAc/C,KAAKkB,YAClBsF,EAAA,QAAAV,IAAA,4CACEU,EAAA,QAAAV,IAAA,2CAAMc,KAAK,QACTJ,EAAA,gBAAAV,IAAA,2CACEY,MAAM,iCACNG,IAAMvE,GAAQtC,KAAK0E,WAAapC,EAChCiD,MAAM,OACNuB,QAAS9G,KAAKiD,sBACdvB,GAAI,kCAAkC1B,KAAKO,gBAE3CiG,EAAA,OAAAV,IAAA,2CACEiB,KAAK,OACLC,QAAQ,YACRC,KAAK,OACLC,MAAM,6BACNR,MAAM,qBAENF,EAAA,QAAAV,IAAA,2CACEqB,EAAE,oEACFF,KAAK,oBAKbT,EAAA,iBAAAV,IAAA,2CAAesB,QAAQ,iBAAiBV,MAAM,gBAC3C1G,KAAKgD,cAIZwD,EAAA,OAAAV,IAAA,2CACEY,MAAM,YAAW,aACL1G,KAAK4C,mBACjBgE,KAAK,QAELJ,EAAA,QAAAV,IAAA,gD","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as e,c as o,h as t,H as i,g as r}from"./p-8e4e97b4.js";import{a}from"./p-bddf799a.js";import{g as n,f as c,h as s,a as d,i as l,v as f,I as b}from"./p-b57e59b7.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--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)}}';const m=p;const g=class{constructor(t){e(this,t);this.footerResized=o(this,"footerResized",7);this.resizeObserver=null;this.hostMutationObserver=null;this.deviceSize=a.XL;this.foregroundColor=n();this.aligned="left";this.breakpoint="medium";this.copyright=true;this.groupLinks=false;this.resizeObserverCallback=e=>{if(e!==this.deviceSize){this.deviceSize=e}this.footerResized.emit()};this.runResizeObserver=()=>{if(this.footerEl){this.resizeObserver=new ResizeObserver((()=>{const e=c();this.resizeObserverCallback(e)}));this.resizeObserver.observe(this.footerEl)}}}disconnectedCallback(){var e;if(this.resizeObserver!==null){this.resizeObserver.disconnect()}(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){this.deviceSize=c()}componentDidLoad(){s(this.runResizeObserver);this.hostMutationObserver=new MutationObserver((e=>d(e,"link",this)));this.hostMutationObserver.observe(this.el,{childList:true})}brandChangeHandler(e){this.foregroundColor=e.detail.mode}isSmall(){const e=this.breakpoint;return e==="extra small"?this.deviceSize<a.XS:e==="small"?this.deviceSize<a.S:e==="medium"?this.deviceSize<a.M:e==="large"?this.deviceSize<a.L:e==="extra large"?this.deviceSize<a.XL:false}render(){const{aligned:e,caption:o,copyright:r,description:n,deviceSize:c,el:s,foregroundColor:d,groupLinks:p}=this;const m=this.isSmall();const g=l(s,"logo")||l(s,"caption")||o||r;return t(i,{key:"5e9f3b92157b9ffa5fc6e2dbe8f8a5c6a63a6237",class:{["ic-footer"]:true,[`ic-footer-${m?"small":"sparse"}`]:true,[`ic-footer-${p?"grouped":"ungrouped"}`]:true,[`ic-footer-foreground-${d}`]:true,[`ic-footer-${b.Dark}`]:d===b.Dark,[`ic-footer-${b.Light}`]:d===b.Light}},t("footer",{key:"cfae5dcdd5a431bba915b83e5ef2ae2347d5bb6d",ref:e=>this.footerEl=e},(l(s,"description")||n)&&t("div",{key:"9f960b8fcae0e3281b177bcfe1adf365657406dc",class:"footer-description"},t("ic-section-container",{key:"49455d77e8d5e9e8a1199dc0dcc00226291e9adc",aligned:e,fullHeight:true},t("div",{key:"dab1fa34ca43acd9ff4c354f324c7c426d53c77b",class:"footer-description-inner"},t("ic-typography",{key:"484158672386c4fed447390ab0d92bfd759a9272",variant:"body"},t("slot",{key:"4a500553fd0f76a8d4f7ef8410dbd927896561b1",name:"description"},n))))),l(s,"link")&&t("div",{key:"ed8613714e2bf4d79cd062f55f2b716d3e0cd304",class:"footer-links"},p&&m?t("div",{class:"footer-links-inner",role:"list"},t("slot",{name:"link"})):t("ic-section-container",{fullHeight:true,aligned:e},t("div",{class:"footer-links-inner",role:"list"},t("slot",{name:"link"})))),g&&t("div",{key:"c3876f5fa89d39f28e64db1bc0fca90978102a01",class:"footer-compliance"},t("ic-section-container",{key:"3e169ea49bcd2698b84c58f8105b0915777d8bf3",aligned:e,fullHeight:true},t("div",{key:"9cfaa13eb736d3aa44b15db43221bf28bf4deb57",class:"footer-compliance-inner"},l(s,"logo")&&t("div",{key:"853fdedd70405ebb2e96cec2adc6407e5ed11538",class:"footer-logo"},t("slot",{key:"4eaaad7a4f17cd51cbdab414cdbadf3096891d38",name:"logo"})),(l(s,"caption")||o)&&t("div",{key:"44a611218c4ea0f494df1551ecb26a8687d57a95",class:"footer-caption"},t("ic-typography",{key:"b970144c7d85b7e05e319233be68cc91ef2d0476",variant:c<=a.M?"caption":"body"},t("slot",{key:"512d173a680ddd65b3583bada7530aa67d3f1f98",name:"caption"},o))),r&&t("div",{key:"604ac3c72ae99883f27fdb609202782f6069bfde",class:{["footer-copyright"]:true,["classification-spacing"]:f()}},t("ic-typography",{key:"144bbc0144a865f8a55a1df5606cea9dfa87b5e8",variant:c<=a.M?"caption-uppercase":"label-uppercase"},"© Crown Copyright")))))))}get el(){return r(this)}};g.style=m;export{g as ic_footer};
|
2
|
+
//# sourceMappingURL=p-e6dacbe2.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["icFooterCss","IcFooterStyle0","Footer","constructor","hostRef","this","resizeObserver","hostMutationObserver","deviceSize","IC_DEVICE_SIZES","XL","foregroundColor","getBrandForegroundAppearance","aligned","breakpoint","copyright","groupLinks","resizeObserverCallback","currSize","footerResized","emit","runResizeObserver","footerEl","ResizeObserver","getCurrentDeviceSize","observe","disconnectedCallback","disconnect","_a","componentWillLoad","componentDidLoad","checkResizeObserver","MutationObserver","mutationList","renderDynamicChildSlots","el","childList","brandChangeHandler","ev","detail","mode","isSmall","bp","XS","S","M","L","render","caption","description","small","showComplianceSection","isSlotUsed","h","Host","key","class","IcBrandForegroundEnum","Dark","Light","ref","fullHeight","variant","name","role","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"],"mappings":"qJAAA,MAAMA,EAAc,47IACpB,MAAAC,EAAeD,E,MCuCFE,EAAM,MALnB,WAAAC,CAAAC,G,uDAOUC,KAAAC,eAAwC,KACxCD,KAAAE,qBAAgD,KAI/CF,KAAAG,WAAqBC,EAAgBC,GACrCL,KAAAM,gBAAqCC,IAKtCP,KAAAQ,QAAwB,OAKxBR,KAAAS,WAAmC,SAUnCT,KAAAU,UAAsB,KAUtBV,KAAAW,WAAuB,MAoDvBX,KAAAY,uBAA0BC,IAChC,GAAIA,IAAab,KAAKG,WAAY,CAChCH,KAAKG,WAAaU,C,CAEpBb,KAAKc,cAAcC,MAAM,EAGnBf,KAAAgB,kBAAoB,KAC1B,GAAIhB,KAAKiB,SAAU,CACjBjB,KAAKC,eAAiB,IAAIiB,gBAAe,KACvC,MAAML,EAAWM,IACjBnB,KAAKY,uBAAuBC,EAAS,IAGvCb,KAAKC,eAAemB,QAAQpB,KAAK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oreList":[]}
|
1
|
+
{"version":3,"names":["icFooterCss","IcFooterStyle0","Footer","constructor","hostRef","this","resizeObserver","hostMutationObserver","deviceSize","IC_DEVICE_SIZES","XL","foregroundColor","getBrandForegroundAppearance","aligned","breakpoint","copyright","groupLinks","resizeObserverCallback","currSize","footerResized","emit","runResizeObserver","footerEl","ResizeObserver","getCurrentDeviceSize","observe","disconnectedCallback","disconnect","_a","componentWillLoad","componentDidLoad","checkResizeObserver","MutationObserver","mutationList","renderDynamicChildSlots","el","childList","brandChangeHandler","ev","detail","mode","isSmall","bp","XS","S","M","L","render","caption","description","small","showComplianceSection","isSlotUsed","h","Host","key","class","IcBrandForegroundEnum","Dark","Light","ref","fullHeight","variant","name","role","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"],"mappings":"6KAAA,MAAMA,EAAc,47IACpB,MAAAC,EAAeD,E,MCuCFE,EAAM,MALnB,WAAAC,CAAAC,G,uDAOUC,KAAAC,eAAwC,KACxCD,KAAAE,qBAAgD,KAI/CF,KAAAG,WAAqBC,EAAgBC,GACrCL,KAAAM,gBAAqCC,IAKtCP,KAAAQ,QAAwB,OAKxBR,KAAAS,WAAmC,SAUnCT,KAAAU,UAAsB,KAUtBV,KAAAW,WAAuB,MAoDvBX,KAAAY,uBAA0BC,IAChC,GAAIA,IAAab,KAAKG,WAAY,CAChCH,KAAKG,WAAaU,C,CAEpBb,KAAKc,cAAcC,MAAM,EAGnBf,KAAAgB,kBAAoB,KAC1B,GAAIhB,KAAKiB,SAAU,CACj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C,oBAAqB,KACtB,CAAC,0BAA2BS,MAG9BZ,EAAA,iBAAAE,IAAA,2CACEO,QACEtD,GAAcC,EAAgBoC,EAC1B,oBACA,mBAAiB,0B","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as i,c as t,h as e,F as s,H as a,g as o}from"./p-8e4e97b4.js";import{c as n}from"./p-f074ef5b.js";import{h as r,u as l,i as h,o as d}from"./p-b57e59b7.js";import"./p-bddf799a.js";const c='/*! 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{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0}:host(.ic-dialog-fade-in){opacity:1}:host(.disable-height-constraint){background:none;justify-content:unset;align-items:unset}.dialog.disable-height-constraint{max-height:none;position:relative}.dialog.disable-height-constraint .content-area{overflow-y:visible}@media (prefers-reduced-motion: no-preference){:host{transition:opacity var(--ic-easing-transition-slow)}.dialog{transform:translateY(-3rem);transition:transform 1000s}:host(.ic-dialog-fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}}:host(.ic-dialog-hidden){display:none}.dialog{background-color:var(--ic-dialog-background);color:var(--ic-dialog-text-primary);--ic-typography-color:var(--ic-dialog-text-primary);border:var(--ic-space-1px) solid var(--ic-dialog-border);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) 0 var(--ic-space-md);display:flex;flex-direction:column;box-sizing:border-box;overflow-x:visible}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs);padding:0 var(--ic-space-md)}.heading{overflow-wrap:break-word}.close-icon{margin-left:auto}.close-icon>svg{color:var(--ic-dialog-clear-button)}.content-area{padding:0 var(--ic-space-md);margin:0;overflow-y:auto}#dialog-content{margin-bottom:var(--ic-space-sm)}#dialog-content ::slotted(ic-typography){overflow-wrap:break-word}#dialog-content ::slotted(*){position:relative}.dialog-controls{margin-top:auto;padding:var(--ic-space-xs) var(--ic-space-md) 0;display:flex;justify-content:flex-end;gap:var(--ic-space-md)}.dialog-control-button{width:-moz-fit-content;width:fit-content}.backdrop{overflow-y:auto;position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);padding-top:16px;padding-bottom:16px}.heading ic-typography{--ic-typography-color:var(--ic-dialog-text-primary)}.label ic-typography{--ic-typography-color:var(--ic-dialog-label)}@media (min-width: 800px){:host([size="large"]) .dialog:not(.disable-width-constraint)>.content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;max-width:none;max-height:none;box-sizing:border-box}.backdrop{padding:0}.dialog.disable-height-constraint{height:auto;min-height:100vh}}@media (max-width: 364px){.dialog-control-button{width:unset}}';const g=c;const b=class{constructor(a){i(this,a);this.icDialogCancelled=t(this,"icDialogCancelled",7);this.icDialogClosed=t(this,"icDialogClosed",7);this.icDialogConfirmed=t(this,"icDialogConfirmed",7);this.icDialogOpened=t(this,"icDialogOpened",7);this.contentAreaMutationObserver=null;this.DATA_GETS_FOCUS="data-gets-focus";this.DIALOG_CONTROLS="dialog-controls";this.dialogHeight=0;this.focusedElementIndex=0;this.IC_TEXT_FIELD="IC-TEXT-FIELD";this.IC_ACCORDION="IC-ACCORDION";this.IC_ACCORDION_GROUP="IC-ACCORDION-GROUP";this.IC_CHECKBOX="IC-CHECKBOX";this.IC_SEARCH_BAR="IC-SEARCH-BAR";this.IC_TAB_CONTEXT="IC-TAB-CONTEXT";this.resizeObserver=null;this.dialogRendered=false;this.fadeIn=false;this.closeOnBackdropClick=true;this.destructive=false;this.dismissLabel="Dismiss";this.disableHeightConstraint=false;this.disableWidthConstraint=false;this.hideCloseButton=false;this.hideDefaultControls=false;this.open=false;this.size="small";this.theme="inherit";this.dialogOpened=()=>{var i,t;this.dialogRendered=true;if(this.disableHeightConstraint){(i=this.dialogEl)===null||i===void 0?void 0:i.show()}else{(t=this.dialogEl)===null||t===void 0?void 0:t.showModal()}setTimeout((()=>{this.fadeIn=true;if(this.backdropEl&&this.disableHeightConstraint&&this.backdropEl.scrollTop!==0){this.backdropEl.scrollTop=0}}),10);setTimeout((()=>{this.setInitialFocus();r(this.runResizeObserver)}),75);setTimeout((()=>{this.icDialogOpened.emit()}),80)};this.runResizeObserver=()=>{if(this.dialogEl){this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout(this.resizeObserverCallback,80)}));this.resizeObserver.observe(this.dialogEl)}};this.resizeObserverCallback=()=>{if(this.dialogEl&&this.dialogEl.clientHeight!==this.dialogHeight){this.dialogHeight=this.dialogEl.clientHeight}};this.refreshInteractiveElementsOnSlotChange=()=>{var i,t,e;const s=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector("#dialog-content");if(s){this.contentArea=s.querySelector("slot");(t=this.contentArea)===null||t===void 0?void 0:t.addEventListener("slotchange",this.getInteractiveElements);this.contentAreaMutationObserver=new MutationObserver((()=>{this.getInteractiveElements()}));(e=l(s))===null||e===void 0?void 0:e.forEach((i=>{var t;(t=this.contentAreaMutationObserver)===null||t===void 0?void 0:t.observe(i,{childList:true,subtree:true})}))}};this.removeSlotChangeListener=()=>{var i;if(this.contentArea){this.contentArea.removeEventListener("slotchange",this.getInteractiveElements);(i=this.contentAreaMutationObserver)===null||i===void 0?void 0:i.disconnect()}};this.setInitialFocus=()=>{this.sourceElement=document.activeElement;this.focusedElementIndex=this.interactiveElementList?this.interactiveElementList.findIndex((i=>i.hasAttribute(this.DATA_GETS_FOCUS))):0;this.focusElement(this.interactiveElementList[this.focusedElementIndex])};this.getFocusedElementIndex=()=>{var i;for(let t=0;t<this.interactiveElementList.length;t++){if(this.interactiveElementList[t]===(((i=this.el.shadowRoot)===null||i===void 0?void 0:i.activeElement)||document.activeElement)){this.focusedElementIndex=t}}};this.closeIconClick=()=>{this.open=false};this.getInteractiveElements=()=>{var i;this.interactiveElementList=Array.from(((i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll("ic-button"))||[]);const t=Array.from(this.el.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex="-1"]),\n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-context,\n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button,\n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion, ic-date-input, ic-date-picker`));if(t.length>0){if(t[0].slot!==this.DIALOG_CONTROLS){t[0].setAttribute(this.DATA_GETS_FOCUS,"")}else if(!this.destructive){t[t.length-1].setAttribute(this.DATA_GETS_FOCUS,"")}}for(let i=0;i<t.length;i++){this.interactiveElementList.splice(1+i,0,t[i])}};this.getNextFocusEl=i=>this.interactiveElementList[i];this.onTabKeyPress=i=>{this.getFocusedElementIndex();if(this.interactiveElementList[this.focusedElementIndex].tagName===this.IC_SEARCH_BAR){return false}this.setFocusIndexBasedOnShiftKey(i);this.loopNextFocusIndexIfLastElement();this.focusElement(this.getNextFocusEl(this.focusedElementIndex),i);return true};this.shouldSkipElement=i=>{const t=getComputedStyle(i).visibility==="hidden"||i.offsetHeight===0||i.hasAttribute("disabled")||i.tagName===this.IC_ACCORDION_GROUP&&i.hasAttribute("single-expansion");const e=i.closest("ic-radio-option");return t||i.getAttribute("type")==="radio"&&!!e&&!(e.hasAttribute("selected")||i.tabIndex===0)};this.focusElement=(i,t=false)=>{let e=i;if(this.shouldSkipElement(i)){this.setFocusIndexBasedOnShiftKey(t);this.loopNextFocusIndexIfLastElement();e=this.getNextFocusEl(this.focusedElementIndex);this.focusElement(e,t)}else{switch(i.tagName){case this.IC_ACCORDION_GROUP:case this.IC_ACCORDION:case this.IC_SEARCH_BAR:case this.IC_TEXT_FIELD:case this.IC_CHECKBOX:case this.IC_TAB_CONTEXT:i.setFocus();break;default:i.focus()}}};this.renderDialog=()=>{const{hideDefaultControls:i,size:t,heading:a,label:o,destructive:r,dismissLabel:l,hideCloseButton:d,disableHeightConstraint:c,disableWidthConstraint:g,closeIconClick:b,DIALOG_CONTROLS:p}=this;const u=h(this.el,p);return e("dialog",{class:{dialog:true,[`${t}`]:true,"disable-height-constraint":!!c,"disable-width-constraint":!!g},"aria-labelledby":"dialog-label dialog-heading","aria-describedby":"dialog-alert dialog-content",ref:i=>this.dialogEl=i},e("div",{class:"heading-area"},e("div",{class:"heading-content"},e("div",{class:"label"},e("slot",{name:"label"},e("ic-typography",{variant:"label",id:"dialog-label"},o))),e("div",{class:"heading"},e("slot",{name:"heading"},e("ic-typography",{variant:"h4",id:"dialog-heading"},a)))),!d&&e("ic-button",{class:"close-icon",variant:"icon-tertiary",innerHTML:n,"aria-label":l,onClick:b,"data-gets-focus":r||i&&!u?"":null})),e("div",{class:"content-area"},h(this.el,"alert")&&e("slot",{name:"alert"}),e("div",{id:"dialog-content"},e("slot",null))),(u||!i)&&e("div",{class:{[p]:true}},u?e("slot",{name:p}):e(s,null,e("ic-button",{variant:"tertiary",onClick:()=>this.cancelDialog(),class:"dialog-control-button","data-gets-focus":null},"Cancel"),e("ic-button",{variant:r?"destructive":"primary",onClick:()=>this.confirmDialog(),class:"dialog-control-button","data-gets-focus":""},"Confirm"))))}}watchOpenHandler(){if(this.open){this.dialogOpened()}else{this.fadeIn=false;if(this.resizeObserver!==null){this.resizeObserver.disconnect()}setTimeout((()=>{var i,t;this.dialogRendered=false;(i=this.dialogEl)===null||i===void 0?void 0:i.close();(t=this.sourceElement)===null||t===void 0?void 0:t.focus();this.dialogHeight=0;this.icDialogClosed.emit()}),80)}}disconnectedCallback(){this.removeSlotChangeListener()}componentDidLoad(){this.getInteractiveElements();this.refreshInteractiveElementsOnSlotChange();if(this.open){this.dialogOpened()}!h(this.el,"heading")&&d([{prop:this.heading,propName:"heading"}],"Dialog")}componentDidRender(){document.body.style.overflow=getComputedStyle(this.el).display!=="none"&&this.disableHeightConstraint?"hidden":"auto"}handleKeyboard(i){if(this.dialogRendered){switch(i.key){case"Tab":if(this.onTabKeyPress(i.shiftKey)){i.preventDefault()}break;case"Escape":if(!i.repeat){this.open=false}i.stopImmediatePropagation();break}}}handleClick(i){if(this.dialogEl&&this.closeOnBackdropClick&&i.composedPath().indexOf(this.dialogEl)<=0){const{top:t,height:e,left:s,width:a}=this.dialogEl.getBoundingClientRect();const o=t<=i.clientY&&i.clientY<=t+e&&s<=i.clientX&&i.clientX<=s+a;if(!o){this.open=false}}}async cancelDialog(){this.icDialogCancelled.emit();this.open=false}async confirmDialog(){this.icDialogConfirmed.emit()}loopNextFocusIndexIfLastElement(){if(this.focusedElementIndex>this.interactiveElementList.length-1)this.focusedElementIndex=0;else if(this.focusedElementIndex<0){this.focusedElementIndex=this.interactiveElementList.length-1}}setFocusIndexBasedOnShiftKey(i){if(i){this.focusedElementIndex-=1}else{this.focusedElementIndex+=1}}render(){const{dialogRendered:i,disableHeightConstraint:t,fadeIn:s,theme:o}=this;return e(a,{key:"6de63d3d94afa349dc9bb5b30296837bbf89f810",class:{"ic-dialog-hidden":!i,"ic-dialog-fade-in":s,"disable-height-constraint":!!t,[`ic-theme-${o}`]:o!=="inherit"}},t?e("div",{class:"backdrop",ref:i=>this.backdropEl=i},this.renderDialog()):this.renderDialog())}get el(){return o(this)}static get watchers(){return{open:["watchOpenHandler"]}}};b.style=g;export{b as ic_dialog};
|
2
|
+
//# sourceMappingURL=p-e9d28e02.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icDialogCss","IcDialogStyle0","Dialog","constructor","hostRef","this","contentAreaMutationObserver","DATA_GETS_FOCUS","DIALOG_CONTROLS","dialogHeight","focusedElementIndex","IC_TEXT_FIELD","IC_ACCORDION","IC_ACCORDION_GROUP","IC_CHECKBOX","IC_SEARCH_BAR","IC_TAB_CONTEXT","resizeObserver","dialogRendered","fadeIn","closeOnBackdropClick","destructive","dismissLabel","disableHeightConstraint","disableWidthConstraint","hideCloseButton","hideDefaultControls","open","size","theme","dialogOpened","_a","dialogEl","show","_b","showModal","setTimeout","backdropEl","scrollTop","setInitialFocus","checkResizeObserver","runResizeObserver","icDialogOpened","emit","ResizeObserver","clearTimeout","resizeTimeout","window","resizeObserverCallback","observe","clientHeight","refreshInteractiveElementsOnSlotChange","contentWrapper","el","shadowRoot","querySelector","contentArea","addEventListener","getInteractiveElements","MutationObserver","_c","getSlotElements","forEach","childList","subtree","removeSlotChangeListener","removeEventListener","disconnect","sourceElement","document","activeElement","interactiveElementList","findIndex","element","hasAttribute","focusElement","getFocusedElementIndex","i","length","closeIconClick","Array","from","querySelectorAll","slottedInteractiveElements","slot","setAttribute","splice","getNextFocusEl","onTabKeyPress","shiftKey","tagName","setFocusIndexBasedOnShiftKey","loopNextFocusIndexIfLastElement","shouldSkipElement","isHidden","getComputedStyle","visibility","offsetHeight","radioEl","closest","getAttribute","tabIndex","nextFocusEl","setFocus","focus","renderDialog","heading","label","controlsSlotUsed","isSlotUsed","h","class","dialog","ref","name","variant","id","innerHTML","closeIcon","onClick","Fragment","cancelDialog","confirmDialog","watchOpenHandler","close","icDialogClosed","disconnectedCallback","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentDidRender","body","style","overflow","display","handleKeyboard","ev","key","preventDefault","repeat","stopImmediatePropagation","handleClick","composedPath","indexOf","top","height","left","width","getBoundingClientRect","isInDialog","clientY","clientX","icDialogCancelled","icDialogConfirmed","render","Host"],"sources":["src/components/ic-dialog/ic-dialog.css?tag=ic-dialog&encapsulation=shadow","src/components/ic-dialog/ic-dialog.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-dialog: z-index of dialog \n */\n\n:host {\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100% !important;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n opacity: 0;\n}\n\n:host(.ic-dialog-fade-in) {\n opacity: 1;\n}\n\n:host(.disable-height-constraint) {\n background: none;\n justify-content: unset;\n align-items: unset;\n}\n\n.dialog.disable-height-constraint {\n max-height: none;\n position: relative;\n}\n\n.dialog.disable-height-constraint .content-area {\n overflow-y: visible;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host {\n transition: opacity var(--ic-easing-transition-slow);\n }\n\n .dialog {\n transform: translateY(-3rem);\n transition: transform 1000s;\n }\n\n :host(.ic-dialog-fade-in) .dialog {\n transform: translateY(0);\n transition: transform var(--ic-easing-transition-slow);\n }\n}\n\n:host(.ic-dialog-hidden) {\n display: none;\n}\n\n.dialog {\n background-color: var(--ic-dialog-background);\n color: var(--ic-dialog-text-primary);\n\n --ic-typography-color: var(--ic-dialog-text-primary);\n\n border: var(--ic-space-1px) solid var(--ic-dialog-border);\n border-radius: var(--ic-border-radius);\n padding: var(--ic-space-xs) 0 var(--ic-space-md);\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n overflow-x: visible;\n}\n\n.small {\n width: 50%;\n max-width: 25rem;\n min-height: 11rem;\n max-height: 70vh;\n}\n\n.medium {\n width: 70vw;\n max-width: 44rem;\n min-height: 12.5rem;\n max-height: 70vh;\n}\n\n.large {\n width: 90vw;\n max-width: 62.5rem;\n min-height: 12.5rem;\n max-height: 90vh;\n}\n\n.heading-area {\n display: flex;\n margin-bottom: var(--ic-space-xs);\n padding: 0 var(--ic-space-md);\n}\n\n.heading {\n overflow-wrap: break-word;\n}\n\n.close-icon {\n margin-left: auto;\n}\n\n.close-icon > svg {\n color: var(--ic-dialog-clear-button);\n}\n\n.content-area {\n padding: 0 var(--ic-space-md);\n margin: 0;\n overflow-y: auto;\n}\n\n#dialog-content {\n margin-bottom: var(--ic-space-sm);\n}\n\n#dialog-content ::slotted(ic-typography) {\n overflow-wrap: break-word;\n}\n\n#dialog-content ::slotted(*) {\n position: relative;\n}\n\n.dialog-controls {\n margin-top: auto;\n padding: var(--ic-space-xs) var(--ic-space-md) 0;\n display: flex;\n justify-content: flex-end;\n gap: var(--ic-space-md);\n}\n\n.dialog-control-button {\n width: fit-content;\n}\n\n.backdrop {\n overflow-y: auto;\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n padding-top: 16px;\n padding-bottom: 16px;\n}\n\n.heading ic-typography {\n --ic-typography-color: var(--ic-dialog-text-primary);\n}\n\n.label ic-typography {\n --ic-typography-color: var(--ic-dialog-label);\n}\n\n@media (min-width: 800px) {\n :host([size=\"large\"]) .dialog:not(.disable-width-constraint) > .content-area {\n width: 75%;\n }\n}\n\n@media (max-width: 576px) {\n .dialog {\n width: 100vw;\n height: 100vh;\n max-width: none;\n max-height: none;\n box-sizing: border-box;\n }\n\n .backdrop {\n padding: 0;\n }\n\n .dialog.disable-height-constraint {\n height: auto;\n min-height: 100vh;\n }\n}\n\n@media (max-width: 364px) {\n .dialog-control-button {\n width: unset;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n State,\n Method,\n Listen,\n Watch,\n h,\n Fragment,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport {\n isSlotUsed,\n checkResizeObserver,\n onComponentRequiredPropUndefined,\n getSlotElements,\n} from \"../../utils/helpers\";\nimport { IcFocusableComponents, IcThemeMode } from \"../../utils/types\";\n\n/**\n * @slot dialog-controls - Content will be place at the bottom of the dialog.\n * @slot heading - Content will be placed at the top of the dialog.\n * @slot label - Content will be placed above the dialog heading.\n * @slot alert - Content will be placed at the top of the content area of the dialog.\n */\n@Component({\n tag: \"ic-dialog\",\n styleUrl: \"ic-dialog.css\",\n shadow: true,\n})\nexport class Dialog {\n private backdropEl?: HTMLDivElement;\n private contentArea: HTMLSlotElement | null;\n private contentAreaMutationObserver: MutationObserver | null = null;\n private DATA_GETS_FOCUS: string = \"data-gets-focus\";\n private DIALOG_CONTROLS: string = \"dialog-controls\";\n private dialogEl?: HTMLDialogElement;\n private dialogHeight: number = 0;\n private focusedElementIndex = 0;\n private IC_TEXT_FIELD: string = \"IC-TEXT-FIELD\";\n private IC_ACCORDION: string = \"IC-ACCORDION\";\n private IC_ACCORDION_GROUP: string = \"IC-ACCORDION-GROUP\";\n private IC_CHECKBOX = \"IC-CHECKBOX\";\n private IC_SEARCH_BAR: string = \"IC-SEARCH-BAR\";\n private IC_TAB_CONTEXT: string = \"IC-TAB-CONTEXT\";\n private interactiveElementList: HTMLElement[];\n private resizeObserver: ResizeObserver | null = null;\n private resizeTimeout: number;\n private sourceElement: HTMLElement;\n\n @Element() el: HTMLIcDialogElement;\n\n @State() dialogRendered: boolean = false;\n @State() fadeIn: boolean = false;\n\n /**\n * If set to `false`, the dialog will not close when the backdrop is clicked.\n */\n @Prop() closeOnBackdropClick?: boolean = true;\n\n /**\n * If 'true', sets the 'primary' or rightmost button to the destructive variant. Stops initial focus being set on the 'primary' or rightmost default or slotted button.\n */\n @Prop() destructive?: boolean = false;\n\n /**\n * Sets the dismiss label tooltip and aria label.\n */\n @Prop() dismissLabel?: string = \"Dismiss\";\n\n /**\n * If set to `true`, the content area max height and overflow properties are removed allowing the dialog to stretch below the fold.\n * This prop also prevents popover elements from being cut off within the content area.\n */\n @Prop() disableHeightConstraint?: boolean = false;\n\n /**\n * If set to `true`, the content area width property is removed, allowing content to take the full width of the dialog when using the large variant.\n */\n @Prop() disableWidthConstraint?: boolean = false;\n\n /**\n * If `true`, the close button will not be displayed.\n */\n @Prop() hideCloseButton?: boolean = false;\n\n /**\n * If set to `true`, default button controls will not be shown, but slotted dialog controls will still be displayed.\n */\n @Prop() hideDefaultControls: boolean = false;\n\n /**\n * Sets the heading for the dialog.\n */\n @Prop() heading?: string;\n\n /**\n * Sets the optional label for the dialog which appears above the heading.\n */\n @Prop() label?: string;\n\n /**\n * If `true`, the dialog will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n if (this.open) {\n this.dialogOpened();\n } else {\n this.fadeIn = false;\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n setTimeout(() => {\n this.dialogRendered = false;\n this.dialogEl?.close();\n this.sourceElement?.focus();\n this.dialogHeight = 0;\n this.icDialogClosed.emit();\n }, 80);\n }\n }\n\n /**\n * Sets the maximum and minimum height and width for the dialog.\n */\n @Prop() size?: \"small\" | \"medium\" | \"large\" = \"small\";\n\n /**\n * 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 * Cancelation event emitted when default 'Cancel' button clicked or 'cancelDialog' method is called.\n */\n @Event() icDialogCancelled: EventEmitter<void>;\n\n /**\n * Emitted when dialog has closed.\n */\n @Event() icDialogClosed: EventEmitter<void>;\n\n /**\n * Confirmation event emitted when default 'Confirm' primary button clicked or 'confirmDialog' method is called.\n */\n @Event() icDialogConfirmed: EventEmitter<void>;\n\n /**\n * Emitted when dialog has opened.\n */\n @Event() icDialogOpened: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.removeSlotChangeListener();\n }\n\n componentDidLoad(): void {\n this.getInteractiveElements();\n\n this.refreshInteractiveElementsOnSlotChange();\n\n if (this.open) {\n this.dialogOpened();\n }\n\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Dialog\"\n );\n }\n\n componentDidRender(): void {\n document.body.style.overflow =\n getComputedStyle(this.el).display !== \"none\" &&\n this.disableHeightConstraint\n ? \"hidden\"\n : \"auto\";\n }\n\n @Listen(\"keydown\", { target: \"document\" })\n handleKeyboard(ev: KeyboardEvent): void {\n if (this.dialogRendered) {\n switch (ev.key) {\n case \"Tab\":\n if (this.onTabKeyPress(ev.shiftKey)) {\n ev.preventDefault();\n }\n break;\n case \"Escape\":\n if (!ev.repeat) {\n this.open = false;\n }\n ev.stopImmediatePropagation();\n break;\n }\n }\n }\n\n @Listen(\"click\", {})\n handleClick(ev: MouseEvent): void {\n if (\n this.dialogEl &&\n this.closeOnBackdropClick &&\n ev.composedPath().indexOf(this.dialogEl) <= 0\n ) {\n const { top, height, left, width } =\n this.dialogEl.getBoundingClientRect();\n const isInDialog =\n top <= ev.clientY &&\n ev.clientY <= top + height &&\n left <= ev.clientX &&\n ev.clientX <= left + width;\n if (!isInDialog) {\n this.open = false;\n }\n }\n }\n\n /**\n * Cancels the dialog. Used by the default 'Cancel' button or can be called manually to trigger cancelling of dialog.\n */\n @Method()\n async cancelDialog(): Promise<void> {\n this.icDialogCancelled.emit();\n this.open = false;\n }\n\n /**\n * Confirms the dialog. Used by the default 'Confirm' button or can be called manually to trigger confirming of dialog.\n */\n @Method()\n async confirmDialog(): Promise<void> {\n this.icDialogConfirmed.emit();\n }\n\n private dialogOpened = () => {\n this.dialogRendered = true;\n\n if (this.disableHeightConstraint) {\n this.dialogEl?.show();\n } else {\n this.dialogEl?.showModal();\n }\n\n setTimeout(() => {\n this.fadeIn = true;\n\n /**\n * This is required to set scroll back to top if:\n * - dialog content goes below the fold\n * - is closed using cancel or confirm and reopened.\n *\n * Without this, the scroll bar will start from the dialog's last scroll-x coordinate.\n */\n if (\n this.backdropEl &&\n this.disableHeightConstraint &&\n this.backdropEl.scrollTop !== 0\n ) {\n this.backdropEl.scrollTop = 0;\n }\n }, 10);\n\n setTimeout(() => {\n this.setInitialFocus();\n checkResizeObserver(this.runResizeObserver);\n }, 75);\n\n setTimeout(() => {\n this.icDialogOpened.emit();\n }, 80);\n };\n\n private runResizeObserver = () => {\n if (this.dialogEl) {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = window.setTimeout(this.resizeObserverCallback, 80);\n });\n this.resizeObserver.observe(this.dialogEl);\n }\n };\n\n private resizeObserverCallback = () => {\n if (this.dialogEl && this.dialogEl.clientHeight !== this.dialogHeight) {\n this.dialogHeight = this.dialogEl.clientHeight;\n }\n };\n\n private refreshInteractiveElementsOnSlotChange = () => {\n const contentWrapper = this.el.shadowRoot?.querySelector(\"#dialog-content\");\n\n if (contentWrapper) {\n this.contentArea = contentWrapper.querySelector(\"slot\");\n\n // Detect changes to slotted elements\n this.contentArea?.addEventListener(\n \"slotchange\",\n this.getInteractiveElements\n );\n\n this.contentAreaMutationObserver = new MutationObserver(() => {\n this.getInteractiveElements();\n });\n\n // Detect changes to children of slotted elements\n getSlotElements(contentWrapper)?.forEach((el) => {\n this.contentAreaMutationObserver?.observe(el, {\n childList: true,\n subtree: true,\n });\n });\n }\n };\n\n private removeSlotChangeListener = () => {\n if (this.contentArea) {\n this.contentArea.removeEventListener(\n \"slotchange\",\n this.getInteractiveElements\n );\n\n this.contentAreaMutationObserver?.disconnect();\n }\n };\n\n private setInitialFocus = () => {\n this.sourceElement = document.activeElement as HTMLElement;\n this.focusedElementIndex = this.interactiveElementList\n ? this.interactiveElementList.findIndex((element) =>\n element.hasAttribute(this.DATA_GETS_FOCUS)\n )\n : 0;\n this.focusElement(this.interactiveElementList[this.focusedElementIndex]);\n };\n\n private getFocusedElementIndex = () => {\n for (let i = 0; i < this.interactiveElementList.length; i++) {\n if (\n (this.interactiveElementList[i] as HTMLElement) ===\n (this.el.shadowRoot?.activeElement || document.activeElement)\n ) {\n this.focusedElementIndex = i;\n }\n }\n };\n\n private closeIconClick = () => {\n this.open = false;\n };\n\n private getInteractiveElements = () => {\n this.interactiveElementList = Array.from(\n this.el.shadowRoot?.querySelectorAll(\"ic-button\") || []\n );\n const slottedInteractiveElements = Array.from(\n this.el.querySelectorAll(\n `a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex=\"-1\"]),\n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-context,\n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible=\"true\"], ic-footer-link, ic-link, ic-navigation-button,\n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion, ic-date-input, ic-date-picker`\n )\n );\n if (slottedInteractiveElements.length > 0) {\n if (slottedInteractiveElements[0].slot !== this.DIALOG_CONTROLS) {\n slottedInteractiveElements[0].setAttribute(this.DATA_GETS_FOCUS, \"\");\n } else if (!this.destructive) {\n slottedInteractiveElements[\n slottedInteractiveElements.length - 1\n ].setAttribute(this.DATA_GETS_FOCUS, \"\");\n }\n }\n for (let i = 0; i < slottedInteractiveElements.length; i++) {\n this.interactiveElementList.splice(\n 1 + i,\n 0,\n slottedInteractiveElements[i] as HTMLElement\n );\n }\n };\n\n private getNextFocusEl = (focusedElementIndex: number) =>\n this.interactiveElementList[focusedElementIndex];\n\n private onTabKeyPress = (shiftKey: boolean): boolean => {\n this.getFocusedElementIndex();\n\n if (\n this.interactiveElementList[this.focusedElementIndex].tagName ===\n this.IC_SEARCH_BAR\n ) {\n return false;\n }\n\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n\n this.focusElement(this.getNextFocusEl(this.focusedElementIndex), shiftKey);\n return true;\n };\n\n private shouldSkipElement = (element: HTMLElement): boolean => {\n const isHidden =\n getComputedStyle(element).visibility === \"hidden\" ||\n element.offsetHeight === 0 ||\n element.hasAttribute(\"disabled\") ||\n (element.tagName === this.IC_ACCORDION_GROUP &&\n element.hasAttribute(\"single-expansion\"));\n\n const radioEl = element.closest(\"ic-radio-option\");\n\n return (\n isHidden ||\n (element.getAttribute(\"type\") === \"radio\" &&\n !!radioEl &&\n !(radioEl.hasAttribute(\"selected\") || element.tabIndex === 0))\n );\n };\n\n private focusElement = (element: HTMLElement, shiftKey = false) => {\n let nextFocusEl = element;\n\n if (this.shouldSkipElement(element)) {\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n\n nextFocusEl = this.getNextFocusEl(this.focusedElementIndex);\n this.focusElement(nextFocusEl, shiftKey);\n } else {\n switch (element.tagName) {\n case this.IC_ACCORDION_GROUP:\n case this.IC_ACCORDION:\n case this.IC_SEARCH_BAR:\n case this.IC_TEXT_FIELD:\n case this.IC_CHECKBOX:\n case this.IC_TAB_CONTEXT:\n (element as IcFocusableComponents).setFocus();\n break;\n default:\n (element as HTMLElement).focus();\n }\n }\n };\n\n private loopNextFocusIndexIfLastElement() {\n if (this.focusedElementIndex > this.interactiveElementList.length - 1)\n this.focusedElementIndex = 0;\n else if (this.focusedElementIndex < 0) {\n this.focusedElementIndex = this.interactiveElementList.length - 1;\n }\n }\n\n private setFocusIndexBasedOnShiftKey(shiftKey: boolean) {\n if (shiftKey) {\n this.focusedElementIndex -= 1;\n } else {\n this.focusedElementIndex += 1;\n }\n }\n\n private renderDialog = () => {\n const {\n hideDefaultControls,\n size,\n heading,\n label,\n destructive,\n dismissLabel,\n hideCloseButton,\n disableHeightConstraint,\n disableWidthConstraint,\n closeIconClick,\n DIALOG_CONTROLS,\n } = this;\n\n const controlsSlotUsed = isSlotUsed(this.el, DIALOG_CONTROLS);\n\n return (\n <dialog\n class={{\n dialog: true,\n [`${size}`]: true,\n \"disable-height-constraint\": !!disableHeightConstraint,\n \"disable-width-constraint\": !!disableWidthConstraint,\n }}\n aria-labelledby=\"dialog-label dialog-heading\"\n aria-describedby=\"dialog-alert dialog-content\"\n ref={(el) => (this.dialogEl = el)}\n >\n <div class=\"heading-area\">\n <div class=\"heading-content\">\n <div class=\"label\">\n <slot name=\"label\">\n <ic-typography variant=\"label\" id=\"dialog-label\">\n {label}\n </ic-typography>\n </slot>\n </div>\n <div class=\"heading\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\" id=\"dialog-heading\">\n {heading}\n </ic-typography>\n </slot>\n </div>\n </div>\n {!hideCloseButton && (\n <ic-button\n class=\"close-icon\"\n variant=\"icon-tertiary\"\n innerHTML={closeIcon}\n aria-label={dismissLabel}\n onClick={closeIconClick}\n data-gets-focus={\n destructive || (hideDefaultControls && !controlsSlotUsed)\n ? \"\"\n : null\n }\n ></ic-button>\n )}\n </div>\n <div class=\"content-area\">\n {isSlotUsed(this.el, \"alert\") && <slot name=\"alert\" />}\n <div id=\"dialog-content\">\n <slot />\n </div>\n </div>\n {(controlsSlotUsed || !hideDefaultControls) && (\n <div\n class={{\n [DIALOG_CONTROLS]: true,\n }}\n >\n {controlsSlotUsed ? (\n <slot name={DIALOG_CONTROLS} />\n ) : (\n <Fragment>\n <ic-button\n variant=\"tertiary\"\n onClick={() => this.cancelDialog()}\n class=\"dialog-control-button\"\n data-gets-focus={null}\n >\n Cancel\n </ic-button>\n <ic-button\n variant={destructive ? \"destructive\" : \"primary\"}\n onClick={() => this.confirmDialog()}\n class=\"dialog-control-button\"\n data-gets-focus=\"\"\n >\n Confirm\n </ic-button>\n </Fragment>\n )}\n </div>\n )}\n </dialog>\n );\n };\n\n render() {\n const { dialogRendered, disableHeightConstraint, fadeIn, theme } = this;\n\n return (\n <Host\n class={{\n \"ic-dialog-hidden\": !dialogRendered,\n \"ic-dialog-fade-in\": fadeIn,\n \"disable-height-constraint\": !!disableHeightConstraint,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n {disableHeightConstraint ? (\n <div class=\"backdrop\" ref={(el) => (this.backdropEl = el)}>\n {this.renderDialog()}\n </div>\n ) : (\n this.renderDialog()\n )}\n </Host>\n );\n }\n}\n"],"mappings":"4LAAA,MAAMA,EAAc,89JACpB,MAAAC,EAAeD,E,MCiCFE,EAAM,MALnB,WAAAC,CAAAC,G,kNAQUC,KAAAC,4BAAuD,KACvDD,KAAAE,gBAA0B,kBAC1BF,KAAAG,gBAA0B,kBAE1BH,KAAAI,aAAuB,EACvBJ,KAAAK,oBAAsB,EACtBL,KAAAM,cAAwB,gBACxBN,KAAAO,aAAuB,eACvBP,KAAAQ,mBAA6B,qBAC7BR,KAAAS,YAAc,cACdT,KAAAU,cAAwB,gBACxBV,KAAAW,eAAy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g as n,o as l}from"./p-b57e59b7.js";import"./p-bddf799a.js";const s='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host(.footer-link-group-sparse){--footer-link-group-margin-right:5.938rem;--footer-link-group-border-bottom:0 solid transparent;--footer-link-label-margin-top:0;--footer-link-label-margin-bottom:var(--ic-space-md)}:host(.footer-link-group-small){--footer-link-group-margin-right:0;--footer-link-label-margin-top:var(--ic-space-md);--footer-link-label-margin-bottom:var(--ic-space-md);--footer-link-group-links-padding-left:var(--ic-space-md);--footer-link-group-links-padding-bottom:var(--ic-space-md);--footer-link-group-border-bottom:var(--ic-space-1px) solid\n var(--ic-footer-keyline)}:host(.footer-link-group){margin-right:var(--footer-link-group-margin-right);border-bottom:var(--footer-link-group-border-bottom)}:host(.footer-link-group-small:hover){background-color:var(--ic-footer-hover);cursor:pointer}:host(.footer-link-group-sparse:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small:active){background-color:var(--ic-footer-pressed)}:host ic-section-container{outline:none}.footer-link-label{margin-top:var(--footer-link-label-margin-top);margin-bottom:var(--footer-link-label-margin-bottom);flex-grow:1}.footer-link-group-toggle{fill:var(--ic-footer-chevron-icon) !important}.footer-link-group-links{display:flex;flex-direction:column}.footer-link-group-header{display:flex;align-items:center}ic-typography{--ic-typography-color:var(--ic-footer-link)}';const a=s;const p=class{constructor(o){e(this,o);this.expanded=false;this.deviceSize=r.XL;this.dropdownIconStyle=n();this.small=false;this.handleKeydown=e=>{if(e.key===" "||e.key==="Enter"){this.toggleExpanded()}};this.toggleExpanded=()=>{this.expanded=!this.expanded}}componentWillLoad(){this.small=this.isSmall(this.el)}componentDidLoad(){l([{prop:this.label,propName:"label"}],"Footer Link Group")}footerResizeHandler(){this.small=this.isSmall(this.el)}footerBrandChangeHandler(e){this.dropdownIconStyle=e.detail.mode}isSmall(e){if(e.parentElement!==null){if(e.parentElement.classList.contains("ic-footer")){return e.parentElement.classList.contains("ic-footer-small")}else{return this.isSmall(e.parentElement)}}else{return false}}render(){const{small:e,label:i}=this;return!e?o(t,{class:{["footer-link-group footer-link-group-sparse"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true},role:"listitem"},o("div",{class:"footer-link-label"},o("ic-typography",{variant:"subtitle-small"},i)),o("div",{class:"footer-link-group-links",role:"list"},o("slot",null))):o(t,{class:{["footer-link-group footer-link-group-small"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true},onClick:this.toggleExpanded,onKeydown:this.handleKeydown,"aria-expanded":this.expanded,role:"listitem"},o("ic-section-container",{tabindex:"0",fullHeight:true},o("div",{class:"footer-link-group-header"},o("div",{class:"footer-link-label"},o("ic-typography",{variant:"label"},i)),this.expanded?o("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},o("path",{fill:"currentColor",d:"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z"})):o("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},o("g",{transform:"translate(0 1200) scale(1 -1)"},o("path",{fill:"currentColor",d:"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z"})))),this.expanded&&o("div",{class:"footer-link-group-links",role:"list"},o("slot",null))))}static get delegatesFocus(){return true}get el(){return i(this)}};p.style=a;export{p as ic_footer_link_group};
|
2
|
+
//# sourceMappingURL=p-ea06792a.entry.js.map
|