@ukic/web-components 3.19.0 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{constants-3a9ba64a.js → constants-4d389abc.js} +14 -1
- package/dist/cjs/constants-4d389abc.js.map +1 -0
- package/dist/cjs/{helpers-15fae358.js → helpers-3a796e7a.js} +161 -2
- package/dist/cjs/helpers-3a796e7a.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +8 -5
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ic-action-chip.cjs.entry.js +5 -5
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-back-to-top.cjs.entry.js +5 -5
- package/dist/cjs/ic-badge.cjs.entry.js +4 -4
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +4 -4
- package/dist/cjs/ic-button_3.cjs.entry.js +23 -22
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +6 -6
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/ic-chip.cjs.entry.js +5 -5
- package/dist/cjs/ic-classification-banner.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js +4 -4
- package/dist/cjs/ic-dialog.cjs.entry.js +34 -125
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +2 -2
- package/dist/cjs/ic-empty-state.cjs.entry.js +4 -4
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js +4 -4
- package/dist/cjs/ic-footer.cjs.entry.js +5 -5
- package/dist/cjs/ic-hero.cjs.entry.js +6 -6
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +7 -7
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +10 -10
- package/dist/cjs/ic-input-label_2.cjs.entry.js +7 -7
- 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 +3 -3
- package/dist/cjs/ic-menu-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-button.cjs.entry.js +4 -4
- package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-navigation-item.cjs.entry.js +4 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +6 -6
- package/dist/cjs/ic-page-header.cjs.entry.js +8 -8
- package/dist/cjs/ic-pagination-item.cjs.entry.js +3 -3
- package/dist/cjs/ic-pagination.cjs.entry.js +6 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -6
- package/dist/cjs/ic-radio-group.cjs.entry.js +6 -6
- package/dist/cjs/ic-radio-option.cjs.entry.js +6 -6
- package/dist/cjs/ic-search-bar.cjs.entry.js +11 -11
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-select.cjs.entry.js +8 -8
- package/dist/cjs/ic-side-navigation.cjs.entry.js +6 -6
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js +4 -4
- package/dist/cjs/ic-step.cjs.entry.js +15 -15
- package/dist/cjs/ic-stepper.cjs.entry.js +4 -4
- package/dist/cjs/ic-switch.cjs.entry.js +6 -6
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab.cjs.entry.js +4 -4
- package/dist/cjs/ic-text-field.cjs.entry.js +7 -7
- package/dist/cjs/ic-theme.cjs.entry.js +3 -3
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +7 -7
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/ic-top-navigation.cjs.entry.js +7 -7
- package/dist/cjs/ic-typography.cjs.entry.js +4 -4
- package/dist/cjs/index.cjs.js +7 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.stories.js +21 -0
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +11 -0
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +6 -2
- package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
- package/dist/collection/components/ic-action-chip/ic-action-chip.js +3 -3
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +3 -3
- package/dist/collection/components/ic-badge/ic-badge.js +2 -2
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +2 -2
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +2 -2
- package/dist/collection/components/ic-button/ic-button.js +2 -2
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +4 -4
- 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-chip/ic-chip.js +3 -3
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.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 +33 -124
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.stories.js +3 -2
- package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
- package/dist/collection/components/ic-footer/ic-footer.js +3 -3
- 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-button/ic-navigation-button.js +2 -2
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +2 -2
- 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 +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 +9 -9
- 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/ic-tab.js +2 -2
- 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 +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +13 -12
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +5 -5
- package/dist/collection/components/ic-typography/ic-typography.js +2 -2
- package/dist/collection/utils/constants.js +7 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/helpers.js +169 -2
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/constants.js +8 -1
- package/dist/components/constants.js.map +1 -1
- package/dist/components/helpers.js +157 -2
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-accordion-group.js +6 -3
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-action-chip.js +3 -3
- package/dist/components/ic-back-to-top.js +3 -3
- package/dist/components/ic-badge.js +2 -2
- package/dist/components/ic-breadcrumb-group.js +2 -2
- package/dist/components/ic-breadcrumb2.js +2 -2
- package/dist/components/ic-button2.js +2 -2
- package/dist/components/ic-card-vertical.js +4 -4
- package/dist/components/ic-checkbox-group.js +2 -2
- package/dist/components/ic-checkbox.js +4 -4
- package/dist/components/ic-chip.js +3 -3
- package/dist/components/ic-classification-banner.js +2 -2
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-dialog.js +33 -124
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state.js +2 -2
- package/dist/components/ic-footer-link.js +2 -2
- package/dist/components/ic-footer.js +4 -4
- package/dist/components/ic-hero.js +4 -4
- package/dist/components/ic-horizontal-scroll2.js +6 -6
- package/dist/components/ic-input-component-container2.js +3 -3
- 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 +4 -4
- 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 +4 -4
- package/dist/components/ic-navigation-button.js +3 -3
- package/dist/components/ic-navigation-group.js +2 -2
- package/dist/components/ic-navigation-item.js +3 -3
- package/dist/components/ic-navigation-menu2.js +5 -5
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-page-header.js.map +1 -1
- 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 +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-search-bar.js +10 -10
- 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-step.js +13 -13
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-switch.js +4 -4
- 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 +2 -2
- package/dist/components/ic-text-field.js +6 -6
- package/dist/components/ic-theme.js +2 -2
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +6 -6
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +3 -3
- package/dist/components/ic-tooltip2.js +14 -13
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +6 -6
- package/dist/components/ic-typography2.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/core/core.css +4 -4
- package/dist/core/core.esm.js +1 -1
- package/dist/core/index.esm.js +1 -1
- package/dist/core/{p-7552c8a1.entry.js → p-0301d1c8.entry.js} +2 -2
- package/dist/core/{p-bb3a5130.entry.js → p-0722d7b6.entry.js} +2 -2
- package/dist/core/{p-43356493.entry.js → p-09c31ac6.entry.js} +2 -2
- package/dist/core/{p-5e1a77aa.entry.js → p-0d711c6a.entry.js} +2 -2
- package/dist/core/{p-ad6632a9.entry.js → p-0f6fd5d3.entry.js} +2 -2
- package/dist/core/{p-296a41ce.entry.js → p-0f998905.entry.js} +2 -2
- package/dist/core/{p-8798cc6b.entry.js → p-107281c4.entry.js} +2 -2
- package/dist/core/{p-b00efb15.entry.js → p-1d8559f0.entry.js} +2 -2
- package/dist/core/{p-62b9e7bf.entry.js → p-1edf2689.entry.js} +2 -2
- package/dist/core/{p-4637c326.entry.js → p-1fc4b88f.entry.js} +2 -2
- package/dist/core/{p-a8dc3162.entry.js → p-23dc27a8.entry.js} +2 -2
- package/dist/core/{p-af02add9.entry.js → p-276a6c8f.entry.js} +2 -2
- package/dist/core/{p-a5295f66.entry.js → p-3582c7df.entry.js} +2 -2
- package/dist/core/{p-44aaf454.entry.js → p-3c7e90a7.entry.js} +2 -2
- package/dist/core/p-45076d7e.entry.js +2 -0
- package/dist/core/{p-70e1dd4d.entry.js → p-45c553db.entry.js} +2 -2
- package/dist/core/p-4e43b272.entry.js +2 -0
- package/dist/core/p-4e43b272.entry.js.map +1 -0
- package/dist/core/{p-52fa3eec.entry.js → p-57ce68e5.entry.js} +2 -2
- package/dist/core/{p-c4ffcc64.entry.js → p-5ac3adb9.entry.js} +2 -2
- package/dist/core/{p-fb43abd6.entry.js → p-608b4912.entry.js} +2 -2
- package/dist/core/{p-bddf799a.js → p-6215e2ae.js} +2 -2
- package/dist/core/p-6215e2ae.js.map +1 -0
- package/dist/core/{p-9452b9ac.entry.js → p-656a9127.entry.js} +2 -2
- package/dist/core/{p-a86785dd.entry.js → p-6740c915.entry.js} +2 -2
- package/dist/core/{p-28c9a6e4.entry.js → p-6aa8d3ce.entry.js} +2 -2
- package/dist/core/{p-72ac8bb9.entry.js → p-72344764.entry.js} +2 -2
- package/dist/core/{p-6fb29846.entry.js → p-76e8df31.entry.js} +2 -2
- package/dist/core/p-7b8e5926.entry.js +2 -0
- package/dist/core/p-7b8e5926.entry.js.map +1 -0
- package/dist/core/{p-c397b33f.entry.js → p-7c38dd1f.entry.js} +2 -2
- package/dist/core/{p-355d0914.entry.js → p-81f60443.entry.js} +2 -2
- package/dist/core/{p-128e2cbb.entry.js → p-840c647f.entry.js} +2 -2
- package/dist/core/{p-3785c740.entry.js → p-86989873.entry.js} +2 -2
- package/dist/core/{p-1cc402b8.entry.js → p-880afd4b.entry.js} +2 -2
- package/dist/core/{p-287e5c17.entry.js → p-889bb8db.entry.js} +2 -2
- package/dist/core/{p-4fa7fbc4.entry.js → p-8b1567c9.entry.js} +2 -2
- package/dist/core/p-8b1567c9.entry.js.map +1 -0
- package/dist/core/{p-bfd03fb4.entry.js → p-8c00614c.entry.js} +2 -2
- package/dist/core/{p-8abcc114.entry.js → p-8f45f956.entry.js} +2 -2
- package/dist/core/{p-5cf704e3.entry.js → p-90814d32.entry.js} +2 -2
- package/dist/core/{p-6e8ef73c.entry.js → p-93e1ba0a.entry.js} +2 -2
- package/dist/core/{p-a7f21494.entry.js → p-949d08d3.entry.js} +2 -2
- package/dist/core/{p-614953c5.entry.js → p-9b60ca02.entry.js} +2 -2
- package/dist/core/{p-49444c33.entry.js → p-a0af1b0a.entry.js} +2 -2
- package/dist/core/{p-012e058a.entry.js → p-a16415e4.entry.js} +3 -3
- package/dist/core/{p-0eafbaa1.entry.js → p-ad5aca6f.entry.js} +2 -2
- package/dist/core/{p-bdda404b.entry.js → p-aed1c7e7.entry.js} +2 -2
- package/dist/core/{p-34cc376c.entry.js → p-b22fc28d.entry.js} +2 -2
- package/dist/core/{p-44fbe8c2.entry.js → p-b5e39585.entry.js} +2 -2
- package/dist/core/{p-3a94849e.entry.js → p-b8c0c142.entry.js} +2 -2
- package/dist/core/{p-f4e2e41f.entry.js → p-ba4abeac.entry.js} +2 -2
- package/dist/core/{p-6b6c1491.entry.js → p-c16e982c.entry.js} +2 -2
- package/dist/core/{p-f247db14.entry.js → p-c3f5907e.entry.js} +2 -2
- package/dist/core/{p-e0423c7e.entry.js → p-c7f8547d.entry.js} +2 -2
- package/dist/core/{p-411527a1.entry.js → p-cdbbcef4.entry.js} +2 -2
- package/dist/core/{p-21efc36e.entry.js → p-cf056074.entry.js} +2 -2
- package/dist/core/{p-539b975f.entry.js → p-d2d17d6d.entry.js} +2 -2
- package/dist/core/{p-082e0068.entry.js → p-d478d13e.entry.js} +2 -2
- package/dist/core/p-dbc8bf0c.js +2 -0
- package/dist/core/p-dbc8bf0c.js.map +1 -0
- package/dist/core/{p-77a6c3f7.entry.js → p-df029b1b.entry.js} +2 -2
- package/dist/core/{p-dfc2a0b1.entry.js → p-e176881a.entry.js} +2 -2
- package/dist/core/{p-d8200098.entry.js → p-e1814e7e.entry.js} +2 -2
- package/dist/core/{p-06b3ae40.entry.js → p-ebc47282.entry.js} +2 -2
- package/dist/core/{p-ae7dcbd5.entry.js → p-ec14c783.entry.js} +2 -2
- package/dist/core/{p-3b13d191.entry.js → p-f5fd4a76.entry.js} +2 -2
- package/dist/core/{p-911b4aa4.entry.js → p-f700b759.entry.js} +2 -2
- package/dist/core/{p-a7645717.entry.js → p-fdb587ab.entry.js} +2 -2
- package/dist/core/{p-091a7fbf.entry.js → p-fe0153ec.entry.js} +2 -2
- package/dist/esm/{constants-7960cba4.js → constants-ab12fdcf.js} +9 -2
- package/dist/esm/constants-ab12fdcf.js.map +1 -0
- package/dist/esm/{helpers-dcedb279.js → helpers-0f85537f.js} +158 -3
- package/dist/esm/helpers-0f85537f.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +8 -5
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +2 -2
- package/dist/esm/ic-action-chip.entry.js +5 -5
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-back-to-top.entry.js +5 -5
- package/dist/esm/ic-badge.entry.js +4 -4
- package/dist/esm/ic-breadcrumb-group.entry.js +4 -4
- package/dist/esm/ic-breadcrumb.entry.js +4 -4
- package/dist/esm/ic-button_3.entry.js +23 -22
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +6 -6
- package/dist/esm/ic-checkbox-group.entry.js +4 -4
- package/dist/esm/ic-checkbox.entry.js +6 -6
- package/dist/esm/ic-chip.entry.js +5 -5
- package/dist/esm/ic-classification-banner.entry.js +2 -2
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js +4 -4
- package/dist/esm/ic-dialog.entry.js +34 -125
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +2 -2
- package/dist/esm/ic-empty-state.entry.js +4 -4
- package/dist/esm/ic-footer-link-group.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js +4 -4
- package/dist/esm/ic-footer.entry.js +5 -5
- package/dist/esm/ic-hero.entry.js +6 -6
- package/dist/esm/ic-horizontal-scroll.entry.js +7 -7
- package/dist/esm/ic-input-component-container_3.entry.js +10 -10
- package/dist/esm/ic-input-label_2.entry.js +7 -7
- package/dist/esm/ic-layout-grid-item.entry.js +2 -2
- package/dist/esm/ic-layout-grid.entry.js +2 -2
- package/dist/esm/ic-link.entry.js +3 -3
- package/dist/esm/ic-menu-group.entry.js +3 -3
- package/dist/esm/ic-menu-item.entry.js +2 -2
- package/dist/esm/ic-navigation-button.entry.js +4 -4
- package/dist/esm/ic-navigation-group.entry.js +3 -3
- package/dist/esm/ic-navigation-item.entry.js +4 -4
- package/dist/esm/ic-navigation-menu.entry.js +6 -6
- package/dist/esm/ic-page-header.entry.js +8 -8
- package/dist/esm/ic-pagination-item.entry.js +3 -3
- package/dist/esm/ic-pagination.entry.js +6 -6
- package/dist/esm/ic-popover-menu.entry.js +6 -6
- package/dist/esm/ic-radio-group.entry.js +6 -6
- package/dist/esm/ic-radio-option.entry.js +6 -6
- package/dist/esm/ic-search-bar.entry.js +11 -11
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-select.entry.js +8 -8
- package/dist/esm/ic-side-navigation.entry.js +6 -6
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skip-link.entry.js +2 -2
- package/dist/esm/ic-status-tag.entry.js +4 -4
- package/dist/esm/ic-step.entry.js +15 -15
- package/dist/esm/ic-stepper.entry.js +4 -4
- package/dist/esm/ic-switch.entry.js +6 -6
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +4 -4
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab.entry.js +4 -4
- package/dist/esm/ic-text-field.entry.js +7 -7
- package/dist/esm/ic-theme.entry.js +3 -3
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +7 -7
- package/dist/esm/ic-toggle-button-group.entry.js +4 -4
- package/dist/esm/ic-toggle-button.entry.js +4 -4
- package/dist/esm/ic-top-navigation.entry.js +7 -7
- package/dist/esm/ic-typography.entry.js +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +1 -0
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +2 -15
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +1 -1
- package/dist/types/utils/constants.d.ts +6 -0
- package/dist/types/utils/helpers.d.ts +69 -2
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +396 -320
- package/hydrate/index.mjs +396 -320
- package/package.json +2 -2
- package/dist/cjs/constants-3a9ba64a.js.map +0 -1
- package/dist/cjs/helpers-15fae358.js.map +0 -1
- package/dist/core/p-0257d59e.entry.js +0 -2
- package/dist/core/p-0257d59e.entry.js.map +0 -1
- package/dist/core/p-4fa7fbc4.entry.js.map +0 -1
- package/dist/core/p-a45de09d.entry.js +0 -2
- package/dist/core/p-a45de09d.entry.js.map +0 -1
- package/dist/core/p-a5658054.js +0 -2
- package/dist/core/p-a5658054.js.map +0 -1
- package/dist/core/p-ae861bb8.entry.js +0 -2
- package/dist/core/p-bddf799a.js.map +0 -1
- package/dist/esm/constants-7960cba4.js.map +0 -1
- package/dist/esm/helpers-dcedb279.js.map +0 -1
- /package/dist/core/{p-7552c8a1.entry.js.map → p-0301d1c8.entry.js.map} +0 -0
- /package/dist/core/{p-bb3a5130.entry.js.map → p-0722d7b6.entry.js.map} +0 -0
- /package/dist/core/{p-43356493.entry.js.map → p-09c31ac6.entry.js.map} +0 -0
- /package/dist/core/{p-5e1a77aa.entry.js.map → p-0d711c6a.entry.js.map} +0 -0
- /package/dist/core/{p-ad6632a9.entry.js.map → p-0f6fd5d3.entry.js.map} +0 -0
- /package/dist/core/{p-296a41ce.entry.js.map → p-0f998905.entry.js.map} +0 -0
- /package/dist/core/{p-8798cc6b.entry.js.map → p-107281c4.entry.js.map} +0 -0
- /package/dist/core/{p-b00efb15.entry.js.map → p-1d8559f0.entry.js.map} +0 -0
- /package/dist/core/{p-62b9e7bf.entry.js.map → p-1edf2689.entry.js.map} +0 -0
- /package/dist/core/{p-4637c326.entry.js.map → p-1fc4b88f.entry.js.map} +0 -0
- /package/dist/core/{p-a8dc3162.entry.js.map → p-23dc27a8.entry.js.map} +0 -0
- /package/dist/core/{p-af02add9.entry.js.map → p-276a6c8f.entry.js.map} +0 -0
- /package/dist/core/{p-a5295f66.entry.js.map → p-3582c7df.entry.js.map} +0 -0
- /package/dist/core/{p-44aaf454.entry.js.map → p-3c7e90a7.entry.js.map} +0 -0
- /package/dist/core/{p-ae861bb8.entry.js.map → p-45076d7e.entry.js.map} +0 -0
- /package/dist/core/{p-70e1dd4d.entry.js.map → p-45c553db.entry.js.map} +0 -0
- /package/dist/core/{p-52fa3eec.entry.js.map → p-57ce68e5.entry.js.map} +0 -0
- /package/dist/core/{p-c4ffcc64.entry.js.map → p-5ac3adb9.entry.js.map} +0 -0
- /package/dist/core/{p-fb43abd6.entry.js.map → p-608b4912.entry.js.map} +0 -0
- /package/dist/core/{p-9452b9ac.entry.js.map → p-656a9127.entry.js.map} +0 -0
- /package/dist/core/{p-a86785dd.entry.js.map → p-6740c915.entry.js.map} +0 -0
- /package/dist/core/{p-28c9a6e4.entry.js.map → p-6aa8d3ce.entry.js.map} +0 -0
- /package/dist/core/{p-72ac8bb9.entry.js.map → p-72344764.entry.js.map} +0 -0
- /package/dist/core/{p-6fb29846.entry.js.map → p-76e8df31.entry.js.map} +0 -0
- /package/dist/core/{p-c397b33f.entry.js.map → p-7c38dd1f.entry.js.map} +0 -0
- /package/dist/core/{p-355d0914.entry.js.map → p-81f60443.entry.js.map} +0 -0
- /package/dist/core/{p-128e2cbb.entry.js.map → p-840c647f.entry.js.map} +0 -0
- /package/dist/core/{p-3785c740.entry.js.map → p-86989873.entry.js.map} +0 -0
- /package/dist/core/{p-1cc402b8.entry.js.map → p-880afd4b.entry.js.map} +0 -0
- /package/dist/core/{p-287e5c17.entry.js.map → p-889bb8db.entry.js.map} +0 -0
- /package/dist/core/{p-bfd03fb4.entry.js.map → p-8c00614c.entry.js.map} +0 -0
- /package/dist/core/{p-8abcc114.entry.js.map → p-8f45f956.entry.js.map} +0 -0
- /package/dist/core/{p-5cf704e3.entry.js.map → p-90814d32.entry.js.map} +0 -0
- /package/dist/core/{p-6e8ef73c.entry.js.map → p-93e1ba0a.entry.js.map} +0 -0
- /package/dist/core/{p-a7f21494.entry.js.map → p-949d08d3.entry.js.map} +0 -0
- /package/dist/core/{p-614953c5.entry.js.map → p-9b60ca02.entry.js.map} +0 -0
- /package/dist/core/{p-49444c33.entry.js.map → p-a0af1b0a.entry.js.map} +0 -0
- /package/dist/core/{p-012e058a.entry.js.map → p-a16415e4.entry.js.map} +0 -0
- /package/dist/core/{p-0eafbaa1.entry.js.map → p-ad5aca6f.entry.js.map} +0 -0
- /package/dist/core/{p-bdda404b.entry.js.map → p-aed1c7e7.entry.js.map} +0 -0
- /package/dist/core/{p-34cc376c.entry.js.map → p-b22fc28d.entry.js.map} +0 -0
- /package/dist/core/{p-44fbe8c2.entry.js.map → p-b5e39585.entry.js.map} +0 -0
- /package/dist/core/{p-3a94849e.entry.js.map → p-b8c0c142.entry.js.map} +0 -0
- /package/dist/core/{p-f4e2e41f.entry.js.map → p-ba4abeac.entry.js.map} +0 -0
- /package/dist/core/{p-6b6c1491.entry.js.map → p-c16e982c.entry.js.map} +0 -0
- /package/dist/core/{p-f247db14.entry.js.map → p-c3f5907e.entry.js.map} +0 -0
- /package/dist/core/{p-e0423c7e.entry.js.map → p-c7f8547d.entry.js.map} +0 -0
- /package/dist/core/{p-411527a1.entry.js.map → p-cdbbcef4.entry.js.map} +0 -0
- /package/dist/core/{p-21efc36e.entry.js.map → p-cf056074.entry.js.map} +0 -0
- /package/dist/core/{p-539b975f.entry.js.map → p-d2d17d6d.entry.js.map} +0 -0
- /package/dist/core/{p-082e0068.entry.js.map → p-d478d13e.entry.js.map} +0 -0
- /package/dist/core/{p-77a6c3f7.entry.js.map → p-df029b1b.entry.js.map} +0 -0
- /package/dist/core/{p-dfc2a0b1.entry.js.map → p-e176881a.entry.js.map} +0 -0
- /package/dist/core/{p-d8200098.entry.js.map → p-e1814e7e.entry.js.map} +0 -0
- /package/dist/core/{p-06b3ae40.entry.js.map → p-ebc47282.entry.js.map} +0 -0
- /package/dist/core/{p-ae7dcbd5.entry.js.map → p-ec14c783.entry.js.map} +0 -0
- /package/dist/core/{p-3b13d191.entry.js.map → p-f5fd4a76.entry.js.map} +0 -0
- /package/dist/core/{p-911b4aa4.entry.js.map → p-f700b759.entry.js.map} +0 -0
- /package/dist/core/{p-a7645717.entry.js.map → p-fdb587ab.entry.js.map} +0 -0
- /package/dist/core/{p-091a7fbf.entry.js.map → p-fe0153ec.entry.js.map} +0 -0
|
@@ -387,14 +387,14 @@ export class TextField {
|
|
|
387
387
|
hiddenInput
|
|
388
388
|
? renderHiddenInput(this.el, value, name, disabledMode)
|
|
389
389
|
: removeHiddenInput(this.el);
|
|
390
|
-
return (h(Host, { key: '
|
|
390
|
+
return (h(Host, { key: 'c94560bea90464d881f323a308aa17926a2ff1e6', class: {
|
|
391
391
|
"ic-text-field-full-width": fullWidth,
|
|
392
392
|
"ic-text-field-disabled": disabledMode,
|
|
393
393
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
394
|
-
} }, h("ic-input-container", { key: '
|
|
394
|
+
} }, h("ic-input-container", { key: 'cf76ec0c26f5003f66707b697df8c6e065872a66', readonly: readonly, disabled: disabledMode }, !hideLabel && (h("ic-input-label", { key: '0e8b2170e02cafadcda1cd7c73b1fe0d17695247', for: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly }, h("slot", { key: 'fb77e901d7b762bcdbe4b5aa1c448602617d1951', name: "helper-text", slot: "helper-text" }))), h("ic-input-component-container", { key: '51aff4fba6d8c8e474ebfc27f77c560cce1125f8', size: size, validationStatus: currentStatus, multiLine: multiline, disabled: disabledMode, readonly: readonly, validationInline: validationInline, fullWidth: fullWidth }, showLeftIcon && (h("span", { key: '85df3728d49c37c33e1fe792973c527137431a78', class: {
|
|
395
395
|
readonly,
|
|
396
396
|
"has-value": this.getNumberOfCharacters(value) > 0,
|
|
397
|
-
}, slot: "left-icon" }, h("slot", { key: '
|
|
397
|
+
}, slot: "left-icon" }, h("slot", { key: 'dc4cbe888dbe0e864102f60496be589951c4e610', name: "icon" }))), !multiline ? (h("input", Object.assign({ id: inputId, name: name, ref: (el) => (this.inputEl = el), type: type, min: min, max: max, value: value, class: {
|
|
398
398
|
"no-left-pad": !showLeftIcon && readonly,
|
|
399
399
|
readonly,
|
|
400
400
|
"truncate-value": truncateValue,
|
|
@@ -402,12 +402,12 @@ export class TextField {
|
|
|
402
402
|
"no-resize": resize === false || !!readonly,
|
|
403
403
|
"no-left-pad": !showLeftIcon && !!readonly,
|
|
404
404
|
readonly: !!readonly,
|
|
405
|
-
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onScroll: this.onTextAreaScroll, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))), isSlotUsed(el, "clear-button") && (h("slot", { key: '
|
|
405
|
+
}, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onScroll: this.onTextAreaScroll, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))), isSlotUsed(el, "clear-button") && (h("slot", { key: '6faa3c12856f4f6c10158af49f14b51d5dac92e8', name: "clear-button" })), isSlotUsed(el, "search-submit-button") && (h("slot", { key: 'c18e08b7ae93e3f65e0410af0b6d64eb418e3940', name: "search-submit-button" }))), isSlotUsed(el, "menu") && h("slot", { key: 'e1a46ef6a4d97c4910df75941d6608a7765d127a', name: "menu" }), h("ic-input-validation", { key: 'e963d95a1e5bfc767c35b798c61bcf958dbcdfa6', class: { "show-validation": this.showValidationMargin() }, status: this.hasStatus(currentStatus) === false ||
|
|
406
406
|
(currentStatus === IcInformationStatus.Success &&
|
|
407
407
|
validationInline) ||
|
|
408
408
|
validationInlineInternal
|
|
409
409
|
? ""
|
|
410
|
-
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, isSlotUsed(el, "validation-text") && (h("slot", { key: '
|
|
410
|
+
: currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, isSlotUsed(el, "validation-text") && (h("slot", { key: '4b5817e1c52b9af6511e07c202e5eb0e8457689d', name: "validation-text", slot: "validation-message" })), !readonly && maxNumChars > 0 && (h("div", { key: '059e8dc7ffbb0225d0c901821ff53d5b90ddf9f1', slot: "validation-message-adornment" }, !hideCharCount && (h("ic-typography", { key: 'afe9cb357584f91fd2762d2c9f87d68eb7e25e68', variant: "caption", class: "char-count-text" }, h("span", { key: '583f62c58407615b2ce37edb17eed4928952e6ee', class: "char-count" }, numChars, "/", maxNumChars))), h("span", { key: '953722d8ddd1d3c4e187308944fdd0723e8e8e70', class: "remaining-char-count-desc", "aria-live": "polite", hidden: !isFocussed, id: remainingCharCountDescId }, remainingCharCountDesc), h("span", { key: '973adba9f9c7dca2409423f36af8dc4a9a3a7192', hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters.")))))));
|
|
411
411
|
}
|
|
412
412
|
static get is() { return "ic-text-field"; }
|
|
413
413
|
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: '53aa5cb32bce3ebd1b66c22df8c64f615fad4d00', class: themeClass }, h("slot", { key: '6f2d5fa4d0d7a42995dd9d4b31081b421e6fe5a9' })));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "ic-theme"; }
|
|
71
71
|
static get properties() {
|
|
@@ -206,20 +206,20 @@ export class Toast {
|
|
|
206
206
|
}
|
|
207
207
|
render() {
|
|
208
208
|
const { variant, heading, message, visible, isManual, dismissButtonAriaLabel, theme, } = this;
|
|
209
|
-
return (h(Host, { key: '
|
|
209
|
+
return (h(Host, { key: 'e7a7544e4b374165ecfece2ecacd0a8e5286fe2c', class: {
|
|
210
210
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
211
211
|
["ic-toast-hidden"]: !visible,
|
|
212
212
|
[`ic-toast-variant-${variant}`]: variant !== undefined,
|
|
213
|
-
}, tabindex: "0", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? "dialog" : "alert", "aria-live": isManual ? null : "polite" }, h("div", { key: '
|
|
213
|
+
}, tabindex: "0", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? "dialog" : "alert", "aria-live": isManual ? null : "polite" }, h("div", { key: 'dd87e639960574b163d4647c039bd26aafe046f6', class: {
|
|
214
214
|
["container"]: true,
|
|
215
215
|
[`container-${variant}`]: variant !== undefined,
|
|
216
|
-
} }, variant && visible && (h("div", { key: '
|
|
216
|
+
} }, variant && visible && (h("div", { key: 'baa9567a490a4400b1f27816fd82e14dd672b03c', class: "toast-icon-container" }, h("div", { key: '6a8f504184564a9ffdcfb1bb4aef68b571be1cd9', class: {
|
|
217
217
|
["divider"]: true,
|
|
218
218
|
[`divider-${variant}`]: true,
|
|
219
|
-
} }), variant === "neutral" ? (h("slot", { name: "neutral-icon" })) : (h("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), h("div", { key: '
|
|
219
|
+
} }), variant === "neutral" ? (h("slot", { name: "neutral-icon" })) : (h("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), h("div", { key: 'f6fe1acced40005f09a18cec2119b7fa518d65c3', class: {
|
|
220
220
|
["toast-content"]: true,
|
|
221
221
|
["no-icon"]: variant === "neutral" && !isSlotUsed(this.el, "neutral-icon"),
|
|
222
|
-
} }, h("div", { key: '
|
|
222
|
+
} }, h("div", { key: 'd594caa7e1e7935f992b5106432eee7304518fbe', class: "toast-text" }, h("ic-typography", { key: '83cd3393341aff5d8a7660e0fefd2c61a8039777', variant: "subtitle-large", class: "toast-heading" }, visible && (isManual ? h("h5", null, heading) : h("p", null, heading))), message && (h("ic-typography", { key: 'f628cf5d15c0dc000549698803420dd6a983b032', variant: "body", class: "toast-message" }, visible && h("p", { key: 'e6cb92a64c6d2d759eafec7f0adafa332dbbbc31' }, message)))), isSlotUsed(this.el, "action") && (h("div", { key: '805d7b37f322f0dcc8fbf4750ec5982adf7f5754', class: "toast-action-container" }, h("slot", { key: '943670c862d60185c157ebda02aeb1cb4f8b4650', 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 })))));
|
|
223
223
|
}
|
|
224
224
|
static get is() { return "ic-toast"; }
|
|
225
225
|
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: '7c0c88d4aeb9e5141603885ce134e43674e341a9' });
|
|
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: 'd61a2411c44e043dbc0d3adfdd4ef4c041c752b4', 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: 'a19e19a0cfbf6abe36aed52470e753c4410360dd', "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: 'be68b5556f38f43be5b8e5dee4533550be5271e9' }), isSlotUsed(this.el, "icon") && (h("slot", { key: '1adacf752187c44bb6b16ee3464e57b626893048', name: "icon", slot: `${iconPlacement}-icon` })), isSlotUsed(this.el, "badge") && (h("slot", { key: '2507afeda1b98c00a3801c8deddfb3f8c8c01a65', 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: '5c8877eaeec66fb0cc9fbcd5ba593fc86bd2b5f2', 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: 'f701ba436d48cd8d33abe55a252b4dd40455b67a' })));
|
|
256
256
|
}
|
|
257
257
|
static get is() { return "ic-toggle-button-group"; }
|
|
258
258
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,8 +40,8 @@ export class Tooltip {
|
|
|
40
40
|
this.show = () => {
|
|
41
41
|
if (this.label) {
|
|
42
42
|
this.toolTip.setAttribute("data-show", "");
|
|
43
|
-
if (this.
|
|
44
|
-
this.el.classList.add("ic-tooltip-
|
|
43
|
+
if (this.containerContentArea) {
|
|
44
|
+
this.el.classList.add("ic-tooltip-in-container");
|
|
45
45
|
}
|
|
46
46
|
this.popperInstance = createPopper(this.el, this.toolTip, Object.assign({ strategy: this.fixedPositioning ? "fixed" : "absolute", placement: this.placement, modifiers: [
|
|
47
47
|
{
|
|
@@ -60,19 +60,19 @@ export class Tooltip {
|
|
|
60
60
|
name: "eventListeners",
|
|
61
61
|
options: { scroll: false, resize: false },
|
|
62
62
|
},
|
|
63
|
-
...(this.
|
|
63
|
+
...(this.containerContentArea
|
|
64
64
|
? [
|
|
65
65
|
{
|
|
66
66
|
name: "preventOverflow",
|
|
67
67
|
options: {
|
|
68
|
-
boundary: this.
|
|
68
|
+
boundary: this.containerContentArea,
|
|
69
69
|
padding: 8,
|
|
70
70
|
},
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
name: "flip",
|
|
74
74
|
options: {
|
|
75
|
-
boundary: this.
|
|
75
|
+
boundary: this.containerContentArea,
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
]
|
|
@@ -178,15 +178,16 @@ export class Tooltip {
|
|
|
178
178
|
componentDidLoad() {
|
|
179
179
|
var _a, _b;
|
|
180
180
|
this.manageEventListeners("add");
|
|
181
|
-
|
|
181
|
+
// Display tooltips correctly within drawer and dialog components
|
|
182
|
+
let container;
|
|
182
183
|
if (this.el.getRootNode().host) {
|
|
183
|
-
|
|
184
|
+
container = this.el.getRootNode().host.closest("ic-dialog, ic-drawer");
|
|
184
185
|
}
|
|
185
186
|
else {
|
|
186
|
-
|
|
187
|
+
container = this.el.closest("ic-dialog, ic-drawer");
|
|
187
188
|
}
|
|
188
|
-
this.
|
|
189
|
-
(_b = (_a =
|
|
189
|
+
this.containerContentArea =
|
|
190
|
+
(_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;
|
|
190
191
|
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Tooltip");
|
|
191
192
|
}
|
|
192
193
|
componentDidRender() {
|
|
@@ -213,10 +214,10 @@ export class Tooltip {
|
|
|
213
214
|
}
|
|
214
215
|
render() {
|
|
215
216
|
const { label, maxLines, silent, theme } = this;
|
|
216
|
-
return (h(Host, { key: '
|
|
217
|
+
return (h(Host, { key: '3a57831b80c59ddef6785c1f840ecfd974081de9', class: {
|
|
217
218
|
"ic-tooltip": true,
|
|
218
219
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
219
|
-
}, "aria-label": isSafari && label }, h("div", { key: '
|
|
220
|
+
}, "aria-label": isSafari && label }, h("div", { key: '03a49bde1864792bc994c18fbc7c05d1f872746b', ref: (el) => (this.toolTip = el), role: "tooltip", class: "ic-tooltip-container", "aria-hidden": `${silent}` }, h("ic-typography", { key: '5188c9d83e230efc0d78df9abd1951597b3a108a', maxLines: maxLines, variant: "caption" }, label), h("div", { key: '8f94c1568e3635817f7079f105ae7e38b65960aa', ref: (el) => (this.arrow = el), class: "ic-tooltip-arrow" })), h("slot", { key: '242ee30597606f704984b8ee9f7445406849b964' })));
|
|
220
221
|
}
|
|
221
222
|
static get is() { return "ic-tooltip"; }
|
|
222
223
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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,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,CAAC,IAAI,CAAC,YAAY,IAAI,OAAO;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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 {\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 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 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,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,CA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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 {\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 * @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 } 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"]}
|
|
@@ -211,19 +211,19 @@ export class TopNavigation {
|
|
|
211
211
|
const attrs = Component == "a" && {
|
|
212
212
|
href: href,
|
|
213
213
|
};
|
|
214
|
-
return (h(Host, { key: '
|
|
214
|
+
return (h(Host, { key: 'c0c457a694891bb06ad49c6601fb57d83e6ac6c6', class: {
|
|
215
215
|
"fullwidth-searchbar": hasFullWidthSearchBar,
|
|
216
216
|
"mobile-mode": overMobileBreakpoint,
|
|
217
217
|
[IcBrandForegroundEnum.Dark]: foregroundColor === IcBrandForegroundEnum.Dark,
|
|
218
218
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
|
219
|
-
} }, h("div", { key: '
|
|
219
|
+
} }, h("div", { key: 'fd5f04cfce660e81024b45ebee521d73d42a448d', class: "top-navigation" }, h("ic-section-container", { key: '028947110e4a66cccc58659ca164b2938cd7e533', aligned: contentAligned, "full-height": true }, h("header", { key: 'f528842ca7c9fe6a127e53cf7ea0c5af9aeebe79', role: "banner" }, h("div", { key: 'e23371a5539f686060f624053e8b04a2cef1f860', class: "top-panel-container" }, h("div", { key: '25ede4b34cb30ba1d25d3fb06a3f44e48ad4a4c9', class: "app-details-container" }, (hasTitle || hasAppTitleSlot) && (h(Component, Object.assign({ key: '666eddef4b8be110a1796083432cd754cda18152', class: "title-link" }, attrs), hasAppIcon && (h("div", { key: 'cb7c5cdf6ccc28c5dc5d7699e0332770aa5246f9', class: "app-icon-container" }, h("slot", { key: 'cd21e969e6fd23594aeb2b31468e81d1d68de7f7', name: "app-icon" }))), isSmallDeviceSize &&
|
|
220
220
|
(!isEmptyString(shortAppTitle) || shortAppTitleSlot) ? (h("ic-typography", { variant: "subtitle-small", "aria-label": (!hasAppTitleSlot || !shortAppTitleSlot) &&
|
|
221
|
-
`${appTitle} (${shortAppTitle})` }, h("h1", null, shortAppTitleSlot ? (h("slot", { name: "short-app-title" })) : (shortAppTitle)))) : (h("ic-typography", { variant: appTitleVariant }, h("h1", { class: "title-wrap" }, hasAppTitleSlot ? (h("slot", { name: "app-title" })) : (appTitle)))))), hasStatus && (h("div", { key: '
|
|
221
|
+
`${appTitle} (${shortAppTitle})` }, h("h1", null, shortAppTitleSlot ? (h("slot", { name: "short-app-title" })) : (shortAppTitle)))) : (h("ic-typography", { variant: appTitleVariant }, h("h1", { class: "title-wrap" }, hasAppTitleSlot ? (h("slot", { name: "app-title" })) : (appTitle)))))), hasStatus && (h("div", { key: '938a6e6d13bfd92a87baf43934342fb426802d65', class: "app-status" }, h("ic-typography", { key: 'e3e8e83984ead5be2e4869e67640762af42f5f32', "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, status))), hasVersion && (h("div", { key: '1129e504a1db3af56d2c931e08bd15f992b5721f', class: "app-version" }, h("ic-typography", { key: 'c6f56458fc5f565055fdb0bde408e6078216d51b', variant: "label", class: "app-version-text", "aria-label": "app version" }, version)))), (hasSearchSlotContent || hasMenuContent) && (h("div", { key: '4523603a02eeb22eca466afc1d2cfa44755b8f17', class: "search-menu-container" }, h("div", { key: '77ff191542abaa41c8610418d54922e91268d364', class: "search-actions-container" }, !overMobileBreakpoint ? (h(Fragment, null, h("slot", { name: "search" }), hasIconButtons && (h("div", { class: "icon-buttons-container" }, h("slot", { name: "buttons" }))))) : (h(Fragment, null, hasSearchSlotContent && (h("ic-button", { id: "search-toggle-button", ref: (el) => (this.mobileSearchButtonEl = el), onMouseDown: searchButtonMouseDownHandler, variant: "icon-tertiary", monochrome: true, size: searchButtonSize, "aria-label": mobileSearchButtonTitle, theme: foregroundColor, onClick: searchButtonClickHandler }, h("slot", { name: "toggle-icon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#ffffff" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" }))))), hasMenuContent && (h("div", { class: "menu-button-container" }, h("span", { id: "navigation-landmark-button-text", class: "navigation-landmark-button-text", "aria-hidden": "true" }, "Main navigation button"), h("nav", { "aria-labelledby": "navigation-landmark-button-text", "aria-hidden": `${navMenuVisible}` }, h("ic-button", { id: "menu-button", ref: (el) => (this.menuButtonEl = el), theme: foregroundColor, variant: "secondary", monochrome: true, "aria-expanded": "false", "aria-haspopup": "true", "aria-label": `Open ${hasNavigation ? "navigation" : "app"} menu`, size: menuSize, onClick: menuButtonClick }, "Menu", h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#ffffff", slot: "left-icon" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })))))))))))), mobileSearchBarVisible && (h("div", { key: 'e18aab12917ebdfead1c16c9d508c7feaf7797cb', class: "search-bar-container" }, h("slot", { key: '4bf9ae342c58629ea76dc7de395128afd695dc8b', name: "search" }))), hasNavigation && !overMobileBreakpoint && (h("div", { key: '30401c56949e21a33b18166da0ba2b07ad91c3f0', class: "navigation-tabs" }, h("span", { key: '72561ee2554f09e0ff33b29fb257e7dde0a99a0f', id: "navigation-landmark-text", class: "navigation-landmark-text", "aria-hidden": "true" }, "Main pages"), h("nav", { key: '411b215af2ef320d415af6e189a60dce1b730cdf', "aria-labelledby": "navigation-landmark-text", class: "nav-panel-container" }, h("ic-horizontal-scroll", { key: 'fac1019061aeaea2ea8197cc0100a23f0cd1a69d',
|
|
222
222
|
// eslint-disable-next-line
|
|
223
223
|
// @ts-ignore
|
|
224
|
-
monochrome: true, appearance: foregroundColor }, h("ul", { key: '
|
|
224
|
+
monochrome: true, appearance: foregroundColor }, h("ul", { key: 'b85234906c34f1fa03b56903656d6f18eb20829d', class: "navigation-item-list", tabindex: "-1" }, h("slot", { key: 'd8ef04882230955d8faba63b13edffeeb969e6e6', name: "navigation" }))))))))), navMenuVisible && (h("ic-navigation-menu", { key: '46b00abe99e079c940d24d4e9693c5445ebcbafa', version: version, status: status, class: {
|
|
225
225
|
inline,
|
|
226
|
-
} }, hasIconButtons && (h("div", { key: '
|
|
226
|
+
} }, hasIconButtons && (h("div", { key: '29a9b4e6ba1733b2e96ad9b886bb879ade662d41', class: "menu-buttons-slot", slot: "buttons" }, h("slot", { key: '748b40fd29aedee029a4fa27e999cf9844483613', name: "buttons" }))), h("ul", { key: '20b81216ba0c01470673678a14d873fe8cbcaaae', slot: "navigation" }, h("slot", { key: 'fb9e239a48344888b970e865e103b1ee2f9156ed', name: "navigation" }))))));
|
|
227
227
|
}
|
|
228
228
|
static get is() { return "ic-top-navigation"; }
|
|
229
229
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '9628fbe7b5d9c10f640fe189fe454c332e1f6011', 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: 'e66a10144ba334ab8b2530e2cf666634ce335717', 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"; }
|
|
@@ -125,4 +125,11 @@ export const IGNORED_KEYBOARD_CHARACTERS = [
|
|
|
125
125
|
"Tab",
|
|
126
126
|
];
|
|
127
127
|
export const IC_CUSTOM_ALLOWED_COMPONENTS = [];
|
|
128
|
+
// Component tag names used in focus trapping helper functions
|
|
129
|
+
export const IC_ACCORDION = "IC-ACCORDION";
|
|
130
|
+
export const IC_ACCORDION_GROUP = "IC-ACCORDION-GROUP";
|
|
131
|
+
export const IC_CHECKBOX = "IC-CHECKBOX";
|
|
132
|
+
export const IC_SEARCH_BAR = "IC-SEARCH-BAR";
|
|
133
|
+
export const IC_TAB_CONTEXT = "IC-TAB-CONTEXT";
|
|
134
|
+
export const IC_TEXT_FIELD = "IC-TEXT-FIELD";
|
|
128
135
|
//# sourceMappingURL=constants.js.map
|
|
@@ -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;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,sBA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,GAAG,CAAC;AAE9C,sFAAsF;AACtF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,KAAK;IACL,UAAU;IACV,WAAW;IACX,WAAW;IACX,YAAY;IACZ,SAAS;IACT,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,UAAU;IACV,aAAa;IACb,SAAS;IACT,QAAQ;IACR,KAAK;IACL,OAAO;IACP,QAAQ;IACR,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,IAAI;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;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAa,EAAE,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\nexport const IC_CUSTOM_ALLOWED_COMPONENTS: string[] = [];\n"]}
|
|
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;AAEF,yBAAyB;AACzB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa;IACb,mBAAmB;IACnB,WAAW;IACX,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,aAAa;IACb,cAAc;IACd,eAAe;IACf,aAAa;IACb,cAAc;I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;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACvD,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,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\nexport const IC_CUSTOM_ALLOWED_COMPONENTS: string[] = [];\n\n// Component tag names used in focus trapping helper functions\nexport const IC_ACCORDION = \"IC-ACCORDION\";\nexport const IC_ACCORDION_GROUP = \"IC-ACCORDION-GROUP\";\nexport const IC_CHECKBOX = \"IC-CHECKBOX\";\nexport const IC_SEARCH_BAR = \"IC-SEARCH-BAR\";\nexport const IC_TAB_CONTEXT = \"IC-TAB-CONTEXT\";\nexport const IC_TEXT_FIELD = \"IC-TEXT-FIELD\";\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forceUpdate } from "@stencil/core";
|
|
2
|
-
import { IcBrandForegroundEnum, } from "
|
|
3
|
-
import { IC_BLOCK_COLOR_COMPONENTS, IC_BLOCK_COLOR_EXCEPTIONS, IC_FIXED_COLOR_COMPONENTS, } from "./constants";
|
|
2
|
+
import { IcBrandForegroundEnum, } from "./types";
|
|
3
|
+
import { IC_ACCORDION, IC_ACCORDION_GROUP, IC_BLOCK_COLOR_COMPONENTS, IC_BLOCK_COLOR_EXCEPTIONS, IC_CHECKBOX, IC_FIXED_COLOR_COMPONENTS, IC_SEARCH_BAR, IC_TAB_CONTEXT, IC_TEXT_FIELD, } from "./constants";
|
|
4
4
|
const DARK_MODE_THRESHOLD = 133.3505;
|
|
5
5
|
const ANYWHERE_SEARCH_POSITION = "anywhere";
|
|
6
6
|
const icInput = "ic-input";
|
|
@@ -472,4 +472,171 @@ export const getElementInheritedTheme = (el) => {
|
|
|
472
472
|
export const isSafari = /safari/i.test(window.navigator.userAgent) &&
|
|
473
473
|
!/Edge/i.test(window.navigator.userAgent) &&
|
|
474
474
|
!/chrome/i.test(window.navigator.userAgent);
|
|
475
|
+
/**
|
|
476
|
+
* Focuses the provided element, or the next focusable element if it should be skipped. Used for focus trapping.
|
|
477
|
+
* @param focusAttemptCount - number of focus attempts that have been made
|
|
478
|
+
* @param focusedElementIndex - current focused element index
|
|
479
|
+
* @param interactiveElementList - list of interactive elements
|
|
480
|
+
* @param shiftKey - whether the shift key is pressed
|
|
481
|
+
*/
|
|
482
|
+
export const focusElement = (focusAttemptCount, focusedElementIndex, interactiveElementList, shiftKey = false) => {
|
|
483
|
+
const element = interactiveElementList[focusedElementIndex];
|
|
484
|
+
if (!element) {
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
let newFocusAttemptCount = focusAttemptCount;
|
|
488
|
+
if (newFocusAttemptCount++ > interactiveElementList.length) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
let newFocusedElementIndex = focusedElementIndex;
|
|
492
|
+
if (shouldSkipElement(element)) {
|
|
493
|
+
newFocusedElementIndex = getFocusIndexBasedOnShiftKey(newFocusedElementIndex, shiftKey);
|
|
494
|
+
newFocusedElementIndex = getLoopedNextFocusIndexIfLastElement(newFocusedElementIndex, interactiveElementList);
|
|
495
|
+
return focusElement(newFocusAttemptCount, newFocusedElementIndex, interactiveElementList, shiftKey);
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
switch (element.tagName) {
|
|
499
|
+
case IC_ACCORDION:
|
|
500
|
+
case IC_ACCORDION_GROUP:
|
|
501
|
+
case IC_CHECKBOX:
|
|
502
|
+
case IC_SEARCH_BAR:
|
|
503
|
+
case IC_TAB_CONTEXT:
|
|
504
|
+
case IC_TEXT_FIELD:
|
|
505
|
+
element.setFocus();
|
|
506
|
+
break;
|
|
507
|
+
default:
|
|
508
|
+
element.focus();
|
|
509
|
+
}
|
|
510
|
+
return { newFocusAttemptCount, newFocusedElementIndex };
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* Gets the index of the currently focused element. Used for focus trapping.
|
|
515
|
+
* @param el - host element of the component
|
|
516
|
+
* @param interactiveElementList - list of interactive elements
|
|
517
|
+
*/
|
|
518
|
+
export const getFocusedElementIndex = (el, interactiveElementList) => {
|
|
519
|
+
var _a;
|
|
520
|
+
for (let i = 0; i < interactiveElementList.length; i++) {
|
|
521
|
+
if (interactiveElementList[i] ===
|
|
522
|
+
(((_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) || document.activeElement)) {
|
|
523
|
+
return i;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return null;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* Gets the next focusable element index based on whether the shift key is pressed. Used for focus trapping.
|
|
530
|
+
* @param focusedElementIndex - current focused element index
|
|
531
|
+
* @param shiftKey - whether the shift key is pressed
|
|
532
|
+
*/
|
|
533
|
+
export const getFocusIndexBasedOnShiftKey = (focusedElementIndex, shiftKey) => (shiftKey ? (focusedElementIndex -= 1) : (focusedElementIndex += 1));
|
|
534
|
+
/**
|
|
535
|
+
* Gets the next focusable element index, looping back to the start or end if necessary. Used for focus trapping.
|
|
536
|
+
* @param focusedElementIndex - current focused element index
|
|
537
|
+
* @param interactiveElementList - list of interactive elements
|
|
538
|
+
*/
|
|
539
|
+
export const getLoopedNextFocusIndexIfLastElement = (focusedElementIndex, interactiveElementList) => {
|
|
540
|
+
if (focusedElementIndex > interactiveElementList.length - 1) {
|
|
541
|
+
return 0;
|
|
542
|
+
}
|
|
543
|
+
else if (focusedElementIndex < 0) {
|
|
544
|
+
return interactiveElementList.length - 1;
|
|
545
|
+
}
|
|
546
|
+
return focusedElementIndex;
|
|
547
|
+
};
|
|
548
|
+
/**
|
|
549
|
+
* Handles tab key press for focus trapping.
|
|
550
|
+
* @param el - host element of the component
|
|
551
|
+
* @param focusAttemptCount - number of focus attempts that have been made
|
|
552
|
+
* @param focusedElementIndex - current focused element index
|
|
553
|
+
* @param interactiveElementList - list of interactive elements
|
|
554
|
+
* @param shiftKey - whether the shift key is pressed
|
|
555
|
+
*/
|
|
556
|
+
export function handleFocusTrapTabKeyPress(el, focusAttemptCount, focusedElementIndex, interactiveElementList, shiftKey) {
|
|
557
|
+
var _a;
|
|
558
|
+
let newFocusAttemptCount = focusAttemptCount;
|
|
559
|
+
let newFocusedElementIndex = getFocusedElementIndex(el, interactiveElementList) || focusedElementIndex;
|
|
560
|
+
if (((_a = interactiveElementList[focusedElementIndex]) === null || _a === void 0 ? void 0 : _a.tagName) === IC_SEARCH_BAR) {
|
|
561
|
+
return {
|
|
562
|
+
newFocusAttemptCount,
|
|
563
|
+
newFocusedElementIndex,
|
|
564
|
+
preventDefault: false,
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
newFocusedElementIndex = getFocusIndexBasedOnShiftKey(newFocusedElementIndex, shiftKey);
|
|
568
|
+
newFocusedElementIndex = getLoopedNextFocusIndexIfLastElement(newFocusedElementIndex, interactiveElementList);
|
|
569
|
+
newFocusAttemptCount = 0;
|
|
570
|
+
const focusElementResult = focusElement(newFocusAttemptCount, newFocusedElementIndex, interactiveElementList, shiftKey);
|
|
571
|
+
if (focusElementResult) {
|
|
572
|
+
newFocusedElementIndex = focusElementResult.newFocusedElementIndex;
|
|
573
|
+
newFocusAttemptCount = focusElementResult.newFocusAttemptCount;
|
|
574
|
+
}
|
|
575
|
+
return { newFocusAttemptCount, newFocusedElementIndex, preventDefault: true };
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Sets up listener and mutation observer to refresh interactive elements on slot changes. Used for focus trapping.
|
|
579
|
+
* @param contentWrapper - content wrapper element
|
|
580
|
+
* @param getInteractiveElements - function to get interactive elements
|
|
581
|
+
*/
|
|
582
|
+
export const refreshInteractiveElementsOnSlotChange = (contentWrapper, getInteractiveElements) => {
|
|
583
|
+
var _a;
|
|
584
|
+
let contentAreaSlot = null;
|
|
585
|
+
let contentAreaMutationObserver = null;
|
|
586
|
+
if (contentWrapper) {
|
|
587
|
+
contentAreaSlot = contentWrapper.querySelector("slot");
|
|
588
|
+
// Detect changes to slotted elements
|
|
589
|
+
contentAreaSlot === null || contentAreaSlot === void 0 ? void 0 : contentAreaSlot.addEventListener("slotchange", getInteractiveElements);
|
|
590
|
+
contentAreaMutationObserver = new MutationObserver(() => {
|
|
591
|
+
getInteractiveElements();
|
|
592
|
+
});
|
|
593
|
+
// Detect changes to children of slotted elements
|
|
594
|
+
(_a = getSlotElements(contentWrapper)) === null || _a === void 0 ? void 0 : _a.forEach((el) => {
|
|
595
|
+
contentAreaMutationObserver === null || contentAreaMutationObserver === void 0 ? void 0 : contentAreaMutationObserver.observe(el, {
|
|
596
|
+
childList: true,
|
|
597
|
+
subtree: true,
|
|
598
|
+
});
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
return { contentAreaSlot, contentAreaMutationObserver };
|
|
602
|
+
};
|
|
603
|
+
/**
|
|
604
|
+
* Removes listener and disconnects mutation observer for slot changes. Used for focus trapping.
|
|
605
|
+
* @param contentAreaSlotMutationObserver - mutation observer for content area slot
|
|
606
|
+
* @param contentAreaSlot - content area slot element
|
|
607
|
+
* @param getInteractiveElements - function to get interactive elements
|
|
608
|
+
*/
|
|
609
|
+
export const removeInteractiveElementSlotChangeListener = (contentAreaSlot, contentAreaSlotMutationObserver, getInteractiveElements) => {
|
|
610
|
+
if (contentAreaSlot) {
|
|
611
|
+
contentAreaSlot.removeEventListener("slotchange", getInteractiveElements);
|
|
612
|
+
contentAreaSlotMutationObserver === null || contentAreaSlotMutationObserver === void 0 ? void 0 : contentAreaSlotMutationObserver.disconnect();
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* Determines whether an element should be skipped when focusing interactive elements. Used for focus trapping.
|
|
617
|
+
* @param element - element to check
|
|
618
|
+
*/
|
|
619
|
+
export const shouldSkipElement = (element) => {
|
|
620
|
+
if (!element) {
|
|
621
|
+
return true;
|
|
622
|
+
}
|
|
623
|
+
const isHidden = getComputedStyle(element).visibility === "hidden" ||
|
|
624
|
+
element.offsetHeight === 0 ||
|
|
625
|
+
element.hasAttribute("disabled") ||
|
|
626
|
+
(element.tagName === IC_ACCORDION_GROUP &&
|
|
627
|
+
element.hasAttribute("single-expansion"));
|
|
628
|
+
const radioEl = element.closest("ic-radio-option");
|
|
629
|
+
return (isHidden ||
|
|
630
|
+
(element.getAttribute("type") === "radio" &&
|
|
631
|
+
!!radioEl &&
|
|
632
|
+
!(radioEl.hasAttribute("selected") || element.tabIndex === 0)));
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* Gets all interactive elements slotted within a component. Used for focus trapping.
|
|
636
|
+
* @param el - host element of the component
|
|
637
|
+
*/
|
|
638
|
+
export const slottedInteractiveElements = (el) => Array.from(el.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex="-1"]),
|
|
639
|
+
ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-context,
|
|
640
|
+
ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button,
|
|
641
|
+
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`));
|
|
475
642
|
//# sourceMappingURL=helpers.js.map
|