@ukic/web-components 3.23.0 → 3.25.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/core.cjs.js +1 -1
- package/dist/cjs/{helpers-81cd6930.js → helpers-51bab4b5.js} +9 -68
- package/dist/cjs/helpers-51bab4b5.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +17 -9
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +6 -6
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js +3 -3
- package/dist/cjs/ic-dialog.cjs.entry.js +41 -29
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +5 -5
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -6
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +35 -34
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +6 -6
- 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 +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-page-header.cjs.entry.js +7 -7
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +6 -6
- package/dist/cjs/ic-pagination-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination_3.cjs.entry.js +28 -26
- package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-radio-group.cjs.entry.js +7 -7
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +9 -7
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +10 -10
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-side-navigation.cjs.entry.js +5 -5
- 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 +3 -3
- package/dist/cjs/ic-step.cjs.entry.js +14 -14
- package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
- package/dist/cjs/ic-switch.cjs.entry.js +7 -9
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +6 -6
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +5 -5
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -4
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +2 -2
- package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
- package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
- package/dist/collection/components/ic-dialog/ic-dialog.js +41 -29
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -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.js +3 -3
- 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.js +3 -3
- 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-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-bar/ic-pagination-bar.js +5 -5
- 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 +15 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +9 -9
- 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 +48 -4
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +29 -444
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +7 -5
- 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 +10 -10
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.js +18 -16
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.types.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +4 -4
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
- package/dist/collection/components/ic-step/ic-step.js +13 -13
- package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
- package/dist/collection/components/ic-switch/ic-switch.css +108 -43
- package/dist/collection/components/ic-switch/ic-switch.js +9 -11
- package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
- package/dist/collection/components/ic-switch/ic-switch.stories.js +8 -4
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +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.js +5 -5
- package/dist/collection/components/ic-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.js +5 -5
- 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-group/ic-toggle-button-group.js +2 -2
- package/dist/collection/components/ic-tooltip/ic-tooltip.css +21 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +33 -3
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +128 -6
- package/dist/collection/components/ic-typography/ic-typography.js +2 -2
- package/dist/collection/utils/helpers.js +8 -66
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +9 -67
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-action-chip.js +1 -1
- package/dist/components/ic-alert.js +1 -1
- package/dist/components/ic-card-horizontal.js +6 -6
- package/dist/components/ic-card-vertical.js +1 -1
- package/dist/components/ic-checkbox-group.js +2 -2
- package/dist/components/ic-checkbox.js +4 -4
- package/dist/components/ic-chip.js +1 -1
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-dialog.js +41 -29
- 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.js +2 -2
- package/dist/components/ic-footer.js +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 +4 -4
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-label2.js +2 -2
- package/dist/components/ic-input-validation2.js +3 -3
- 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 +1 -1
- package/dist/components/ic-loading-indicator2.js +5 -5
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu2.js +30 -29
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +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-page-header.js +6 -6
- package/dist/components/ic-pagination-bar.js +6 -6
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination2.js +4 -4
- package/dist/components/ic-popover-menu.js +4 -4
- package/dist/components/ic-radio-group.js +6 -6
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +8 -6
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +10 -10
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select2.js +19 -17
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +5 -5
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-step.js +13 -13
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-switch.js +6 -8
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +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-field2.js +6 -6
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +6 -6
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +3 -3
- package/dist/components/ic-tooltip2.js +13 -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/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-3aed13ba.entry.js → p-023cf5d9.entry.js} +2 -2
- package/dist/core/{p-fb9376f0.entry.js → p-043a5677.entry.js} +2 -2
- package/dist/core/p-171a19bf.entry.js +3 -0
- package/dist/core/p-171a19bf.entry.js.map +1 -0
- package/dist/core/{p-347cc084.entry.js → p-19056c16.entry.js} +2 -2
- package/dist/core/{p-b777f0a1.entry.js → p-1cfaa962.entry.js} +2 -2
- package/dist/core/{p-659d048d.entry.js → p-23fb87be.entry.js} +2 -2
- package/dist/core/{p-f661ba76.entry.js → p-2424f82f.entry.js} +2 -2
- package/dist/core/{p-2691cc80.entry.js → p-243ae8fe.entry.js} +2 -2
- package/dist/core/{p-aad03a3c.entry.js → p-271ee0bc.entry.js} +2 -2
- package/dist/core/{p-67de1290.entry.js → p-2b1ce5b7.entry.js} +2 -2
- package/dist/core/p-343670b4.entry.js +2 -0
- package/dist/core/p-343670b4.entry.js.map +1 -0
- package/dist/core/{p-61d79fc6.entry.js → p-3da9774b.entry.js} +2 -2
- package/dist/core/{p-0fb7f915.entry.js → p-3ee66d00.entry.js} +2 -2
- package/dist/core/{p-ea7a3d30.entry.js → p-3f001e75.entry.js} +2 -2
- package/dist/core/{p-09505807.entry.js → p-406647b8.entry.js} +2 -2
- package/dist/core/{p-9cb83a2e.entry.js → p-44d043f7.entry.js} +2 -2
- package/dist/core/{p-4f56acff.entry.js → p-46e5a58b.entry.js} +2 -2
- package/dist/core/{p-cfbacca1.entry.js → p-4dbc72f4.entry.js} +2 -2
- package/dist/core/p-526dd099.entry.js +2 -0
- package/dist/core/p-526dd099.entry.js.map +1 -0
- package/dist/core/{p-f64996f1.entry.js → p-5fc0dc36.entry.js} +2 -2
- package/dist/core/{p-7b538fd1.entry.js → p-61799a8b.entry.js} +2 -2
- package/dist/core/{p-90678e67.entry.js → p-6b5edd6b.entry.js} +2 -2
- package/dist/core/p-70ca7796.entry.js +2 -0
- package/dist/core/p-70ca7796.entry.js.map +1 -0
- package/dist/core/{p-daec7e69.entry.js → p-72f52f20.entry.js} +2 -2
- package/dist/core/{p-9c2b2cb9.entry.js → p-74a3a450.entry.js} +2 -2
- package/dist/core/{p-c156e6e9.entry.js → p-796fc111.entry.js} +2 -2
- package/dist/core/{p-b52c44eb.entry.js → p-85232cec.entry.js} +2 -2
- package/dist/core/{p-b997ad5e.entry.js → p-85ac0d78.entry.js} +2 -2
- package/dist/core/{p-1b81ec88.entry.js → p-8fc5e9f9.entry.js} +2 -2
- package/dist/core/p-8fc5e9f9.entry.js.map +1 -0
- package/dist/core/{p-48a628f0.entry.js → p-9267c160.entry.js} +2 -2
- package/dist/core/{p-393af2bc.entry.js → p-970e190c.entry.js} +2 -2
- package/dist/core/p-98dee727.entry.js +2 -0
- package/dist/core/p-98dee727.entry.js.map +1 -0
- package/dist/core/{p-e938eb31.entry.js → p-99b20121.entry.js} +2 -2
- package/dist/core/{p-aaf4e367.entry.js → p-9ae157de.entry.js} +2 -2
- package/dist/core/{p-80d85403.entry.js → p-9b48971f.entry.js} +2 -2
- package/dist/core/{p-73043f57.entry.js → p-9ced00a7.entry.js} +2 -2
- package/dist/core/{p-bb7652cd.entry.js → p-a0c54a50.entry.js} +2 -2
- package/dist/core/{p-880f7548.entry.js → p-a5fcb9c1.entry.js} +2 -2
- package/dist/core/{p-a780a34b.entry.js → p-a7c263bd.entry.js} +2 -2
- package/dist/core/{p-99433296.entry.js → p-ab104baa.entry.js} +2 -2
- package/dist/core/{p-ef70ea50.entry.js → p-b27e147d.entry.js} +2 -2
- package/dist/core/{p-9502fb86.entry.js → p-b58fb588.entry.js} +2 -2
- package/dist/core/p-bb52e752.entry.js +2 -0
- package/dist/core/p-bb52e752.entry.js.map +1 -0
- package/dist/core/{p-2b87c592.entry.js → p-c0b70c08.entry.js} +2 -2
- package/dist/core/{p-46fd555f.entry.js → p-c41fd2cf.entry.js} +2 -2
- package/dist/core/{p-5900cb65.entry.js → p-c82c2362.entry.js} +2 -2
- package/dist/core/{p-e7767c0d.entry.js → p-ca64b7ba.entry.js} +2 -2
- package/dist/core/{p-cad23b7d.entry.js → p-cd963de6.entry.js} +2 -2
- package/dist/core/{p-735d3096.entry.js → p-cf669574.entry.js} +2 -2
- package/dist/core/{p-83578f1d.entry.js → p-cf87b6db.entry.js} +2 -2
- package/dist/core/{p-05fd2707.entry.js → p-d0d324b4.entry.js} +2 -2
- package/dist/core/{p-ea890d3d.entry.js → p-d0dd9f2c.entry.js} +2 -2
- package/dist/core/{p-5976de6e.entry.js → p-d1220d2a.entry.js} +2 -2
- package/dist/core/{p-50dca790.entry.js → p-d5fcd4f9.entry.js} +2 -2
- package/dist/core/{p-56de4f4b.entry.js → p-d7c6fc8d.entry.js} +2 -2
- package/dist/core/{p-506d428a.entry.js → p-d8de5b88.entry.js} +2 -2
- package/dist/core/{p-53ab3c0f.entry.js → p-e35f15ec.entry.js} +2 -2
- package/dist/core/p-e5266c19.entry.js +2 -0
- package/dist/core/p-e5266c19.entry.js.map +1 -0
- package/dist/core/{p-09caf7ed.entry.js → p-ec1ea1a7.entry.js} +2 -2
- package/dist/core/{p-b77b1e1f.js → p-eeb8d98a.js} +2 -2
- package/dist/core/p-eeb8d98a.js.map +1 -0
- package/dist/core/{p-2a124daf.entry.js → p-ef96e1aa.entry.js} +2 -2
- package/dist/core/{p-2bd80913.entry.js → p-fc4b7d2b.entry.js} +2 -2
- package/dist/core/{p-8a833e82.entry.js → p-fd9ea62a.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-66681c73.js → helpers-33039856.js} +10 -68
- package/dist/esm/helpers-33039856.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-action-chip.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +17 -9
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +6 -6
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +3 -3
- package/dist/esm/ic-checkbox.entry.js +5 -5
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js +3 -3
- package/dist/esm/ic-dialog.entry.js +41 -29
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +3 -3
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +3 -3
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +5 -5
- package/dist/esm/ic-horizontal-scroll.entry.js +6 -6
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +35 -34
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +6 -6
- 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 +2 -2
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +2 -2
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -5
- package/dist/esm/ic-page-header.entry.js +7 -7
- package/dist/esm/ic-pagination-bar.entry.js +6 -6
- package/dist/esm/ic-pagination-item.entry.js +2 -2
- package/dist/esm/ic-pagination_3.entry.js +28 -26
- package/dist/esm/ic-pagination_3.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +5 -5
- package/dist/esm/ic-radio-group.entry.js +7 -7
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +9 -7
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +10 -10
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-side-navigation.entry.js +5 -5
- 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 +3 -3
- package/dist/esm/ic-step.entry.js +14 -14
- package/dist/esm/ic-stepper.entry.js +3 -3
- package/dist/esm/ic-switch.entry.js +7 -9
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -3
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +2 -2
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +6 -6
- package/dist/esm/ic-toggle-button-group.entry.js +3 -3
- package/dist/esm/ic-toggle-button.entry.js +3 -3
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +2 -1
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +2 -2
- package/dist/types/components/ic-select/ic-select.types.d.ts +2 -1
- package/dist/types/components/ic-switch/ic-switch.d.ts +2 -2
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +8 -0
- package/dist/types/components.d.ts +12 -4
- package/dist/types/utils/helpers.d.ts +0 -31
- package/hydrate/index.js +263 -294
- package/hydrate/index.mjs +263 -294
- package/package.json +10 -9
- package/vscode-data.json +13 -3
- package/dist/cjs/helpers-81cd6930.js.map +0 -1
- package/dist/core/p-1b81ec88.entry.js.map +0 -1
- package/dist/core/p-6b4ec95f.entry.js +0 -3
- package/dist/core/p-6b4ec95f.entry.js.map +0 -1
- package/dist/core/p-a08d6b46.entry.js +0 -2
- package/dist/core/p-a08d6b46.entry.js.map +0 -1
- package/dist/core/p-a2953aad.entry.js +0 -2
- package/dist/core/p-a2953aad.entry.js.map +0 -1
- package/dist/core/p-a321feee.entry.js +0 -2
- package/dist/core/p-a321feee.entry.js.map +0 -1
- package/dist/core/p-b77b1e1f.js.map +0 -1
- package/dist/core/p-cbca04bb.entry.js +0 -2
- package/dist/core/p-cbca04bb.entry.js.map +0 -1
- package/dist/core/p-cc64e5ef.entry.js +0 -2
- package/dist/core/p-cc64e5ef.entry.js.map +0 -1
- package/dist/core/p-f84ac9c6.entry.js +0 -2
- package/dist/core/p-f84ac9c6.entry.js.map +0 -1
- package/dist/esm/helpers-66681c73.js.map +0 -1
- /package/dist/core/{p-3aed13ba.entry.js.map → p-023cf5d9.entry.js.map} +0 -0
- /package/dist/core/{p-fb9376f0.entry.js.map → p-043a5677.entry.js.map} +0 -0
- /package/dist/core/{p-347cc084.entry.js.map → p-19056c16.entry.js.map} +0 -0
- /package/dist/core/{p-b777f0a1.entry.js.map → p-1cfaa962.entry.js.map} +0 -0
- /package/dist/core/{p-659d048d.entry.js.map → p-23fb87be.entry.js.map} +0 -0
- /package/dist/core/{p-f661ba76.entry.js.map → p-2424f82f.entry.js.map} +0 -0
- /package/dist/core/{p-2691cc80.entry.js.map → p-243ae8fe.entry.js.map} +0 -0
- /package/dist/core/{p-aad03a3c.entry.js.map → p-271ee0bc.entry.js.map} +0 -0
- /package/dist/core/{p-67de1290.entry.js.map → p-2b1ce5b7.entry.js.map} +0 -0
- /package/dist/core/{p-61d79fc6.entry.js.map → p-3da9774b.entry.js.map} +0 -0
- /package/dist/core/{p-0fb7f915.entry.js.map → p-3ee66d00.entry.js.map} +0 -0
- /package/dist/core/{p-ea7a3d30.entry.js.map → p-3f001e75.entry.js.map} +0 -0
- /package/dist/core/{p-09505807.entry.js.map → p-406647b8.entry.js.map} +0 -0
- /package/dist/core/{p-9cb83a2e.entry.js.map → p-44d043f7.entry.js.map} +0 -0
- /package/dist/core/{p-4f56acff.entry.js.map → p-46e5a58b.entry.js.map} +0 -0
- /package/dist/core/{p-cfbacca1.entry.js.map → p-4dbc72f4.entry.js.map} +0 -0
- /package/dist/core/{p-f64996f1.entry.js.map → p-5fc0dc36.entry.js.map} +0 -0
- /package/dist/core/{p-7b538fd1.entry.js.map → p-61799a8b.entry.js.map} +0 -0
- /package/dist/core/{p-90678e67.entry.js.map → p-6b5edd6b.entry.js.map} +0 -0
- /package/dist/core/{p-daec7e69.entry.js.map → p-72f52f20.entry.js.map} +0 -0
- /package/dist/core/{p-9c2b2cb9.entry.js.map → p-74a3a450.entry.js.map} +0 -0
- /package/dist/core/{p-c156e6e9.entry.js.map → p-796fc111.entry.js.map} +0 -0
- /package/dist/core/{p-b52c44eb.entry.js.map → p-85232cec.entry.js.map} +0 -0
- /package/dist/core/{p-b997ad5e.entry.js.map → p-85ac0d78.entry.js.map} +0 -0
- /package/dist/core/{p-48a628f0.entry.js.map → p-9267c160.entry.js.map} +0 -0
- /package/dist/core/{p-393af2bc.entry.js.map → p-970e190c.entry.js.map} +0 -0
- /package/dist/core/{p-e938eb31.entry.js.map → p-99b20121.entry.js.map} +0 -0
- /package/dist/core/{p-aaf4e367.entry.js.map → p-9ae157de.entry.js.map} +0 -0
- /package/dist/core/{p-80d85403.entry.js.map → p-9b48971f.entry.js.map} +0 -0
- /package/dist/core/{p-73043f57.entry.js.map → p-9ced00a7.entry.js.map} +0 -0
- /package/dist/core/{p-bb7652cd.entry.js.map → p-a0c54a50.entry.js.map} +0 -0
- /package/dist/core/{p-880f7548.entry.js.map → p-a5fcb9c1.entry.js.map} +0 -0
- /package/dist/core/{p-a780a34b.entry.js.map → p-a7c263bd.entry.js.map} +0 -0
- /package/dist/core/{p-99433296.entry.js.map → p-ab104baa.entry.js.map} +0 -0
- /package/dist/core/{p-ef70ea50.entry.js.map → p-b27e147d.entry.js.map} +0 -0
- /package/dist/core/{p-9502fb86.entry.js.map → p-b58fb588.entry.js.map} +0 -0
- /package/dist/core/{p-2b87c592.entry.js.map → p-c0b70c08.entry.js.map} +0 -0
- /package/dist/core/{p-46fd555f.entry.js.map → p-c41fd2cf.entry.js.map} +0 -0
- /package/dist/core/{p-5900cb65.entry.js.map → p-c82c2362.entry.js.map} +0 -0
- /package/dist/core/{p-e7767c0d.entry.js.map → p-ca64b7ba.entry.js.map} +0 -0
- /package/dist/core/{p-cad23b7d.entry.js.map → p-cd963de6.entry.js.map} +0 -0
- /package/dist/core/{p-735d3096.entry.js.map → p-cf669574.entry.js.map} +0 -0
- /package/dist/core/{p-83578f1d.entry.js.map → p-cf87b6db.entry.js.map} +0 -0
- /package/dist/core/{p-05fd2707.entry.js.map → p-d0d324b4.entry.js.map} +0 -0
- /package/dist/core/{p-ea890d3d.entry.js.map → p-d0dd9f2c.entry.js.map} +0 -0
- /package/dist/core/{p-5976de6e.entry.js.map → p-d1220d2a.entry.js.map} +0 -0
- /package/dist/core/{p-50dca790.entry.js.map → p-d5fcd4f9.entry.js.map} +0 -0
- /package/dist/core/{p-56de4f4b.entry.js.map → p-d7c6fc8d.entry.js.map} +0 -0
- /package/dist/core/{p-506d428a.entry.js.map → p-d8de5b88.entry.js.map} +0 -0
- /package/dist/core/{p-53ab3c0f.entry.js.map → p-e35f15ec.entry.js.map} +0 -0
- /package/dist/core/{p-09caf7ed.entry.js.map → p-ec1ea1a7.entry.js.map} +0 -0
- /package/dist/core/{p-2a124daf.entry.js.map → p-ef96e1aa.entry.js.map} +0 -0
- /package/dist/core/{p-2bd80913.entry.js.map → p-fc4b7d2b.entry.js.map} +0 -0
- /package/dist/core/{p-8a833e82.entry.js.map → p-fd9ea62a.entry.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as closeIcon } from './close-icon.js';
|
|
3
|
-
import { c as checkResizeObserver, C as refreshInteractiveElementsOnSlotChange, E as focusElement, F as slottedInteractiveElements, i as isSlotUsed, o as onComponentRequiredPropUndefined
|
|
3
|
+
import { c as checkResizeObserver, C as refreshInteractiveElementsOnSlotChange, E as focusElement, F as slottedInteractiveElements, i as isSlotUsed, o as onComponentRequiredPropUndefined } from './helpers.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './ic-button2.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './ic-tooltip2.js';
|
|
@@ -23,7 +23,6 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends HTMLElement
|
|
|
23
23
|
this.DIALOG_CONTROLS = "dialog-controls";
|
|
24
24
|
this.dialogHeight = 0;
|
|
25
25
|
this.focusAttemptCount = 0;
|
|
26
|
-
this.focusedElementIndex = 0;
|
|
27
26
|
this.interactiveElementList = [];
|
|
28
27
|
this.resizeObserver = null;
|
|
29
28
|
this.dialogRendered = false;
|
|
@@ -132,6 +131,16 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends HTMLElement
|
|
|
132
131
|
this.contentAreaMutationObserver = contentAreaMutationObserver;
|
|
133
132
|
}
|
|
134
133
|
};
|
|
134
|
+
this.focusLast = () => {
|
|
135
|
+
if (this.interactiveElementList.length > 0) {
|
|
136
|
+
focusElement(this.focusAttemptCount, this.interactiveElementList.length - 1, this.interactiveElementList, true);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
this.focusFirst = () => {
|
|
140
|
+
if (this.interactiveElementList.length > 0) {
|
|
141
|
+
focusElement(this.focusAttemptCount, 0, this.interactiveElementList);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
135
144
|
this.setInitialFocus = () => {
|
|
136
145
|
this.sourceElement = document.activeElement;
|
|
137
146
|
if (!this.interactiveElementList.length) {
|
|
@@ -144,15 +153,14 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends HTMLElement
|
|
|
144
153
|
}, 10);
|
|
145
154
|
return;
|
|
146
155
|
}
|
|
147
|
-
|
|
148
|
-
if (
|
|
149
|
-
|
|
156
|
+
let focusedElementIndex = this.interactiveElementList.findIndex((element) => element.hasAttribute(this.DATA_GETS_FOCUS));
|
|
157
|
+
if (focusedElementIndex === -1) {
|
|
158
|
+
focusedElementIndex = 0;
|
|
150
159
|
}
|
|
151
|
-
if (this.interactiveElementList[
|
|
152
|
-
const focusElementResult = focusElement(this.focusAttemptCount,
|
|
160
|
+
if (this.interactiveElementList[focusedElementIndex]) {
|
|
161
|
+
const focusElementResult = focusElement(this.focusAttemptCount, focusedElementIndex, this.interactiveElementList);
|
|
153
162
|
if (focusElementResult) {
|
|
154
163
|
this.focusAttemptCount = focusElementResult.newFocusAttemptCount;
|
|
155
|
-
this.focusedElementIndex = focusElementResult.newFocusedElementIndex;
|
|
156
164
|
}
|
|
157
165
|
}
|
|
158
166
|
};
|
|
@@ -162,17 +170,32 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends HTMLElement
|
|
|
162
170
|
this.getInteractiveElements = () => {
|
|
163
171
|
var _a;
|
|
164
172
|
this.interactiveElementList = Array.from(((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("ic-button")) || []);
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
167
|
-
if (
|
|
168
|
-
|
|
173
|
+
const slottedElements = slottedInteractiveElements(this.el);
|
|
174
|
+
if (slottedElements.length > 0) {
|
|
175
|
+
if (slottedElements[0].slot !== this.DIALOG_CONTROLS) {
|
|
176
|
+
slottedElements[0].setAttribute(this.DATA_GETS_FOCUS, "");
|
|
169
177
|
}
|
|
170
178
|
else if (!this.destructive) {
|
|
171
|
-
|
|
179
|
+
slottedElements[slottedElements.length - 1].setAttribute(this.DATA_GETS_FOCUS, "");
|
|
172
180
|
}
|
|
173
181
|
}
|
|
174
|
-
|
|
175
|
-
|
|
182
|
+
// insert the slotted interactive elements after the close button in the focus order
|
|
183
|
+
if (slottedElements.length > 0 && this.interactiveElementList.length > 0) {
|
|
184
|
+
if (this.interactiveElementList[0].classList.contains("close-icon")) {
|
|
185
|
+
// if there is a close button, insert slotted interactive elements after it in the focus order
|
|
186
|
+
this.interactiveElementList = [
|
|
187
|
+
this.interactiveElementList[0],
|
|
188
|
+
...slottedElements,
|
|
189
|
+
...this.interactiveElementList.slice(1),
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
// if there is no close button, slotted interactive elements should be first in the focus order
|
|
194
|
+
this.interactiveElementList = [
|
|
195
|
+
...slottedElements,
|
|
196
|
+
...this.interactiveElementList,
|
|
197
|
+
];
|
|
198
|
+
}
|
|
176
199
|
}
|
|
177
200
|
};
|
|
178
201
|
this.renderDialog = () => {
|
|
@@ -183,11 +206,11 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends HTMLElement
|
|
|
183
206
|
[`${size}`]: true,
|
|
184
207
|
"disable-height-constraint": !!disableHeightConstraint,
|
|
185
208
|
"disable-width-constraint": !!disableWidthConstraint,
|
|
186
|
-
}, "aria-labelledby": "dialog-label dialog-heading", "aria-describedby": "dialog-alert dialog-content", ref: (el) => (this.dialogEl = el) }, h("div", { class: "heading-area" }, h("div", { class: "heading-content" }, h("div", { class: "label" }, h("slot", { name: "label" }, h("ic-typography", { variant: "label", id: "dialog-label" }, label))), h("div", { class: "heading" }, h("slot", { name: "heading" }, h("ic-typography", { variant: "h4", id: "dialog-heading" }, heading)))), !hideCloseButton && (h("ic-button", { class: "close-icon", variant: "icon-tertiary", innerHTML: closeIcon, "aria-label": dismissLabel, onClick: closeIconClick, "data-gets-focus": destructive || (hideDefaultControls && !controlsSlotUsed)
|
|
209
|
+
}, "aria-labelledby": "dialog-label dialog-heading", "aria-describedby": "dialog-alert dialog-content", ref: (el) => (this.dialogEl = el) }, h("div", { tabindex: "0", onFocus: this.focusLast }), h("div", { class: "heading-area" }, h("div", { class: "heading-content" }, h("div", { class: "label" }, h("slot", { name: "label" }, h("ic-typography", { variant: "label", id: "dialog-label" }, label))), h("div", { class: "heading" }, h("slot", { name: "heading" }, h("ic-typography", { variant: "h4", id: "dialog-heading" }, heading)))), !hideCloseButton && (h("ic-button", { class: "close-icon", variant: "icon-tertiary", innerHTML: closeIcon, "aria-label": dismissLabel, onClick: closeIconClick, "data-gets-focus": destructive || (hideDefaultControls && !controlsSlotUsed)
|
|
187
210
|
? ""
|
|
188
211
|
: null }))), h("div", { class: "content-area" }, isSlotUsed(this.el, "alert") && h("slot", { name: "alert" }), h("div", { id: "dialog-content" }, h("slot", null))), (controlsSlotUsed || !hideDefaultControls) && (h("div", { class: {
|
|
189
212
|
[DIALOG_CONTROLS]: true,
|
|
190
|
-
} }, controlsSlotUsed ? (h("slot", { name: DIALOG_CONTROLS })) : (h(Fragment, null, h("ic-button", { variant: "tertiary", onClick: () => this.cancelDialog(), class: "dialog-control-button", "data-gets-focus": null }, "Cancel"), h("ic-button", { variant: destructive ? "destructive" : "primary", onClick: () => this.confirmDialog(), class: "dialog-control-button", "data-gets-focus": "" }, "Confirm")))))));
|
|
213
|
+
} }, controlsSlotUsed ? (h("slot", { name: DIALOG_CONTROLS })) : (h(Fragment, null, h("ic-button", { variant: "tertiary", onClick: () => this.cancelDialog(), class: "dialog-control-button", "data-gets-focus": null }, "Cancel"), h("ic-button", { variant: destructive ? "destructive" : "primary", onClick: () => this.confirmDialog(), class: "dialog-control-button", "data-gets-focus": "" }, "Confirm"))))), h("div", { tabindex: "0", onFocus: this.focusFirst })));
|
|
191
214
|
};
|
|
192
215
|
}
|
|
193
216
|
watchOpenHandler() {
|
|
@@ -230,17 +253,6 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends HTMLElement
|
|
|
230
253
|
handleKeyboard(ev) {
|
|
231
254
|
if (this.dialogRendered) {
|
|
232
255
|
switch (ev.key) {
|
|
233
|
-
case "Tab": {
|
|
234
|
-
const tabKeyPressHandlerResult = handleFocusTrapTabKeyPress(this.el, this.focusAttemptCount, this.focusedElementIndex, this.interactiveElementList, ev.shiftKey);
|
|
235
|
-
this.focusAttemptCount =
|
|
236
|
-
tabKeyPressHandlerResult.newFocusAttemptCount;
|
|
237
|
-
this.focusedElementIndex =
|
|
238
|
-
tabKeyPressHandlerResult.newFocusedElementIndex;
|
|
239
|
-
if (tabKeyPressHandlerResult.preventDefault) {
|
|
240
|
-
ev.preventDefault();
|
|
241
|
-
}
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
244
256
|
case "Escape":
|
|
245
257
|
if (!ev.repeat) {
|
|
246
258
|
this.open = false;
|
|
@@ -279,7 +291,7 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends HTMLElement
|
|
|
279
291
|
}
|
|
280
292
|
render() {
|
|
281
293
|
const { dialogRendered, disableHeightConstraint, fadeIn, theme, size } = this;
|
|
282
|
-
return (h(Host, { key: '
|
|
294
|
+
return (h(Host, { key: '81eec3ff249b58950bfd8b0e525e46d8a5688db3', class: {
|
|
283
295
|
"ic-dialog-hidden": !dialogRendered,
|
|
284
296
|
"ic-dialog-fade-in": fadeIn,
|
|
285
297
|
"disable-height-constraint": !!disableHeightConstraint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"ic-dialog.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,o+JAAo+J,CAAC;AACz/J,uBAAe,WAAW;;MCoCb,MAAM;IALnB;;;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O,IAAI,GAAG,GAAG,MAAM;gBAC1B,IAAI,IAAI,EAAE,CAAC,OAAO;gBAClB,EAAE,CAAC,OAAO,IAAI,IAAI,GAAG,KAAK,CAAC;YAC7B,IAAI,CAAC,UAAU,EAAE;gBACf,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;aACnB;SACF;KACF;;;;IAMD,MAAM,YAAY;QAChB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KACnB;;;;IAMD,MAAM,aAAa;QACjB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;KAC/B;IA4PD,MAAM;QACJ,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GACpE,IAAI,CAAC;QAEP,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,kBAAkB,EAAE,CAAC,cAAc;gBACnC,mBAAmB,EAAE,MAAM;gBAC3B,2BAA2B,EAAE,CAAC,CAAC,uBAAuB;gBACtD,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;gBAC1C,CAAC,kBAAkB,IAAI,EAAE,GAAG,IAAI,IAAI,SAAS;aAC9C,IAEA,uBAAuB,IACtB,WAAK,KAAK,EAAC,UAAU,EAAC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,IACtD,IAAI,CAAC,YAAY,EAAE,CAChB,KAEN,IAAI,CAAC,YAAY,EAAE,CACpB,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"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 .large: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 focusElement,\n handleFocusTrapTabKeyPress,\n onComponentRequiredPropUndefined,\n refreshInteractiveElementsOnSlotChange,\n slottedInteractiveElements,\n} from \"../../utils/helpers\";\nimport { 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 focusAttemptCount = 0;\n private focusedElementIndex = 0;\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 * Cancellation 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.setContentAreaMutationObserver();\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 const tabKeyPressHandlerResult = handleFocusTrapTabKeyPress(\n this.el,\n this.focusAttemptCount,\n this.focusedElementIndex,\n this.interactiveElementList,\n ev.shiftKey\n );\n this.focusAttemptCount =\n tabKeyPressHandlerResult.newFocusAttemptCount;\n this.focusedElementIndex =\n tabKeyPressHandlerResult.newFocusedElementIndex;\n if (tabKeyPressHandlerResult.preventDefault) {\n ev.preventDefault();\n }\n break;\n }\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.getInteractiveElements();\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 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 setContentAreaMutationObserver = () => {\n const contentWrapper = this.el.shadowRoot?.querySelector(\n \"#dialog-content\"\n ) as HTMLElement;\n\n if (contentWrapper) {\n const { contentAreaSlot, contentAreaMutationObserver } =\n refreshInteractiveElementsOnSlotChange(\n contentWrapper || null,\n this.getInteractiveElements\n );\n\n this.contentArea = contentAreaSlot;\n this.contentAreaMutationObserver = contentAreaMutationObserver;\n }\n };\n\n private setInitialFocus = () => {\n this.sourceElement = document.activeElement as HTMLElement;\n\n if (!this.interactiveElementList.length) {\n // No interactive elements yet, retry shortly\n setTimeout(() => {\n this.getInteractiveElements();\n if (this.interactiveElementList.length) {\n this.setInitialFocus();\n }\n }, 10);\n return;\n }\n\n this.focusedElementIndex = this.interactiveElementList.findIndex(\n (element) => element.hasAttribute(this.DATA_GETS_FOCUS)\n );\n\n if (this.focusedElementIndex === -1) {\n this.focusedElementIndex = 0;\n }\n\n if (this.interactiveElementList[this.focusedElementIndex]) {\n const focusElementResult = focusElement(\n this.focusAttemptCount,\n this.focusedElementIndex,\n this.interactiveElementList\n );\n if (focusElementResult) {\n this.focusAttemptCount = focusElementResult.newFocusAttemptCount;\n this.focusedElementIndex = focusElementResult.newFocusedElementIndex;\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\n const interactiveElements = slottedInteractiveElements(this.el);\n\n if (interactiveElements.length > 0) {\n if (interactiveElements[0].slot !== this.DIALOG_CONTROLS) {\n interactiveElements[0].setAttribute(this.DATA_GETS_FOCUS, \"\");\n } else if (!this.destructive) {\n interactiveElements[interactiveElements.length - 1].setAttribute(\n this.DATA_GETS_FOCUS,\n \"\"\n );\n }\n }\n\n for (let i = 0; i < interactiveElements.length; i++) {\n this.interactiveElementList.splice(\n 1 + i,\n 0,\n interactiveElements[i] as HTMLElement\n );\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, size } =\n 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 [`ic-dialog-size-${size}`]: size != undefined,\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"],"version":3}
|
|
1
|
+
{"file":"ic-dialog.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,o+JAAo+J,CAAC;AACz/J,uBAAe,WAAW;;MCmCb,MAAM;IALnB;;;;;;;;QAQU,gCAA2B,GAA4B,IAAI,CAAC;QAC5D,oBAAe,GAAW,iBAAiB,CAAC;QAC5C,oBAAe,GAAW,iBAAiB,CAAC;QAE5C,iBAAY,GAAW,CAAC,CAAC;QACzB,sBAAiB,GAAG,CAAC,CAAC;QACtB,2BAAsB,GAAkB,EAAE,CAAC;QAC3C,mBAAc,GAA0B,IAAI,CAAC;QAM5C,mBAAc,GAAY,KAAK,CAAC;QAChC,WAAM,GAAY,KAAK,CAAC;;;;QAKzB,yBAAoB,GAAa,IAAI,CAAC;;;;QAKtC,gBAAW,GAAa,KAAK,CAAC;;;;QAK9B,iBAAY,GAAY,SAAS,CAAC;;;;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E;gBACf,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;aACnB;SACF;KACF;;;;IAMD,MAAM,YAAY;QAChB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KACnB;;;;IAMD,MAAM,aAAa;QACjB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;KAC/B;IAwRD,MAAM;QACJ,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GACpE,IAAI,CAAC;QAEP,QACE,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,kBAAkB,EAAE,CAAC,cAAc;gBACnC,mBAAmB,EAAE,MAAM;gBAC3B,2BAA2B,EAAE,CAAC,CAAC,uBAAuB;gBACtD,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;gBAC1C,CAAC,kBAAkB,IAAI,EAAE,GAAG,IAAI,IAAI,SAAS;aAC9C,IAEA,uBAAuB,IACtB,WAAK,KAAK,EAAC,UAAU,EAAC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,IACtD,IAAI,CAAC,YAAY,EAAE,CAChB,KAEN,IAAI,CAAC,YAAY,EAAE,CACpB,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"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 .large: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 focusElement,\n onComponentRequiredPropUndefined,\n refreshInteractiveElementsOnSlotChange,\n slottedInteractiveElements,\n} from \"../../utils/helpers\";\nimport { 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 focusAttemptCount = 0;\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 * Cancellation 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.setContentAreaMutationObserver();\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 \"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.getInteractiveElements();\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 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 setContentAreaMutationObserver = () => {\n const contentWrapper = this.el.shadowRoot?.querySelector(\n \"#dialog-content\"\n ) as HTMLElement;\n\n if (contentWrapper) {\n const { contentAreaSlot, contentAreaMutationObserver } =\n refreshInteractiveElementsOnSlotChange(\n contentWrapper || null,\n this.getInteractiveElements\n );\n\n this.contentArea = contentAreaSlot;\n this.contentAreaMutationObserver = contentAreaMutationObserver;\n }\n };\n\n private focusLast = () => {\n if (this.interactiveElementList.length > 0) {\n focusElement(\n this.focusAttemptCount,\n this.interactiveElementList.length - 1,\n this.interactiveElementList,\n true\n );\n }\n };\n\n private focusFirst = () => {\n if (this.interactiveElementList.length > 0) {\n focusElement(this.focusAttemptCount, 0, this.interactiveElementList);\n }\n };\n\n private setInitialFocus = () => {\n this.sourceElement = document.activeElement as HTMLElement;\n\n if (!this.interactiveElementList.length) {\n // No interactive elements yet, retry shortly\n setTimeout(() => {\n this.getInteractiveElements();\n if (this.interactiveElementList.length) {\n this.setInitialFocus();\n }\n }, 10);\n return;\n }\n\n let focusedElementIndex = this.interactiveElementList.findIndex((element) =>\n element.hasAttribute(this.DATA_GETS_FOCUS)\n );\n\n if (focusedElementIndex === -1) {\n focusedElementIndex = 0;\n }\n\n if (this.interactiveElementList[focusedElementIndex]) {\n const focusElementResult = focusElement(\n this.focusAttemptCount,\n focusedElementIndex,\n this.interactiveElementList\n );\n if (focusElementResult) {\n this.focusAttemptCount = focusElementResult.newFocusAttemptCount;\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\n const slottedElements = slottedInteractiveElements(this.el);\n\n if (slottedElements.length > 0) {\n if (slottedElements[0].slot !== this.DIALOG_CONTROLS) {\n slottedElements[0].setAttribute(this.DATA_GETS_FOCUS, \"\");\n } else if (!this.destructive) {\n slottedElements[slottedElements.length - 1].setAttribute(\n this.DATA_GETS_FOCUS,\n \"\"\n );\n }\n }\n\n // insert the slotted interactive elements after the close button in the focus order\n if (slottedElements.length > 0 && this.interactiveElementList.length > 0) {\n if (this.interactiveElementList[0].classList.contains(\"close-icon\")) {\n // if there is a close button, insert slotted interactive elements after it in the focus order\n this.interactiveElementList = [\n this.interactiveElementList[0],\n ...slottedElements,\n ...this.interactiveElementList.slice(1),\n ] as HTMLElement[];\n } else {\n // if there is no close button, slotted interactive elements should be first in the focus order\n this.interactiveElementList = [\n ...slottedElements,\n ...this.interactiveElementList,\n ] as HTMLElement[];\n }\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 tabindex=\"0\" onFocus={this.focusLast} />\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 <div tabindex=\"0\" onFocus={this.focusFirst} />\n </dialog>\n );\n };\n\n render() {\n const { dialogRendered, disableHeightConstraint, fadeIn, theme, size } =\n 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 [`ic-dialog-size-${size}`]: size != undefined,\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"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { l as getBrandForegroundAppearance, m as isPropDefined, B as slotHasContent,
|
|
2
|
+
import { l as getBrandForegroundAppearance, m as isPropDefined, B as slotHasContent, G as isEmptyString } from './helpers.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './ic-typography2.js';
|
|
4
4
|
|
|
5
5
|
const icDividerCss = ".ic-divider-horizontal.sc-ic-divider-h{display:flex;width:var(--ic-divider-horizontal-width, 100%);align-items:center;-moz-column-gap:var(--ic-space-xxs);column-gap:var(--ic-space-xxs)}hr.sc-ic-divider{padding:0;margin:0;border:none;border-bottom:solid var(--ic-space-1px) var(--ic-divider-background);width:inherit}.ic-divider-horizontal.sc-ic-divider-h::before,.ic-divider-horizontal.sc-ic-divider-h::after{border-left:none !important}.ic-divider-horizontal.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-horizontal.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::after{content:\"\";border:none;width:100%}.ic-divider-vertical.sc-ic-divider-h{display:flex;flex-direction:column;height:var(--ic-divider-vertical-height, inherit);width:-moz-max-content;width:max-content;align-items:center;-moz-column-gap:var(--ic-space-xxs);column-gap:var(--ic-space-xxs);border:none}.ic-divider-vertical.sc-ic-divider-h div.vertical-divider.sc-ic-divider{display:flex;height:inherit}.ic-divider-vertical.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-vertical.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::after{content:\"\";height:100%}hr.sc-ic-divider,.ic-divider-horizontal.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-horizontal.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::after{border-bottom:solid var(--ic-space-1px) var(--ic-divider-background)}.ic-divider-monochrome.sc-ic-divider-h hr.sc-ic-divider,.ic-divider-monochrome.ic-divider-horizontal.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-monochrome.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-monochrome.ic-divider-horizontal.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-monochrome.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-color:var(--ic-divider-background-monochrome)}.sc-ic-divider-h div.vertical-divider.sc-ic-divider,.ic-divider-vertical.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-vertical.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::after{border-left:solid var(--ic-space-1px) var(--ic-divider-background)}.ic-divider-monochrome.sc-ic-divider-h div.vertical-divider.sc-ic-divider,.ic-divider-monochrome.ic-divider-vertical.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-monochrome.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-monochrome.ic-divider-vertical.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-monochrome.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::after{border-left-color:var(--ic-divider-background-monochrome)}.ic-side-navigation-keyline.ic-theme-dark.sc-ic-divider-h{--ic-side-navigation-keyline:var(--ic-state-layer-lighten-20)}.ic-side-navigation-keyline.ic-theme-light.sc-ic-divider-h{--ic-side-navigation-keyline:var(--ic-state-layer-darken-20)}.ic-side-navigation-keyline.ic-theme-dark.sc-ic-divider-h hr.sc-ic-divider,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-horizontal.ic-divider-label-right.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-horizontal.ic-divider-label-left.sc-ic-divider-h::after,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-color:var(--ic-side-navigation-keyline)}.ic-side-navigation-keyline.ic-theme-dark.sc-ic-divider-h div.vertical-divider.sc-ic-divider,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-vertical.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-vertical.ic-divider-label-top.sc-ic-divider-h::after,.ic-side-navigation-keyline.ic-theme-dark.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::after{border-left-color:var(--ic-side-navigation-keyline)}.ic-side-navigation-keyline.ic-theme-light.sc-ic-divider-h hr.sc-ic-divider,.ic-side-navigation-keyline.ic-theme-light.ic-divider-horizontal.ic-divider-label-right.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-light.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-light.ic-divider-horizontal.ic-divider-label-left.sc-ic-divider-h::after,.ic-side-navigation-keyline.ic-theme-light.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-color:var(--ic-side-navigation-keyline)}.ic-side-navigation-keyline.ic-theme-light.sc-ic-divider-h div.vertical-divider.sc-ic-divider,.ic-side-navigation-keyline.ic-theme-light.ic-divider-vertical.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-light.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::before,.ic-side-navigation-keyline.ic-theme-light.ic-divider-vertical.ic-divider-label-top.sc-ic-divider-h::after,.ic-side-navigation-keyline.ic-theme-light.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::after{border-left-color:var(--ic-divider-background-monochrome)}.ic-divider-very-thick.sc-ic-divider-h hr.sc-ic-divider,.ic-divider-very-thick.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-very-thick.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-very-thick.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-very-thick.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-width:var(--ic-space-xs)}.ic-divider-very-thick.sc-ic-divider-h .vertical-divider.sc-ic-divider,.ic-divider-very-thick.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-very-thick.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-very-thick.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-very-thick.ic-divider-label-center.sc-ic-divider-h::after{border-left-width:var(--ic-space-xs)}.ic-divider-thick.sc-ic-divider-h hr.sc-ic-divider,.ic-divider-thick.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-thick.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-thick.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-thick.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-width:var(--ic-space-xxs)}.ic-divider-thick.sc-ic-divider-h .vertical-divider.sc-ic-divider,.ic-divider-thick.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-thick.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-thick.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-thick.ic-divider-label-center.sc-ic-divider-h::after{border-left-width:var(--ic-space-xxs)}.ic-divider-medium.sc-ic-divider-h hr.sc-ic-divider,.ic-divider-medium.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-medium.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-medium.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-medium.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-width:var(--ic-space-xxxs)}.ic-divider-medium.sc-ic-divider-h .vertical-divider.sc-ic-divider,.ic-divider-medium.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-medium.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-medium.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-medium.ic-divider-label-center.sc-ic-divider-h::after{border-left-width:var(--ic-space-xxxs)}.ic-divider-thin.sc-ic-divider-h hr.sc-ic-divider,.ic-divider-thin.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-thin.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-thin.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-thin.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-width:var(--ic-space-1px)}.ic-divider-thin.sc-ic-divider-h .vertical-divider.sc-ic-divider,.ic-divider-thin.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-thin.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-thin.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-thin.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::after{border-left-width:var(--ic-space-1px)}.ic-divider-dashed.sc-ic-divider-h hr.sc-ic-divider,.ic-divider-dashed.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-dashed.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-dashed.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-dashed.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-style:dashed}.ic-divider-dashed.sc-ic-divider-h .vertical-divider.sc-ic-divider,.ic-divider-dashed.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-dashed.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-dashed.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-dashed.ic-divider-label-center.sc-ic-divider-h::after{border-left-style:dashed}.sc-ic-divider-h .ic-divider-label.sc-ic-divider{text-wrap:wrap;text-align:left;width:-moz-max-content;width:max-content;max-width:var(--ic-divider-label-width, max(20rem, 60%))}.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h .ic-divider-label.sc-ic-divider{text-align:center}.ic-divider-vertical.sc-ic-divider-h .ic-divider-label.sc-ic-divider{text-align:center;max-width:var(--ic-divider-label-width, 20rem)}.sc-ic-divider-h .ic-divider-label-container.sc-ic-divider{width:-moz-max-content;width:max-content;max-width:var(--ic-divider-label-width, max(20rem, 60%))}.ic-divider-vertical.sc-ic-divider-h .ic-divider-label-container.sc-ic-divider{max-width:var(--ic-divider-label-width, 20rem)}.sc-ic-divider-h .ic-divider-label.sc-ic-divider p.sc-ic-divider{width:-moz-max-content;width:max-content;max-width:100%}.sc-ic-divider-h .ic-divider-label.sc-ic-divider,.sc-ic-divider-h.sc-ic-divider-s>*,.sc-ic-divider-h .sc-ic-divider-s>*{color:var(--ic-divider-label)}.ic-divider-monochrome.sc-ic-divider-h .ic-divider-label.sc-ic-divider,.sc-ic-divider-h.ic-divider-monochrome.sc-ic-divider-s>*,.sc-ic-divider-h.ic-divider-monochrome .sc-ic-divider-s>*{color:var(--ic-divider-label-monochrome)}@media (forced-colors: active){hr.sc-ic-divider,.ic-divider-horizontal.ic-divider-label-right.sc-ic-divider-h::before,.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-horizontal.ic-divider-label-left.sc-ic-divider-h::after,.ic-divider-horizontal.ic-divider-label-center.sc-ic-divider-h::after{border-bottom-color:transparent}.sc-ic-divider-h div.vertical-divider.sc-ic-divider,.ic-divider-vertical.ic-divider-label-bottom.sc-ic-divider-h::before,.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::before,.ic-divider-vertical.ic-divider-label-top.sc-ic-divider-h::after,.ic-divider-vertical.ic-divider-label-center.sc-ic-divider-h::after{border-left-color:transparent}}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { i as isSlotUsed, o as onComponentRequiredPropUndefined,
|
|
2
|
+
import { i as isSlotUsed, o as onComponentRequiredPropUndefined, e as renderDynamicChildSlots } from './helpers.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
|
4
4
|
|
|
5
5
|
const icEmptyStateCss = ":host{gap:var(--ic-space-xs);padding:var(--ic-space-xs)}:host,.action-area{display:flex;flex-direction:column}.action-area{gap:var(--ic-space-md)}:host ::slotted(svg),:host ::slotted(img){border-radius:var(--ic-space-xxs)}:host(.ic-empty-state-right),:host(.ic-empty-state-right) .action-area{align-items:flex-end;text-align:right}:host(.ic-empty-state-center),:host(.ic-empty-state-center) .action-area{align-items:center;text-align:center}:host(.image-medium) ::slotted(svg),:host(.image-medium) ::slotted(img){height:calc(3 * var(--ic-space-lg)) !important;width:calc(3 * var(--ic-space-lg)) !important}:host(.image-small) ::slotted(svg),:host(.image-small) ::slotted(img){height:var(--ic-space-xxl) !important;width:var(--ic-space-xxl) !important}:host(.image-large) ::slotted(svg),:host(.image-large) ::slotted(img){height:calc(4 * var(--ic-space-xl)) !important;width:calc(4 * var(--ic-space-xl)) !important}::slotted([slot=\"heading\"]),.empty-state-heading{--ic-typography-color:var(--ic-empty-state-title)}::slotted([slot=\"subheading\"]),.empty-state-subheading{--ic-typography-color:var(--ic-empty-state-subtitle)}::slotted([slot=\"body\"]),.empty-state-body{--ic-typography-color:var(--ic-empty-state-body)}";
|
|
@@ -38,11 +38,11 @@ const EmptyState = /*@__PURE__*/ proxyCustomElement(class EmptyState extends HTM
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
const { aligned, body, maxLines, heading, imageSize, subheading, theme } = this;
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '0d3bc48ea4f0188251b3fc3a6c720f06173b587a', class: {
|
|
42
42
|
[`ic-empty-state-${aligned}`]: true,
|
|
43
43
|
[`image-${imageSize}`]: isSlotUsed(this.el, "image"),
|
|
44
44
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
45
|
-
} }, isSlotUsed(this.el, "image") && h("slot", { key: '
|
|
45
|
+
} }, isSlotUsed(this.el, "image") && h("slot", { key: 'fdc11c4e5e04a6042f3114325066d3775a24451e', name: "image" }), h("div", { key: '46e1df54a68e5728738c7c0aeb27e62919b583d5' }, h("slot", { key: 'acf5cf5cca7b227befc908e3a606f38855f200ef', name: "heading" }, h("ic-typography", { key: '10a627304367e6643bbf0197172655135156fba9', variant: "h4", class: "empty-state-heading" }, heading)), h("slot", { key: 'a35e301f516eaef4a1fd7d7b7222c0111869c71a', name: "subheading" }, h("ic-typography", { key: 'a93898edcb0998f2bbfd089f459d1268af69265c', variant: "subtitle-small", class: "empty-state-subheading" }, subheading)), h("slot", { key: '89386937b3eb05475eef76d742d384c38b10bc1b', name: "body" }, h("ic-typography", { key: '914ebaa368de220a3607a743ef1dd40fea9e3c79', maxLines: maxLines, class: "empty-state-body" }, body))), isSlotUsed(this.el, "actions") && (h("div", { key: 'a1884397ea2ea1de771c11e35b5bc8efefa63b06', class: "action-area" }, h("slot", { key: 'fa34f99bf5d5935ac5942b321ed56f97317bdb5b', name: "actions" })))));
|
|
46
46
|
}
|
|
47
47
|
get el() { return this; }
|
|
48
48
|
static get style() { return IcEmptyStateStyle0; }
|
|
@@ -47,12 +47,12 @@ const FooterLink = /*@__PURE__*/ proxyCustomElement(class FooterLink extends HTM
|
|
|
47
47
|
const { footerConfig, href, hreflang, referrerpolicy, rel, target, download, } = this;
|
|
48
48
|
const { small, grouped } = footerConfig;
|
|
49
49
|
const isLogoLink = !!this.el.closest("div[slot='logo']");
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'cabde329ebfe9f787eae1d984bb6cf0ec4fcb047', class: {
|
|
51
51
|
"footer-link": true,
|
|
52
52
|
[`footer-link-${grouped ? "grouped" : "ungrouped"}-${small ? "small" : "sparse"}`]: true,
|
|
53
53
|
[`footer-link-${this.foregroundColor}`]: true,
|
|
54
54
|
"footer-logo-link": isLogoLink,
|
|
55
|
-
}, role: "listitem" }, h("ic-link", { key: '
|
|
55
|
+
}, role: "listitem" }, h("ic-link", { key: 'e4e3d3b716923eb8f9df66d058ac07fbadbc7982', class: "footer-link", href: href, hreflang: hreflang, referrerpolicy: referrerpolicy, rel: rel, download: download !== false ? download : undefined, target: target }, h("slot", { key: 'b8e662b7b67daa4cc8329fd4404d354013dfec7f' }))));
|
|
56
56
|
}
|
|
57
57
|
static get delegatesFocus() { return true; }
|
|
58
58
|
get el() { return this; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { a as IC_DEVICE_SIZES } from './constants.js';
|
|
3
|
-
import { l as getBrandForegroundAppearance, q as getCurrentDeviceSize, c as checkResizeObserver,
|
|
3
|
+
import { l as getBrandForegroundAppearance, q as getCurrentDeviceSize, c as checkResizeObserver, e as renderDynamicChildSlots, i as isSlotUsed, I as IcBrandForegroundEnum, H as hasClassificationBanner } from './helpers.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './ic-section-container2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { l as getBrandForegroundAppearance, B as slotHasContent, i as isSlotUsed, o as onComponentRequiredPropUndefined,
|
|
2
|
+
import { l as getBrandForegroundAppearance, B as slotHasContent, i as isSlotUsed, o as onComponentRequiredPropUndefined, e as renderDynamicChildSlots, I as IcBrandForegroundEnum, m as isPropDefined } from './helpers.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './ic-section-container2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
|
5
5
|
|
|
@@ -80,7 +80,7 @@ const Hero = /*@__PURE__*/ proxyCustomElement(class Hero extends HTMLElement {
|
|
|
80
80
|
"background-position": scrollFactor,
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '80e57ae6db4a37e6bd7dbf43e174710c043f3dfe', class: {
|
|
84
84
|
[`ic-hero-${IcBrandForegroundEnum.Dark}`]: foregroundColor === IcBrandForegroundEnum.Dark,
|
|
85
85
|
["has-background-image"]: backgroundImage !== undefined,
|
|
86
86
|
["has-right-content"]: this.rightContent,
|
|
@@ -88,12 +88,12 @@ const Hero = /*@__PURE__*/ proxyCustomElement(class Hero extends HTMLElement {
|
|
|
88
88
|
["secondary-heading"]: !!secondaryHeading,
|
|
89
89
|
[`ic-hero-content-aligned-${contentAligned}`]: contentAligned !== undefined,
|
|
90
90
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
91
|
-
}, style: style }, h("ic-section-container", { key: '
|
|
91
|
+
}, style: style }, h("ic-section-container", { key: 'f8aa12b2e228bda409d0d5acfba9854c274da27b', aligned: aligned, fullHeight: true, class: "section-container" }, h("div", { key: 'ded24c5a89fc3af527310702c5d0aa08177f1628', class: {
|
|
92
92
|
["left-container"]: true,
|
|
93
93
|
["left-container-full-width"]: this.leftContentFullWidth,
|
|
94
|
-
} }, h("div", { key: '
|
|
94
|
+
} }, h("div", { key: '57a9c51353b30931cd94bd949b5a96e8c1185fb1', class: "heading" }, h("slot", { key: 'af625456f6c9efc26e2f6b7d118a7e22b474d48a', name: "heading" }, h("ic-typography", { key: '6383d4916844a260c2ac8966bebc5d0042667dc4', variant: size === "small" ? "h2" : "h1", class: {
|
|
95
95
|
["heading-bottom-spacing"]: size !== "small",
|
|
96
|
-
} }, h("h2", { key: '
|
|
96
|
+
} }, h("h2", { key: '575a5929c50ff7661c856f7cda77b3a1acdddd03' }, heading)))), h("div", { key: 'c10dabd945bfcb3362c5fa5b3e8eec17ffc82fd1', class: "subheading" }, h("slot", { key: 'b50831b542a1ed7abb4d9ba9c06421e0f87dbb08', name: "subheading" }, h("ic-typography", { key: '69f1420e36d15129f34c499c9f0eacee6a33e1cc', variant: "body" }, subheading))), h("div", { key: '68f012d311258597a759f020faece5003ebc59c8', class: "interaction-container" }, h("slot", { key: '79691480f48726c1df218c2322396b253b389bec', name: "interaction" }))), (isPropDefined(secondaryHeading) || this.rightContent) && (h("div", { key: 'b80d0b64484c613d5e992bd940028e34734ae14a', class: "right-container" }, h("slot", { key: 'd2291ea19039231b5cad28307ba3b8e0c8b654bb', name: "secondary" }, secondaryHeading && (h("div", { key: '2f71e08c41b560aa727f60fed23521ab8fb4741d', class: "secondary-container" }, h("div", { key: '6b5a2c1f34878f30b0d51d68066815c927060d2c', class: "secondary-heading" }, h("ic-typography", { key: '64709a648468bbbb80599485041b37d9bcff777a', variant: "h4" }, h("h3", { key: '7bc5aba841edce92e3189cf4d5f9e4fccf38ef4e' }, secondaryHeading))), h("div", { key: '2a2fbf605afc2023595300d064111a4fa471bfdc', class: "secondary-subheading" }, h("ic-typography", { key: '5b87284ace2401f60d4f208fa06cb85b367ed244', variant: "subtitle-small" }, secondarySubheading))))))))));
|
|
97
97
|
}
|
|
98
98
|
get el() { return this; }
|
|
99
99
|
static get style() { return IcHeroStyle0; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { J as elementOverflowsX, n as getSlotElements, c as checkResizeObserver, I as IcBrandForegroundEnum } from './helpers.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './ic-button2.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './ic-loading-indicator2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './ic-tooltip2.js';
|
|
@@ -170,22 +170,22 @@ const HorizontalScroll = /*@__PURE__*/ proxyCustomElement(class HorizontalScroll
|
|
|
170
170
|
}
|
|
171
171
|
render() {
|
|
172
172
|
const { firstItemVisible, lastItemVisible, itemOverflow } = this;
|
|
173
|
-
return (h(Host, { key: '
|
|
173
|
+
return (h(Host, { key: 'e62a9673acd5416d956f0f293682a45d8caad08f', class: {
|
|
174
174
|
["ic-horizontal-scroll-visible"]: itemOverflow,
|
|
175
175
|
["ic-horizontal-scroll-dark"]: this.appearance === IcBrandForegroundEnum.Dark,
|
|
176
176
|
["ic-horizontal-scroll-light"]: this.appearance === IcBrandForegroundEnum.Light,
|
|
177
177
|
[`ic-theme-${this.theme}`]: this.theme !== "inherit",
|
|
178
|
-
} }, h("div", { key: '
|
|
178
|
+
} }, h("div", { key: 'e3c2707ab25d06342f46237efe0d28479ab042cf', "aria-hidden": "true", class: {
|
|
179
179
|
["scroll-container-left"]: true,
|
|
180
180
|
["hidden"]: !itemOverflow,
|
|
181
181
|
["disabled"]: firstItemVisible,
|
|
182
|
-
}, role: "tab" }, h("ic-button", { key: '
|
|
182
|
+
}, role: "tab" }, h("ic-button", { key: '1240e1b97205b7b31c8d467982f8ac163fb89183', class: "scroll-arrow", variant: "icon-tertiary", "aria-label": "Scroll left", theme: this.theme === "light" || this.theme === "inherit"
|
|
183
183
|
? "dark"
|
|
184
|
-
: "light", monochrome: this.monochrome, innerHTML: LeftArrow, disabled: firstItemVisible, tabindex: "-1", onClick: this.scrollLeft, onMouseDown: this.leftArrowMouseDownHandler }), h("span", { key: '
|
|
184
|
+
: "light", monochrome: this.monochrome, innerHTML: LeftArrow, disabled: firstItemVisible, tabindex: "-1", onClick: this.scrollLeft, onMouseDown: this.leftArrowMouseDownHandler }), h("span", { key: '96f80e692d71cf3d9903f60aa1c6322e68cddfe6', class: "scroll-splitter-left" })), h("slot", { key: '7b33db784648922f25369dc24beb3d50562d1090' }), h("div", { key: 'b9645cd33d53e6eafe01444236543fb503a75e1e', "aria-hidden": "true", class: {
|
|
185
185
|
["scroll-container-right"]: true,
|
|
186
186
|
["hidden"]: !itemOverflow,
|
|
187
187
|
["disabled"]: lastItemVisible,
|
|
188
|
-
}, role: "tab" }, h("span", { key: '
|
|
188
|
+
}, role: "tab" }, h("span", { key: '1e1e2c4992938e38068602d65db3f980308b0db6', class: "scroll-splitter-right" }), h("ic-button", { key: 'cae9a3da598885a5e12476f0ea85dcbc5e454266', class: "scroll-arrow", variant: "icon-tertiary", "aria-label": "Scroll right", theme: this.theme === "light" || this.theme === "inherit"
|
|
189
189
|
? "dark"
|
|
190
190
|
: "light", monochrome: this.monochrome, innerHTML: RightArrow, disabled: lastItemVisible, tabindex: "-1", onClick: this.scrollRight, onMouseDown: this.rightArrowMouseDownHandler }))));
|
|
191
191
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { r as removeDisabledFalse,
|
|
2
|
+
import { r as removeDisabledFalse, e as renderDynamicChildSlots, B as slotHasContent, A as IcInformationStatus } from './helpers.js';
|
|
3
3
|
import { s as successIcon } from './constants.js';
|
|
4
4
|
|
|
5
5
|
const icInputComponentContainerCss = "ic-input-component-container{display:flex;border:var(--ic-border-width) solid\n var(--border-color, var(--ic-architectural-400));border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-slow);height:2.5rem;min-height:2.5rem;width:var(--input-width, 20rem);padding:var(--ic-space-1px);background-color:var(--input-bg-color, var(--ic-color-background-primary));box-sizing:border-box;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.ic-input-component-container-full-width{width:100%;max-width:none}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed\n var(--border-color-disabled, var(--ic-color-border-neutral-disabled))}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-small.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-large.ic-input-component-container-readonly{height:auto;background:transparent}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-readonly:hover{border:none;padding:0}ic-input-component-container.ic-input-component-container-error{border:var(--ic-space-xxxs) solid\n var(--border-color-error, var(--ic-color-border-error));padding:0}ic-input-component-container.ic-input-component-container-error:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-error-hover, var(--ic-color-border-error-hover))}ic-input-component-container.ic-input-component-container-error:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-error-pressed, var(--ic-color-border-error-pressed))}ic-input-component-container.ic-input-component-container-warning{border:var(--ic-space-xxxs) solid\n var(--border-color-warning, var(--ic-color-border-warning));padding:0}ic-input-component-container.ic-input-component-container-warning:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-hover, var(--ic-color-border-warning-hover))}ic-input-component-container.ic-input-component-container-warning:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-pressed, var(--ic-color-border-warning-pressed))}ic-input-component-container.ic-input-component-container-success{border:var(--ic-space-xxxs) solid\n var(--border-color-success, var(--ic-color-border-success));padding:0}ic-input-component-container.ic-input-component-container-success:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-success-hover, var(--ic-color-border-success-hover))}ic-input-component-container.ic-input-component-container-success:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-success-pressed, var(--ic-color-border-success-pressed))}ic-input-component-container.ic-input-component-container-small{height:var(--ic-space-xl);min-height:var(--ic-space-xl)}ic-input-component-container.ic-input-component-container-large{height:var(--ic-space-xxl);min-height:var(--ic-space-xxl)}ic-input-component-container.ic-input-component-container-multiline{height:auto}ic-input-component-container .icon-container{margin-top:var(--ic-space-xxs);margin-left:0.438rem;display:flex;align-items:center}ic-input-component-container.ic-input-component-container-multiline .icon-container,ic-input-component-container.ic-input-component-container-multiline.ic-input-component-container-small .icon-container{margin-top:0.375rem;display:block}ic-input-component-container.ic-input-component-container-readonly .icon-container{margin-left:-0.313rem}ic-input-component-container.ic-input-component-container-disabled ::-moz-placeholder{display:none}ic-input-component-container.ic-input-component-container-disabled ::placeholder{display:none}ic-input-component-container .inline-success{margin:var(--ic-space-xs) 0.375rem;display:flex;align-items:center}ic-input-component-container .inline-success>svg{fill:var(--ic-input-component-container-success-icon-inline-color);height:1.25rem;width:1.25rem}ic-input-component-container:hover{border:var(--ic-input-component-container-hover-border);border-color:var(--border-color-hover, var(--ic-color-border-neutral-hover));color:var(--ic-action-monochrome-hover-dark)}ic-input-component-container:focus{border:var(--ic-border-pressed);border-color:var(\n --border-color-pressed,\n var(--ic-color-border-neutral-pressed)\n )}.focus-indicator{display:flex;width:100%;margin:-0.125rem;padding:0.125rem;border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.focus-indicator:focus-within,.focus-indicator-enabled{box-shadow:var(--ic-border-focus)}.focus-indicator.ic-input-component-container-dark:focus-within{box-shadow:var(--ic-border-focus)}@media (forced-colors: active){ic-input-component-container,.focus-indicator{transition:none}ic-input-component-container:focus-within{border:var(--ic-border-width) solid Highlight;outline:0.125rem solid Highlight}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed GrayText}}@media screen AND (max-width: 22rem){ic-input-component-container{max-width:var(--input-width, 20rem);width:100%}}@media (prefers-reduced-motion: reduce){ic-input-component-container,.focus-indicator{transition:none}}";
|
|
@@ -50,15 +50,15 @@ const InputComponentContainer = /*@__PURE__*/ proxyCustomElement(class InputComp
|
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
52
|
const { size, validationStatus, disabled, readonly, multiLine, fullWidth, validationInline, } = this;
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: '89ddddb905fb2169968a978feb1db2ddaed8fb0c', class: {
|
|
54
54
|
[`ic-input-component-container-${size}`]: true,
|
|
55
55
|
[`ic-input-component-container-${validationStatus}`]: validationStatus !== "" && !disabled && !readonly,
|
|
56
56
|
"ic-input-component-container-disabled": !!disabled,
|
|
57
57
|
"ic-input-component-container-readonly": !!readonly,
|
|
58
58
|
"ic-input-component-container-multiline": !!multiLine,
|
|
59
59
|
"ic-input-component-container-full-width": !!fullWidth,
|
|
60
|
-
}, "aria-disabled": disabled ? "true" : null }, h("div", { key: '
|
|
61
|
-
validationStatus === IcInformationStatus.Success && (h("span", { key: '
|
|
60
|
+
}, "aria-disabled": disabled ? "true" : null }, h("div", { key: 'e26afb0f2d7b78a1ca9b1ec3976b8e8fa3b2f3fe', class: "focus-indicator" }, slotHasContent(this.el, "left-icon") && (h("div", { key: 'd314cf7303bab259eb78c85f38b943d758e6d874', class: "icon-container" }, h("slot", { key: '128cdd1e6a537838dc490b33e2a657e613d6c969', name: "left-icon" }))), h("slot", { key: '9d5fd3e67c6658f988a335e080b6e7141d1c8712' }), validationInline &&
|
|
61
|
+
validationStatus === IcInformationStatus.Success && (h("span", { key: '119749d6c32bebe9c8540fa7fadb28e7387428e5', class: "inline-success", innerHTML: successIcon })))));
|
|
62
62
|
}
|
|
63
63
|
get el() { return this; }
|
|
64
64
|
static get watchers() { return {
|
|
@@ -17,11 +17,11 @@ const InputContainer = /*@__PURE__*/ proxyCustomElement(class InputContainer ext
|
|
|
17
17
|
this.readonly = false;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'f8a56b6ed7706188078d28f8fd7216c046fe32a2' }, h("div", { key: 'f7d41111869769c9ab8e5ad72ee936827ef36c91', class: {
|
|
21
21
|
["component-container"]: true,
|
|
22
22
|
["disabled"]: !!this.disabled,
|
|
23
23
|
["readonly"]: !!this.readonly,
|
|
24
|
-
} }, h("slot", { key: '
|
|
24
|
+
} }, h("slot", { key: '42fc42d0f226b11b93ab910c00ed25c027ebb549' }))));
|
|
25
25
|
}
|
|
26
26
|
static get style() { return IcInputContainerStyle0; }
|
|
27
27
|
}, [4, "ic-input-container", {
|
|
@@ -78,11 +78,11 @@ const InputLabel = /*@__PURE__*/ proxyCustomElement(class InputLabel extends HTM
|
|
|
78
78
|
"readonly-label": readonly,
|
|
79
79
|
"error-label": status === "error" && !(readonly || disabled),
|
|
80
80
|
} }, h("label", { htmlFor: this.for }, labelText)));
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '22df328142cec5a7a86fcf3e62bc40dcbfe56f97', class: {
|
|
82
82
|
"ic-input-label-disabled": !!disabled,
|
|
83
83
|
"ic-input-label-readonly": readonly,
|
|
84
84
|
"with-helper": this.isSlotUsed(helperTextSlot) || helperText !== "",
|
|
85
|
-
} }, !hideLabel && h(LabelContent, { key: '
|
|
85
|
+
} }, !hideLabel && h(LabelContent, { key: '4eddf506bc0027ff8470aeaa5f16ec124a81cc0f' }), this.isSlotUsed(helperTextSlot) ? (h("span", { id: helperTextId, class: helperTextClass }, h("slot", { name: "helper-text" }))) : (helperText !== "" && (h("ic-typography", { variant: "caption", class: helperTextClass }, h("span", { id: helperTextId }, helperText))))));
|
|
86
86
|
}
|
|
87
87
|
get el() { return this; }
|
|
88
88
|
static get style() { return IcInputLabelStyle0; }
|
|
@@ -43,14 +43,14 @@ const InputValidation = /*@__PURE__*/ proxyCustomElement(class InputValidation e
|
|
|
43
43
|
render() {
|
|
44
44
|
const { ariaLiveMode, fullWidth, status, message } = this;
|
|
45
45
|
const displayIcon = status !== "" ? ICON[status] : "";
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: '6d368ba4b4e79886a2efff97ca3d8d446516cc11', class: {
|
|
47
47
|
[`ic-input-validation-${status}`]: status !== "",
|
|
48
48
|
"ic-input-validation-full-width": !!fullWidth,
|
|
49
49
|
"ic-input-validation-with-status": status !== "",
|
|
50
|
-
} }, displayIcon !== "" && (h("span", { key: '
|
|
50
|
+
} }, displayIcon !== "" && (h("span", { key: 'ce5fbaa3281136744bc5f77c4ea6570205126285', class: {
|
|
51
51
|
"status-icon": true,
|
|
52
52
|
[`icon-${status}`]: true,
|
|
53
|
-
}, innerHTML: displayIcon })), h("ic-typography", { key: '
|
|
53
|
+
}, innerHTML: displayIcon })), h("ic-typography", { key: '00f35ab82e8fe784ae05fc70d4164c4a804a49e4', variant: "caption", class: "statustext" }, h("span", { key: '1d6d6486d3f885897271a80a3c87077b2bfc39a6', id: this.for && getInputValidationTextID(this.for) }, isSlotUsed(this.el, "validation-message") ? (h("slot", { name: "validation-message" })) : (message)), h("span", { key: 'a37f6a7af4602e08a00b5d980209781c4f4913ac', ref: (el) => (this.messageEl = el), class: "sr-only", "aria-live": ariaLiveMode })), h("slot", { key: '8b5260888b4fff0031fa8917f84e2cc3b7fa97df', name: "validation-message-adornment" })));
|
|
54
54
|
}
|
|
55
55
|
get el() { return this; }
|
|
56
56
|
static get watchers() { return {
|
|
@@ -49,9 +49,9 @@ const LayoutGridItem = /*@__PURE__*/ proxyCustomElement(class LayoutGridItem ext
|
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
51
|
const { hideInMobileMode } = this;
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '903a4aaf039efd3eb3f1748829047f02073f4877', class: {
|
|
53
53
|
"ic-layout-grid-hide-in-mobile": !!hideInMobileMode,
|
|
54
|
-
} }, h("slot", { key: '
|
|
54
|
+
} }, h("slot", { key: 'cad27bb4fc8a60f8e579c66776c9277973e14963' })));
|
|
55
55
|
}
|
|
56
56
|
get el() { return this; }
|
|
57
57
|
static get watchers() { return {
|
|
@@ -131,10 +131,10 @@ const LayoutGrid = /*@__PURE__*/ proxyCustomElement(class LayoutGrid extends HTM
|
|
|
131
131
|
}
|
|
132
132
|
render() {
|
|
133
133
|
const { aligned, fullHeight } = this;
|
|
134
|
-
return (h(Host, { key: '
|
|
134
|
+
return (h(Host, { key: '61a7e3f3a8e2156da3cecc47997fc54392d4efc0', class: {
|
|
135
135
|
[`ic-layout-grid-aligned-${aligned}`]: true,
|
|
136
136
|
["ic-layout-grid-no-vertical-padding"]: !!fullHeight,
|
|
137
|
-
} }, h("slot", { key: '
|
|
137
|
+
} }, h("slot", { key: 'ac804c02e898cd212d5cb48b3b5a7ba18790f186' })));
|
|
138
138
|
}
|
|
139
139
|
get el() { return this; }
|
|
140
140
|
static get watchers() { return {
|
|
@@ -94,7 +94,7 @@ const Link = /*@__PURE__*/ proxyCustomElement(class Link extends HTMLElement {
|
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
96
|
const { download, href, hreflang, referrerpolicy, rel, target, monochrome, theme, } = this;
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: 'd62709776b71c1cbb259db22f9d56ae4bdb6d3c3', class: {
|
|
98
98
|
["ic-link"]: true,
|
|
99
99
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
100
100
|
["ic-link-monochrome"]: !!monochrome,
|