@ukic/web-components 3.8.0 → 3.9.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-8217daf4.js → helpers-a0e78e2e.js} +31 -7
- package/dist/cjs/helpers-a0e78e2e.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 +2 -2
- package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +2 -2
- package/dist/cjs/ic-badge.cjs.entry.js.map +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 +25 -20
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +2 -2
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +4 -4
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-layout-grid-item.cjs.entry.js +70 -0
- package/dist/cjs/ic-layout-grid-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-layout-grid.cjs.entry.js +156 -0
- package/dist/cjs/ic-layout-grid.cjs.entry.js.map +1 -0
- 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 +3 -3
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- 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-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination.cjs.entry.js +5 -5
- package/dist/cjs/ic-popover-menu.cjs.entry.js +10 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-select.cjs.entry.js +7 -7
- 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 +5 -5
- 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-text-field.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 +5 -5
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- 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 +1 -1
- package/dist/cjs/index-d337cd8a.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/ai-icon.svg +11 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/ic-action-chip/ic-action-chip.css +3 -3
- package/dist/collection/components/ic-alert/ic-alert.css +13 -0
- package/dist/collection/components/ic-alert/ic-alert.js +1 -1
- package/dist/collection/components/ic-alert/ic-alert.stories.js +7 -2
- package/dist/collection/components/ic-badge/ic-badge.css +4 -0
- package/dist/collection/components/ic-badge/ic-badge.js +1 -1
- package/dist/collection/components/ic-badge/ic-badge.stories.js +98 -0
- package/dist/collection/components/ic-button/ic-button.js +33 -12
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.stories.js +181 -2
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +1 -0
- package/dist/collection/components/ic-chip/ic-chip.css +3 -3
- package/dist/collection/components/ic-data-list/ic-data-list.css +5 -0
- package/dist/collection/components/ic-data-list/ic-data-list.stories.js +50 -0
- package/dist/collection/components/ic-data-row/ic-data-row.css +3 -1
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.css +540 -0
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.js +377 -0
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.js.map +1 -0
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.stories.js +429 -0
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.types.js +2 -0
- package/dist/collection/components/ic-layout-grid/ic-layout-grid.types.js.map +1 -0
- package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.css +12 -0
- package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js +182 -0
- package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js.map +1 -0
- 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.css +2 -0
- 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-item/ic-pagination-item.js +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +29 -5
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +94 -0
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.js +6 -6
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +4 -4
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
- package/dist/collection/components/ic-step/ic-step.js +13 -13
- package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
- package/dist/collection/components/ic-switch/ic-switch.js +4 -4
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +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-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.css +8 -0
- package/dist/collection/components/ic-toast/ic-toast.js +4 -4
- package/dist/collection/components/ic-toast/ic-toast.stories.js +2 -2
- 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.js +27 -3
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +38 -0
- package/dist/collection/utils/constants.js +5 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/helpers.js +14 -6
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +31 -7
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-action-chip.js +1 -1
- package/dist/components/ic-action-chip.js.map +1 -1
- package/dist/components/ic-alert.js +1 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +1 -1
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +2 -2
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-button2.js +14 -12
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox.js +2 -2
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +2 -2
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-list.js +1 -1
- package/dist/components/ic-data-list.js.map +1 -1
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-label2.js +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-layout-grid-item.d.ts +11 -0
- package/dist/components/ic-layout-grid-item.js +95 -0
- package/dist/components/ic-layout-grid-item.js.map +1 -0
- package/dist/components/ic-layout-grid.d.ts +11 -0
- package/dist/components/ic-layout-grid.js +188 -0
- package/dist/components/ic-layout-grid.js.map +1 -0
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-loading-indicator2.js +5 -5
- package/dist/components/ic-menu-group.js +2 -2
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu2.js +4 -4
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +3 -3
- package/dist/components/ic-navigation-group.js.map +1 -1
- 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 +7 -7
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination.js +4 -4
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +11 -6
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select.js +7 -7
- package/dist/components/ic-side-navigation.js +5 -5
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +14 -14
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-switch.js +5 -5
- package/dist/components/ic-tab-context.js +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field.js +1 -1
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +5 -5
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +2 -2
- package/dist/components/ic-tooltip2.js +8 -3
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/core/core.css +12 -12
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-0d680d19.entry.js +2 -0
- package/dist/core/p-0d680d19.entry.js.map +1 -0
- package/dist/core/{p-ef357622.entry.js → p-15dbccc2.entry.js} +2 -2
- package/dist/core/{p-bf5653c0.entry.js → p-19cf2327.entry.js} +2 -2
- package/dist/core/p-1d37ac1c.entry.js +2 -0
- package/dist/core/p-1d37ac1c.entry.js.map +1 -0
- package/dist/core/{p-19680887.entry.js → p-1e2f40b0.entry.js} +2 -2
- package/dist/core/{p-fc933fc3.entry.js → p-21cf2beb.entry.js} +2 -2
- package/dist/core/p-25007ec9.js +2 -0
- package/dist/core/p-25007ec9.js.map +1 -0
- package/dist/core/{p-de43d375.entry.js → p-287e5c17.entry.js} +2 -2
- package/dist/core/{p-3f9ff1cb.entry.js → p-28efe829.entry.js} +2 -2
- package/dist/core/{p-c63ae7d0.entry.js → p-2f4f392f.entry.js} +2 -2
- package/dist/core/{p-d2f1beb6.entry.js → p-313a8a2f.entry.js} +2 -2
- package/dist/core/{p-7cd6487e.entry.js → p-317e005f.entry.js} +2 -2
- package/dist/core/{p-0c095f5b.entry.js → p-3dc54847.entry.js} +2 -2
- package/dist/core/{p-2394346c.entry.js → p-3e5d7a3d.entry.js} +2 -2
- package/dist/core/p-41ef74a7.entry.js +2 -0
- package/dist/core/p-41ef74a7.entry.js.map +1 -0
- package/dist/core/{p-9e177686.entry.js → p-41f92698.entry.js} +2 -2
- package/dist/core/p-43324339.entry.js +2 -0
- package/dist/core/p-43324339.entry.js.map +1 -0
- package/dist/core/{p-f34eee68.entry.js → p-45dd12ee.entry.js} +2 -2
- package/dist/core/{p-0a8140ef.entry.js → p-493eaabb.entry.js} +2 -2
- package/dist/core/{p-c9c6d63b.entry.js → p-4ca782eb.entry.js} +2 -2
- package/dist/core/{p-8557fa1e.entry.js → p-4d1a3036.entry.js} +2 -2
- package/dist/core/p-52748d5c.entry.js +2 -0
- package/dist/core/p-52748d5c.entry.js.map +1 -0
- package/dist/core/p-595a4d06.entry.js +2 -0
- package/dist/core/p-595a4d06.entry.js.map +1 -0
- package/dist/core/{p-57644340.entry.js → p-5daa7915.entry.js} +2 -2
- package/dist/core/{p-88b516d6.entry.js → p-5f68f62b.entry.js} +2 -2
- package/dist/core/{p-d47acbd4.entry.js → p-5fbc8e62.entry.js} +2 -2
- package/dist/core/p-6014ab64.entry.js +2 -0
- package/dist/core/{p-3aa7f724.entry.js → p-661ae402.entry.js} +2 -2
- package/dist/core/{p-998dfae0.entry.js → p-6a576a8b.entry.js} +2 -2
- package/dist/core/{p-b3ac38c5.entry.js → p-6e8ef73c.entry.js} +2 -2
- package/dist/core/{p-fbaf0301.entry.js → p-6ed0ac48.entry.js} +2 -2
- package/dist/core/p-711bfeed.entry.js +2 -0
- package/dist/core/p-711bfeed.entry.js.map +1 -0
- package/dist/core/{p-60ff225d.entry.js → p-72a9909c.entry.js} +2 -2
- package/dist/core/{p-f643ae2b.entry.js → p-742a9181.entry.js} +2 -2
- package/dist/core/{p-b94d404b.entry.js → p-7cd4f6a6.entry.js} +2 -2
- package/dist/core/{p-a082d978.entry.js → p-8a4b12e4.entry.js} +2 -2
- package/dist/core/{p-48db785a.entry.js → p-8b5022bc.entry.js} +2 -2
- package/dist/core/{p-d1b7b839.entry.js → p-9323c234.entry.js} +2 -2
- package/dist/core/{p-0eaa2904.entry.js → p-948f89a0.entry.js} +2 -2
- package/dist/core/p-97b93ddf.entry.js +2 -0
- package/dist/core/p-97b93ddf.entry.js.map +1 -0
- package/dist/core/{p-9f792a31.entry.js → p-999f0a5d.entry.js} +2 -2
- package/dist/core/p-999f0a5d.entry.js.map +1 -0
- package/dist/core/{p-04c36b23.entry.js → p-9c013333.entry.js} +2 -2
- package/dist/core/{p-3eef02dd.entry.js → p-9eeb5e85.entry.js} +2 -2
- package/dist/core/{p-682a9365.entry.js → p-9f36791b.entry.js} +2 -2
- package/dist/core/{p-9d78ef89.entry.js → p-a602a8e1.entry.js} +2 -2
- package/dist/core/{p-51bff253.entry.js → p-a77364f5.entry.js} +2 -2
- package/dist/core/{p-1829c1a9.entry.js → p-af9c391d.entry.js} +2 -2
- package/dist/core/{p-2c2c752d.entry.js → p-b0d488d0.entry.js} +2 -2
- package/dist/core/{p-1f913ba3.entry.js → p-b25d33d8.entry.js} +2 -2
- package/dist/core/{p-fee854f5.entry.js → p-b52000d9.entry.js} +2 -2
- package/dist/core/{p-4345907a.entry.js → p-cbe0d1bb.entry.js} +2 -2
- package/dist/core/p-ceea1712.entry.js +2 -0
- package/dist/core/p-ceea1712.entry.js.map +1 -0
- package/dist/core/p-cf631191.entry.js +2 -0
- package/dist/core/{p-ee6caf27.entry.js → p-df88ff5b.entry.js} +2 -2
- package/dist/core/{p-918af357.entry.js → p-e652ab09.entry.js} +2 -2
- package/dist/core/{p-4c336217.entry.js → p-e876e47c.entry.js} +2 -2
- package/dist/core/p-ea061ccf.entry.js +2 -0
- package/dist/core/p-ea061ccf.entry.js.map +1 -0
- package/dist/core/{p-b3d3ee50.entry.js → p-ea778379.entry.js} +2 -2
- package/dist/core/{p-f46fd0e7.entry.js → p-ef4b5469.entry.js} +2 -2
- package/dist/core/{p-fd421f11.entry.js → p-f309d3af.entry.js} +2 -2
- package/dist/core/{p-32c030b1.entry.js → p-f6a02202.entry.js} +2 -2
- package/dist/core/p-fc3b1155.entry.js +2 -0
- package/dist/core/p-fc3b1155.entry.js.map +1 -0
- package/dist/core/p-ffac41d6.entry.js +2 -0
- package/dist/core/p-ffac41d6.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-2e75abf4.js → helpers-56631aa0.js} +31 -7
- package/dist/esm/helpers-56631aa0.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 +2 -2
- package/dist/esm/ic-action-chip.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +2 -2
- package/dist/esm/ic-badge.entry.js.map +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 +25 -20
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +2 -2
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +2 -2
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +1 -1
- package/dist/esm/ic-data-list.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +4 -4
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-layout-grid-item.entry.js +66 -0
- package/dist/esm/ic-layout-grid-item.entry.js.map +1 -0
- package/dist/esm/ic-layout-grid.entry.js +152 -0
- package/dist/esm/ic-layout-grid.entry.js.map +1 -0
- 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 +3 -3
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- 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-item.entry.js +2 -2
- package/dist/esm/ic-pagination.entry.js +5 -5
- package/dist/esm/ic-popover-menu.entry.js +10 -6
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-select.entry.js +7 -7
- 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 +5 -5
- 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-text-field.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 +5 -5
- package/dist/esm/ic-toast.entry.js.map +1 -1
- 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 +1 -1
- package/dist/esm/index-a7a720e7.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-button/ic-button.d.ts +4 -0
- package/dist/types/components/ic-layout-grid/ic-layout-grid.d.ts +56 -0
- package/dist/types/components/ic-layout-grid/ic-layout-grid.types.d.ts +8 -0
- package/dist/types/components/ic-layout-grid-item/ic-layout-grid-item.d.ts +29 -0
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +4 -0
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +4 -0
- package/dist/types/components.d.ts +164 -0
- package/dist/types/utils/constants.d.ts +4 -0
- package/dist/types/utils/helpers.d.ts +3 -3
- package/dist/types/utils/types.d.ts +1 -1
- package/hydrate/index.js +389 -111
- package/hydrate/index.mjs +389 -111
- package/package.json +2 -2
- package/vscode-data.json +114 -0
- package/dist/cjs/helpers-8217daf4.js.map +0 -1
- package/dist/core/p-03a2fa83.entry.js +0 -2
- package/dist/core/p-03a2fa83.entry.js.map +0 -1
- package/dist/core/p-280e7874.entry.js +0 -2
- package/dist/core/p-280e7874.entry.js.map +0 -1
- package/dist/core/p-46a0a40b.entry.js +0 -2
- package/dist/core/p-46a0a40b.entry.js.map +0 -1
- package/dist/core/p-68f55187.entry.js +0 -2
- package/dist/core/p-68f55187.entry.js.map +0 -1
- package/dist/core/p-69aad690.entry.js +0 -2
- package/dist/core/p-69aad690.entry.js.map +0 -1
- package/dist/core/p-750d5536.entry.js +0 -2
- package/dist/core/p-750d5536.entry.js.map +0 -1
- package/dist/core/p-7ac5a271.entry.js +0 -2
- package/dist/core/p-7ac5a271.entry.js.map +0 -1
- package/dist/core/p-874f7e8d.entry.js +0 -2
- package/dist/core/p-874f7e8d.entry.js.map +0 -1
- package/dist/core/p-903f9c7f.entry.js +0 -2
- package/dist/core/p-903f9c7f.entry.js.map +0 -1
- package/dist/core/p-9f792a31.entry.js.map +0 -1
- package/dist/core/p-9f8acb5f.js +0 -2
- package/dist/core/p-9f8acb5f.js.map +0 -1
- package/dist/core/p-b5c72b06.entry.js +0 -2
- package/dist/core/p-b5c72b06.entry.js.map +0 -1
- package/dist/core/p-e0485462.entry.js +0 -2
- package/dist/core/p-e9b6b600.entry.js +0 -2
- package/dist/esm/helpers-2e75abf4.js.map +0 -1
- /package/dist/core/{p-ef357622.entry.js.map → p-15dbccc2.entry.js.map} +0 -0
- /package/dist/core/{p-bf5653c0.entry.js.map → p-19cf2327.entry.js.map} +0 -0
- /package/dist/core/{p-19680887.entry.js.map → p-1e2f40b0.entry.js.map} +0 -0
- /package/dist/core/{p-fc933fc3.entry.js.map → p-21cf2beb.entry.js.map} +0 -0
- /package/dist/core/{p-de43d375.entry.js.map → p-287e5c17.entry.js.map} +0 -0
- /package/dist/core/{p-3f9ff1cb.entry.js.map → p-28efe829.entry.js.map} +0 -0
- /package/dist/core/{p-c63ae7d0.entry.js.map → p-2f4f392f.entry.js.map} +0 -0
- /package/dist/core/{p-d2f1beb6.entry.js.map → p-313a8a2f.entry.js.map} +0 -0
- /package/dist/core/{p-7cd6487e.entry.js.map → p-317e005f.entry.js.map} +0 -0
- /package/dist/core/{p-0c095f5b.entry.js.map → p-3dc54847.entry.js.map} +0 -0
- /package/dist/core/{p-2394346c.entry.js.map → p-3e5d7a3d.entry.js.map} +0 -0
- /package/dist/core/{p-9e177686.entry.js.map → p-41f92698.entry.js.map} +0 -0
- /package/dist/core/{p-f34eee68.entry.js.map → p-45dd12ee.entry.js.map} +0 -0
- /package/dist/core/{p-0a8140ef.entry.js.map → p-493eaabb.entry.js.map} +0 -0
- /package/dist/core/{p-c9c6d63b.entry.js.map → p-4ca782eb.entry.js.map} +0 -0
- /package/dist/core/{p-8557fa1e.entry.js.map → p-4d1a3036.entry.js.map} +0 -0
- /package/dist/core/{p-57644340.entry.js.map → p-5daa7915.entry.js.map} +0 -0
- /package/dist/core/{p-88b516d6.entry.js.map → p-5f68f62b.entry.js.map} +0 -0
- /package/dist/core/{p-d47acbd4.entry.js.map → p-5fbc8e62.entry.js.map} +0 -0
- /package/dist/core/{p-e9b6b600.entry.js.map → p-6014ab64.entry.js.map} +0 -0
- /package/dist/core/{p-3aa7f724.entry.js.map → p-661ae402.entry.js.map} +0 -0
- /package/dist/core/{p-998dfae0.entry.js.map → p-6a576a8b.entry.js.map} +0 -0
- /package/dist/core/{p-b3ac38c5.entry.js.map → p-6e8ef73c.entry.js.map} +0 -0
- /package/dist/core/{p-fbaf0301.entry.js.map → p-6ed0ac48.entry.js.map} +0 -0
- /package/dist/core/{p-60ff225d.entry.js.map → p-72a9909c.entry.js.map} +0 -0
- /package/dist/core/{p-f643ae2b.entry.js.map → p-742a9181.entry.js.map} +0 -0
- /package/dist/core/{p-b94d404b.entry.js.map → p-7cd4f6a6.entry.js.map} +0 -0
- /package/dist/core/{p-a082d978.entry.js.map → p-8a4b12e4.entry.js.map} +0 -0
- /package/dist/core/{p-48db785a.entry.js.map → p-8b5022bc.entry.js.map} +0 -0
- /package/dist/core/{p-d1b7b839.entry.js.map → p-9323c234.entry.js.map} +0 -0
- /package/dist/core/{p-0eaa2904.entry.js.map → p-948f89a0.entry.js.map} +0 -0
- /package/dist/core/{p-04c36b23.entry.js.map → p-9c013333.entry.js.map} +0 -0
- /package/dist/core/{p-3eef02dd.entry.js.map → p-9eeb5e85.entry.js.map} +0 -0
- /package/dist/core/{p-682a9365.entry.js.map → p-9f36791b.entry.js.map} +0 -0
- /package/dist/core/{p-9d78ef89.entry.js.map → p-a602a8e1.entry.js.map} +0 -0
- /package/dist/core/{p-51bff253.entry.js.map → p-a77364f5.entry.js.map} +0 -0
- /package/dist/core/{p-1829c1a9.entry.js.map → p-af9c391d.entry.js.map} +0 -0
- /package/dist/core/{p-2c2c752d.entry.js.map → p-b0d488d0.entry.js.map} +0 -0
- /package/dist/core/{p-1f913ba3.entry.js.map → p-b25d33d8.entry.js.map} +0 -0
- /package/dist/core/{p-fee854f5.entry.js.map → p-b52000d9.entry.js.map} +0 -0
- /package/dist/core/{p-4345907a.entry.js.map → p-cbe0d1bb.entry.js.map} +0 -0
- /package/dist/core/{p-e0485462.entry.js.map → p-cf631191.entry.js.map} +0 -0
- /package/dist/core/{p-ee6caf27.entry.js.map → p-df88ff5b.entry.js.map} +0 -0
- /package/dist/core/{p-918af357.entry.js.map → p-e652ab09.entry.js.map} +0 -0
- /package/dist/core/{p-4c336217.entry.js.map → p-e876e47c.entry.js.map} +0 -0
- /package/dist/core/{p-b3d3ee50.entry.js.map → p-ea778379.entry.js.map} +0 -0
- /package/dist/core/{p-f46fd0e7.entry.js.map → p-ef4b5469.entry.js.map} +0 -0
- /package/dist/core/{p-fd421f11.entry.js.map → p-f309d3af.entry.js.map} +0 -0
- /package/dist/core/{p-32c030b1.entry.js.map → p-f6a02202.entry.js.map} +0 -0
@@ -33,12 +33,12 @@ export class StatusTag {
|
|
33
33
|
}
|
34
34
|
render() {
|
35
35
|
const { label, status, variant, size, announced, theme, uppercase } = this;
|
36
|
-
return (h(Host, { key: '
|
36
|
+
return (h(Host, { key: '0ff5d3de133c300d744be1d57a42e5a393735572', class: { [`ic-theme-${theme}`]: theme !== "inherit" }, role: announced ? "status" : null, "aria-label": "Status" }, h("strong", { key: '09e1eeedac25e8128fe42a6fb5435dc06dc7d331', class: {
|
37
37
|
["tag"]: true,
|
38
38
|
[`${variant}-${status}`]: true,
|
39
39
|
["outlined"]: variant === "outlined",
|
40
40
|
[`${size}`]: true,
|
41
|
-
} }, h("ic-typography", { key: '
|
41
|
+
} }, h("ic-typography", { key: '8543c7387e3337ec720eecaf3dbebbc09edfcb6d', variant: uppercase ? "label-uppercase" : "label", "apply-vertical-margins": false }, h("span", { key: '3673500383906cd09f4f409abff0c2aa12a0c30f' }, label)))));
|
42
42
|
}
|
43
43
|
static get is() { return "ic-status-tag"; }
|
44
44
|
static get encapsulation() { return "shadow"; }
|
@@ -57,29 +57,29 @@ export class Step {
|
|
57
57
|
// STATUS ICON FOR COMPACT STEP
|
58
58
|
let statusIcon;
|
59
59
|
if (this.type === "completed" || this.compactStepStyling === "completed") {
|
60
|
-
statusIcon = (h("span", { key: '
|
60
|
+
statusIcon = (h("span", { key: '8831990f0422a89e28d83c33bf98e6f5e47d09a6', class: "check-icon step-icon", "aria-hidden": "true", innerHTML: checkIcon }));
|
61
61
|
}
|
62
62
|
else if (this.type === "disabled" ||
|
63
63
|
this.compactStepStyling === "disabled") {
|
64
|
-
statusIcon = (h("span", { key: '
|
64
|
+
statusIcon = (h("span", { key: 'aedd81eacbe9ca6a4e331142d09053926b00dcd4', class: "warning-icon step-icon", "aria-hidden": "true", innerHTML: warningIcon }));
|
65
65
|
}
|
66
66
|
// COMPACT STEP COMPONENT
|
67
|
-
const compactStep = (h("div", { key: '
|
67
|
+
const compactStep = (h("div", { key: '384c84c08600c48982959a9a19a54e638bdd76a9', class: {
|
68
68
|
["step"]: true,
|
69
69
|
["current"]: !!this.current,
|
70
70
|
[`compact-step-${this.compactStepStyling}`]: !!this.compactStepStyling,
|
71
71
|
["disabled"]: this.type === "disabled" || this.compactStepStyling === "disabled",
|
72
|
-
} }, h("ic-loading-indicator", { key: '
|
72
|
+
} }, h("ic-loading-indicator", { key: 'fb3373a16a3519a77689395882b77b07f84d00b2', class: {
|
73
73
|
"compact-step-progress-indicator": true,
|
74
74
|
"not-required": this.type === "disabled" ||
|
75
75
|
this.compactStepStyling === "disabled",
|
76
|
-
}, "aria-hidden": "true", size: "small", "inner-label": this.stepNum, progress: this.progress }), h("div", { key: '
|
76
|
+
}, "aria-hidden": "true", size: "small", "inner-label": this.stepNum, progress: this.progress }), h("div", { key: 'e404a8d7fd56af5a6c3b38e7dd146ccbf6c0a921', class: "heading-area" }, h("ic-typography", { key: 'e2d2d3a3b2e2d1080a500f06c11fd2b19305e733', variant: "h4", class: "heading" }, this.heading), h("div", { key: 'a04253bd63d0e9cbc2ebd2ccc6c6cf1d684611b4', class: "info-line" }, h("ic-typography", { key: '35699c8fd101642bcedacbb0e636f5f5e72d87d0', variant: "caption", class: "step-num" }, `${this.stepNum} of ${this.lastStepNum}`, h("span", { key: '0bc9e891b17f66419150733982711999983197a1', class: "visually-hidden" }, " steps")), (this.subheading ||
|
77
77
|
this.type === "completed" ||
|
78
78
|
this.type === "disabled" ||
|
79
79
|
(this.variant === "compact" &&
|
80
80
|
!!this.compactStepStyling &&
|
81
81
|
this.compactStepStyling !== "active") ||
|
82
|
-
!!this.status) && (h("div", { key: '
|
82
|
+
!!this.status) && (h("div", { key: 'ce2356ecbc86e3805ddf84d7fa785f2a1495ef60', class: "step-status" }, statusIcon !== undefined && statusIcon, (this.subheading || stepType) && (h("ic-typography", { key: 'f9ada98e6d45ff5dcd8784dbb24c4402b7bd378e', variant: "caption" }, this.subheading !== null && isPropDefined(this.subheading)
|
83
83
|
? this.subheading
|
84
84
|
: this.type === "disabled" ||
|
85
85
|
(this.variant === "compact" &&
|
@@ -92,26 +92,26 @@ export class Step {
|
|
92
92
|
// ICON FOR DEFAULT STEP
|
93
93
|
let icon;
|
94
94
|
if (this.type !== "completed") {
|
95
|
-
icon = (h("ic-typography", { key: '
|
95
|
+
icon = (h("ic-typography", { key: '5b3734765f9d5e5db8f0b2818ffd471817a96cc5', variant: "subtitle-small" }, h("span", { key: 'd4d3ffd87c95a0b98fce8a437a6afb3f4639993f', class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
|
96
96
|
}
|
97
97
|
else {
|
98
|
-
icon = (h("div", { key: '
|
98
|
+
icon = (h("div", { key: '42447f9ec070e7e284aecfd49983259650d9abd3', class: "step-icon-inner", "aria-hidden": "true" }, h("span", { key: '4c7469fba1cf544d1d48c209c25db0bcaca14309', class: "check-icon", innerHTML: checkIcon })));
|
99
99
|
}
|
100
100
|
// STEP CONNECT FOR DEFAULT STEP
|
101
|
-
const partialBar = this.type === "current" && (h("div", { key: '
|
102
|
-
const finalStep = !this.lastStep && (h("div", { key: '
|
101
|
+
const partialBar = this.type === "current" && (h("div", { key: '800764f8ca21ac1118c77ed860a163b3103fe62e', class: "step-connect-inner" }));
|
102
|
+
const finalStep = !this.lastStep && (h("div", { key: 'e5c0f38f7140800d60e5046d77d6cde34c5e7bd5', class: {
|
103
103
|
["step-connect"]: true,
|
104
104
|
["aligned-full-width"]: !!(((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.classList.contains("ic-stepper-default")) &&
|
105
105
|
!this.el.parentElement.classList.contains("ic-stepper-aligned-left")),
|
106
106
|
} }, partialBar));
|
107
107
|
// DEFAULT STEP COMPONENT
|
108
|
-
const defaultStep = (h("div", { key: '
|
108
|
+
const defaultStep = (h("div", { key: 'cdfd23786b75a88fe1630318d8a1369a89090544', class: {
|
109
109
|
["step"]: true,
|
110
110
|
[`${this.type}`]: true,
|
111
|
-
} }, h("div", { key: '
|
111
|
+
} }, h("div", { key: 'c83625070a1ffe89fc53f66d55f06c994f868570', class: "step-top" }, h("div", { key: 'a6758050efffeb98522092fefa9b1261b3d9217b', class: "step-icon" }, icon), finalStep), (this.heading || this.subheading || this.status) && (h("div", { key: '3ecf8d32da66fe336b7c0540c47726d060e8eaf8', class: "heading-area" }, this.heading && (h("ic-typography", { key: '79557ec3d9a26be0fee2253a58c2f09132322017', variant: "subtitle-large", class: "heading" }, this.heading)), this.heading && (this.subheading || this.status) && (h("ic-typography", { key: 'f5a90f68ebc0721fec936541824ab79b415f566d', variant: "caption", class: "subheading" }, this.subheading !== null && isPropDefined(this.subheading)
|
112
112
|
? this.subheading
|
113
113
|
: stepStatus))))));
|
114
|
-
return (h(Host, { key: '
|
114
|
+
return (h(Host, { key: '0cb6b6649c9af4565e5f663131b800a79b9b040d', role: "listitem", "aria-label": `Step ${this.stepNum}${ariaLabel}`, "aria-current": (this.current || this.type === "current") && "step", class: {
|
115
115
|
["aligned-full-width"]: !!(((_b = this.el.parentElement) === null || _b === void 0 ? void 0 : _b.classList.contains("ic-stepper-default")) &&
|
116
116
|
!this.el.parentElement.classList.contains("ic-stepper-aligned-left")),
|
117
117
|
[`ic-step-${this.variant}`]: true,
|
@@ -241,11 +241,11 @@ export class Stepper {
|
|
241
241
|
checkResizeObserver(this.runResizeObserver);
|
242
242
|
}
|
243
243
|
render() {
|
244
|
-
return (h(Host, { key: '
|
244
|
+
return (h(Host, { key: 'a4b87028ee91e542fd7d2b66689e8fabe33a9358', class: {
|
245
245
|
[`ic-stepper-${this.variant}`]: true,
|
246
246
|
["ic-stepper-aligned-left"]: this.variant === "default" && this.aligned === "left",
|
247
247
|
[`ic-theme-${this.theme}`]: this.theme !== "inherit",
|
248
|
-
} }, h("ul", { key: '
|
248
|
+
} }, h("ul", { key: '65236609f6b2109bba5bbb88d084f9fd4e88d48a', class: "step-item-list" }, h("slot", { key: '2b542740488d922dca26cabda564db76de1ffd82' }))));
|
249
249
|
}
|
250
250
|
static get is() { return "ic-stepper"; }
|
251
251
|
static get encapsulation() { return "shadow"; }
|
@@ -91,16 +91,16 @@ export class Switch {
|
|
91
91
|
const { label, checkedState, size, disabled, name, value, hideLabel, helperText, inputId, theme, } = this;
|
92
92
|
const isSmall = size === "small";
|
93
93
|
renderHiddenInput(this.el, checkedState ? value : "", name, disabled);
|
94
|
-
return (h(Host, { key: '
|
94
|
+
return (h(Host, { key: '4d5830cca94b2dd699ad0f906dc1095f267675d4', class: {
|
95
95
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
96
|
-
} }, h("label", { key: '
|
96
|
+
} }, h("label", { key: '61c6e73d0435b8911566ac628313f6a44c67d297', class: {
|
97
97
|
"ic-switch-container": true,
|
98
98
|
"ic-switch-disabled": !!disabled,
|
99
99
|
"ic-switch-small": isSmall,
|
100
|
-
}, htmlFor: inputId }, !hideLabel && (h("ic-input-label", { key: '
|
100
|
+
}, htmlFor: inputId }, !hideLabel && (h("ic-input-label", { key: 'e8be8d74b3183a3b4a8ab53e7f38e0eda8d8b4e0', for: inputId, label: label, helperText: helperText, readonly: false, disabled: disabled, class: {
|
101
101
|
"ic-switch-label": true,
|
102
102
|
"ic-switch-label-small": isSmall,
|
103
|
-
} }, h("slot", { key: '
|
103
|
+
} }, h("slot", { key: 'c26f98190a6dac0fcbcac0e76d512de045ed728e', name: "helper-text", slot: "helper-text" }))), !hideLabel && h("span", { key: '138bab016cba136f3f5bf5f8ed04fef823dfa7c1', class: "ic-switch-line-break" }), h("input", { key: 'e1ee536f3683fbf23a874fa3b33099107df38636', checked: checkedState, disabled: disabled, "aria-label": label, "aria-checked": checkedState ? "true" : "false", "aria-describedby": getInputDescribedByText(this.el, inputId, helperText !== "", false), role: "switch", class: "ic-switch-input", type: "checkbox", name: "toggle", id: inputId, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.handleChange }), h("span", { key: '1148ac346b57bac965f562511a4d05e480bddd6c', class: "ic-switch-toggle" }, h("svg", { key: '78508c5b97bf67b0e9e3b23911bb53aaeeb7271c', class: "ic-switch-icon", "aria-hidden": "true", focusable: "false", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, h("line", { key: 'c32e2f0c7d95be778ba673085d95b03275e17d42', class: "ic-switch-icon-line", x1: "9", y1: isSmall ? "2" : "1", x2: "9", y2: isSmall ? "8" : "9" })), h("svg", { key: 'ba5c613c591a7d1b7d9c11682b3db371449bf9e6', class: "ic-switch-icon", "aria-hidden": "true", focusable: "false", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: 'c15318f31f8b84ac4d38488ab90808ba8fd6886c', class: "ic-switch-icon-circle", fill: "none", cx: "5", cy: "5", r: isSmall ? "3.335" : "4.445" }))), h("slot", { key: '9ea7ffdc5e061674be43b1f5a06e262acc7ebd3a', name: "right-adornment" }))));
|
104
104
|
}
|
105
105
|
static get is() { return "ic-switch"; }
|
106
106
|
static get encapsulation() { return "shadow"; }
|
@@ -220,7 +220,7 @@ export class TabContext {
|
|
220
220
|
}
|
221
221
|
}
|
222
222
|
render() {
|
223
|
-
return h("slot", { key: '
|
223
|
+
return h("slot", { key: 'a0fd989c3705d70d9bc2d1746dcce7f3df79c0d0' });
|
224
224
|
}
|
225
225
|
static get is() { return "ic-tab-context"; }
|
226
226
|
static get properties() {
|
@@ -16,11 +16,11 @@ export class TabGroup {
|
|
16
16
|
}
|
17
17
|
render() {
|
18
18
|
const { inline, theme, label, monochrome } = this;
|
19
|
-
return (h(Host, { key: '
|
19
|
+
return (h(Host, { key: '907693650fa274e54826ca116016e8bea75aa29c', role: "tablist", "aria-label": label, class: {
|
20
20
|
["ic-tab-group-inline"]: !!inline,
|
21
21
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
22
22
|
["ic-tab-group-monochrome"]: !!monochrome,
|
23
|
-
} }, h("ic-horizontal-scroll", { key: '
|
23
|
+
} }, h("ic-horizontal-scroll", { key: '94a5fd18b222a07d6119c6bc291522b12aaf91f3', theme: theme, "focus-trigger": "tabFocus", monochrome: monochrome }, h("div", { key: 'a81bf05bd2e9d2d079a9b05899da06c6a27cb231', class: "tabs-container" }, h("slot", { key: '434bc2798a1f471d7365a9854254f82bafa3c2d5' })))));
|
24
24
|
}
|
25
25
|
static get is() { return "ic-tab-group"; }
|
26
26
|
static get encapsulation() { return "shadow"; }
|
@@ -17,10 +17,10 @@ export class TabPanel {
|
|
17
17
|
}
|
18
18
|
render() {
|
19
19
|
const { active, theme } = this;
|
20
|
-
return (h(Host, { key: '
|
20
|
+
return (h(Host, { key: '51756c01996190f5a90e7018a2146f6e27e6185a', class: {
|
21
21
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
22
22
|
"ic-tab-panel-hidden": !active,
|
23
|
-
}, role: "tabpanel", "aria-hidden": `${!active}` }, h("div", { key: '
|
23
|
+
}, role: "tabpanel", "aria-hidden": `${!active}` }, h("div", { key: 'fbe0b579017645beeb19d419f1ccf2fcde4c51e1' }, h("slot", { key: '482a66418dc7c89364da609e03f544f5b71d9849' }))));
|
24
24
|
}
|
25
25
|
static get is() { return "ic-tab-panel"; }
|
26
26
|
static get encapsulation() { return "shadow"; }
|
@@ -65,7 +65,7 @@ export class Theme {
|
|
65
65
|
}
|
66
66
|
render() {
|
67
67
|
const { themeClass } = this;
|
68
|
-
return (h(Host, { key: '
|
68
|
+
return (h(Host, { key: 'ee89cdd36cb4cb7e0589dfea2dd5a60b5de40041', class: themeClass }, h("slot", { key: 'e7803bf5fc0974bfcf9a2a52cb5870254453a1bd' })));
|
69
69
|
}
|
70
70
|
static get is() { return "ic-theme"; }
|
71
71
|
static get properties() {
|
@@ -518,6 +518,10 @@ video {
|
|
518
518
|
background-color: var(--ic-toast-status-success);
|
519
519
|
}
|
520
520
|
|
521
|
+
.divider-ai {
|
522
|
+
background-color: var(--ic-toast-status-ai);
|
523
|
+
}
|
524
|
+
|
521
525
|
.toast-icon,
|
522
526
|
::slotted(svg) {
|
523
527
|
height: var(--ic-space-lg);
|
@@ -546,6 +550,10 @@ video {
|
|
546
550
|
fill: var(--ic-toast-icon-success);
|
547
551
|
}
|
548
552
|
|
553
|
+
:host([variant="ai"]) .toast-icon svg {
|
554
|
+
fill: var(--ic-toast-icon-ai);
|
555
|
+
}
|
556
|
+
|
549
557
|
.toast-content {
|
550
558
|
margin-left: var(--ic-space-xs);
|
551
559
|
width: 100%;
|
@@ -202,13 +202,13 @@ export class Toast {
|
|
202
202
|
}
|
203
203
|
render() {
|
204
204
|
const { variant, heading, message, visible, isManual, dismissButtonAriaLabel, } = this;
|
205
|
-
return (h(Host, { key: '
|
205
|
+
return (h(Host, { key: 'ced9ccd739749f996c2c9a116bffa32cf19dbec1', class: { ["ic-toast-hidden"]: !visible }, tabindex: "0", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? "dialog" : "alert", "aria-live": isManual ? null : "polite" }, h("div", { key: 'cb61a3180810c26fa2b2e093f9bef2887a876d0e', class: "container" }, variant && visible && (h("div", { key: 'b4fa17e0010310b293431201e9149b182ba3bd23', class: "toast-icon-container" }, h("div", { key: '70d2193d9b7ebad46c05bb50839c1d2f512d004e', class: {
|
206
206
|
["divider"]: true,
|
207
207
|
[`divider-${variant}`]: true,
|
208
|
-
} }), variant === "neutral" ? (h("slot", { name: "neutral-icon" })) : (h("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), h("div", { key: '
|
208
|
+
} }), variant === "neutral" ? (h("slot", { name: "neutral-icon" })) : (h("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), h("div", { key: '6a78e344040bd9e5d5a20dd5922e97091a89f0bc', class: {
|
209
209
|
["toast-content"]: true,
|
210
210
|
["no-icon"]: variant === "neutral" && !isSlotUsed(this.el, "neutral-icon"),
|
211
|
-
} }, h("div", { key: '
|
211
|
+
} }, h("div", { key: '6f9807f536c6f37b6868bc651fd0cc90bff3817f', class: "toast-text" }, h("ic-typography", { key: 'e86371c512f1413ec2482b0e8c88baa0357c346b', variant: "subtitle-large", class: "toast-heading" }, visible && (isManual ? h("h5", null, heading) : h("p", null, heading))), message && (h("ic-typography", { key: '593526ebb19c0fe0f9761b316ba75557f17dc545', variant: "body", class: "toast-message" }, visible && h("p", { key: '15b6099aeaca00f3124d80fad1ce94d396343d17' }, message)))), isSlotUsed(this.el, "action") && (h("div", { key: 'bda528607c243a094a3c61f509e12902133245e9', class: "toast-action-container" }, h("slot", { key: '35c924efff99f3882daaec3f3589057a67eb9d46', 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", "aria-label": dismissButtonAriaLabel })))));
|
212
212
|
}
|
213
213
|
static get is() { return "ic-toast"; }
|
214
214
|
static get encapsulation() { return "shadow"; }
|
@@ -352,7 +352,7 @@ export class Toast {
|
|
352
352
|
"mutable": true,
|
353
353
|
"complexType": {
|
354
354
|
"original": "IcStatusVariants",
|
355
|
-
"resolved": "\"error\" | \"info\" | \"neutral\" | \"success\" | \"warning\" | undefined",
|
355
|
+
"resolved": "\"ai\" | \"error\" | \"info\" | \"neutral\" | \"success\" | \"warning\" | undefined",
|
356
356
|
"references": {
|
357
357
|
"IcStatusVariants": {
|
358
358
|
"location": "import",
|
@@ -368,10 +368,10 @@ export const Playground = {
|
|
368
368
|
},
|
369
369
|
|
370
370
|
variant: {
|
371
|
-
options: ["neutral", "info", "warning", "error", "success", ""],
|
371
|
+
options: ["neutral", "info", "warning", "error", "success", "ai", ""],
|
372
372
|
|
373
373
|
control: {
|
374
|
-
type: "
|
374
|
+
type: "inline-radio",
|
375
375
|
},
|
376
376
|
},
|
377
377
|
|
@@ -40,7 +40,7 @@ export class ToastRegion {
|
|
40
40
|
}
|
41
41
|
}
|
42
42
|
render() {
|
43
|
-
return h("slot", { key: '
|
43
|
+
return h("slot", { key: '5f8c46d718f868942c5b46b431b2cee136e215b4' });
|
44
44
|
}
|
45
45
|
static get is() { return "ic-toast-region"; }
|
46
46
|
static get properties() {
|
@@ -137,7 +137,7 @@ export class ToggleButton {
|
|
137
137
|
render() {
|
138
138
|
const { accessibleLabel, checked, disabled, fullWidth, iconPlacement, monochrome, label, loading, outline, size, theme, tooltipPlacement, variant, } = this;
|
139
139
|
const iconVariant = variant === "icon";
|
140
|
-
return (h(Host, { key: '
|
140
|
+
return (h(Host, { key: '5560cb91c78fd8167fb76bb1cab0bcb20723828c', class: {
|
141
141
|
"ic-toggle-button-checked": checked,
|
142
142
|
"ic-toggle-button-disabled": disabled,
|
143
143
|
"ic-toggle-button-icon": iconVariant,
|
@@ -147,7 +147,7 @@ export class ToggleButton {
|
|
147
147
|
"ic-toggle-button-hide-outline": !outline,
|
148
148
|
[`ic-toggle-button-${size}`]: true,
|
149
149
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
150
|
-
}, onFocus: this.handleFocus }, h("ic-button", { key: '
|
150
|
+
}, onFocus: this.handleFocus }, h("ic-button", { key: 'e56f66ed52343d9c34df12a306028a799fab6f7a', "aria-pressed": `${checked}`, variant: iconVariant ? "icon" : "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: '57f73405674f826c39962f85ab030685bf18f11d' }), isSlotUsed(this.el, "icon") && (h("slot", { key: '1b26441ed5bd3a0a18bdaa7d8432fd5d5434cfb4', name: "icon", slot: `${iconPlacement}-icon` })), isSlotUsed(this.el, "badge") && (h("slot", { key: 'bf12638f891f2ba6c01df01d03ee860f7f15e0b1', name: "badge", slot: "badge" })))));
|
151
151
|
}
|
152
152
|
static get is() { return "ic-toggle-button"; }
|
153
153
|
static get encapsulation() { return "shadow"; }
|
@@ -226,14 +226,14 @@ export class ToggleButtonGroup {
|
|
226
226
|
}
|
227
227
|
render() {
|
228
228
|
const { accessibleLabel, disabled, fullWidth, loading, monochrome, outline, theme, } = this;
|
229
|
-
return (h(Host, { key: '
|
229
|
+
return (h(Host, { key: '58a777e47ee684831b54f2aa7139f091e7a11b29', role: "group", "aria-label": accessibleLabel, tabindex: 0, class: {
|
230
230
|
"ic-toggle-button-group-disabled": disabled,
|
231
231
|
"ic-toggle-button-group-full-width": fullWidth,
|
232
232
|
"ic-toggle-button-group-loading": loading,
|
233
233
|
"ic-toggle-button-group-monochrome": monochrome,
|
234
234
|
"ic-toggle-button-group-hide-outline": !outline,
|
235
235
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
236
|
-
}, onFocus: this.handleHostFocus }, h("slot", { key: '
|
236
|
+
}, onFocus: this.handleHostFocus }, h("slot", { key: 'c748f41a8d8e69c908a8fb1ca4255dfd2ae5d521' })));
|
237
237
|
}
|
238
238
|
static get is() { return "ic-toggle-button-group"; }
|
239
239
|
static get encapsulation() { return "shadow"; }
|
@@ -20,6 +20,10 @@ export class Tooltip {
|
|
20
20
|
* If `true`, the tooltip will not be displayed on hover, it will require a click.
|
21
21
|
*/
|
22
22
|
this.disableHover = false;
|
23
|
+
/**
|
24
|
+
* Setting to `true` can help in situations where tooltip content is clipped by a parent element.
|
25
|
+
*/
|
26
|
+
this.fixedPositioning = false;
|
23
27
|
/**
|
24
28
|
* The position of the tooltip in relation to the parent element.
|
25
29
|
*/
|
@@ -39,7 +43,7 @@ export class Tooltip {
|
|
39
43
|
if (this.dialogContentArea) {
|
40
44
|
this.el.classList.add("ic-tooltip-on-dialog");
|
41
45
|
}
|
42
|
-
this.popperInstance = createPopper(this.el, this.toolTip, Object.assign({ placement: this.placement, modifiers: [
|
46
|
+
this.popperInstance = createPopper(this.el, this.toolTip, Object.assign({ strategy: this.fixedPositioning ? "fixed" : "absolute", placement: this.placement, modifiers: [
|
43
47
|
{
|
44
48
|
name: "offset",
|
45
49
|
options: {
|
@@ -207,10 +211,10 @@ export class Tooltip {
|
|
207
211
|
}
|
208
212
|
render() {
|
209
213
|
const { label, maxLines, silent, theme } = this;
|
210
|
-
return (h(Host, { key: '
|
214
|
+
return (h(Host, { key: '87f3bd48a10c5b2a9238773960171629d6661602', class: {
|
211
215
|
"ic-tooltip": true,
|
212
216
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
213
|
-
} }, h("div", { key: '
|
217
|
+
} }, h("div", { key: 'f6469c289d080dcf9159e80f7e0a2a6092aac5f0', ref: (el) => (this.toolTip = el), role: "tooltip", class: "ic-tooltip-container", "aria-hidden": `${silent}` }, h("ic-typography", { key: 'ca39cfc710166a4ade00f2d430632af8211f1991', maxLines: maxLines, variant: "caption" }, label), h("div", { key: 'c7c068079a39a3ad1b09af475519e3ad3590d28c', ref: (el) => (this.arrow = el), class: "ic-tooltip-arrow" })), h("slot", { key: 'ca0c7f33a5809e1571e91bc9bf5033dbf5ddb31f' })));
|
214
218
|
}
|
215
219
|
static get is() { return "ic-tooltip"; }
|
216
220
|
static get encapsulation() { return "shadow"; }
|
@@ -266,6 +270,26 @@ export class Tooltip {
|
|
266
270
|
"reflect": false,
|
267
271
|
"defaultValue": "false"
|
268
272
|
},
|
273
|
+
"fixedPositioning": {
|
274
|
+
"type": "boolean",
|
275
|
+
"mutable": false,
|
276
|
+
"complexType": {
|
277
|
+
"original": "boolean",
|
278
|
+
"resolved": "boolean",
|
279
|
+
"references": {}
|
280
|
+
},
|
281
|
+
"required": false,
|
282
|
+
"optional": false,
|
283
|
+
"docs": {
|
284
|
+
"tags": [],
|
285
|
+
"text": "Setting to `true` can help in situations where tooltip content is clipped by a parent element."
|
286
|
+
},
|
287
|
+
"getter": false,
|
288
|
+
"setter": false,
|
289
|
+
"attribute": "fixed-positioning",
|
290
|
+
"reflect": false,
|
291
|
+
"defaultValue": "false"
|
292
|
+
},
|
269
293
|
"maxLines": {
|
270
294
|
"type": "number",
|
271
295
|
"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,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,MAAM,EACN,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\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 { onComponentRequiredPropUndefined } 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 dialogContentArea: 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 * 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 * @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 let dialog: HTMLIcDialogElement | null;\n if ((this.el.getRootNode() as ShadowRoot).host) {\n dialog = (this.el.getRootNode() as ShadowRoot).host.closest(\"ic-dialog\");\n } else {\n dialog = this.el.closest(\"ic-dialog\");\n }\n this.dialogContentArea =\n dialog?.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.dialogContentArea) {\n this.el.classList.add(\"ic-tooltip-on-dialog\");\n }\n\n this.popperInstance = createPopper(this.el, this.toolTip, {\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.dialogContentArea\n ? [\n {\n name: \"preventOverflow\",\n options: {\n boundary: this.dialogContentArea,\n padding: 8,\n },\n },\n {\n name: \"flip\",\n options: {\n boundary: this.dialogContentArea,\n },\n },\n ]\n : []),\n ],\n ...this.popperProps,\n });\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\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 >\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,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,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAQvE,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,mBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\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 { onComponentRequiredPropUndefined } 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 dialogContentArea: 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 * @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 let dialog: HTMLIcDialogElement | null;\n if ((this.el.getRootNode() as ShadowRoot).host) {\n dialog = (this.el.getRootNode() as ShadowRoot).host.closest(\"ic-dialog\");\n } else {\n dialog = this.el.closest(\"ic-dialog\");\n }\n this.dialogContentArea =\n dialog?.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.dialogContentArea) {\n this.el.classList.add(\"ic-tooltip-on-dialog\");\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.dialogContentArea\n ? [\n {\n name: \"preventOverflow\",\n options: {\n boundary: this.dialogContentArea,\n padding: 8,\n },\n },\n {\n name: \"flip\",\n options: {\n boundary: this.dialogContentArea,\n },\n },\n ]\n : []),\n ],\n ...this.popperProps,\n });\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\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 >\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"]}
|
@@ -6,6 +6,7 @@ const defaultArgs = {
|
|
6
6
|
placement: "bottom",
|
7
7
|
label: "This is a description of the button",
|
8
8
|
theme: "inherit",
|
9
|
+
fixedPositioning: false,
|
9
10
|
};
|
10
11
|
|
11
12
|
export default {
|
@@ -341,6 +342,42 @@ export const ChangingLabel = {
|
|
341
342
|
name: "Changing label",
|
342
343
|
};
|
343
344
|
|
345
|
+
export const PositioningStrategy = {
|
346
|
+
render: (args) =>
|
347
|
+
html` <script>
|
348
|
+
var switchEl = document.querySelector("ic-switch");
|
349
|
+
var tooltipEl = document.querySelector("ic-tooltip");
|
350
|
+
switchEl.addEventListener("icChange", (ev) => {
|
351
|
+
tooltipEl.fixedPositioning = ev.detail.checked;
|
352
|
+
});
|
353
|
+
</script>
|
354
|
+
<div style="display:flex; flex-direction:column; gap:var(--ic-space-xs)">
|
355
|
+
<ic-typography>
|
356
|
+
Toggle the fixed positioning switch and hover over the button to see
|
357
|
+
it take effect
|
358
|
+
</ic-typography>
|
359
|
+
<div
|
360
|
+
style="display:flex; flex-direction:column; gap:var(--ic-space-xs); padding:var(--ic-space-md); border:1px solid var(--ic-color-text-primary); overflow:hidden; width:100px; position:relative"
|
361
|
+
>
|
362
|
+
<ic-tooltip
|
363
|
+
label="This is a tooltip with a long label"
|
364
|
+
id="ic-tooltip-test-button-1"
|
365
|
+
target="button-1"
|
366
|
+
>
|
367
|
+
<ic-button
|
368
|
+
aria-describedby="ic-tooltip-test-button-1"
|
369
|
+
id="button-1"
|
370
|
+
>
|
371
|
+
Button
|
372
|
+
</ic-button>
|
373
|
+
</ic-tooltip>
|
374
|
+
</div>
|
375
|
+
<ic-switch label="Fixed tooltip positioning"></ic-switch>
|
376
|
+
</div>`,
|
377
|
+
|
378
|
+
name: "Positioning strategy",
|
379
|
+
};
|
380
|
+
|
344
381
|
export const Playground = {
|
345
382
|
render: (args) =>
|
346
383
|
html`<div style="margin: 250px">
|
@@ -352,6 +389,7 @@ export const Playground = {
|
|
352
389
|
id="ic-tooltip-test-button-default"
|
353
390
|
target="button-id"
|
354
391
|
theme=${args.theme}
|
392
|
+
fixed-positioning=${args.fixedPositioning}
|
355
393
|
>
|
356
394
|
<button
|
357
395
|
id="button-id"
|
@@ -3,6 +3,7 @@ import infoIcon from "../assets/info-icon.svg";
|
|
3
3
|
import neutralIcon from "../assets/neutral-icon.svg";
|
4
4
|
import successIcon from "../assets/success-icon.svg";
|
5
5
|
import warningIcon from "../assets/warning-icon.svg";
|
6
|
+
import aiIcon from "../assets/ai-icon.svg";
|
6
7
|
// Global status icons
|
7
8
|
export const VARIANT_ICONS = {
|
8
9
|
neutral: {
|
@@ -25,6 +26,10 @@ export const VARIANT_ICONS = {
|
|
25
26
|
icon: successIcon,
|
26
27
|
ariaLabel: "Success",
|
27
28
|
},
|
29
|
+
ai: {
|
30
|
+
icon: aiIcon,
|
31
|
+
ariaLabel: "AI",
|
32
|
+
},
|
28
33
|
};
|
29
34
|
// Global ARIA attributes
|
30
35
|
export const IC_INHERITED_ARIA = [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,sBAAsB;AACtB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,sBAAsB;KAClC;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,OAAO;KACnB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;KACrB;IACD,EAAE,EAAE;QACF,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,IAAI;KAChB;CACF,CAAC;AAE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AAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,MAAM;IACN,QAAQ;IACR,MAAM;IACN,SAAS;IACT,UAAU;IACV,QAAQ;IACR,OAAO;IACP,KAAK;CACN,CAAC","sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\nimport aiIcon from \"../assets/ai-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n ai: {\n icon: aiIcon,\n ariaLabel: \"AI\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n].join(\",\");\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\", \"ic-button\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n\n// Keyboard characters that do not affect the content of an input control when pressed\nexport const IGNORED_KEYBOARD_CHARACTERS = [\n \"Alt\",\n \"AltGraph\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"AudioVolumeDown\",\n \"AudioVolumeMute\",\n \"AudioVolumeUp\",\n \"CapsLock\",\n \"ContextMenu\",\n \"Control\",\n \"Delete\",\n \"End\",\n \"Enter\",\n \"Escape\",\n \"F1\",\n \"F10\",\n \"F11\",\n \"F12\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"Home\",\n \"Insert\",\n \"Meta\",\n \"NumLock\",\n \"PageDown\",\n \"PageUp\",\n \"Shift\",\n \"Tab\",\n];\n"]}
|
@@ -167,19 +167,27 @@ export const isMobileOrTablet = () => "maxTouchPoints" in navigator && "userAgen
|
|
167
167
|
/iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
168
168
|
: false;
|
169
169
|
/**
|
170
|
-
* Will create a button within the lightDOM which interacts with the
|
170
|
+
* Will create a button within the lightDOM which interacts with the form.
|
171
171
|
* This is required as buttons within the shadowDOM will not invoke a submit or reset
|
172
172
|
*
|
173
|
-
* @param form -
|
173
|
+
* @param form - form element to associate button with
|
174
174
|
* @param button - shadowDOM button
|
175
175
|
*/
|
176
176
|
export const handleHiddenFormButtonClick = (form, button) => {
|
177
|
-
var _a, _b;
|
178
|
-
const
|
177
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
178
|
+
const hiddenFormButtonId = button.type === "submit" || button.type === "reset"
|
179
|
+
? `hidden-form-${button.type}-button`
|
180
|
+
: "hidden-form-button";
|
181
|
+
const hiddenFormButton = (_a = document.querySelector(`#${hiddenFormButtonId}`)) !== null && _a !== void 0 ? _a : document.createElement("button");
|
179
182
|
hiddenFormButton.setAttribute("type", (_b = button.type) !== null && _b !== void 0 ? _b : "button");
|
180
|
-
hiddenFormButton.id =
|
183
|
+
hiddenFormButton.id = hiddenFormButtonId;
|
181
184
|
hiddenFormButton.style.display = "none";
|
182
|
-
|
185
|
+
hiddenFormButton.formAction = (_c = button.formaction) !== null && _c !== void 0 ? _c : "";
|
186
|
+
hiddenFormButton.formEnctype = (_d = button.formenctype) !== null && _d !== void 0 ? _d : "";
|
187
|
+
hiddenFormButton.formMethod = (_e = button.formmethod) !== null && _e !== void 0 ? _e : "";
|
188
|
+
hiddenFormButton.formNoValidate = (_f = button.formnovalidate) !== null && _f !== void 0 ? _f : false;
|
189
|
+
hiddenFormButton.formTarget = (_g = button.formtarget) !== null && _g !== void 0 ? _g : "";
|
190
|
+
form === null || form === void 0 ? void 0 : form.appendChild(hiddenFormButton);
|
183
191
|
hiddenFormButton.click();
|
184
192
|
};
|
185
193
|
export const isEmptyString = (value) => !value || value.trim().length === 0;
|