@ukic/web-components 3.0.0-alpha.13 → 3.0.0-alpha.15
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/app-globals-1608a8a5.js +54 -0
- package/dist/cjs/app-globals-1608a8a5.js.map +1 -0
- package/dist/cjs/core.cjs.js +3 -3
- package/dist/cjs/{helpers-08a9ec1c.js → helpers-7a599012.js} +2 -2
- package/dist/cjs/{helpers-08a9ec1c.js.map → helpers-7a599012.js.map} +1 -1
- package/dist/cjs/ic-accordion-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/ic-badge.cjs.entry.js +3 -3
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/ic-button_3.cjs.entry.js +61 -3
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +3 -3
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +7 -7
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +3 -3
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +3 -3
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-dialog.cjs.entry.js +38 -47
- 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 +2 -2
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer.cjs.entry.js +2 -2
- package/dist/cjs/ic-hero.cjs.entry.js +2 -2
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +2 -2
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +3 -3
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +2 -2
- package/dist/cjs/ic-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-group.cjs.entry.js +23 -17
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +38 -24
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +12 -11
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +4 -4
- package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +7 -7
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +7 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +7 -7
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +2 -2
- package/dist/cjs/ic-search-bar.cjs.entry.js +3 -3
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +3 -3
- package/dist/cjs/ic-select.cjs.entry.js +15 -12
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +10 -7
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +3 -3
- package/dist/cjs/ic-skip-link.cjs.entry.js +11 -10
- package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +5 -5
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +17 -16
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- 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 +2 -2
- package/dist/cjs/ic-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab.cjs.entry.js +3 -3
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +33 -15
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +3 -3
- package/dist/cjs/ic-toast-region.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast.cjs.entry.js +6 -6
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-toggle-button.cjs.entry.js +5 -5
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +5 -9
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/{index-d337cd8a.js → index-0236cc4b.js} +3 -1
- package/dist/cjs/index-0236cc4b.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/components/ic-badge/ic-badge.css +4 -0
- package/dist/collection/components/ic-button/ic-button.css +29 -13
- package/dist/collection/components/ic-button/ic-button.js +58 -0
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.stories.js +184 -5
- package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +5 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +4 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +5 -5
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
- package/dist/collection/components/ic-chip/ic-chip.css +2 -2
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +4 -0
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +1 -1
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.js +57 -66
- 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-input-component-container/ic-input-component-container.css +2 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +1 -0
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +47 -49
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +47 -17
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.types.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +36 -22
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.js +10 -9
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-pagination/ic-pagination.css +10 -2
- package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +19 -3
- package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +5 -4
- 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 +70 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.js +6 -6
- package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +6 -13
- package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
- package/dist/collection/components/ic-select/ic-select.css +11 -1
- package/dist/collection/components/ic-select/ic-select.js +12 -9
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +10 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +7 -4
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +57 -36
- package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.css +22 -2
- package/dist/collection/components/ic-skip-link/ic-skip-link.js +13 -12
- package/dist/collection/components/ic-skip-link/ic-skip-link.js.map +1 -1
- package/dist/collection/components/ic-skip-link/ic-skip-link.stories.js +375 -31
- package/dist/collection/components/ic-status-tag/ic-status-tag.css +2 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
- package/dist/collection/components/ic-step/ic-step.css +8 -31
- package/dist/collection/components/ic-step/ic-step.js +14 -13
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
- package/dist/collection/components/ic-stepper/ic-stepper.stories.js +5 -1
- package/dist/collection/components/ic-switch/ic-switch.js +4 -4
- package/dist/collection/components/ic-tab/ic-tab.css +13 -3
- 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.css +1 -0
- package/dist/collection/components/ic-text-field/ic-text-field.js +111 -13
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.stories.js +195 -9
- package/dist/collection/components/ic-theme/ic-theme.js +1 -1
- package/dist/collection/components/ic-toast/ic-toast.css +1 -1
- package/dist/collection/components/ic-toast/ic-toast.js +3 -3
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +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-top-navigation/ic-top-navigation.css +5 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +2 -6
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +12 -19
- package/dist/components/helpers.js +1 -1
- package/dist/components/ic-badge.js +1 -1
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-button2.js +59 -1
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +1 -1
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +5 -5
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +1 -1
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +1 -1
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +2 -2
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-dialog.js +38 -47
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +22 -15
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +37 -23
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +10 -9
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination.js +5 -5
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +5 -4
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +5 -5
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-select.js +13 -10
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +8 -5
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-skip-link.js +10 -9
- package/dist/components/ic-skip-link.js.map +1 -1
- package/dist/components/ic-status-tag.js +3 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +15 -14
- package/dist/components/ic-step.js.map +1 -1
- 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-panel.js.map +1 -1
- package/dist/components/ic-tab.js +1 -1
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field.js +35 -13
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast.js +5 -5
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +2 -2
- package/dist/components/ic-toggle-button.js +3 -3
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +4 -8
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/index.js +50 -0
- package/dist/components/index.js.map +1 -1
- package/dist/core/core.css +353 -245
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-03248270.entry.js +2 -0
- package/dist/core/p-03248270.entry.js.map +1 -0
- package/dist/core/p-0e5e9a11.entry.js +2 -0
- package/dist/core/p-0e5e9a11.entry.js.map +1 -0
- package/dist/core/{p-0f34465d.entry.js → p-115a684f.entry.js} +2 -2
- package/dist/core/p-1446973e.js +2 -0
- package/dist/core/p-1446973e.js.map +1 -0
- package/dist/core/p-167834c7.entry.js +2 -0
- package/dist/core/p-167834c7.entry.js.map +1 -0
- package/dist/core/{p-4e4014cd.entry.js → p-2180f2d1.entry.js} +2 -2
- package/dist/core/{p-8856dff4.entry.js → p-22eed13e.entry.js} +2 -2
- package/dist/core/p-26c50065.entry.js +2 -0
- package/dist/core/p-26c50065.entry.js.map +1 -0
- package/dist/core/{p-e25feba1.entry.js → p-2af04ace.entry.js} +2 -2
- package/dist/core/{p-e25feba1.entry.js.map → p-2af04ace.entry.js.map} +1 -1
- package/dist/core/{p-196e3d33.entry.js → p-2dd6e5bb.entry.js} +2 -2
- package/dist/core/p-2dd6e5bb.entry.js.map +1 -0
- package/dist/core/{p-fbce5f9a.entry.js → p-2f30c66a.entry.js} +2 -2
- package/dist/core/p-30b56108.entry.js +2 -0
- package/dist/core/p-30b56108.entry.js.map +1 -0
- package/dist/core/p-3373b7c4.entry.js +2 -0
- package/dist/core/p-3373b7c4.entry.js.map +1 -0
- package/dist/core/{p-de7542fa.entry.js → p-33c4851a.entry.js} +2 -2
- package/dist/core/p-33c4851a.entry.js.map +1 -0
- package/dist/core/p-38dfe702.entry.js +2 -0
- package/dist/core/p-38dfe702.entry.js.map +1 -0
- package/dist/core/{p-c19cdc86.entry.js → p-44594b52.entry.js} +2 -2
- package/dist/core/{p-72140621.entry.js → p-4681ab85.entry.js} +2 -2
- package/dist/core/{p-78c3ca49.entry.js → p-51aa5330.entry.js} +2 -2
- package/dist/core/p-54100d6b.entry.js +2 -0
- package/dist/core/p-54100d6b.entry.js.map +1 -0
- package/dist/core/p-54f6ad93.entry.js +2 -0
- package/dist/core/p-54f6ad93.entry.js.map +1 -0
- package/dist/core/p-5537abe7.entry.js +2 -0
- package/dist/core/p-5537abe7.entry.js.map +1 -0
- package/dist/core/{p-1fccec19.entry.js → p-56eb4f02.entry.js} +2 -2
- package/dist/core/p-5af75c16.entry.js +2 -0
- package/dist/core/p-5af75c16.entry.js.map +1 -0
- package/dist/core/p-5d944741.entry.js +2 -0
- package/dist/core/p-5d944741.entry.js.map +1 -0
- package/dist/core/p-5ee41fb7.entry.js +2 -0
- package/dist/core/p-5ee41fb7.entry.js.map +1 -0
- package/dist/core/{p-c3785d57.entry.js → p-5f9a9490.entry.js} +2 -2
- package/dist/core/{p-2cb55e86.entry.js → p-62a3ddd1.entry.js} +2 -2
- package/dist/core/{p-df56bc50.entry.js → p-6ab9a62b.entry.js} +2 -2
- package/dist/core/{p-9206379d.entry.js → p-702166d2.entry.js} +2 -2
- package/dist/core/{p-27de359f.entry.js → p-79e9381d.entry.js} +2 -2
- package/dist/core/p-79fef925.js +3 -0
- package/dist/core/p-79fef925.js.map +1 -0
- package/dist/core/p-7acf9ff5.entry.js +2 -0
- package/dist/core/p-7acf9ff5.entry.js.map +1 -0
- package/dist/core/{p-5fa5ba50.entry.js → p-7b1869e9.entry.js} +2 -2
- package/dist/core/{p-9ee2fe04.entry.js → p-7e243134.entry.js} +2 -2
- package/dist/core/{p-111b3186.entry.js → p-8db464d3.entry.js} +2 -2
- package/dist/core/{p-55eb89cc.entry.js → p-8faa9411.entry.js} +2 -2
- package/dist/core/p-8faa9411.entry.js.map +1 -0
- package/dist/core/{p-8870d5d8.entry.js → p-8fbcf586.entry.js} +2 -2
- package/dist/core/{p-bfee1e84.entry.js → p-9b3be8b9.entry.js} +2 -2
- package/dist/core/{p-5b7d8ee9.entry.js → p-9f6cfe53.entry.js} +2 -2
- package/dist/core/{p-98f906ba.entry.js → p-a3607521.entry.js} +2 -2
- package/dist/core/{p-59fc58e1.entry.js → p-a509a2ac.entry.js} +2 -2
- package/dist/core/p-b34dffde.entry.js +2 -0
- package/dist/core/p-b34dffde.entry.js.map +1 -0
- package/dist/core/{p-1d6638c8.entry.js → p-b504da19.entry.js} +2 -2
- package/dist/core/p-b504da19.entry.js.map +1 -0
- package/dist/core/{p-a56ec6d8.entry.js → p-b8b0146c.entry.js} +2 -2
- package/dist/core/{p-f486d4f4.entry.js → p-b8d90c6d.entry.js} +2 -2
- package/dist/core/p-b9827aa1.entry.js +2 -0
- package/dist/core/p-b9827aa1.entry.js.map +1 -0
- package/dist/core/{p-180ea8ac.entry.js → p-c23d8e7f.entry.js} +2 -2
- package/dist/core/{p-ce0fb53a.entry.js → p-c7321a55.entry.js} +2 -2
- package/dist/core/{p-94748b96.entry.js → p-cb0b0d39.entry.js} +2 -2
- package/dist/core/{p-bd802c2f.entry.js → p-cccf78f3.entry.js} +2 -2
- package/dist/core/{p-144a31ec.entry.js → p-d15aa9a1.entry.js} +2 -2
- package/dist/core/{p-90de3f5d.entry.js → p-d5054edb.entry.js} +2 -2
- package/dist/core/p-d5054edb.entry.js.map +1 -0
- package/dist/core/{p-269f841d.js → p-db4c581c.js} +2 -2
- package/dist/core/p-e3314b15.entry.js +2 -0
- package/dist/core/p-e3314b15.entry.js.map +1 -0
- package/dist/core/{p-47b46637.entry.js → p-e4f34246.entry.js} +2 -2
- package/dist/core/{p-30a262d2.entry.js → p-e54842c7.entry.js} +2 -2
- package/dist/core/p-e54842c7.entry.js.map +1 -0
- package/dist/core/{p-40bc1f3e.entry.js → p-e758962b.entry.js} +2 -2
- package/dist/core/p-e758962b.entry.js.map +1 -0
- package/dist/core/p-e97d282e.entry.js +2 -0
- package/dist/core/p-e97d282e.entry.js.map +1 -0
- package/dist/core/p-ecf68c88.entry.js +2 -0
- package/dist/core/p-ecf68c88.entry.js.map +1 -0
- package/dist/core/{p-999102ee.entry.js → p-f27ae8e6.entry.js} +2 -2
- package/dist/core/{p-78c51cba.entry.js → p-f482f6d9.entry.js} +2 -2
- package/dist/core/{p-4a5ab31e.entry.js → p-f6e19998.entry.js} +2 -2
- package/dist/core/p-f6e19998.entry.js.map +1 -0
- package/dist/core/{p-e30c6d79.entry.js → p-ff6f7f3e.entry.js} +2 -2
- package/dist/core/p-ff6f7f3e.entry.js.map +1 -0
- package/dist/esm/app-globals-85eb2251.js +52 -0
- package/dist/esm/app-globals-85eb2251.js.map +1 -0
- package/dist/esm/core.js +4 -4
- package/dist/esm/{helpers-de6293bf.js → helpers-0bd0d9f3.js} +2 -2
- package/dist/esm/{helpers-de6293bf.js.map → helpers-0bd0d9f3.js.map} +1 -1
- package/dist/esm/ic-accordion-group.entry.js +2 -2
- package/dist/esm/ic-accordion.entry.js +2 -2
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-back-to-top.entry.js +2 -2
- package/dist/esm/ic-badge.entry.js +3 -3
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +2 -2
- package/dist/esm/ic-breadcrumb.entry.js +2 -2
- package/dist/esm/ic-button_3.entry.js +61 -3
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +3 -3
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +7 -7
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +3 -3
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +3 -3
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +3 -3
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js +38 -47
- 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 +2 -2
- package/dist/esm/ic-footer-link-group.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-footer.entry.js +2 -2
- package/dist/esm/ic-hero.entry.js +2 -2
- package/dist/esm/ic-horizontal-scroll.entry.js +2 -2
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +3 -3
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +2 -2
- package/dist/esm/ic-link.entry.js +2 -2
- package/dist/esm/ic-menu-group.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js +3 -3
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +2 -2
- package/dist/esm/ic-navigation-group.entry.js +23 -17
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +2 -2
- package/dist/esm/ic-navigation-menu.entry.js +38 -24
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +12 -11
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination-item.entry.js +4 -4
- package/dist/esm/ic-pagination-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination.entry.js +7 -7
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +7 -6
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +7 -7
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +2 -2
- package/dist/esm/ic-search-bar.entry.js +3 -3
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +3 -3
- package/dist/esm/ic-select.entry.js +15 -12
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +10 -7
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +3 -3
- package/dist/esm/ic-skip-link.entry.js +11 -10
- package/dist/esm/ic-skip-link.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +5 -5
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +17 -16
- package/dist/esm/ic-step.entry.js.map +1 -1
- 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 +2 -2
- package/dist/esm/ic-tab-group.entry.js +4 -4
- package/dist/esm/ic-tab-panel.entry.js +3 -3
- package/dist/esm/ic-tab.entry.js +3 -3
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +33 -15
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +3 -3
- package/dist/esm/ic-toast-region.entry.js +2 -2
- package/dist/esm/ic-toast.entry.js +6 -6
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +4 -4
- package/dist/esm/ic-toggle-button.entry.js +5 -5
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +5 -9
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/{index-a7a720e7.js → index-0eefab7d.js} +3 -2
- package/dist/esm/index-0eefab7d.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/types/components/ic-button/ic-button.d.ts +1 -0
- package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -1
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +4 -4
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +9 -4
- package/dist/types/components/ic-navigation-group/ic-navigation-group.types.d.ts +3 -0
- package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +2 -0
- package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +1 -1
- package/dist/types/components/ic-skip-link/ic-skip-link.d.ts +4 -4
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +17 -1
- package/dist/types/components.d.ts +59 -26
- package/hydrate/index.js +358 -211
- package/hydrate/index.mjs +358 -211
- package/package.json +2 -2
- package/vscode-data.json +28 -12
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/index-d337cd8a.js.map +0 -1
- package/dist/core/p-052d1ff0.entry.js +0 -2
- package/dist/core/p-052d1ff0.entry.js.map +0 -1
- package/dist/core/p-08fbea60.entry.js +0 -2
- package/dist/core/p-08fbea60.entry.js.map +0 -1
- package/dist/core/p-0b757d78.entry.js +0 -2
- package/dist/core/p-0b757d78.entry.js.map +0 -1
- package/dist/core/p-196e3d33.entry.js.map +0 -1
- package/dist/core/p-1d6638c8.entry.js.map +0 -1
- package/dist/core/p-1d9a929b.entry.js +0 -2
- package/dist/core/p-1d9a929b.entry.js.map +0 -1
- package/dist/core/p-30a262d2.entry.js.map +0 -1
- package/dist/core/p-40bc1f3e.entry.js.map +0 -1
- package/dist/core/p-4a5ab31e.entry.js.map +0 -1
- package/dist/core/p-55eb89cc.entry.js.map +0 -1
- package/dist/core/p-59287779.entry.js +0 -2
- package/dist/core/p-59287779.entry.js.map +0 -1
- package/dist/core/p-6c8e72b4.entry.js +0 -2
- package/dist/core/p-6c8e72b4.entry.js.map +0 -1
- package/dist/core/p-6fdb8a79.entry.js +0 -2
- package/dist/core/p-6fdb8a79.entry.js.map +0 -1
- package/dist/core/p-76bdbc98.entry.js +0 -2
- package/dist/core/p-76bdbc98.entry.js.map +0 -1
- package/dist/core/p-7ea79205.entry.js +0 -2
- package/dist/core/p-7ea79205.entry.js.map +0 -1
- package/dist/core/p-8577de91.entry.js +0 -2
- package/dist/core/p-8577de91.entry.js.map +0 -1
- package/dist/core/p-8b928cc9.entry.js +0 -2
- package/dist/core/p-8b928cc9.entry.js.map +0 -1
- package/dist/core/p-8d1bee7a.entry.js +0 -2
- package/dist/core/p-8d1bee7a.entry.js.map +0 -1
- package/dist/core/p-8e4e97b4.js +0 -3
- package/dist/core/p-8e4e97b4.js.map +0 -1
- package/dist/core/p-8f319e1e.entry.js +0 -2
- package/dist/core/p-8f319e1e.entry.js.map +0 -1
- package/dist/core/p-90de3f5d.entry.js.map +0 -1
- package/dist/core/p-912c8594.entry.js +0 -2
- package/dist/core/p-912c8594.entry.js.map +0 -1
- package/dist/core/p-9b741f96.entry.js +0 -2
- package/dist/core/p-9b741f96.entry.js.map +0 -1
- package/dist/core/p-9bcd2c77.entry.js +0 -2
- package/dist/core/p-9bcd2c77.entry.js.map +0 -1
- package/dist/core/p-abf767e3.entry.js +0 -2
- package/dist/core/p-abf767e3.entry.js.map +0 -1
- package/dist/core/p-b594bf26.entry.js +0 -2
- package/dist/core/p-b594bf26.entry.js.map +0 -1
- package/dist/core/p-caa46d81.entry.js +0 -2
- package/dist/core/p-caa46d81.entry.js.map +0 -1
- package/dist/core/p-de7542fa.entry.js.map +0 -1
- package/dist/core/p-e1255160.js +0 -2
- package/dist/core/p-e1255160.js.map +0 -1
- package/dist/core/p-e30c6d79.entry.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/index-a7a720e7.js.map +0 -1
- /package/dist/core/{p-0f34465d.entry.js.map → p-115a684f.entry.js.map} +0 -0
- /package/dist/core/{p-4e4014cd.entry.js.map → p-2180f2d1.entry.js.map} +0 -0
- /package/dist/core/{p-8856dff4.entry.js.map → p-22eed13e.entry.js.map} +0 -0
- /package/dist/core/{p-fbce5f9a.entry.js.map → p-2f30c66a.entry.js.map} +0 -0
- /package/dist/core/{p-c19cdc86.entry.js.map → p-44594b52.entry.js.map} +0 -0
- /package/dist/core/{p-72140621.entry.js.map → p-4681ab85.entry.js.map} +0 -0
- /package/dist/core/{p-78c3ca49.entry.js.map → p-51aa5330.entry.js.map} +0 -0
- /package/dist/core/{p-1fccec19.entry.js.map → p-56eb4f02.entry.js.map} +0 -0
- /package/dist/core/{p-c3785d57.entry.js.map → p-5f9a9490.entry.js.map} +0 -0
- /package/dist/core/{p-2cb55e86.entry.js.map → p-62a3ddd1.entry.js.map} +0 -0
- /package/dist/core/{p-df56bc50.entry.js.map → p-6ab9a62b.entry.js.map} +0 -0
- /package/dist/core/{p-9206379d.entry.js.map → p-702166d2.entry.js.map} +0 -0
- /package/dist/core/{p-27de359f.entry.js.map → p-79e9381d.entry.js.map} +0 -0
- /package/dist/core/{p-5fa5ba50.entry.js.map → p-7b1869e9.entry.js.map} +0 -0
- /package/dist/core/{p-9ee2fe04.entry.js.map → p-7e243134.entry.js.map} +0 -0
- /package/dist/core/{p-111b3186.entry.js.map → p-8db464d3.entry.js.map} +0 -0
- /package/dist/core/{p-8870d5d8.entry.js.map → p-8fbcf586.entry.js.map} +0 -0
- /package/dist/core/{p-bfee1e84.entry.js.map → p-9b3be8b9.entry.js.map} +0 -0
- /package/dist/core/{p-5b7d8ee9.entry.js.map → p-9f6cfe53.entry.js.map} +0 -0
- /package/dist/core/{p-98f906ba.entry.js.map → p-a3607521.entry.js.map} +0 -0
- /package/dist/core/{p-59fc58e1.entry.js.map → p-a509a2ac.entry.js.map} +0 -0
- /package/dist/core/{p-a56ec6d8.entry.js.map → p-b8b0146c.entry.js.map} +0 -0
- /package/dist/core/{p-f486d4f4.entry.js.map → p-b8d90c6d.entry.js.map} +0 -0
- /package/dist/core/{p-180ea8ac.entry.js.map → p-c23d8e7f.entry.js.map} +0 -0
- /package/dist/core/{p-ce0fb53a.entry.js.map → p-c7321a55.entry.js.map} +0 -0
- /package/dist/core/{p-94748b96.entry.js.map → p-cb0b0d39.entry.js.map} +0 -0
- /package/dist/core/{p-bd802c2f.entry.js.map → p-cccf78f3.entry.js.map} +0 -0
- /package/dist/core/{p-144a31ec.entry.js.map → p-d15aa9a1.entry.js.map} +0 -0
- /package/dist/core/{p-269f841d.js.map → p-db4c581c.js.map} +0 -0
- /package/dist/core/{p-47b46637.entry.js.map → p-e4f34246.entry.js.map} +0 -0
- /package/dist/core/{p-999102ee.entry.js.map → p-f27ae8e6.entry.js.map} +0 -0
- /package/dist/core/{p-78c51cba.entry.js.map → p-f482f6d9.entry.js.map} +0 -0
@@ -626,13 +626,17 @@ slot[name="toggle-icon"] svg {
|
|
626
626
|
|
627
627
|
.menu-button-container .navigation-landmark-button-text {
|
628
628
|
position: absolute;
|
629
|
-
left: -
|
629
|
+
left: -9999px;
|
630
630
|
top: auto;
|
631
631
|
width: 1px;
|
632
632
|
height: 1px;
|
633
633
|
overflow: hidden;
|
634
634
|
}
|
635
635
|
|
636
|
+
.menu-button-container .navigation-landmark-button-text:dir(rtl) {
|
637
|
+
right: -9999px;
|
638
|
+
}
|
639
|
+
|
636
640
|
.search-actions-container {
|
637
641
|
display: flex;
|
638
642
|
}
|
@@ -210,13 +210,9 @@ export class TopNavigation {
|
|
210
210
|
[`ic-theme-${theme}`]: theme !== "inherit",
|
211
211
|
} }, h("div", { key: '3447c99cc05b7203ea80d0651f1ac066122697e1', class: "top-navigation" }, h("ic-section-container", { key: '563a2b3fc3c7d456fee7261c2d5645948301e953', aligned: contentAligned, "full-height": true }, h("header", { key: '61d58c8a68ff59cfa1b5cf75daef6c62b2b4692a', role: "banner" }, h("div", { key: '17108bd26152301bf07afe95a061debb23184e8b', class: "top-panel-container" }, h("div", { key: '86fe01bd6227bc0a1e1633cab7d6cff654e2a808', class: "app-details-container" }, (hasTitle || hasAppTitleSlot) && (h(Component, Object.assign({ key: 'c6f2a1ed6ce7b7813f12352401c89852d6646327', class: "title-link" }, attrs), hasAppIcon && (h("div", { key: 'c5a2e2961b16b5f5dc6e918ba6f758e7bce09cd7', class: "app-icon-container" }, h("slot", { key: '9b6d5636aa1f474bac2add8948bcd598f3d5c231', name: "app-icon" }))), deviceSize <= DEVICE_SIZES.S &&
|
212
212
|
(!isEmptyString(shortAppTitle) || shortAppTitleSlot) ? (h("ic-typography", { variant: "subtitle-small", "aria-label": (!hasAppTitleSlot || !shortAppTitleSlot) &&
|
213
|
-
`${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: 'f4365e21d3de5cc7c0f7c6f62a64c3fa0a7415bb', class: "app-status" }, h("ic-typography", { key: '9d03f72e0533c1d721142cba78ba216c9abf61c5', "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, status))), hasVersion && (h("div", { key: '318b6cf7cd4359429a6d698d40e3b99f46ac67e0', class: "app-version" }, h("ic-typography", { key: '67cc4163765fb967729ba4fa03e857c1b0cc96e3', variant: "label", class: "app-version-text", "aria-label": "app version" }, version)))), (hasSearchSlotContent || hasMenuContent) && (h("div", { key: '0f8ce1b2c3a0cf3f3bbbe2d0285324935e5b1676', class: "search-menu-container" }, h("div", { key: 'a4033e992457aa434c705d0e35d24c9efb291195', class: "search-actions-container" }, !overMobileBreakpoint && h("slot", { key: 'd9347964c2972b338c4e09833ab94f820d8b49c8', name: "search" }), hasSearchSlotContent && overMobileBreakpoint && (h("ic-button", { key: '
|
214
|
-
? IcBrandForegroundEnum.Dark
|
215
|
-
: IcBrandForegroundEnum.Light, onClick: searchButtonClickHandler }, h("slot", { key: 'c16f8b29d593012ed8dd2b4b445d31dd82d480ba', name: "toggle-icon" }, h("svg", { key: '15d23b9c31988779b6de7b70bd25034eba481ba0', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#ffffff" }, h("path", { key: '6ea762e76e64bda987fc499de9b3824bd8ac51e4', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: 'f3d1542e3882a2181b2878a3f8efffefa25364da', 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" }))))), hasIconButtons && !overMobileBreakpoint && (h("div", { key: '1f7983df6dec97f32f424bcedc8a7f535dcb32f1', class: "icon-buttons-container" }, h("slot", { key: '6f4003a0878f3a117f8912cdb6c7c933da3a301c', name: "buttons" }))), hasMenuContent && overMobileBreakpoint && (h("div", { key: 'e1297f88b99a24cf167cb0b7b0a4e2e8a8af7fc5', class: "menu-button-container" }, h("span", { key: '2c3d59c6da504e06992c8ac9e28df5b9b1bfa9bd', id: "navigation-landmark-button-text", class: "navigation-landmark-button-text", "aria-hidden": "true" }, "Main navigation button"), h("nav", { key: 'd5b8883f1d10f224d59abf78a0f34d3a61270005', "aria-labelledby": "navigation-landmark-button-text", "aria-hidden": `${navMenuVisible}` }, h("ic-button", { key: '9ad9fb74ad3a9b0eeec6092e99c2ef8391aa9b11', id: "menu-button", theme: foregroundColor == IcBrandForegroundEnum.Light
|
216
|
-
? IcBrandForegroundEnum.Dark
|
217
|
-
: IcBrandForegroundEnum.Light, variant: "secondary", monochrome: true, "aria-expanded": "false", "aria-haspopup": "true", "aria-label": `Open ${hasNavigation ? "navigation" : "app"} menu`, size: menuSize, onClick: menuButtonClick }, "Menu", h("svg", { key: 'ded3f2e5f78a55707eede6d016e98e844af16eb1', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#ffffff", slot: "left-icon" }, h("path", { key: 'b4fddeaafdf0461389ec523374090dfd7b73dac3', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: 'd82f4575eccb93cd129ff89b926197fc916fa6c4', d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })))))))))), mobileSearchBarVisible && (h("div", { key: 'b0501b50966797481c17928a8c74b51067ce0704', class: "search-bar-container" }, h("slot", { key: '3efa664363b652768dac4edd539b9a12d7ce380d', name: "search" }))), hasNavigation && !overMobileBreakpoint && (h("div", { key: '2910033612e40f130aecbd481227b6b35696f8fa', class: "navigation-tabs" }, h("span", { key: '5985db842168ce13f23474ef2f6a12be41b2c3a4', id: "navigation-landmark-text", class: "navigation-landmark-text", "aria-hidden": "true" }, "Main pages"), h("nav", { key: 'd47d0ee9ebb470f648ac1174281b6b929963dda6', "aria-labelledby": "navigation-landmark-text", class: "nav-panel-container" }, h("ic-horizontal-scroll", { key: 'b7e46ecab3d288786f6bdbbdd5ba4c005a77d0a5', monochrome: true, appearance: foregroundColor }, h("ul", { key: 'b9298804c3faf2d1408814b07a4308ed5996d2fa', class: "navigation-item-list", tabindex: "-1" }, h("slot", { key: '0de95baf787a0590056083079f1a37d10582322a', name: "navigation" }))))))))), navMenuVisible && (h("ic-navigation-menu", { key: '2874e8759b549ad92e1d381fe392a3e06803219e', version: version, status: status, class: {
|
213
|
+
`${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: 'f4365e21d3de5cc7c0f7c6f62a64c3fa0a7415bb', class: "app-status" }, h("ic-typography", { key: '9d03f72e0533c1d721142cba78ba216c9abf61c5', "aria-label": "app tag", variant: "label-uppercase", class: "app-status-text" }, status))), hasVersion && (h("div", { key: '318b6cf7cd4359429a6d698d40e3b99f46ac67e0', class: "app-version" }, h("ic-typography", { key: '67cc4163765fb967729ba4fa03e857c1b0cc96e3', variant: "label", class: "app-version-text", "aria-label": "app version" }, version)))), (hasSearchSlotContent || hasMenuContent) && (h("div", { key: '0f8ce1b2c3a0cf3f3bbbe2d0285324935e5b1676', class: "search-menu-container" }, h("div", { key: 'a4033e992457aa434c705d0e35d24c9efb291195', class: "search-actions-container" }, !overMobileBreakpoint && h("slot", { key: 'd9347964c2972b338c4e09833ab94f820d8b49c8', name: "search" }), hasSearchSlotContent && overMobileBreakpoint && (h("ic-button", { key: 'b980ecf6adf49457b2477865c98aac4e95ea4d8a', 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", { key: '1488d2319238d970a190b867db0ccc85c026a94f', name: "toggle-icon" }, h("svg", { key: '67e8c1448faf4b9a78098bb8809c8d75135e7671', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#ffffff" }, h("path", { key: '2f04deb0ec8098168de56fab593d0e1b9d37639a', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: '797b58f8ad7489b4cd149ae46b32ecce0c9a85cf', 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" }))))), hasIconButtons && !overMobileBreakpoint && (h("div", { key: '173e7158dc1c4667be9442b7f64be140faebb102', class: "icon-buttons-container" }, h("slot", { key: 'afa131f570550779b8c52403c0f8abf90ba68369', name: "buttons" }))), hasMenuContent && overMobileBreakpoint && (h("div", { key: 'ca353958a7b441eeb82ecab62b3f0ba1de625fcc', class: "menu-button-container" }, h("span", { key: 'b13a1b5ba472b65d150a194bd7f2fb846d434b8b', id: "navigation-landmark-button-text", class: "navigation-landmark-button-text", "aria-hidden": "true" }, "Main navigation button"), h("nav", { key: '8c47f744b6aaa53afe14a09f78f8e231d7e5137b', "aria-labelledby": "navigation-landmark-button-text", "aria-hidden": `${navMenuVisible}` }, h("ic-button", { key: '4365bba111555335f4a04fb168d9e4659e0ca788', id: "menu-button", 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", { key: '05366f4016a367fd4ae143e044eb7401f2a23bbb', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#ffffff", slot: "left-icon" }, h("path", { key: '40f079a4c147f2adfb5bbfe1b8bfeef64e444abe', d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { key: '0419ea11aee74c5993643dde955ca7ccbd836ad6', d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })))))))))), mobileSearchBarVisible && (h("div", { key: '160ea58b8338c6b09482bb5808afa93de039c2b4', class: "search-bar-container" }, h("slot", { key: 'a415f0c6a409b4dbea14697c8c63967ee4c05dcc', name: "search" }))), hasNavigation && !overMobileBreakpoint && (h("div", { key: 'db58d987843728204f3c08ffcc730bc9400c5f75', class: "navigation-tabs" }, h("span", { key: 'c27c1d0868d4acf6385e7b39060d42d04b617e28', id: "navigation-landmark-text", class: "navigation-landmark-text", "aria-hidden": "true" }, "Main pages"), h("nav", { key: 'a9d72cda63f8f15b2c5df447a6f544cf9637286a', "aria-labelledby": "navigation-landmark-text", class: "nav-panel-container" }, h("ic-horizontal-scroll", { key: '717a0f8855c98de7c688467b6e08acaf59a50f15', monochrome: true, appearance: foregroundColor }, h("ul", { key: '6e0a057b908929ceca9e5b6113590b7a596fe091', class: "navigation-item-list", tabindex: "-1" }, h("slot", { key: '401932642750d3d4cece6a886a1e6c4316c218c8', name: "navigation" }))))))))), navMenuVisible && (h("ic-navigation-menu", { key: '0816b74f63c67e9d6869cabeb7a45651ca0eb139', version: version, status: status, class: {
|
218
214
|
["inline"]: !!inline,
|
219
|
-
} }, hasIconButtons && (h("div", { key: '
|
215
|
+
} }, hasIconButtons && (h("div", { key: '2bf599f25216d608a72e9e3b8537983419ad6a27', class: "menu-buttons-slot", slot: "buttons" }, h("slot", { key: '3483da6f4815d9f37d25ee021622c00c5a64af79', name: "buttons" }))), h("ul", { key: '92b83221e6e974101b0f1186fcae040a070e248f', slot: "navigation" }, h("slot", { key: 'f3f64918abe306948d0709cfac63abde69a61eae', name: "navigation" }))))));
|
220
216
|
}
|
221
217
|
static get is() { return "ic-top-navigation"; }
|
222
218
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-top-navigation.js","sourceRoot":"","sources":["../../../src/components/ic-top-navigation/ic-top-navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,KAAK,EACL,MAAM,EACN,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIL,qB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ACkB,0BAA0B,EAC1C,KAAK,EAAC,qBAAqB;gCAE3B,6EACE,UAAU,QACV,UAAU,EAAE,eAAe;oCAE3B,2DAAI,KAAK,EAAC,sBAAsB,EAAC,QAAQ,EAAC,IAAI;wCAC5C,6DAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACgB,CACnB,CACF,CACP,CACM,CACY,CACnB;YACL,cAAc,IAAI,CACjB,2EACE,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;oBACL,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM;iBACrB;gBAEA,cAAc,IAAI,CACjB,4DAAK,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,SAAS;oBAC3C,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACP;gBACD,2DAAI,IAAI,EAAC,YAAY;oBACnB,6DAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACc,CACtB,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n IcTypographyVariants,\n IcAlignment,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcBrand,\n IcDeviceSizes,\n IcValueEventDetail,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getBrandForegroundAppearance,\n getSlot,\n onComponentPropUndefinedChange,\n onComponentRequiredPropUndefined,\n isSlotUsed,\n isEmptyString,\n isPropDefined,\n} from \"../../utils/helpers\";\nimport { IcSearchBarBlurEventDetail } from \"../ic-search-bar/ic-search-bar.types\";\n\n/**\n * @slot app-icon - Content will be rendered to left of app title. Anything that is slotted here will be hidden from screen readers.\n * @slot app-title - Handle routing by nesting a route in the app title.\n * @slot short-app-title - Handle routing by nesting a route in the short app title (to be displayed in place of app title on small screen sizes).\n * @slot search - Content will be rendered in search area to left of buttons.\n * @slot toggle-icon - Icon to be displayed on the button to toggle search slot content on smaller devices\n * @slot navigation - Content will be rendered in navigation panel.\n * @slot buttons - Content will be rendered to right of search bar.\n */\n@Component({\n tag: \"ic-top-navigation\",\n styleUrl: \"ic-top-navigation.css\",\n shadow: true,\n})\nexport class TopNavigation {\n private hasAppIcon: boolean = false;\n private hasIconButtons: boolean = false;\n private hasNavigation: boolean = false;\n private hasSearchSlotContent: boolean = false;\n private mobileSearchButtonEl?: HTMLIcButtonElement;\n private resizeObserver: ResizeObserver | null = null;\n private searchBar: HTMLIcSearchBarElement | null = null;\n\n @Element() el: HTMLIcTopNavigationElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() foregroundColor: IcBrandForeground = getBrandForegroundAppearance();\n @State() hasFullWidthSearchBar: boolean = false;\n @State() mobileSearchBarVisible: boolean = false;\n @State() mobileSearchHiddenOnBlur: boolean = false;\n @State() navMenuVisible: boolean = false;\n @State() searchButtonClick: boolean = false;\n @State() searchValue: string = \"\";\n\n /**\n * The alignment of the top navigation content.\n */\n @Prop() contentAligned?: IcAlignment = \"full-width\";\n /**\n * Can set a custom breakpoint for the top navigation to switch to mobile mode.\n * Must be one of our specified breakpoints in px: `0`, `576`, `768`, `992`, `1200`.\n */\n @Prop() customMobileBreakpoint?: IcDeviceSizes = DEVICE_SIZES.L;\n /**\n * The URL to navigate to when the app title is clicked.\n */\n @Prop() href?: string = \"/\";\n\n /**\n * If `true`, the flyout navigation menu on small devices will be contained by the parent element.\n */\n @Prop() inline?: boolean = false;\n\n /**\n * The short title of the app to be displayed at small screen sizes in place of the app title.\n */\n @Prop() shortAppTitle?: string = \"\";\n\n /**\n * The status info to be displayed.\n */\n @Prop() status?: string = \"\";\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The version info to be displayed.\n */\n @Prop() version?: string = \"\";\n\n /**\n * The app title to be displayed. This is required, unless a slotted app title link is used.\n */\n @Prop() appTitle?: string;\n\n @Watch(\"appTitle\")\n watchPropHandler(newValue: string, oldValue: string): void {\n //added for Gatsby rehydration issue where prop is initially undefined but then changes to actual value\n //this watch can be removed once Gatsby hydration issue is resolved\n onComponentPropUndefinedChange(\n oldValue,\n newValue,\n this.initialiseSearchBar\n );\n }\n\n /**\n * @internal - Emitted when the menu is closed.\n */\n @Event() icNavigationMenuClosed: EventEmitter<void>;\n\n /**\n * @internal - Emitted when the menu is opened.\n */\n @Event() icNavigationMenuOpened: EventEmitter<void>;\n\n /**\n * Emitted when the top navigation is resized.\n */\n @Event() icTopNavResized: EventEmitter<{ size: number }>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.checkSlots();\n this.deviceSize = getCurrentDeviceSize();\n this.initialiseSearchBar();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n !isSlotUsed(this.el, \"app-title\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.appTitle, propName: \"app-title\" }],\n \"Top Navigation\"\n );\n }\n\n componentWillRender(): void {\n this.checkSlots();\n }\n\n @Listen(\"icNavigationMenuClose\", {})\n navBarMenuCloseHandler(): void {\n this.showNavMenu(false);\n this.el.shadowRoot?.querySelector<HTMLElement>(\"#menu-button\")?.focus();\n }\n\n @Listen(\"icSearchBarBlur\", {})\n searchInputBlurHandler({\n detail,\n }: CustomEvent<IcSearchBarBlurEventDetail>): void {\n if (detail !== null) {\n if (this.mobileSearchBarVisible && !this.searchButtonClick) {\n //don't hide if blur was triggered by click on search button - let the click handler toggle the state\n this.toggleSearchBar();\n }\n this.searchValue = detail.value as string;\n }\n }\n\n @Listen(\"icChange\", {})\n searchValueChangeHandler({ detail }: CustomEvent<IcValueEventDetail>): void {\n this.searchValue = detail.value as string;\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.foregroundColor = detail.mode;\n }\n\n private checkSlots = () => {\n this.hasAppIcon = isSlotUsed(this.el, \"app-icon\");\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasIconButtons = isSlotUsed(this.el, \"buttons\");\n this.hasSearchSlotContent = isSlotUsed(this.el, \"search\");\n };\n\n private initialiseSearchBar = () => {\n if (this.hasSearchSlotContent) {\n const slot = getSlot(this.el, \"search\");\n if (slot?.tagName === \"IC-SEARCH-BAR\") {\n this.searchBar = slot as HTMLIcSearchBarElement;\n } else if (slot?.tagName === \"FORM\") {\n this.searchBar = slot.querySelector(\"ic-search-bar\");\n }\n\n if (this.searchBar !== null) {\n this.searchBar.hideLabel = true;\n }\n }\n };\n\n private toggleSearchBar(): void {\n this.mobileSearchBarVisible = !this.mobileSearchBarVisible;\n\n if (this.searchBar !== null) {\n this.mobileSearchButtonEl?.setAttribute(\n \"aria-label\",\n `${this.mobileSearchBarVisible ? \"Hide\" : \"Show\"} search`\n );\n this.hasFullWidthSearchBar = this.mobileSearchBarVisible;\n this.searchBar.fullWidth = this.mobileSearchBarVisible;\n if (this.mobileSearchBarVisible) {\n setTimeout(() => {\n this.searchBar?.focus();\n }, 100);\n }\n }\n }\n\n private menuButtonClick = () => {\n this.showNavMenu(true);\n };\n\n private showNavMenu(show: boolean): void {\n this.navMenuVisible = show;\n (show ? this.icNavigationMenuOpened : this.icNavigationMenuClosed).emit();\n document.body.style.height = show ? \"100%\" : \"auto\";\n document.body.style.overflow = show ? \"hidden\" : \"auto\";\n }\n\n private searchButtonMouseDownHandler = () => {\n this.searchButtonClick = true;\n };\n\n private searchButtonClickHandler = () => {\n this.toggleSearchBar();\n this.searchButtonClick = false;\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n if (currSize > this.customMobileBreakpoint!) {\n this.showNavMenu(false);\n if (this.mobileSearchBarVisible) {\n this.toggleSearchBar();\n }\n }\n this.icTopNavResized.emit({\n size: currSize,\n });\n if (this.searchBar && document.activeElement === this.searchBar) {\n this.searchBar.setAttribute(\"hidden\", \"true\");\n //remove attribute again as this trigger a redraw & applies css\n this.searchBar.removeAttribute(\"hidden\");\n setTimeout(() => {\n this.searchBar?.focus();\n }, 100);\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback(getCurrentDeviceSize());\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n const {\n appTitle,\n contentAligned,\n customMobileBreakpoint,\n deviceSize,\n el,\n foregroundColor,\n hasAppIcon,\n hasFullWidthSearchBar,\n hasIconButtons,\n hasNavigation,\n hasSearchSlotContent,\n href,\n inline,\n menuButtonClick,\n mobileSearchBarVisible,\n navMenuVisible,\n searchButtonClickHandler,\n searchButtonMouseDownHandler,\n shortAppTitle,\n status,\n version,\n theme,\n } = this;\n\n const hasStatus = status !== \"\";\n const hasVersion = version !== \"\";\n const hasMenuContent =\n hasNavigation || hasIconButtons || hasStatus || hasVersion;\n\n const searchButtonSize = deviceSize <= DEVICE_SIZES.S ? \"medium\" : \"large\";\n const hasTitle = appTitle !== \"\" && isPropDefined(appTitle);\n const overMobileBreakpoint = deviceSize <= customMobileBreakpoint!;\n\n const appTitleVariant: IcTypographyVariants = overMobileBreakpoint\n ? deviceSize <= DEVICE_SIZES.S\n ? \"subtitle-small\"\n : \"h4\"\n : \"h3\";\n\n const mobileSearchButtonTitle = `${\n mobileSearchBarVisible ? \"Hide\" : \"Show\"\n } search`;\n const menuSize = deviceSize <= DEVICE_SIZES.S ? \"small\" : \"medium\";\n\n const shortAppTitleSlot = isSlotUsed(el, \"short-app-title\");\n const hasAppTitleSlot = isSlotUsed(el, \"app-title\");\n const Component = hasAppTitleSlot ? \"div\" : \"a\";\n const attrs = Component == \"a\" && {\n href: href,\n };\n\n return (\n <Host\n class={{\n \"fullwidth-searchbar\": hasFullWidthSearchBar,\n \"mobile-mode\": overMobileBreakpoint,\n [IcBrandForegroundEnum.Dark]:\n foregroundColor === IcBrandForegroundEnum.Dark,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div class=\"top-navigation\">\n <ic-section-container aligned={contentAligned} full-height>\n <header role=\"banner\">\n <div class=\"top-panel-container\">\n <div class=\"app-details-container\">\n {(hasTitle || hasAppTitleSlot) && (\n <Component class=\"title-link\" {...attrs}>\n {hasAppIcon && (\n <div class=\"app-icon-container\">\n <slot name=\"app-icon\" />\n </div>\n )}\n {deviceSize <= DEVICE_SIZES.S &&\n (!isEmptyString(shortAppTitle!) || shortAppTitleSlot) ? (\n <ic-typography\n variant=\"subtitle-small\"\n aria-label={\n (!hasAppTitleSlot || !shortAppTitleSlot) &&\n `${appTitle} (${shortAppTitle})`\n }\n >\n <h1>\n {shortAppTitleSlot ? (\n <slot name=\"short-app-title\"></slot>\n ) : (\n shortAppTitle\n )}\n </h1>\n </ic-typography>\n ) : (\n <ic-typography variant={appTitleVariant}>\n <h1 class=\"title-wrap\">\n {hasAppTitleSlot ? (\n <slot name=\"app-title\"></slot>\n ) : (\n appTitle\n )}\n </h1>\n </ic-typography>\n )}\n </Component>\n )}\n {hasStatus && (\n <div class=\"app-status\">\n <ic-typography\n aria-label=\"app tag\"\n variant=\"label-uppercase\"\n class=\"app-status-text\"\n >\n {status}\n </ic-typography>\n </div>\n )}\n {hasVersion && (\n <div class=\"app-version\">\n <ic-typography\n variant=\"label\"\n class=\"app-version-text\"\n aria-label=\"app version\"\n >\n {version}\n </ic-typography>\n </div>\n )}\n </div>\n\n {(hasSearchSlotContent || hasMenuContent) && (\n <div class=\"search-menu-container\">\n <div class=\"search-actions-container\">\n {!overMobileBreakpoint && <slot name=\"search\"></slot>}\n\n {hasSearchSlotContent && overMobileBreakpoint && (\n <ic-button\n id=\"search-toggle-button\"\n ref={(el) => (this.mobileSearchButtonEl = el)}\n onMouseDown={searchButtonMouseDownHandler}\n variant=\"icon-tertiary\"\n monochrome\n size={searchButtonSize}\n aria-label={mobileSearchButtonTitle}\n theme={\n foregroundColor == IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light\n }\n onClick={searchButtonClickHandler}\n >\n <slot name=\"toggle-icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"#ffffff\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <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\" />\n </svg>\n </slot>\n </ic-button>\n )}\n\n {hasIconButtons && !overMobileBreakpoint && (\n <div class=\"icon-buttons-container\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n {hasMenuContent && overMobileBreakpoint && (\n <div class=\"menu-button-container\">\n <span\n id=\"navigation-landmark-button-text\"\n class=\"navigation-landmark-button-text\"\n aria-hidden=\"true\"\n >\n Main navigation button\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-button-text\"\n aria-hidden={`${navMenuVisible}`}\n >\n <ic-button\n id=\"menu-button\"\n theme={\n foregroundColor == IcBrandForegroundEnum.Light\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light\n }\n variant=\"secondary\"\n monochrome\n aria-expanded=\"false\"\n aria-haspopup=\"true\"\n aria-label={`Open ${\n hasNavigation ? \"navigation\" : \"app\"\n } menu`}\n size={menuSize}\n onClick={menuButtonClick}\n >\n Menu\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#ffffff\"\n slot=\"left-icon\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\" />\n </svg>\n </ic-button>\n </nav>\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n\n {mobileSearchBarVisible && (\n <div class=\"search-bar-container\">\n <slot name=\"search\"></slot>\n </div>\n )}\n\n {hasNavigation && !overMobileBreakpoint && (\n <div class=\"navigation-tabs\">\n <span\n id=\"navigation-landmark-text\"\n class=\"navigation-landmark-text\"\n aria-hidden=\"true\"\n >\n Main pages\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-text\"\n class=\"nav-panel-container\"\n >\n <ic-horizontal-scroll\n monochrome\n appearance={foregroundColor}\n >\n <ul class=\"navigation-item-list\" tabindex=\"-1\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-horizontal-scroll>\n </nav>\n </div>\n )}\n </header>\n </ic-section-container>\n </div>\n {navMenuVisible && (\n <ic-navigation-menu\n version={version}\n status={status}\n class={{\n [\"inline\"]: !!inline,\n }}\n >\n {hasIconButtons && (\n <div class=\"menu-buttons-slot\" slot=\"buttons\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n <ul slot=\"navigation\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-navigation-menu>\n )}\n </Host>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ic-top-navigation.js","sourceRoot":"","sources":["../../../src/components/ic-top-navigation/ic-top-navigation.tsx"],"names":[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,6EACE,UAAU,QACV,UAAU,EAAE,eAAe;oCAE3B,2DAAI,KAAK,EAAC,sBAAsB,EAAC,QAAQ,EAAC,IAAI;wCAC5C,6DAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACgB,CACnB,CACF,CACP,CACM,CACY,CACnB;YACL,cAAc,IAAI,CACjB,2EACE,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;oBACL,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM;iBACrB;gBAEA,cAAc,IAAI,CACjB,4DAAK,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,SAAS;oBAC3C,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACP;gBACD,2DAAI,IAAI,EAAC,YAAY;oBACnB,6DAAM,IAAI,EAAC,YAAY,GAAQ,CAC5B,CACc,CACtB,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Host,\n Prop,\n h,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n IcTypographyVariants,\n IcAlignment,\n IcBrandForeground,\n IcBrandForegroundEnum,\n IcBrand,\n IcDeviceSizes,\n IcValueEventDetail,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getBrandForegroundAppearance,\n getSlot,\n onComponentPropUndefinedChange,\n onComponentRequiredPropUndefined,\n isSlotUsed,\n isEmptyString,\n isPropDefined,\n} from \"../../utils/helpers\";\nimport { IcSearchBarBlurEventDetail } from \"../ic-search-bar/ic-search-bar.types\";\n\n/**\n * @slot app-icon - Content will be rendered to left of app title. Anything that is slotted here will be hidden from screen readers.\n * @slot app-title - Handle routing by nesting a route in the app title.\n * @slot short-app-title - Handle routing by nesting a route in the short app title (to be displayed in place of app title on small screen sizes).\n * @slot search - Content will be rendered in search area to left of buttons.\n * @slot toggle-icon - Icon to be displayed on the button to toggle search slot content on smaller devices\n * @slot navigation - Content will be rendered in navigation panel.\n * @slot buttons - Content will be rendered to right of search bar.\n */\n@Component({\n tag: \"ic-top-navigation\",\n styleUrl: \"ic-top-navigation.css\",\n shadow: true,\n})\nexport class TopNavigation {\n private hasAppIcon: boolean = false;\n private hasIconButtons: boolean = false;\n private hasNavigation: boolean = false;\n private hasSearchSlotContent: boolean = false;\n private mobileSearchButtonEl?: HTMLIcButtonElement;\n private resizeObserver: ResizeObserver | null = null;\n private searchBar: HTMLIcSearchBarElement | null = null;\n\n @Element() el: HTMLIcTopNavigationElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n @State() foregroundColor: IcBrandForeground = getBrandForegroundAppearance();\n @State() hasFullWidthSearchBar: boolean = false;\n @State() mobileSearchBarVisible: boolean = false;\n @State() mobileSearchHiddenOnBlur: boolean = false;\n @State() navMenuVisible: boolean = false;\n @State() searchButtonClick: boolean = false;\n @State() searchValue: string = \"\";\n\n /**\n * The alignment of the top navigation content.\n */\n @Prop() contentAligned?: IcAlignment = \"full-width\";\n /**\n * Can set a custom breakpoint for the top navigation to switch to mobile mode.\n * Must be one of our specified breakpoints in px: `0`, `576`, `768`, `992`, `1200`.\n */\n @Prop() customMobileBreakpoint?: IcDeviceSizes = DEVICE_SIZES.L;\n /**\n * The URL to navigate to when the app title is clicked.\n */\n @Prop() href?: string = \"/\";\n\n /**\n * If `true`, the flyout navigation menu on small devices will be contained by the parent element.\n */\n @Prop() inline?: boolean = false;\n\n /**\n * The short title of the app to be displayed at small screen sizes in place of the app title.\n */\n @Prop() shortAppTitle?: string = \"\";\n\n /**\n * The status info to be displayed.\n */\n @Prop() status?: string = \"\";\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The version info to be displayed.\n */\n @Prop() version?: string = \"\";\n\n /**\n * The app title to be displayed. This is required, unless a slotted app title link is used.\n */\n @Prop() appTitle?: string;\n\n @Watch(\"appTitle\")\n watchPropHandler(newValue: string, oldValue: string): void {\n //added for Gatsby rehydration issue where prop is initially undefined but then changes to actual value\n //this watch can be removed once Gatsby hydration issue is resolved\n onComponentPropUndefinedChange(\n oldValue,\n newValue,\n this.initialiseSearchBar\n );\n }\n\n /**\n * @internal - Emitted when the menu is closed.\n */\n @Event() icNavigationMenuClosed: EventEmitter<void>;\n\n /**\n * @internal - Emitted when the menu is opened.\n */\n @Event() icNavigationMenuOpened: EventEmitter<void>;\n\n /**\n * Emitted when the top navigation is resized.\n */\n @Event() icTopNavResized: EventEmitter<{ size: number }>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.checkSlots();\n this.deviceSize = getCurrentDeviceSize();\n this.initialiseSearchBar();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n !isSlotUsed(this.el, \"app-title\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.appTitle, propName: \"app-title\" }],\n \"Top Navigation\"\n );\n }\n\n componentWillRender(): void {\n this.checkSlots();\n }\n\n @Listen(\"icNavigationMenuClose\", {})\n navBarMenuCloseHandler(): void {\n this.showNavMenu(false);\n this.el.shadowRoot?.querySelector<HTMLElement>(\"#menu-button\")?.focus();\n }\n\n @Listen(\"icSearchBarBlur\", {})\n searchInputBlurHandler({\n detail,\n }: CustomEvent<IcSearchBarBlurEventDetail>): void {\n if (detail !== null) {\n if (this.mobileSearchBarVisible && !this.searchButtonClick) {\n //don't hide if blur was triggered by click on search button - let the click handler toggle the state\n this.toggleSearchBar();\n }\n this.searchValue = detail.value as string;\n }\n }\n\n @Listen(\"icChange\", {})\n searchValueChangeHandler({ detail }: CustomEvent<IcValueEventDetail>): void {\n this.searchValue = detail.value as string;\n }\n\n @Listen(\"brandChange\", { target: \"document\" })\n brandChangeHandler({ detail }: CustomEvent<IcBrand>): void {\n this.foregroundColor = detail.mode;\n }\n\n private checkSlots = () => {\n this.hasAppIcon = isSlotUsed(this.el, \"app-icon\");\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasIconButtons = isSlotUsed(this.el, \"buttons\");\n this.hasSearchSlotContent = isSlotUsed(this.el, \"search\");\n };\n\n private initialiseSearchBar = () => {\n if (this.hasSearchSlotContent) {\n const slot = getSlot(this.el, \"search\");\n if (slot?.tagName === \"IC-SEARCH-BAR\") {\n this.searchBar = slot as HTMLIcSearchBarElement;\n } else if (slot?.tagName === \"FORM\") {\n this.searchBar = slot.querySelector(\"ic-search-bar\");\n }\n\n if (this.searchBar !== null) {\n this.searchBar.hideLabel = true;\n }\n }\n };\n\n private toggleSearchBar(): void {\n this.mobileSearchBarVisible = !this.mobileSearchBarVisible;\n\n if (this.searchBar !== null) {\n this.mobileSearchButtonEl?.setAttribute(\n \"aria-label\",\n `${this.mobileSearchBarVisible ? \"Hide\" : \"Show\"} search`\n );\n this.hasFullWidthSearchBar = this.mobileSearchBarVisible;\n this.searchBar.fullWidth = this.mobileSearchBarVisible;\n if (this.mobileSearchBarVisible) {\n setTimeout(() => {\n this.searchBar?.focus();\n }, 100);\n }\n }\n }\n\n private menuButtonClick = () => {\n this.showNavMenu(true);\n };\n\n private showNavMenu(show: boolean): void {\n this.navMenuVisible = show;\n (show ? this.icNavigationMenuOpened : this.icNavigationMenuClosed).emit();\n document.body.style.height = show ? \"100%\" : \"auto\";\n document.body.style.overflow = show ? \"hidden\" : \"auto\";\n }\n\n private searchButtonMouseDownHandler = () => {\n this.searchButtonClick = true;\n };\n\n private searchButtonClickHandler = () => {\n this.toggleSearchBar();\n this.searchButtonClick = false;\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n if (currSize > this.customMobileBreakpoint!) {\n this.showNavMenu(false);\n if (this.mobileSearchBarVisible) {\n this.toggleSearchBar();\n }\n }\n this.icTopNavResized.emit({\n size: currSize,\n });\n if (this.searchBar && document.activeElement === this.searchBar) {\n this.searchBar.setAttribute(\"hidden\", \"true\");\n //remove attribute again as this trigger a redraw & applies css\n this.searchBar.removeAttribute(\"hidden\");\n setTimeout(() => {\n this.searchBar?.focus();\n }, 100);\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback(getCurrentDeviceSize());\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n const {\n appTitle,\n contentAligned,\n customMobileBreakpoint,\n deviceSize,\n el,\n foregroundColor,\n hasAppIcon,\n hasFullWidthSearchBar,\n hasIconButtons,\n hasNavigation,\n hasSearchSlotContent,\n href,\n inline,\n menuButtonClick,\n mobileSearchBarVisible,\n navMenuVisible,\n searchButtonClickHandler,\n searchButtonMouseDownHandler,\n shortAppTitle,\n status,\n version,\n theme,\n } = this;\n\n const hasStatus = status !== \"\";\n const hasVersion = version !== \"\";\n const hasMenuContent =\n hasNavigation || hasIconButtons || hasStatus || hasVersion;\n\n const searchButtonSize = deviceSize <= DEVICE_SIZES.S ? \"medium\" : \"large\";\n const hasTitle = appTitle !== \"\" && isPropDefined(appTitle);\n const overMobileBreakpoint = deviceSize <= customMobileBreakpoint!;\n\n const appTitleVariant: IcTypographyVariants = overMobileBreakpoint\n ? deviceSize <= DEVICE_SIZES.S\n ? \"subtitle-small\"\n : \"h4\"\n : \"h3\";\n\n const mobileSearchButtonTitle = `${\n mobileSearchBarVisible ? \"Hide\" : \"Show\"\n } search`;\n const menuSize = deviceSize <= DEVICE_SIZES.S ? \"small\" : \"medium\";\n\n const shortAppTitleSlot = isSlotUsed(el, \"short-app-title\");\n const hasAppTitleSlot = isSlotUsed(el, \"app-title\");\n const Component = hasAppTitleSlot ? \"div\" : \"a\";\n const attrs = Component == \"a\" && {\n href: href,\n };\n\n return (\n <Host\n class={{\n \"fullwidth-searchbar\": hasFullWidthSearchBar,\n \"mobile-mode\": overMobileBreakpoint,\n [IcBrandForegroundEnum.Dark]:\n foregroundColor === IcBrandForegroundEnum.Dark,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div class=\"top-navigation\">\n <ic-section-container aligned={contentAligned} full-height>\n <header role=\"banner\">\n <div class=\"top-panel-container\">\n <div class=\"app-details-container\">\n {(hasTitle || hasAppTitleSlot) && (\n <Component class=\"title-link\" {...attrs}>\n {hasAppIcon && (\n <div class=\"app-icon-container\">\n <slot name=\"app-icon\" />\n </div>\n )}\n {deviceSize <= DEVICE_SIZES.S &&\n (!isEmptyString(shortAppTitle!) || shortAppTitleSlot) ? (\n <ic-typography\n variant=\"subtitle-small\"\n aria-label={\n (!hasAppTitleSlot || !shortAppTitleSlot) &&\n `${appTitle} (${shortAppTitle})`\n }\n >\n <h1>\n {shortAppTitleSlot ? (\n <slot name=\"short-app-title\"></slot>\n ) : (\n shortAppTitle\n )}\n </h1>\n </ic-typography>\n ) : (\n <ic-typography variant={appTitleVariant}>\n <h1 class=\"title-wrap\">\n {hasAppTitleSlot ? (\n <slot name=\"app-title\"></slot>\n ) : (\n appTitle\n )}\n </h1>\n </ic-typography>\n )}\n </Component>\n )}\n {hasStatus && (\n <div class=\"app-status\">\n <ic-typography\n aria-label=\"app tag\"\n variant=\"label-uppercase\"\n class=\"app-status-text\"\n >\n {status}\n </ic-typography>\n </div>\n )}\n {hasVersion && (\n <div class=\"app-version\">\n <ic-typography\n variant=\"label\"\n class=\"app-version-text\"\n aria-label=\"app version\"\n >\n {version}\n </ic-typography>\n </div>\n )}\n </div>\n\n {(hasSearchSlotContent || hasMenuContent) && (\n <div class=\"search-menu-container\">\n <div class=\"search-actions-container\">\n {!overMobileBreakpoint && <slot name=\"search\"></slot>}\n\n {hasSearchSlotContent && overMobileBreakpoint && (\n <ic-button\n id=\"search-toggle-button\"\n ref={(el) => (this.mobileSearchButtonEl = el)}\n onMouseDown={searchButtonMouseDownHandler}\n variant=\"icon-tertiary\"\n monochrome\n size={searchButtonSize}\n aria-label={mobileSearchButtonTitle}\n theme={foregroundColor as IcThemeMode}\n onClick={searchButtonClickHandler}\n >\n <slot name=\"toggle-icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"#ffffff\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <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\" />\n </svg>\n </slot>\n </ic-button>\n )}\n\n {hasIconButtons && !overMobileBreakpoint && (\n <div class=\"icon-buttons-container\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n {hasMenuContent && overMobileBreakpoint && (\n <div class=\"menu-button-container\">\n <span\n id=\"navigation-landmark-button-text\"\n class=\"navigation-landmark-button-text\"\n aria-hidden=\"true\"\n >\n Main navigation button\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-button-text\"\n aria-hidden={`${navMenuVisible}`}\n >\n <ic-button\n id=\"menu-button\"\n theme={foregroundColor as IcThemeMode}\n variant=\"secondary\"\n monochrome\n aria-expanded=\"false\"\n aria-haspopup=\"true\"\n aria-label={`Open ${\n hasNavigation ? \"navigation\" : \"app\"\n } menu`}\n size={menuSize}\n onClick={menuButtonClick}\n >\n Menu\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n fill=\"#ffffff\"\n slot=\"left-icon\"\n >\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\" />\n </svg>\n </ic-button>\n </nav>\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n\n {mobileSearchBarVisible && (\n <div class=\"search-bar-container\">\n <slot name=\"search\"></slot>\n </div>\n )}\n\n {hasNavigation && !overMobileBreakpoint && (\n <div class=\"navigation-tabs\">\n <span\n id=\"navigation-landmark-text\"\n class=\"navigation-landmark-text\"\n aria-hidden=\"true\"\n >\n Main pages\n </span>\n <nav\n aria-labelledby=\"navigation-landmark-text\"\n class=\"nav-panel-container\"\n >\n <ic-horizontal-scroll\n monochrome\n appearance={foregroundColor}\n >\n <ul class=\"navigation-item-list\" tabindex=\"-1\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-horizontal-scroll>\n </nav>\n </div>\n )}\n </header>\n </ic-section-container>\n </div>\n {navMenuVisible && (\n <ic-navigation-menu\n version={version}\n status={status}\n class={{\n [\"inline\"]: !!inline,\n }}\n >\n {hasIconButtons && (\n <div class=\"menu-buttons-slot\" slot=\"buttons\">\n <slot name=\"buttons\"></slot>\n </div>\n )}\n <ul slot=\"navigation\">\n <slot name=\"navigation\"></slot>\n </ul>\n </ic-navigation-menu>\n )}\n </Host>\n );\n }\n}\n"]}
|
@@ -452,26 +452,11 @@ export const WithGroupedNavigation = {
|
|
452
452
|
placeholder="Search"
|
453
453
|
label="Search"
|
454
454
|
></ic-search-bar>
|
455
|
-
<ic-navigation-
|
456
|
-
|
457
|
-
|
458
|
-
|
455
|
+
<ic-navigation-group
|
456
|
+
slot="navigation"
|
457
|
+
label="Navigation group (expandable on mobile)"
|
458
|
+
expandable="true"
|
459
459
|
>
|
460
|
-
<svg
|
461
|
-
slot="icon"
|
462
|
-
xmlns="http://www.w3.org/2000/svg"
|
463
|
-
height="24px"
|
464
|
-
viewBox="0 0 24 24"
|
465
|
-
width="24px"
|
466
|
-
fill="#000000"
|
467
|
-
>
|
468
|
-
<path d="M0 0h24v24H0V0z" fill="none" />
|
469
|
-
<path
|
470
|
-
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z"
|
471
|
-
/>
|
472
|
-
</svg>
|
473
|
-
</ic-navigation-button>
|
474
|
-
<ic-navigation-group slot="navigation" label="Navigation group">
|
475
460
|
<ic-navigation-item label="One" href="/"></ic-navigation-item>
|
476
461
|
<ic-navigation-item label="Two" href="/"></ic-navigation-item>
|
477
462
|
<ic-navigation-item label="Three" href="/"></ic-navigation-item>
|
@@ -500,6 +485,14 @@ export const WithGroupedNavigation = {
|
|
500
485
|
<ic-navigation-item label="Another Seven" href="/"></ic-navigation-item>
|
501
486
|
<ic-navigation-item label="Another Eight" href="/"></ic-navigation-item>
|
502
487
|
</ic-navigation-group>
|
488
|
+
<ic-navigation-group
|
489
|
+
slot="navigation"
|
490
|
+
label="Third navigation group"
|
491
|
+
expandable="true"
|
492
|
+
>
|
493
|
+
<ic-navigation-item label="Another One" href="/"></ic-navigation-item>
|
494
|
+
<ic-navigation-item label="Another Two" href="/"></ic-navigation-item>
|
495
|
+
</ic-navigation-group>
|
503
496
|
</ic-top-navigation>`,
|
504
497
|
|
505
498
|
name: "With grouped navigation",
|
@@ -592,6 +592,6 @@ const renderDynamicChildSlots = (mutationList, slotNames, ref) => {
|
|
592
592
|
}
|
593
593
|
};
|
594
594
|
|
595
|
-
export { isSlottedInGroup as $, errorIcon as A, successIcon as B, slotHasContent as C, DEVICE_SIZES as D, IC_DEVICE_SIZES as E, hasClassificationBanner as F, elementOverflowsX as G, isMacDevice as H, IC_INHERITED_ARIA as I, getOptionsWithoutGroupTitlesCount as J, getNavItemParentDetails as K, getCssProperty as L,
|
595
|
+
export { isSlottedInGroup as $, errorIcon as A, successIcon as B, slotHasContent as C, DEVICE_SIZES as D, IC_DEVICE_SIZES as E, hasClassificationBanner as F, elementOverflowsX as G, isMacDevice as H, IC_INHERITED_ARIA as I, getOptionsWithoutGroupTitlesCount as J, getNavItemParentDetails as K, getCssProperty as L, getSlot as M, getSlotContent as N, capitalize as O, getFilteredMenuOptions as P, handleHiddenFormButtonClick as Q, debounceEvent as R, getLabelFromValue as S, checkSlotInChildMutations as T, isMobileOrTablet as U, VARIANT_ICONS as V, isEmptyString as W, pxToRem as X, getBrandColorBrightness as Y, BLACK_MIN_COLOR_BRIGHTNESS as Z, WHITE_MAX_COLOR_BRIGHTNESS as _, isElInAGGrid as a, inheritAttributes as b, checkResizeObserver as c, renderFileHiddenInput as d, IcBrandForegroundEnum as e, renderDynamicChildSlots as f, getBrandFromContext as g, onComponentPropUndefinedChange as h, isSlotUsed as i, convertToRGBA as j, getBrandForegroundAppearance as k, isPropDefined as l, getSlotElements as m, getCurrentDeviceSize as n, onComponentRequiredPropUndefined as o, addFormResetListener as p, removeFormResetListener as q, removeDisabledFalse as r, renderHiddenInput as s, removeHiddenInput as t, getInputDescribedByText as u, hasValidationStatus as v, getInputHelperTextID as w, getInputValidationTextID as x, IcInformationStatus as y, warningIcon as z };
|
596
596
|
|
597
597
|
//# sourceMappingURL=helpers.js.map
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
2
2
|
import { j as convertToRGBA, k as getBrandForegroundAppearance, l as isPropDefined, o as onComponentRequiredPropUndefined } from './helpers.js';
|
3
3
|
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
4
4
|
|
5
|
-
const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.ic-badge-show){animation:expand var(--ic-transition-duration-slow)}:host(.ic-badge-hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host ic-typography{--ic-typography-color:var(--ic-badge-text)}:host(.ic-badge-neutral){background-color:var(--ic-badge-dark) !important}:host(.ic-badge-light) ic-typography{--ic-typography-color:var(--ic-badge-text-monochrome)}:host(.ic-badge-light) ::slotted(*){fill:var(--ic-badge-icon-monochrome)}:host(.ic-badge-info){background-color:var(--ic-badge-info) !important}:host(.ic-badge-light){background-color:var(--ic-badge-light) !important}:host(.ic-badge-warning){background-color:var(--ic-badge-warning) !important}:host(.ic-badge-warning) ic-typography{--ic-typography-color:var(--ic-badge-warning-text)}:host(.ic-badge-warning) ::slotted(*){fill:var(--ic-badge-warning-icon)}:host(.ic-badge-error){background-color:var(--ic-badge-error) !important}:host(.ic-badge-success){background-color:var(--ic-badge-success) !important}:host(.ic-badge-small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.ic-badge-large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-medium){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.ic-badge-dot.ic-badge-small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.ic-badge-dot.ic-badge-large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host ::slotted(*){fill:var(--ic-badge-icon)}:host(.ic-badge-foreground-dark) ::slotted(*){fill:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ::slotted(*){fill:white}:host(.ic-badge-foreground-dark) ic-typography{--ic-typography-color:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ic-typography{--ic-typography-color:var(--ic-color-primary-text-dark)}:host(.ic-badge-text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-text.ic-badge-small) ic-typography{padding:0 0.2132rem}:host(.ic-badge-text.ic-badge-large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.ic-badge-icon.ic-badge-small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.ic-badge-icon.ic-badge-large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.ic-badge-far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.ic-badge-far.ic-badge-small),:host(.ic-badge-dot.ic-badge-far.ic-badge-large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-far),:host(.ic-badge-dot.ic-badge-far.ic-badge-small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.ic-badge-near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.ic-badge-dot.ic-badge-near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.ic-badge-inline){position:static}:host(.ic-badge-hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}.sr-only{position:absolute;left:-9999px}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";
|
5
|
+
const icBadgeCss = "@media (prefers-reduced-motion: no-preference){:host(.ic-badge-show){animation:expand var(--ic-transition-duration-slow)}:host(.ic-badge-hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host ic-typography{--ic-typography-color:var(--ic-badge-text)}:host(.ic-badge-neutral){background-color:var(--ic-badge-dark) !important}:host(.ic-badge-light) ic-typography{--ic-typography-color:var(--ic-badge-text-monochrome)}:host(.ic-badge-light) ::slotted(*){fill:var(--ic-badge-icon-monochrome)}:host(.ic-badge-info){background-color:var(--ic-badge-info) !important}:host(.ic-badge-light){background-color:var(--ic-badge-light) !important}:host(.ic-badge-warning){background-color:var(--ic-badge-warning) !important}:host(.ic-badge-warning) ic-typography{--ic-typography-color:var(--ic-badge-warning-text)}:host(.ic-badge-warning) ::slotted(*){fill:var(--ic-badge-warning-icon)}:host(.ic-badge-error){background-color:var(--ic-badge-error) !important}:host(.ic-badge-success){background-color:var(--ic-badge-success) !important}:host(.ic-badge-small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.ic-badge-large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-medium){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.ic-badge-dot.ic-badge-small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.ic-badge-dot.ic-badge-large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host ::slotted(*){fill:var(--ic-badge-icon)}:host(.ic-badge-foreground-dark) ::slotted(*){fill:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ::slotted(*){fill:white}:host(.ic-badge-foreground-dark) ic-typography{--ic-typography-color:var(--ic-color-text-primary-light)}:host(.ic-badge-foreground-light) ic-typography{--ic-typography-color:var(--ic-color-primary-text-dark)}:host(.ic-badge-text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-text.ic-badge-small) ic-typography{padding:0 0.2132rem}:host(.ic-badge-text.ic-badge-large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.ic-badge-icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.ic-badge-icon.ic-badge-small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.ic-badge-icon.ic-badge-large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.ic-badge-far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.ic-badge-far.ic-badge-small),:host(.ic-badge-dot.ic-badge-far.ic-badge-large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.ic-badge-dot.ic-badge-far),:host(.ic-badge-dot.ic-badge-far.ic-badge-small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.ic-badge-near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.ic-badge-dot.ic-badge-near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.ic-badge-inline){position:static}:host(.ic-badge-hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";
|
6
6
|
const IcBadgeStyle0 = icBadgeCss;
|
7
7
|
|
8
8
|
const NAVIGATION_BUTTON = "IC-NAVIGATION-BUTTON";
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-badge.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,m+HAAm+H,CAAC;AACv/H,sBAAe,UAAU;;AC0BzB,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AACjD,MAAM,cAAc,GAAG,mBAAmB,CAAC;MAY9B,KAAK;IAPlB;;;;QAQU,cAAS,GAAkB,IAAI,CAAC;;;;QAoCf,aAAQ,GAAsB,KAAK,CAAC;;;;QAKrD,SAAI,GAAa,QAAQ,CAAC;;;;QAU1B,UAAK,GAAiB,SAAS,CAAC;;;;QAKhC,SAAI,GAAkB,MAAM,CAAC;;;;QAK7B,YAAO,GAAqB,SAAS,CAAC;;;;QAYtC,YAAO,GAAa,IAAI,CAAC;QAqCzB,mBAAc,GAAG;YACvB,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;YAE5E,IAAI,SAAS,EAAE;gBACb,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;gBACjC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;gBAC/D,IAAI,CAAC,gBAAgB,GAAG,4BAA4B,CAClD,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,IAA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DAAM,KAAK,EAAC,SAAS,YAAa,CAChD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","src/components/ic-badge/ic-badge.tsx"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.ic-badge-show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.ic-badge-hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host ic-typography {\n --ic-typography-color: var(--ic-badge-text);\n}\n\n:host(.ic-badge-neutral) {\n background-color: var(--ic-badge-dark) !important;\n}\n\n:host(.ic-badge-light) ic-typography {\n --ic-typography-color: var(--ic-badge-text-monochrome);\n}\n\n:host(.ic-badge-light) ::slotted(*) {\n fill: var(--ic-badge-icon-monochrome);\n}\n\n:host(.ic-badge-info) {\n background-color: var(--ic-badge-info) !important;\n}\n\n:host(.ic-badge-light) {\n background-color: var(--ic-badge-light) !important;\n}\n\n:host(.ic-badge-warning) {\n background-color: var(--ic-badge-warning) !important;\n}\n\n:host(.ic-badge-warning) ic-typography {\n --ic-typography-color: var(--ic-badge-warning-text);\n}\n\n:host(.ic-badge-warning) ::slotted(*) {\n fill: var(--ic-badge-warning-icon);\n}\n\n:host(.ic-badge-error) {\n background-color: var(--ic-badge-error) !important;\n}\n\n:host(.ic-badge-success) {\n background-color: var(--ic-badge-success) !important;\n}\n\n:host(.ic-badge-small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.ic-badge-large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-medium) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.ic-badge-dot.ic-badge-small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-dot.ic-badge-large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host ::slotted(*) {\n fill: var(--ic-badge-icon);\n}\n\n:host(.ic-badge-foreground-dark) ::slotted(*) {\n fill: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.ic-badge-foreground-dark) ic-typography {\n --ic-typography-color: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ic-typography {\n --ic-typography-color: var(--ic-color-primary-text-dark);\n}\n\n:host(.ic-badge-text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-text.ic-badge-small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.ic-badge-text.ic-badge-large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.ic-badge-icon.ic-badge-small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.ic-badge-icon.ic-badge-large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.ic-badge-far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.ic-badge-far.ic-badge-small),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-far),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.ic-badge-dot.ic-badge-near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-badge-inline) {\n position: static;\n}\n\n:host(.ic-badge-hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Watch,\n h,\n Listen,\n} from \"@stencil/core\";\nimport {\n IcBadgePositions,\n IcBadgeTypes,\n IcBadgeVariants,\n} from \"./ic-badge.types\";\nimport {\n IcSizes,\n IcBrandForeground,\n IcColor,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n convertToRGBA,\n getBrandForegroundAppearance,\n isPropDefined,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\n\nconst NAVIGATION_BUTTON = \"IC-NAVIGATION-BUTTON\";\nconst TOP_NAVIGATION = \"IC-TOP-NAVIGATION\";\n\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\n@Component({\n tag: \"ic-badge\",\n styleUrl: \"ic-badge.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Badge {\n private ariaLabel: string | null = null;\n private foregroundColour: IcBrandForeground;\n private parentAriaLabel: string;\n\n @Element() el: HTMLIcBadgeElement;\n\n /**\n * The accessible label of the badge component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string;\n\n @Watch(\"accessibleLabel\")\n accessibleLabelHandler(): void {\n this.setAccessibleLabel();\n }\n\n /**\n * The custom badge colour. This will only style the badge component if variant=\"custom\".\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor;\n\n @Watch(\"customColor\")\n customColorHandler(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n }\n\n /**\n * The maximum number shown on the badge appended with a +.\n * This will only be displayed if type=\"text\" and label is not empty.\n */\n @Prop() maxNumber?: number;\n\n /**\n * The positioning of the badge in reference to the parent element.\n */\n @Prop({ mutable: true }) position?: IcBadgePositions = \"far\";\n\n /**\n * The size of the badge to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The text displayed in the badge. This will only be displayed if type=\"text\".\n */\n @Prop() label?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The type of badge to be displayed.\n */\n @Prop() type?: IcBadgeTypes = \"text\";\n\n /**\n * The variant of the badge to be displayed.\n */\n @Prop() variant?: IcBadgeVariants = \"neutral\";\n\n @Watch(\"variant\")\n variantHandler(): void {\n if (this.variant === \"custom\") {\n this.setBadgeColour();\n }\n }\n\n /**\n * If `true`, the badge will be displayed.\n */\n @Prop() visible?: boolean = true;\n\n @Watch(\"visible\")\n visibleHandler(): void {\n this.setAccessibleLabel();\n }\n\n componentWillLoad(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n\n const ariaLabel = this.el.parentElement?.ariaLabel;\n if (ariaLabel) this.parentAriaLabel = ariaLabel;\n this.setAccessibleLabel();\n }\n\n componentDidLoad(): void {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Badge\"\n );\n }\n\n componentWillRender(): void {\n this.isInTopNav() && this.setPositionInTopNavigation();\n }\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.isInTopNav() && (this.position = \"inline\");\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.isInTopNav() && (this.position = \"near\");\n }\n\n private setBadgeColour = () => {\n const colorRGBA = this.customColor ? convertToRGBA(this.customColor) : null;\n\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;\n this.foregroundColour = getBrandForegroundAppearance(\n (r * 299 + g * 587 + b * 114) / 1000\n );\n }\n };\n\n private getLabel = () =>\n this.maxNumber && Number(this.label) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.label;\n\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n private setAccessibleLabel = () => {\n const parentEl = this.el.parentElement;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.label || \"with badge being displayed\";\n\n if (parentEl) {\n const { tagName } = parentEl;\n if (\n tagName !== \"IC-CARD\" &&\n (tagName !== \"IC-TAB\" || (tagName === \"IC-TAB\" && this.parentAriaLabel))\n ) {\n const ariaLabelPrefix = this.parentAriaLabel\n ? `${this.parentAriaLabel} ,`\n : \"\";\n parentEl.ariaLabel = this.visible\n ? `${ariaLabelPrefix} ${defaultAriaLabel}`\n : null;\n } else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n\n private setPositionInTopNavigation = () => {\n const parentTopNavEl = this.el.parentElement?.parentElement;\n parentTopNavEl?.classList.contains(\"mobile-mode\")\n ? (this.position = \"inline\")\n : (this.position = \"near\");\n };\n\n private isInTopNav = (): boolean => {\n const parentEl = this.el.parentElement;\n if (parentEl) {\n const grandparentEl = parentEl?.parentElement;\n return (\n parentEl?.tagName === NAVIGATION_BUTTON &&\n grandparentEl?.tagName === TOP_NAVIGATION\n );\n }\n return false;\n };\n\n private isAccessibleLabelDefined = () =>\n isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n\n render() {\n const {\n ariaLabel,\n el,\n foregroundColour,\n getLabel,\n position,\n size,\n label,\n type,\n variant,\n visible,\n theme,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-badge-${position}`]: true,\n [`ic-badge-${size}`]: true,\n [`ic-badge-${variant}`]: true,\n [`ic-badge-${type}`]: true,\n [`ic-badge-foreground-${foregroundColour}`]:\n foregroundColour !== null && variant === \"custom\",\n [`${visible ? \"ic-badge-show\" : \"ic-badge-hide\"}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n id={el.id || null}\n aria-label={ariaLabel}\n role=\"status\"\n >\n {type === \"icon\" && <slot name=\"badge-icon\"></slot>}\n {type === \"text\" && label && (\n <ic-typography variant={size === \"small\" ? \"badge-small\" : \"badge\"}>\n {getLabel()}\n </ic-typography>\n )}\n {type === \"dot\" && <span class=\"sr-only\">badge</span>}\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ic-badge.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,mgIAAmgI,CAAC;AACvhI,sBAAe,UAAU;;AC0BzB,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AACjD,MAAM,cAAc,GAAG,mBAAmB,CAAC;MAY9B,KAAK;IAPlB;;;;QAQU,cAAS,GAAkB,IAAI,CAAC;;;;QAoCf,aAAQ,GAAsB,KAAK,CAAC;;;;QAKrD,SAAI,GAAa,QAAQ,CAAC;;;;QAU1B,UAAK,GAAiB,SAAS,CAAC;;;;QAKhC,SAAI,GAAkB,MAAM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AI,EAAE,GAAG,IAAI;gBAC1B,CAAC,uBAAuB,gBAAgB,EAAE,GACxC,gBAAgB,KAAK,IAAI,IAAI,OAAO,KAAK,QAAQ;gBACnD,CAAC,GAAG,OAAO,GAAG,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI;gBACxD,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;aAC3C,EACD,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,IAAI,gBACL,SAAS,EACrB,IAAI,EAAC,QAAQ,IAEZ,IAAI,KAAK,MAAM,IAAI,6DAAM,IAAI,EAAC,YAAY,GAAQ,EAClD,IAAI,KAAK,MAAM,IAAI,KAAK,KACvB,sEAAe,OAAO,EAAE,IAAI,KAAK,OAAO,GAAG,aAAa,GAAG,OAAO,IAC/D,QAAQ,EAAE,CACG,CACjB,EACA,IAAI,KAAK,KAAK,IAAI,6DAAM,KAAK,EAAC,SAAS,YAAa,CAChD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","src/components/ic-badge/ic-badge.tsx"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.ic-badge-show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.ic-badge-hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host ic-typography {\n --ic-typography-color: var(--ic-badge-text);\n}\n\n:host(.ic-badge-neutral) {\n background-color: var(--ic-badge-dark) !important;\n}\n\n:host(.ic-badge-light) ic-typography {\n --ic-typography-color: var(--ic-badge-text-monochrome);\n}\n\n:host(.ic-badge-light) ::slotted(*) {\n fill: var(--ic-badge-icon-monochrome);\n}\n\n:host(.ic-badge-info) {\n background-color: var(--ic-badge-info) !important;\n}\n\n:host(.ic-badge-light) {\n background-color: var(--ic-badge-light) !important;\n}\n\n:host(.ic-badge-warning) {\n background-color: var(--ic-badge-warning) !important;\n}\n\n:host(.ic-badge-warning) ic-typography {\n --ic-typography-color: var(--ic-badge-warning-text);\n}\n\n:host(.ic-badge-warning) ::slotted(*) {\n fill: var(--ic-badge-warning-icon);\n}\n\n:host(.ic-badge-error) {\n background-color: var(--ic-badge-error) !important;\n}\n\n:host(.ic-badge-success) {\n background-color: var(--ic-badge-success) !important;\n}\n\n:host(.ic-badge-small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.ic-badge-large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-medium) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.ic-badge-dot.ic-badge-small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-dot.ic-badge-large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host ::slotted(*) {\n fill: var(--ic-badge-icon);\n}\n\n:host(.ic-badge-foreground-dark) ::slotted(*) {\n fill: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.ic-badge-foreground-dark) ic-typography {\n --ic-typography-color: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ic-typography {\n --ic-typography-color: var(--ic-color-primary-text-dark);\n}\n\n:host(.ic-badge-text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-text.ic-badge-small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.ic-badge-text.ic-badge-large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.ic-badge-icon.ic-badge-small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.ic-badge-icon.ic-badge-large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.ic-badge-far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.ic-badge-far.ic-badge-small),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-far),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.ic-badge-dot.ic-badge-near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-badge-inline) {\n position: static;\n}\n\n:host(.ic-badge-hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.sr-only:dir(rtl) {\n right: -9999px;\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Watch,\n h,\n Listen,\n} from \"@stencil/core\";\nimport {\n IcBadgePositions,\n IcBadgeTypes,\n IcBadgeVariants,\n} from \"./ic-badge.types\";\nimport {\n IcSizes,\n IcBrandForeground,\n IcColor,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n convertToRGBA,\n getBrandForegroundAppearance,\n isPropDefined,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\n\nconst NAVIGATION_BUTTON = \"IC-NAVIGATION-BUTTON\";\nconst TOP_NAVIGATION = \"IC-TOP-NAVIGATION\";\n\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\n@Component({\n tag: \"ic-badge\",\n styleUrl: \"ic-badge.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Badge {\n private ariaLabel: string | null = null;\n private foregroundColour: IcBrandForeground;\n private parentAriaLabel: string;\n\n @Element() el: HTMLIcBadgeElement;\n\n /**\n * The accessible label of the badge component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string;\n\n @Watch(\"accessibleLabel\")\n accessibleLabelHandler(): void {\n this.setAccessibleLabel();\n }\n\n /**\n * The custom badge colour. This will only style the badge component if variant=\"custom\".\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor;\n\n @Watch(\"customColor\")\n customColorHandler(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n }\n\n /**\n * The maximum number shown on the badge appended with a +.\n * This will only be displayed if type=\"text\" and label is not empty.\n */\n @Prop() maxNumber?: number;\n\n /**\n * The positioning of the badge in reference to the parent element.\n */\n @Prop({ mutable: true }) position?: IcBadgePositions = \"far\";\n\n /**\n * The size of the badge to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The text displayed in the badge. This will only be displayed if type=\"text\".\n */\n @Prop() label?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The type of badge to be displayed.\n */\n @Prop() type?: IcBadgeTypes = \"text\";\n\n /**\n * The variant of the badge to be displayed.\n */\n @Prop() variant?: IcBadgeVariants = \"neutral\";\n\n @Watch(\"variant\")\n variantHandler(): void {\n if (this.variant === \"custom\") {\n this.setBadgeColour();\n }\n }\n\n /**\n * If `true`, the badge will be displayed.\n */\n @Prop() visible?: boolean = true;\n\n @Watch(\"visible\")\n visibleHandler(): void {\n this.setAccessibleLabel();\n }\n\n componentWillLoad(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n\n const ariaLabel = this.el.parentElement?.ariaLabel;\n if (ariaLabel) this.parentAriaLabel = ariaLabel;\n this.setAccessibleLabel();\n }\n\n componentDidLoad(): void {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Badge\"\n );\n }\n\n componentWillRender(): void {\n this.isInTopNav() && this.setPositionInTopNavigation();\n }\n\n @Listen(\"icNavigationMenuOpened\", { target: \"document\" })\n navBarMenuOpenHandler(): void {\n this.isInTopNav() && (this.position = \"inline\");\n }\n\n @Listen(\"icNavigationMenuClosed\", { target: \"document\" })\n navBarMenuCloseHandler(): void {\n this.isInTopNav() && (this.position = \"near\");\n }\n\n private setBadgeColour = () => {\n const colorRGBA = this.customColor ? convertToRGBA(this.customColor) : null;\n\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;\n this.foregroundColour = getBrandForegroundAppearance(\n (r * 299 + g * 587 + b * 114) / 1000\n );\n }\n };\n\n private getLabel = () =>\n this.maxNumber && Number(this.label) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.label;\n\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n private setAccessibleLabel = () => {\n const parentEl = this.el.parentElement;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.label || \"with badge being displayed\";\n\n if (parentEl) {\n const { tagName } = parentEl;\n if (\n tagName !== \"IC-CARD\" &&\n (tagName !== \"IC-TAB\" || (tagName === \"IC-TAB\" && this.parentAriaLabel))\n ) {\n const ariaLabelPrefix = this.parentAriaLabel\n ? `${this.parentAriaLabel} ,`\n : \"\";\n parentEl.ariaLabel = this.visible\n ? `${ariaLabelPrefix} ${defaultAriaLabel}`\n : null;\n } else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n\n private setPositionInTopNavigation = () => {\n const parentTopNavEl = this.el.parentElement?.parentElement;\n parentTopNavEl?.classList.contains(\"mobile-mode\")\n ? (this.position = \"inline\")\n : (this.position = \"near\");\n };\n\n private isInTopNav = (): boolean => {\n const parentEl = this.el.parentElement;\n if (parentEl) {\n const grandparentEl = parentEl?.parentElement;\n return (\n parentEl?.tagName === NAVIGATION_BUTTON &&\n grandparentEl?.tagName === TOP_NAVIGATION\n );\n }\n return false;\n };\n\n private isAccessibleLabelDefined = () =>\n isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n\n render() {\n const {\n ariaLabel,\n el,\n foregroundColour,\n getLabel,\n position,\n size,\n label,\n type,\n variant,\n visible,\n theme,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-badge-${position}`]: true,\n [`ic-badge-${size}`]: true,\n [`ic-badge-${variant}`]: true,\n [`ic-badge-${type}`]: true,\n [`ic-badge-foreground-${foregroundColour}`]:\n foregroundColour !== null && variant === \"custom\",\n [`${visible ? \"ic-badge-show\" : \"ic-badge-hide\"}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n id={el.id || null}\n aria-label={ariaLabel}\n role=\"status\"\n >\n {type === \"icon\" && <slot name=\"badge-icon\"></slot>}\n {type === \"text\" && label && (\n <ic-typography variant={size === \"small\" ? \"badge-small\" : \"badge\"}>\n {getLabel()}\n </ic-typography>\n )}\n {type === \"dot\" && <span class=\"sr-only\">badge</span>}\n </Host>\n );\n }\n}\n"],"version":3}
|