@ukic/web-components 3.24.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/ic-button_3.cjs.entry.js +16 -8
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +5 -5
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-hero.cjs.entry.js +4 -4
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +8 -8
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +5 -5
- 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 +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +4 -4
- package/dist/cjs/ic-page-header.cjs.entry.js +6 -6
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +5 -5
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_3.cjs.entry.js +24 -24
- package/dist/cjs/ic-popover-menu.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-option.cjs.entry.js +4 -4
- package/dist/cjs/ic-search-bar.cjs.entry.js +9 -9
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -4
- 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 +2 -2
- package/dist/cjs/ic-step.cjs.entry.js +13 -13
- package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ic-switch.cjs.entry.js +6 -8
- 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 +2 -2
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +5 -5
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- 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 +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.js +4 -4
- package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
- 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 +15 -15
- 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/components/helpers.js +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 +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 +5 -5
- 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 +3 -3
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-menu2.js +4 -4
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar.js +5 -5
- package/dist/components/ic-pagination-bar.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination2.js +4 -4
- package/dist/components/ic-popover-menu.js +4 -4
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +4 -4
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +4 -4
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +9 -9
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select2.js +15 -15
- package/dist/components/ic-side-navigation.js +5 -5
- 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-step.js.map +1 -1
- 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 +5 -5
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +5 -5
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +2 -2
- package/dist/components/ic-tooltip2.js +13 -4
- package/dist/components/ic-tooltip2.js.map +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-be0010c0.entry.js → p-023cf5d9.entry.js} +2 -2
- package/dist/core/{p-52be32d7.entry.js → p-171a19bf.entry.js} +3 -3
- package/dist/core/p-171a19bf.entry.js.map +1 -0
- package/dist/core/{p-9da03270.entry.js → p-1cfaa962.entry.js} +2 -2
- package/dist/core/{p-1bacfc3c.entry.js → p-23fb87be.entry.js} +2 -2
- package/dist/core/{p-2a1faef2.entry.js → p-2424f82f.entry.js} +2 -2
- package/dist/core/{p-5d01fefb.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-27540e3e.entry.js → p-343670b4.entry.js} +2 -2
- package/dist/core/{p-574ef8c9.entry.js → p-3da9774b.entry.js} +2 -2
- package/dist/core/{p-111abe0f.entry.js → p-3ee66d00.entry.js} +2 -2
- package/dist/core/{p-884af70c.entry.js → p-406647b8.entry.js} +2 -2
- package/dist/core/{p-ee63aaf8.entry.js → p-526dd099.entry.js} +2 -2
- package/dist/core/{p-b2aef77d.entry.js → p-5fc0dc36.entry.js} +2 -2
- package/dist/core/{p-ba80d403.entry.js → p-61799a8b.entry.js} +2 -2
- package/dist/core/{p-7410fde3.entry.js → p-6b5edd6b.entry.js} +2 -2
- package/dist/core/{p-2e15136e.entry.js → p-70ca7796.entry.js} +2 -2
- package/dist/core/{p-570d763b.entry.js → p-72f52f20.entry.js} +2 -2
- package/dist/core/{p-f82baa04.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-b5e683d0.entry.js → p-85ac0d78.entry.js} +2 -2
- package/dist/core/{p-b4e8e438.entry.js → p-8fc5e9f9.entry.js} +2 -2
- package/dist/core/{p-fe9c3f6e.entry.js → p-9267c160.entry.js} +2 -2
- package/dist/core/{p-b431dd8a.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-4613f697.entry.js → p-99b20121.entry.js} +2 -2
- package/dist/core/{p-59c5265c.entry.js → p-a7c263bd.entry.js} +2 -2
- package/dist/core/{p-4e59d889.entry.js → p-ab104baa.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-6183ad85.entry.js → p-c0b70c08.entry.js} +2 -2
- package/dist/core/{p-66bfff48.entry.js → p-c41fd2cf.entry.js} +2 -2
- package/dist/core/{p-c9fbad60.entry.js → p-c82c2362.entry.js} +2 -2
- package/dist/core/{p-174a70c4.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-83578f1d.entry.js → p-cf87b6db.entry.js} +2 -2
- package/dist/core/{p-dbb1370f.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-56de4f4b.entry.js → p-d7c6fc8d.entry.js} +2 -2
- package/dist/core/{p-c14ec3e2.entry.js → p-e5266c19.entry.js} +2 -2
- package/dist/core/{p-e8e45d88.entry.js → p-ec1ea1a7.entry.js} +2 -2
- package/dist/core/{p-a6ebe253.entry.js → p-ef96e1aa.entry.js} +2 -2
- package/dist/core/{p-571404d0.entry.js → p-fd9ea62a.entry.js} +2 -2
- package/dist/esm/core.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 +5 -5
- package/dist/esm/ic-checkbox-group.entry.js +2 -2
- package/dist/esm/ic-checkbox.entry.js +4 -4
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-hero.entry.js +4 -4
- package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
- package/dist/esm/ic-input-component-container_3.entry.js +8 -8
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +5 -5
- 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 +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +4 -4
- package/dist/esm/ic-page-header.entry.js +6 -6
- package/dist/esm/ic-pagination-bar.entry.js +5 -5
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination_3.entry.js +24 -24
- package/dist/esm/ic-popover-menu.entry.js +4 -4
- package/dist/esm/ic-radio-group.entry.js +4 -4
- package/dist/esm/ic-radio-option.entry.js +4 -4
- package/dist/esm/ic-search-bar.entry.js +9 -9
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-side-navigation.entry.js +4 -4
- 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 +2 -2
- package/dist/esm/ic-step.entry.js +13 -13
- package/dist/esm/ic-stepper.entry.js +2 -2
- package/dist/esm/ic-switch.entry.js +6 -8
- 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 +2 -2
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +5 -5
- package/dist/esm/ic-toggle-button-group.entry.js +2 -2
- package/dist/esm/ic-toggle-button.entry.js +2 -2
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/loader.js +1 -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 +10 -2
- package/hydrate/index.js +181 -171
- package/hydrate/index.mjs +181 -171
- package/package.json +9 -8
- package/vscode-data.json +10 -3
- package/dist/core/p-52be32d7.entry.js.map +0 -1
- package/dist/core/p-75bf2d00.entry.js +0 -2
- package/dist/core/p-75bf2d00.entry.js.map +0 -1
- package/dist/core/p-cc3cda99.entry.js +0 -2
- package/dist/core/p-cc3cda99.entry.js.map +0 -1
- /package/dist/core/{p-be0010c0.entry.js.map → p-023cf5d9.entry.js.map} +0 -0
- /package/dist/core/{p-9da03270.entry.js.map → p-1cfaa962.entry.js.map} +0 -0
- /package/dist/core/{p-1bacfc3c.entry.js.map → p-23fb87be.entry.js.map} +0 -0
- /package/dist/core/{p-2a1faef2.entry.js.map → p-2424f82f.entry.js.map} +0 -0
- /package/dist/core/{p-5d01fefb.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-27540e3e.entry.js.map → p-343670b4.entry.js.map} +0 -0
- /package/dist/core/{p-574ef8c9.entry.js.map → p-3da9774b.entry.js.map} +0 -0
- /package/dist/core/{p-111abe0f.entry.js.map → p-3ee66d00.entry.js.map} +0 -0
- /package/dist/core/{p-884af70c.entry.js.map → p-406647b8.entry.js.map} +0 -0
- /package/dist/core/{p-ee63aaf8.entry.js.map → p-526dd099.entry.js.map} +0 -0
- /package/dist/core/{p-b2aef77d.entry.js.map → p-5fc0dc36.entry.js.map} +0 -0
- /package/dist/core/{p-ba80d403.entry.js.map → p-61799a8b.entry.js.map} +0 -0
- /package/dist/core/{p-7410fde3.entry.js.map → p-6b5edd6b.entry.js.map} +0 -0
- /package/dist/core/{p-2e15136e.entry.js.map → p-70ca7796.entry.js.map} +0 -0
- /package/dist/core/{p-570d763b.entry.js.map → p-72f52f20.entry.js.map} +0 -0
- /package/dist/core/{p-f82baa04.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-b5e683d0.entry.js.map → p-85ac0d78.entry.js.map} +0 -0
- /package/dist/core/{p-b4e8e438.entry.js.map → p-8fc5e9f9.entry.js.map} +0 -0
- /package/dist/core/{p-fe9c3f6e.entry.js.map → p-9267c160.entry.js.map} +0 -0
- /package/dist/core/{p-b431dd8a.entry.js.map → p-970e190c.entry.js.map} +0 -0
- /package/dist/core/{p-4613f697.entry.js.map → p-99b20121.entry.js.map} +0 -0
- /package/dist/core/{p-59c5265c.entry.js.map → p-a7c263bd.entry.js.map} +0 -0
- /package/dist/core/{p-4e59d889.entry.js.map → p-ab104baa.entry.js.map} +0 -0
- /package/dist/core/{p-9502fb86.entry.js.map → p-b58fb588.entry.js.map} +0 -0
- /package/dist/core/{p-6183ad85.entry.js.map → p-c0b70c08.entry.js.map} +0 -0
- /package/dist/core/{p-66bfff48.entry.js.map → p-c41fd2cf.entry.js.map} +0 -0
- /package/dist/core/{p-c9fbad60.entry.js.map → p-c82c2362.entry.js.map} +0 -0
- /package/dist/core/{p-174a70c4.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-83578f1d.entry.js.map → p-cf87b6db.entry.js.map} +0 -0
- /package/dist/core/{p-dbb1370f.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-56de4f4b.entry.js.map → p-d7c6fc8d.entry.js.map} +0 -0
- /package/dist/core/{p-c14ec3e2.entry.js.map → p-e5266c19.entry.js.map} +0 -0
- /package/dist/core/{p-e8e45d88.entry.js.map → p-ec1ea1a7.entry.js.map} +0 -0
- /package/dist/core/{p-a6ebe253.entry.js.map → p-ef96e1aa.entry.js.map} +0 -0
- /package/dist/core/{p-571404d0.entry.js.map → p-fd9ea62a.entry.js.map} +0 -0
|
@@ -207,20 +207,20 @@ export class Toast {
|
|
|
207
207
|
}
|
|
208
208
|
render() {
|
|
209
209
|
const { variant, heading, message, visible, isManual, dismissButtonAriaLabel, theme, } = this;
|
|
210
|
-
return (h(Host, { key: '
|
|
210
|
+
return (h(Host, { key: '57c068f4c9a9e3017733432a596f78e2bcbffae6', class: {
|
|
211
211
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
212
212
|
["ic-toast-hidden"]: !visible,
|
|
213
213
|
[`ic-toast-variant-${variant}`]: variant !== undefined,
|
|
214
|
-
}, tabindex: "0", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? "dialog" : "alert", "aria-live": isManual ? null : "polite" }, h("div", { key: '
|
|
214
|
+
}, tabindex: "0", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? "dialog" : "alert", "aria-live": isManual ? null : "polite" }, h("div", { key: 'e24bd72e435cc443c375eee309ae98fc9e030c0b', class: {
|
|
215
215
|
["container"]: true,
|
|
216
216
|
[`container-${variant}`]: variant !== undefined,
|
|
217
|
-
} }, variant && visible && (h("div", { key: '
|
|
217
|
+
} }, variant && visible && (h("div", { key: 'bdabfabb04efcd93ab88ecb691b3baa73fc9da0a', class: "toast-icon-container" }, h("div", { key: 'bede66dcf6189ac321e9bee90dc144e9d38a09dc', class: {
|
|
218
218
|
["divider"]: true,
|
|
219
219
|
[`divider-${variant}`]: true,
|
|
220
|
-
} }), variant === "neutral" ? (h("slot", { name: "neutral-icon" })) : (h("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), h("div", { key: '
|
|
220
|
+
} }), variant === "neutral" ? (h("slot", { name: "neutral-icon" })) : (h("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), h("div", { key: '57480804dc55695e555a16dd818c5febcaffbe00', class: {
|
|
221
221
|
["toast-content"]: true,
|
|
222
222
|
["no-icon"]: variant === "neutral" && !isSlotUsed(this.el, "neutral-icon"),
|
|
223
|
-
} }, h("div", { key: '
|
|
223
|
+
} }, h("div", { key: '8540288f9f34f0b72c86fa3039d579c93be1277f', class: "toast-text" }, h("ic-typography", { key: 'c5e8f2d0a2fe026b430dddf7a81e825845f5ce72', variant: "subtitle-large", class: "toast-heading" }, visible && (isManual ? h("h5", null, heading) : h("p", null, heading))), message && (h("ic-typography", { key: '89fe3df8f98581ef66c1ea74930d9042a579a359', variant: "body", class: "toast-message" }, visible && h("p", { key: 'd805d260febad5f8d58aeffe2dfef9f84d6d0911' }, message)))), isSlotUsed(this.el, "action") && (h("div", { key: 'c9cfd3cd4bf5f77cea072bb15f8629ab4a368ad0', class: "toast-action-container" }, h("slot", { key: '26b2fb447b937f327719edfe531e5b1260fa7c6c', name: "action" })))), !isManual ? (h("ic-loading-indicator", { class: "toast-dismiss-timer", theme: "dark", monochrome: true, size: "icon", progress: this.timerProgress, description: "Dismiss timer" })) : (h("ic-button", { id: "dismiss-button", innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon-tertiary", "aria-label": dismissButtonAriaLabel })))));
|
|
224
224
|
}
|
|
225
225
|
static get is() { return "ic-toast"; }
|
|
226
226
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,7 +40,7 @@ export class ToastRegion {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return h("slot", { key: '
|
|
43
|
+
return h("slot", { key: '28f5e26c6dbfb2de076cff231b72722f1ff403c7' });
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "ic-toast-region"; }
|
|
46
46
|
static get properties() {
|
|
@@ -150,7 +150,7 @@ export class ToggleButton {
|
|
|
150
150
|
render() {
|
|
151
151
|
const { accessibleLabel, checked, disabled, fullWidth, iconPlacement, monochrome, label, loading, outline, size, theme, tooltipPlacement, variant, } = this;
|
|
152
152
|
const iconVariant = variant === "icon";
|
|
153
|
-
return (h(Host, { key: '
|
|
153
|
+
return (h(Host, { key: 'a90e2a846a52531dc542d039724dc8516a00ae14', class: {
|
|
154
154
|
"ic-toggle-button-checked": checked,
|
|
155
155
|
"ic-toggle-button-disabled": disabled,
|
|
156
156
|
"ic-toggle-button-icon": iconVariant,
|
|
@@ -160,7 +160,7 @@ export class ToggleButton {
|
|
|
160
160
|
"ic-toggle-button-hide-outline": !outline,
|
|
161
161
|
[`ic-toggle-button-${size}`]: true,
|
|
162
162
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
163
|
-
}, onFocus: this.handleFocus }, h("ic-button", { key: '
|
|
163
|
+
}, onFocus: this.handleFocus }, h("ic-button", { key: '6f15f0c63675bd099d370ce02e2b02eeac4e913a', "aria-pressed": `${checked}`, variant: iconVariant ? "icon-tertiary" : "secondary", onClick: this.handleClick, title: accessibleLabel, "aria-label": `${accessibleLabel ? accessibleLabel : label}, ${checked ? "ticked" : "unticked"}`, disabled: disabled, size: size, fullWidth: fullWidth, loading: loading, tooltipPlacement: tooltipPlacement }, !iconVariant && label, h("slot", { key: '2503823bad70fa984db6c71d16cc863daaede0e3' }), isSlotUsed(this.el, "icon") && (h("slot", { key: '53969441b6446ec012b538c2f3d468ea0e793547', name: "icon", slot: `${iconPlacement}-icon` })), isSlotUsed(this.el, "badge") && (h("slot", { key: '2619be7d1528115db996708b102aadd611fd1b4b', name: "badge", slot: "badge" })))));
|
|
164
164
|
}
|
|
165
165
|
static get is() { return "ic-toggle-button"; }
|
|
166
166
|
static get encapsulation() { return "shadow"; }
|
|
@@ -245,14 +245,14 @@ export class ToggleButtonGroup {
|
|
|
245
245
|
}
|
|
246
246
|
render() {
|
|
247
247
|
const { accessibleLabel, disabled, fullWidth, loading, monochrome, outline, theme, } = this;
|
|
248
|
-
return (h(Host, { key: '
|
|
248
|
+
return (h(Host, { key: 'b312b6cae074758bad82c66446709925e19cf5ce', role: "group", "aria-label": accessibleLabel, tabindex: disabled ? -1 : 0, class: {
|
|
249
249
|
"ic-toggle-button-group-disabled": disabled,
|
|
250
250
|
"ic-toggle-button-group-full-width": fullWidth,
|
|
251
251
|
"ic-toggle-button-group-loading": loading,
|
|
252
252
|
"ic-toggle-button-group-monochrome": monochrome,
|
|
253
253
|
"ic-toggle-button-group-hide-outline": !outline,
|
|
254
254
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
255
|
-
}, onFocus: this.handleHostFocus }, h("slot", { key: '
|
|
255
|
+
}, onFocus: this.handleHostFocus }, h("slot", { key: '8b09d946e7a8983b66f8bef384901899f88a54af' })));
|
|
256
256
|
}
|
|
257
257
|
static get is() { return "ic-toggle-button-group"; }
|
|
258
258
|
static get encapsulation() { return "shadow"; }
|
|
@@ -577,6 +577,27 @@ video {
|
|
|
577
577
|
display: inline-block;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
+
:host(.ic-tooltip.ic-tooltip-with-icon) .ic-tooltip-content {
|
|
581
|
+
display: flex;
|
|
582
|
+
align-items: flex-start;
|
|
583
|
+
justify-content: flex-start;
|
|
584
|
+
gap: var(--ic-space-xxs);
|
|
585
|
+
text-align: left;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
:host(.ic-tooltip.ic-tooltip-with-icon) .ic-icon-container {
|
|
589
|
+
width: var(--ic-space-md);
|
|
590
|
+
height: var(--ic-space-md);
|
|
591
|
+
color: var(--ic-tooltip-text);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
:host(.ic-tooltip.ic-tooltip-with-icon) ::slotted([slot="icon"]) {
|
|
595
|
+
width: var(--ic-space-md);
|
|
596
|
+
height: var(--ic-space-md);
|
|
597
|
+
display: inline-block;
|
|
598
|
+
margin-top: var(--ic-space-1px);
|
|
599
|
+
}
|
|
600
|
+
|
|
580
601
|
@media screen and (max-width: 576px) {
|
|
581
602
|
:host(.ic-tooltip) .ic-tooltip-container {
|
|
582
603
|
max-width: 18.875rem;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Host, h, } from "@stencil/core";
|
|
2
2
|
import { createPopper } from "@popperjs/core";
|
|
3
|
-
import { isSafari, onComponentRequiredPropUndefined, } from "../../utils/helpers";
|
|
3
|
+
import { isSafari, onComponentRequiredPropUndefined, isSlotUsed, renderDynamicChildSlots, } from "../../utils/helpers";
|
|
4
|
+
/**
|
|
5
|
+
* @slot icon - Icon will be rendered to the left of the tooltip text.
|
|
6
|
+
*/
|
|
4
7
|
export class Tooltip {
|
|
5
8
|
constructor() {
|
|
6
9
|
this.delayedHideEvents = ["mouseleave"];
|
|
@@ -189,6 +192,10 @@ export class Tooltip {
|
|
|
189
192
|
}
|
|
190
193
|
this.containerContentArea =
|
|
191
194
|
(_b = (_a = container === null || container === void 0 ? void 0 : container.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".content-area")) !== null && _b !== void 0 ? _b : null;
|
|
195
|
+
this.hostMutationObserver = new MutationObserver((mutationList) => renderDynamicChildSlots(mutationList, "icon", this));
|
|
196
|
+
this.hostMutationObserver.observe(this.el, {
|
|
197
|
+
childList: true,
|
|
198
|
+
});
|
|
192
199
|
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Tooltip");
|
|
193
200
|
}
|
|
194
201
|
componentDidRender() {
|
|
@@ -197,6 +204,9 @@ export class Tooltip {
|
|
|
197
204
|
this.maxLines &&
|
|
198
205
|
this.maxLines > 0 &&
|
|
199
206
|
(typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`));
|
|
207
|
+
if (this.iconAltText && !isSlotUsed(this.el, "icon")) {
|
|
208
|
+
console.warn(`Prop 'iconAltText' is provided without an icon slotted in the 'icon' slot. Please provide an icon or remove the 'iconAltText' prop.`);
|
|
209
|
+
}
|
|
200
210
|
}
|
|
201
211
|
/**
|
|
202
212
|
* Method to programmatically show/hide the tooltip without needing to interact with an anchor element
|
|
@@ -215,10 +225,11 @@ export class Tooltip {
|
|
|
215
225
|
}
|
|
216
226
|
render() {
|
|
217
227
|
const { label, maxLines, silent, theme } = this;
|
|
218
|
-
return (h(Host, { key: '
|
|
228
|
+
return (h(Host, { key: 'f9990c54172e8fda3d24a9f613ff5328018b9c6c', class: {
|
|
219
229
|
"ic-tooltip": true,
|
|
220
230
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
221
|
-
|
|
231
|
+
"ic-tooltip-with-icon": isSlotUsed(this.el, "icon"),
|
|
232
|
+
}, "aria-label": isSafari && label }, h("div", { key: '1b09f90e4da36ec2470bef240be537dc3642c922', ref: (el) => (this.toolTip = el), role: "tooltip", class: "ic-tooltip-container", "aria-hidden": `${silent}` }, h("div", { key: '1cbfb4ce2ba7fce474330e70aab9f6820845b80d', class: "ic-tooltip-content" }, isSlotUsed(this.el, "icon") && (h("div", { key: '3b82f426322ae769893569dc7c649f0ada256ad2', class: "ic-icon-container", "aria-hidden": `${!this.iconAltText}`, "aria-label": this.iconAltText, role: "img" }, h("slot", { key: '7dd357c6339e36a9d830d74e042f2772b6d1fb4e', name: "icon", "aria-hidden": "true" }))), h("ic-typography", { key: '959297e6c8134160c67aaea1f09b06b30bdc6bbb', maxLines: maxLines, variant: "caption" }, label)), h("div", { key: '8be3a57f5e5c7dcb1b16544ab18aa2fbf9f76ad6', ref: (el) => (this.arrow = el), class: "ic-tooltip-arrow" })), h("slot", { key: 'cb9ede12f1da7cf478cff4ae6914693e0ec3f560' })));
|
|
222
233
|
}
|
|
223
234
|
static get is() { return "ic-tooltip"; }
|
|
224
235
|
static get encapsulation() { return "shadow"; }
|
|
@@ -294,6 +305,25 @@ export class Tooltip {
|
|
|
294
305
|
"reflect": false,
|
|
295
306
|
"defaultValue": "false"
|
|
296
307
|
},
|
|
308
|
+
"iconAltText": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"mutable": false,
|
|
311
|
+
"complexType": {
|
|
312
|
+
"original": "string",
|
|
313
|
+
"resolved": "string | undefined",
|
|
314
|
+
"references": {}
|
|
315
|
+
},
|
|
316
|
+
"required": false,
|
|
317
|
+
"optional": true,
|
|
318
|
+
"docs": {
|
|
319
|
+
"tags": [],
|
|
320
|
+
"text": "The alt text to be used alongside a slotted icon."
|
|
321
|
+
},
|
|
322
|
+
"getter": false,
|
|
323
|
+
"setter": false,
|
|
324
|
+
"attribute": "icon-alt-text",
|
|
325
|
+
"reflect": false
|
|
326
|
+
},
|
|
297
327
|
"maxLines": {
|
|
298
328
|
"type": "number",
|
|
299
329
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ic-tooltip.js","sourceRoot":"","sources":["../../../src/components/ic-tooltip/ic-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,MAAM,EACN,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAqB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EACL,QAAQ,EACR,gCAAgC,GACjC,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,OAAO,OAAO;IALpB;QAOU,sBAAiB,GAAG,CAAC,YAAY,CAAC,CAAC;QAEnC,sBAAiB,GAAG,CAAC,UAAU,CAAC,CAAC;QACjC,kBAAa,GAAY,KAAK,CAAC;QAC/B,mBAAc,GAAG,KAAK,CAAC;QAEvB,eAAU,GAAG;YACnB,CAAC,IAAI,CAAC,YAAY,IAAI,YAAY;YAClC,CAAC,IAAI,CAAC,YAAY,IAAI,SAAS;YAC/B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n Method,\n State,\n Watch,\n} from \"@stencil/core\";\nimport { Instance, Options, createPopper } from \"@popperjs/core\";\nimport { IcTooltipPlacements } from \"./ic-tooltip.types\";\nimport {\n isSafari,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tooltip\",\n styleUrl: \"ic-tooltip.css\",\n shadow: true,\n})\nexport class Tooltip {\n private arrow: HTMLDivElement;\n private delayedHideEvents = [\"mouseleave\"];\n private containerContentArea: HTMLDivElement | null;\n private instantHideEvents = [\"focusout\"];\n private mouseOverTool: boolean = false;\n private persistTooltip = false;\n private popperInstance: Instance;\n private showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n private toolTip: HTMLDivElement;\n\n @Element() el: HTMLIcTooltipElement;\n\n /**\n * If `true`, the tooltip will not be displayed on click, it will require hover or using the display method.\n */\n @Prop() disableClick?: boolean = false;\n\n @Watch(\"disableClick\")\n watchDisableClickHandler(): void {\n if (this.disableClick) {\n this.hide();\n }\n this.updateTooltipEvents();\n }\n\n /**\n * If `true`, the tooltip will not be displayed on hover, it will require a click.\n */\n @Prop() disableHover?: boolean = false;\n\n @Watch(\"disableHover\")\n watchDisableHoverHandler(): void {\n if (this.disableHover) {\n this.hide();\n }\n this.updateTooltipEvents();\n }\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() fixedPositioning: boolean = false;\n\n /**\n * The number of lines to display before truncating the text.\n */\n @Prop() maxLines?: number;\n\n /**\n * The position of the tooltip in relation to the parent element.\n */\n @Prop() placement?: IcTooltipPlacements = \"bottom\";\n\n /**\n * @internal Sets the tooltip to aria-hidden, when used as part of components that are already announced.\n */\n @Prop() silent?: boolean = false;\n\n /**\n * The ID of the element the tooltip is describing - for when aria-labelledby or aria-describedby is used.\n */\n @Prop({ reflect: true }) target?: string;\n\n /**\n * Sets the tooltip to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The text to display on the tooltip.\n */\n @Prop() label!: string;\n @Watch(\"label\")\n watchLabelHandler(): void {\n if (this.toolTip?.hasAttribute(\"data-show\") && this.popperInstance) {\n this.popperInstance.update();\n }\n }\n\n @State() popperProps: Partial<Options> = {};\n\n /**\n * Emitted when the tooltip becomes visible.\n */\n @Event() icTooltipShow: EventEmitter<void>;\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of tooltip\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n disconnectedCallback(): void {\n this.manageEventListeners(\"remove\");\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n }\n\n componentDidLoad(): void {\n this.manageEventListeners(\"add\");\n\n // Display tooltips correctly within drawer and dialog components\n let container: HTMLElement | null;\n\n if ((this.el.getRootNode() as ShadowRoot).host) {\n container = (this.el.getRootNode() as ShadowRoot).host.closest(\n \"ic-dialog, ic-drawer\"\n );\n } else {\n container = this.el.closest(\"ic-dialog, ic-drawer\");\n }\n this.containerContentArea =\n container?.shadowRoot?.querySelector(\".content-area\") ?? null;\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tooltip\"\n );\n }\n\n componentDidRender(): void {\n const typographyEl = this.el.shadowRoot?.querySelector(\n \".ic-tooltip-container > ic-typography\"\n );\n this.maxLines &&\n this.maxLines > 0 &&\n typographyEl?.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.maxLines}`\n );\n }\n /**\n * Method to programmatically show/hide the tooltip without needing to interact with an anchor element\n * @param show Whether to show or hide the tooltip\n * @param persistTooltip Whether the tooltip should stay on the screen when actions are performed that would previously dismiss the tooltip, such as on hover\n */\n @Method()\n async displayTooltip(show: boolean, persistTooltip?: boolean): Promise<void> {\n this.persistTooltip = !!persistTooltip;\n show ? this.show() : this.hide();\n }\n\n /**\n * @internal Method to return if tooltip is currently visible.\n */\n @Method()\n async isTooltipVisible(): Promise<boolean> {\n return Promise.resolve(this.toolTip.hasAttribute(\"data-show\"));\n }\n\n private show = () => {\n if (this.label) {\n this.toolTip.setAttribute(\"data-show\", \"\");\n\n if (this.containerContentArea) {\n this.el.classList.add(\"ic-tooltip-in-container\");\n }\n\n this.popperInstance = createPopper(this.el, this.toolTip, {\n strategy: this.fixedPositioning ? \"fixed\" : \"absolute\",\n placement: this.placement,\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 10],\n },\n },\n {\n name: \"arrow\",\n options: {\n element: this.arrow,\n },\n },\n {\n name: \"eventListeners\",\n options: { scroll: false, resize: false },\n },\n ...(this.containerContentArea\n ? [\n {\n name: \"preventOverflow\",\n options: {\n boundary: this.containerContentArea,\n padding: 8,\n },\n },\n {\n name: \"flip\",\n options: {\n boundary: this.containerContentArea,\n },\n },\n ]\n : []),\n ],\n ...this.popperProps,\n });\n this.icTooltipShow.emit();\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n if (this.toolTip !== undefined) {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\n }\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n };\n\n private checkCloseTooltip = () => {\n setTimeout(() => {\n if (!this.mouseOverTool && !this.persistTooltip) {\n this.hide();\n }\n }, 100);\n };\n\n private mouseEnterTooltip = () => {\n this.mouseOverTool = true;\n };\n\n private mouseLeaveTooltip = () => {\n this.mouseOverTool = false;\n this.checkCloseTooltip();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && !this.persistTooltip) {\n this.hide();\n }\n };\n\n private manageEventListeners = (action: \"add\" | \"remove\") => {\n const method =\n action === \"add\" ? \"addEventListener\" : \"removeEventListener\";\n\n this.showEvents.forEach((event) => {\n if (event) {\n this.el[method](event, this.show);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseEnterTooltip);\n }\n }\n });\n\n if (!this.persistTooltip) {\n this.instantHideEvents.forEach((event) => {\n this.el[method](event, this.hide);\n });\n }\n\n this.delayedHideEvents.forEach((event) => {\n this.el[method](event, this.checkCloseTooltip);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseLeaveTooltip);\n }\n });\n\n document[method](\"keydown\", this.handleKeyDown as EventListener);\n };\n\n private updateTooltipEvents = () => {\n this.manageEventListeners(\"remove\");\n this.showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n this.manageEventListeners(\"add\");\n };\n\n render() {\n const { label, maxLines, silent, theme } = this;\n return (\n <Host\n class={{\n \"ic-tooltip\": true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n aria-label={isSafari && label} // accessible name needs to be in light dom to be announced by VoiceOver. Replace in v4 as aria-label on element with no role is not well-supported\n >\n <div\n ref={(el) => (this.toolTip = el as HTMLDivElement)}\n role=\"tooltip\"\n class=\"ic-tooltip-container\"\n aria-hidden={`${silent}`}\n >\n <ic-typography maxLines={maxLines} variant=\"caption\">\n {label}\n </ic-typography>\n <div\n ref={(el) => (this.arrow = el as HTMLDivElement)}\n class=\"ic-tooltip-arrow\"\n ></div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ic-tooltip.js","sourceRoot":"","sources":["../../../src/components/ic-tooltip/ic-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,MAAM,EAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n h,\n Method,\n State,\n Watch,\n} from \"@stencil/core\";\nimport { Instance, Options, createPopper } from \"@popperjs/core\";\nimport { IcTooltipPlacements } from \"./ic-tooltip.types\";\nimport {\n isSafari,\n onComponentRequiredPropUndefined,\n isSlotUsed,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n/**\n * @slot icon - Icon will be rendered to the left of the tooltip text.\n */\n\n@Component({\n tag: \"ic-tooltip\",\n styleUrl: \"ic-tooltip.css\",\n shadow: true,\n})\nexport class Tooltip {\n private arrow: HTMLDivElement;\n private delayedHideEvents = [\"mouseleave\"];\n private containerContentArea: HTMLDivElement | null;\n private instantHideEvents = [\"focusout\"];\n private mouseOverTool: boolean = false;\n private persistTooltip = false;\n private popperInstance: Instance;\n private showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n private toolTip: HTMLDivElement;\n private hostMutationObserver?: MutationObserver;\n\n @Element() el: HTMLIcTooltipElement;\n\n /**\n * If `true`, the tooltip will not be displayed on click, it will require hover or using the display method.\n */\n @Prop() disableClick?: boolean = false;\n\n @Watch(\"disableClick\")\n watchDisableClickHandler(): void {\n if (this.disableClick) {\n this.hide();\n }\n this.updateTooltipEvents();\n }\n\n /**\n * If `true`, the tooltip will not be displayed on hover, it will require a click.\n */\n @Prop() disableHover?: boolean = false;\n\n @Watch(\"disableHover\")\n watchDisableHoverHandler(): void {\n if (this.disableHover) {\n this.hide();\n }\n this.updateTooltipEvents();\n }\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() fixedPositioning: boolean = false;\n\n /**\n * The alt text to be used alongside a slotted icon.\n */\n @Prop() iconAltText?: string;\n\n /**\n * The number of lines to display before truncating the text.\n */\n @Prop() maxLines?: number;\n\n /**\n * The position of the tooltip in relation to the parent element.\n */\n @Prop() placement?: IcTooltipPlacements = \"bottom\";\n\n /**\n * @internal Sets the tooltip to aria-hidden, when used as part of components that are already announced.\n */\n @Prop() silent?: boolean = false;\n\n /**\n * The ID of the element the tooltip is describing - for when aria-labelledby or aria-describedby is used.\n */\n @Prop({ reflect: true }) target?: string;\n\n /**\n * Sets the tooltip to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The text to display on the tooltip.\n */\n @Prop() label!: string;\n @Watch(\"label\")\n watchLabelHandler(): void {\n if (this.toolTip?.hasAttribute(\"data-show\") && this.popperInstance) {\n this.popperInstance.update();\n }\n }\n\n @State() popperProps: Partial<Options> = {};\n\n /**\n * Emitted when the tooltip becomes visible.\n */\n @Event() icTooltipShow: EventEmitter<void>;\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of tooltip\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n disconnectedCallback(): void {\n this.manageEventListeners(\"remove\");\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n }\n\n componentDidLoad(): void {\n this.manageEventListeners(\"add\");\n\n // Display tooltips correctly within drawer and dialog components\n let container: HTMLElement | null;\n\n if ((this.el.getRootNode() as ShadowRoot).host) {\n container = (this.el.getRootNode() as ShadowRoot).host.closest(\n \"ic-dialog, ic-drawer\"\n );\n } else {\n container = this.el.closest(\"ic-dialog, ic-drawer\");\n }\n this.containerContentArea =\n container?.shadowRoot?.querySelector(\".content-area\") ?? null;\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"icon\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tooltip\"\n );\n }\n\n componentDidRender(): void {\n const typographyEl = this.el.shadowRoot?.querySelector(\n \".ic-tooltip-container > ic-typography\"\n );\n this.maxLines &&\n this.maxLines > 0 &&\n typographyEl?.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.maxLines}`\n );\n\n if (this.iconAltText && !isSlotUsed(this.el, \"icon\")) {\n console.warn(\n `Prop 'iconAltText' is provided without an icon slotted in the 'icon' slot. Please provide an icon or remove the 'iconAltText' prop.`\n );\n }\n }\n\n /**\n * Method to programmatically show/hide the tooltip without needing to interact with an anchor element\n * @param show Whether to show or hide the tooltip\n * @param persistTooltip Whether the tooltip should stay on the screen when actions are performed that would previously dismiss the tooltip, such as on hover\n */\n @Method()\n async displayTooltip(show: boolean, persistTooltip?: boolean): Promise<void> {\n this.persistTooltip = !!persistTooltip;\n show ? this.show() : this.hide();\n }\n\n /**\n * @internal Method to return if tooltip is currently visible.\n */\n @Method()\n async isTooltipVisible(): Promise<boolean> {\n return Promise.resolve(this.toolTip.hasAttribute(\"data-show\"));\n }\n\n private show = () => {\n if (this.label) {\n this.toolTip.setAttribute(\"data-show\", \"\");\n\n if (this.containerContentArea) {\n this.el.classList.add(\"ic-tooltip-in-container\");\n }\n\n this.popperInstance = createPopper(this.el, this.toolTip, {\n strategy: this.fixedPositioning ? \"fixed\" : \"absolute\",\n placement: this.placement,\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 10],\n },\n },\n {\n name: \"arrow\",\n options: {\n element: this.arrow,\n },\n },\n {\n name: \"eventListeners\",\n options: { scroll: false, resize: false },\n },\n ...(this.containerContentArea\n ? [\n {\n name: \"preventOverflow\",\n options: {\n boundary: this.containerContentArea,\n padding: 8,\n },\n },\n {\n name: \"flip\",\n options: {\n boundary: this.containerContentArea,\n },\n },\n ]\n : []),\n ],\n ...this.popperProps,\n });\n this.icTooltipShow.emit();\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n if (this.toolTip !== undefined) {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\n }\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n };\n\n private checkCloseTooltip = () => {\n setTimeout(() => {\n if (!this.mouseOverTool && !this.persistTooltip) {\n this.hide();\n }\n }, 100);\n };\n\n private mouseEnterTooltip = () => {\n this.mouseOverTool = true;\n };\n\n private mouseLeaveTooltip = () => {\n this.mouseOverTool = false;\n this.checkCloseTooltip();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && !this.persistTooltip) {\n this.hide();\n }\n };\n\n private manageEventListeners = (action: \"add\" | \"remove\") => {\n const method =\n action === \"add\" ? \"addEventListener\" : \"removeEventListener\";\n\n this.showEvents.forEach((event) => {\n if (event) {\n this.el[method](event, this.show);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseEnterTooltip);\n }\n }\n });\n\n if (!this.persistTooltip) {\n this.instantHideEvents.forEach((event) => {\n this.el[method](event, this.hide);\n });\n }\n\n this.delayedHideEvents.forEach((event) => {\n this.el[method](event, this.checkCloseTooltip);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseLeaveTooltip);\n }\n });\n\n document[method](\"keydown\", this.handleKeyDown as EventListener);\n };\n\n private updateTooltipEvents = () => {\n this.manageEventListeners(\"remove\");\n this.showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n this.manageEventListeners(\"add\");\n };\n\n render() {\n const { label, maxLines, silent, theme } = this;\n return (\n <Host\n class={{\n \"ic-tooltip\": true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n \"ic-tooltip-with-icon\": isSlotUsed(this.el, \"icon\"),\n }}\n aria-label={isSafari && label} // accessible name needs to be in light dom to be announced by VoiceOver. Replace in v4 as aria-label on element with no role is not well-supported\n >\n <div\n ref={(el) => (this.toolTip = el as HTMLDivElement)}\n role=\"tooltip\"\n class=\"ic-tooltip-container\"\n aria-hidden={`${silent}`}\n >\n <div class=\"ic-tooltip-content\">\n {isSlotUsed(this.el, \"icon\") && (\n <div\n class=\"ic-icon-container\"\n aria-hidden={`${!this.iconAltText}`}\n aria-label={this.iconAltText}\n role=\"img\"\n >\n <slot name=\"icon\" aria-hidden=\"true\"></slot>\n </div>\n )}\n <ic-typography maxLines={maxLines} variant=\"caption\">\n {label}\n </ic-typography>\n </div>\n <div\n ref={(el) => (this.arrow = el as HTMLDivElement)}\n class=\"ic-tooltip-arrow\"\n ></div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -9,6 +9,12 @@ const defaultArgs = {
|
|
|
9
9
|
fixedPositioning: false,
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
+
const defaultWithIconArgs = {
|
|
13
|
+
...defaultArgs,
|
|
14
|
+
iconSlot: "icon",
|
|
15
|
+
tooltipIconAltText: "Check mark icon",
|
|
16
|
+
};
|
|
17
|
+
|
|
12
18
|
export default {
|
|
13
19
|
title: "Web Components/Tooltip",
|
|
14
20
|
component: "ic-tooltip",
|
|
@@ -207,6 +213,30 @@ export const LeftPlacements = {
|
|
|
207
213
|
name: "Left placements",
|
|
208
214
|
};
|
|
209
215
|
|
|
216
|
+
export const TooltipWithSlottedIcon = {
|
|
217
|
+
render: () => html`
|
|
218
|
+
<ic-tooltip
|
|
219
|
+
label="This is a tooltip with a longer label and an icon to show how the text is aligned when there is an icon present."
|
|
220
|
+
id="ic-tooltip-with-icon"
|
|
221
|
+
icon-alt-text="Check mark icon"
|
|
222
|
+
>
|
|
223
|
+
<svg
|
|
224
|
+
slot="icon"
|
|
225
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
226
|
+
height="24px"
|
|
227
|
+
viewBox="0 0 24 24"
|
|
228
|
+
width="24px"
|
|
229
|
+
fill="currentColor"
|
|
230
|
+
>
|
|
231
|
+
<path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" />
|
|
232
|
+
</svg>
|
|
233
|
+
<button aria-describedby="ic-tooltip-with-icon">Icon on Tooltip</button>
|
|
234
|
+
</ic-tooltip>
|
|
235
|
+
`,
|
|
236
|
+
|
|
237
|
+
name: "With Icon",
|
|
238
|
+
};
|
|
239
|
+
|
|
210
240
|
export const Truncation = {
|
|
211
241
|
render: () =>
|
|
212
242
|
html`<ic-tooltip
|
|
@@ -359,9 +389,7 @@ export const Playground = {
|
|
|
359
389
|
<ic-button aria-describedby="ic-tooltip-2"> ICDS </ic-button>
|
|
360
390
|
</ic-tooltip>
|
|
361
391
|
</div> `,
|
|
362
|
-
|
|
363
392
|
args: defaultArgs,
|
|
364
|
-
|
|
365
393
|
argTypes: {
|
|
366
394
|
placement: {
|
|
367
395
|
options: [
|
|
@@ -378,20 +406,114 @@ export const Playground = {
|
|
|
378
406
|
"left",
|
|
379
407
|
"left-start",
|
|
380
408
|
],
|
|
381
|
-
|
|
382
409
|
control: {
|
|
383
410
|
type: "select",
|
|
384
411
|
},
|
|
385
412
|
},
|
|
386
|
-
|
|
387
413
|
theme: {
|
|
388
414
|
options: ["inherit", "light", "dark"],
|
|
389
|
-
|
|
390
415
|
control: {
|
|
391
416
|
type: "inline-radio",
|
|
392
417
|
},
|
|
393
418
|
},
|
|
394
419
|
},
|
|
395
|
-
|
|
396
420
|
name: "Playground",
|
|
397
421
|
};
|
|
422
|
+
|
|
423
|
+
export const PlaygroundWithIcon = {
|
|
424
|
+
render: (args) =>
|
|
425
|
+
html`<div style="margin: 250px">
|
|
426
|
+
<ic-tooltip
|
|
427
|
+
label=${args.label}
|
|
428
|
+
icon-alt-text=${args.tooltipIconAltText}
|
|
429
|
+
icon-slot=${args.iconSlot}
|
|
430
|
+
placement=${args.placement}
|
|
431
|
+
max-lines=${args.maxLines}
|
|
432
|
+
disable-hover=${args.disableHover}
|
|
433
|
+
id="ic-tooltip-1"
|
|
434
|
+
theme=${args.theme}
|
|
435
|
+
fixed-positioning=${args.fixedPositioning}
|
|
436
|
+
>
|
|
437
|
+
<svg
|
|
438
|
+
slot=${args.iconSlot}
|
|
439
|
+
aria-label=${args.tooltipIconAltText}
|
|
440
|
+
width="24"
|
|
441
|
+
height="24"
|
|
442
|
+
viewBox="0 0 24 24"
|
|
443
|
+
fill="currentColor"
|
|
444
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
445
|
+
>
|
|
446
|
+
<path
|
|
447
|
+
d="M8.79502 15.875L4.62502 11.705L3.20502 13.115L8.79502 18.705L20.795 6.70501L19.385 5.29501L8.79502 15.875Z"
|
|
448
|
+
/>
|
|
449
|
+
</svg>
|
|
450
|
+
<button aria-describedby="ic-tooltip-1">Native</button>
|
|
451
|
+
</ic-tooltip>
|
|
452
|
+
<ic-tooltip
|
|
453
|
+
label=${args.label}
|
|
454
|
+
icon-alt-text=${args.tooltipIconAltText}
|
|
455
|
+
icon-slot=${args.iconSlot}
|
|
456
|
+
placement=${args.placement}
|
|
457
|
+
max-lines=${args.maxLines}
|
|
458
|
+
disable-hover=${args.disableHover}
|
|
459
|
+
id="ic-tooltip-2"
|
|
460
|
+
theme=${args.theme}
|
|
461
|
+
fixed-positioning=${args.fixedPositioning}
|
|
462
|
+
>
|
|
463
|
+
<svg
|
|
464
|
+
slot=${args.iconSlot}
|
|
465
|
+
aria-label=${args.tooltipIconAltText}
|
|
466
|
+
width="24"
|
|
467
|
+
height="24"
|
|
468
|
+
viewBox="0 0 24 24"
|
|
469
|
+
fill="currentColor"
|
|
470
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
471
|
+
>
|
|
472
|
+
<path
|
|
473
|
+
d="M8.79502 15.875L4.62502 11.705L3.20502 13.115L8.79502 18.705L20.795 6.70501L19.385 5.29501L8.79502 15.875Z"
|
|
474
|
+
/>
|
|
475
|
+
</svg>
|
|
476
|
+
<ic-button aria-describedby="ic-tooltip-2"> ICDS </ic-button>
|
|
477
|
+
</ic-tooltip>
|
|
478
|
+
</div> `,
|
|
479
|
+
args: defaultWithIconArgs,
|
|
480
|
+
argTypes: {
|
|
481
|
+
placement: {
|
|
482
|
+
options: [
|
|
483
|
+
"bottom",
|
|
484
|
+
"top-start",
|
|
485
|
+
"top",
|
|
486
|
+
"top-end",
|
|
487
|
+
"right-start",
|
|
488
|
+
"right",
|
|
489
|
+
"right-end",
|
|
490
|
+
"bottom-end",
|
|
491
|
+
"bottom-start",
|
|
492
|
+
"left-end",
|
|
493
|
+
"left",
|
|
494
|
+
"left-start",
|
|
495
|
+
],
|
|
496
|
+
control: {
|
|
497
|
+
type: "select",
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
theme: {
|
|
501
|
+
options: ["inherit", "light", "dark"],
|
|
502
|
+
control: {
|
|
503
|
+
type: "inline-radio",
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
iconSlot: {
|
|
507
|
+
options: ["icon", ""],
|
|
508
|
+
control: {
|
|
509
|
+
type: "select",
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
tooltipIconAltText: {
|
|
513
|
+
control: {
|
|
514
|
+
type: "text",
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
name: "Playground With Icon",
|
|
519
|
+
};
|
|
@@ -163,7 +163,7 @@ export class Typography {
|
|
|
163
163
|
render() {
|
|
164
164
|
var _a, _b;
|
|
165
165
|
const { variant, applyVerticalMargins, maxLines, truncated, expanded, strikethrough, underline, italic, bold, theme, } = this;
|
|
166
|
-
return (h(Host, { key: '
|
|
166
|
+
return (h(Host, { key: 'ebe035263fde8a7f2d24b8c40386caa8920bc506', class: {
|
|
167
167
|
[`ic-typography-${variant}`]: true,
|
|
168
168
|
[`ic-typography-vertical-margins-${variant}`]: !!applyVerticalMargins,
|
|
169
169
|
["ic-typography-bold"]: !!bold,
|
|
@@ -176,7 +176,7 @@ export class Typography {
|
|
|
176
176
|
((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===
|
|
177
177
|
"IC-TOOLTIP") &&
|
|
178
178
|
maxLines &&
|
|
179
|
-
maxLines > 0 ? (h("div", { class: "trunc-wrapper", ref: (el) => (this.truncWrapperEl = el) }, h("slot", null))) : (h("slot", null)), variant === "body" && maxLines && maxLines > 0 && truncated && (h("button", { key: '
|
|
179
|
+
maxLines > 0 ? (h("div", { class: "trunc-wrapper", ref: (el) => (this.truncWrapperEl = el) }, h("slot", null))) : (h("slot", null)), variant === "body" && maxLines && maxLines > 0 && truncated && (h("button", { key: '78d2abb16288489fadb3c94a1cf1bbffd78ea67e', class: { "trunc-btn": true, focus: this.truncButtonFocussed }, onFocus: this.truncButtonFocus, onBlur: this.truncButtonBlur, onMouseDown: this.truncButtonFocusFromMouse, onClick: this.toggleExpanded }, expanded ? "See less" : "See more"))));
|
|
180
180
|
}
|
|
181
181
|
static get is() { return "ic-typography"; }
|
|
182
182
|
static get encapsulation() { return "shadow"; }
|
|
@@ -542,6 +542,6 @@ const slottedInteractiveElements = (el) => Array.from(el.querySelectorAll(`a[hre
|
|
|
542
542
|
ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button,
|
|
543
543
|
ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion, ic-date-input, ic-date-picker, ic-action-chip, ic-time-input`));
|
|
544
544
|
|
|
545
|
-
export { IcInformationStatus as A, slotHasContent as B, refreshInteractiveElementsOnSlotChange as C, DEVICE_SIZES as D, focusElement as E, slottedInteractiveElements as F, isEmptyString as G, hasClassificationBanner as H, IcBrandForegroundEnum as I, elementOverflowsX as J, isMacDevice as K, getOptionsWithoutGroupTitlesCount as L, getElementInheritedTheme as M, getNavItemParentDetails as N, getCssProperty as O, getSlot as P, getSlotContent as Q, capitalize as R, checkSlotInChildMutations as S, isMobileOrTablet as T, debounceEvent as U, getFilteredMenuOptions as V, getLabelFromValue as W, getBrandColorBrightness as X, isSlottedInGroup as Y, isElInAGGrid as a, inheritAttributes as b, checkResizeObserver as c, renderFileHiddenInput as d,
|
|
545
|
+
export { IcInformationStatus as A, slotHasContent as B, refreshInteractiveElementsOnSlotChange as C, DEVICE_SIZES as D, focusElement as E, slottedInteractiveElements as F, isEmptyString as G, hasClassificationBanner as H, IcBrandForegroundEnum as I, elementOverflowsX as J, isMacDevice as K, getOptionsWithoutGroupTitlesCount as L, getElementInheritedTheme as M, getNavItemParentDetails as N, getCssProperty as O, getSlot as P, getSlotContent as Q, capitalize as R, checkSlotInChildMutations as S, isMobileOrTablet as T, debounceEvent as U, getFilteredMenuOptions as V, getLabelFromValue as W, getBrandColorBrightness as X, isSlottedInGroup as Y, isElInAGGrid as a, inheritAttributes as b, checkResizeObserver as c, renderFileHiddenInput as d, renderDynamicChildSlots as e, isSafari as f, getBrandFromContext as g, handleHiddenFormButtonClick as h, isSlotUsed as i, onComponentPropUndefinedChange as j, convertToRGBA as k, getBrandForegroundAppearance as l, isPropDefined as m, getSlotElements as n, onComponentRequiredPropUndefined as o, pxToRem as p, getCurrentDeviceSize as q, removeDisabledFalse as r, addFormResetListener as s, removeFormResetListener as t, renderHiddenInput as u, removeHiddenInput as v, getInputDescribedByText as w, hasValidationStatus as x, getInputHelperTextID as y, getInputValidationTextID as z };
|
|
546
546
|
|
|
547
547
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { O as OpenInNew } from './OpenInNew.js';
|
|
3
|
-
import { r as removeDisabledFalse, o as onComponentRequiredPropUndefined,
|
|
3
|
+
import { r as removeDisabledFalse, o as onComponentRequiredPropUndefined, e as renderDynamicChildSlots, i as isSlotUsed, a as isElInAGGrid } from './helpers.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
|
5
5
|
|
|
6
6
|
const icActionChipCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n}\n\n.chip {\n --icon-color: var(--ic-action-chip-filled-icon);\n --text-color: var(--ic-action-chip-filled-label);\n --ic-typography-color: var(--text-color);\n\n align-items: center;\n background-color: var(--ic-action-chip-filled-background-default);\n border: var(--ic-border-width) solid transparent;\n border-radius: var(--ic-space-md);\n color: var(--text-color);\n cursor: pointer;\n display: flex;\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px)) var(--ic-space-xxs);\n position: relative;\n text-decoration: none;\n\n &:hover {\n background-color: var(--ic-action-chip-filled-background-hover);\n }\n\n &:active {\n background-color: var(--ic-action-chip-filled-background-pressed);\n }\n\n &:focus {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n }\n}\n\n.small {\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n padding: var(--ic-space-1px) var(--ic-space-xs);\n}\n\n.medium {\n border-radius: var(--ic-space-md);\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px)) var(--ic-space-xs);\n}\n\n.large {\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px)) var(--ic-space-xs);\n}\n\n.outlined {\n --icon-color: var(--ic-action-chip-outlined-icon);\n --text-color: var(--ic-action-chip-outlined-label);\n\n background-color: transparent;\n border-color: var(--ic-action-chip-outlined-border-default);\n\n &.non-transparent {\n background-color: var(--ic-action-chip-outlined-background-default);\n }\n\n &:hover {\n --icon-color: var(--ic-action-chip-outlined-icon-hover);\n --text-color: var(--ic-action-chip-outlined-label-hover);\n\n background-color: var(--ic-action-chip-outlined-background-hover);\n border-color: var(--ic-action-chip-outlined-border-hover);\n }\n\n &:active {\n --icon-color: var(--ic-action-chip-outlined-icon-pressed);\n --text-color: var(--ic-action-chip-outlined-label-pressed);\n\n background-color: var(--ic-action-chip-outlined-background-pressed);\n border-color: var(--ic-action-chip-outlined-border-pressed);\n }\n}\n\n.monochrome {\n &.filled {\n background-color: var(\n --ic-action-chip-monochrome-filled-background-default\n );\n\n &:hover {\n background-color: var(\n --ic-action-chip-monochrome-filled-background-hover\n );\n }\n\n &:active {\n background-color: var(\n --ic-action-chip-monochrome-filled-background-pressed\n );\n }\n }\n\n &.outlined {\n --icon-color: var(--ic-action-chip-monochrome-outlined-icon);\n --text-color: var(--ic-action-chip-monochrome-outlined-label);\n\n border-color: var(--ic-action-chip-monochrome-outlined-border-default);\n\n &.non-transparent {\n background-color: var(\n --ic-action-chip-monochrome-outlined-background-default\n );\n }\n\n &:hover {\n --icon-color: var(--ic-action-chip-monochrome-outlined-icon-hover);\n --text-color: var(--ic-action-chip-monochrome-outlined-label-hover);\n\n background-color: var(\n --ic-action-chip-monochrome-outlined-background-hover\n );\n border-color: var(--ic-action-chip-monochrome-outlined-border-hover);\n }\n\n &:active {\n --icon-color: var(--ic-action-chip-monochrome-outlined-icon-pressed);\n --text-color: var(--ic-action-chip-monochrome-outlined-label-pressed);\n\n background-color: var(\n --ic-action-chip-monochrome-outlined-background-pressed\n );\n border-color: var(--ic-action-chip-monochrome-outlined-border-pressed);\n }\n }\n}\n\n.disabled {\n --icon-color: var(--ic-action-chip-icon-disabled) !important;\n --text-color: var(--ic-action-chip-label-disabled) !important;\n\n background-color: var(--ic-action-chip-background-disabled) !important;\n cursor: default;\n\n &.outlined {\n border-color: var(--ic-action-chip-outlined-border-disabled) !important;\n border-style: dashed;\n\n &:not(.non-transparent) {\n background-color: transparent !important;\n }\n }\n}\n\n.label.small {\n padding: 0 var(--ic-space-xxs);\n}\n\n.label.medium {\n padding: 0 calc(var(--ic-space-xs) - var(--ic-space-xxxs));\n}\n\n.label.large {\n padding: 0 var(--ic-space-xs);\n}\n\n.icon {\n box-sizing: border-box;\n color: var(--icon-color);\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n padding: var(--ic-space-xxxs);\n}\n\n.open-in-new-icon {\n box-sizing: border-box;\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n}\n\n.open-in-new-icon > svg {\n fill: var(--icon-color);\n height: inherit;\n width: inherit;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .chip {\n transition: var(--ic-easing-transition-fast);\n }\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-border-hc);\n\n &.disabled {\n --text-color: GrayText;\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n border-color: GrayText;\n\n svg,\n ::slotted(svg) {\n fill: GrayText;\n }\n }\n\n &:focus {\n border-color: Highlight;\n outline: none;\n }\n }\n}\n";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as closeIcon } from './close-icon.js';
|
|
3
|
-
import {
|
|
3
|
+
import { e as renderDynamicChildSlots, i as isSlotUsed, p as pxToRem } from './helpers.js';
|
|
4
4
|
import { V as VARIANT_ICONS } from './constants.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './ic-button2.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { r as removeDisabledFalse, i as isSlotUsed, o as onComponentRequiredPropUndefined,
|
|
2
|
+
import { r as removeDisabledFalse, i as isSlotUsed, o as onComponentRequiredPropUndefined, e as renderDynamicChildSlots, g as getBrandFromContext, I as IcBrandForegroundEnum } from './helpers.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
|
4
4
|
|
|
5
5
|
const icCardHorizontalCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:flex;--card-max-width:550px;--image-size:132px;--message-max-lines:2}.card.small{--card-max-width:360px;--image-size:calc(var(--ic-space-sm) * 10)}.card.small.spacious{--image-size:100px}.card.large{--card-max-width:1130px;--image-size:164px;--message-max-lines:3}.card.large .card-message{margin-top:var(--ic-space-md)}a{text-decoration:none !important;color:var(--ic-card-text-primary) !important}button{border:none;background-color:transparent;outline:var(--ic-hc-focus-outline);padding:0}.card,.card.clickable{display:flex;flex-direction:row;border:var(--ic-space-1px) solid var(--ic-card-border-primary);border-radius:var(--ic-border-radius);box-sizing:border-box;text-align:left;color:var(--ic-card-text-primary);transition:var(--ic-easing-transition-fast);position:relative;max-width:var(--card-max-width);height:-moz-fit-content;height:fit-content;width:var(--card-horizontal-width, -moz-fit-content);width:var(--card-horizontal-width, fit-content)}.dark.card,.dark.card.clickable{border:var(--ic-border-width) solid\n var(--ic-color-border-neutral-pressed-dark)}.card.clickable:hover{background-color:var(--ic-card-background-hover);border:var(--ic-space-1px) solid var(--ic-card-hover-border-color);cursor:pointer}.card.clickable:focus,.card.clickable.focussed{background-color:var(--ic-card-background-hover);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border:var(--ic-space-1px) solid var(--ic-card-pressed-border-color)}.card.clickable:active{background-color:var(--ic-card-background-pressed);box-shadow:var(--ic-border-focus)}.card.disabled{border:var(--ic-space-1px) dashed var(--ic-card-disabled-border-color)}.card-header{display:flex;align-items:center}.icon{display:flex;align-items:center;padding-right:var(--ic-space-xs)}.card ::slotted(svg){fill:var(--ic-card-icon)}.card.disabled ::slotted(svg){fill:var(--ic-card-icon-disabled)}.card.clickable .card-title{--ic-typography-color:var(--ic-card-clickable-text);color:var(--ic-card-clickable-text);text-decoration:underline;text-decoration-thickness:var(--ic-space-1px)}.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{display:inline-block;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}.card.clickable:active .card-title{text-decoration:none}.card.disabled .card-title{text-decoration:underline;text-decoration-thickness:var(--ic-space-1px);text-decoration-color:var(--ic-card-disabled-text);color:var(--ic-card-disabled-text);--ic-typography-color:var(--ic-card-disabled-text)}.card-message{margin-top:var(--ic-space-xs);align-items:left}.card.disabled .card-message,.card.disabled .subheading{--ic-typography-color:var(--ic-card-disabled-text)}.image{display:flex}.image ::slotted([slot=\"image-left\"]),.image ::slotted([slot=\"image-right\"]){height:var(--image-size);width:var(--image-size)}.image ::slotted([slot=\"image-left\"]){border-radius:var(--ic-space-1px) 0 0 var(--ic-space-1px)}.image ::slotted([slot=\"image-right\"]){border-radius:0 var(--ic-space-1px) var(--ic-space-1px) 0}.card-content{display:flex;flex-direction:column;padding:var(--ic-space-md)}.card .card-title ::slotted([slot=\"heading\"]),.card .card-title ic-typography p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(var(--card-max-width) - var(--ic-space-xl))}.card.with-icon .card-title ::slotted([slot=\"heading\"]),.card.with-icon .card-title ic-typography p{max-width:calc(var(--card-max-width) - (2 * var(--ic-space-xl)))}.card.with-image .card-title ::slotted([slot=\"heading\"]),.card.with-image .card-title ic-typography p{max-width:calc(\n var(--card-max-width) - var(--image-size) - var(--ic-space-xl)\n )}.card.with-image.with-icon .card-title ::slotted([slot=\"heading\"]),.card.with-image.with-icon .card-title ic-typography p{max-width:calc(\n var(--card-max-width) - var(--image-size) - (2 * var(--ic-space-xl))\n )}.card .card-message ::slotted([slot=\"message\"]),.card .card-message ic-typography{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--message-max-lines, initial);-webkit-line-clamp:var(--message-max-lines, initial);overflow:hidden}.card.spacious{padding:var(--ic-space-md)}.card.spacious .card-content{padding:0}.card.spacious .card-content.left-image{padding:0 0 0 var(--ic-space-md)}.card.spacious .card-content.right-image{padding:0 var(--ic-space-md) 0 0}.card.spacious .image ::slotted([slot=\"image-left\"]),.card.spacious .image ::slotted([slot=\"image-right\"]){border-radius:var(--ic-border-radius)}.interaction-button{margin-left:auto}.adornment{margin-top:var(--ic-space-xxs)}.subheading{margin-top:var(--ic-space-xxs)}.card-title.with-interaction-button{margin-right:var(--ic-space-md)}::slotted(p),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6){line-height:normal}@media (forced-colors: active){.card ::slotted(svg){fill:currentcolor}.card.disabled ::slotted(svg){fill:GrayText !important}.card.disabled{border-color:GrayText !important}.card.disabled .card-message,.card.disabled .card-title,.card.disabled .subheading{color:GrayText;--ic-typography-color:GrayText}}@media (prefers-reduced-motion: reduce){.card,.card.clickable{transition:none}}";
|
|
@@ -140,7 +140,7 @@ const CardHorizontal = /*@__PURE__*/ proxyCustomElement(class CardHorizontal ext
|
|
|
140
140
|
};
|
|
141
141
|
const hasLeftImage = isSlotUsed(this.el, this.IMAGE_LEFT);
|
|
142
142
|
const hasRightImage = isSlotUsed(this.el, this.IMAGE_RIGHT);
|
|
143
|
-
return (h(Host, { key: '
|
|
143
|
+
return (h(Host, { key: '993936c23981131f47a6a861fa5a674f7ac719a6', class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, h(Component, Object.assign({ key: 'a2db6c5abb6998c35f151d99dddb2735413f3bc1', class: {
|
|
144
144
|
card: true,
|
|
145
145
|
clickable: clickable && !disabled,
|
|
146
146
|
disabled,
|
|
@@ -150,15 +150,15 @@ const CardHorizontal = /*@__PURE__*/ proxyCustomElement(class CardHorizontal ext
|
|
|
150
150
|
"with-icon": isSlotUsed(this.el, "icon"),
|
|
151
151
|
"with-image": hasLeftImage || hasRightImage,
|
|
152
152
|
spacious: density === "spacious",
|
|
153
|
-
}, tabindex: clickable && !parentIsAnchorTag ? 0 : undefined, "aria-disabled": disabled ? "true" : undefined, disabled: disabled ? true : undefined }, attrs), hasLeftImage && (h("div", { key: '
|
|
153
|
+
}, tabindex: clickable && !parentIsAnchorTag ? 0 : undefined, "aria-disabled": disabled ? "true" : undefined, disabled: disabled ? true : undefined }, attrs), hasLeftImage && (h("div", { key: '656083f09459cc16f8447b91eebb3c659b85da5c', class: "image" }, h("slot", { key: '1b840cba21192c53adf23100a9098caeeec437e1', name: "image-left" }))), h("div", { key: '2e2d7beac8517384366bcf8d06bac8287b87c891', class: {
|
|
154
154
|
"card-content": true,
|
|
155
155
|
"left-image": hasLeftImage,
|
|
156
156
|
"right-image": hasRightImage,
|
|
157
|
-
} }, h("div", { key: '
|
|
157
|
+
} }, h("div", { key: 'e3c9df4624522f1e06010b7dbee8117e32e9776c', class: "card-header" }, isSlotUsed(this.el, "icon") && (h("div", { key: '4e76a0b208d5ded1b78eb2b5a767cda857a37209', class: "icon" }, h("slot", { key: 'ca49f56e2c2ee3597cd6a617e9e0c87023398f6f', name: "icon" }))), h("div", { key: 'ce88138ce249e4f72eb84c5094f13823b191d623', class: {
|
|
158
158
|
"card-title": true,
|
|
159
159
|
"with-interaction-button": isSlotUsed(this.el, this.INTERACTION_BUTTON),
|
|
160
|
-
} }, h("slot", { key: '
|
|
161
|
-
(subheading || isSlotUsed(this.el, "subheading")) && (h("div", { key: '
|
|
160
|
+
} }, h("slot", { key: 'cf3047258572bb2df6a880dbe78cdfb997138e52', name: "heading" }, h("ic-typography", { key: '2a953b2db51d4d5ad87cd951f71be15e8b6a9123', variant: "h4" }, h("p", { key: '778d1c565dda268e52e30e435593f1205ab4c8f6' }, heading)))), isSlotUsed(this.el, this.INTERACTION_BUTTON) && (h("div", { key: '9c13abe27f6ccf4a5d33505dacdf3a3da63fcc61', class: "interaction-button" }, h("slot", { key: '72180f00ff5a341450e0cc58fdd4e4e674446dca', name: "interaction-button" })))), density === "spacious" &&
|
|
161
|
+
(subheading || isSlotUsed(this.el, "subheading")) && (h("div", { key: '84de830afde5f4b9c05d8699c5ea72fb995c68dc', class: "subheading" }, h("slot", { key: '343d4addd3a8e6b175bb8cd4c6f30143d89655e9', name: "subheading" }, h("ic-typography", { key: '7dc39433145b52a210cac6963b46ceeab46214e0', variant: "subtitle-small" }, subheading)))), density === "spacious" && isSlotUsed(this.el, "adornment") && (h("div", { key: 'eba46f8b6532f8a54a893baded9ea2ec19e5db2f', class: "adornment" }, h("slot", { key: 'b200296d06d2decfeeef24c80b7c7a651b9ce9bb', name: "adornment" }))), (message || isSlotUsed(this.el, "message")) && (h("div", { key: 'af361ff1a144a2fa7d6fdccd881e93c244824587', class: "card-message" }, message && (h("ic-typography", { key: '49567589e624e4b971e798233fdf31c7be932374', variant: "body" }, message)), isSlotUsed(this.el, "message") && h("slot", { key: '84726023327a15b33785348f7aeb19ab93bded55', name: "message" })))), isSlotUsed(this.el, "badge") && h("slot", { key: 'ee75df75084b53a768c83cf2f11471f846030549', name: "badge" }), hasRightImage && (h("div", { key: '47b257898c62169e72626d990f762b361bea35b6', class: "image" }, h("slot", { key: '31af6d4ee374ac40c2ee3903ac94c75a409fb46a', name: "image-right" }))))));
|
|
162
162
|
}
|
|
163
163
|
get el() { return this; }
|
|
164
164
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { r as removeDisabledFalse, i as isSlotUsed, o as onComponentRequiredPropUndefined,
|
|
2
|
+
import { r as removeDisabledFalse, i as isSlotUsed, o as onComponentRequiredPropUndefined, e as renderDynamicChildSlots, g as getBrandFromContext, I as IcBrandForegroundEnum } from './helpers.js';
|
|
3
3
|
import { c as chevronIcon } from './chevron-icon.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './ic-tooltip2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|