@ukic/web-components 2.1.0-beta.13 → 2.1.0-beta.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-2021e212.js → helpers-d6b5880e.js} +19 -25
- package/dist/cjs/helpers-d6b5880e.js.map +1 -0
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +14 -14
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +5 -4
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +4 -7
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -4
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +5 -3
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +5 -2
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +3 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +7 -4
- 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-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -7
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +10 -13
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +13 -2
- package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -4
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +2 -3
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +20 -16
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +2 -2
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +7 -5
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +3 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +3 -1
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +6 -14
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +95 -3
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js +4 -3
- package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +13 -13
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.css +6 -0
- package/dist/collection/components/ic-button/ic-button.js +1 -4
- package/dist/collection/components/ic-button/ic-button.js.map +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -3
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-footer/ic-footer.css +2 -2
- package/dist/collection/components/ic-footer/ic-footer.js +4 -2
- package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +1 -1
- package/dist/collection/components/ic-menu/ic-menu.js +4 -1
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +2 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +6 -3
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +13 -7
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +0 -6
- 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 +9 -12
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-pagination/ic-pagination.css +0 -4
- package/dist/collection/components/ic-pagination/ic-pagination.js +52 -1
- package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -3
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.js +11 -12
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +19 -15
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-step/ic-step.css +5 -5
- package/dist/collection/components/ic-step/ic-step.js +1 -1
- package/dist/collection/components/ic-step/ic-step.js.map +1 -1
- package/dist/collection/components/ic-tab/ic-tab.js +3 -1
- package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.js +7 -5
- package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +3 -1
- package/dist/collection/components/ic-tab-panel/ic-tab-panel.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.js +5 -13
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-typography/ic-typography.css +39 -0
- package/dist/collection/components/ic-typography/ic-typography.js +120 -2
- package/dist/collection/components/ic-typography/ic-typography.js.map +1 -1
- package/dist/collection/utils/helpers.js +18 -24
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +18 -24
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +13 -13
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +4 -3
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +2 -5
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-checkbox.js +4 -3
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-footer.js +5 -3
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +2 -1
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +4 -1
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +6 -3
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +0 -6
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +9 -12
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination.js +15 -3
- package/dist/components/ic-pagination.js.map +1 -1
- package/dist/components/ic-popover-menu.js +4 -3
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-select.js +1 -2
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +19 -15
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-step.js +2 -2
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-tab-context.js +7 -5
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-panel.js +3 -1
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +3 -1
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +5 -13
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-typography2.js +99 -4
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-0575a77f.entry.js → p-050dbce8.entry.js} +2 -2
- package/dist/core/p-06962e10.entry.js +2 -0
- package/dist/core/p-06962e10.entry.js.map +1 -0
- package/dist/core/{p-0a41c3cb.entry.js → p-0969a95a.entry.js} +2 -2
- package/dist/core/{p-56fe91ad.entry.js → p-0a11ec35.entry.js} +2 -2
- package/dist/core/p-0a11ec35.entry.js.map +1 -0
- package/dist/core/{p-b61e76e2.entry.js → p-0f153569.entry.js} +2 -2
- package/dist/core/{p-3fb307e6.entry.js → p-1585e5c1.entry.js} +2 -2
- package/dist/core/p-29ea6f88.entry.js +2 -0
- package/dist/core/p-29ea6f88.entry.js.map +1 -0
- package/dist/core/p-2e63f202.entry.js +2 -0
- package/dist/core/p-2e63f202.entry.js.map +1 -0
- package/dist/core/p-2e6ea6d3.entry.js +2 -0
- package/dist/core/p-2e6ea6d3.entry.js.map +1 -0
- package/dist/core/{p-e0f24ccd.entry.js → p-2fb97a1b.entry.js} +2 -2
- package/dist/core/p-2fb97a1b.entry.js.map +1 -0
- package/dist/core/{p-100dbcec.entry.js → p-31b4b684.entry.js} +2 -2
- package/dist/core/{p-e839e5dc.entry.js → p-32cc8827.entry.js} +2 -2
- package/dist/core/{p-3845b769.entry.js → p-3498db0b.entry.js} +2 -2
- package/dist/core/p-3498db0b.entry.js.map +1 -0
- package/dist/core/{p-d5d9923a.entry.js → p-36e0671f.entry.js} +2 -2
- package/dist/core/p-443052a7.entry.js +2 -0
- package/dist/core/p-443052a7.entry.js.map +1 -0
- package/dist/core/{p-6a77992e.entry.js → p-46371c05.entry.js} +2 -2
- package/dist/core/p-471820e6.js +2 -0
- package/dist/core/p-471820e6.js.map +1 -0
- package/dist/core/{p-9413d639.entry.js → p-4dd0eb6a.entry.js} +2 -2
- package/dist/core/p-50421f27.entry.js +2 -0
- package/dist/core/p-50421f27.entry.js.map +1 -0
- package/dist/core/p-559b3d17.entry.js +2 -0
- package/dist/core/p-559b3d17.entry.js.map +1 -0
- package/dist/core/{p-895bda21.entry.js → p-5a3f3f37.entry.js} +2 -2
- package/dist/core/p-5a3f3f37.entry.js.map +1 -0
- package/dist/core/{p-dc0b9e80.entry.js → p-5e896163.entry.js} +2 -2
- package/dist/core/{p-e41e701a.entry.js → p-68547339.entry.js} +2 -2
- package/dist/core/p-6f2be5bd.entry.js +2 -0
- package/dist/core/p-6f2be5bd.entry.js.map +1 -0
- package/dist/core/{p-1eb0992b.entry.js → p-70124e59.entry.js} +2 -2
- package/dist/core/p-80164baa.entry.js +2 -0
- package/dist/core/p-80164baa.entry.js.map +1 -0
- package/dist/core/{p-6b39f8b4.entry.js → p-8edd3a9b.entry.js} +2 -2
- package/dist/core/{p-c0813424.entry.js → p-9715ec62.entry.js} +2 -2
- package/dist/core/{p-cb437317.entry.js → p-983cb33c.entry.js} +2 -2
- package/dist/core/{p-002a63e9.entry.js → p-a18c0672.entry.js} +2 -2
- package/dist/core/{p-47b0ed42.entry.js → p-a8dc8196.entry.js} +2 -2
- package/dist/core/{p-52fd3533.entry.js → p-a9184841.entry.js} +2 -2
- package/dist/core/p-a9184841.entry.js.map +1 -0
- package/dist/core/{p-e384aaee.entry.js → p-af815dfb.entry.js} +2 -2
- package/dist/core/{p-8780890e.entry.js → p-b69226d2.entry.js} +2 -2
- package/dist/core/p-b7cf6411.entry.js +2 -0
- package/dist/core/p-b7cf6411.entry.js.map +1 -0
- package/dist/core/{p-3a67718c.entry.js → p-bffa2e1a.entry.js} +2 -2
- package/dist/core/p-c85476c0.entry.js +2 -0
- package/dist/core/p-c85476c0.entry.js.map +1 -0
- package/dist/core/{p-a0f4e641.entry.js → p-ca20c9c3.entry.js} +2 -2
- package/dist/core/{p-a33a04b2.entry.js → p-cee45622.entry.js} +2 -2
- package/dist/core/p-cee45622.entry.js.map +1 -0
- package/dist/core/{p-f3e10149.entry.js → p-d2d5132d.entry.js} +2 -2
- package/dist/core/{p-f3e10149.entry.js.map → p-d2d5132d.entry.js.map} +1 -1
- package/dist/core/{p-546b620e.entry.js → p-df1b0f17.entry.js} +2 -2
- package/dist/core/{p-92c4fa7f.entry.js → p-e16e817e.entry.js} +2 -2
- package/dist/core/p-e16e817e.entry.js.map +1 -0
- package/dist/core/p-e6217f40.entry.js +2 -0
- package/dist/core/p-e6217f40.entry.js.map +1 -0
- package/dist/core/{p-3dc2ff7b.entry.js → p-faeedfd1.entry.js} +2 -2
- package/dist/core/p-faeedfd1.entry.js.map +1 -0
- package/dist/core/{p-5d077cf7.entry.js → p-fb5861c6.entry.js} +2 -2
- package/dist/core/{p-3e5eb873.entry.js → p-fd18d7a3.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-b2b47a7d.js → helpers-73666f14.js} +19 -25
- package/dist/esm/helpers-73666f14.js.map +1 -0
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +14 -14
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +5 -4
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +4 -7
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -4
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +5 -3
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +5 -2
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +3 -2
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +7 -4
- 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-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -7
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +10 -13
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination.entry.js +13 -2
- package/dist/esm/ic-pagination.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +5 -4
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-select.entry.js +2 -3
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +20 -16
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +2 -2
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-context.entry.js +7 -5
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +3 -1
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +3 -1
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +6 -14
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +95 -3
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +3 -0
- package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +1 -0
- package/dist/types/components/ic-menu/ic-menu.d.ts +1 -0
- package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +1 -0
- package/dist/types/components/ic-pagination/ic-pagination.d.ts +7 -0
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +1 -0
- package/dist/types/components/ic-select/ic-select.d.ts +11 -11
- package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +1 -0
- package/dist/types/components/ic-typography/ic-typography.d.ts +27 -0
- package/dist/types/components.d.ts +35 -15
- package/hydrate/index.js +226 -125
- package/package.json +3 -3
- package/dist/cjs/helpers-2021e212.js.map +0 -1
- package/dist/core/p-14835d6f.entry.js +0 -2
- package/dist/core/p-14835d6f.entry.js.map +0 -1
- package/dist/core/p-276f7ecb.entry.js +0 -2
- package/dist/core/p-276f7ecb.entry.js.map +0 -1
- package/dist/core/p-3845b769.entry.js.map +0 -1
- package/dist/core/p-3c23f963.entry.js +0 -2
- package/dist/core/p-3c23f963.entry.js.map +0 -1
- package/dist/core/p-3dc2ff7b.entry.js.map +0 -1
- package/dist/core/p-3dea2867.js +0 -2
- package/dist/core/p-3dea2867.js.map +0 -1
- package/dist/core/p-4b87445b.entry.js +0 -2
- package/dist/core/p-4b87445b.entry.js.map +0 -1
- package/dist/core/p-4c8fcfe6.entry.js +0 -2
- package/dist/core/p-4c8fcfe6.entry.js.map +0 -1
- package/dist/core/p-52fd3533.entry.js.map +0 -1
- package/dist/core/p-56fe91ad.entry.js.map +0 -1
- package/dist/core/p-864b46bf.entry.js +0 -2
- package/dist/core/p-864b46bf.entry.js.map +0 -1
- package/dist/core/p-895bda21.entry.js.map +0 -1
- package/dist/core/p-92c4fa7f.entry.js.map +0 -1
- package/dist/core/p-a33a04b2.entry.js.map +0 -1
- package/dist/core/p-a5bee11f.entry.js +0 -2
- package/dist/core/p-a5bee11f.entry.js.map +0 -1
- package/dist/core/p-db7131b6.entry.js +0 -2
- package/dist/core/p-db7131b6.entry.js.map +0 -1
- package/dist/core/p-de891d3d.entry.js +0 -2
- package/dist/core/p-de891d3d.entry.js.map +0 -1
- package/dist/core/p-e0f24ccd.entry.js.map +0 -1
- package/dist/core/p-ea526b54.entry.js +0 -2
- package/dist/core/p-ea526b54.entry.js.map +0 -1
- package/dist/core/p-ec8b228c.entry.js +0 -2
- package/dist/core/p-ec8b228c.entry.js.map +0 -1
- package/dist/core/p-ff6583e6.entry.js +0 -2
- package/dist/core/p-ff6583e6.entry.js.map +0 -1
- package/dist/esm/helpers-b2b47a7d.js.map +0 -1
- /package/dist/core/{p-0575a77f.entry.js.map → p-050dbce8.entry.js.map} +0 -0
- /package/dist/core/{p-0a41c3cb.entry.js.map → p-0969a95a.entry.js.map} +0 -0
- /package/dist/core/{p-b61e76e2.entry.js.map → p-0f153569.entry.js.map} +0 -0
- /package/dist/core/{p-3fb307e6.entry.js.map → p-1585e5c1.entry.js.map} +0 -0
- /package/dist/core/{p-100dbcec.entry.js.map → p-31b4b684.entry.js.map} +0 -0
- /package/dist/core/{p-e839e5dc.entry.js.map → p-32cc8827.entry.js.map} +0 -0
- /package/dist/core/{p-d5d9923a.entry.js.map → p-36e0671f.entry.js.map} +0 -0
- /package/dist/core/{p-6a77992e.entry.js.map → p-46371c05.entry.js.map} +0 -0
- /package/dist/core/{p-9413d639.entry.js.map → p-4dd0eb6a.entry.js.map} +0 -0
- /package/dist/core/{p-dc0b9e80.entry.js.map → p-5e896163.entry.js.map} +0 -0
- /package/dist/core/{p-e41e701a.entry.js.map → p-68547339.entry.js.map} +0 -0
- /package/dist/core/{p-1eb0992b.entry.js.map → p-70124e59.entry.js.map} +0 -0
- /package/dist/core/{p-6b39f8b4.entry.js.map → p-8edd3a9b.entry.js.map} +0 -0
- /package/dist/core/{p-c0813424.entry.js.map → p-9715ec62.entry.js.map} +0 -0
- /package/dist/core/{p-cb437317.entry.js.map → p-983cb33c.entry.js.map} +0 -0
- /package/dist/core/{p-002a63e9.entry.js.map → p-a18c0672.entry.js.map} +0 -0
- /package/dist/core/{p-47b0ed42.entry.js.map → p-a8dc8196.entry.js.map} +0 -0
- /package/dist/core/{p-e384aaee.entry.js.map → p-af815dfb.entry.js.map} +0 -0
- /package/dist/core/{p-8780890e.entry.js.map → p-b69226d2.entry.js.map} +0 -0
- /package/dist/core/{p-3a67718c.entry.js.map → p-bffa2e1a.entry.js.map} +0 -0
- /package/dist/core/{p-a0f4e641.entry.js.map → p-ca20c9c3.entry.js.map} +0 -0
- /package/dist/core/{p-546b620e.entry.js.map → p-df1b0f17.entry.js.map} +0 -0
- /package/dist/core/{p-5d077cf7.entry.js.map → p-fb5861c6.entry.js.map} +0 -0
- /package/dist/core/{p-3e5eb873.entry.js.map → p-fd18d7a3.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as o,h as r,H as i}from"./p-589f6dd3.js";import{B as s,C as e,W as h,E as c,F as a,k as n}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as o,h as r,H as i}from"./p-589f6dd3.js";import{B as s,C as e,W as h,E as c,F as a,k as n}from"./p-471820e6.js";import"./p-6f57b13c.js";const l=class{constructor(r){t(this,r);this.themeChange=o(this,"themeChange",7);this.checkThemeColorContrast=()=>{if(s()<e&&s()>h){console.warn(`The theme colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setThemeColor=()=>{if(this.color!==null){let t=null;const o=this.color.slice(0,1);if(o==="#"){t=c(this.color)}else if(o.toLowerCase()==="r"){t=a(this.color)}this.setThemeRGBA(t)}};this.setThemeRGBA=t=>{if(t!==null){const o=document.documentElement;o.style.setProperty("--ic-theme-primary-r",t.r.toString());o.style.setProperty("--ic-theme-primary-g",t.g.toString());o.style.setProperty("--ic-theme-primary-b",t.b.toString());o.style.setProperty("--ic-theme-primary-a",t.a.toString());this.checkThemeColorContrast();const r=n();this.themeChange.emit({mode:r,color:t})}};this.color=null}watchColorPropHandler(){this.setThemeColor()}componentWillLoad(){this.setThemeColor()}render(){return r(i,null)}static get watchers(){return{color:["watchColorPropHandler"]}}};export{l as ic_theme};
|
2
|
+
//# sourceMappingURL=p-46371c05.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{I as n}from"./p-6f57b13c.js";const t=`<svg aria-labelledby="error-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="error-title">Error</title>\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/>\n</svg>\n`;const e=`<svg aria-labelledby="info-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="info-title">For your information</title>\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>\n</svg>\n`;const r=`<svg aria-labelledby="neutral-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="neutral-title">Neutral</title>\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/>\n</svg>\n`;const s=`<svg aria-labelledby="success-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="success-title">Success</title>\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n</svg>\n`;const a=`<svg aria-labelledby="warning-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="warning-title">Warning</title>\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>\n</svg>\n`;const i={neutral:{icon:r,ariaLabel:"Neutral"},info:{icon:e,ariaLabel:"For your information"},warning:{icon:a,ariaLabel:"Warning"},error:{icon:t,ariaLabel:"Error"},success:{icon:s,ariaLabel:"Success"}};const o=["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"];const l={XS:576,S:768,M:992,L:1200,XL:99999};const c=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"];const u=["ic-alert"];const d={"ic-alert":["ic-link"]};const p=136.701;const f=130;const v=133.3505;const b=(n,t=[])=>{const e={};t.forEach((t=>{if(n.hasAttribute(t)){const r=n.getAttribute(t);if(r!==null){e[t]=n.getAttribute(t)}n.removeAttribute(t)}}));return e};const m=(n,t)=>{const e=n._original||n;return{_original:n,emit:h(e.emit.bind(e),t)}};const h=(n,t=0)=>{let e;return(...r)=>{clearTimeout(e);e=setTimeout(n,t,...r)}};const g=(n,t,e,r,s)=>{if(e!==undefined&&(n||y(t))){const n=t.querySelectorAll("input.ic-input");const a=Array.from(n);const i=a.filter((n=>t===n.parentElement));let o=i[0];if(o===null||o===undefined){o=t.ownerDocument.createElement("input");o.type="hidden";o.classList.add("ic-input");t.appendChild(o)}o.disabled=s;o.name=e;o.value=r||""}};const w=n=>{const t=n.querySelectorAll("input.ic-input");const e=Array.from(t);const r=e.filter((t=>n===t.parentElement));const s=r[0];s===null||s===void 0?void 0:s.remove()};const y=n=>!!n.shadowRoot&&!!n.attachShadow;const N=n=>n+"-helper-text";const x=n=>n+"-validation-text";const z=(n,t,e)=>`${t?N(n):""} ${e?x(n):""}`.trim();const I=(t,e=null)=>{var r;const s=t.parentElement||t.getRootNode().host.parentElement;const a=s.closest(c.join(","));if(a!==null){const s=a.tagName.toLowerCase();const i=t.tagName.toLowerCase();if((r=d[s])===null||r===void 0?void 0:r.includes(i)){return n.Default}else if(e!==null&&!u.includes(s)){return e}else if(a.classList.contains(n.Dark)){return n.Dark}return n.Light}return n.Default};const L=()=>{let n=false;if("maxTouchPoints"in navigator){n=navigator.maxTouchPoints>0}return n};const M=(n,t)=>{const e=document.createElement("button");e.setAttribute("type",t.type);e.style.display="none";n.appendChild(e);e.click();e.remove()};const k=n=>{if(!n){return true}return n.trim().length===0};const A=(n,t)=>{var e;const r=[];if(t.length>0&&t.map){t.map((n=>{if(n.children){n.children.map((n=>r.push(n)))}else{r.push(n)}}));return(e=r.find((t=>t.value===n)))===null||e===void 0?void 0:e.label}return undefined};const S=(n,t,e,r)=>{let s;if(r==="anywhere"){s=n.filter((n=>{var r;if(t){return n.label.toLowerCase().includes(e.toLowerCase())||((r=n.description)===null||r===void 0?void 0:r.toLowerCase().includes(e.toLowerCase()))}else{return n.label.toLowerCase().includes(e.toLowerCase())}}))}else{s=n.filter((n=>{var r;if(t){return n.label.toLowerCase().startsWith(e.toLowerCase())||((r=n.description)===null||r===void 0?void 0:r.toLowerCase().startsWith(e.toLowerCase()))}else{return n.label.toLowerCase().startsWith(e.toLowerCase())}}))}return s};const C=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const T=()=>{if(C(P.S)){return P.S}if(C(P.M)){return P.M}if(C(P.L)){return P.L}if(C(P.XL)){return P.XL}return P.UNDEFINED};const E=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const $=()=>{const n=E("--ic-theme-primary-r");const t=E("--ic-theme-primary-g");const e=E("--ic-theme-primary-b");return(parseInt(n)*299+parseInt(t)*587+parseInt(e)*114)/1e3};const H=()=>$()>v?n.Dark:n.Light;const O=(n,t)=>{if(n&&n.querySelector){return n.querySelector(`[slot="${t}"]`)}return null};const B=(n,t)=>O(n,t)!==null;const G=(n,t)=>{const e=O(n,t);if(e){return D(e)}return null};const D=n=>{const t=n.firstElementChild;if(t!==null){const n=t.assignedElements?t.assignedElements():t.childNodes;return n.length?n:null}else{return n===null?null:[n]}};const F=n=>{let t={navType:"",parent:null};switch(_(n)){case"IC-NAVIGATION-GROUP":t=F(n.parentElement);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:Y(n)};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:Y(n)};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}return t};const P={XS:Number(E("--ic-breakpoint-xs").replace("px","")),S:Number(E("--ic-breakpoint-sm").replace("px","")),M:Number(E("--ic-breakpoint-md").replace("px","")),L:Number(E("--ic-breakpoint-lg").replace("px","")),XL:Number(E("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const V=(n,t)=>n!==""&&!t;const X=(n,t)=>Array.from(n.children).some((n=>n.getAttribute("slot")===t));const R=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const W=(n,t)=>{for(let e=0;e<n.length;e++){const{prop:r,propName:s}=n[e];if(r===null||r===undefined){console.error(`No ${s} specified for ${t} component - prop '${s}' (web components) / '${j(s)}' (react) required`)}}};const j=n=>{n=n.toLowerCase();const t=n.split("-");let e=t[0];for(let n=1;n<t.length;n++){e+=t[n].substring(0,1).toUpperCase()+t[n].substring(1)}return e};const q=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const U=function(n){return parseInt(n,16)};const J=n=>{let t;if(n.length===4){t=n.replace("#","").split("");return{r:U(t[0]+t[0]),g:U(t[1]+t[1]),b:U(t[2]+t[2]),a:1}}else{return{r:U(n.slice(1,3)),g:U(n.slice(3,5)),b:U(n.slice(5)),a:1}}};const K=n=>{const t=n.slice(3,4);let e;if(t.toLowerCase()==="a"){e={r:null,g:null,b:null,a:null};const t=n.substring(5,n.length-1).replace(/ /g,"").split(",");e.r=Number(t[0]);e.g=Number(t[1]);e.b=Number(t[2]);e.a=Number(t[3])}else{e={r:null,g:null,b:null,a:1};const t=n.substring(4,n.length-1).replace(/ /g,"").split(",");e.r=Number(t[0]);e.g=Number(t[1]);e.b=Number(t[2])}return e};const Q=n=>n.scrollWidth>n.clientWidth;const _=n=>n.parentElement.tagName;const Y=n=>n.parentElement;const Z=()=>document.querySelector("ic-classification-banner:not([inline='true'])")?true:false;const nn=n=>n.closest("FORM");const tn=(n,t)=>{const e=nn(n);if(e!==null){e.addEventListener("reset",t)}};const en=(n,t)=>{const e=nn(n);if(e!==null){e.removeEventListener("reset",t)}};const rn=(n,t=16)=>{const e=parseInt(n);return`${1/t*e}rem`};export{rn as A,$ as B,p as C,P as D,J as E,K as F,O as G,Y as H,l as I,m as J,k as K,s as L,Q as M,N,x as O,a as P,t as Q,i as V,f as W,W as a,I as b,q as c,tn as d,g as e,w as f,T as g,z as h,X as i,V as j,H as k,Z as l,b as m,o as n,R as o,F as p,_ as q,en as r,B as s,D as t,G as u,M as v,S as w,A as x,L as y,E as z};
|
2
|
+
//# sourceMappingURL=p-471820e6.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/utils/constants.ts","src/utils/helpers.ts"],"names":["VARIANT_ICONS","neutral","icon","neutralIcon","ariaLabel","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","IC_INHERITED_ARIA","IC_DEVICE_SIZES","XS","S","M","L","XL","IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","ic-alert","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","DARK_MODE_THRESHOLD","inheritAttributes","element","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","always","container","name","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","removeHiddenInput","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","trim","getThemeFromContext","themeFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","_a","includes","IcThemeForegroundEnum","Default","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","handleHiddenFormButtonClick","form","button","hiddenFormButton","document","setAttribute","style","display","click","isEmptyString","length","getLabelFromValue","options","ungroupedOptions","map","option","children","push","find","label","getFilteredMenuOptions","includeDescriptions","searchString","position","rawFilteredOptions","description","startsWith","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getThemeColorBrightness","themeRed","themeGreen","themeBlue","parseInt","getThemeForegroundColor","getSlot","querySelector","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","getParentElementType","getParentElement","Number","replace","hasValidationStatus","status","isSlotUsed","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","i","prop","propName","console","kebabToCamelCase","kebabCase","individualWords","split","camelCase","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","c","r","g","b","a","slice","rgbaStrToObj","rgbaStr","fourthChar","colorRGBA","rgba","rgb","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","getForm","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","tempPx"],"mappings":"y4DAOaA,EAAgB,CAC3BC,QAAS,CACPC,KAAMC,EACNC,UAAW,WAEbC,KAAM,CACJH,KAAMI,EACNF,UAAW,wBAEbG,QAAS,CACPL,KAAMM,EACNJ,UAAW,WAEbK,MAAO,CACLP,KAAMQ,EACNN,UAAW,SAEbO,QAAS,CACPT,KAAMU,EACNR,UAAW,kBAKFS,EAAoB,CAC/B,cACA,YACA,gBACA,eACA,mBACA,mBACA,eACA,gBACA,kBACA,oBACA,cACA,eACA,gBACA,cACA,eACA,oBACA,aACA,kBACA,YACA,YACA,gBACA,8BAGWC,EAAkB,CAC7BC,GAAI,IACJC,EAAG,IACHC,EAAG,IACHC,EAAG,KACHC,GAAI,OAGC,MAAMC,EAA4B,CACvC,UACA,oBACA,YACA,qBACA,YAGK,MAAMC,EAA4B,CAAC,YAMnC,MAAMC,EAA+C,CAC1DC,WAAY,CAAC,kBAUFC,EAA6B,cAC7BC,EAA6B,ICrE1C,MAAMC,EAAsB,eASfC,EAAoB,CAC/BC,EACAC,EAAuB,MAEvB,MAAMC,EAA8C,GAEpDD,EAAWE,SAASC,IAClB,GAAIJ,EAAQK,aAAaD,GAAO,CAC9B,MAAME,EAAQN,EAAQO,aAAaH,GACnC,GAAIE,IAAU,KAAM,CAClBJ,EAAgBE,GAAQJ,EAAQO,aAAaH,GAE/CJ,EAAQQ,gBAAgBJ,OAI5B,OAAOF,SAGIO,EAAgB,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AO,MACzC,MAAMC,EAAS3E,SAASyE,GACxB,MAAO,GAAI,EAAIC,EAAQC","sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: unknown } => {\n const attributeObject: { [key: string]: unknown } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = element.getAttribute(attr);\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || \"\";\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\n\nexport const getInputHelperTextID = (id: string): string => {\n return id + \"-helper-text\";\n};\n\nexport const getInputValidationTextID = (id: string): string => {\n return id + \"-validation-text\";\n};\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string => {\n return `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\nexport const isMobileOrTablet = (): boolean => {\n let isMobileOrTablet = false;\n if (\"maxTouchPoints\" in navigator) {\n isMobileOrTablet = navigator.maxTouchPoints > 0;\n }\n return isMobileOrTablet;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean => {\n if (!value) {\n return true;\n }\n\n return value.trim().length === 0;\n};\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[]\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n return ungroupedOptions.find((option) => option.value === value)?.label;\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions\n): IcMenuOption[] => {\n let rawFilteredOptions;\n\n if (position === \"anywhere\") {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().includes(searchString.toLowerCase()) ||\n option.description?.toLowerCase().includes(searchString.toLowerCase())\n );\n } else {\n return option.label.toLowerCase().includes(searchString.toLowerCase());\n }\n });\n } else {\n rawFilteredOptions = options.filter((option) => {\n if (includeDescriptions) {\n return (\n option.label.toLowerCase().startsWith(searchString.toLowerCase()) ||\n option.description\n ?.toLowerCase()\n .startsWith(searchString.toLowerCase())\n );\n } else {\n return option.label\n .toLowerCase()\n .startsWith(searchString.toLowerCase());\n }\n });\n }\n\n return rawFilteredOptions;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string => {\n return getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n};\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground => {\n return getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n};\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (slot: Element) => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean => {\n return Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n};\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean => {\n return element.scrollWidth > element.clientWidth;\n};\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean => {\n return document.querySelector(\"ic-classification-banner:not([inline='true'])\")\n ? true\n : false;\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement | null => {\n return el.closest(\"FORM\");\n};\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const pxToRem = (px: string, base = 16) => {\n const tempPx = parseInt(px);\n return `${(1 / base) * tempPx}rem`;\n};\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as t,H as a}from"./p-589f6dd3.js";import{a as r}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t,H as a}from"./p-589f6dd3.js";import{a as r}from"./p-471820e6.js";import"./p-6f57b13c.js";const o='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}.tag{padding:var(--ic-space-xxs) var(--ic-space-sm);font-size:0.875rem;border-radius:var(--ic-space-md);display:inline-block;min-width:2.5rem;text-align:center}.small{padding:var(--ic-space-xxxs) var(--ic-space-sm);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.filled-neutral{background-color:var(--ic-architectural-600);color:var(--ic-architectural-white)}.filled-success{background-color:var(--ic-status-success);color:var(--ic-architectural-white)}.filled-warning{background-color:var(--ic-status-warning);color:var(--ic-color-primary-text)}.filled-danger{background-color:var(--ic-status-error);color:var(--ic-architectural-white)}.outlined-neutral{background-color:var(--ic-architectural-200);color:var(--ic-color-secondary-text);border:var(--ic-space-1px) solid var(--ic-architectural-400)}.outlined-success{background-color:var(--ic-status-success-background);color:var(--ic-status-success);border:var(--ic-space-1px) solid var(--ic-status-success)}.outlined-warning{background-color:var(--ic-status-warning-background);color:var(--ic-status-warning-dark);border:var(--ic-space-1px) solid var(--ic-status-warning-dark)}.outlined-danger{background-color:var(--ic-status-error-background);color:var(--ic-status-error);border:var(--ic-space-1px) solid var(--ic-status-error)}@media (forced-colors: active){.tag{border:var(--ic-hc-border);-ms-high-contrast-adjust:none;forced-color-adjust:none}}';const i=class{constructor(t){e(this,t);this.label=undefined;this.status="neutral";this.appearance="filled";this.small=false;this.announced=false}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Status Tag")}render(){const{label:e,status:r,appearance:o,small:i,announced:s}=this;return t(a,{role:s?"status":null,"aria-label":"Status"},t("strong",{class:{["tag"]:true,[`${o}-${r}`]:true,["small"]:i}},t("ic-typography",{variant:"label-uppercase","apply-vertical-margins":false},t("span",null,e))))}};i.style=o;export{i as ic_status_tag};
|
2
|
+
//# sourceMappingURL=p-4dd0eb6a.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as e,c as t,h as o,H as i,g as r}from"./p-589f6dd3.js";import{g as n,I as a,k as s,c as l,i as c,l as d}from"./p-471820e6.js";import{I as p}from"./p-6f57b13c.js";const m='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--footer-compliance-padding:1rem 0}:host(.footer-sparse){--footer-links-padding:1.5rem 0;--footer-logo-margin-bottom:var(--ic-space-lg);--footer-link-inner-flex-direction:row}:host(.footer-small){--footer-links-padding:0 0;--footer-logo-margin-bottom:var(--ic-space-md);--footer-link-inner-flex-direction:column}:host(.footer-light){--footer-theme-secondary:var(--ic-theme-secondary);--footer-theme-tertiary:var(--ic-theme-tertiary);--footer-keyline:var(--ic-keyline-lighten)}:host(.footer-dark){--footer-theme-secondary:var(--ic-theme-secondary-light);--footer-theme-tertiary:var(--ic-theme-tertiary-light);--footer-keyline:var(--ic-keyline-darken)}:host(.footer-small.footer-ungrouped){--footer-links-padding:var(--ic-space-md) 0 0 0}footer{display:flex;flex-direction:column;width:100%}.footer-description{background-color:var(--footer-theme-secondary);color:var(--ic-theme-text);border-bottom:var(--footer-keyline)}.footer-description-inner{padding:1rem 0}.footer-links{padding:var(--footer-links-padding);background-color:var(--footer-theme-secondary);color:var(--ic-theme-text)}.footer-links-inner{display:flex;flex-direction:var(--footer-link-inner-flex-direction)}.footer-compliance{background-color:var(--footer-theme-tertiary);color:var(--ic-theme-text)}.footer-compliance-inner{padding:var(--footer-compliance-padding)}.footer-logo{margin-bottom:var(--footer-logo-margin-bottom);display:flex;gap:var(--ic-space-xxl)}.footer-logo>::slotted(){margin-right:var(--ic-space-md)}.footer-caption{margin-bottom:var(--ic-space-md)}.classification-spacing{margin-bottom:var(--ic-space-lg)}@media (forced-colors: active){footer{border-top:var(--ic-hc-border)}}';const f=class{constructor(o){e(this,o);this.footerResized=t(this,"footerResized",7);this.resizeObserverCallback=e=>{if(e!==this.deviceSize){this.deviceSize=e}this.footerResized.emit()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const e=n();this.resizeObserverCallback(e)}));this.resizeObserver.observe(this.footerEl)};this.description=undefined;this.aligned="left";this.breakpoint="medium";this.groupLinks=false;this.caption=undefined;this.copyright=true;this.deviceSize=a.XL;this.foregroundColor=s()}isSmall(){const e=this.breakpoint;return e==="extra small"?this.deviceSize<a.XS:e==="small"?this.deviceSize<a.S:e==="medium"?this.deviceSize<a.M:e==="large"?this.deviceSize<a.L:e==="extra large"?this.deviceSize<a.XL:false}themeChangeHandler(e){const t=e.detail;this.foregroundColor=t.mode}componentWillLoad(){this.deviceSize=n()}componentDidLoad(){l(this.runResizeObserver)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){const{aligned:e,caption:t,copyright:r,description:n,groupLinks:s,foregroundColor:l}=this;const m=this.isSmall();return o(i,{class:{footer:true,[`footer-${m?"small":"sparse"}`]:true,[`footer-${s?"grouped":"ungrouped"}`]:true,[`footer-${l}`]:true,[p.Dark]:l===p.Dark,[p.Light]:l===p.Light}},o("footer",{ref:e=>this.footerEl=e},o("div",{class:"footer-description"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-description-inner"},o("ic-typography",{variant:"body"},o("slot",{name:"description"},n))))),o("div",{class:"footer-links"},s&&m?o("div",{class:"footer-links-inner"},o("slot",{name:"link"})):o("ic-section-container",{fullHeight:true,aligned:e},o("div",{class:"footer-links-inner"},o("slot",{name:"link"})))),o("div",{class:"footer-compliance"},o("ic-section-container",{aligned:e,fullHeight:true},o("div",{class:"footer-compliance-inner"},c(this.el,"logo")&&o("div",{class:"footer-logo"},o("slot",{name:"logo"})),(c(this.el,"caption")||t)&&o("div",{class:"footer-caption"},o("ic-typography",{variant:this.deviceSize<=a.M?"caption":"body"},o("slot",{name:"caption"},t))),r&&o("div",{class:{["footer-copyright"]:true,["classification-spacing"]:d()}},o("ic-typography",{variant:this.deviceSize<=a.M?"caption-uppercase":"label-uppercase"},"© Crown Copyright")))))))}get el(){return r(this)}};f.style=m;export{f as ic_footer};
|
2
|
+
//# sourceMappingURL=p-50421f27.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/components/ic-footer/ic-footer.css?tag=ic-footer&encapsulation=shadow","src/components/ic-footer/ic-footer.tsx"],"names":["icFooterCss","Footer","this","resizeObserverCallback","currSize","deviceSize","footerResized","emit","runResizeObserver","resizeObserver","ResizeObserver","getCurrentDeviceSize","observe","footerEl","IC_DEVICE_SIZES","XL","getThemeForegroundColor","[object Object]","bp","breakpoint","XS","S","M","L","ev","theme","detail","foregroundColor","mode","checkResizeObserver","disconnect","aligned","caption","copyright","description","groupLinks","small","isSmall","h","Host","class","footer","IcThemeForegroundEnum","Dark","Light","ref","fullHeight","variant","name","isSlotUsed","el","hasClassificationBanner"],"mappings":"2KAAA,MAAMA,EAAc,0/HCuCPC,EAAM,4EAmETC,KAAAC,uBAA0BC,IAChC,GAAIA,IAAaF,KAAKG,WAAY,CAChCH,KAAKG,WAAaD,EAEpBF,KAAKI,cAAcC,QAGbL,KAAAM,kBAAoB,KAC1BN,KAAKO,eAAiB,IAAIC,gBAAe,KACvC,MAAMN,EAAWO,IACjBT,KAAKC,uBAAuBC,MAG9BF,KAAKO,eAAeG,QAAQV,KAAKW,mDAhEH,uBAKW,yBAKZ,4CAUF,qBAECC,EAAgBC,wBAEAC,IAEtCC,UACN,MAAMC,EAAKhB,KAAKiB,WAEhB,OAAOD,IAAO,cACVhB,KAAKG,WAAaS,EAAgBM,GAClCF,IAAO,QACPhB,KAAKG,WAAaS,EAAgBO,EAClCH,IAAO,SACPhB,KAAKG,WAAaS,EAAgBQ,EAClCJ,IAAO,QACPhB,KAAKG,WAAaS,EAAgBS,EAClCL,IAAO,cACPhB,KAAKG,WAAaS,EAAgBC,GAClC,MAINE,mBAAmBO,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BxB,KAAKyB,gBAAkBF,EAAMG,KAsB/BX,oBACEf,KAAKG,WAAaM,IAGpBM,mBACEY,EAAoB3B,KAAKM,mBAG3BS,uBACEf,KAAKO,eAAeqB,aAGtBb,SACE,MAAMc,QACJA,EAAOC,QACPA,EAAOC,UACPA,EAASC,YACTA,EAAWC,WACXA,EAAUR,gBACVA,GACEzB,KACJ,MAAMkC,EAAQlC,KAAKmC,UAEnB,OACEC,EAACC,EAAI,CACHC,MAAO,CACLC,OAAQ,KACRxB,CAAC,UAAUmB,EAAQ,QAAU,YAAa,KAC1CnB,CAAC,UAAUkB,EAAa,UAAY,eAAgB,KACpDlB,CAAC,UAAUU,KAAoB,KAE/BV,CAACyB,EAAsBC,MACrBhB,IAAoBe,EAAsBC,KAC5C1B,CAACyB,EAAsBE,OACrBjB,IAAoBe,EAAsBE,QAG9CN,EAAA,SAAA,CAAQO,IAAMhC,GAAcX,KAAKW,SAAWA,GAE1CyB,EAAA,MAAA,CAAKE,MAAM,sBACTF,EAAA,uBAAA,CAAsBP,QAASA,EAASe,WAAY,MAClDR,EAAA,MAAA,CAAKE,MAAM,4BACTF,EAAA,gBAAA,CAAeS,QAAQ,QACrBT,EAAA,OAAA,CAAMU,KAAK,eAAed,OAOlCI,EAAA,MAAA,CAAKE,MAAM,gBACRL,GAAcC,EACbE,EAAA,MAAA,CAAKE,MAAM,sBACTF,EAAA,OAAA,CAAMU,KAAK,UAGbV,EAAA,uBAAA,CAAsBQ,WAAU,KAACf,QAASA,GACxCO,EAAA,MAAA,CAAKE,MAAM,sBACTF,EAAA,OAAA,CAAMU,KAAK,YAOnBV,EAAA,MAAA,CAAKE,MAAM,qBACTF,EAAA,uBAAA,CAAsBP,QAASA,EAASe,WAAY,MAClDR,EAAA,MAAA,CAAKE,MAAM,2BACRS,EAAW/C,KAAKgD,GAAI,SACnBZ,EAAA,MAAA,CAAKE,MAAM,eAETF,EAAA,OAAA,CAAMU,KAAK,WAGbC,EAAW/C,KAAKgD,GAAI,YAAclB,IAClCM,EAAA,MAAA,CAAKE,MAAM,kBACTF,EAAA,gBAAA,CACES,QACE7C,KAAKG,YAAcS,EAAgBQ,EAC/B,UACA,QAGNgB,EAAA,OAAA,CAAMU,KAAK,WAAWhB,KAI3BC,GACCK,EAAA,MAAA,CACEE,MAAO,CACLvB,CAAC,oBAAqB,KACtBA,CAAC,0BAA2BkC,MAG9Bb,EAAA,gBAAA,CACES,QACE7C,KAAKG,YAAcS,EAAgBQ,EAC/B,oBACA,mBAAiB","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n\n --footer-compliance-padding: 1rem 0;\n}\n\n:host(.footer-sparse) {\n --footer-links-padding: 1.5rem 0;\n --footer-logo-margin-bottom: var(--ic-space-lg);\n --footer-link-inner-flex-direction: row;\n}\n\n:host(.footer-small) {\n --footer-links-padding: 0 0;\n --footer-logo-margin-bottom: var(--ic-space-md);\n --footer-link-inner-flex-direction: column;\n}\n\n:host(.footer-light) {\n --footer-theme-secondary: var(--ic-theme-secondary);\n --footer-theme-tertiary: var(--ic-theme-tertiary);\n --footer-keyline: var(--ic-keyline-lighten);\n}\n\n:host(.footer-dark) {\n --footer-theme-secondary: var(--ic-theme-secondary-light);\n --footer-theme-tertiary: var(--ic-theme-tertiary-light);\n --footer-keyline: var(--ic-keyline-darken);\n}\n\n:host(.footer-small.footer-ungrouped) {\n --footer-links-padding: var(--ic-space-md) 0 0 0;\n}\n\n/* Main inner footer element */\nfooter {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n/* Description */\n\n.footer-description {\n background-color: var(--footer-theme-secondary);\n color: var(--ic-theme-text);\n border-bottom: var(--footer-keyline);\n}\n\n.footer-description-inner {\n padding: 1rem 0;\n}\n\n/* Links */\n\n.footer-links {\n padding: var(--footer-links-padding);\n background-color: var(--footer-theme-secondary);\n color: var(--ic-theme-text);\n}\n\n.footer-links-inner {\n display: flex;\n flex-direction: var(--footer-link-inner-flex-direction);\n}\n\n/* Compliance */\n\n.footer-compliance {\n background-color: var(--footer-theme-tertiary);\n color: var(--ic-theme-text);\n}\n\n.footer-compliance-inner {\n padding: var(--footer-compliance-padding);\n}\n\n.footer-logo {\n margin-bottom: var(--footer-logo-margin-bottom);\n display: flex;\n gap: var(--ic-space-xxl);\n}\n\n.footer-logo > ::slotted() {\n margin-right: var(--ic-space-md);\n}\n\n.footer-caption {\n margin-bottom: var(--ic-space-md);\n}\n\n.classification-spacing {\n margin-bottom: var(--ic-space-lg);\n}\n\n@media (forced-colors: active) {\n footer {\n border-top: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Prop,\n State,\n h,\n Host,\n Listen,\n} from \"@stencil/core\";\nimport { IC_DEVICE_SIZES } from \"../../utils/constants\";\nimport {\n getCurrentDeviceSize,\n getThemeForegroundColor,\n checkResizeObserver,\n hasClassificationBanner,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport {\n IcAlignment,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { IcFooterBreakpoints } from \"./ic-footer.types\";\n\n/**\n * @slot description - Content will be rendered at the top of the footer.\n * @slot link - Content will be rendered between description and logos.\n * @slot logo - Content will be rendered underneath footer links.\n * @slot caption - Content will be rendered above Crown Copyright.\n */\n\n@Component({\n tag: \"ic-footer\",\n styleUrl: \"ic-footer.css\",\n shadow: true,\n})\nexport class Footer {\n @Element() el: HTMLIcFooterElement;\n\n /**\n * @internal Triggers on page resize and triggers style changes in footer links and link groups\n */\n @Event() footerResized: EventEmitter<void>;\n\n /**\n * The description displayed at the top of the footer.\n */\n @Prop() description: string;\n\n /**\n * The alignment of the section containers used within the footer.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n\n /**\n * The screen size breakpoint at which to switch to the small layout.\n */\n @Prop() breakpoint?: IcFooterBreakpoints = \"medium\";\n\n /**\n * If `true`, the footer will be set up to handle link groups instead of standalone links.\n */\n @Prop() groupLinks?: boolean = false;\n\n /**\n * The caption displayed at the bottom of the footer.\n */\n @Prop() caption: string;\n\n /**\n * If `true`, the footer will display the crown copyright at the bottom.\n */\n @Prop() copyright: boolean = true;\n\n @State() deviceSize: number = IC_DEVICE_SIZES.XL;\n\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n\n private isSmall() {\n const bp = this.breakpoint;\n\n return bp === \"extra small\"\n ? this.deviceSize < IC_DEVICE_SIZES.XS\n : bp === \"small\"\n ? this.deviceSize < IC_DEVICE_SIZES.S\n : bp === \"medium\"\n ? this.deviceSize < IC_DEVICE_SIZES.M\n : bp === \"large\"\n ? this.deviceSize < IC_DEVICE_SIZES.L\n : bp === \"extra large\"\n ? this.deviceSize < IC_DEVICE_SIZES.XL\n : false;\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n\n private resizeObserver: ResizeObserver;\n private footerEl: HTMLElement;\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n this.footerResized.emit();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.footerEl);\n };\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n this.resizeObserver.disconnect();\n }\n\n render() {\n const {\n aligned,\n caption,\n copyright,\n description,\n groupLinks,\n foregroundColor,\n } = this;\n const small = this.isSmall();\n\n return (\n <Host\n class={{\n footer: true,\n [`footer-${small ? \"small\" : \"sparse\"}`]: true,\n [`footer-${groupLinks ? \"grouped\" : \"ungrouped\"}`]: true,\n [`footer-${foregroundColor}`]: true,\n // Slots will be able to infer their own color\n [IcThemeForegroundEnum.Dark]:\n foregroundColor === IcThemeForegroundEnum.Dark,\n [IcThemeForegroundEnum.Light]:\n foregroundColor === IcThemeForegroundEnum.Light,\n }}\n >\n <footer ref={(footerEl) => (this.footerEl = footerEl)}>\n {/* Description */}\n <div class=\"footer-description\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-description-inner\">\n <ic-typography variant=\"body\">\n <slot name=\"description\">{description}</slot>\n </ic-typography>\n </div>\n </ic-section-container>\n </div>\n\n {/* Links */}\n <div class=\"footer-links\">\n {groupLinks && small ? (\n <div class=\"footer-links-inner\">\n <slot name=\"link\" />\n </div>\n ) : (\n <ic-section-container fullHeight aligned={aligned}>\n <div class=\"footer-links-inner\">\n <slot name=\"link\" />\n </div>\n </ic-section-container>\n )}\n </div>\n\n {/* Compliance (logo, caption, copyright) */}\n <div class=\"footer-compliance\">\n <ic-section-container aligned={aligned} fullHeight={true}>\n <div class=\"footer-compliance-inner\">\n {isSlotUsed(this.el, \"logo\") && (\n <div class=\"footer-logo\">\n {/* Logo */}\n <slot name=\"logo\" />\n </div>\n )}\n {(isSlotUsed(this.el, \"caption\") || caption) && (\n <div class=\"footer-caption\">\n <ic-typography\n variant={\n this.deviceSize <= IC_DEVICE_SIZES.M\n ? \"caption\"\n : \"body\"\n }\n >\n <slot name=\"caption\">{caption}</slot>\n </ic-typography>\n </div>\n )}\n {copyright && (\n <div\n class={{\n [\"footer-copyright\"]: true,\n [\"classification-spacing\"]: hasClassificationBanner(),\n }}\n >\n <ic-typography\n variant={\n this.deviceSize <= IC_DEVICE_SIZES.M\n ? \"caption-uppercase\"\n : \"label-uppercase\"\n }\n >\n © Crown Copyright\n </ic-typography>\n </div>\n )}\n </div>\n </ic-section-container>\n </div>\n </footer>\n </Host>\n );\n }\n}\n"]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as i,h as e,H as t,g as s,c as n,F as c}from"./p-589f6dd3.js";import{a as o}from"./p-6f57b13c.js";import{i as a,L as r,a as u}from"./p-471820e6.js";import{C as h}from"./p-8c7f4343.js";import{c as l}from"./p-ec26fc38.js";const d="ic-input-component-container{display:flex;border:var(--ic-space-1px) solid\n var(--border-color, var(--ic-architectural-400));border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-slow);height:2.5rem;width:var(--input-width, 20rem);padding:var(--ic-space-1px);background-color:var(--ic-architectural-white);box-sizing:border-box;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.fullwidth{width:100%}ic-input-component-container.disabled,ic-input-component-container.disabled:hover{border:var(--ic-space-1px) dashed var(--ic-architectural-200)}ic-input-component-container.readonly,ic-input-component-container.readonly:hover{border:none;padding:0}ic-input-component-container.error{border:var(--ic-space-xxxs) solid var(--ic-status-error);padding:0}ic-input-component-container.warning{border:var(--ic-space-xxxs) solid var(--ic-status-warning-mid);padding:0}ic-input-component-container.success{border:var(--ic-space-xxxs) solid var(--ic-status-success);padding:0}ic-input-component-container.small{height:var(--ic-space-xl)}ic-input-component-container.multiline{height:auto}ic-input-component-container .icon-container{margin-top:var(--ic-space-xxs);margin-left:0.438rem;display:flex;align-items:center}ic-input-component-container.multiline .icon-container,ic-input-component-container.multiline.small .icon-container{margin-top:0.375rem;display:block}ic-input-component-container.readonly .icon-container{margin-left:-0.313rem}ic-input-component-container.disabled ::-moz-placeholder{display:none}ic-input-component-container.disabled ::placeholder{display:none}ic-input-component-container .inline-success{margin:var(--ic-space-xs) 0.375rem;display:flex;align-items:center}ic-input-component-container.dark:hover{--border-color:var(--ic-architectural-400)}ic-input-component-container .inline-success>svg{fill:var(--ic-status-success);height:1.25rem;width:1.25rem}ic-input-component-container:hover{border-color:var(--ic-action-dark-hover);color:var(--ic-action-dark-hover)}.focus-indicator{display:flex;width:100%;margin:-0.125rem;padding:0.125rem;border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.focus-indicator:focus-within,.focus-indicator-enabled{box-shadow:var(--ic-border-focus)}.focus-indicator.dark:focus-within{box-shadow:var(--ic-border-focus)}@media (forced-colors: active){ic-input-component-container,.focus-indicator{transition:none}ic-input-component-container:focus-within{border:var(--ic-space-1px) solid Highlight;outline:0.125rem solid Highlight}ic-input-component-container.disabled,ic-input-component-container.disabled:hover{border:var(--ic-space-1px) dashed GrayText}}";const m=class{constructor(e){i(this,e);this.disabled=false;this.readonly=false;this.validationStatus="";this.small=false;this.multiLine=false;this.validationInline=false;this.dark=false;this.fullWidth=false}render(){const{small:i,validationStatus:s,disabled:n,readonly:c,multiLine:u,fullWidth:h,dark:l,validationInline:d}=this;const m=this.validationStatus!==""&&!this.disabled&&!this.readonly?true:false;return e(t,{class:{["small"]:i,[s]:m,["disabled"]:n,["readonly"]:c,["multiline"]:u,["fullwidth"]:h,["dark"]:l}},e("div",{class:{"focus-indicator":true,dark:l}},a(this.host,"left-icon")&&e("div",{class:{["icon-container"]:true}},e("slot",{name:"left-icon"})),e("slot",null),d&&s===o.Success&&e("span",{class:{["inline-success"]:true},innerHTML:r})))}get host(){return s(this)}};m.style=d;const p="ic-input-container .component-container{display:flex;flex-direction:column}";const f=class{constructor(e){i(this,e);this.disabled=false;this.readonly=false}render(){return e(t,null,e("div",{class:{["component-container"]:true,["disabled"]:this.disabled,["readonly"]:this.readonly}},e("slot",null)))}};f.style=p;const b='html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type="button"].sc-ic-menu,[type="reset"].sc-ic-menu,[type="submit"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type="button"].sc-ic-menu::-moz-focus-inner,[type="reset"].sc-ic-menu::-moz-focus-inner,[type="submit"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type="button"].sc-ic-menu:-moz-focusring,[type="reset"].sc-ic-menu:-moz-focusring,[type="submit"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type="checkbox"].sc-ic-menu,[type="radio"].sc-ic-menu{box-sizing:border-box;padding:0}[type="number"].sc-ic-menu::-webkit-inner-spin-button,[type="number"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type="search"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type="search"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{border-radius:var(--ic-border-radius);max-height:0;width:var(--input-width, 20rem);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay)}.sc-ic-menu-h:not(.no-focus):focus-within{box-shadow:var(--ic-border-focus)}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border:var(--ic-space-1px) solid var(--ic-architectural-400);border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;max-height:0;overflow-y:hidden}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.open.sc-ic-menu-h{max-height:none;display:block}.open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:20.125rem}.full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:0.5rem 0.438rem;cursor:pointer;display:flex;align-items:center}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.small.sc-ic-menu-h .option.sc-ic-menu{padding:0.25rem 0.438rem}.option.sc-ic-menu:last-child{border-radius:0 0 var(--ic-space-1px) var(--ic-space-1px)}.option.sc-ic-menu:first-child{border-radius:var(--ic-space-1px) var(--ic-space-1px) 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-action-dark-bg-hover)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-action-dark-bg-active)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{color:var(--ic-color-secondary-text)}.option-text-container.sc-ic-menu{pointer-events:none}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:0.625rem;color:var(--ic-color-secondary-text)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-status-error);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:0.5rem;pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.option-group-title.sc-ic-menu{padding:1.5rem 0.438rem 0.5rem;color:var(--ic-color-tertiary-text)}.small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:0.75rem 0.438rem 0.25rem}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-space-1px) solid var(--ic-architectural-400)}.disabled-option.sc-ic-menu{color:var(--ic-architectural-200);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-focus-blue) !important;color:var(--ic-color-white-text) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}}';const v=class{constructor(t){i(this,t);this.menuOptionSelect=n(this,"menuOptionSelect",7);this.menuStateChange=n(this,"menuStateChange",7);this.menuOptionId=n(this,"menuOptionId",7);this.menuKeyPress=n(this,"menuKeyPress",7);this.ungroupedOptionsSet=n(this,"ungroupedOptionsSet",7);this.retryButtonClicked=n(this,"retryButtonClicked",7);this.timeoutBlur=n(this,"timeoutBlur",7);this.ungroupedOptions=[];this.isSearchBar=false;this.isSearchableSelect=false;this.preventClickOpen=false;this.hasTimedOut=false;this.isLoading=false;this.hasPreviouslyBlurred=false;this.handleClearListener=()=>{this.optionHighlighted=""};this.handleSubmitSearch=()=>{const i=this.options.findIndex((i=>i.value===this.optionHighlighted));this.setInputValue(i)};this.handleMenuChange=(i,e)=>{if(!i)this.popperInstance.destroy();this.menuStateChange.emit({open:i,focusInput:e});if(!i&&e!==false){this.inputEl.focus();this.preventClickOpen=false}};this.setNextOptionValue=i=>{if(this.ungroupedOptions[i+1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i+1].value,optionId:this.getOptionId(this.ungroupedOptions[i+1].value)})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[0].value,optionId:this.getOptionId(this.ungroupedOptions[0].value)})}};this.setPreviousOptionValue=i=>{if(this.ungroupedOptions[i-1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i-1].value,optionId:this.getOptionId(this.ungroupedOptions[i-1].value)})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1].value,optionId:this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length-1].value)})}};this.getParentEl=i=>{if(i.tagName==="IC-SEARCH-BAR"){this.isSearchBar=true}else if(i.tagName==="IC-SELECT"&&i.getAttribute("searchable")!==null&&i.getAttribute("searchable")!==undefined){this.isSearchableSelect=true}};this.arrowBehaviour=i=>{i.preventDefault();this.handleMenuChange(true)};this.setMenuOptions=()=>this.isSearchBar?this.options:this.ungroupedOptions;this.setHighlightedOption=i=>{const e=this.setMenuOptions();e[i]&&!e[i].timedOut&&(this.optionHighlighted=e[i].value||undefined)};this.autoSetInputValueKeyboardOpen=i=>{const e=this.ungroupedOptions.findIndex((i=>i.value===this.value));this.keyboardNav=false;switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);this.setNextOptionValue(e);break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);this.setPreviousOptionValue(e);break;case" ":case"Enter":if(i.target.id!=="clear-button"){this.handleMenuChange(true)}break}};this.manSetInputValueKeyboardOpen=i=>{var e;const t=this.setMenuOptions();this.keyboardNav=false;const s=t.findIndex((i=>i.value===this.optionHighlighted));const n=i=>{var e;return(e=Array.from(this.host.querySelectorAll("li"))[i])===null||e===void 0?void 0:e.id};switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);if(s<t.length-1){this.setHighlightedOption(s+1);this.menuOptionId.emit({optionId:n(s+1)})}else{this.setHighlightedOption(0);this.menuOptionId.emit({optionId:n(0)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);if(s<=0||s>t.length+1){this.setHighlightedOption(t.length-1);this.menuOptionId.emit({optionId:n(t.length-1)})}else{this.setHighlightedOption(s-1);this.menuOptionId.emit({optionId:n(s-1)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"Home":this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(0);this.menuOptionId.emit({optionId:n(0)});break;case"End":this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(t.length-1);this.menuOptionId.emit({optionId:n(t.length-1)});break;case"Enter":i.preventDefault();this.setInputValue(s);this.value=(e=t[s])===null||e===void 0?void 0:e.value;break;case"Escape":this.handleMenuChange(false);this.menuOptionId.emit({optionId:undefined});break;case"Shift":case"Tab":if(this.isSearchBar){this.keyboardNav=true}this.preventIncorrectTabOrder=true;break;case"Backspace":if(this.isSearchBar){this.parentEl.setFocus();this.setHighlightedOption(0)}else if(this.isSearchableSelect){this.parentEl.setFocus();this.value=null}this.focusFromSearchKeypress=true;break;default:if(i.key!=="Tab"){if(this.isSearchBar){this.parentEl.setFocus();this.setHighlightedOption(0)}else if(this.isSearchableSelect){this.parentEl.setFocus();this.value=null}this.focusFromSearchKeypress=true}break}};this.setInputValue=i=>{var e;const t=this.setMenuOptions();if(t[i]){this.menuOptionSelect.emit({value:(e=t[i])===null||e===void 0?void 0:e.value});this.optionHighlighted=undefined;this.menuOptionId.emit({optionId:undefined})}if(!this.hasTimedOut)this.handleMenuChange(false);else this.parentEl.setFocus()};this.handleOptionClick=i=>{const{value:e,label:t}=i.target.dataset;this.menuOptionSelect.emit({value:e,label:t});this.handleMenuChange(false)};this.handleRetry=()=>{this.retryButtonClicked.emit({value:this.value})};this.handleRetryKeyDown=i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.retryButtonClicked.emit({value:this.value,keyPressed:i.key})}};this.handleBlur=i=>{if(i.relatedTarget!==this.inputEl){if(!this.menu.contains(i.relatedTarget)){this.handleMenuChange(false,this.hasPreviouslyBlurred)}}else{this.handleMenuChange(false);this.preventClickOpen=true}if(!this.isSearchBar)this.hasPreviouslyBlurred=!!i.relatedTarget};this.handleMouseDown=i=>{i.preventDefault()};this.handleMenuKeyDown=i=>{if(this.activationType==="automatic"){this.autoSetValueOnMenuKeyDown(i)}else if(this.activationType==="manual"&&this.isSearchableSelect){this.manSetInputValueKeyboardOpen(i)}};this.emitMenuKeyPress=(i,e)=>{this.menuKeyPress.emit({isNavKey:i,key:e})};this.autoSetValueOnMenuKeyDown=i=>{i.cancelBubble=true;const e=this.ungroupedOptions.findIndex((i=>i.value===this.value));const t=this.inputEl.tagName==="INPUT";this.keyboardNav=false;switch(i.key){case" ":i.preventDefault();break;case"ArrowUp":if(!this.hasTimedOut){i.preventDefault();this.setPreviousOptionValue(e);this.keyboardNav=true}break;case"ArrowDown":if(!this.hasTimedOut){i.preventDefault();this.setNextOptionValue(e);this.keyboardNav=true}break;case"Home":this.menuOptionSelect.emit({value:this.ungroupedOptions[0].value});this.keyboardNav=true;break;case"End":this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1].value});this.keyboardNav=true;break;case"Enter":!this.hasTimedOut&&this.handleMenuChange(false);break;case"Escape":this.handleMenuChange(false);break;case"Backspace":if(t){this.inputEl.focus()}break;case"Shift":break;default:if(t&&i.key!=="Tab"&&!this.hasTimedOut){this.inputEl.focus()}if(i.key.length===1){this.keyboardNav=true}break}this.emitMenuKeyPress(this.keyboardNav,i.key)};this.handleMenuKeyUp=i=>{if(i.key==="Tab"&&i.shiftKey){this.preventClickOpen=false}};this.getOptionId=i=>`${this.menuId}-${i}`;this.getOptionAriaLabel=(i,e)=>{let t=i.label;if(i.description){t=`${t}, ${i.description}`}if(e){return`${t}, ${e.label} group`}else{return t}};this.getSortedOptions=i=>{let e=[];if(i.sort){e=i.sort(((i,e)=>i.recommended&&!e.recommended?-1:0))}return e};this.isManualMode=this.activationType==="manual";this.scrollToSelected=i=>{const e=i.querySelector(".option[aria-selected]");if(e){const t=e.offsetTop+e.offsetHeight;if(t>i.scrollTop+i.offsetHeight||t<i.scrollTop+i.offsetHeight){i.scrollTop=e.offsetTop}e.focus()}};this.loadUngroupedOptions=()=>{if(this.options.length>0&&this.options.map){this.options.map((i=>{if(i.children){i.children.map((i=>!i.disabled&&this.ungroupedOptions.push(i)))}else if(!i.disabled){this.ungroupedOptions.push(i)}}))}this.ungroupedOptions=this.getSortedOptions(this.ungroupedOptions);this.ungroupedOptionsSet.emit({options:this.ungroupedOptions})};this.setMenuScrollbar=()=>{let i=0;this.host.querySelectorAll(".option").forEach((e=>i+=e.clientHeight));if(i>=320){this.menu.classList.add("menu-scroll")}};this.handleTimeoutBlur=i=>{this.timeoutBlur.emit({ev:i})};this.optionContent=i=>{var t;return e(c,null,i.loading&&e("ic-loading-indicator",{size:"icon"}),e("div",{class:"option-text-container"},e("ic-typography",{variant:"body","aria-hidden":"true"},e("p",null,i.label)),i.description&&e("ic-typography",{id:`${this.getOptionId(i===null||i===void 0?void 0:i.value)}-description`,class:"option-description",variant:"caption","aria-hidden":"true"},e("p",null,i.description))),!!i.value&&!!this.value&&(i===null||i===void 0?void 0:i.value.toLowerCase())===((t=this.value)===null||t===void 0?void 0:t.toLowerCase())&&this.parentEl.tagName!=="IC-SEARCH-BAR"&&e("span",{class:"check-icon",innerHTML:h}))};this.displayOption=(i,t,s)=>{const{open:n,value:o,keyboardNav:a,isManualMode:r,initialOptionsListRender:u,optionHighlighted:h,options:l}=this;return e("li",{id:this.getOptionId(i.value),class:{option:true,"focused-option":r?(a||u)&&i.value===h:a&&i.value===o,"last-recommended-option":i.recommended&&l[t+1]&&!l[t+1].recommended,"disabled-option":i.disabled,"loading-option":i.loading,timeout:i.timedOut},role:"option",tabindex:n&&(i.value===o||i.value===h)&&a?"0":"-1","aria-label":this.getOptionAriaLabel(i,s),"aria-selected":i.value===o,"aria-disabled":i.disabled?"true":"false",onClick:!i.timedOut&&!i.loading&&this.handleOptionClick,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,"data-value":i.value,"data-label":i.label},i.timedOut?e(c,null,e("div",{class:"loading-error-info"},e("svg",{class:"error-icon-svg","aria-labelledby":"error-title",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#000000"},e("title",{id:"error-title"},"Error"),e("path",{d:"M0 0h24v24H0z",fill:"none"}),e("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})),e("ic-typography",{variant:"label"},i.label)),e("ic-button",{size:"small",variant:"tertiary",onClick:this.handleRetry,onKeyDown:this.handleRetryKeyDown,onBlur:this.handleTimeoutBlur,id:"retry-button"},"Retry")):this.optionContent(i))};this.open=undefined;this.options=undefined;this.small=false;this.menuId=undefined;this.value=undefined;this.activationType="automatic";this.inputEl=undefined;this.parentEl=undefined;this.inputLabel=undefined;this.anchorEl=undefined;this.fullWidth=false;this.autoFocusOnSelected=true;this.keyboardNav=false;this.optionHighlighted=undefined;this.focusFromSearchKeypress=false;this.initialOptionsListRender=false;this.preventIncorrectTabOrder=false}watchOptionsHandler(i){this.hasTimedOut=i.some((i=>i.timedOut));this.isLoading=i.some((i=>i.loading));this.ungroupedOptions=[];this.loadUngroupedOptions()}async handleClickOpen(){if(!this.preventClickOpen){this.menuStateChange.emit({open:!this.open});this.keyboardNav=false}this.preventClickOpen=false}async handleKeyboardOpen(i){this.keyboardNav=false;if(this.activationType==="automatic"){this.autoSetInputValueKeyboardOpen(i)}else{this.manSetInputValueKeyboardOpen(i)}}async handleSetFirstOption(){this.setHighlightedOption(0)}connectedCallback(){this.getParentEl(this.parentEl);if(this.isSearchBar){this.setHighlightedOption(0);this.initialOptionsListRender=true}}componentWillLoad(){this.loadUngroupedOptions();this.parentEl.addEventListener("icClear",this.handleClearListener);this.parentEl.addEventListener("icSubmitSearch",this.handleSubmitSearch);this.hasTimedOut=this.options.some((i=>i.timedOut));this.isLoading=this.options.some((i=>i.loading))}componentDidLoad(){if(this.isSearchBar&&this.parentEl.disableFilter){this.focusFromSearchKeypress=true}u([{prop:this.open,propName:"open"},{prop:this.options,propName:"options"},{prop:this.menuId,propName:"menu-id"},{prop:this.inputLabel,propName:"input-label"}],"Menu")}componentDidRender(){if(this.open){this.popperInstance=l(this.anchorEl,this.host,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,7]}},{name:"flip",options:{fallbackPlacements:["top"],rootBoundary:"viewport"}}]})}if(this.open&&!!this.options.length){this.setMenuScrollbar()}}componentDidUpdate(){const i=this.options.some((i=>i.value===this.value));const e=this.optionHighlighted!==null&&this.optionHighlighted!==undefined&&this.optionHighlighted!=="";if(this.open&&this.options.length!==0){if(this.value&&this.keyboardNav&&i&&this.autoFocusOnSelected&&!this.isSearchableSelect){this.scrollToSelected(this.menu)}else if(this.inputEl.tagName!=="IC-TEXT-FIELD"&&this.inputEl.tagName!=="INPUT"){this.menu.focus()}else if(e&&!this.focusFromSearchKeypress&&!this.preventIncorrectTabOrder){const i=this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);if(i){i.focus()}}}}disconnectedCallback(){this.parentEl.removeEventListener("icClear",this.handleClearListener);this.parentEl.removeEventListener("icSubmitSearch",this.handleSubmitSearch)}render(){const{inputLabel:i,options:s,menuId:n,value:c,fullWidth:o,hasTimedOut:a,isLoading:r,small:u,open:h,inputEl:l,keyboardNav:d}=this;return e(t,{class:{"full-width":o,"no-focus":(l===null||l===void 0?void 0:l.tagName)==="INPUT"||a||r,small:u,open:h}},s.length!==0&&e("ul",{id:n,class:"menu",role:"listbox","aria-label":i,"aria-activedescendant":c!=null&&c!==""?this.getOptionId(c):"",tabindex:h&&!d&&(l===null||l===void 0?void 0:l.tagName)!=="INPUT"?"0":"-1",ref:i=>this.menu=i,onKeyDown:this.handleMenuKeyDown,onKeyUp:this.handleMenuKeyUp,onBlur:this.handleBlur},this.getSortedOptions(s).map(((i,t)=>{if(i.children){if(i.children.length>0){return e("div",null,e("ic-typography",{class:"option-group-title",role:"presentation",variant:"subtitle-small"},e("p",null,i.label)),i.children.map((e=>this.displayOption(e,t,i))))}else{return null}}else{return this.displayOption(i,t)}}))))}get host(){return s(this)}static get watchers(){return{options:["watchOptionsHandler"]}}};v.style=b;export{m as ic_input_component_container,f as ic_input_container,v as ic_menu};
|
2
|
+
//# sourceMappingURL=p-559b3d17.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/components/ic-input-component-container/ic-input-component-container.css?tag=ic-input-component-container","src/components/ic-input-component-container/ic-input-component-container.tsx","src/components/ic-input-container/ic-input-container.css?tag=ic-input-container","src/components/ic-input-container/ic-input-container.tsx","src/components/ic-menu/ic-menu.css?tag=ic-menu&encapsulation=scoped","src/components/ic-menu/ic-menu.tsx"],"names":["icInputComponentContainerCss","InputComponentContainer","[object Object]","small","validationStatus","disabled","readonly","multiLine","fullWidth","dark","validationInline","this","hasValidationStatus","h","Host","class","focus-indicator","isSlotUsed","host","name","IcInformationStatus","Success","innerHTML","successIcon","icInputContainerCss","InputContainer","icMenuCss","Menu","ungroupedOptions","isSearchBar","isSearchableSelect","preventClickOpen","hasTimedOut","isLoading","hasPreviouslyBlurred","handleClearListener","optionHighlighted","handleSubmitSearch","highlightedOptionIndex","options","findIndex","option","value","setInputValue","handleMenuChange","open","focusInput","popperInstance","destroy","menuStateChange","emit","inputEl","focus","setNextOptionValue","selectedOptionIndex","menuOptionSelect","optionId","getOptionId","setPreviousOptionValue","length","getParentEl","parent","tagName","getAttribute","undefined","arrowBehaviour","event","preventDefault","setMenuOptions","setHighlightedOption","highlightedIndex","menuOptions","timedOut","autoSetInputValueKeyboardOpen","keyboardNav","key","target","id","manSetInputValueKeyboardOpen","index","_a","Array","from","querySelectorAll","menuOptionId","preventIncorrectTabOrder","focusFromSearchKeypress","parentEl","setFocus","handleOptionClick","label","dataset","handleRetry","retryButtonClicked","handleRetryKeyDown","ev","keyPressed","handleBlur","relatedTarget","menu","contains","handleMouseDown","handleMenuKeyDown","activationType","autoSetValueOnMenuKeyDown","emitMenuKeyPress","isNavKey","menuKeyPress","cancelBubble","handleMenuKeyUp","shiftKey","menuId","getOptionAriaLabel","parentOption","ariaLabel","description","getSortedOptions","sorted","sort","optionA","optionB","recommended","isManualMode","scrollToSelected","selectedOption","querySelector","elTop","offsetTop","offsetHeight","scrollTop","loadUngroupedOptions","map","children","push","ungroupedOptionsSet","setMenuScrollbar","optionsHeight","forEach","clientHeight","classList","add","handleTimeoutBlur","timeoutBlur","optionContent","Fragment","loading","size","variant","aria-hidden","toLowerCase","Check","displayOption","initialOptionsListRender","focused-option","last-recommended-option","disabled-option","loading-option","timeout","role","tabindex","aria-label","aria-selected","aria-disabled","onClick","onBlur","onMouseDown","data-value","data-label","aria-labelledby","xmlns","viewBox","fill","d","onKeyDown","newOptions","some","opt","addEventListener","disableFilter","onComponentRequiredPropUndefined","prop","propName","inputLabel","createPopper","anchorEl","placement","modifiers","offset","fallbackPlacements","rootBoundary","inputValueInOptions","optionHighlightedIsSet","autoFocusOnSelected","highlightedEl","removeEventListener","full-width","no-focus","aria-activedescendant","ref","el","onKeyUp","childOption"],"mappings":"qOAAA,MAAMA,EAA+B,ooFCgBxBC,EAAuB,6CAIN,oBAIA,4BAI2B,cAI9B,qBAII,4BAIO,gBAKX,qBAKI,MAI7BC,SACE,MAAMC,MACJA,EAAKC,iBACLA,EAAgBC,SAChBA,EAAQC,SACRA,EAAQC,UACRA,EAASC,UACTA,EAASC,KACTA,EAAIC,iBACJA,GACEC,KACJ,MAAMC,EACJD,KAAKP,mBAAqB,KAAOO,KAAKN,WAAaM,KAAKL,SACpD,KACA,MACN,OACEO,EAACC,EAAI,CACHC,MAAO,CACLb,CAAC,SAAUC,EACXD,CAACE,GAAmBQ,EACpBV,CAAC,YAAaG,EACdH,CAAC,YAAaI,EACdJ,CAAC,aAAcK,EACfL,CAAC,aAAcM,EACfN,CAAC,QAASO,IAGZI,EAAA,MAAA,CACEE,MAAO,CACLC,kBAAmB,KACnBP,KAAMA,IAGPQ,EAAWN,KAAKO,KAAM,cACrBL,EAAA,MAAA,CACEE,MAAO,CACLb,CAAC,kBAAmB,OAGtBW,EAAA,OAAA,CAAMM,KAAK,eAGfN,EAAA,OAAA,MAECH,GACCN,IAAqBgB,EAAoBC,SACvCR,EAAA,OAAA,CACEE,MAAO,CACLb,CAAC,kBAAmB,MAEtBoB,UAAWC,4CCxG3B,MAAMC,EAAsB,oFCMfC,EAA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B,IAAO,MAAPA,SAAO,OAAA,EAAPA,EAASW,WAAY,QAAU,IAAM,KAE/DwI,IAAMC,GAAQ5L,KAAKwF,KAAOoG,EAC1B1B,UAAWlK,KAAK2F,kBAChBkG,QAAS7L,KAAKkG,gBACduD,OAAQzJ,KAAKsF,YAEZtF,KAAKyG,iBAAiB7E,GAAS4F,KAAI,CAAC1F,EAAQsC,KAC3C,GAAItC,EAAO2F,SAAU,CACnB,GAAI3F,EAAO2F,SAASzE,OAAS,EAAG,CAC9B,OACE9C,EAAA,MAAA,KACEA,EAAA,gBAAA,CACEE,MAAM,qBACN+I,KAAK,eACLX,QAAQ,kBAERtI,EAAA,IAAA,KAAI4B,EAAOiD,QAEZjD,EAAO2F,SAASD,KAAKsE,GACpB9L,KAAK4I,cAAckD,EAAa1H,EAAOtC,UAIxC,CACL,OAAO,UAEJ,CACL,OAAO9B,KAAK4I,cAAc9G,EAAQsC","sourcesContent":["ic-input-component-container {\n /**\n * @prop --border-color: Border colour of the input component container\n */\n\n display: flex;\n border: var(--ic-space-1px) solid\n var(--border-color, var(--ic-architectural-400));\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-slow);\n height: 2.5rem;\n width: var(--input-width, 20rem);\n padding: var(--ic-space-1px);\n background-color: var(--ic-architectural-white);\n box-sizing: border-box;\n fill: var(--ic-architectural-400);\n outline: none;\n}\n\nic-input-component-container.fullwidth {\n width: 100%;\n}\n\nic-input-component-container.disabled,\nic-input-component-container.disabled:hover {\n border: var(--ic-space-1px) dashed var(--ic-architectural-200);\n}\n\nic-input-component-container.readonly,\nic-input-component-container.readonly:hover {\n border: none;\n padding: 0;\n}\n\nic-input-component-container.error {\n border: var(--ic-space-xxxs) solid var(--ic-status-error);\n padding: 0;\n}\n\nic-input-component-container.warning {\n border: var(--ic-space-xxxs) solid var(--ic-status-warning-mid);\n padding: 0;\n}\n\nic-input-component-container.success {\n border: var(--ic-space-xxxs) solid var(--ic-status-success);\n padding: 0;\n}\n\nic-input-component-container.small {\n height: var(--ic-space-xl);\n}\n\nic-input-component-container.multiline {\n height: auto;\n}\n\nic-input-component-container .icon-container {\n margin-top: var(--ic-space-xxs);\n margin-left: 0.438rem;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.multiline .icon-container,\nic-input-component-container.multiline.small .icon-container {\n margin-top: 0.375rem;\n display: block;\n}\n\nic-input-component-container.readonly .icon-container {\n margin-left: -0.313rem;\n}\n\nic-input-component-container.disabled ::placeholder {\n display: none;\n}\n\nic-input-component-container .inline-success {\n margin: var(--ic-space-xs) 0.375rem;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.dark:hover {\n --border-color: var(--ic-architectural-400);\n}\n\nic-input-component-container .inline-success > svg {\n fill: var(--ic-status-success);\n height: 1.25rem;\n width: 1.25rem;\n}\n\nic-input-component-container:hover {\n border-color: var(--ic-action-dark-hover);\n color: var(--ic-action-dark-hover);\n}\n\n.focus-indicator {\n display: flex;\n width: 100%;\n margin: -0.125rem;\n padding: 0.125rem;\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n}\n\n.focus-indicator:focus-within,\n.focus-indicator-enabled {\n box-shadow: var(--ic-border-focus);\n}\n\n.focus-indicator.dark:focus-within {\n box-shadow: var(--ic-border-focus);\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n ic-input-component-container,\n .focus-indicator {\n transition: none;\n }\n\n ic-input-component-container:focus-within {\n border: var(--ic-space-1px) solid Highlight;\n outline: 0.125rem solid Highlight;\n }\n\n ic-input-component-container.disabled,\n ic-input-component-container.disabled:hover {\n border: var(--ic-space-1px) dashed GrayText;\n }\n}\n","import { Component, Element, Host, Prop, h } from \"@stencil/core\";\n\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n} from \"../../utils/types\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport { isSlotUsed } from \"../../utils/helpers\";\n\n/**\n * @slot left-icon - Content will be placed to the left of the input.\n */\n@Component({\n tag: \"ic-input-component-container\",\n styleUrl: \"ic-input-component-container.css\",\n})\nexport class InputComponentContainer {\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly: boolean = false;\n /**\n * The validation status of the input component container - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n /**\n * If `true`, the small styling will be applied to the input component container.\n */\n @Prop() small: boolean = false;\n /**\n * If `true`, the input component container will allow for multiple lines.\n */\n @Prop() multiLine: boolean = false;\n /**\n * If `true`, the validation will display inline.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * If `true`, the dark variant of the input component container will be displayed.\n */\n @Prop() dark?: boolean = false;\n\n /**\n * If `true`, the input component container will fill the width of the container it is in.\n */\n @Prop() fullWidth: boolean = false;\n\n @Element() host: HTMLIcInputComponentContainerElement;\n\n render() {\n const {\n small,\n validationStatus,\n disabled,\n readonly,\n multiLine,\n fullWidth,\n dark,\n validationInline,\n } = this;\n const hasValidationStatus =\n this.validationStatus !== \"\" && !this.disabled && !this.readonly\n ? true\n : false;\n return (\n <Host\n class={{\n [\"small\"]: small,\n [validationStatus]: hasValidationStatus,\n [\"disabled\"]: disabled,\n [\"readonly\"]: readonly,\n [\"multiline\"]: multiLine,\n [\"fullwidth\"]: fullWidth,\n [\"dark\"]: dark,\n }}\n >\n <div\n class={{\n \"focus-indicator\": true,\n dark: dark,\n }}\n >\n {isSlotUsed(this.host, \"left-icon\") && (\n <div\n class={{\n [\"icon-container\"]: true,\n }}\n >\n <slot name=\"left-icon\" />\n </div>\n )}\n <slot></slot>\n\n {validationInline &&\n validationStatus === IcInformationStatus.Success && (\n <span\n class={{\n [\"inline-success\"]: true,\n }}\n innerHTML={successIcon}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n","ic-input-container .component-container {\n display: flex;\n flex-direction: column;\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: \"ic-input-container\",\n styleUrl: \"ic-input-container.css\",\n})\nexport class InputContainer {\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly?: boolean = false;\n\n render() {\n return (\n <Host>\n <div\n class={{\n [\"component-container\"]: true,\n [\"disabled\"]: this.disabled,\n [\"readonly\"]: this.readonly,\n }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n","@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-menu: z-index of menu\n */\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.open) .menu {\n transition: max-height var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n max-height: 0;\n width: var(--input-width, 20rem);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-menu);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n}\n\n:host(:not(.no-focus):focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n#retry-button::part(button) {\n height: var(--ic-space-lg);\n}\n\n.small #retry-button::part(button) {\n height: var(--ic-space-md);\n}\n\n.menu {\n text-decoration: none;\n list-style-type: none;\n border: var(--ic-space-1px) solid var(--ic-architectural-400);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n max-height: 0;\n overflow-y: hidden;\n}\n\n.menu-scroll {\n overflow-y: auto;\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n max-height: none;\n display: block;\n}\n\n:host(.open) .menu {\n visibility: visible;\n max-height: 20.125rem;\n}\n\n:host(.full-width) {\n width: 100%;\n}\n\n.option {\n padding: 0.5rem 0.438rem;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.option:not(.loading-option) {\n justify-content: space-between;\n}\n\n:host(.small) .option {\n padding: 0.25rem 0.438rem;\n}\n\n.option:last-child {\n border-radius: 0 0 var(--ic-space-1px) var(--ic-space-1px);\n}\n\n.option:first-child {\n border-radius: var(--ic-space-1px) var(--ic-space-1px) 0 0;\n}\n\n.option:not(.disabled-option):hover {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.option:not(.disabled-option):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.option:focus-visible {\n outline: var(--ic-hc-focus-outline);\n}\n\n.option:not(.disabled-option) .option-description {\n color: var(--ic-color-secondary-text);\n}\n\n.option-text-container {\n pointer-events: none;\n}\n\n.option.loading-option .option-text-container {\n margin-left: 0.625rem;\n color: var(--ic-color-secondary-text);\n}\n\n.error-icon-svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n fill: var(--ic-status-error);\n align-self: center;\n display: flex;\n margin-right: calc(var(--ic-space-xxs) * 1.2);\n}\n\n.loading-error-info {\n display: flex;\n}\n\n.check-icon {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: 0.5rem;\n pointer-events: none;\n}\n\n.focused-option .check-icon * {\n fill: currentcolor;\n}\n\n.option-group-title {\n padding: 1.5rem 0.438rem 0.5rem;\n color: var(--ic-color-tertiary-text);\n}\n\n:host(.small) .option-group-title {\n padding: 0.75rem 0.438rem 0.25rem;\n}\n\n.last-recommended-option {\n border-bottom: var(--ic-space-1px) solid var(--ic-architectural-400);\n}\n\n.disabled-option {\n color: var(--ic-architectural-200);\n cursor: default;\n pointer-events: none;\n}\n\n.focused-option,\n.focused-option .option-description {\n background-color: var(--ic-focus-blue) !important;\n color: var(--ic-color-white-text) !important;\n}\n\n:host(.no-results) li {\n cursor: no-drop;\n}\n\n:host(.no-results) li:hover {\n background-color: transparent;\n}\n\n@media (forced-colors: active) {\n .focused-option:focus {\n outline: none;\n border: 0.125rem solid transparent;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n Method,\n State,\n Watch,\n Fragment,\n} from \"@stencil/core\";\nimport { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\n\nimport {\n IcActivationTypes,\n IcMenuOption,\n IcValueEventDetail,\n} from \"../../utils/types\";\nimport Check from \"../../assets/check-icon.svg\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport {\n IcOptionSelectEventDetail,\n IcMenuChangeEventDetail,\n IcMenuOptionIdEventDetail,\n} from \"./ic-menu.types\";\n\n@Component({\n tag: \"ic-menu\",\n styleUrl: \"ic-menu.css\",\n scoped: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Menu {\n private menu: HTMLUListElement;\n private ungroupedOptions: IcMenuOption[] = [];\n private popperInstance: PopperInstance;\n private isSearchBar: boolean = false;\n private isSearchableSelect: boolean = false;\n // Prevents menu re-opening immediately after it is closed on blur when clicking input.\n private preventClickOpen: boolean = false;\n private hasTimedOut: boolean = false;\n private isLoading: boolean = false;\n private hasPreviouslyBlurred: boolean = false;\n\n @Element() host: HTMLIcMenuElement;\n\n /**\n * If `true`, the menu will be displayed open.\n */\n @Prop({ reflect: true }) open!: boolean;\n\n /**\n * The possible menu selection options.\n */\n @Prop() options!: IcMenuOption[];\n\n /**\n * If `true`, the small styling will be applied to the menu.\n */\n @Prop({ reflect: true }) small?: boolean = false;\n\n /**\n * The ID of the menu.\n */\n @Prop() menuId!: string;\n\n /**\n * The value of the currently selected option.\n */\n @Prop() value!: string;\n\n /**\n * Determines whether options manually set as values (by pressing 'Enter') when they receive focus using keyboard navigation.\n */\n @Prop() activationType?: IcActivationTypes = \"automatic\";\n\n /**\n * The reference to the input element.\n */\n @Prop() inputEl!: HTMLElement;\n\n /**\n * @internal - The parent element if ic-menu is nested inside another component.\n */\n @Prop() parentEl?: HTMLElement;\n\n /**\n * The label for the input element.\n */\n @Prop() inputLabel!: string;\n\n /**\n * The reference to an anchor element the menu will position itself from when rendered.\n */\n @Prop() anchorEl!: HTMLElement;\n\n /**\n * If `true`, the menu will fill the width of the container.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * @internal If `true`, autofocus will be applied on selected item when menu is open.\n */\n @Prop() autoFocusOnSelected: boolean = true;\n\n @State() keyboardNav: boolean = false;\n @State() optionHighlighted: string;\n @State() focusFromSearchKeypress: boolean = false;\n @State() initialOptionsListRender: boolean = false;\n @State() preventIncorrectTabOrder: boolean = false;\n\n @Watch(\"options\")\n watchOptionsHandler(newOptions: IcMenuOption[]): void {\n this.hasTimedOut = newOptions.some((opt) => opt.timedOut);\n this.isLoading = newOptions.some((opt) => opt.loading);\n this.ungroupedOptions = [];\n this.loadUngroupedOptions();\n }\n\n /**\n * @internal Emitted when an option is selected.\n */\n @Event() menuOptionSelect!: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * @internal Emitted when state of menu changes (i.e. open or close).\n */\n @Event() menuStateChange!: EventEmitter<IcMenuChangeEventDetail>;\n\n /**\n * @internal Emitted when an option has been highlighted\n */\n @Event() menuOptionId: EventEmitter<IcMenuOptionIdEventDetail>;\n\n /**\n * @internal Emitted when key is pressed while menu is open\n */\n @Event() menuKeyPress: EventEmitter<{ isNavKey: boolean; key: string }>;\n\n /**\n * @internal Emitted when the ungrouped options have been set.\n */\n @Event() ungroupedOptionsSet: EventEmitter<{ options: IcMenuOption[] }>;\n\n /**\n * @internal Emitted when the retry button is clicked\n */\n @Event() retryButtonClicked: EventEmitter<IcValueEventDetail>;\n\n /**\n * @internal Emitted when the timeout menu loses focus\n */\n @Event() timeoutBlur: EventEmitter<{ ev: FocusEvent }>;\n\n private handleClearListener = (): void => {\n this.optionHighlighted = \"\";\n };\n\n private handleSubmitSearch = (): void => {\n const highlightedOptionIndex = this.options.findIndex(\n (option) => option.value === this.optionHighlighted\n );\n\n this.setInputValue(highlightedOptionIndex);\n };\n\n private handleMenuChange = (open: boolean, focusInput?: boolean): void => {\n if (!open) this.popperInstance.destroy();\n this.menuStateChange.emit({ open, focusInput });\n\n if (!open && focusInput !== false) {\n this.inputEl.focus();\n this.preventClickOpen = false;\n }\n };\n\n private setNextOptionValue = (selectedOptionIndex: number): void => {\n if (this.ungroupedOptions[selectedOptionIndex + 1]) {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex + 1].value,\n optionId: this.getOptionId(\n this.ungroupedOptions[selectedOptionIndex + 1].value\n ),\n });\n } else {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[0].value,\n optionId: this.getOptionId(this.ungroupedOptions[0].value),\n });\n }\n };\n\n private setPreviousOptionValue = (selectedOptionIndex: number): void => {\n if (this.ungroupedOptions[selectedOptionIndex - 1]) {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex - 1].value,\n optionId: this.getOptionId(\n this.ungroupedOptions[selectedOptionIndex - 1].value\n ),\n });\n } else {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[this.ungroupedOptions.length - 1].value,\n optionId: this.getOptionId(\n this.ungroupedOptions[this.ungroupedOptions.length - 1].value\n ),\n });\n }\n };\n\n /**\n * @internal If menu is opened with the mouse, emit menuStateChange custom event.\n */\n @Method()\n async handleClickOpen(): Promise<void> {\n if (!this.preventClickOpen) {\n this.menuStateChange.emit({ open: !this.open });\n this.keyboardNav = false;\n }\n this.preventClickOpen = false;\n }\n\n /**\n * Used alongside activationType\n * If menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.\n * @param {KeyboardEvent} event - keyboard event\n */\n @Method()\n async handleKeyboardOpen(event: KeyboardEvent): Promise<void> {\n this.keyboardNav = false;\n\n if (this.activationType === \"automatic\") {\n this.autoSetInputValueKeyboardOpen(event);\n } else {\n this.manSetInputValueKeyboardOpen(event);\n }\n }\n\n /**\n * @internal Used to highlight the first option in the menu.\n */\n @Method()\n async handleSetFirstOption(): Promise<void> {\n this.setHighlightedOption(0);\n }\n\n private getParentEl = (parent: HTMLElement) => {\n if (parent.tagName === \"IC-SEARCH-BAR\") {\n this.isSearchBar = true;\n } else if (\n parent.tagName === \"IC-SELECT\" &&\n parent.getAttribute(\"searchable\") !== null &&\n parent.getAttribute(\"searchable\") !== undefined\n ) {\n this.isSearchableSelect = true;\n }\n };\n\n private arrowBehaviour = (event: KeyboardEvent): void => {\n event.preventDefault();\n this.handleMenuChange(true);\n };\n\n private setMenuOptions = () =>\n this.isSearchBar ? this.options : this.ungroupedOptions;\n\n private setHighlightedOption = (highlightedIndex: number): void => {\n const menuOptions = this.setMenuOptions();\n\n menuOptions[highlightedIndex] &&\n !menuOptions[highlightedIndex].timedOut &&\n (this.optionHighlighted =\n menuOptions[highlightedIndex].value || undefined);\n };\n\n private autoSetInputValueKeyboardOpen = (event: KeyboardEvent) => {\n const selectedOptionIndex = this.ungroupedOptions.findIndex(\n (option) => option.value === this.value\n );\n\n this.keyboardNav = false;\n\n switch (event.key) {\n case \"ArrowDown\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setNextOptionValue(selectedOptionIndex);\n break;\n case \"ArrowUp\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setPreviousOptionValue(selectedOptionIndex);\n break;\n case \" \":\n case \"Enter\":\n if ((event.target as HTMLElement).id !== \"clear-button\") {\n this.handleMenuChange(true);\n }\n break;\n }\n };\n\n private manSetInputValueKeyboardOpen = (event: KeyboardEvent) => {\n const menuOptions = this.setMenuOptions();\n\n this.keyboardNav = false;\n\n const highlightedOptionIndex = menuOptions.findIndex(\n (option) => option.value === this.optionHighlighted\n );\n\n const getOptionId = (index: number): string =>\n Array.from(this.host.querySelectorAll(\"li\"))[index]?.id;\n\n switch (event.key) {\n case \"ArrowDown\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n if (highlightedOptionIndex < menuOptions.length - 1) {\n this.setHighlightedOption(highlightedOptionIndex + 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex + 1),\n });\n } else {\n this.setHighlightedOption(0);\n this.menuOptionId.emit({\n optionId: getOptionId(0),\n });\n }\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"ArrowUp\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n if (\n highlightedOptionIndex <= 0 ||\n highlightedOptionIndex > menuOptions.length + 1\n ) {\n this.setHighlightedOption(menuOptions.length - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(menuOptions.length - 1),\n });\n } else {\n this.setHighlightedOption(highlightedOptionIndex - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex - 1),\n });\n }\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"Home\":\n this.keyboardNav = true;\n event.preventDefault();\n this.arrowBehaviour(event);\n this.setHighlightedOption(0);\n this.menuOptionId.emit({\n optionId: getOptionId(0),\n });\n break;\n case \"End\":\n this.keyboardNav = true;\n event.preventDefault();\n this.arrowBehaviour(event);\n this.setHighlightedOption(menuOptions.length - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(menuOptions.length - 1),\n });\n break;\n case \"Enter\":\n event.preventDefault();\n this.setInputValue(highlightedOptionIndex);\n this.value = menuOptions[highlightedOptionIndex]?.value;\n break;\n case \"Escape\":\n this.handleMenuChange(false);\n this.menuOptionId.emit({ optionId: undefined });\n break;\n case \"Shift\":\n case \"Tab\":\n if (this.isSearchBar) {\n this.keyboardNav = true;\n }\n this.preventIncorrectTabOrder = true;\n break;\n case \"Backspace\":\n if (this.isSearchBar) {\n (this.parentEl as HTMLIcSearchBarElement).setFocus();\n this.setHighlightedOption(0);\n } else if (this.isSearchableSelect) {\n (this.parentEl as HTMLIcSelectElement).setFocus();\n this.value = null;\n }\n this.focusFromSearchKeypress = true;\n break;\n default:\n if (event.key !== \"Tab\") {\n if (this.isSearchBar) {\n (this.parentEl as HTMLIcSearchBarElement).setFocus();\n this.setHighlightedOption(0);\n } else if (this.isSearchableSelect) {\n (this.parentEl as HTMLIcSelectElement).setFocus();\n this.value = null;\n }\n this.focusFromSearchKeypress = true;\n }\n break;\n }\n };\n\n private setInputValue = (highlightedOptionIndex: number) => {\n const menuOptions = this.setMenuOptions();\n\n if (menuOptions[highlightedOptionIndex]) {\n this.menuOptionSelect.emit({\n value: menuOptions[highlightedOptionIndex]?.value,\n });\n this.optionHighlighted = undefined;\n this.menuOptionId.emit({ optionId: undefined });\n }\n if (!this.hasTimedOut) this.handleMenuChange(false);\n else (this.parentEl as HTMLIcSearchBarElement).setFocus();\n };\n\n private handleOptionClick = (event: Event): void => {\n const { value, label } = (event.target as HTMLLIElement).dataset;\n this.menuOptionSelect.emit({ value, label });\n this.handleMenuChange(false);\n };\n\n private handleRetry = (): void => {\n this.retryButtonClicked.emit({ value: this.value });\n };\n\n private handleRetryKeyDown = (ev: KeyboardEvent): void => {\n if (ev.key === \"Enter\" || ev.key === \" \") {\n ev.preventDefault();\n this.retryButtonClicked.emit({ value: this.value, keyPressed: ev.key });\n }\n };\n\n private handleBlur = (event: FocusEvent): void => {\n if (event.relatedTarget !== this.inputEl) {\n if (!this.menu.contains(event.relatedTarget as HTMLElement)) {\n this.handleMenuChange(false, this.hasPreviouslyBlurred);\n }\n } else {\n this.handleMenuChange(false);\n this.preventClickOpen = true;\n }\n if (!this.isSearchBar) this.hasPreviouslyBlurred = !!event.relatedTarget;\n };\n\n private handleMouseDown = (event: Event): void => {\n event.preventDefault();\n };\n\n private handleMenuKeyDown = (event: KeyboardEvent) => {\n if (this.activationType === \"automatic\") {\n this.autoSetValueOnMenuKeyDown(event);\n } else if (this.activationType === \"manual\" && this.isSearchableSelect) {\n this.manSetInputValueKeyboardOpen(event);\n }\n };\n\n private emitMenuKeyPress = (isNavKey: boolean, key: string) => {\n this.menuKeyPress.emit({ isNavKey: isNavKey, key: key });\n };\n\n private autoSetValueOnMenuKeyDown = (event: KeyboardEvent): void => {\n event.cancelBubble = true;\n const selectedOptionIndex = this.ungroupedOptions.findIndex(\n (option) => option.value === this.value\n );\n\n const isSearchableSelect = this.inputEl.tagName === \"INPUT\";\n\n this.keyboardNav = false;\n\n switch (event.key) {\n case \" \":\n event.preventDefault();\n break;\n case \"ArrowUp\":\n if (!this.hasTimedOut) {\n event.preventDefault();\n this.setPreviousOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n }\n break;\n case \"ArrowDown\":\n if (!this.hasTimedOut) {\n event.preventDefault();\n this.setNextOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n }\n break;\n case \"Home\":\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[0].value,\n });\n this.keyboardNav = true;\n break;\n case \"End\":\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[this.ungroupedOptions.length - 1].value,\n });\n this.keyboardNav = true;\n break;\n case \"Enter\":\n !this.hasTimedOut && this.handleMenuChange(false);\n break;\n case \"Escape\":\n this.handleMenuChange(false);\n break;\n case \"Backspace\":\n if (isSearchableSelect) {\n this.inputEl.focus();\n }\n break;\n case \"Shift\":\n break;\n default:\n if (isSearchableSelect && event.key !== \"Tab\" && !this.hasTimedOut) {\n this.inputEl.focus();\n }\n if (event.key.length === 1) {\n this.keyboardNav = true;\n }\n break;\n }\n this.emitMenuKeyPress(this.keyboardNav, event.key);\n };\n\n private handleMenuKeyUp = (event: KeyboardEvent): void => {\n if (event.key === \"Tab\" && event.shiftKey) {\n this.preventClickOpen = false;\n }\n };\n\n private getOptionId = (value: string): string => {\n return `${this.menuId}-${value}`;\n };\n\n private getOptionAriaLabel = (\n option: IcMenuOption,\n parentOption: IcMenuOption\n ): string => {\n let ariaLabel = option.label;\n\n if (option.description) {\n ariaLabel = `${ariaLabel}, ${option.description}`;\n }\n\n if (parentOption) {\n return `${ariaLabel}, ${parentOption.label} group`;\n } else {\n return ariaLabel;\n }\n };\n\n private getSortedOptions = (options: IcMenuOption[]): IcMenuOption[] => {\n let sorted: IcMenuOption[] = [];\n if (options.sort) {\n sorted = options.sort((optionA, optionB) =>\n optionA.recommended && !optionB.recommended ? -1 : 0\n );\n }\n return sorted;\n };\n\n private isManualMode = this.activationType === \"manual\";\n\n private scrollToSelected = (menu: HTMLUListElement) => {\n const selectedOption = menu.querySelector(\n \".option[aria-selected]\"\n ) as HTMLElement;\n\n if (selectedOption) {\n const elTop = selectedOption.offsetTop + selectedOption.offsetHeight;\n if (\n elTop > menu.scrollTop + menu.offsetHeight ||\n elTop < menu.scrollTop + menu.offsetHeight\n ) {\n menu.scrollTop = selectedOption.offsetTop;\n }\n selectedOption.focus();\n }\n };\n\n private loadUngroupedOptions = () => {\n if (this.options.length > 0 && this.options.map) {\n this.options.map((option) => {\n if (option.children) {\n option.children.map(\n (option) => !option.disabled && this.ungroupedOptions.push(option)\n );\n } else if (!option.disabled) {\n this.ungroupedOptions.push(option);\n }\n });\n }\n this.ungroupedOptions = this.getSortedOptions(this.ungroupedOptions);\n this.ungroupedOptionsSet.emit({ options: this.ungroupedOptions });\n };\n\n private setMenuScrollbar = () => {\n let optionsHeight = 0;\n this.host\n .querySelectorAll(\".option\")\n .forEach((option) => (optionsHeight += option.clientHeight));\n\n if (optionsHeight >= 320) {\n this.menu.classList.add(\"menu-scroll\");\n }\n };\n\n private handleTimeoutBlur = (ev: FocusEvent) => {\n this.timeoutBlur.emit({ ev });\n };\n\n connectedCallback(): void {\n this.getParentEl(this.parentEl);\n\n if (this.isSearchBar) {\n this.setHighlightedOption(0);\n this.initialOptionsListRender = true;\n }\n }\n\n componentWillLoad(): void {\n this.loadUngroupedOptions();\n this.parentEl.addEventListener(\"icClear\", this.handleClearListener);\n this.parentEl.addEventListener(\"icSubmitSearch\", this.handleSubmitSearch);\n this.hasTimedOut = this.options.some((opt) => opt.timedOut);\n this.isLoading = this.options.some((opt) => opt.loading);\n }\n\n componentDidLoad(): void {\n if (\n this.isSearchBar &&\n (this.parentEl as HTMLIcSearchBarElement).disableFilter\n ) {\n this.focusFromSearchKeypress = true;\n }\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.open, propName: \"open\" },\n { prop: this.options, propName: \"options\" },\n { prop: this.menuId, propName: \"menu-id\" },\n { prop: this.inputLabel, propName: \"input-label\" },\n //NOTE: no check for value, input-el or anchor-el as otherwise get console errors on first load of select component\n ],\n \"Menu\"\n );\n }\n\n componentDidRender(): void {\n if (this.open) {\n this.popperInstance = createPopper(this.anchorEl, this.host, {\n placement: \"bottom\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 7],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n }\n\n if (this.open && !!this.options.length) {\n this.setMenuScrollbar();\n }\n }\n\n componentDidUpdate(): void {\n const inputValueInOptions: boolean = this.options.some(\n (option) => option.value === this.value\n );\n\n const optionHighlightedIsSet =\n this.optionHighlighted !== null &&\n this.optionHighlighted !== undefined &&\n this.optionHighlighted !== \"\";\n\n if (this.open && this.options.length !== 0) {\n if (\n this.value &&\n this.keyboardNav &&\n inputValueInOptions &&\n this.autoFocusOnSelected &&\n !this.isSearchableSelect\n ) {\n this.scrollToSelected(this.menu);\n } else if (\n this.inputEl.tagName !== \"IC-TEXT-FIELD\" &&\n this.inputEl.tagName !== \"INPUT\"\n ) {\n this.menu.focus();\n } else if (\n optionHighlightedIsSet &&\n !this.focusFromSearchKeypress &&\n !this.preventIncorrectTabOrder\n ) {\n const highlightedEl = this.host.querySelector(\n `li[data-value=\"${this.optionHighlighted}\"]`\n ) as HTMLElement;\n\n if (highlightedEl) {\n highlightedEl.focus();\n }\n }\n }\n }\n\n disconnectedCallback(): void {\n this.parentEl.removeEventListener(\"icClear\", this.handleClearListener);\n this.parentEl.removeEventListener(\n \"icSubmitSearch\",\n this.handleSubmitSearch\n );\n }\n\n private optionContent = (option: IcMenuOption) => {\n return (\n <Fragment>\n {option.loading && <ic-loading-indicator size=\"icon\" />}\n <div class=\"option-text-container\">\n <ic-typography variant=\"body\" aria-hidden=\"true\">\n <p>{option.label}</p>\n </ic-typography>\n {option.description && (\n <ic-typography\n id={`${this.getOptionId(option?.value)}-description`}\n class=\"option-description\"\n variant=\"caption\"\n aria-hidden=\"true\"\n >\n <p>{option.description}</p>\n </ic-typography>\n )}\n </div>\n {!!option.value &&\n !!this.value &&\n option?.value.toLowerCase() === this.value?.toLowerCase() &&\n this.parentEl.tagName !== \"IC-SEARCH-BAR\" && (\n <span class=\"check-icon\" innerHTML={Check} />\n )}\n </Fragment>\n );\n };\n\n private displayOption = (\n option: IcMenuOption,\n index?: number,\n parentOption?: IcMenuOption\n ): HTMLLIElement => {\n const {\n open,\n value,\n keyboardNav,\n isManualMode,\n initialOptionsListRender,\n optionHighlighted,\n options,\n } = this;\n\n return (\n <li\n id={this.getOptionId(option.value)}\n class={{\n option: true,\n \"focused-option\": isManualMode\n ? (keyboardNav || initialOptionsListRender) &&\n option.value === optionHighlighted\n : keyboardNav && option.value === value,\n \"last-recommended-option\":\n option.recommended &&\n options[index + 1] &&\n !options[index + 1].recommended,\n \"disabled-option\": option.disabled,\n \"loading-option\": option.loading,\n timeout: option.timedOut,\n }}\n role=\"option\"\n tabindex={\n open &&\n (option.value === value || option.value === optionHighlighted) &&\n keyboardNav\n ? \"0\"\n : \"-1\"\n }\n aria-label={this.getOptionAriaLabel(option, parentOption)}\n aria-selected={option.value === value}\n aria-disabled={option.disabled ? \"true\" : \"false\"}\n onClick={!option.timedOut && !option.loading && this.handleOptionClick}\n onBlur={this.handleBlur}\n onMouseDown={this.handleMouseDown}\n data-value={option.value}\n data-label={option.label}\n >\n {option.timedOut ? (\n <Fragment>\n <div class=\"loading-error-info\">\n <svg\n class=\"error-icon-svg\"\n aria-labelledby=\"error-title\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"#000000\"\n >\n <title id=\"error-title\">Error</title>\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\" />\n </svg>\n <ic-typography variant=\"label\">{option.label}</ic-typography>\n </div>\n <ic-button\n size=\"small\"\n variant=\"tertiary\"\n onClick={this.handleRetry}\n onKeyDown={this.handleRetryKeyDown}\n onBlur={this.handleTimeoutBlur}\n id=\"retry-button\"\n >\n Retry\n </ic-button>\n </Fragment>\n ) : (\n this.optionContent(option)\n )}\n </li>\n );\n };\n\n render() {\n const {\n inputLabel,\n options,\n menuId,\n value,\n fullWidth,\n hasTimedOut,\n isLoading,\n small,\n open,\n inputEl,\n keyboardNav,\n } = this;\n\n return (\n <Host\n class={{\n \"full-width\": fullWidth,\n \"no-focus\": inputEl?.tagName === \"INPUT\" || hasTimedOut || isLoading,\n small: small,\n open: open,\n }}\n >\n {options.length !== 0 && (\n <ul\n id={menuId}\n class=\"menu\"\n role=\"listbox\"\n aria-label={inputLabel}\n aria-activedescendant={\n value != null && value !== \"\" ? this.getOptionId(value) : \"\"\n }\n tabindex={\n open && !keyboardNav && inputEl?.tagName !== \"INPUT\" ? \"0\" : \"-1\"\n }\n ref={(el) => (this.menu = el)}\n onKeyDown={this.handleMenuKeyDown}\n onKeyUp={this.handleMenuKeyUp}\n onBlur={this.handleBlur}\n >\n {this.getSortedOptions(options).map((option, index) => {\n if (option.children) {\n if (option.children.length > 0) {\n return (\n <div>\n <ic-typography\n class=\"option-group-title\"\n role=\"presentation\"\n variant=\"subtitle-small\"\n >\n <p>{option.label}</p>\n </ic-typography>\n {option.children.map((childOption) =>\n this.displayOption(childOption, index, option)\n )}\n </div>\n );\n } else {\n return null;\n }\n } else {\n return this.displayOption(option, index);\n }\n })}\n </ul>\n )}\n </Host>\n );\n }\n}\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,h as t,H as e,g as o}from"./p-589f6dd3.js";import{D as n,k as s,g as a,p as r}from"./p-3dea2867.js";import{C as d}from"./p-06321d19.js";import"./p-6f57b13c.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.in-side-menu){border-bottom:var(--ic-space-1px) solid var(--ic-architectural-200);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-theme-text);display:flex;align-items:center;justify-content:center;padding:0 var(--ic-space-md);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none}:host(.in-side-menu) .navigation-group{height:2.5rem;width:100%;text-align:left}:host(.in-side-menu) .navigation-group .ic-typography-label{width:11.875rem}:host(.in-side-menu) .navigation-group-side-menu{color:var(--ic-action-default);justify-content:flex-start;padding:0 var(--ic-space-md) 0 var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-action-default);justify-content:flex-start;padding-left:var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-expanded{margin-bottom:var(--ic-space-xs)}:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,:host(.in-side-menu) .navigation-group-side-menu-expanded::after{border-style:solid;border-width:0.125em 0.125em 0 0;content:"";display:inline-block;height:0.45em;left:0.75em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}:host .navigation-group:hover,:host .navigation-group:active,:host .selected{background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);outline:none;cursor:pointer}:host(:not(.in-side-menu)) .navigation-group:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);z-index:var(--ic-z-index-navigation-item);transition:box-shadow var(--ic-easing-transition-fast)}:host(.in-side-menu) .navigation-group-side-menu:hover,:host(.in-side-menu) .navigation-group-side-menu:active,:host(.in-side-menu) .navigation-group-side-menu:focus{background-color:var(--ic-architectural-20);color:var(--ic-action-default);cursor:auto;box-shadow:none;outline:none}:host(.in-side-menu) .navigation-group-side-menu:focus{outline:var(--ic-hc-focus-outline)}:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-action-dark-bg-hover);color:var(--ic-action-default);cursor:pointer}:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus){background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-default)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{color:var(--ic-action-default);box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline)}:host .navigation-group-dropdown{background-color:var(--ic-architectural-20);border-bottom:var(--ic-space-1px) solid var(--ic-architectural-300);position:absolute;left:0;right:0;padding:var(--ic-space-xs) var(--ic-space-md);box-shadow:0 0.375rem 0.5rem -0.375rem rgba(0 0 0 / 20%);z-index:calc(var(--ic-z-index-navigation-item) - 1)}:host .navigation-group-dropdown-items-list{list-style:none;display:flex;flex-flow:column wrap;align-content:flex-start;padding-left:var(--ic-space-md);max-height:16.5rem}:host .chevron-toggle-icon-wrapper{display:flex;align-items:center}:host .chevron-toggle-icon-wrapper svg{transform:rotate(90deg);height:var(--ic-space-lg);width:var(--ic-space-lg)}:host .chevron-toggle-icon-closed svg{transform:rotate(-90deg)}:host(.expanded) .grouped-links-wrapper{height:var(--navigation-child-items-height, auto);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.collapsed) .grouped-links-wrapper{height:var(--navigation-child-items-height, 0);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .navigation-group{height:var(--navigation-group-height);width:var(--navigation-group-width);justify-content:var(--navigation-group-justify-content);padding-right:var(--navigation-group-expand-toggle-padding)}:host(.navigation-group-side-nav) .navigation-group:hover,:host(.navigation-group-side-nav) .navigation-group:active,:host(.navigation-group-side-nav) .selected{background-color:var(--navigation-group-hover);color:var(--navigation-group-text-hover)}:host(.navigation-group-side-nav) .navigation-group:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background:none}:host(.navigation-group-side-nav) .ic-typography-caption{position:var(--navigation-group-title-position);left:var(--navigation-group-title-position-left);white-space:nowrap}.menu-visibility-visible{visibility:visible}.menu-visibility-hidden{visibility:hidden}';const c=class{constructor(e){i(this,e);this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS=50;this.sideNavExpandHandler=()=>{setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)};this.topNavResizedHandler=i=>{const t=i.detail.size;if(t!==this.deviceSize){this.deviceSize=t;this.inTopNavSideMenu=t<=n.L}};this.setGroupedNavItemTabIndex=i=>{this.el.querySelectorAll("ic-navigation-item").forEach((t=>{const e=t.shadowRoot.querySelector("a")||t.querySelector("a");if(e){e.setAttribute("tabindex",i)}}))};this.toggleGroupedLinkWrapperHeight=(i,t)=>{if(i){if(t){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`);this.setGroupedNavItemTabIndex("0")}else{i.setAttribute("style",`--navigation-child-items-height: 0`);this.setGroupedNavItemTabIndex("-1")}}};this.toggleExpanded=()=>{this.expanded=!this.expanded;const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");this.toggleGroupedLinkWrapperHeight(i,this.expanded)};this.handleClick=i=>{if(this.navigationType==="top"&&i.detail){this.toggleDropdown()}else{this.toggleExpanded()}};this.handleBlur=i=>{const t=i.relatedTarget;if(!this.el.contains(t)){this.hideDropdown()}};this.handleTopNavKeydown=i=>{if(!this.inTopNavSideMenu&&i.key==="Escape"){this.hideDropdown();this.el.blur()}else if(i.key===" "||i.key==="Enter"){this.toggleDropdown()}};this.handleKeydown=i=>{if(i.key==="Enter"||i.key==="Space"){switch(this.navigationType){case"top":this.handleTopNavKeydown(i);break;case"side":this.toggleExpanded();i.preventDefault();break;default:this.toggleExpanded();break}}};this.handleMouseLeave=i=>{const t=i.relatedTarget;if(!this.el.contains(t)&&t!==this.dropdown&&document.activeElement!==this.el&&!this.el.contains(document.activeElement)){this.hideDropdown()}};this.triggerShowDropdown=()=>{this.showDropdown()};this.renderDropdownGroupedLinks=()=>t("div",{class:{["navigation-group-dropdown"]:!this.inTopNavSideMenu,["navigation-group-dropdown-side-menu"]:this.inTopNavSideMenu,["selected"]:this.dropdownOpen&&!this.inTopNavSideMenu},onMouseLeave:!this.inTopNavSideMenu?this.handleMouseLeave:null,ref:i=>this.dropdown=i},t("nav",{class:{["navigation-group-dropdown-items"]:!this.inTopNavSideMenu}},t("ul",null,t("slot",null))));this.renderGroupedLinks=()=>t("ul",{class:"grouped-links-wrapper"},t("slot",null));this.getNavigationChildItemsHeight=()=>{const i=this.el.querySelectorAll("ic-navigation-item").length||0;const t=this.el.querySelector("ic-navigation-item")||null;if(this.navigationType==="side"&&!!i&&t){return`${parseInt(getComputedStyle(t).height)*i}px`}return"auto"};this.setInitialGroupedLinksWrapperHeight=()=>{const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");if(i&&this.expanded){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`)}};this.renderNavigationItems=()=>{if(this.dropdownOpen||this.inTopNavSideMenu&&!this.expandable){return this.renderDropdownGroupedLinks()}if(this.navigationType!=="top"){return this.renderGroupedLinks()}return null};this.label=undefined;this.expandable=false;this.dropdownOpen=false;this.inTopNavSideMenu=false;this.deviceSize=n.XL;this.focusStyle=s();this.navigationType=undefined;this.parentEl=undefined;this.expanded=true}childBlurHandler(){this.hideDropdown()}navItemClickHandler(){this.hideDropdown()}themeChangeHandler(i){const t=i.detail;this.focusStyle=t.mode}async setFocus(){if(this.groupEl){this.groupEl.focus()}}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}showDropdown(){if(!this.dropdownOpen){this.toggleDropdown()}}hideDropdown(){if(this.dropdownOpen){this.toggleDropdown()}}componentWillLoad(){this.deviceSize=a();const i=r(this.el);this.navigationType=i.navType;this.parentEl=i.parent;if(this.deviceSize<=n.L&&this.navigationType==="top"){this.inTopNavSideMenu=true}if(this.navigationType==="side"){this.parentEl.addEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.addEventListener("topNavResized",this.topNavResizedHandler)}}componentDidLoad(){setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}disconnectedCallback(){if(this.navigationType==="side"){this.parentEl.removeEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.removeEventListener("topNavResized",this.topNavResizedHandler)}}render(){const{label:i,dropdownOpen:o,inTopNavSideMenu:n,expandable:s}=this;const a=!n||s?"button":"div";return t(e,{class:{["in-side-menu"]:n,expanded:this.expanded,collapsed:!this.expanded,["navigation-group-side-nav"]:this.navigationType==="side"},role:"listitem"},t(a,{tabindex:n&&!s?"-1":"0",onMouseOver:!n&&this.navigationType==="top"?this.triggerShowDropdown:null,onMouseLeave:this.navigationType==="top"&&this.handleMouseLeave,onBlur:this.handleBlur,onClick:s?this.handleClick:null,onKeyDown:this.handleKeydown,class:{["navigation-group"]:true,[this.focusStyle]:!n,["navigation-group-side-menu"]:n&&!s,["navigation-group-side-menu-collapsed"]:n&&s&&!o,["navigation-group-side-menu-expanded"]:n&&s&&o,["selected"]:o&&!n},ref:i=>this.groupEl=i,"aria-expanded":o||this.expanded?"true":"false","aria-haspopup":!n&&this.navigationType==="top"?"true":"false"},t("ic-typography",{variant:this.navigationType==="side"?"caption":"label"},i),this.navigationType==="side"&&s&&t("div",{class:{"chevron-toggle-icon-wrapper":true,"chevron-toggle-icon-closed":this.expanded},innerHTML:d})),this.renderNavigationItems())}static get delegatesFocus(){return true}get el(){return o(this)}};c.style=h;export{c as ic_navigation_group};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,h as t,H as e,g as o}from"./p-589f6dd3.js";import{D as n,k as s,g as a,p as r}from"./p-471820e6.js";import{C as d}from"./p-06321d19.js";import"./p-6f57b13c.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.in-side-menu){border-bottom:var(--ic-space-1px) solid var(--ic-architectural-200);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-theme-text);display:flex;align-items:center;justify-content:center;padding:0 var(--ic-space-md);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none}:host(.in-side-menu) .navigation-group{height:2.5rem;width:100%;text-align:left}:host(.in-side-menu) .navigation-group .ic-typography-label{width:11.875rem}:host(.in-side-menu) .navigation-group-side-menu{color:var(--ic-action-default);justify-content:flex-start;padding:0 var(--ic-space-md) 0 var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-action-default);justify-content:flex-start;padding-left:var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-expanded{margin-bottom:var(--ic-space-xs)}:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,:host(.in-side-menu) .navigation-group-side-menu-expanded::after{border-style:solid;border-width:0.125em 0.125em 0 0;content:"";display:inline-block;height:0.45em;left:0.75em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}:host .navigation-group:hover,:host .navigation-group:active,:host .selected{background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);outline:none;cursor:pointer}:host(:not(.in-side-menu)) .navigation-group:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);z-index:var(--ic-z-index-navigation-item);transition:box-shadow var(--ic-easing-transition-fast)}:host(.in-side-menu) .navigation-group-side-menu:hover,:host(.in-side-menu) .navigation-group-side-menu:active,:host(.in-side-menu) .navigation-group-side-menu:focus{background-color:var(--ic-architectural-20);color:var(--ic-action-default);cursor:auto;box-shadow:none;outline:none}:host(.in-side-menu) .navigation-group-side-menu:focus{outline:var(--ic-hc-focus-outline)}:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-action-dark-bg-hover);color:var(--ic-action-default);cursor:pointer}:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus){background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-default)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{color:var(--ic-action-default);box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline)}:host .navigation-group-dropdown{background-color:var(--ic-architectural-20);border-bottom:var(--ic-space-1px) solid var(--ic-architectural-300);position:absolute;left:0;right:0;padding:var(--ic-space-xs) var(--ic-space-md);box-shadow:0 0.375rem 0.5rem -0.375rem rgba(0 0 0 / 20%);z-index:calc(var(--ic-z-index-navigation-item) - 1)}:host .navigation-group-dropdown-items-list{list-style:none;display:flex;flex-flow:column wrap;align-content:flex-start;padding-left:var(--ic-space-md);max-height:16.5rem}:host .chevron-toggle-icon-wrapper{display:flex;align-items:center}:host .chevron-toggle-icon-wrapper svg{transform:rotate(90deg);height:var(--ic-space-lg);width:var(--ic-space-lg)}:host .chevron-toggle-icon-closed svg{transform:rotate(-90deg)}:host(.expanded) .grouped-links-wrapper{height:var(--navigation-child-items-height, auto);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.collapsed) .grouped-links-wrapper{height:var(--navigation-child-items-height, 0);transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .navigation-group{height:var(--navigation-group-height);width:var(--navigation-group-width);justify-content:var(--navigation-group-justify-content);padding-right:var(--navigation-group-expand-toggle-padding)}:host(.navigation-group-side-nav) .navigation-group:hover,:host(.navigation-group-side-nav) .navigation-group:active,:host(.navigation-group-side-nav) .selected{background-color:var(--navigation-group-hover);color:var(--navigation-group-text-hover)}:host(.navigation-group-side-nav) .navigation-group:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background:none}:host(.navigation-group-side-nav) .ic-typography-caption{position:var(--navigation-group-title-position);left:var(--navigation-group-title-position-left);white-space:nowrap}.menu-visibility-visible{visibility:visible}.menu-visibility-hidden{visibility:hidden}';const c=class{constructor(e){i(this,e);this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS=50;this.IC_NAVIGATION_ITEM="ic-navigation-item";this.sideNavExpandHandler=()=>{setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)};this.topNavResizedHandler=i=>{const t=i.detail.size;if(t!==this.deviceSize){this.deviceSize=t;this.inTopNavSideMenu=t<=n.L}};this.setGroupedNavItemTabIndex=i=>{this.el.querySelectorAll(this.IC_NAVIGATION_ITEM).forEach((t=>{const e=t.shadowRoot.querySelector("a")||t.querySelector("a");if(e){e.setAttribute("tabindex",i)}}))};this.toggleGroupedLinkWrapperHeight=(i,t)=>{if(i){if(t){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`);this.setGroupedNavItemTabIndex("0")}else{i.setAttribute("style",`--navigation-child-items-height: 0`);this.setGroupedNavItemTabIndex("-1")}}};this.toggleExpanded=()=>{this.expanded=!this.expanded;const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");this.toggleGroupedLinkWrapperHeight(i,this.expanded)};this.handleClick=i=>{if(this.navigationType==="top"&&i.detail){this.toggleDropdown()}else{this.toggleExpanded()}};this.handleBlur=i=>{const t=i.relatedTarget;if(!this.el.contains(t)){this.hideDropdown()}};this.handleTopNavKeydown=i=>{if(!this.inTopNavSideMenu&&i.key==="Escape"){this.hideDropdown();this.el.blur()}else if(i.key===" "||i.key==="Enter"){this.toggleDropdown()}};this.handleKeydown=i=>{if(i.key==="Enter"||i.key==="Space"){switch(this.navigationType){case"top":this.handleTopNavKeydown(i);break;case"side":this.toggleExpanded();i.preventDefault();break;default:this.toggleExpanded();break}}};this.handleMouseLeave=i=>{const t=i.relatedTarget;if(!this.el.contains(t)&&t!==this.dropdown&&document.activeElement!==this.el&&!this.el.contains(document.activeElement)){this.hideDropdown()}};this.triggerShowDropdown=()=>{this.showDropdown()};this.renderDropdownGroupedLinks=()=>t("div",{class:{["navigation-group-dropdown"]:!this.inTopNavSideMenu,["navigation-group-dropdown-side-menu"]:this.inTopNavSideMenu,["selected"]:this.dropdownOpen&&!this.inTopNavSideMenu},onMouseLeave:!this.inTopNavSideMenu?this.handleMouseLeave:null,ref:i=>this.dropdown=i},t("nav",{class:{["navigation-group-dropdown-items"]:!this.inTopNavSideMenu}},t("ul",null,t("slot",null))));this.renderGroupedLinks=()=>t("ul",{class:"grouped-links-wrapper"},t("slot",null));this.getNavigationChildItemsHeight=()=>{const i=this.el.querySelectorAll(this.IC_NAVIGATION_ITEM).length||0;const t=this.el.querySelector(this.IC_NAVIGATION_ITEM)||null;if(this.navigationType==="side"&&!!i&&t){return`${parseInt(getComputedStyle(t).height)*i}px`}return"auto"};this.setInitialGroupedLinksWrapperHeight=()=>{const i=this.el.shadowRoot.querySelector(".grouped-links-wrapper");if(i&&this.expanded){i.setAttribute("style",`--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`)}};this.renderNavigationItems=()=>{if(this.dropdownOpen||this.inTopNavSideMenu&&!this.expandable){return this.renderDropdownGroupedLinks()}if(this.navigationType!=="top"){return this.renderGroupedLinks()}return null};this.label=undefined;this.expandable=false;this.dropdownOpen=false;this.inTopNavSideMenu=false;this.deviceSize=n.XL;this.focusStyle=s();this.navigationType=undefined;this.parentEl=undefined;this.expanded=true}childBlurHandler(){this.hideDropdown()}navItemClickHandler(){this.hideDropdown()}themeChangeHandler(i){const t=i.detail;this.focusStyle=t.mode}async setFocus(){if(this.groupEl){this.groupEl.focus()}}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}showDropdown(){if(!this.dropdownOpen){this.toggleDropdown()}}hideDropdown(){if(this.dropdownOpen){this.toggleDropdown()}}componentWillLoad(){this.deviceSize=a();const i=r(this.el);this.navigationType=i.navType;this.parentEl=i.parent;if(this.deviceSize<=n.L&&this.navigationType==="top"){this.inTopNavSideMenu=true}if(this.navigationType==="side"){this.parentEl.addEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.addEventListener("topNavResized",this.topNavResizedHandler)}}componentDidLoad(){setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}disconnectedCallback(){if(this.navigationType==="side"){this.parentEl.removeEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.removeEventListener("topNavResized",this.topNavResizedHandler)}}render(){const{label:i,dropdownOpen:o,inTopNavSideMenu:n,expandable:s}=this;const a=!n||s?"button":"div";return t(e,{class:{["in-side-menu"]:n,expanded:this.expanded,collapsed:!this.expanded,["navigation-group-side-nav"]:this.navigationType==="side"},role:"listitem"},t(a,{tabindex:n&&!s?"-1":"0",onMouseOver:!n&&this.navigationType==="top"?this.triggerShowDropdown:null,onMouseLeave:this.navigationType==="top"&&this.handleMouseLeave,onBlur:this.handleBlur,onClick:s?this.handleClick:null,onKeyDown:this.handleKeydown,class:{["navigation-group"]:true,[this.focusStyle]:!n,["navigation-group-side-menu"]:n&&!s,["navigation-group-side-menu-collapsed"]:n&&s&&!o,["navigation-group-side-menu-expanded"]:n&&s&&o,["selected"]:o&&!n},ref:i=>this.groupEl=i,"aria-expanded":o||this.expanded?"true":"false","aria-haspopup":!n&&this.navigationType==="top"?"true":"false"},t("ic-typography",{variant:this.navigationType==="side"?"caption":"label"},i),this.navigationType==="side"&&s&&t("div",{class:{"chevron-toggle-icon-wrapper":true,"chevron-toggle-icon-closed":this.expanded},innerHTML:d})),this.renderNavigationItems())}static get delegatesFocus(){return true}get el(){return o(this)}};c.style=h;export{c as ic_navigation_group};
|
2
|
+
//# sourceMappingURL=p-5a3f3f37.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/components/ic-navigation-group/ic-navigation-group.css?tag=ic-navigation-group&encapsulation=shadow","src/components/ic-navigation-group/ic-navigation-group.tsx"],"names":["icNavigationGroupCss","NavigationGroup","this","DYNAMIC_GROUPED_LINKS_HEIGHT_MS","IC_NAVIGATION_ITEM","sideNavExpandHandler","setTimeout","setInitialGroupedLinksWrapperHeight","topNavResizedHandler","ev","newSize","detail","size","deviceSize","inTopNavSideMenu","DEVICE_SIZES","L","setGroupedNavItemTabIndex","tabIndexValue","el","querySelectorAll","forEach","navigationItem","navItem","shadowRoot","querySelector","setAttribute","toggleGroupedLinkWrapperHeight","wrapper","expanded","getNavigationChildItemsHeight","toggleExpanded","linkWrapper","handleClick","navigationType","toggleDropdown","handleBlur","target","relatedTarget","contains","hideDropdown","handleTopNavKeydown","key","blur","handleKeydown","preventDefault","handleMouseLeave","dropdown","document","activeElement","triggerShowDropdown","showDropdown","renderDropdownGroupedLinks","h","class","[object Object]","dropdownOpen","onMouseLeave","ref","renderGroupedLinks","navigationItemLength","length","parseInt","getComputedStyle","height","renderNavigationItems","expandable","XL","getThemeForegroundColor","theme","focusStyle","mode","groupEl","focus","getCurrentDeviceSize","navParentDetails","getNavItemParentDetails","navType","parentEl","parent","addEventListener","removeEventListener","label","NavigationGroupElement","Host","collapsed","role","tabindex","onMouseOver","onBlur","onClick","onKeyDown","aria-expanded","aria-haspopup","variant","chevron-toggle-icon-wrapper","chevron-toggle-icon-closed","innerHTML","chevronIcon"],"mappings":"8KAAA,MAAMA,EAAuB,+tOC4BhBC,EAAe,+B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AK2B,UAErCoE,UAAWC,KAIhBhG,KAAK+D","sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-navigation-item: z-index of navigation group item\n */\n\n:host {\n display: block;\n}\n\n:host(.in-side-menu) {\n border-bottom: var(--ic-space-1px) solid var(--ic-architectural-200);\n padding: var(--ic-space-md) 0;\n}\n\n:host .navigation-group {\n height: 100%;\n width: fit-content;\n color: var(--ic-theme-text);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--ic-space-md);\n transition: var(--ic-easing-transition-slow);\n position: relative;\n background: none;\n border: none;\n}\n\n:host(.in-side-menu) .navigation-group {\n height: 2.5rem;\n width: 100%;\n text-align: left;\n}\n\n:host(.in-side-menu) .navigation-group .ic-typography-label {\n width: 11.875rem;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu {\n color: var(--ic-action-default);\n justify-content: flex-start;\n padding: 0 var(--ic-space-md) 0 var(--ic-space-md);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-collapsed,\n:host(.in-side-menu) .navigation-group-side-menu-expanded {\n color: var(--ic-action-default);\n justify-content: flex-start;\n padding-left: var(--ic-space-md);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded {\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,\n:host(.in-side-menu) .navigation-group-side-menu-expanded::after {\n border-style: solid;\n border-width: 0.125em 0.125em 0 0;\n content: \"\";\n display: inline-block;\n height: 0.45em;\n left: 0.75em;\n position: relative;\n top: -0.1em;\n transform: rotate(135deg);\n vertical-align: top;\n width: 0.45em;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded::after {\n top: 0.15em;\n transform: rotate(-45deg);\n}\n\n:host .navigation-group:hover,\n:host .navigation-group:active,\n:host .selected {\n background-color: var(--ic-architectural-20);\n color: var(--ic-color-primary-text);\n outline: none;\n cursor: pointer;\n}\n\n:host(:not(.in-side-menu)) .navigation-group:focus {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n outline: var(--ic-hc-focus-outline);\n z-index: var(--ic-z-index-navigation-item);\n transition: box-shadow var(--ic-easing-transition-fast);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu:hover,\n:host(.in-side-menu) .navigation-group-side-menu:active,\n:host(.in-side-menu) .navigation-group-side-menu:focus {\n background-color: var(--ic-architectural-20);\n color: var(--ic-action-default);\n cursor: auto;\n box-shadow: none;\n outline: none;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus) {\n background-color: var(--ic-action-dark-bg-hover);\n color: var(--ic-action-default);\n cursor: pointer;\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus) {\n background-color: var(--ic-action-dark-bg-active);\n color: var(--ic-action-default);\n}\n\n:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,\n:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus {\n color: var(--ic-action-default);\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host .navigation-group-dropdown {\n background-color: var(--ic-architectural-20);\n border-bottom: var(--ic-space-1px) solid var(--ic-architectural-300);\n position: absolute;\n left: 0;\n right: 0;\n padding: var(--ic-space-xs) var(--ic-space-md);\n box-shadow: 0 0.375rem 0.5rem -0.375rem rgba(0 0 0 / 20%);\n z-index: calc(var(--ic-z-index-navigation-item) - 1);\n}\n\n:host .navigation-group-dropdown-items-list {\n list-style: none;\n display: flex;\n flex-flow: column wrap;\n align-content: flex-start;\n padding-left: var(--ic-space-md);\n max-height: 16.5rem;\n}\n\n:host .chevron-toggle-icon-wrapper {\n display: flex;\n align-items: center;\n}\n\n:host .chevron-toggle-icon-wrapper svg {\n transform: rotate(90deg);\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host .chevron-toggle-icon-closed svg {\n transform: rotate(-90deg);\n}\n\n:host(.expanded) .grouped-links-wrapper {\n height: var(--navigation-child-items-height, auto);\n transition: var(--ic-easing-transition-slow);\n overflow: hidden;\n}\n\n:host(.collapsed) .grouped-links-wrapper {\n height: var(--navigation-child-items-height, 0);\n transition: var(--ic-easing-transition-slow);\n overflow: hidden;\n}\n\n:host(.navigation-group-side-nav) .navigation-group {\n height: var(--navigation-group-height);\n width: var(--navigation-group-width);\n justify-content: var(--navigation-group-justify-content);\n padding-right: var(--navigation-group-expand-toggle-padding);\n}\n\n:host(.navigation-group-side-nav) .navigation-group:hover,\n:host(.navigation-group-side-nav) .navigation-group:active,\n:host(.navigation-group-side-nav) .selected {\n background-color: var(--navigation-group-hover);\n color: var(--navigation-group-text-hover);\n}\n\n:host(.navigation-group-side-nav) .navigation-group:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background: none;\n}\n\n:host(.navigation-group-side-nav) .ic-typography-caption {\n position: var(--navigation-group-title-position);\n left: var(--navigation-group-title-position-left);\n white-space: nowrap;\n}\n\n.menu-visibility-visible {\n visibility: visible;\n}\n\n.menu-visibility-hidden {\n visibility: hidden;\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n Listen,\n h,\n Method,\n} from \"@stencil/core\";\n\nimport {\n DEVICE_SIZES,\n getCurrentDeviceSize,\n getThemeForegroundColor,\n getNavItemParentDetails,\n} from \"../../utils/helpers\";\nimport { IcNavType, IcTheme } from \"../../utils/types\";\n\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\n\n@Component({\n tag: \"ic-navigation-group\",\n styleUrl: \"ic-navigation-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class NavigationGroup {\n @Element() el: HTMLIcNavigationGroupElement;\n\n /**\n * The label to display on the group.\n */\n @Prop() label: string;\n\n /**\n * If `true`, the group will be expandable in the side menu.\n */\n @Prop() expandable: boolean = false;\n\n @State() dropdownOpen: boolean = false;\n\n @State() inTopNavSideMenu: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() focusStyle = getThemeForegroundColor();\n\n @State() navigationType: IcNavType | \"\";\n\n @State() parentEl: HTMLElement;\n\n @State() expanded: boolean = true;\n\n private groupEl: HTMLElement;\n private dropdown: HTMLElement;\n private DYNAMIC_GROUPED_LINKS_HEIGHT_MS = 50;\n private IC_NAVIGATION_ITEM = \"ic-navigation-item\";\n\n @Listen(\"childBlur\")\n childBlurHandler(): void {\n this.hideDropdown();\n }\n\n @Listen(\"navItemClicked\")\n navItemClickHandler(): void {\n this.hideDropdown();\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.focusStyle = theme.mode;\n }\n\n /**\n * Sets focus on the nav item.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.groupEl) {\n this.groupEl.focus();\n }\n }\n\n private sideNavExpandHandler = (): void => {\n setTimeout(\n () => this.setInitialGroupedLinksWrapperHeight(),\n this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS\n );\n };\n\n private topNavResizedHandler = (ev: CustomEvent): void => {\n const newSize = ev.detail.size;\n if (newSize !== this.deviceSize) {\n this.deviceSize = newSize;\n this.inTopNavSideMenu = newSize <= DEVICE_SIZES.L;\n }\n };\n\n private toggleDropdown() {\n this.dropdownOpen = !this.dropdownOpen;\n }\n\n private setGroupedNavItemTabIndex = (tabIndexValue: string) => {\n this.el\n .querySelectorAll(this.IC_NAVIGATION_ITEM)\n .forEach((navigationItem) => {\n const navItem =\n navigationItem.shadowRoot.querySelector(\"a\") ||\n navigationItem.querySelector(\"a\");\n if (navItem) {\n navItem.setAttribute(\"tabindex\", tabIndexValue);\n }\n });\n };\n\n private toggleGroupedLinkWrapperHeight = (\n wrapper: HTMLElement,\n expanded: boolean\n ) => {\n if (wrapper) {\n if (expanded) {\n wrapper.setAttribute(\n \"style\",\n `--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`\n );\n this.setGroupedNavItemTabIndex(\"0\");\n } else {\n wrapper.setAttribute(\"style\", `--navigation-child-items-height: 0`);\n this.setGroupedNavItemTabIndex(\"-1\");\n }\n }\n };\n\n private toggleExpanded = () => {\n this.expanded = !this.expanded;\n const linkWrapper = this.el.shadowRoot.querySelector(\n \".grouped-links-wrapper\"\n ) as HTMLElement;\n\n this.toggleGroupedLinkWrapperHeight(linkWrapper, this.expanded);\n };\n\n private showDropdown() {\n if (!this.dropdownOpen) {\n this.toggleDropdown();\n }\n }\n\n private hideDropdown() {\n if (this.dropdownOpen) {\n this.toggleDropdown();\n }\n }\n\n private handleClick = (ev: MouseEvent) => {\n if (this.navigationType === \"top\" && ev.detail) {\n this.toggleDropdown();\n } else {\n this.toggleExpanded();\n }\n };\n\n private handleBlur = (ev: FocusEvent) => {\n const target = ev.relatedTarget as HTMLElement;\n if (!this.el.contains(target)) {\n this.hideDropdown();\n }\n };\n\n private handleTopNavKeydown = (ev: KeyboardEvent) => {\n if (!this.inTopNavSideMenu && ev.key === \"Escape\") {\n this.hideDropdown();\n this.el.blur();\n } else if (ev.key === \" \" || ev.key === \"Enter\") {\n this.toggleDropdown();\n }\n };\n\n private handleKeydown = (ev: KeyboardEvent) => {\n if (ev.key === \"Enter\" || ev.key === \"Space\") {\n switch (this.navigationType) {\n case \"top\":\n this.handleTopNavKeydown(ev as KeyboardEvent);\n break;\n case \"side\":\n this.toggleExpanded();\n ev.preventDefault();\n break;\n default:\n this.toggleExpanded();\n break;\n }\n }\n };\n\n private handleMouseLeave = (ev: MouseEvent) => {\n const target = ev.relatedTarget as HTMLElement;\n if (\n !this.el.contains(target) &&\n target !== this.dropdown &&\n document.activeElement !== this.el &&\n !this.el.contains(document.activeElement)\n ) {\n this.hideDropdown();\n }\n };\n\n private triggerShowDropdown = () => {\n this.showDropdown();\n };\n\n private renderDropdownGroupedLinks = (): HTMLDivElement => (\n <div\n class={{\n [\"navigation-group-dropdown\"]: !this.inTopNavSideMenu,\n [\"navigation-group-dropdown-side-menu\"]: this.inTopNavSideMenu,\n [\"selected\"]: this.dropdownOpen && !this.inTopNavSideMenu,\n }}\n onMouseLeave={!this.inTopNavSideMenu ? this.handleMouseLeave : null}\n ref={(el) => (this.dropdown = el)}\n >\n <nav\n class={{\n [\"navigation-group-dropdown-items\"]: !this.inTopNavSideMenu,\n }}\n >\n <ul>\n <slot></slot>\n </ul>\n </nav>\n </div>\n );\n\n private renderGroupedLinks = (): HTMLDivElement => (\n <ul class=\"grouped-links-wrapper\">\n <slot></slot>\n </ul>\n );\n\n /**\n * Gets the total height of navigation links to improve\n * smoothness of expand/collapse animations\n */\n private getNavigationChildItemsHeight = (): string => {\n const navigationItemLength =\n this.el.querySelectorAll(this.IC_NAVIGATION_ITEM).length || 0;\n const navigationItem =\n this.el.querySelector(this.IC_NAVIGATION_ITEM) || null;\n\n if (\n this.navigationType === \"side\" &&\n !!navigationItemLength &&\n navigationItem\n ) {\n return `${\n parseInt(getComputedStyle(navigationItem).height) * navigationItemLength\n }px`;\n }\n\n return \"auto\";\n };\n\n private setInitialGroupedLinksWrapperHeight = () => {\n const linkWrapper = this.el.shadowRoot.querySelector(\n \".grouped-links-wrapper\"\n ) as HTMLElement;\n\n if (linkWrapper && this.expanded) {\n linkWrapper.setAttribute(\n \"style\",\n `--navigation-child-items-height: ${this.getNavigationChildItemsHeight()}`\n );\n }\n };\n\n private renderNavigationItems = (): HTMLDivElement | null => {\n if (this.dropdownOpen || (this.inTopNavSideMenu && !this.expandable)) {\n return this.renderDropdownGroupedLinks();\n }\n\n if (this.navigationType !== \"top\") {\n return this.renderGroupedLinks();\n }\n\n return null;\n };\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n const navParentDetails = getNavItemParentDetails(this.el);\n this.navigationType = navParentDetails.navType;\n this.parentEl = navParentDetails.parent;\n if (this.deviceSize <= DEVICE_SIZES.L && this.navigationType === \"top\") {\n this.inTopNavSideMenu = true;\n }\n\n if (this.navigationType === \"side\") {\n this.parentEl.addEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.addEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n componentDidLoad(): void {\n /**\n * debounce is required as the incorrect height was retrieved instantly after\n * componentDidLoad is invoked.\n */\n setTimeout(\n () => this.setInitialGroupedLinksWrapperHeight(),\n this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS\n );\n }\n\n disconnectedCallback(): void {\n if (this.navigationType === \"side\") {\n this.parentEl.removeEventListener(\n \"sideNavExpanded\",\n this.sideNavExpandHandler\n );\n } else if (this.navigationType === \"top\") {\n this.parentEl.removeEventListener(\n \"topNavResized\",\n this.topNavResizedHandler\n );\n }\n }\n\n render() {\n const { label, dropdownOpen, inTopNavSideMenu, expandable } = this;\n\n const NavigationGroupElement =\n !inTopNavSideMenu || expandable ? \"button\" : \"div\";\n\n return (\n <Host\n class={{\n [\"in-side-menu\"]: inTopNavSideMenu,\n expanded: this.expanded,\n collapsed: !this.expanded,\n [\"navigation-group-side-nav\"]: this.navigationType === \"side\",\n }}\n role=\"listitem\"\n >\n <NavigationGroupElement\n tabindex={inTopNavSideMenu && !expandable ? \"-1\" : \"0\"}\n onMouseOver={\n !inTopNavSideMenu && this.navigationType === \"top\"\n ? this.triggerShowDropdown\n : null\n }\n onMouseLeave={this.navigationType === \"top\" && this.handleMouseLeave}\n onBlur={this.handleBlur}\n onClick={expandable ? this.handleClick : null}\n onKeyDown={this.handleKeydown}\n class={{\n [\"navigation-group\"]: true,\n [this.focusStyle]: !inTopNavSideMenu,\n [\"navigation-group-side-menu\"]: inTopNavSideMenu && !expandable,\n [\"navigation-group-side-menu-collapsed\"]:\n inTopNavSideMenu && expandable && !dropdownOpen,\n [\"navigation-group-side-menu-expanded\"]:\n inTopNavSideMenu && expandable && dropdownOpen,\n [\"selected\"]: dropdownOpen && !inTopNavSideMenu,\n }}\n ref={(el) => (this.groupEl = el)}\n aria-expanded={dropdownOpen || this.expanded ? \"true\" : \"false\"}\n aria-haspopup={\n !inTopNavSideMenu && this.navigationType === \"top\"\n ? \"true\"\n : \"false\"\n }\n >\n <ic-typography\n variant={this.navigationType === \"side\" ? \"caption\" : \"label\"}\n >\n {label}\n </ic-typography>\n {this.navigationType === \"side\" && expandable && (\n <div\n class={{\n \"chevron-toggle-icon-wrapper\": true,\n \"chevron-toggle-icon-closed\": this.expanded,\n }}\n innerHTML={chevronIcon}\n ></div>\n )}\n </NavigationGroupElement>\n {this.renderNavigationItems()}\n </Host>\n );\n }\n}\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r,h as i,H as e}from"./p-589f6dd3.js";import{k as s}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r,h as i,H as e}from"./p-589f6dd3.js";import{k as s}from"./p-471820e6.js";import{I as c}from"./p-6f57b13c.js";const a="hr.sc-ic-divider{padding:0;margin:0;border:none;height:var(--ic-space-1px);background-color:var(--ic-keyline-darken-rgb)}hr.light.sc-ic-divider{background-color:var(--ic-keyline-lighten-rgb)}";const o=class{constructor(i){r(this,i);this.foregroundColor=s()}themeChangeHandler(r){const i=r.detail;this.foregroundColor=i.mode}render(){return i(e,{"aria-hidden":"true"},i("hr",{class:{["light"]:this.foregroundColor===c.Light}}))}};o.style=a;export{o as ic_divider};
|
2
|
+
//# sourceMappingURL=p-5e896163.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as t,H as i,g as n}from"./p-589f6dd3.js";import{k as o,m as s,a,n as r}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t,H as i,g as n}from"./p-589f6dd3.js";import{k as o,m as s,a,n as r}from"./p-471820e6.js";import{I as l}from"./p-6f57b13c.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;margin-right:var(--ic-space-xs);list-style:none}:host(.in-side-menu){margin-right:0}:host::part(button){height:100%}';const p=class{constructor(t){e(this,t);this.inheritedAttributes={};this.label=undefined;this.href=undefined;this.target=undefined;this.rel=undefined;this.download=false;this.hreflang=undefined;this.referrerpolicy=undefined;this.mode="navbar";this.initialAppearance=o()}navBarMenuOpenHandler(){this.mode="menu"}navBarMenuCloseHandler(){this.mode="navbar"}themeChangeHandler(e){const t=e.detail;this.initialAppearance=t.mode}async setFocus(){if(this.buttonEl){this.buttonEl.focus()}}componentWillLoad(){this.inheritedAttributes=s(this.el,[...r,"title"])}componentDidLoad(){a([{prop:this.label,propName:"label"}],"Navigation Button")}render(){const{href:e,target:n,rel:o,download:s,referrerpolicy:a}=this;let r="";let d="";let p="icon";let u=this.initialAppearance;let b="large";let m=false;if(this.mode==="menu"){r=this.label;p="tertiary";u=l.Default;b="default";m=true;d="popout-menu-button"}const c={variant:p,appearance:u,size:b,href:e,target:n,rel:o,download:s,referrerpolicy:a,fullWidth:m};return t(i,{class:{["in-side-menu"]:this.mode==="menu"}},t("ic-button",Object.assign({class:d,"aria-label":this.label,ref:e=>this.buttonEl=e},c,this.inheritedAttributes),r,t("slot",{slot:"icon",name:"icon"})))}static get delegatesFocus(){return true}get el(){return n(this)}};p.style=d;export{p as ic_navigation_button};
|
2
|
+
//# sourceMappingURL=p-68547339.entry.js.map
|