@ukic/web-components 3.5.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-931fd72e.js → helpers-8217daf4.js} +14 -2
- package/dist/cjs/helpers-8217daf4.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +8 -8
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +13 -4
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +32 -30
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +9 -8
- 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-dialog.cjs.entry.js +3 -3
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +40 -48
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +2 -2
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +16 -8
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +6 -16
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +16 -11
- 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 +4 -4
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +4 -4
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +3 -3
- 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 +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +2 -2
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +2 -2
- 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-toggle-button-group.cjs.entry.js +16 -5
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +14 -5
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-alert/ic-alert.js +7 -7
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.js +12 -3
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.css +8 -0
- package/dist/collection/components/ic-button/ic-button.stories.js +13 -5
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +4 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.js +7 -6
- package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +11 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +5 -3
- package/dist/collection/components/ic-dialog/ic-dialog.js +2 -2
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.stories.js +39 -30
- package/dist/collection/components/ic-divider/ic-divider.stories.js +3 -3
- package/dist/collection/components/ic-footer/ic-footer.stories.js +1 -1
- package/dist/collection/components/ic-footer-link/ic-footer-link.css +1 -1
- package/dist/collection/components/ic-input-label/ic-input-label.css +1 -1
- package/dist/collection/components/ic-link/ic-link.css +6 -2
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +5 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +19 -24
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +4 -4
- package/dist/collection/components/ic-menu/ic-menu.js +108 -47
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +8 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +24 -9
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +1 -2
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +4 -14
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +0 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +57 -11
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +5 -3
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +2 -2
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.css +2 -2
- package/dist/collection/components/ic-select/ic-select.js +2 -2
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select_(multi).stories.js +7 -5
- package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +7 -5
- package/dist/collection/components/ic-select/ic-select_(single).stories.js +7 -5
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +2 -2
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +31 -4
- package/dist/collection/components/ic-switch/ic-switch.css +4 -7
- package/dist/collection/components/ic-text-field/ic-text-field.css +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.stories.js +5 -10
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +17 -0
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +32 -3
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.stories.js +7 -0
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +7 -0
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +36 -3
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.stories.js +17 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +11 -2
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +33 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +19 -2
- package/dist/collection/patterns/z-index.stories.js +2 -1
- package/dist/collection/utils/helpers.js +12 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +13 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-alert.js +7 -7
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-badge.js +12 -3
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-button2.js +1 -1
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +8 -7
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-dialog.js +2 -2
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-input-label2.js +1 -1
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +23 -28
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu2.js +42 -47
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +18 -9
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-item.js +5 -15
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-popover-menu.js +18 -11
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +3 -3
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select.js +3 -3
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-side-navigation.js +2 -2
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-text-field.js +1 -1
- package/dist/components/ic-text-field.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +17 -4
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +14 -4
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +12 -4
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/core/core.css +38 -24
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-a14025cc.entry.js → p-0179fbd3.entry.js} +2 -2
- package/dist/core/p-018eaee0.entry.js +2 -0
- package/dist/core/p-018eaee0.entry.js.map +1 -0
- package/dist/core/p-02132a4c.entry.js +2 -0
- package/dist/core/p-02132a4c.entry.js.map +1 -0
- package/dist/core/{p-c8555360.entry.js → p-0549305b.entry.js} +2 -2
- package/dist/core/p-056be0df.entry.js +2 -0
- package/dist/core/p-056be0df.entry.js.map +1 -0
- package/dist/core/{p-4dfc41e7.entry.js → p-06b0d0f6.entry.js} +2 -2
- package/dist/core/{p-85f735ed.entry.js → p-06e80441.entry.js} +2 -2
- package/dist/core/{p-1286b234.entry.js → p-08567369.entry.js} +2 -2
- package/dist/core/{p-b811c7a1.entry.js → p-152ddde9.entry.js} +2 -2
- package/dist/core/{p-b811c7a1.entry.js.map → p-152ddde9.entry.js.map} +1 -1
- package/dist/core/p-182b7037.entry.js +2 -0
- package/dist/core/p-182b7037.entry.js.map +1 -0
- package/dist/core/{p-49ca3f54.entry.js → p-29468171.entry.js} +2 -2
- package/dist/core/{p-d7476f6d.entry.js → p-2ec0d11c.entry.js} +2 -2
- package/dist/core/{p-20a6dc40.entry.js → p-3194e46c.entry.js} +2 -2
- package/dist/core/{p-a7286727.entry.js → p-421b5f2d.entry.js} +2 -2
- package/dist/core/{p-ab4e8b4a.entry.js → p-4301e11e.entry.js} +2 -2
- package/dist/core/{p-ad374f0b.entry.js → p-43b98687.entry.js} +2 -2
- package/dist/core/{p-ad374f0b.entry.js.map → p-43b98687.entry.js.map} +1 -1
- package/dist/core/p-4b8bfb59.entry.js +2 -0
- package/dist/core/p-4b8bfb59.entry.js.map +1 -0
- package/dist/core/{p-5b2bf9bb.entry.js → p-4cd83bfe.entry.js} +2 -2
- package/dist/core/{p-44902a33.entry.js → p-50d13439.entry.js} +2 -2
- package/dist/core/p-543b90c5.entry.js +2 -0
- package/dist/core/p-543b90c5.entry.js.map +1 -0
- package/dist/core/p-554c555f.entry.js +2 -0
- package/dist/core/p-554c555f.entry.js.map +1 -0
- package/dist/core/{p-13e65198.entry.js → p-5fb58cc8.entry.js} +2 -2
- package/dist/core/p-627f7172.entry.js +2 -0
- package/dist/core/p-627f7172.entry.js.map +1 -0
- package/dist/core/p-6b52e47f.entry.js +2 -0
- package/dist/core/p-6b52e47f.entry.js.map +1 -0
- package/dist/core/{p-b40ecf16.js → p-70abcb2b.js} +2 -2
- package/dist/core/p-70abcb2b.js.map +1 -0
- package/dist/core/{p-990c37aa.entry.js → p-773ded36.entry.js} +2 -2
- package/dist/core/{p-831e884c.entry.js → p-77750efc.entry.js} +2 -2
- package/dist/core/{p-ac73cfb8.entry.js → p-7cada631.entry.js} +2 -2
- package/dist/core/p-7cada631.entry.js.map +1 -0
- package/dist/core/{p-6cb81f35.entry.js → p-8a5b0fb0.entry.js} +2 -2
- package/dist/core/{p-ced2e6ca.entry.js → p-91f6884a.entry.js} +2 -2
- package/dist/core/{p-ced2e6ca.entry.js.map → p-91f6884a.entry.js.map} +1 -1
- package/dist/core/p-939adcae.entry.js +2 -0
- package/dist/core/p-939adcae.entry.js.map +1 -0
- package/dist/core/{p-476eac8c.entry.js → p-948086f4.entry.js} +2 -2
- package/dist/core/{p-2b342b23.entry.js → p-97f67617.entry.js} +2 -2
- package/dist/core/{p-b59007a3.entry.js → p-98869fe7.entry.js} +2 -2
- package/dist/core/{p-3d7d2ff4.entry.js → p-9d5e4b62.entry.js} +2 -2
- package/dist/core/{p-6c10e1a2.entry.js → p-9ed5f11d.entry.js} +2 -2
- package/dist/core/p-9ed5f11d.entry.js.map +1 -0
- package/dist/core/{p-ab7a5536.entry.js → p-a2ae5d9e.entry.js} +2 -2
- package/dist/core/p-a591ef38.entry.js +2 -0
- package/dist/core/p-a591ef38.entry.js.map +1 -0
- package/dist/core/{p-7ead8535.entry.js → p-ab1103e1.entry.js} +2 -2
- package/dist/core/p-ab1103e1.entry.js.map +1 -0
- package/dist/core/{p-1228fd8c.entry.js → p-ae2ea264.entry.js} +2 -2
- package/dist/core/{p-3afc2870.entry.js → p-afde0edc.entry.js} +2 -2
- package/dist/core/{p-37900547.entry.js → p-b83cca09.entry.js} +2 -2
- package/dist/core/{p-5d9b23ce.entry.js → p-ba89fa16.entry.js} +2 -2
- package/dist/core/{p-8da025b5.entry.js → p-bb21268f.entry.js} +2 -2
- package/dist/core/p-bb21268f.entry.js.map +1 -0
- package/dist/core/{p-226406d6.entry.js → p-c100724d.entry.js} +2 -2
- package/dist/core/{p-e107d1dd.entry.js → p-cd8dab55.entry.js} +2 -2
- package/dist/core/{p-b08bb522.entry.js → p-ce916f35.entry.js} +2 -2
- package/dist/core/p-d85b438a.entry.js +2 -0
- package/dist/core/p-d85b438a.entry.js.map +1 -0
- package/dist/core/{p-24bb2265.entry.js → p-ec1657fc.entry.js} +2 -2
- package/dist/core/{p-54ea7120.entry.js → p-f4ee5fbb.entry.js} +2 -2
- package/dist/core/p-f9491692.entry.js +2 -0
- package/dist/core/p-f9491692.entry.js.map +1 -0
- package/dist/core/{p-5026eeaf.entry.js → p-fb6e6ac4.entry.js} +2 -2
- package/dist/core/{p-9edc5973.entry.js → p-ff47772c.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-91abc444.js → helpers-f5ff3b42.js} +14 -2
- package/dist/esm/helpers-f5ff3b42.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +8 -8
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +13 -4
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +32 -30
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +2 -2
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +9 -8
- 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-dialog.entry.js +3 -3
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +40 -48
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +2 -2
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +2 -2
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +16 -8
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +6 -16
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination.entry.js +1 -1
- package/dist/esm/ic-popover-menu.entry.js +16 -11
- 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 +4 -4
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +4 -4
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +3 -3
- 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 +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +2 -2
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-text-field.entry.js +2 -2
- 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-toggle-button-group.entry.js +16 -5
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +14 -5
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-badge/ic-badge.d.ts +1 -0
- package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +2 -2
- package/dist/types/components/ic-menu/ic-menu.d.ts +12 -4
- package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +5 -0
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +7 -0
- package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +4 -0
- package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +5 -0
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +23 -0
- package/dist/types/utils/helpers.d.ts +2 -1
- package/hydrate/index.js +198 -151
- package/hydrate/index.mjs +198 -151
- package/package.json +2 -2
- package/vscode-data.json +8 -0
- package/dist/cjs/helpers-931fd72e.js.map +0 -1
- package/dist/core/p-0f3a56bb.entry.js +0 -2
- package/dist/core/p-0f3a56bb.entry.js.map +0 -1
- package/dist/core/p-21ed856c.entry.js +0 -2
- package/dist/core/p-21ed856c.entry.js.map +0 -1
- package/dist/core/p-334672c1.entry.js +0 -2
- package/dist/core/p-334672c1.entry.js.map +0 -1
- package/dist/core/p-3abaa877.entry.js +0 -2
- package/dist/core/p-3abaa877.entry.js.map +0 -1
- package/dist/core/p-41bb4db1.entry.js +0 -2
- package/dist/core/p-41bb4db1.entry.js.map +0 -1
- package/dist/core/p-5f9d1977.entry.js +0 -2
- package/dist/core/p-5f9d1977.entry.js.map +0 -1
- package/dist/core/p-6c10e1a2.entry.js.map +0 -1
- package/dist/core/p-7ead8535.entry.js.map +0 -1
- package/dist/core/p-89f493f3.entry.js +0 -2
- package/dist/core/p-89f493f3.entry.js.map +0 -1
- package/dist/core/p-8da025b5.entry.js.map +0 -1
- package/dist/core/p-9e039aba.entry.js +0 -2
- package/dist/core/p-9e039aba.entry.js.map +0 -1
- package/dist/core/p-ac73cfb8.entry.js.map +0 -1
- package/dist/core/p-b40ecf16.js.map +0 -1
- package/dist/core/p-bae2df5e.entry.js +0 -2
- package/dist/core/p-bae2df5e.entry.js.map +0 -1
- package/dist/core/p-d32c377d.entry.js +0 -2
- package/dist/core/p-d32c377d.entry.js.map +0 -1
- package/dist/core/p-d4a77f80.entry.js +0 -2
- package/dist/core/p-d4a77f80.entry.js.map +0 -1
- package/dist/core/p-e506ec91.entry.js +0 -2
- package/dist/core/p-e506ec91.entry.js.map +0 -1
- package/dist/core/p-fca45edb.entry.js +0 -2
- package/dist/core/p-fca45edb.entry.js.map +0 -1
- package/dist/esm/helpers-91abc444.js.map +0 -1
- /package/dist/core/{p-a14025cc.entry.js.map → p-0179fbd3.entry.js.map} +0 -0
- /package/dist/core/{p-c8555360.entry.js.map → p-0549305b.entry.js.map} +0 -0
- /package/dist/core/{p-4dfc41e7.entry.js.map → p-06b0d0f6.entry.js.map} +0 -0
- /package/dist/core/{p-85f735ed.entry.js.map → p-06e80441.entry.js.map} +0 -0
- /package/dist/core/{p-1286b234.entry.js.map → p-08567369.entry.js.map} +0 -0
- /package/dist/core/{p-49ca3f54.entry.js.map → p-29468171.entry.js.map} +0 -0
- /package/dist/core/{p-d7476f6d.entry.js.map → p-2ec0d11c.entry.js.map} +0 -0
- /package/dist/core/{p-20a6dc40.entry.js.map → p-3194e46c.entry.js.map} +0 -0
- /package/dist/core/{p-a7286727.entry.js.map → p-421b5f2d.entry.js.map} +0 -0
- /package/dist/core/{p-ab4e8b4a.entry.js.map → p-4301e11e.entry.js.map} +0 -0
- /package/dist/core/{p-5b2bf9bb.entry.js.map → p-4cd83bfe.entry.js.map} +0 -0
- /package/dist/core/{p-44902a33.entry.js.map → p-50d13439.entry.js.map} +0 -0
- /package/dist/core/{p-13e65198.entry.js.map → p-5fb58cc8.entry.js.map} +0 -0
- /package/dist/core/{p-990c37aa.entry.js.map → p-773ded36.entry.js.map} +0 -0
- /package/dist/core/{p-831e884c.entry.js.map → p-77750efc.entry.js.map} +0 -0
- /package/dist/core/{p-6cb81f35.entry.js.map → p-8a5b0fb0.entry.js.map} +0 -0
- /package/dist/core/{p-476eac8c.entry.js.map → p-948086f4.entry.js.map} +0 -0
- /package/dist/core/{p-2b342b23.entry.js.map → p-97f67617.entry.js.map} +0 -0
- /package/dist/core/{p-b59007a3.entry.js.map → p-98869fe7.entry.js.map} +0 -0
- /package/dist/core/{p-3d7d2ff4.entry.js.map → p-9d5e4b62.entry.js.map} +0 -0
- /package/dist/core/{p-ab7a5536.entry.js.map → p-a2ae5d9e.entry.js.map} +0 -0
- /package/dist/core/{p-1228fd8c.entry.js.map → p-ae2ea264.entry.js.map} +0 -0
- /package/dist/core/{p-3afc2870.entry.js.map → p-afde0edc.entry.js.map} +0 -0
- /package/dist/core/{p-37900547.entry.js.map → p-b83cca09.entry.js.map} +0 -0
- /package/dist/core/{p-5d9b23ce.entry.js.map → p-ba89fa16.entry.js.map} +0 -0
- /package/dist/core/{p-226406d6.entry.js.map → p-c100724d.entry.js.map} +0 -0
- /package/dist/core/{p-e107d1dd.entry.js.map → p-cd8dab55.entry.js.map} +0 -0
- /package/dist/core/{p-b08bb522.entry.js.map → p-ce916f35.entry.js.map} +0 -0
- /package/dist/core/{p-24bb2265.entry.js.map → p-ec1657fc.entry.js.map} +0 -0
- /package/dist/core/{p-54ea7120.entry.js.map → p-f4ee5fbb.entry.js.map} +0 -0
- /package/dist/core/{p-5026eeaf.entry.js.map → p-fb6e6ac4.entry.js.map} +0 -0
- /package/dist/core/{p-9edc5973.entry.js.map → p-ff47772c.entry.js.map} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icSwitchCss","IcSwitchStyle0","inputIds","Switch","constructor","hostRef","this","inputId","checkedState","initiallyChecked","checked","disabled","helperText","hideLabel","name","size","theme","value","handleChange","icChange","emit","onFocus","icFocus","onBlur","icBlur","handleFormReset","checkedChangeHandler","watchDisabledHandler","removeDisabledFalse","el","disconnectedCallback","removeFormResetListener","componentWillLoad","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","setFocus","_b","_a","shadowRoot","querySelector","focus","render","isSmall","renderHiddenInput","h","Host","key","class","htmlFor","for","readonly","slot","getInputDescribedByText","role","type","id","onChange","focusable","viewBox","xmlns","x1","y1","x2","y2","fill","cx","cy","r"],"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n\n --ic-input-label-text-color: var(--ic-switch-label);\n --ic-input-label-helper-text-color: var(--ic-switch-help-text);\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-xs);\n}\n\n.ic-switch-label-small {\n margin-bottom: var(--ic-space-xs);\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-switch-unchecked-bg);\n border: var(--ic-border-width) solid var(--ic-switch-unchecked);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-switch-unchecked);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-pressed);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-pressed);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off-disabled);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on-disabled);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-switch-unchecked-bg-disabled);\n border: var(--ic-space-1px) dashed var(--ic-switch-unchecked-outline-disabled);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-switch-unchecked-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg-disabled);\n border: var(--ic-border-width) dashed\n var(--ic-switch-checked-outline-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted([slot=\"right-adornment\"]) {\n margin-left: var(--ic-space-sm);\n fill: var(--ic-switch-icon);\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-border-hc);\n }\n\n .ic-switch-input:focus + .ic-switch-toggle {\n border-color: highlight;\n outline: var(--ic-space-xxxs) solid highlight;\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\nimport { IcSizesNoLarge, IcThemeMode } from \"../../utils/types\";\n\nlet inputIds = 0;\n\n/**\n * @slot helper-text - Content is set as the helper text for the switch.\n * @slot right-adornment - Content is placed to the right of switch.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n\n @Watch(\"checked\")\n checkedChangeHandler(): void {\n this.checkedState = !!this.checked;\n }\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * The size of the switch component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked!;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot?.querySelector(\"input\")?.focus();\n }\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value!,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked!;\n };\n\n render() {\n const {\n label,\n checkedState,\n size,\n disabled,\n name,\n value,\n hideLabel,\n helperText,\n inputId,\n theme,\n } = this;\n\n const isSmall = size === \"small\";\n\n renderHiddenInput(this.el, checkedState ? value : \"\", name, disabled);\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <label\n class={{\n \"ic-switch-container\": true,\n \"ic-switch-disabled\": !!disabled,\n \"ic-switch-small\": isSmall,\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={false}\n disabled={disabled}\n class={{\n \"ic-switch-label\": true,\n \"ic-switch-label-small\": isSmall,\n }}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={getInputDescribedByText(\n this.el,\n inputId,\n helperText !== \"\",\n false\n )}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={isSmall ? \"2\" : \"1\"}\n x2=\"9\"\n y2={isSmall ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={isSmall ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n </label>\n </Host>\n );\n }\n}\n"],"mappings":"kIAAA,MAAMA,EAAc,ggNACpB,MAAAC,EAAeD,ECsBf,IAAIE,EAAW,E,MAaFC,EAAM,MAPnB,WAAAC,CAAAC,G,6GAQUC,KAAAC,QAAU,mBAAmBL,MAI5BI,KAAAE,aAAwB,MACxBF,KAAAG,iBAAmB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A,QAAAE,IAAA,2CAAMpC,KAAK,qB","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{c as o}from"./p-f074ef5b.js";import{i as n,V as r,b as c,Q as d,d as l}from"./p-b40ecf16.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}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.ic-toast-hidden){display:none}:host(:focus){outline:none}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-toast-background);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-toast-status-neutral)}.divider-info{background-color:var(--ic-toast-status-info)}.divider-warning{background-color:var(--ic-toast-status-warning)}.divider-error{background-color:var(--ic-toast-status-error)}.divider-success{background-color:var(--ic-toast-status-success)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant="neutral"]) .toast-icon svg,::slotted(svg){fill:var(--ic-toast-icon-neutral)}:host([variant="info"]) .toast-icon svg{fill:var(--ic-toast-icon-info)}:host([variant="warning"]) .toast-icon svg{fill:var(--ic-toast-icon-warning)}:host([variant="error"]) .toast-icon svg{fill:var(--ic-toast-icon-error)}:host([variant="success"]) .toast-icon svg{fill:var(--ic-toast-icon-success)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-text{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-heading{--ic-typography-color:var(--ic-toast-title)}.toast-message{--ic-typography-color:var(--ic-toast-description)}.toast-action-container{padding-bottom:var(--ic-space-md)}#dismiss-button{padding:var(--ic-space-xs)}#dismiss-button>svg{color:var(--ic-toast-dismiss-button)}ic-loading-indicator{--outer-color:transparent;--inner-color:var(--ic-action-monochrome)}.toast-dismiss-timer{padding:var(--ic-space-sm)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}';const b=h;const m=1e3;const u=70;const p=140;const f=class{constructor(e){t(this,e);this.icDismiss=i(this,"icDismiss",7);this.interactiveElements=[];this.timerProgress=100;this.visible=false;this.autoDismissTimeout=5e3;this.dismissButtonAriaLabel="dismiss";this.dismissMode="manual";this.dismissAction=()=>{this.icDismiss.emit()};this.handleProgressChange=()=>{this.timerProgress-=m/this.autoDismissTimeout*100};this.onFocus=()=>{if(this.focusInteractiveElement){this.isManual=true}};this.onBlur=()=>{this.handleTimer({type:"mouseleave"})}}dismissModeChangeHandler(t){this.isManual=t==="manual"}disconnectedCallback(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval)}componentWillLoad(){var t,i;this.handleLongText(this.heading.length>u,!!this.message&&((t=this.message)===null||t===void 0?void 0:t.length)>p);if(this.autoDismissTimeout<5e3)this.autoDismissTimeout=5e3;if(n(this.el,"action"))this.dismissMode="manual";this.isManual=this.dismissMode==="manual";if(n(this.el,"neutral-icon"))this.variant="neutral";if(this.variant==="neutral"){this.neutralVariantLabel=(i=this.neutralIconAriaLabel)!==null&&i!==void 0?i:r[this.variant].ariaLabel}if(this.isManual){const t=l(this.message)?`. ${this.message}`:"";this.el.setAttribute("aria-label",this.variant?this.neutralVariantLabel||r[this.variant].ariaLabel:this.heading);(this.variant||this.message)&&this.el.setAttribute("aria-description",this.variant?`${this.heading}${t}`:this.message||"")}}componentDidLoad(){c([{prop:this.heading,propName:"heading"}],"Toast")}componentDidUpdate(){var t;if(this.focusInteractiveElement&&this.isManual){this.resetAutoDismissTimer();const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e);this.focusInteractiveElement=false;this.findNextInteractiveElement(this.shiftKeyPressed).setFocus();this.shiftKeyPressed=false}}watchVisibleHandler(){var t;if(this.visible){const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e)}else{this.interactiveElements=[]}}handleDismiss(){this.visible=false;this.resetAutoDismissTimer()}handleKeyboard(t){if(this.visible){if(this.isManual){switch(t.key){case"Tab":t.preventDefault();this.findNextInteractiveElement(t.shiftKey).setFocus();break;case"Escape":!t.repeat&&this.dismissAction();t.stopImmediatePropagation();break}}else{if(t.key==="Tab"){this.shiftKeyPressed=t.shiftKey;this.focusInteractiveElement=true}}}}handleTimer(t){switch(t.type){case"mouseenter":if(!this.isManual){this.resetAutoDismissTimer()}this.isManual=true;break;case"mouseleave":if(this.dismissMode==="automatic"){this.isManual=false;this.interactiveElements=[];if(this.visible){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m)}}break}}async setVisible(){if(!this.visible)this.visible=true;if(!this.isManual){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m);return null}else{window.setTimeout((()=>this.interactiveElements[0].setFocus()),200);return document.activeElement}}handleLongText(t,i){if(i||t){console.error(`Too many characters in toast ${t?"heading":""}${t&&i?" and ":""}${i?"message":""}. Refer to character limits specified in the prop description`)}}findNextInteractiveElement(t){const i=this.interactiveElements[0];const e=this.interactiveElements[this.interactiveElements.length-1];if(this.isActive(t?i:e))return t?e:i;let s=0;return this.interactiveElements.some(((t,i)=>{if(!this.isActive(t))return false;s=i;return true}))?this.interactiveElements[s+(t?-1:1)]:i}resetAutoDismissTimer(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval);this.timerProgress=100}isActive(t){return t===this.el?!!this.el.shadowRoot.activeElement:document.activeElement===t}render(){const{variant:t,heading:i,message:a,visible:c,isManual:d,dismissButtonAriaLabel:l}=this;return e(s,{key:"77ff93e63eaa0ac86b8afc447c5f2190131dd758",class:{["ic-toast-hidden"]:!c},tabindex:"0",onFocus:this.onFocus,onBlur:this.onBlur,role:d?"dialog":"alert","aria-live":d?null:"polite"},e("div",{key:"0fcc1bf6aaf4c42a8ba4828c82777f75426b63bd",class:"container"},t&&c&&e("div",{key:"87093bc655aa884d3e815f49a7ed5675e7e26b60",class:"toast-icon-container"},e("div",{key:"b169b9bad445f582c0d0019cb646f0648ea589a1",class:{["divider"]:true,[`divider-${t}`]:true}}),t==="neutral"?e("slot",{name:"neutral-icon"}):e("span",{class:"toast-icon",innerHTML:r[t].icon})),e("div",{key:"22a0c86247222789d4590a8c2698120c74fe3c59",class:{["toast-content"]:true,["no-icon"]:t==="neutral"&&!n(this.el,"neutral-icon")}},e("div",{key:"fba229f896689a7309d2e6e1d566e3e7dbd32932",class:"toast-text"},e("ic-typography",{key:"d672976872f8789ed4a51c4af23e64a48ba19bc8",variant:"subtitle-large",class:"toast-heading"},c&&(d?e("h5",null,i):e("p",null,i))),a&&e("ic-typography",{key:"f51c64d977c09cc5e6502b780dc70de84ebaa035",variant:"body",class:"toast-message"},c&&e("p",{key:"f827dbff18b4b0cfd713747f09d62e0040f8f1a3"},a))),n(this.el,"action")&&e("div",{key:"3f5cee133b54735d6d7466ceb37389d27b61c7a0",class:"toast-action-container"},e("slot",{key:"b7882de8b13f069887ebd612ab6e260b063c65d1",name:"action"}))),!d?e("ic-loading-indicator",{class:"toast-dismiss-timer",theme:"dark",monochrome:true,size:"icon",progress:this.timerProgress,description:"Dismiss timer"}):e("ic-button",{id:"dismiss-button",innerHTML:o,onClick:this.dismissAction,variant:"icon","aria-label":l})))}get el(){return a(this)}static get watchers(){return{dismissMode:["dismissModeChangeHandler"],visible:["watchVisibleHandler"]}}};f.style=b;export{f as ic_toast};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{c as o}from"./p-f074ef5b.js";import{i as n,V as r,b as c,Q as d,d as l}from"./p-70abcb2b.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}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.ic-toast-hidden){display:none}:host(:focus){outline:none}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-toast-background);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-toast-status-neutral)}.divider-info{background-color:var(--ic-toast-status-info)}.divider-warning{background-color:var(--ic-toast-status-warning)}.divider-error{background-color:var(--ic-toast-status-error)}.divider-success{background-color:var(--ic-toast-status-success)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant="neutral"]) .toast-icon svg,::slotted(svg){fill:var(--ic-toast-icon-neutral)}:host([variant="info"]) .toast-icon svg{fill:var(--ic-toast-icon-info)}:host([variant="warning"]) .toast-icon svg{fill:var(--ic-toast-icon-warning)}:host([variant="error"]) .toast-icon svg{fill:var(--ic-toast-icon-error)}:host([variant="success"]) .toast-icon svg{fill:var(--ic-toast-icon-success)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-text{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-heading{--ic-typography-color:var(--ic-toast-title)}.toast-message{--ic-typography-color:var(--ic-toast-description)}.toast-action-container{padding-bottom:var(--ic-space-md)}#dismiss-button{padding:var(--ic-space-xs)}#dismiss-button>svg{color:var(--ic-toast-dismiss-button)}ic-loading-indicator{--outer-color:transparent;--inner-color:var(--ic-action-monochrome)}.toast-dismiss-timer{padding:var(--ic-space-sm)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}';const b=h;const m=1e3;const u=70;const p=140;const f=class{constructor(e){t(this,e);this.icDismiss=i(this,"icDismiss",7);this.interactiveElements=[];this.timerProgress=100;this.visible=false;this.autoDismissTimeout=5e3;this.dismissButtonAriaLabel="dismiss";this.dismissMode="manual";this.dismissAction=()=>{this.icDismiss.emit()};this.handleProgressChange=()=>{this.timerProgress-=m/this.autoDismissTimeout*100};this.onFocus=()=>{if(this.focusInteractiveElement){this.isManual=true}};this.onBlur=()=>{this.handleTimer({type:"mouseleave"})}}dismissModeChangeHandler(t){this.isManual=t==="manual"}disconnectedCallback(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval)}componentWillLoad(){var t,i;this.handleLongText(this.heading.length>u,!!this.message&&((t=this.message)===null||t===void 0?void 0:t.length)>p);if(this.autoDismissTimeout<5e3)this.autoDismissTimeout=5e3;if(n(this.el,"action"))this.dismissMode="manual";this.isManual=this.dismissMode==="manual";if(n(this.el,"neutral-icon"))this.variant="neutral";if(this.variant==="neutral"){this.neutralVariantLabel=(i=this.neutralIconAriaLabel)!==null&&i!==void 0?i:r[this.variant].ariaLabel}if(this.isManual){const t=l(this.message)?`. ${this.message}`:"";this.el.setAttribute("aria-label",this.variant?this.neutralVariantLabel||r[this.variant].ariaLabel:this.heading);(this.variant||this.message)&&this.el.setAttribute("aria-description",this.variant?`${this.heading}${t}`:this.message||"")}}componentDidLoad(){c([{prop:this.heading,propName:"heading"}],"Toast")}componentDidUpdate(){var t;if(this.focusInteractiveElement&&this.isManual){this.resetAutoDismissTimer();const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e);this.focusInteractiveElement=false;this.findNextInteractiveElement(this.shiftKeyPressed).setFocus();this.shiftKeyPressed=false}}watchVisibleHandler(){var t;if(this.visible){const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e)}else{this.interactiveElements=[]}}handleDismiss(){this.visible=false;this.resetAutoDismissTimer()}handleKeyboard(t){if(this.visible){if(this.isManual){switch(t.key){case"Tab":t.preventDefault();this.findNextInteractiveElement(t.shiftKey).setFocus();break;case"Escape":!t.repeat&&this.dismissAction();t.stopImmediatePropagation();break}}else{if(t.key==="Tab"){this.shiftKeyPressed=t.shiftKey;this.focusInteractiveElement=true}}}}handleTimer(t){switch(t.type){case"mouseenter":if(!this.isManual){this.resetAutoDismissTimer()}this.isManual=true;break;case"mouseleave":if(this.dismissMode==="automatic"){this.isManual=false;this.interactiveElements=[];if(this.visible){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m)}}break}}async setVisible(){if(!this.visible)this.visible=true;if(!this.isManual){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m);return null}else{window.setTimeout((()=>this.interactiveElements[0].setFocus()),200);return document.activeElement}}handleLongText(t,i){if(i||t){console.error(`Too many characters in toast ${t?"heading":""}${t&&i?" and ":""}${i?"message":""}. Refer to character limits specified in the prop description`)}}findNextInteractiveElement(t){const i=this.interactiveElements[0];const e=this.interactiveElements[this.interactiveElements.length-1];if(this.isActive(t?i:e))return t?e:i;let s=0;return this.interactiveElements.some(((t,i)=>{if(!this.isActive(t))return false;s=i;return true}))?this.interactiveElements[s+(t?-1:1)]:i}resetAutoDismissTimer(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval);this.timerProgress=100}isActive(t){return t===this.el?!!this.el.shadowRoot.activeElement:document.activeElement===t}render(){const{variant:t,heading:i,message:a,visible:c,isManual:d,dismissButtonAriaLabel:l}=this;return e(s,{key:"77ff93e63eaa0ac86b8afc447c5f2190131dd758",class:{["ic-toast-hidden"]:!c},tabindex:"0",onFocus:this.onFocus,onBlur:this.onBlur,role:d?"dialog":"alert","aria-live":d?null:"polite"},e("div",{key:"0fcc1bf6aaf4c42a8ba4828c82777f75426b63bd",class:"container"},t&&c&&e("div",{key:"87093bc655aa884d3e815f49a7ed5675e7e26b60",class:"toast-icon-container"},e("div",{key:"b169b9bad445f582c0d0019cb646f0648ea589a1",class:{["divider"]:true,[`divider-${t}`]:true}}),t==="neutral"?e("slot",{name:"neutral-icon"}):e("span",{class:"toast-icon",innerHTML:r[t].icon})),e("div",{key:"22a0c86247222789d4590a8c2698120c74fe3c59",class:{["toast-content"]:true,["no-icon"]:t==="neutral"&&!n(this.el,"neutral-icon")}},e("div",{key:"fba229f896689a7309d2e6e1d566e3e7dbd32932",class:"toast-text"},e("ic-typography",{key:"d672976872f8789ed4a51c4af23e64a48ba19bc8",variant:"subtitle-large",class:"toast-heading"},c&&(d?e("h5",null,i):e("p",null,i))),a&&e("ic-typography",{key:"f51c64d977c09cc5e6502b780dc70de84ebaa035",variant:"body",class:"toast-message"},c&&e("p",{key:"f827dbff18b4b0cfd713747f09d62e0040f8f1a3"},a))),n(this.el,"action")&&e("div",{key:"3f5cee133b54735d6d7466ceb37389d27b61c7a0",class:"toast-action-container"},e("slot",{key:"b7882de8b13f069887ebd612ab6e260b063c65d1",name:"action"}))),!d?e("ic-loading-indicator",{class:"toast-dismiss-timer",theme:"dark",monochrome:true,size:"icon",progress:this.timerProgress,description:"Dismiss timer"}):e("ic-button",{id:"dismiss-button",innerHTML:o,onClick:this.dismissAction,variant:"icon","aria-label":l})))}get el(){return a(this)}static get watchers(){return{dismissMode:["dismissModeChangeHandler"],visible:["watchVisibleHandler"]}}};f.style=b;export{f as ic_toast};
|
2
|
+
//# sourceMappingURL=p-5fb58cc8.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as e,c as t,f as i,h as a,H as s,g as r}from"./p-8e4e97b4.js";import{H as o,r as n,G as l,k as c,x as d,j as h,b as u,N as b,L as p,n as f,l as m,m as x,i as v,M as g,z as y}from"./p-70abcb2b.js";const w='/*! 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;--ic-input-label-helpertext-padding:var(--ic-space-xs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal);background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot="icon"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';const k=w;let z=0;const C=[...y,"title"];const $=class{constructor(a){e(this,a);this.getValidationText=t(this,"getValidationText",7);this.icBlur=t(this,"icBlur",7);this.icChange=t(this,"icChange",7);this.icFocus=t(this,"icFocus",7);this.icInput=t(this,"icInput",7);this.icKeydown=t(this,"icKeydown",7);this.icScroll=t(this,"icScroll",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.numChars=0;this.maxCharactersReached=false;this.maxCharactersWarning=false;this.minCharactersUnattained=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.isFocussed=false;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideCharCount=false;this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${z++}`;this.inputmode="text";this.maxCharacters=0;this.maxCharactersMessage=`Maximum input is ${this.maxCharacters} characters`;this.maxMessage=`Maximum value of ${this.max} exceeded`;this.minCharacters=0;this.minCharactersMessage=`Minimum input is ${this.minCharacters} characters`;this.minMessage=`Minimum value of ${this.min} not met`;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.rows=1;this.size="medium";this.spellcheck=false;this.theme="inherit";this.truncateValue=false;this.type="text";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value;this.checkChildHydration=()=>{var e,t;if(this.hideLabel||((t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("ic-typography"))===null||t===void 0?void 0:t.classList.contains("hydrated"))){this.setFocus();clearInterval(this.interval)}};this.getNumberOfCharacters=e=>e!==null&&e!==undefined?e.length:0;this.getMaxValueExceeded=e=>{this.numChars=this.getNumberOfCharacters(e);if(this.type==="number"){this.minValueUnattained=!!e&&Number(e)<Number(this.min);this.maxValueExceeded=Number(e)>Number(this.max)}};this.getMaxCharactersReached=e=>{this.numChars=this.getNumberOfCharacters(e);this.maxCharactersReached=this.maxCharacters>0&&this.numChars>=this.maxCharacters;if(this.maxCharactersWarning&&!this.maxCharactersReached){this.maxCharactersWarning=false}};this.onInput=e=>{this.value=e.target.value;this.icInput.emit({value:this.value})};this.onBlur=e=>{const t=e.target;t.removeEventListener("wheel",this.onWheel);const{value:i}=t;this.numChars=i.length;this.minCharactersUnattained=this.minCharacters>0&&this.numChars<this.minCharacters;this.icBlur.emit({value:i});this.isFocussed=false};this.onFocus=e=>{const t=e.target;t.addEventListener("wheel",this.onWheel);this.icFocus.emit({value:t.value});this.isFocussed=true};this.onTextAreaScroll=()=>{this.icScroll.emit()};this.onWheel=e=>{const t=e.target;if(t.type==="number"){t.blur();setTimeout((()=>{t.focus()}),0)}};this.hasStatus=e=>e!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.hostMutationCallback=e=>{let t=false;e.forEach((({attributeName:e,type:i,addedNodes:a,removedNodes:s})=>{if(e&&C.includes(e)){const i=this.el.getAttribute(e);if(i){this.inheritedAttributes[e]=i}t=true}else if(i==="childList"){t=o(a,s,"icon")}}));if(t){i(this)}}}watchDisabledHandler(){n(this.disabled,this.el)}debounceChanged(){this.icChange=l(this.icChange,this.debounce)}watchValueHandler(e){let t;if(this.maxCharacters>0){t=e.substring(0,this.maxCharacters);if(t.length<e.length){this.maxCharactersWarning=true}this.value=t}else{t=e}if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}this.getMaxValueExceeded(t);this.getMaxCharactersReached(t);this.icChange.emit({value:t})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var e;c(this.el,this.handleFormReset);(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}else if(this.maxCharacters>0){this.value=this.value.substring(0,this.maxCharacters)}this.getMaxValueExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=d(this.el,C);if(this.readonly){this.maxValueExceeded=false;this.minValueUnattained=false}h(this.el,this.handleFormReset);n(this.disabled,this.el)}componentDidLoad(){u([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true});if(this.autofocus&&!this.disabled&&!this.readonly){this.interval=setInterval(this.checkChildHydration,50)}}handleKeyDown(e){this.icKeydown.emit({event:e});if(!e.ctrlKey&&!b.includes(e.key)){this.maxCharactersWarning=this.maxCharactersReached}}async setFocus(){var e;(e=this.inputEl)===null||e===void 0?void 0:e.focus()}render(){const{inputId:e,name:t,label:i,required:r,size:o,placeholder:n,helperText:l,hideCharCount:c,rows:d,resize:h,disabled:u,value:b,min:y,max:w,numChars:k,readonly:z,maxCharacters:C,maxCharactersMessage:$,maxCharactersWarning:I,maxCharactersReached:M,maxMessage:L,minCharacters:N,minCharactersMessage:T,minCharactersUnattained:j,minMessage:F,minValueUnattained:q,maxValueExceeded:H,validationStatus:V,validationText:D,validationInline:W,validationInlineInternal:B,spellcheck:O,inputmode:S,fullWidth:A,truncateValue:E,hiddenInput:K,theme:U,hideLabel:_,type:G,autocapitalize:R,ariaActiveDescendant:J,inheritedAttributes:P,ariaExpanded:Q,ariaOwns:X,autocomplete:Y,role:Z,isFocussed:ee}=this;const te=this.el;const ie=z||u;const ae=H||q||j||I?I?p.Warning:p.Error:V;const se=I?$:H?L:q?F:j?T:D;const re=z?0:C;const oe=I||H||q||ae===p.Error?"assertive":"polite";const ne=this.hasStatus(ae)&&!(ae==p.Success&&W)&&!B;const le=d>1;const ce=C>0?`${e}-char-count-desc`:"";const de=re-k;const he=C>0?`${e}-remaining-char-count-desc`:"";const ue=`${de} character${de===1?"":"s"} remaining.`;const be=`${ce} ${k>0?he:""} ${f(this.el,e,l!=="",ne)}`.trim();const pe=ie&&!z;const fe=!!this.el.querySelector(`[slot="icon"]`)&&!pe;const me=`${ae===p.Error}`;K?m(this.el,b,t,ie):x(this.el);return a(s,{key:"353a70181ab18c4f636b34e2177bb9d088567885",class:{"ic-text-field-full-width":A,"ic-text-field-disabled":ie,[`ic-theme-${U}`]:U!=="inherit"}},a("ic-input-container",{key:"96d0ef6132ed2a26ee535cfc5055ddc6287446f6",readonly:z,disabled:ie},!_&&a("ic-input-label",{key:"dfcb7859651f74678636e4cda1ba0706b2e3b1fb",for:e,label:i,helperText:l,required:r,disabled:pe,readonly:z},a("slot",{key:"d9ee297f2de674a969486a3d00eef54526eace50",name:"helper-text",slot:"helper-text"})),a("ic-input-component-container",{key:"0a178235ced26ef73fd907d41424a8b4942659dc",size:o,validationStatus:ae,multiLine:le,disabled:ie,readonly:z,validationInline:W,fullWidth:A},fe&&a("span",{key:"c5206e3d1af81d4bf9bf0afcc9277899ca2287be",class:{readonly:z,"has-value":this.getNumberOfCharacters(b)>0},slot:"left-icon"},a("slot",{key:"f3945929b482d9a0a954dc1afa658fc0c45d90c8",name:"icon"})),!le?a("input",Object.assign({id:e,name:t,ref:e=>this.inputEl=e,type:G,min:y,max:w,value:b,class:{"no-left-pad":!fe&&z,readonly:z,"truncate-value":E},placeholder:n?n:"",required:r,disabled:ie,readonly:z,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":i,"aria-describedby":be,"aria-invalid":me,"aria-activedescendant":J,"aria-expanded":Q,"aria-owns":X,autocomplete:Y,autocapitalize:R,spellcheck:O,inputmode:S,role:Z||undefined,maxlength:M?C:undefined,minlength:j?N:undefined},P)):a("textarea",Object.assign({id:e,class:{"no-resize":h===false||!!z,"no-left-pad":!fe&&!!z,readonly:!!z},name:t,ref:e=>this.inputEl=e,value:b,rows:d,required:r,disabled:ie,placeholder:n,readonly:z,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onScroll:this.onTextAreaScroll,"aria-label":i,"aria-describedby":be,"aria-invalid":me,autocapitalize:R,spellcheck:O,inputmode:S,maxlength:M?C:undefined,minlength:j?N:undefined},P)),v(te,"clear-button")&&a("slot",{key:"6397d66b59b148884cb2fd7f8913063ca24f0de1",name:"clear-button"}),v(te,"search-submit-button")&&a("slot",{key:"c5e7f94345cebe1dc99ba475aa5bde1b45dda0e0",name:"search-submit-button"})),v(te,"menu")&&a("slot",{key:"1c7fe7d7654373753295a44a3e126ce2409099cc",name:"menu"}),(!g(V)||!g(D)||re>0||H||I||j||q)&&!B&&a("ic-input-validation",{key:"2ba3ff987910423696b822529b36e59f04b36025",status:this.hasStatus(ae)===false||ae===p.Success&&W||B?"":ae,message:ne?se:"",ariaLiveMode:oe,for:e,fullWidth:A},!z&&re>0&&a("div",{key:"01e443574b72a18ebd0b0646b0c2c30b59cc5726",slot:"validation-message-adornment"},!c&&a("ic-typography",{key:"90d4e1d9325a34444c38a9c75eaaa5e256c23cae",variant:"caption",class:"char-count-text"},a("span",{key:"901a7db053e3fa59e6db506a53be92ddbf54be5d",class:"char-count"},k,"/",re)),a("span",{key:"83b08ec8e8ba8286cc8024b647552c5b3e0d09e5",class:"remaining-char-count-desc","aria-live":"polite",hidden:!ee,id:he},ue),a("span",{key:"28e0fc0de7a73057a7b00bd7e40e71c7611a980c",hidden:true,id:ce},"Field can contain a maximum of ",re," characters.")))))}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"],debounce:["debounceChanged"],value:["watchValueHandler"]}}};$.style=k;export{$ as ic_text_field};
|
2
|
+
//# sourceMappingURL=p-627f7172.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icTextFieldCss","IcTextFieldStyle0","inputIds","MUTABLE_ATTRIBUTES","IC_INHERITED_ARIA","TextField","constructor","hostRef","this","inheritedAttributes","hostMutationObserver","numChars","maxCharactersReached","maxCharactersWarning","minCharactersUnattained","maxValueExceeded","minValueUnattained","isFocussed","autocapitalize","autocomplete","autocorrect","autofocus","disabled","fullWidth","helperText","hideCharCount","hideLabel","hiddenInput","inputId","inputmode","maxCharacters","maxCharactersMessage","maxMessage","max","minCharacters","minCharactersMessage","minMessage","min","name","placeholder","readonly","required","resize","rows","size","spellcheck","theme","truncateValue","type","validationInline","validationInlineInternal","validationStatus","validationText","debounce","value","initialValue","checkChildHydration","_b","_a","el","shadowRoot","querySelector","classList","contains","setFocus","clearInterval","interval","getNumberOfCharacters","undefined","length","getMaxValueExceeded","Number","getMaxCharactersReached","onInput","ev","target","icInput","emit","onBlur","removeEventListener","onWheel","icBlur","onFocus","addEventListener","icFocus","onTextAreaScroll","icScroll","blur","setTimeout","focus","hasStatus","status","handleFormReset","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","addedNodes","removedNodes","includes","attribute","getAttribute","checkSlotInChildMutations","forceUpdate","watchDisabledHandler","removeDisabledFalse","debounceChanged","icChange","debounceEvent","watchValueHandler","newValue","substring","inputEl","connectedCallback","disconnectedCallback","removeFormResetListener","disconnect","componentWillLoad","inheritAttributes","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","getValidationText","MutationObserver","observe","attributes","childList","setInterval","handleKeyDown","icKeydown","event","ctrlKey","IGNORED_KEYBOARD_CHARACTERS","key","render","ariaActiveDescendant","ariaExpanded","ariaOwns","role","disabledMode","currentStatus","IcInformationStatus","Warning","Error","currentValidationText","maxNumChars","messageAriaLive","showStatusText","Success","multiline","hiddenCharCountDescId","charsRemaining","remainingCharCountDescId","remainingCharCountDesc","describedBy","getInputDescribedByText","trim","disabledText","showLeftIcon","invalid","renderHiddenInput","removeHiddenInput","h","Host","class","for","slot","multiLine","Object","assign","id","ref","maxlength","minlength","onScroll","isSlotUsed","isEmptyString","message","ariaLiveMode","variant","hidden"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n --border-color: var(--ic-text-field-border-neutral);\n --border-color-hover: var(--ic-text-field-border-neutral-hover);\n --border-color-pressed: var(--ic-text-field-border-neutral-pressed);\n --border-color-disabled: var(--ic-text-field-border-disabled);\n --border-color-error: var(--ic-text-field-border-error);\n --border-color-error-hover: var(--ic-text-field-border-error-hover);\n --border-color-error-pressed: var(--ic-text-field-border-error-pressed);\n --border-color-success: var(--ic-text-field-border-success);\n --border-color-success-hover: var(--ic-text-field-border-success-hover);\n --border-color-success-pressed: var(--ic-text-field-border-success-pressed);\n --border-color-warning: var(--ic-text-field-border-warning);\n --border-color-warning-hover: var(--ic-text-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-text-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-text-field-label);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle);\n --ic-input-validation-status-text-color: var(--ic-text-field-state-text);\n --ic-input-validation-error: var(--ic-text-field-state-icon-error);\n --ic-input-validation-warning-icon-color: var(\n --ic-text-field-state-icon-warning\n );\n --ic-input-validation-success-icon-color: var(\n --ic-text-field-state-icon-success\n );\n --ic-input-component-container-success-icon-inline-color: var(\n --ic-text-field-state-icon-success\n );\n}\n\n:host(.ic-text-field-disabled) {\n --ic-input-label-text-color: var(--ic-text-field-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle-disabled);\n --text-field-placeholder-color: var(\n --ic-text-field-text-area-placeholder-text-disabled\n );\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--text-field-text-color, var(--ic-text-field-text));\n background-color: var(--input-bg-color, var(--ic-text-field-background));\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n caret-color: var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n );\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n );\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-text-field-read-only-input-text-internal);\n background: transparent;\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n:host(.ic-text-field-disabled) .char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit-disabled);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-text-disabled);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-input-internal-icon);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n removeHiddenInput,\n} from \"../../utils/helpers\";\nimport {\n IC_INHERITED_ARIA,\n IGNORED_KEYBOARD_CHARACTERS,\n} from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot helper-text - Content is set as the helper text for the text field.\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver | null = null;\n private interval: ReturnType<typeof setInterval>;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersWarning: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n @State() isFocussed: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete?: IcAriaAutocompleteTypes;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string | null;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns?: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete?: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect?: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el as HTMLElement);\n }\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText = \"\";\n\n /**\n * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.\n */\n @Prop() hideCharCount = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max?: string | number;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)\n */\n @Prop() maxCharacters = 0;\n\n /**\n * The text to display as the warning message when the maximum number of characters (the `maxCharacters` prop value) is reached.\n */\n // prettier-ignore\n @Prop() maxCharactersMessage = `Maximum input is ${this.maxCharacters} characters`;\n\n /**\n * The text to display as the error message when the maximum value (the `max` prop value) has been exceeded.\n */\n @Prop() maxMessage = `Maximum value of ${this.max} exceeded`;\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min?: string | number;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters = 0;\n\n /**\n * The text to display as the error message when the minimum number of characters (the `minCharacters` prop value) has not been met.\n */\n // prettier-ignore\n @Prop() minCharactersMessage = `Minimum input is ${this.minCharacters} characters`;\n\n /**\n * The text to display as the error message when the minimum value (the `min` prop value) has not been met.\n */\n @Prop() minMessage = `Minimum value of ${this.min} not met`;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string | null;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size: IcSizesNoLarge = \"medium\";\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue = false;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value = \"\";\n @State() initialValue = this.value;\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n let value;\n\n if (this.maxCharacters > 0) {\n value = newValue.substring(0, this.maxCharacters);\n if (value.length < newValue.length) {\n this.maxCharactersWarning = true;\n }\n this.value = value;\n } else {\n value = newValue;\n }\n\n if (this.inputEl && this.inputEl.value !== value) {\n this.inputEl.value = value;\n }\n\n this.getMaxValueExceeded(value);\n\n this.getMaxCharactersReached(value);\n\n this.icChange.emit({ value });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n /**\n * Emitted when the textarea variant is scrolled.\n */\n @Event() icScroll: EventEmitter;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el as HTMLElement, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n } else if (this.maxCharacters > 0) {\n this.value = this.value.substring(0, this.maxCharacters);\n }\n\n this.getMaxValueExceeded(this.value);\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(\n this.el as HTMLElement,\n MUTABLE_ATTRIBUTES\n );\n\n if (this.readonly) {\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el as HTMLElement, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el as HTMLElement);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n\n if (this.autofocus && !this.disabled && !this.readonly) {\n this.interval = setInterval(this.checkChildHydration, 50);\n }\n }\n\n private checkChildHydration = () => {\n if (\n this.hideLabel ||\n this.el.shadowRoot\n ?.querySelector(\"ic-typography\")\n ?.classList.contains(\"hydrated\")\n ) {\n this.setFocus();\n clearInterval(this.interval);\n }\n };\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n\n if (!ev.ctrlKey && !IGNORED_KEYBOARD_CHARACTERS.includes(ev.key)) {\n this.maxCharactersWarning = this.maxCharactersReached;\n }\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getNumberOfCharacters = (value: string) =>\n value !== null && value !== undefined ? value.length : 0;\n\n private getMaxValueExceeded = (value: string) => {\n this.numChars = this.getNumberOfCharacters(value);\n\n if (this.type === \"number\") {\n this.minValueUnattained = !!value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = this.getNumberOfCharacters(value);\n\n this.maxCharactersReached =\n this.maxCharacters > 0 && this.numChars >= this.maxCharacters;\n\n if (this.maxCharactersWarning && !this.maxCharactersReached) {\n this.maxCharactersWarning = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const target = ev.target as HTMLInputElement;\n target.removeEventListener(\"wheel\", this.onWheel);\n const { value } = target;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 && this.numChars < this.minCharacters;\n this.icBlur.emit({ value });\n this.isFocussed = false;\n };\n\n private onFocus = (ev: Event) => {\n const target = ev.target as HTMLInputElement;\n target.addEventListener(\"wheel\", this.onWheel);\n this.icFocus.emit({ value: target.value });\n this.isFocussed = true;\n };\n\n private onTextAreaScroll = () => {\n this.icScroll.emit();\n };\n\n private onWheel = (ev: WheelEvent) => {\n const target = ev.target as HTMLInputElement;\n if (target.type === \"number\") {\n target.blur();\n setTimeout(() => {\n target.focus();\n }, 0);\n }\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (attributeName && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute) {\n this.inheritedAttributes[attributeName] = attribute;\n }\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n placeholder,\n helperText,\n hideCharCount,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n numChars,\n readonly,\n maxCharacters,\n maxCharactersMessage,\n maxCharactersWarning,\n maxCharactersReached,\n maxMessage,\n minCharacters,\n minCharactersMessage,\n minCharactersUnattained,\n minMessage,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n theme,\n hideLabel,\n type,\n autocapitalize,\n ariaActiveDescendant,\n inheritedAttributes,\n ariaExpanded,\n ariaOwns,\n autocomplete,\n role,\n isFocussed,\n } = this;\n\n const el = this.el as HTMLElement;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersWarning\n ? maxCharactersWarning\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxCharactersWarning\n ? maxCharactersMessage\n : maxValueExceeded\n ? maxMessage\n : minValueUnattained\n ? minMessage\n : minCharactersUnattained\n ? minCharactersMessage\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxCharacters;\n const messageAriaLive =\n maxCharactersWarning ||\n maxValueExceeded ||\n minValueUnattained ||\n currentStatus === IcInformationStatus.Error\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n\n const hiddenCharCountDescId =\n maxCharacters > 0 ? `${inputId}-char-count-desc` : \"\";\n\n const charsRemaining = maxNumChars - numChars;\n const remainingCharCountDescId =\n maxCharacters > 0 ? `${inputId}-remaining-char-count-desc` : \"\";\n const remainingCharCountDesc = `${charsRemaining} character${\n charsRemaining === 1 ? \"\" : \"s\"\n } remaining.`;\n\n const describedBy = `${hiddenCharCountDescId} ${\n numChars > 0 ? remainingCharCountDescId : \"\"\n } ${getInputDescribedByText(\n this.el,\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n hiddenInput\n ? renderHiddenInput(this.el as HTMLElement, value, name, disabledMode)\n : removeHiddenInput(this.el as HTMLElement);\n\n return (\n <Host\n class={{\n \"ic-text-field-full-width\": fullWidth,\n \"ic-text-field-disabled\": disabledMode,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n >\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-input-label>\n )}\n\n <ic-input-component-container\n size={size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n readonly,\n \"has-value\": this.getNumberOfCharacters(value) > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={type}\n min={min}\n max={max}\n value={value}\n class={{\n \"no-left-pad\": !showLeftIcon && readonly,\n readonly,\n \"truncate-value\": truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={ariaActiveDescendant}\n aria-expanded={ariaExpanded}\n aria-owns={ariaOwns}\n autocomplete={autocomplete}\n autocapitalize={autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={role || undefined}\n maxlength={maxCharactersReached ? maxCharacters : undefined}\n minlength={minCharactersUnattained ? minCharacters : undefined}\n {...inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n \"no-resize\": resize === false || !!readonly,\n \"no-left-pad\": !showLeftIcon && !!readonly,\n readonly: !!readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onScroll={this.onTextAreaScroll}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : undefined}\n minlength={minCharactersUnattained ? minCharacters : undefined}\n {...inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersWarning ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n {!hideCharCount && (\n <ic-typography variant=\"caption\" class=\"char-count-text\">\n <span class=\"char-count\">\n {numChars}/{maxNumChars}\n </span>\n </ic-typography>\n )}\n <span\n class=\"remaining-char-count-desc\"\n aria-live=\"polite\"\n hidden={!isFocussed}\n id={remainingCharCountDescId}\n >\n {remainingCharCountDesc}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"6MAAA,MAAMA,EAAiB,mtMACvB,MAAAC,EA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A,EAChB2B,WAAYA,EACZhB,UAAWA,EACXmJ,UAAWpK,EAAuBkB,EAAgBsC,UAClD6G,UAAWnK,EAA0BoB,EAAgBkC,WACjD3D,IAGP0K,EAAWxH,GAAI,iBACd2G,EAAA,QAAA7B,IAAA,2CAAMnG,KAAK,iBAEZ6I,EAAWxH,GAAI,yBACd2G,EAAA,QAAA7B,IAAA,2CAAMnG,KAAK,0BAGd6I,EAAWxH,GAAI,SAAW2G,EAAA,QAAA7B,IAAA,2CAAMnG,KAAK,WACnC8I,EAAcjI,KACdiI,EAAchI,IACfiG,GAAc,GACdtI,GACAF,GACAC,GACAE,KACCkC,GACCoH,EAAA,uBAAA7B,IAAA,2CACE9C,OACEnF,KAAKkF,UAAUsD,MAAmB,OACjCA,KAAkBC,EAAoBO,SACrCvG,GACFC,EACI,GACA8F,GAENqC,QAAS9B,GAAiBH,GAAwB,GAClDkC,aAAchC,GACdmB,IAAK7I,EACLL,UAAWA,IAETiB,GAAY6G,GAAc,GAC1BiB,EAAA,OAAA7B,IAAA,2CAAKiC,KAAK,iCACNjJ,GACA6I,EAAA,iBAAA7B,IAAA,2CAAe8C,QAAQ,UAAUf,MAAM,mBACrCF,EAAA,QAAA7B,IAAA,2CAAM+B,MAAM,cACT7J,EAAQ,IAAG0I,KAIlBiB,EAAA,QAAA7B,IAAA,2CACE+B,MAAM,4BAA2B,YACvB,SACVgB,QAASvK,GACT6J,GAAIlB,IAEHC,IAEHS,EAAA,QAAA7B,IAAA,2CAAM+C,OAAQ,KAAMV,GAAIpB,IAAqB,kCACXL,GAAW,mB","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,c as e,h as o,H as i,g as n}from"./p-8e4e97b4.js";import{r}from"./p-70abcb2b.js";const s='/*! 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}:root{display:block}:host{display:flex;flex-direction:row;width:-moz-fit-content;width:fit-content;min-width:-moz-min-content;min-width:min-content;border:var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);border-radius:var(--ic-border-radius)}:host(.ic-toggle-button-group-full-width){width:100%;max-width:100%}:host(.ic-toggle-button-group-loading){min-width:-moz-max-content;min-width:max-content}:host(:focus){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}::slotted(ic-toggle-button){flex-grow:1;width:-moz-min-content;width:min-content;--toggle-button-border:none !important;--toggle-button-border-hover:none !important;--toggle-button-border-active:none !important}::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border)}:host(.ic-toggle-button-group-disabled){border:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);pointer-events:none}:host(.ic-toggle-button-group-disabled) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled)}:host(.ic-toggle-button-group-monochrome){border:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome){border:var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}:host(.ic-toggle-button-group-hide-outline){--ic-toggle-button-unselected-border:transparent;--ic-toggle-button-unselected-border-disabled:transparent;--ic-toggle-button-unselected-border-monochrome:transparent;--ic-toggle-button-unselected-border-disabled-monochrome:transparent}';const a=s;const l="IC-TOGGLE-BUTTON-GROUP";const d=class{constructor(o){t(this,o);this.icChange=e(this,"icChange",7);this.lastKeyPressed={key:null,shift:false};this.accessibleLabel="Toggle button group";this.disabled=false;this.fullWidth=false;this.loading=false;this.monochrome=false;this.outline=true;this.selectMethod="manual";this.selectType="single";this.size="medium";this.theme="inherit";this.tooltipPlacement="bottom";this.variant="default";this.keyListener=t=>{this.lastKeyPressed={key:t.key,shift:t.shiftKey}};this.handleHostFocus=({target:t,relatedTarget:e})=>{var o;if(this.loading||this.disabled)return;const i=t;const n=e;const r=Array.from((i===null||i===void 0?void 0:i.querySelectorAll("ic-toggle-button"))||[]);const s=r.every((t=>!t.checked));const{shift:a}=this.lastKeyPressed;if((s||this.selectType!=="single")&&!a||s&&a&&(n===null||n===void 0?void 0:n.tagName)==l){(o=r[0])===null||o===void 0?void 0:o.focus()}else if(!a||(n===null||n===void 0?void 0:n.tagName)==l){r.filter((t=>t.checked))[0].focus()}};this.handleKeyDown=({key:t})=>{if(t!=="ArrowDown"&&t!=="ArrowRight"&&t!=="ArrowLeft"&&t!=="ArrowUp")return;const e=this.getAllToggleButtons();const o=e[this.getNextItemToSelect(e.indexOf(e.filter((t=>t===document.activeElement))[0]),t==="ArrowDown"||t==="ArrowRight")];if(this.selectMethod==="auto"){o.checked=true;this.selectHandler(new CustomEvent("icToggleChecked",{detail:{checked:o.checked}}),o)}else{o.focus()}};this.getNextItemToSelect=(t,e)=>{const o=this.getAllToggleButtons();const i=o.length-1;if(t<1){t=0}let n=e?t+1:t-1;if(n<0){n=i}else if(n>i){n=0}if(o[n].disabled){n=this.getNextItemToSelect(n,e)}return n};this.getAllToggleButtons=()=>Array.from(this.el.querySelectorAll("ic-toggle-button"))}watchDisabledHandler(){this.getAllToggleButtons().forEach((t=>{t.disabled=this.disabled}));r(this.disabled,this.el)}watchFullWidthHandler(){this.getAllToggleButtons().forEach((t=>{t.fullWidth=this.fullWidth}))}watchLoadingHandler(){this.getAllToggleButtons().forEach((t=>{t.loading=this.loading}))}watchMonochromeHandler(){this.getAllToggleButtons().forEach((t=>{t.monochrome=this.monochrome}))}watchOutlineHandler(){this.getAllToggleButtons().forEach((t=>{t.outline=this.outline}))}watchSizeHandler(){this.getAllToggleButtons().forEach((t=>{t.size=this.size}))}watchThemeHandler(){this.getAllToggleButtons().forEach((t=>{t.theme=this.theme}))}watchTooltipPlacementHandler(){this.getAllToggleButtons().forEach((t=>{t.tooltipPlacement=this.tooltipPlacement}))}watchVariantHandler(){this.getAllToggleButtons().forEach((t=>{t.variant=this.variant}))}selectHandler(t,e){const o=this.getAllToggleButtons();let i=t.target;if(e)e.focus();if(this.selectType==="single"){if(!i&&e){i=e}o.forEach((t=>{if(t.id!==i.id&&t.checked){t.checked=false}}));this.icChange.emit({checked:t.detail.checked,selectedOption:i})}else{const t=o.filter((t=>t.checked&&!t.disabled));this.icChange.emit({checked:t.map((t=>t.checked)),toggledOptions:t.map((t=>({toggleButton:t}))),selectedOption:i})}}componentWillLoad(){if(this.selectType==="multi")this.selectMethod="manual";document.addEventListener("keydown",this.keyListener);r(this.disabled,this.el)}componentDidLoad(){this.getAllToggleButtons().forEach(((t,e)=>{var o,i,n;const r=(n=(i=(o=t.shadowRoot)===null||o===void 0?void 0:o.querySelector("ic-button"))===null||i===void 0?void 0:i.shadowRoot)===null||n===void 0?void 0:n.querySelector("button");if(r){const t=r.getAttribute("aria-label");const e=t?`${t}, `:"";r.setAttribute("aria-label",`${e}${this.accessibleLabel}`)}t.id=e.toString();t.tabIndex=-1;t.addEventListener("keydown",(t=>{this.handleKeyDown(t)}));t.classList.add("expand-toggle-group-child")}))}disconnectedCallback(){document===null||document===void 0?void 0:document.removeEventListener("keydown",this.keyListener)}render(){const{accessibleLabel:t,disabled:e,fullWidth:n,loading:r,monochrome:s,outline:a,theme:l}=this;return o(i,{key:"b76a2d77d20894bcbf3bd350945e8953c9c690ef",role:"group","aria-label":t,tabindex:0,class:{"ic-toggle-button-group-disabled":e,"ic-toggle-button-group-full-width":n,"ic-toggle-button-group-loading":r,"ic-toggle-button-group-monochrome":s,"ic-toggle-button-group-hide-outline":!a,[`ic-theme-${l}`]:l!=="inherit"},onFocus:this.handleHostFocus},o("slot",{key:"755e5420c42800c0d436adf366afe611edd8e529"}))}get el(){return n(this)}static get watchers(){return{disabled:["watchDisabledHandler"],fullWidth:["watchFullWidthHandler"],loading:["watchLoadingHandler"],monochrome:["watchMonochromeHandler"],outline:["watchOutlineHandler"],size:["watchSizeHandler"],theme:["watchThemeHandler"],tooltipPlacement:["watchTooltipPlacementHandler"],variant:["watchVariantHandler"]}}};d.style=a;export{d as ic_toggle_button_group};
|
2
|
+
//# sourceMappingURL=p-6b52e47f.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icToggleButtonGroupCss","IcToggleButtonGroupStyle0","TOGGLE_GROUP","ToggleButtonGroup","constructor","hostRef","this","lastKeyPressed","key","shift","accessibleLabel","disabled","fullWidth","loading","monochrome","outline","selectMethod","selectType","size","theme","tooltipPlacement","variant","keyListener","ev","shiftKey","handleHostFocus","target","relatedTarget","el","relEl","toggleButtons","Array","from","querySelectorAll","noToggleButtonsChecked","every","checked","tagName","_a","focus","filter","handleKeyDown","toggleButtonOptions","getAllToggleButtons","targetToggle","getNextItemToSelect","indexOf","document","activeElement","selectHandler","CustomEvent","detail","currentItem","movingDown","numToggles","length","nextItem","watchDisabledHandler","forEach","removeDisabledFalse","watchFullWidthHandler","watchLoadingHandler","watchMonochromeHandler","watchOutlineHandler","watchSizeHandler","watchThemeHandler","watchTooltipPlacementHandler","watchVariantHandler","tabTarget","allToggles","clickedToggle","id","icChange","emit","selectedOption","toggledOptions","map","opt","toggleButton","componentWillLoad","addEventListener","componentDidLoad","i","btn","_c","_b","shadowRoot","querySelector","btnAriaLabel","getAttribute","aria","setAttribute","toString","tabIndex","classList","add","disconnectedCallback","removeEventListener","render","h","Host","role","tabindex","class","onFocus"],"sources":["src/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","src/components/ic-toggle-button-group/ic-toggle-button-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: fit-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.ic-toggle-button-group-full-width) {\n width: 100%;\n max-width: 100%;\n}\n\n:host(.ic-toggle-button-group-loading) {\n min-width: max-content;\n}\n\n:host(:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n/* CHILDREN SLOTTED */\n\n::slotted(ic-toggle-button) {\n flex-grow: 1;\n width: min-content;\n\n --toggle-button-border: none !important;\n --toggle-button-border-hover: none !important;\n --toggle-button-border-active: none !important;\n}\n\n::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border);\n}\n\n/* DISABLED */\n:host(.ic-toggle-button-group-disabled) {\n border: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n pointer-events: none;\n}\n\n:host(.ic-toggle-button-group-disabled)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n}\n\n:host(.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n\n:host(.ic-toggle-button-group-hide-outline) {\n --ic-toggle-button-unselected-border: transparent;\n --ic-toggle-button-unselected-border-disabled: transparent;\n --ic-toggle-button-unselected-border-monochrome: transparent;\n --ic-toggle-button-unselected-border-disabled-monochrome: transparent;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n State,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcSizes,\n IcSelectTypes,\n IcSelectMethodTypes,\n IcThemeMode,\n IcButtonTooltipPlacement,\n IcIconPlacementOptions,\n} from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-toggle-button-group.types\";\nimport { removeDisabledFalse } from \"../../utils/helpers\";\n\ninterface lastKey {\n key: string | null;\n shift: boolean;\n}\n\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\n\n@Component({\n tag: \"ic-toggle-button-group\",\n styleUrl: \"ic-toggle-button-group.css\",\n shadow: true,\n})\nexport class ToggleButtonGroup {\n @Element() el: HTMLIcToggleButtonGroupElement;\n\n @State() lastKeyPressed: lastKey = {\n key: null,\n shift: false,\n };\n\n /**\n * The accessible label of the toggle button group component to provide context for screen reader users.\n */\n @Prop() accessibleLabel = \"Toggle button group\";\n\n /**\n * If `true`, the toggle button group will be set to the disabled state.\n */\n @Prop() disabled = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.disabled = this.disabled;\n });\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the toggle button group will fill the width of the container.\n */\n @Prop() fullWidth = false;\n @Watch(\"fullWidth\")\n watchFullWidthHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.fullWidth = this.fullWidth;\n });\n }\n\n /**\n * The placement of the icons in relation to the toggle button labels.\n */\n @Prop() iconPlacement?: IcIconPlacementOptions;\n\n /**\n * If `true`, the toggle button group will be in loading state.\n */\n @Prop() loading = false;\n @Watch(\"loading\")\n watchLoadingHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.loading = this.loading;\n });\n }\n\n /**\n * If `true`, the toggle button group will display as black in the light theme, and white in dark theme.\n */\n @Prop() monochrome = false;\n @Watch(\"monochrome\")\n watchMonochromeHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.monochrome = this.monochrome;\n });\n }\n\n /**\n * If `true`, the toggle button group will display with an outline.\n */\n @Prop() outline = true;\n @Watch(\"outline\")\n watchOutlineHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.outline = this.outline;\n });\n }\n\n /**\n * If `auto`, controls are toggled automatically when navigated to. If `manual`, the controls must be actioned to change their toggled state. The value of this prop is ignored if `selectType` is set to`multi`.\n */\n @Prop({ mutable: true }) selectMethod: IcSelectMethodTypes = \"manual\";\n\n /**\n * Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\n */\n @Prop() selectType: IcSelectTypes = \"single\";\n\n /**\n * The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\n */\n @Prop() size: IcSizes = \"medium\";\n @Watch(\"size\")\n watchSizeHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.size = this.size;\n });\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n watchThemeHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.theme = this.theme;\n });\n }\n\n /**\n * The position of the tooltip in relation to the toggle buttons.\n */\n @Prop() tooltipPlacement: IcButtonTooltipPlacement = \"bottom\";\n @Watch(\"tooltipPlacement\")\n watchTooltipPlacementHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.tooltipPlacement = this.tooltipPlacement;\n });\n }\n\n /**\n * The variant of the toggle button.\n */\n @Prop({ reflect: true }) variant: \"default\" | \"icon\" = \"default\";\n @Watch(\"variant\")\n watchVariantHandler(): void {\n this.getAllToggleButtons().forEach((el) => {\n el.variant = this.variant;\n });\n }\n\n /**\n * Emitted when a toggle button is selected.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icToggleChecked\")\n selectHandler(ev: CustomEvent, tabTarget?: HTMLIcToggleButtonElement): void {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target as HTMLIcToggleButtonElement;\n\n if (tabTarget) tabTarget.focus(); // tabTarget used in proxySelectHandler\n\n if (this.selectType === \"single\") {\n if (!clickedToggle && tabTarget) {\n clickedToggle = tabTarget;\n }\n allToggles.forEach((el) => {\n if (el.id !== clickedToggle.id && el.checked) {\n el.checked = false;\n }\n });\n\n this.icChange.emit({\n checked: ev.detail.checked,\n selectedOption: clickedToggle,\n });\n } else {\n const toggledOptions = allToggles.filter(\n (el) => el.checked && !el.disabled\n );\n\n this.icChange.emit({\n checked: toggledOptions.map((opt) => opt.checked),\n toggledOptions: toggledOptions.map((opt) => ({\n toggleButton: opt,\n })),\n selectedOption: clickedToggle,\n });\n }\n }\n\n componentWillLoad(): void {\n if (this.selectType === \"multi\") this.selectMethod = \"manual\";\n if (this.selectMethod === \"auto\") this.selectType === \"single\";\n document.addEventListener(\"keydown\", this.keyListener);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n this.getAllToggleButtons().forEach((el, i) => {\n const btn = el.shadowRoot\n ?.querySelector(\"ic-button\")\n ?.shadowRoot?.querySelector(\"button\");\n if (btn) {\n const btnAriaLabel = btn.getAttribute(\"aria-label\");\n const aria = btnAriaLabel ? `${btnAriaLabel}, ` : \"\";\n btn.setAttribute(\"aria-label\", `${aria}${this.accessibleLabel}`);\n }\n\n el.id = i.toString();\n el.tabIndex = -1;\n el.addEventListener(\"keydown\", (ev) => {\n this.handleKeyDown(ev);\n });\n el.classList.add(\"expand-toggle-group-child\");\n });\n }\n\n disconnectedCallback(): void {\n document?.removeEventListener(\"keydown\", this.keyListener);\n }\n\n private keyListener = (ev: KeyboardEvent) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n\n private handleHostFocus = ({ target, relatedTarget }: FocusEvent) => {\n if (this.loading || this.disabled) return;\n\n const el = target as HTMLIcToggleButtonGroupElement | null;\n const relEl = relatedTarget as HTMLIcToggleButtonElement | null;\n const toggleButtons = Array.from(\n el?.querySelectorAll(\"ic-toggle-button\") || []\n );\n const noToggleButtonsChecked = toggleButtons.every((el) => !el.checked);\n const { shift } = this.lastKeyPressed;\n if (\n ((noToggleButtonsChecked || this.selectType !== \"single\") && !shift) ||\n (noToggleButtonsChecked && shift && relEl?.tagName == TOGGLE_GROUP)\n ) {\n toggleButtons[0]?.focus();\n } else if (!shift || relEl?.tagName == TOGGLE_GROUP) {\n // if checked is true and selectMethod is \"single\", focus that toggle\n toggleButtons.filter((el) => el.checked)[0].focus();\n }\n };\n\n private handleKeyDown = ({ key }: KeyboardEvent) => {\n if (\n key !== \"ArrowDown\" &&\n key !== \"ArrowRight\" &&\n key !== \"ArrowLeft\" &&\n key !== \"ArrowUp\"\n )\n return;\n\n const toggleButtonOptions = this.getAllToggleButtons();\n const targetToggle =\n toggleButtonOptions[\n this.getNextItemToSelect(\n toggleButtonOptions.indexOf(\n toggleButtonOptions.filter((el) => el === document.activeElement)[0]\n ),\n key === \"ArrowDown\" || key === \"ArrowRight\"\n )\n ];\n\n if (this.selectMethod === \"auto\") {\n // trigger selectHandler when unable to add 'target'\n targetToggle.checked = true;\n this.selectHandler(\n new CustomEvent(\"icToggleChecked\", {\n detail: {\n checked: targetToggle.checked,\n },\n }),\n targetToggle\n );\n } else {\n targetToggle.focus();\n }\n };\n\n private getNextItemToSelect = (currentItem: number, movingDown: boolean) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n } else if (nextItem > numToggles) {\n nextItem = 0;\n }\n\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n\n return nextItem;\n };\n\n private getAllToggleButtons = () =>\n Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n\n render() {\n const {\n accessibleLabel,\n disabled,\n fullWidth,\n loading,\n monochrome,\n outline,\n theme,\n } = this;\n\n return (\n <Host\n role=\"group\"\n aria-label={accessibleLabel}\n tabindex={0}\n class={{\n \"ic-toggle-button-group-disabled\": disabled,\n \"ic-toggle-button-group-full-width\": fullWidth,\n \"ic-toggle-button-group-loading\": loading,\n \"ic-toggle-button-group-monochrome\": monochrome,\n \"ic-toggle-button-group-hide-outline\": !outline,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n onFocus={this.handleHostFocus}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"+FAAA,MAAMA,EAAyB,sjJAC/B,MAAAC,EAAeD,EC2Bf,MAAME,EAAe,yB,MAORC,EAAiB,MAL9B,WAAAC,CAAAC,G,6CAQWC,KAAAC,eAA0B,CACjCC,IAAK,KACLC,MAAO,OAMDH,KAAAI,gBAAkB,sBAKlBJ,KAAAK,SAAW,MAYXL,KAAAM,UAAY,MAgBZN,KAAAO,QAAU,MAWVP,KAAAQ,WAAa,MAWbR,KAAAS,QAAU,KAWOT,KAAAU,aAAoC,SAKrDV,KAAAW,WAA4B,SAK5BX,KAAAY,KAAgB,SAWhBZ,KAAAa,MAAqB,UAWrBb,KAAAc,iBAA6C,SAW5Bd,KAAAe,QAA8B,UAgF/Cf,KAAAgB,YAAeC,IACrBjB,KAAKC,eAAiB,CACpBC,IAAKe,EAAGf,IACRC,MAAOc,EAAGC,SACX,EAGKlB,KAAAmB,gBAAkB,EAAGC,SAAQC,oB,MACnC,GAAIrB,KAAKO,SAAWP,KAAKK,SAAU,OAEnC,MAAMiB,EAAKF,EACX,MAAMG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QACTA,EAAOC,WACPA,EAAUC,QACVA,EAAOI,MACPA,GACEb,KAEJ,OACE6F,EAACC,EAAI,CAAA5F,IAAA,2CACH6F,KAAK,QAAO,aACA3F,EACZ4F,SAAU,EACVC,MAAO,CACL,kCAAmC5F,EACnC,oCAAqCC,EACrC,iCAAkCC,EAClC,oCAAqCC,EACrC,uCAAwCC,EACxC,CAAC,YAAYI,KAAUA,IAAU,WAEnCqF,QAASlG,KAAKmB,iBAEd0E,EAAA,QAAA3F,IAAA,6C","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{f as n}from"./p-8e4e97b4.js";var t;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(t||(t={}));var e;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(e||(e={}));const a=`<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 <g id="close-octagon">\n <path id="Vector" d="M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" />\n </g>\n</svg>\n`;const i=`<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 <g id="info">\n <path id="Vector" d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z" />\n </g>\n</svg>\n`;const o=`<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 <g id="Icon">\n <path id="Vector" d="M19.5 3H5.5C4.4 3 3.5 3.9 3.5 5V19C3.5 20.1 4.4 21 5.5 21H19.5C20.6 21 21.5 20.1 21.5 19V5C21.5 3.9 20.6 3 19.5 3ZM12.51 18C11.81 18 11.25 17.44 11.25 16.74C11.25 16.03 11.81 15.49 12.51 15.49C13.22 15.49 13.76 16.03 13.76 16.74C13.75 17.43 13.22 18 12.51 18ZM15.52 10.6C14.76 11.71 14.04 12.06 13.65 12.77C13.55 12.95 13.49 13.09 13.46 13.4C13.41 13.85 13.01 14.18 12.56 14.18H12.5C11.98 14.18 11.57 13.74 11.62 13.22C11.65 12.88 11.73 12.53 11.92 12.19C12.41 11.32 13.34 10.8 13.88 10.03C14.45 9.22 14.13 7.7 12.51 7.7C11.8 7.7 11.33 8.06 11.04 8.49C10.79 8.85 10.35 9.02 9.94 8.85C9.41 8.64 9.22 8 9.54 7.54C10.15 6.65 11.17 6 12.49 6C13.97 6 14.98 6.67 15.5 7.52C15.94 8.24 16.2 9.59 15.52 10.6Z" />\n </g>\n</svg>\n`;const r=`<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 <g id="check_circle">\n <path id="Vector" d="M12.5 2C6.98 2 2.5 6.48 2.5 12C2.5 17.52 6.98 22 12.5 22C18.02 22 22.5 17.52 22.5 12C22.5 6.48 18.02 2 12.5 2ZM9.79 16.29L6.2 12.7C5.81 12.31 5.81 11.68 6.2 11.29C6.59 10.9 7.22 10.9 7.61 11.29L10.5 14.17L17.38 7.29C17.77 6.9 18.4 6.9 18.79 7.29C19.18 7.68 19.18 8.31 18.79 8.7L11.2 16.29C10.82 16.68 10.18 16.68 9.79 16.29Z" />\n </g>\n</svg>\n`;const s=`<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 <g id="warning">\n <path id="Vector" d="M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z" />\n </g>\n</svg>\n`;const l={neutral:{icon:o,ariaLabel:"Neutral"},info:{icon:i,ariaLabel:"For your information"},warning:{icon:s,ariaLabel:"Warning"},error:{icon:a,ariaLabel:"Error"},success:{icon:r,ariaLabel:"Success"}};const c=["aria-atomic","aria-autocomplete","aria-busy","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","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 d={XS:576,S:768,M:992,L:1200,XL:99999};const u=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"].join(",");const p=["ic-alert"];const f={"ic-alert":["ic-link","ic-button"]};const v=136.701;const g=130;const b=["Alt","AltGraph","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","AudioVolumeDown","AudioVolumeMute","AudioVolumeUp","CapsLock","ContextMenu","Control","Delete","End","Enter","Escape","F1","F10","F11","F12","F2","F3","F4","F5","F6","F7","F8","F9","Home","Insert","Meta","NumLock","PageDown","PageUp","Shift","Tab"];const C=133.3505;const w="anywhere";const m="ic-input";const h=(n,t=[])=>{const e={};t.forEach((t=>{const a=n.getAttribute(t);if(a!==null){e[t]=a;n.removeAttribute(t)}}));return e};const L=(n,t)=>{const e=n._original||n;return{_original:n,emit:y(e.emit.bind(e),t)}};const y=(n,t=0)=>{let e;return(...a)=>{clearTimeout(e);e=setTimeout(n,t,...a)}};const x=(n,t,e,a=false,i=true)=>{if(e&&(i||N(n))){let i=A(n);if(!i){i=n.ownerDocument.createElement("input");i.type="hidden";i.classList.add(m);n.appendChild(i)}i.disabled=a;i.name=e;i.value=t instanceof Date?t.toISOString():t||""}};const A=n=>Array.from(n.querySelectorAll(`input.${m}`)).filter((t=>n===t.parentElement))[0];const M=(n,t,e,a,i,o,r)=>{if(o!==undefined&&N(t)){let s=A(t);if(s===null||s===undefined){s=t.ownerDocument.createElement("input");s.classList.add(m);t.appendChild(s)}s.type="file";s.hidden=true;s.multiple=e;s.name=o;s.disabled=a;if(r)s.files=r;if(i)s.accept=i;s.onchange=()=>{n.emit(s.files)};s.click()}};const V=n=>{var t;(t=A(n))===null||t===void 0?void 0:t.remove()};const N=n=>!!n&&!!n.shadowRoot&&!!n.attachShadow;const I=n=>n+"-helper-text";const F=n=>n+"-validation-text";const k=(n,t,e,a)=>`${K(n,"helper-text")||e?I(t):""} ${a?F(t):""}`.trim();const $=(n,t=null)=>{var a;const i=n.parentElement||n.getRootNode().host.parentElement;const o=i===null||i===void 0?void 0:i.closest(u);if(!o)return e.Default;const r=o.tagName.toLowerCase();if((a=f[r])===null||a===void 0?void 0:a.includes(n.tagName.toLowerCase())){return e.Default}else if(t!==null&&!p.includes(r)){return t}else if(o.classList.contains(`${r}-${e.Dark}`)||o.classList.contains(e.Dark)){return e.Dark}else{return e.Light}};const E=()=>"maxTouchPoints"in navigator&&"userAgent"in navigator?navigator.maxTouchPoints>0&&/iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent):false;const T=(n,t)=>{var e,a;const i=(e=document.querySelector("#hidden-form-button"))!==null&&e!==void 0?e:document.createElement("button");i.setAttribute("type",(a=t.type)!==null&&a!==void 0?a:"button");i.id="hidden-form-button";i.style.display="none";n.appendChild(i);i.click()};const H=n=>!n||n.trim().length===0;const Z=n=>n!==undefined?n:undefined;const O=(n,t,e="value",a="label")=>{const i=[];if(t.length>0&&t.map){t.map((n=>{if(n.children){n.children.map((n=>i.push(n)))}else{i.push(n)}}));const o=i.find((t=>t[e]===n));if(o!==undefined)return o[a]}return undefined};const P=(n,t,e,a=w,i="label")=>n.filter((n=>{var o;const r=n[i].toLowerCase();const s=(o=n.description)===null||o===void 0?void 0:o.toLowerCase();const l=e.toLowerCase();return a===w?t?r.includes(l)||(s===null||s===void 0?void 0:s.includes(l)):r.includes(l):t?r.startsWith(l)||(s===null||s===void 0?void 0:s.startsWith(l)):r.startsWith(l)}));const S=n=>{const t=[];if(n.length>0&&n.map){n.map((n=>{if(n.children){n.children.map((n=>t.push(n)))}else{t.push(n)}}))}return t.length};const D=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const B=()=>{if(D(z.S)){return z.S}if(D(z.M)){return z.M}if(D(z.L)){return z.L}if(D(z.XL)){return z.XL}return z.UNDEFINED};const G=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const R=()=>(parseInt(G("--ic-brand-color-primary-r"))*299+parseInt(G("--ic-brand-color-primary-g"))*587+parseInt(G("--ic-brand-color-primary-b"))*114)/1e3;const U=(n=R())=>n>C?e.Dark:e.Light;const W=(n,t)=>(n===null||n===void 0?void 0:n.querySelector(`[slot="${t}"]`))||null;const X=(n,t)=>W(n,t)!==null;const _=(n,t)=>{const e=W(n,t);return e?j(e):null};const j=n=>{const t=n.firstElementChild;if(t===null)return[n];const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null};const q=({parentElement:n})=>{let t={navType:"",parent:null};if(n){switch(n.tagName){case"IC-NAVIGATION-GROUP":t=q(n);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:n};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:n};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}}return t};const z={XS:Number(G("--ic-breakpoint-xs").replace("px","")),S:Number(G("--ic-breakpoint-sm").replace("px","")),M:Number(G("--ic-breakpoint-md").replace("px","")),L:Number(G("--ic-breakpoint-lg").replace("px","")),XL:Number(G("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const J=(n,t)=>!!n&&!t;const K=({children:n},t)=>Array.from(n).some((n=>n.getAttribute("slot")===t));const Q=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const Y=(n,t)=>{n.forEach((({prop:n,propName:e})=>{if(n===null||n===undefined){console.error(`No ${e} specified for ${t} component - prop '${e}' (web components) / '${nn(e)}' (react) required`)}}))};const nn=n=>n.toLowerCase().split("-").map(((n,t)=>t===0?n:`${n.substring(0,1).toUpperCase()}${n.substring(1)}`)).join("");const tn=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const en=n=>parseInt(n,16);const an=n=>{const t=n.replace("#","").split("").map((n=>n.repeat(2)));return{r:en(n.length===4?t[0]:n.slice(1,3)),g:en(n.length===4?t[1]:n.slice(3,5)),b:en(n.length===4?t[2]:n.slice(5)),a:1}};const on=n=>{const t=n.slice(3,4).toLowerCase()==="a";const e=n.substring(t?5:4,n.length-1).replace(/ /g,"").split(",").map(Number);return{r:e[0],g:e[1],b:e[2],a:t?e[3]:1}};const rn=({scrollWidth:n,clientWidth:t})=>n>t;const sn=()=>!!document.querySelector("ic-classification-banner:not([inline='true'])");const ln=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.addEventListener("reset",t)};const cn=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.removeEventListener("reset",t)};const dn=(n,t=16)=>`${1/t*parseInt(n)}rem`;const un=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const pn=()=>window.navigator.userAgent.toUpperCase().indexOf("MAC")>=0;const fn=n=>{const t=n===null||n===void 0?void 0:n.slice(0,1).toLowerCase();if(t!=="#"&&t!=="r")return null;return t==="#"?an(n):on(n)};const vn=n=>n.charAt(0).toUpperCase()+n.slice(1);const gn=(n,t,e)=>{const a=n=>Array.from(n).some((n=>Array.isArray(e)?e.some((t=>n.slot===t)):n.slot===e));return a(n)||a(t)};const bn=n=>!!n.closest(".ag-cell")&&!!n.closest(".ag-root");const Cn=n=>{var t;return((t=n.parentElement)===null||t===void 0?void 0:t.tagName)===`${n.tagName}-GROUP`};const wn=(n,t)=>n.some((({type:n,addedNodes:e,removedNodes:a})=>n==="childList"&&gn(e,a,t)));const mn=(t,e,a)=>{if(wn(t,e)){n(a)}};export{s as $,q as A,G as B,P as C,z as D,O as E,T as F,L as G,gn as H,e as I,S as J,E as K,t as L,H as M,b as N,R as O,v as P,W as Q,Cn as R,_ as S,vn as T,r as U,l as V,g as W,pn as X,rn as Y,I as Z,F as _,mn as a,a as a0,M as a1,Y as b,fn as c,Z as d,B as e,tn as f,U as g,$ as h,K as i,ln as j,cn as k,x as l,V as m,k as n,Q as o,dn as p,J as q,un as r,bn as s,X as t,j as u,d as v,sn as w,h as x,u as y,c as z};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{f as n}from"./p-8e4e97b4.js";var t;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(t||(t={}));var e;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(e||(e={}));const i=`<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 <g id="close-octagon">\n <path id="Vector" d="M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" />\n </g>\n</svg>\n`;const o=`<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 <g id="info">\n <path id="Vector" d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z" />\n </g>\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 <g id="Icon">\n <path id="Vector" d="M19.5 3H5.5C4.4 3 3.5 3.9 3.5 5V19C3.5 20.1 4.4 21 5.5 21H19.5C20.6 21 21.5 20.1 21.5 19V5C21.5 3.9 20.6 3 19.5 3ZM12.51 18C11.81 18 11.25 17.44 11.25 16.74C11.25 16.03 11.81 15.49 12.51 15.49C13.22 15.49 13.76 16.03 13.76 16.74C13.75 17.43 13.22 18 12.51 18ZM15.52 10.6C14.76 11.71 14.04 12.06 13.65 12.77C13.55 12.95 13.49 13.09 13.46 13.4C13.41 13.85 13.01 14.18 12.56 14.18H12.5C11.98 14.18 11.57 13.74 11.62 13.22C11.65 12.88 11.73 12.53 11.92 12.19C12.41 11.32 13.34 10.8 13.88 10.03C14.45 9.22 14.13 7.7 12.51 7.7C11.8 7.7 11.33 8.06 11.04 8.49C10.79 8.85 10.35 9.02 9.94 8.85C9.41 8.64 9.22 8 9.54 7.54C10.15 6.65 11.17 6 12.49 6C13.97 6 14.98 6.67 15.5 7.52C15.94 8.24 16.2 9.59 15.52 10.6Z" />\n </g>\n</svg>\n`;const a=`<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 <g id="check_circle">\n <path id="Vector" d="M12.5 2C6.98 2 2.5 6.48 2.5 12C2.5 17.52 6.98 22 12.5 22C18.02 22 22.5 17.52 22.5 12C22.5 6.48 18.02 2 12.5 2ZM9.79 16.29L6.2 12.7C5.81 12.31 5.81 11.68 6.2 11.29C6.59 10.9 7.22 10.9 7.61 11.29L10.5 14.17L17.38 7.29C17.77 6.9 18.4 6.9 18.79 7.29C19.18 7.68 19.18 8.31 18.79 8.7L11.2 16.29C10.82 16.68 10.18 16.68 9.79 16.29Z" />\n </g>\n</svg>\n`;const s=`<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 <g id="warning">\n <path id="Vector" d="M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z" />\n </g>\n</svg>\n`;const l={neutral:{icon:r,ariaLabel:"Neutral"},info:{icon:o,ariaLabel:"For your information"},warning:{icon:s,ariaLabel:"Warning"},error:{icon:i,ariaLabel:"Error"},success:{icon:a,ariaLabel:"Success"}};const c=["aria-atomic","aria-autocomplete","aria-busy","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","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 d={XS:576,S:768,M:992,L:1200,XL:99999};const u=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"].join(",");const p=["ic-alert"];const v={"ic-alert":["ic-link","ic-button"]};const f=136.701;const g=130;const b=["Alt","AltGraph","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","AudioVolumeDown","AudioVolumeMute","AudioVolumeUp","CapsLock","ContextMenu","Control","Delete","End","Enter","Escape","F1","F10","F11","F12","F2","F3","F4","F5","F6","F7","F8","F9","Home","Insert","Meta","NumLock","PageDown","PageUp","Shift","Tab"];const w=133.3505;const C="anywhere";const m="ic-input";const h=(n,t=[])=>{const e={};t.forEach((t=>{const i=n.getAttribute(t);if(i!==null){e[t]=i;n.removeAttribute(t)}}));return e};const L=(n,t)=>{const e=n._original||n;return{_original:n,emit:y(e.emit.bind(e),t)}};const y=(n,t=0)=>{let e;return(...i)=>{clearTimeout(e);e=setTimeout(n,t,...i)}};const x=(n,t,e,i=false,o=true)=>{if(e&&(o||N(n))){let o=A(n);if(!o){o=n.ownerDocument.createElement("input");o.type="hidden";o.classList.add(m);n.appendChild(o)}o.disabled=i;o.name=e;o.value=t instanceof Date?t.toISOString():t||""}};const A=n=>Array.from(n.querySelectorAll(`input.${m}`)).filter((t=>n===t.parentElement))[0];const M=(n,t,e,i,o,r,a)=>{if(r!==undefined&&N(t)){let s=A(t);if(s===null||s===undefined){s=t.ownerDocument.createElement("input");s.classList.add(m);t.appendChild(s)}s.type="file";s.hidden=true;s.multiple=e;s.name=r;s.disabled=i;if(a)s.files=a;if(o)s.accept=o;s.onchange=()=>{n.emit(s.files)};s.click()}};const V=n=>{var t;(t=A(n))===null||t===void 0?void 0:t.remove()};const N=n=>!!n&&!!n.shadowRoot&&!!n.attachShadow;const I=n=>n+"-helper-text";const k=n=>n+"-validation-text";const F=(n,t,e,i)=>`${K(n,"helper-text")||e?I(t):""} ${i?k(t):""}`.trim();const $=(n,t=null)=>{var i;const o=n.parentElement||n.getRootNode().host.parentElement;const r=o===null||o===void 0?void 0:o.closest(u);if(!r)return e.Default;const a=r.tagName.toLowerCase();if((i=v[a])===null||i===void 0?void 0:i.includes(n.tagName.toLowerCase())){return e.Default}else if(t!==null&&!p.includes(a)){return t}else if(r.classList.contains(`${a}-${e.Dark}`)||r.classList.contains(e.Dark)){return e.Dark}else{return e.Light}};const E=()=>"maxTouchPoints"in navigator&&"userAgent"in navigator?navigator.maxTouchPoints>0&&/iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent):false;const T=(n,t)=>{var e,i;const o=(e=document.querySelector("#hidden-form-button"))!==null&&e!==void 0?e:document.createElement("button");o.setAttribute("type",(i=t.type)!==null&&i!==void 0?i:"button");o.id="hidden-form-button";o.style.display="none";n.appendChild(o);o.click()};const H=n=>!n||n.trim().length===0;const Z=n=>n!==undefined?n:undefined;const O=(n,t,e="value",i="label")=>{const o=[];if(t.length>0&&t.map){t.map((n=>{if(n.children){n.children.map((n=>o.push(n)))}else{o.push(n)}}));const r=o.find((t=>t[e]===n));if(r!==undefined)return r[i]}return undefined};const P=(n,t,e,i=C,o="label")=>n.filter((n=>{var r;const a=n[o].toLowerCase();const s=(r=n.description)===null||r===void 0?void 0:r.toLowerCase();const l=e.toLowerCase();return i===C?t?a.includes(l)||(s===null||s===void 0?void 0:s.includes(l)):a.includes(l):t?a.startsWith(l)||(s===null||s===void 0?void 0:s.startsWith(l)):a.startsWith(l)}));const S=n=>{const t=[];if(n.length>0&&n.map){n.map((n=>{if(n.children){n.children.map((n=>t.push(n)))}else{t.push(n)}}))}return t.length};const D=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const B=()=>{if(D(z.S)){return z.S}if(D(z.M)){return z.M}if(D(z.L)){return z.L}if(D(z.XL)){return z.XL}return z.UNDEFINED};const G=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const R=()=>(parseInt(G("--ic-brand-color-primary-r"))*299+parseInt(G("--ic-brand-color-primary-g"))*587+parseInt(G("--ic-brand-color-primary-b"))*114)/1e3;const U=(n=R())=>n>w?e.Dark:e.Light;const W=(n,t)=>(n===null||n===void 0?void 0:n.querySelector(`[slot="${t}"]`))||null;const X=(n,t)=>W(n,t)!==null;const _=(n,t)=>{const e=W(n,t);return e?j(e):null};const j=n=>{const t=n.firstElementChild;if(t===null)return[n];const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null};const q=({parentElement:n})=>{let t={navType:"",parent:null};if(n){switch(n.tagName){case"IC-NAVIGATION-GROUP":t=q(n);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:n};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:n};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}}return t};const z={XS:Number(G("--ic-breakpoint-xs").replace("px","")),S:Number(G("--ic-breakpoint-sm").replace("px","")),M:Number(G("--ic-breakpoint-md").replace("px","")),L:Number(G("--ic-breakpoint-lg").replace("px","")),XL:Number(G("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const J=(n,t)=>!!n&&!t;const K=({children:n},t)=>Array.from(n).some((n=>n.getAttribute("slot")===t));const Q=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const Y=(n,t)=>{n.forEach((({prop:n,propName:e})=>{if(n===null||n===undefined){console.error(`No ${e} specified for ${t} component - prop '${e}' (web components) / '${nn(e)}' (react) required`)}}))};const nn=n=>n.toLowerCase().split("-").map(((n,t)=>t===0?n:`${n.substring(0,1).toUpperCase()}${n.substring(1)}`)).join("");const tn=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const en=n=>parseInt(n,16);const on=n=>{const t=n.replace("#","").split("").map((n=>n.repeat(2)));return{r:en(n.length===4?t[0]:n.slice(1,3)),g:en(n.length===4?t[1]:n.slice(3,5)),b:en(n.length===4?t[2]:n.slice(5)),a:1}};const rn=n=>{const t=n.slice(3,4).toLowerCase()==="a";const e=n.substring(t?5:4,n.length-1).replace(/ /g,"").split(",").map(Number);return{r:e[0],g:e[1],b:e[2],a:t?e[3]:1}};const an=({scrollWidth:n,clientWidth:t})=>n>t;const sn=()=>!!document.querySelector("ic-classification-banner:not([inline='true'])");const ln=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.addEventListener("reset",t)};const cn=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.removeEventListener("reset",t)};const dn=(n,t=16)=>`${1/t*parseInt(n)}rem`;const un=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const pn=()=>window.navigator.userAgent.toUpperCase().indexOf("MAC")>=0;const vn=n=>{const t=n===null||n===void 0?void 0:n.slice(0,1).toLowerCase();if(t!=="#"&&t!=="r")return null;return t==="#"?on(n):rn(n)};const fn=n=>n.charAt(0).toUpperCase()+n.slice(1);const gn=(n,t,e)=>{const i=n=>Array.from(n).some((n=>Array.isArray(e)?e.some((t=>n.slot===t)):n.slot===e));return i(n)||i(t)};const bn=n=>!!n.closest(".ag-cell")&&!!n.closest(".ag-root");const wn=n=>{var t;return((t=n.parentElement)===null||t===void 0?void 0:t.tagName)===`${n.tagName}-GROUP`};const Cn=(n,t)=>n.some((({type:n,addedNodes:e,removedNodes:i})=>n==="childList"&&gn(e,i,t)));const mn=(t,e,i)=>{if(Cn(t,e)){n(i)}};const hn=n=>{var t,e,i,o,r;const a=(e=(t=n.parentElement)===null||t===void 0?void 0:t.closest(u))===null||e===void 0?void 0:e.theme;if(a&&a!=="inherit")return a;const s=(o=(i=n.parentElement)===null||i===void 0?void 0:i.closest("ic-theme"))===null||o===void 0?void 0:o.theme;if(s&&s!=="system")return s;return((r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"};export{s as $,q as A,G as B,P as C,z as D,O as E,T as F,L as G,gn as H,e as I,S as J,E as K,t as L,H as M,b as N,R as O,f as P,W as Q,wn as R,_ as S,fn as T,a as U,l as V,g as W,pn as X,an as Y,I as Z,k as _,mn as a,i as a0,M as a1,Y as b,vn as c,Z as d,B as e,tn as f,U as g,$ as h,K as i,ln as j,cn as k,x as l,V as m,F as n,Q as o,dn as p,J as q,un as r,bn as s,X as t,j as u,d as v,sn as w,h as x,hn as y,c as z};
|
2
|
+
//# sourceMappingURL=p-70abcb2b.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["IcInformationStatus","IcBrandForegroundEnum","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","join","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","IGNORED_KEYBOARD_CHARACTERS","DARK_MODE_THRESHOLD","ANYWHERE_SEARCH_POSITION","icInput","inheritAttributes","element","attributes","attributeObject","forEach","attr","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","container","name","disabled","always","hasShadowDom","input","getHiddenInputElement","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","Array","from","querySelectorAll","filter","el","parentElement","renderFileHiddenInput","multiple","accept","undefined","hidden","files","onchange","click","removeHiddenInput","_a","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","isSlotUsed","trim","getBrandFromContext","brandFromEvent","getRootNode","host","blockColorParent","closest","Default","parentTag","tagName","toLowerCase","includes","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","test","userAgent","handleHiddenFormButtonClick","form","button","hiddenFormButton","document","querySelector","setAttribute","_b","style","display","isEmptyString","length","isPropDefined","prop","getLabelFromValue","options","valueField","labelField","ungroupedOptions","map","option","children","push","matchingValue","find","getFilteredMenuOptions","includeDescriptions","searchString","position","label","description","lowerSearchString","startsWith","getOptionsWithoutGroupTitlesCount","optionsWithoutGroupTitles","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getBrandColorBrightness","parseInt","getBrandForegroundAppearance","brightness","getSlot","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","Number","replace","hasValidationStatus","status","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","propName","console","kebabToCamelCase","kebabCase","split","word","index","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","hexChars","char","repeat","r","slice","g","b","a","rgbaStrToObj","rgbaStr","isRGBA","rgbValues","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","removeDisabledFalse","isMacDevice","indexOf","convertToRGBA","color","firstChar","capitalize","text","charAt","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","isArray","isElInAGGrid","isSlottedInGroup","hasDynamicChildSlots","mutationList","slotNames","renderDynamicChildSlots","ref","forceUpdate","getElementInheritedTheme","blockParentTheme","theme","wrapperTheme","_d","_c","_e","call"],"sources":["src/utils/types.ts","src/utils/constants.ts","src/utils/helpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcBrandForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement | null;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcRequiredPropsTypes =\n | string\n | boolean\n | number\n | HTMLElement\n | IcMenuOption[]\n | undefined;\n\nexport type IcPropObject = { prop: IcRequiredPropsTypes; propName: string };\n\nexport type IcRelatedTarget = EventTarget | undefined;\n\nexport type IcOrientation = \"horizontal\" | \"vertical\";\n\nexport type IcEmphasisType = \"filled\" | \"outlined\";\n\nexport interface IcValueEventDetail {\n value: string;\n keyPressed?: string;\n}\n\nexport interface IcMultiValueEventDetail {\n value: string | string[] | null;\n keyPressed?: string;\n}\n\nexport interface IcBlurEventDetail {\n relatedTarget: IcRelatedTarget | null;\n}\n\nexport type IcSelectTypes = \"single\" | \"multi\";\n\nexport type IcSelectMethodTypes = \"auto\" | \"manual\";\n\nexport type IcDeviceSizes = 0 | 576 | 768 | 992 | 1200;\n\ntype RGB = `rgb(${string})`;\ntype RGBA = `rgba(${string})`;\ntype HEX = `#${string}`;\n\nexport type IcColor = RGB | RGBA | HEX;\n\nexport type IcIconPlacementOptions = \"left\" | \"right\" | \"top\";\n\nexport type IcButtonTooltipPlacement = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport type IcThemeSettings = \"dark\" | \"light\" | \"system\";\n","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-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n].join(\",\");\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\", \"ic-button\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n\n// Keyboard characters that do not affect the content of an input control when pressed\nexport const IGNORED_KEYBOARD_CHARACTERS = [\n \"Alt\",\n \"AltGraph\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"AudioVolumeDown\",\n \"AudioVolumeMute\",\n \"AudioVolumeUp\",\n \"CapsLock\",\n \"ContextMenu\",\n \"Control\",\n \"Delete\",\n \"End\",\n \"Enter\",\n \"Escape\",\n \"F1\",\n \"F10\",\n \"F11\",\n \"F12\",\n \"F2\",\n \"F3\",\n \"F4\",\n \"F5\",\n \"F6\",\n \"F7\",\n \"F8\",\n \"F9\",\n \"Home\",\n \"Insert\",\n \"Meta\",\n \"NumLock\",\n \"PageDown\",\n \"PageUp\",\n \"Shift\",\n \"Tab\",\n];\n","import { EventEmitter, forceUpdate } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcBrandForegroundNoDefault,\n IcThemeMode,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcBrandForeground,\n IcBrandForegroundEnum,\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;\nconst ANYWHERE_SEARCH_POSITION = \"anywhere\";\nconst icInput = \"ic-input\";\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\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]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\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 container The element where the input will be added\n * @param value The value of the input\n * @param name The name of the input\n * @param disabled If true, the input is disabled\n * @param always Add a hidden input even if the container does not use Shadow\n */\nexport const renderHiddenInput = (\n container: HTMLElement,\n value?: string | Date | null,\n name?: string,\n disabled = false,\n always = true\n): void => {\n if (name && (always || hasShadowDom(container))) {\n let input = getHiddenInputElement(container);\n\n if (!input) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value instanceof Date ? value.toISOString() : value || \"\";\n }\n};\n\nconst getHiddenInputElement = (container: HTMLElement) =>\n Array.from(\n container.querySelectorAll<HTMLInputElement>(`input.${icInput}`)\n ).filter((el) => container === el.parentElement)[0];\n\n/**\n * This method is used to add a hidden file 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 event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n * @param name The name of the input\n * @param value The value of the input\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n disabled: boolean,\n accept?: string,\n name?: string,\n value?: FileList\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n let input = getHiddenInputElement(container);\n\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.disabled = disabled;\n\n if (value) input.files = value;\n if (accept) input.accept = accept;\n\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n getHiddenInputElement(container)?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement | null | undefined): boolean =>\n !!el && !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n el: HTMLElement,\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${\n isSlotUsed(el, \"helper-text\") || helperText\n ? getInputHelperTextID(inputId)\n : \"\"\n } ${validationText ? getInputValidationTextID(inputId) : \"\"}`.trim();\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 IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (\n el: Element,\n brandFromEvent: IcBrandForeground | null = null\n): IcBrandForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement?.closest(IC_BLOCK_COLOR_COMPONENTS);\n\n if (!blockColorParent) return IcBrandForegroundEnum.Default;\n\n const parentTag = blockColorParent.tagName.toLowerCase();\n\n if (\n IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(el.tagName.toLowerCase())\n ) {\n return IcBrandForegroundEnum.Default;\n } else if (\n brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return brandFromEvent;\n } else if (\n blockColorParent.classList.contains(\n `${parentTag}-${IcBrandForegroundEnum.Dark}`\n ) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n } else {\n return IcBrandForegroundEnum.Light;\n }\n};\n\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n : false;\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 =\n document.querySelector<HTMLButtonElement>(\"#hidden-form-button\") ??\n document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type ?? \"button\");\n hiddenFormButton.id = \"hidden-form-button\";\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n hiddenFormButton.click();\n};\n\nexport const isEmptyString = (value?: string): boolean =>\n !value || value.trim().length === 0;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop?: string): string | undefined =>\n prop !== undefined ? prop : undefined;\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 valueField = \"value\",\n labelField = \"label\"\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 const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\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 = ANYWHERE_SEARCH_POSITION,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === ANYWHERE_SEARCH_POSITION\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\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 getComputedStyle(document.documentElement).getPropertyValue(cssVar);\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-brand-text-color\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getBrandColorBrightness = (): number =>\n (parseInt(getCssProperty(\"--ic-brand-color-primary-r\")) * 299 +\n parseInt(getCssProperty(\"--ic-brand-color-primary-g\")) * 587 +\n parseInt(getCssProperty(\"--ic-brand-color-primary-b\")) * 114) /\n 1000;\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (\n brightness = getBrandColorBrightness()\n): IcBrandForegroundNoDefault =>\n brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (\n element: HTMLElement | undefined,\n name: string\n): Element | null => element?.querySelector(`[slot=\"${name}\"]`) || null;\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 return slot ? getSlotElements(slot) : null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] | null => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent === null) return [slot];\n\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n};\n\nexport const getNavItemParentDetails = ({\n parentElement,\n}: HTMLElement): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n if (parentElement) {\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n }\n\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status?: IcInformationStatusOrEmpty,\n disabled?: boolean\n): boolean => !!status && !disabled;\n\nexport const isSlotUsed = (\n { children }: HTMLElement,\n slotName: string\n): boolean =>\n Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\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 props.forEach(({ prop, propName }) => {\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\n .toLowerCase()\n .split(\"-\")\n .map((word, index) =>\n index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`\n )\n .join(\"\");\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 = (v: string) => parseInt(v, 16);\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\n\nexport const elementOverflowsX = ({\n scrollWidth,\n clientWidth,\n}: HTMLElement): boolean => scrollWidth > clientWidth;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.addEventListener(\"reset\", callbackFn);\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.removeEventListener(\"reset\", callbackFn);\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (\n disabled: boolean | undefined,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean =>\n window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n\nexport const isNumeric = (value: string): boolean => /^-?\\d+$/.test(value);\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const convertToRGBA = (color: IcColor): IcColorRGBA | null => {\n const firstChar = color?.slice(0, 1).toLowerCase();\n\n if (firstChar !== \"#\" && firstChar !== \"r\") return null;\n return firstChar === \"#\" ? hexToRgba(color) : rgbaStrToObj(color);\n};\n\nexport const capitalize = (text: string): string =>\n text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string | string[]\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) =>\n Array.isArray(slotName)\n ? slotName.some((name) => (node as Element).slot === name)\n : (node as Element).slot === slotName\n );\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const isElInAGGrid = (el: HTMLElement): boolean =>\n !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n\n/**\n * Checks if the component is slotted in its relevant 'group' component\n * @param component - the component to check\n */\nexport const isSlottedInGroup = (component: HTMLElement): boolean =>\n component.parentElement?.tagName === `${component.tagName}-GROUP`;\n\nexport const hasDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[]\n): boolean =>\n mutationList.some(\n ({ type, addedNodes, removedNodes }) =>\n type === \"childList\" &&\n checkSlotInChildMutations(addedNodes, removedNodes, slotNames)\n );\n\nexport const renderDynamicChildSlots = (\n mutationList: MutationRecord[],\n slotNames: string | string[],\n ref: any\n): void => {\n if (hasDynamicChildSlots(mutationList, slotNames)) {\n forceUpdate(ref);\n }\n};\n\nexport const getElementInheritedTheme = (el: HTMLElement): IcThemeMode => {\n const blockParentTheme =\n el.parentElement?.closest<HTMLIcTopNavigationElement>(\n IC_BLOCK_COLOR_COMPONENTS\n )?.theme;\n\n if (blockParentTheme && blockParentTheme !== \"inherit\")\n return blockParentTheme;\n\n const wrapperTheme = el.parentElement?.closest(\"ic-theme\")?.theme;\n\n if (wrapperTheme && wrapperTheme !== \"system\") return wrapperTheme;\n\n return window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\";\n};\n"],"mappings":"wCAyBYA,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,iBACAA,EAAA,oBACD,EAJD,CAAYA,MAAmB,K,IA0EnBC,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,eACAA,EAAA,gBACD,EAJD,CAAYA,MAAqB,K,87FC5FpBC,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,Y,MAKFS,EAAoB,CAC/B,cACA,oBACA,YACA,gBACA,eACA,mBACA,mBACA,eACA,gBACA,kBACA,oBACA,gBACA,cACA,eACA,gBACA,cACA,eACA,oBACA,aACA,kBACA,YACA,YACA,gBACA,wB,MAGWC,EAAkB,CAC7BC,GAAI,IACJC,EAAG,IACHC,EAAG,IACHC,EAAG,KACHC,GAAI,OAGC,MAAMC,EAA4B,CACvC,UACA,oBACA,YACA,qBACA,YACAC,KAAK,KAEA,MAAMC,EAA4B,CAAC,YAMnC,MAAMC,EAA+C,CAC1D,WAAY,CAAC,UAAW,c,MAUbC,EAA6B,Q,MAC7BC,EAA6B,I,MAG7BC,EAA8B,CACzC,MACA,WACA,YACA,YACA,aACA,UACA,kBACA,kBACA,gBACA,WACA,cACA,UACA,SACA,MACA,QACA,SACA,KACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,OACA,UACA,WACA,SACA,QACA,OC1GF,MAAMC,EAAsB,SAC5B,MAAMC,EAA2B,WACjC,MAAMC,EAAU,W,MAyBHC,EAAoB,CAC/BC,EACAC,EAAuB,MAEvB,MAAMC,EAA6C,GAEnDD,EAAWE,SAASC,IAClB,MAAMC,EAAQL,EAAQM,aAAaF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