@ukic/canary-web-components 3.0.0-canary.20 → 3.0.0-canary.22
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-274ac318.js → helpers-74cf2649.js} +14 -2
- package/dist/cjs/helpers-74cf2649.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_3.cjs.entry.js +9 -8
- package/dist/cjs/ic-checkbox_3.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-data-table.cjs.entry.js +42 -25
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +5 -7
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +17 -10
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +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-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_4.cjs.entry.js +5 -5
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +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-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-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-tree-item.cjs.entry.js +14 -8
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +23 -15
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +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-data-table/ic-data-table.css +3 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js +41 -24
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js +2 -2
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +32 -73
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.css +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +4 -6
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +37 -10
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +14 -8
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +23 -15
- package/dist/collection/components/ic-tree-view/ic-tree-view.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-checkbox2.js +8 -7
- package/dist/components/ic-checkbox2.js.map +1 -1
- package/dist/components/ic-data-table.js +42 -25
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +5 -7
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +18 -10
- package/dist/components/ic-date-picker.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-search-bar.js +3 -3
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select2.js +3 -3
- package/dist/components/ic-select2.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-field2.js +1 -1
- package/dist/components/ic-text-field2.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/components/ic-tree-item.js +15 -9
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +24 -16
- package/dist/components/ic-tree-view.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-826a4e46.entry.js → p-032113b9.entry.js} +2 -2
- package/dist/core/{p-acc884bc.entry.js → p-0dc0d839.entry.js} +2 -2
- package/dist/core/{p-13f52d7b.js → p-0fe08a58.js} +2 -2
- package/dist/core/p-0fe08a58.js.map +1 -0
- package/dist/core/{p-972f21fa.entry.js → p-137dd76e.entry.js} +2 -2
- package/dist/core/p-156fc5f1.entry.js +2 -0
- package/dist/core/p-156fc5f1.entry.js.map +1 -0
- package/dist/core/p-15ec796a.entry.js +2 -0
- package/dist/core/p-15ec796a.entry.js.map +1 -0
- package/dist/core/{p-4271e7f4.entry.js → p-1e256460.entry.js} +2 -2
- package/dist/core/p-1ffac8ae.entry.js +2 -0
- package/dist/core/p-1ffac8ae.entry.js.map +1 -0
- package/dist/core/p-224b2e14.entry.js +2 -0
- package/dist/core/p-224b2e14.entry.js.map +1 -0
- package/dist/core/{p-09acf70a.entry.js → p-2c4bf16f.entry.js} +2 -2
- package/dist/core/{p-0bc8652d.entry.js → p-2d8900bf.entry.js} +2 -2
- package/dist/core/{p-a6b573c0.entry.js → p-2de3287c.entry.js} +2 -2
- package/dist/core/{p-28b10396.entry.js → p-33404c14.entry.js} +2 -2
- package/dist/core/{p-29601c16.entry.js → p-3cf99186.entry.js} +2 -2
- package/dist/core/{p-3f45c7ce.entry.js → p-42913c5b.entry.js} +2 -2
- package/dist/core/p-497918fd.entry.js +2 -0
- package/dist/core/p-497918fd.entry.js.map +1 -0
- package/dist/core/{p-6938e1d9.entry.js → p-5237f3ac.entry.js} +2 -2
- package/dist/core/{p-f35563a0.entry.js → p-5d987f8f.entry.js} +2 -2
- package/dist/core/p-64372a57.entry.js +2 -0
- package/dist/core/p-64372a57.entry.js.map +1 -0
- package/dist/core/{p-c6bd71e5.entry.js → p-6e7aaca5.entry.js} +2 -2
- package/dist/core/{p-c6bd71e5.entry.js.map → p-6e7aaca5.entry.js.map} +1 -1
- package/dist/core/{p-3b994e61.entry.js → p-6f72e6ac.entry.js} +2 -2
- package/dist/core/p-755bdc43.entry.js +2 -0
- package/dist/core/p-755bdc43.entry.js.map +1 -0
- package/dist/core/{p-afff5652.entry.js → p-75901d06.entry.js} +2 -2
- package/dist/core/p-78635447.entry.js +2 -0
- package/dist/core/p-78635447.entry.js.map +1 -0
- package/dist/core/p-826a6c25.entry.js +2 -0
- package/dist/core/p-826a6c25.entry.js.map +1 -0
- package/dist/core/{p-7436d8de.entry.js → p-832c7042.entry.js} +2 -2
- package/dist/core/{p-ef444b18.entry.js → p-8397766e.entry.js} +2 -2
- package/dist/core/p-8397766e.entry.js.map +1 -0
- package/dist/core/p-88c5ec78.entry.js +2 -0
- package/dist/core/p-88c5ec78.entry.js.map +1 -0
- package/dist/core/{p-e3059589.entry.js → p-8cb5deba.entry.js} +2 -2
- package/dist/core/{p-301131d6.entry.js → p-8d908a57.entry.js} +2 -2
- package/dist/core/{p-2c27c85b.entry.js → p-90364cef.entry.js} +2 -2
- package/dist/core/{p-6f7e8b3e.entry.js → p-9097a16a.entry.js} +2 -2
- package/dist/core/p-9097a16a.entry.js.map +1 -0
- package/dist/core/{p-b522ce0a.entry.js → p-94065f7a.entry.js} +2 -2
- package/dist/core/p-95881758.entry.js +2 -0
- package/dist/core/p-95881758.entry.js.map +1 -0
- package/dist/core/{p-b093cecd.entry.js → p-97abdbf7.entry.js} +2 -2
- package/dist/core/p-a220535c.entry.js +2 -0
- package/dist/core/p-a220535c.entry.js.map +1 -0
- package/dist/core/{p-91eacea5.entry.js → p-a26a60ff.entry.js} +2 -2
- package/dist/core/{p-b401ff42.entry.js → p-a54eb1d1.entry.js} +2 -2
- package/dist/core/p-a54eb1d1.entry.js.map +1 -0
- package/dist/core/{p-da82bbef.entry.js → p-b27bc1a1.entry.js} +2 -2
- package/dist/core/{p-856e0cda.entry.js → p-b88585bf.entry.js} +2 -2
- package/dist/core/p-b88585bf.entry.js.map +1 -0
- package/dist/core/{p-9e19560f.entry.js → p-bbf39a76.entry.js} +2 -2
- package/dist/core/{p-9e19560f.entry.js.map → p-bbf39a76.entry.js.map} +1 -1
- package/dist/core/p-bc974a3e.entry.js +2 -0
- package/dist/core/p-bc974a3e.entry.js.map +1 -0
- package/dist/core/{p-a34c894b.entry.js → p-bf93baea.entry.js} +2 -2
- package/dist/core/p-c67381b1.entry.js +2 -0
- package/dist/core/p-c67381b1.entry.js.map +1 -0
- package/dist/core/{p-6c97db37.entry.js → p-c77d6efc.entry.js} +2 -2
- package/dist/core/{p-c21317e5.entry.js → p-c94e7b0b.entry.js} +2 -2
- package/dist/core/p-c94e7b0b.entry.js.map +1 -0
- package/dist/core/{p-4d5dfb71.entry.js → p-cc36abaa.entry.js} +2 -2
- package/dist/core/{p-4e2ef907.entry.js → p-cd8178a9.entry.js} +2 -2
- package/dist/core/{p-693a568b.entry.js → p-cdd6d5e8.entry.js} +2 -2
- package/dist/core/p-d04b75cb.entry.js +2 -0
- package/dist/core/p-d04b75cb.entry.js.map +1 -0
- package/dist/core/{p-704c5fee.entry.js → p-e18ba5d6.entry.js} +2 -2
- package/dist/core/p-e2103bcc.entry.js +2 -0
- package/dist/core/p-e2103bcc.entry.js.map +1 -0
- package/dist/core/{p-95d3ff68.entry.js → p-f569a91f.entry.js} +2 -2
- package/dist/core/p-fb7f4e2e.entry.js +2 -0
- package/dist/core/p-fb7f4e2e.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-f094ef64.js → helpers-574534c9.js} +14 -2
- package/dist/esm/helpers-574534c9.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_3.entry.js +9 -8
- package/dist/esm/ic-checkbox_3.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-data-table.entry.js +42 -25
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +5 -7
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +17 -10
- package/dist/esm/ic-date-picker.entry.js.map +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-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_4.entry.js +5 -5
- package/dist/esm/ic-pagination_4.entry.js.map +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-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-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-tree-item.entry.js +15 -9
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +24 -16
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +2 -2
- package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +1 -1
- package/dist/types/components/ic-data-table/story-data.d.ts +0 -64
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +2 -1
- package/dist/types/components.d.ts +8 -0
- package/hydrate/index.js +300 -216
- package/hydrate/index.mjs +300 -216
- package/package.json +3 -3
- package/dist/cjs/helpers-274ac318.js.map +0 -1
- package/dist/core/p-13f52d7b.js.map +0 -1
- package/dist/core/p-304c6a01.entry.js +0 -2
- package/dist/core/p-304c6a01.entry.js.map +0 -1
- package/dist/core/p-3352cb6c.entry.js +0 -2
- package/dist/core/p-3352cb6c.entry.js.map +0 -1
- package/dist/core/p-4150f333.entry.js +0 -2
- package/dist/core/p-4150f333.entry.js.map +0 -1
- package/dist/core/p-4f941e4c.entry.js +0 -2
- package/dist/core/p-4f941e4c.entry.js.map +0 -1
- package/dist/core/p-57e881b4.entry.js +0 -2
- package/dist/core/p-57e881b4.entry.js.map +0 -1
- package/dist/core/p-5f8b09e4.entry.js +0 -2
- package/dist/core/p-5f8b09e4.entry.js.map +0 -1
- package/dist/core/p-6f7e8b3e.entry.js.map +0 -1
- package/dist/core/p-7001f1c1.entry.js +0 -2
- package/dist/core/p-7001f1c1.entry.js.map +0 -1
- package/dist/core/p-795afeb2.entry.js +0 -2
- package/dist/core/p-795afeb2.entry.js.map +0 -1
- package/dist/core/p-7dcdb89b.entry.js +0 -2
- package/dist/core/p-7dcdb89b.entry.js.map +0 -1
- package/dist/core/p-82941d0a.entry.js +0 -2
- package/dist/core/p-82941d0a.entry.js.map +0 -1
- package/dist/core/p-856e0cda.entry.js.map +0 -1
- package/dist/core/p-8e70b907.entry.js +0 -2
- package/dist/core/p-8e70b907.entry.js.map +0 -1
- package/dist/core/p-961d7718.entry.js +0 -2
- package/dist/core/p-961d7718.entry.js.map +0 -1
- package/dist/core/p-b401ff42.entry.js.map +0 -1
- package/dist/core/p-b9369ce5.entry.js +0 -2
- package/dist/core/p-b9369ce5.entry.js.map +0 -1
- package/dist/core/p-c21317e5.entry.js.map +0 -1
- package/dist/core/p-c73418dc.entry.js +0 -2
- package/dist/core/p-c73418dc.entry.js.map +0 -1
- package/dist/core/p-cd21aee7.entry.js +0 -2
- package/dist/core/p-cd21aee7.entry.js.map +0 -1
- package/dist/core/p-e04d2e51.entry.js +0 -2
- package/dist/core/p-e04d2e51.entry.js.map +0 -1
- package/dist/core/p-e4bff243.entry.js +0 -2
- package/dist/core/p-e4bff243.entry.js.map +0 -1
- package/dist/core/p-ef444b18.entry.js.map +0 -1
- package/dist/esm/helpers-f094ef64.js.map +0 -1
- /package/dist/core/{p-826a4e46.entry.js.map → p-032113b9.entry.js.map} +0 -0
- /package/dist/core/{p-acc884bc.entry.js.map → p-0dc0d839.entry.js.map} +0 -0
- /package/dist/core/{p-972f21fa.entry.js.map → p-137dd76e.entry.js.map} +0 -0
- /package/dist/core/{p-4271e7f4.entry.js.map → p-1e256460.entry.js.map} +0 -0
- /package/dist/core/{p-09acf70a.entry.js.map → p-2c4bf16f.entry.js.map} +0 -0
- /package/dist/core/{p-0bc8652d.entry.js.map → p-2d8900bf.entry.js.map} +0 -0
- /package/dist/core/{p-a6b573c0.entry.js.map → p-2de3287c.entry.js.map} +0 -0
- /package/dist/core/{p-28b10396.entry.js.map → p-33404c14.entry.js.map} +0 -0
- /package/dist/core/{p-29601c16.entry.js.map → p-3cf99186.entry.js.map} +0 -0
- /package/dist/core/{p-3f45c7ce.entry.js.map → p-42913c5b.entry.js.map} +0 -0
- /package/dist/core/{p-6938e1d9.entry.js.map → p-5237f3ac.entry.js.map} +0 -0
- /package/dist/core/{p-f35563a0.entry.js.map → p-5d987f8f.entry.js.map} +0 -0
- /package/dist/core/{p-3b994e61.entry.js.map → p-6f72e6ac.entry.js.map} +0 -0
- /package/dist/core/{p-afff5652.entry.js.map → p-75901d06.entry.js.map} +0 -0
- /package/dist/core/{p-7436d8de.entry.js.map → p-832c7042.entry.js.map} +0 -0
- /package/dist/core/{p-e3059589.entry.js.map → p-8cb5deba.entry.js.map} +0 -0
- /package/dist/core/{p-301131d6.entry.js.map → p-8d908a57.entry.js.map} +0 -0
- /package/dist/core/{p-2c27c85b.entry.js.map → p-90364cef.entry.js.map} +0 -0
- /package/dist/core/{p-b522ce0a.entry.js.map → p-94065f7a.entry.js.map} +0 -0
- /package/dist/core/{p-b093cecd.entry.js.map → p-97abdbf7.entry.js.map} +0 -0
- /package/dist/core/{p-91eacea5.entry.js.map → p-a26a60ff.entry.js.map} +0 -0
- /package/dist/core/{p-da82bbef.entry.js.map → p-b27bc1a1.entry.js.map} +0 -0
- /package/dist/core/{p-a34c894b.entry.js.map → p-bf93baea.entry.js.map} +0 -0
- /package/dist/core/{p-6c97db37.entry.js.map → p-c77d6efc.entry.js.map} +0 -0
- /package/dist/core/{p-4d5dfb71.entry.js.map → p-cc36abaa.entry.js.map} +0 -0
- /package/dist/core/{p-4e2ef907.entry.js.map → p-cd8178a9.entry.js.map} +0 -0
- /package/dist/core/{p-693a568b.entry.js.map → p-cdd6d5e8.entry.js.map} +0 -0
- /package/dist/core/{p-704c5fee.entry.js.map → p-e18ba5d6.entry.js.map} +0 -0
- /package/dist/core/{p-95d3ff68.entry.js.map → p-f569a91f.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
import{h as t,r as e,c as i,H as s,g as a}from"./p-8e4e97b4.js";import{d as n,g as r,a as h,y as o,b as c,c as d,e as l,f as u,h as f}from"./p-c86ca475.js";import{s as b,k as p,l as m,m as y,r as w,o as k,n as g}from"./p-e253a857.js";const v=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.70687 6L8.29688 7.41L12.8769 12L8.29688 16.59L9.70687 18L15.7069 12L9.70687 6Z" fill="currentColor"/>\n</svg>\n`;const x=({focussed:e,today:i,day:s,monthInView:a,onFocusDay:n,onBlurDay:r,onSelectDay:h,selected:o,focussedDayRef:c,inRange:d,showDaysOutsideMonth:l,disableDay:u})=>{const f=()=>{h(s)};const y=()=>{n()};const w=()=>{r()};const k=b(p);const g=b(m);const v=!d||u;const x=a!==s.getMonth();const D=v||x&&!l;return t("div",{class:"day-button-container"},t("button",{class:{"day-button":true,"outside-month":x,"outside-range":!!v,hidden:x&&!l,disabled:D,today:i,selected:o,focussed:e},tabIndex:e?0:-1,"aria-hidden":x?"true":"false","aria-disabled":D?"true":"false","aria-current":i?"date":undefined,"aria-label":D||x||v?undefined:`Choose ${k[s.getDay()]}, ${s.getDate()} ${g[s.getMonth()]} ${s.getFullYear()}`,disabled:D,onClick:f,onBlur:w,onFocus:y,ref:t=>{if(e&&t&&c){c(t)}}},(!x||x&&l)&&t("ic-typography",{variant:"subtitle-small",italic:x},s.getDate())))};const D=({size:e,focussedMonth:i,monthInView:s,onSelectMonth:a,onKeyDown:o,focussedMonthRef:c,minDate:d,maxDate:l,yearInView:u})=>{const f=t=>{const e=t.target;a(Number(e.getAttribute("data-month")))};const p=b(m);return t("div",{class:{"month-picker":true},role:"list"},p.map(((a,b)=>{const p=s===b;const m=i===b;const y=!n(new Date(u,b,1),d?h(d):null,l?r(l):null);return t("ic-button",{role:"listitem",class:{"month-button":true,selected:p,focussed:m,disabled:y},"full-width":true,disabled:y,variant:p?"primary":"tertiary","data-month":b,size:e,tabIndex:m?0:-1,"aria-current":p?"true":"false","aria-label":p?"":`select ${a}`,onClick:f,onKeyDown:o,ref:t=>{if(m&&t){c(t)}}},a)})))};const z=({decadeView:e,size:i,focussedYear:s,yearInView:a,onSelectYear:n,onFocusYear:r,onBlurYear:h,onKeyDown:c,minDate:d,maxDate:l,focussedYearRef:u})=>{const f=t=>{const e=t.target;n(Number(e.getAttribute("data-year")))};const b=()=>{r()};const p=()=>{h()};const m=t=>{t.preventDefault()};const y=e[0];const w=e[11];const k=e.slice(1,11);return t("div",{class:"year-picker",role:"list"},t("div",{class:"prev-decade","aria-hidden":"true"},t("ic-button",{id:"prev-decade-button",class:{"year-button":true},disabled:!o(y,d,l),"data-year":y,tabIndex:-1,variant:"tertiary",onClick:f,onMouseDown:m,"aria-hidden":"true",size:i},`${y-9}s`,t("svg",{slot:"left-icon",width:"12",height:"12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z",fill:"currentColor"})))),k.map((e=>{const n=a===e;const r=s===e;return t("ic-button",{class:{"year-button":true,selected:n,focussed:r},disabled:!o(e,d,l),"data-year":e,tabIndex:r?0:-1,variant:n?"primary":"tertiary",onClick:f,"aria-label":n?"":`select ${e}`,role:"listitem","aria-current":n?"true":"false",onKeyDown:c,onFocus:b,onBlur:p,size:i,ref:t=>{if(r&&t){u(t)}}},e)})),t("div",{class:"next-decade","aria-hidden":"true"},t("ic-button",{id:"next-decade-button",class:{"year-button":true,flip:true},disabled:!o(w,d,l),"data-year":w,tabIndex:-1,variant:"tertiary",onClick:f,onMouseDown:m,"aria-hidden":"true",size:i},`${w}s`,t("svg",{slot:"right-icon",width:"12",height:"12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z",fill:"currentColor"})))))};const H='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative;--month-year-picker-button-width:5rem;--month-button-width:5.5rem;--input-field-width:var(--input-width, 19.125rem);--ic-input-label-helpertext-padding:var(--ic-space-xxs)}:host(.ic-date-picker-large){--month-button-width:6.3125rem;--input-field-width:var(--input-width, 21.125rem)}:host(.ic-date-picker-small){--month-button-width:6.25rem;--input-field-width:var(--input-width, 17.125rem)}:host .date-input-container{position:relative}ic-date-input{--input-width:var(--input-field-width)}:host .calendar-container{min-width:19rem;max-width:23.5rem;width:var(--input-width);display:flex;flex-direction:column;gap:var(--ic-space-xs);position:absolute;border:var(--ic-border-default);border-color:var(--ic-date-picker-calendar-border);border-radius:var(--ic-border-radius);align-items:center;background-color:var(--ic-date-picker-calendar-bg);z-index:var(--ic-z-index-date-picker);box-sizing:border-box;box-shadow:var(--ic-date-picker-calendar-elevation);margin-top:var(--ic-space-xxxs);padding:var(--ic-space-xs);animation:fade-in-calendar var(--ic-transition-duration-slow)}:host(.ic-date-picker-small) .calendar-container{min-width:17rem;max-width:21.5rem}:host(.ic-date-picker-large) .calendar-container{min-width:21rem;max-width:25.5rem}:host .calendar-container.above{bottom:calc(var(--ic-space-xxl) - var(--ic-space-xxs))}:host .month-year-nav-container{display:flex;justify-content:space-between;align-items:center;align-self:stretch}:host .month-year-nav-container.hidden{display:none}:host .month-year-nav{display:flex;justify-content:space-between;align-items:center;flex:1 0 0}:host .month-picker,:host .year-picker{flex-wrap:wrap;display:inline-flex;align-items:center;width:17.5rem;-moz-column-gap:var(--ic-space-xs);column-gap:var(--ic-space-xs);row-gap:var(--ic-space-xxs)}:host(.ic-date-picker-small) .month-picker,:host(.ic-date-picker-small) .year-picker{width:13.125rem}:host(.ic-date-picker-large) .month-picker,:host(.ic-date-picker-large) .year-picker{width:20rem}:host .month-picker-button,:host .year-picker-button{width:5rem;--min-width:5rem}:host .month-button,:host .year-button{width:var(--month-button-width)}:host .month-button.focussed,:host .year-button.focussed{z-index:1}:host .month-button::part(button),:host .year-button::part(button){min-width:var(--month-button-width)}:host .prev-decade .year-button svg{margin-right:calc(-1 * var(--ic-space-xl));padding-top:var(--ic-space-sm)}:host .prev-decade .year-button::part(button){padding-left:0;padding-right:var(--ic-space-lg)}:host(.ic-date-picker-small) .prev-decade .year-button::part(button){padding-left:0;padding-right:calc(var(--ic-space-lg) + var(--ic-space-xxs))}:host .next-decade .year-button svg{margin-left:calc(-1 * var(--ic-space-xl));padding-top:var(--ic-space-sm)}:host .next-decade .year-button::part(button){padding-right:0;padding-left:var(--ic-space-lg)}:host(.ic-date-picker-small) .next-decade .year-button::part(button),:host(.ic-date-picker-large) .next-decade .year-button::part(button){padding-left:var(--ic-space-xl)}:host .bottom-buttons{padding-top:var(--ic-space-xs);display:flex;justify-content:space-between;align-items:center;align-self:stretch;animation:fade-in-buttons var(--ic-transition-duration-slow)}:host(.ic-date-picker-small) .bottom-buttons{padding-top:var(--ic-space-xxs)}:host .bottom-buttons.no-today{align-items:flex-end;flex-direction:column}:host .bottom-buttons.hidden{display:none}:host .calendar{display:flex;flex-direction:column;align-items:flex-start;width:15.75rem;animation:fade-in-buttons var(--ic-transition-duration-slow)}:host(.ic-date-picker-large) .calendar{width:19.25rem}:host(.ic-date-picker-small) .calendar{padding-bottom:var(--ic-space-xxs);width:14rem}:host .hidden{display:none}:host .weekdays{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:var(--ic-space-xs);align-self:stretch}:host .calendar-days-container{display:flex;flex-wrap:wrap;justify-content:space-between;row-gap:var(--ic-space-xs);padding:var(--ic-space-xxs) 0}:host(.ic-date-picker-small) .calendar-days-container{padding:var(--ic-space-xxxs) 0}:host(.ic-date-picker-large) .calendar-days-container{padding:var(--ic-space-xs) 0}:host .calendar-day-header{display:flex;width:2rem;padding:var(--ic-space-xxs) 0;justify-content:center;align-items:center}:host(.ic-date-picker-small) .calendar-day-header,:host(.ic-date-picker-large) .calendar-day-header{padding:var(--ic-space-xxs)}:host .calendar-day-header ic-typography{--ic-typography-color:var(--ic-date-picker-calendar-label);text-align:center}:host .day-button-container{display:flex;justify-content:center;align-items:center;width:2.25rem;height:2.25rem}:host(.ic-date-picker-small) .day-button-container{width:2rem;height:2rem}:host(.ic-date-picker-large) .day-button-container{width:2.5rem;height:2.5rem}:host .day-button{display:flex;position:relative;justify-content:center;align-items:center;border:0;border-radius:2rem;background-color:var(--ic-date-picker-calendar-bg);width:2rem;height:2rem;cursor:pointer;transition:var(--ic-easing-transition-fast);z-index:0}:host .day-button.disabled{cursor:default}:host(.ic-date-picker-large) .day-button{width:2.25rem;height:2.25rem}:host(.ic-date-picker-small) .day-button{width:1.75rem;height:1.75rem}:host .day-button ic-typography{width:1.75rem;--ic-typography-color:var(--ic-date-picker-date-label-default)}:host .day-button.outside-range ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-disabled)}:host .day-button.outside-month ic-typography{font-weight:var(--ic-font-weight-regular) !important}:host .day-button.outside-month:not(.outside-range):not(.selected) ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-default)}:host .day-button:hover:not(.disabled){background-color:var(--ic-date-picker-date-default-bg-hover)}:host .day-button:active:not(.disabled){background-color:var(--ic-date-picker-date-default-bg-pressed)}@media (prefers-reduced-motion: no-preference){:host .day-button:hover:not(.disabled):not(.focussed),:host .day-button:active:not(.disabled):not(.focussed){transition:background-color var(--ic-transition-duration-slow) ease-in-out}}:host .day-button.selected:not(.hidden){background-color:var(--ic-date-picker-date-active-bg-default)}:host .day-button.selected ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-selected)}:host .day-button.selected:not(.hidden):hover{background-color:var(--ic-date-picker-date-active-bg-hover)}:host .day-button.selected:not(.hidden):active{background-color:var(--ic-date-picker-date-active-bg-pressed)}:host .day-button.focussed{z-index:1}:host .day-button:focus{outline:none}:host .day-button.focussed:focus{box-shadow:var(--ic-border-focus)}:host .day-button.today:not(.hidden)::after{content:"";position:absolute;width:0.875rem;height:0.125rem;bottom:0.4rem;border-radius:var(--ic-border-radius);background-color:var(--ic-date-picker-default-underline)}:host(.ic-date-picker-small) .day-button.today::after{bottom:0.35rem}:host(.ic-date-picker-large) .day-button.today::after{width:1rem}:host .day-button.today.selected::after{background-color:var(--ic-date-picker-selected-underline)}:host #select-month-hint,:host #select-year-hint{display:none}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){:host .calendar-container,:host .calendar,:host .bottom-buttons{animation:none}}@keyframes fade-in-buttons{0%{opacity:0}50%{opacity:0}100%{opacity:1}}@keyframes fade-in-calendar{0%{display:flex;max-height:0}100%{display:flex;max-height:600px}}@media (forced-colors: active){:host .day-button.today:not(.hidden)::after{background-color:highlight}:host .day-button.selected:not(.hidden){background-color:highlight}:host .day-button.focussed:focus{border:var(--ic-border-hc)}:host .month-button.selected::part(button),:host .year-button.selected::part(button){background-color:highlight}}';const M=H;const P="DD/MM/YYYY";const V="Dates in the future are not allowed. Please select a date in the past.";const L="Dates in the past are not allowed. Please select a date in the future.";const T="The date you have selected is on a day of the week that is not allowed. Please select another date.";const C=100;const I=360;const Y=400;const $=440;const A=class{constructor(s){e(this,s);this.icChange=i(this,"icChange",7);this.clearButtonEl=null;this.daysOfWeek=[];this.dayButtonFocussed=false;this.dayPickerKeyboardNav=false;this.dialogDescription="";this.focusDay=true;this.liveRegionEl=undefined;this.monthNames=[];this.monthInViewUpdateHandled=false;this.myCalendarButtonClicked=false;this.showPickerAbove=false;this.today=new Date;this.todayButtonEl=null;this.yearButtonFocussed=false;this.calendarOpen=false;this.currMonthView=[];this.currYearPickerView=[];this.decadeView=[];this.focussedDate=null;this.maxDate=null;this.minDate=null;this.monthPickerVisible=false;this.orderedDaysOfWeek=[];this.selectedDate=null;this.yearPickerVisible=false;this.dateFormat="DD/MM/YYYY";this.disabled=false;this.emitDatePartChange=false;this.disableDays=[];this.disableDaysMessage="The date you have selected is on a day of the week that is not allowed. Please select another date.";this.disableFuture=false;this.disableFutureMessage="Dates in the future are not allowed. Please select a date in the past.";this.disablePast=false;this.disablePastMessage="Dates in the past are not allowed. Please select a date in the future.";this.hideHelperText=false;this.hideLabel=false;this.invalidDateMessage="Please enter a valid date.";this.max="";this.min="";this.openAtDate="";this.required=false;this.showDaysOutsideMonth=true;this.showPickerClearButton=true;this.showPickerTodayButton=true;this.size="medium";this.startOfWeek=y.Monday;this.theme="inherit";this.validationStatus="";this.validationText="";this.value="";this.setDecadeView=t=>{let e=t-1;const i=[];while(e<=t+10){i.push(e);e++}this.decadeView=i;this.decadeStart=i[1];this.decadeEnd=i[10]};this.setSelectedDate=(t,e=true)=>{var i;if(t===null||!c(t,this.selectedDate)){this.selectedDate=t;this.value=t;if(e){(i=this.inputEl)===null||i===void 0?void 0:i.triggerIcChange(t)}}};this.handleCalendarMouseDown=t=>{const e=t.target;if(e.tagName!=="IC-BUTTON"){t.preventDefault()}};this.handleCalendarClick=t=>{this.clearDialogDescription();t.stopImmediatePropagation()};this.handleDocumentClick=()=>{this.calendarOpen=false};this.keyDownHandler=t=>{var e;if(t.key==="Escape"){if(this.calendarOpen){this.closeButtonClickHandler();(e=this.inputEl)===null||e===void 0?void 0:e.setCalendarFocus();t.stopImmediatePropagation()}}else{this.clearDialogDescription();t.stopImmediatePropagation()}};this.closeButtonClickHandler=()=>{this.calendarOpen=false};this.focusFirstElement=()=>{this.monthButtonEl.setFocus()};this.focusLastElement=()=>{if(this.showPickerClearButton&&this.clearButtonEl&&!this.clearButtonEl.disabled){this.clearButtonEl.setFocus()}else if(this.showPickerTodayButton&&this.todayButtonEl&&!this.todayButtonEl.disabled){this.todayButtonEl.setFocus()}else if(this.monthPickerVisible){this.focussedMonthEl.setFocus()}else if(this.yearPickerVisible){this.focussedYearEl.setFocus()}else{this.focussedDayEl.focus()}};this.focusFocussedDay=()=>{this.focussedDayEl.focus()};this.monthButtonClickHandler=()=>{this.yearPickerVisible=false;this.focusDay=false;this.monthPickerVisible=!this.monthPickerVisible;if(this.monthPickerVisible){this.setAriaLiveRegionText("Month picker view open")}else{this.setMonthSelectedLiveRegionText()}};this.yearButtonClickHandler=()=>{this.monthPickerVisible=false;this.focusDay=false;this.yearPickerVisible=!this.yearPickerVisible;if(this.yearPickerVisible){this.setAriaLiveRegionText(`Year picker view open. ${this.getDecadeInViewText()}`)}else{this.setYearSelectedLiveRegionText()}};this.todayButtonClickHandler=()=>{this.yearPickerVisible=false;this.monthPickerVisible=false;this.setFocussedDate(new Date);this.setAriaLiveRegionText(this.getMonthInViewText());setTimeout((()=>this.focusFocussedDay()),C)};this.todayButtonKeyDownHandler=t=>{var e;if(t.key==="Tab"&&!t.shiftKey&&((e=this.clearButtonEl)===null||e===void 0?void 0:e.disabled)){this.focusFirstElement();t.preventDefault()}};this.clearButtonClickHandler=()=>{this.setSelectedDate(null);let t="Selected date cleared.";if(!this.monthPickerVisible&&!this.yearPickerVisible){t+=` ${this.getMonthInViewText()}`}if(this.monthPickerVisible){this.focussedMonthEl.setFocus()}else if(this.yearPickerVisible){this.focussedYearEl.setFocus()}else{this.focusFocussedDay()}this.setAriaLiveRegionText(t)};this.setMonthSelectedLiveRegionText=()=>{this.setAriaLiveRegionText(`${this.monthNames[this.monthInView]} selected. ${this.getMonthInViewText()}`)};this.setYearSelectedLiveRegionText=()=>{this.setAriaLiveRegionText(`${this.yearInView} selected. ${this.getMonthInViewText()}`)};this.getMonthInViewText=()=>`${this.monthNames[this.monthInView]} ${this.yearInView} currently in view.`;this.getDecadeInViewText=()=>`${this.decadeStart} to ${this.decadeEnd} currently in view.`;this.setAriaLiveRegionText=t=>{this.liveRegionEl&&(this.liveRegionEl.innerText=t)};this.clearDialogDescription=()=>{this.dialogDescription=""};this.clearButtonKeyDownHandler=t=>{if(t.key==="Tab"&&!t.shiftKey){this.focusFirstElement();t.preventDefault()}};this.goToPreviousMonth=(t=false)=>{this.focusDay=t;this.moveMonths(-1)};this.goToNextMonth=(t=false)=>{this.focusDay=t;this.moveMonths(1)};this.goToPreviousYear=(t=false)=>{if(this.isPrevYearAllowed()){this.focusDay=t;this.moveYears(-1)}};this.goToNextYear=(t=false)=>{if(this.isNextYearAllowed()){this.focusDay=t;this.moveYears(1)}};this.navButtonMouseDownHandler=t=>{t.preventDefault()};this.renderMonthYearNavButton=(e,i,s)=>{const a=this.size;return t("div",{"aria-hidden":"true"},t("ic-button",{id:e,disableTooltip:true,disabled:s,onClick:this.monthYearNavClickHandler,class:{flip:i},variant:"icon-tertiary",innerHTML:v,size:a,tabIndex:-1,"aria-hidden":"true",onMouseDown:this.navButtonMouseDownHandler}))};this.monthYearNavClickHandler=t=>{const e=t.target;switch(e.id){case"previous-month-button":this.goToPreviousMonth(this.dayButtonFocussed);break;case"next-month-button":this.goToNextMonth(this.dayButtonFocussed);break;case"previous-year-button":this.goToPreviousYear(this.dayButtonFocussed);break;case"next-year-button":this.goToNextYear(this.dayButtonFocussed);break}};this.previousMonthButton=()=>{let t=false;if(this.focussedDate!==null&&this.minDate!==null){const e=this.focussedDate.getFullYear()===this.minDate.getFullYear();if(e){t=this.monthInView-1<this.minDate.getMonth()}}return this.renderMonthYearNavButton("previous-month-button",true,t)};this.nextMonthButton=()=>{let t=false;if(this.focussedDate!==null&&this.maxDate!==null){const e=this.focussedDate.getFullYear()===this.maxDate.getFullYear();if(e){t=this.monthInView+1>this.maxDate.getMonth()}}return this.renderMonthYearNavButton("next-month-button",false,t)};this.previousYearButton=()=>this.renderMonthYearNavButton("previous-year-button",true,!this.isPrevYearAllowed());this.nextYearButton=()=>this.renderMonthYearNavButton("next-year-button",false,!this.isNextYearAllowed());this.isPrevYearAllowed=()=>this.isYearAllowed(this.yearInView-1);this.isNextYearAllowed=()=>this.isYearAllowed(this.yearInView+1);this.isYearAllowed=t=>o(t,this.minDate,this.maxDate);this.getMonthView=t=>{const e=d(h(t),this.startOfWeek);const i=l(r(t),this.startOfWeek);const s=[];let a=e;while(!c(a,i)){s.push(a);a=new Date(a);a.setDate(a.getDate()+1)}s.push(a);return s};this.isCurrentMonth=()=>{const t=new Date;return t.getFullYear()===this.yearInView&&t.getMonth()===this.monthInView};this.updateMonthInView=()=>{if(this.focussedDate){this.currMonthView=this.getMonthView(this.focussedDate);this.focussedDay=this.focussedDate.getDate();this.monthInView=this.focussedDate.getMonth();this.yearInView=this.focussedDate.getFullYear();if(this.dayPickerKeyboardNav){this.monthInViewUpdateHandled=true;this.setAriaLiveRegionText(this.getMonthInViewText());this.dayPickerKeyboardNav=false}}};this.handleSelectDay=t=>{var e;this.setSelectedDate(t);this.calendarOpen=false;(e=this.inputEl)===null||e===void 0?void 0:e.setCalendarFocus()};this.handleSelectMonth=t=>{this.moveMonths(t-this.monthInView);setTimeout((()=>{this.monthButtonEl.setFocus();this.monthPickerVisible=false;this.setMonthSelectedLiveRegionText()}),C)};this.handleSelectYear=t=>{const e=this.decadeView.indexOf(t);if(e>0&&e<this.decadeView.length-1){this.moveYears(t-this.yearInView);this.focusDay=false;const e=this.monthNames[this.monthInView];this.setAriaLiveRegionText(`${t} selected. ${e} ${t} currently in view.`);setTimeout((()=>{this.yearButtonEl.setFocus();this.yearPickerVisible=false}),C)}else{const e=t-this.focussedYear>0?10:-10;this.updateFocussedYear(e,this.yearButtonFocussed);this.setAriaLiveRegionText(this.getDecadeInViewText())}};this.monthPickerKeyDownHandler=t=>{let e=true;switch(t.key){case"ArrowUp":case"ArrowLeft":this.updateFocussedMonth(-1);break;case"ArrowDown":case"ArrowRight":this.updateFocussedMonth(1);break;case"Home":this.updateFocussedMonth(-this.focussedMonth);break;case"End":this.updateFocussedMonth(11-this.focussedMonth);break;case"Tab":e=this.calendarTabHandler(t);break;case"Escape":t.stopImmediatePropagation();this.monthPickerVisible=false;setTimeout((()=>this.focusFocussedDay()),C);break;default:e=false}if(e){t.preventDefault()}};this.yearPickerKeyDownHandler=t=>{let e=true;switch(t.key){case"ArrowUp":case"ArrowLeft":this.updateFocussedYear(-1);break;case"ArrowDown":case"ArrowRight":this.updateFocussedYear(1);break;case"Home":if(this.focussedYear>this.decadeStart){this.updateFocussedYear(this.decadeStart-this.focussedYear)}break;case"End":if(this.focussedYear<this.decadeEnd){this.updateFocussedYear(this.decadeEnd-this.focussedYear)}break;case"PageUp":this.updateFocussedYear(-10);break;case"PageDown":this.updateFocussedYear(10);break;case"Tab":e=this.calendarTabHandler(t);break;case"Escape":t.stopImmediatePropagation();this.yearPickerVisible=false;setTimeout((()=>this.focusFocussedDay()),C);break;default:e=false}if(e){t.preventDefault()}};this.onYearButtonFocusHandler=()=>{this.yearButtonFocussed=true};this.onYearButtonBlurHandler=()=>{this.yearButtonFocussed=false};this.monthButtonKeyDownHandler=t=>{let e=false;switch(t.key){case"ArrowLeft":case"ArrowUp":e=true;this.goToPreviousMonth();break;case"ArrowRight":case"ArrowDown":e=true;this.goToNextMonth();break;case"Home":e=true;this.focusDay=false;this.moveMonths(-this.monthInView);break;case"End":e=true;this.focusDay=false;this.moveMonths(11-this.monthInView);break;case"Tab":if(t.shiftKey){e=true;this.focusLastElement()}break;case"Escape":if(this.monthPickerVisible){this.monthPickerVisible=false;t.stopImmediatePropagation()}break}if(e){t.preventDefault()}};this.yearButtonKeyDownHandler=t=>{let e=false;switch(t.key){case"ArrowLeft":case"ArrowUp":e=true;this.goToPreviousYear();break;case"ArrowRight":case"ArrowDown":e=true;this.goToNextYear();break;case"Home":if(this.yearPickerVisible&&this.yearInView>this.decadeStart){e=true;this.moveYears(this.decadeStart-this.yearInView)}break;case"End":if(this.yearPickerVisible&&this.yearInView<this.decadeEnd){e=true;this.moveYears(this.decadeEnd-this.focussedYear)}break;case"PageUp":e=true;this.focusDay=false;this.moveYears(-10);break;case"PageDown":e=true;this.focusDay=false;this.moveYears(10);break;case"Escape":if(this.yearPickerVisible){this.yearPickerVisible=false;t.stopImmediatePropagation()}break}if(e){t.preventDefault()}};this.handleCalendarKeyDown=t=>{let e=true;switch(t.key){case"ArrowDown":this.dayPickerKeyboardNav=true;this.moveDays(7);break;case"ArrowUp":this.dayPickerKeyboardNav=true;this.moveDays(-7);break;case"ArrowLeft":this.dayPickerKeyboardNav=true;if(this.focussedDate)this.moveDays(-1*this.getNextDayToFocus(this.focussedDate,false));break;case"ArrowRight":this.dayPickerKeyboardNav=true;if(this.focussedDate)this.moveDays(this.getNextDayToFocus(this.focussedDate,true));break;case"PageUp":this.dayPickerKeyboardNav=true;t.shiftKey?this.moveYears(-1):this.moveMonths(-1);break;case"PageDown":this.dayPickerKeyboardNav=true;t.shiftKey?this.moveYears(1):this.moveMonths(1);break;case"Home":this.dayPickerKeyboardNav=true;this.setFocussedDate(new Date(this.focussedYear,this.focussedMonth,1));break;case"End":this.dayPickerKeyboardNav=true;this.setFocussedDate(new Date(this.focussedYear,this.focussedMonth+1,0));break;case"Tab":e=this.calendarTabHandler(t);break;default:e=false;break}if(e){t.preventDefault()}};this.calendarTabHandler=t=>{var e;let i=false;if(!t.shiftKey&&(!this.showPickerTodayButton||this.isCurrentMonth())&&(!this.showPickerClearButton||((e=this.clearButtonEl)===null||e===void 0?void 0:e.disabled))){this.focusFirstElement();i=true}else if(t.shiftKey){this.yearButtonEl.setFocus();i=true}return i};this.onDayButtonFocusHandler=()=>{this.dayButtonFocussed=true};this.onDayButtonBlurHandler=()=>{this.dayButtonFocussed=false};this.getNextDayToFocus=(t,e,i=1)=>{var s;const a=e?1:-1;const n=new Date(t);n.setDate(n.getDate()+a);return((s=this.disableDays)===null||s===void 0?void 0:s.includes(Number(n.getDay())))?this.getNextDayToFocus(n,e,i+1):i};this.moveDays=t=>{if(this.focussedDate){const e=new Date(this.focussedDate);e.setDate(e.getDate()+t);this.setFocussedDate(e)}};this.moveMonths=t=>{if(this.focussedDate){const e=this.focussedDate.getMonth()+t;const i=new Date(new Date(h(this.focussedDate)).setMonth(e));const s=r(i);const a=new Date(new Date(this.focussedDate).setMonth(e));this.setFocussedDate(u(a,i,s));if(this.monthPickerVisible===false&&this.yearPickerVisible===false&&this.monthInViewUpdateHandled===false){this.setAriaLiveRegionText(this.getMonthInViewText())}this.monthInViewUpdateHandled=false}};this.moveYears=t=>{if(this.focussedDate){const e=this.focussedDate.getFullYear()+t;const i=new Date(new Date(h(this.focussedDate)).setFullYear(e));const s=r(i);const a=new Date(new Date(this.focussedDate).setFullYear(e));this.setFocussedDate(u(a,i,s));if(this.monthPickerVisible===false&&this.yearPickerVisible===false&&this.monthInViewUpdateHandled===false){this.setAriaLiveRegionText(this.getMonthInViewText())}this.monthInViewUpdateHandled=false}};this.updateFocussedMonth=t=>{const e=new Date(this.focussedYear,this.focussedMonth,1);e.setMonth(this.focussedMonth+t);const i=u(e,this.minDate,this.maxDate);this.focussedMonth=i.getMonth();setTimeout((()=>this.focussedMonthEl.setFocus()),C)};this.updateFocussedYear=(t,e=true)=>{const i=new Date((new Date).setFullYear(this.focussedYear+t));const s=u(i,this.minDate,this.maxDate);this.setFocussedYear(s.getFullYear(),e)};this.setFocussedDate=t=>{this.focussedDate=u(t,this.minDate,this.maxDate)};this.setFocussedDayEl=t=>{this.focussedDayEl=t};this.setFocussedMonthEl=t=>{this.focussedMonthEl=t};this.setFocussedYearEl=t=>{this.focussedYearEl=t};this.setFocussedYear=(t,e=true)=>{const i=this.focussedYear;this.focussedYear=t;if(this.yearPickerVisible){const s=Math.floor(t/10)*10;const a=Math.floor(i/10)*10;if(s!==a){this.setDecadeView(s);this.setAriaLiveRegionText(this.getDecadeInViewText())}if(e){setTimeout((()=>{if(this.focussedYearEl!==null)this.focussedYearEl.setFocus()}),C)}}else{this.setDecadeView(Math.floor(t/10)*10)}};this.setDateInputProps=()=>{const t={hideLabel:this.hideLabel,invalidDateMessage:this.invalidDateMessage,label:this.label,showClearButton:true,showCalendarButton:true,value:this.value,emitDatePartChange:this.emitDatePartChange};if(this.dateFormat!==P){t.dateFormat=this.dateFormat}if(this.disableFuture){t.disableFuture=this.disableFuture;if(this.disableFutureMessage!==V){t.disableFutureMessage=this.disableFutureMessage}}if(this.disablePast){t.disablePast=this.disablePast;if(this.disablePastMessage!==L){t.disablePastMessage=this.disablePastMessage}}if(this.disableDays&&this.disableDays.length>0){t.disableDays=this.disableDays;if(this.disableDaysMessage!==T){t.disableDaysMessage=this.disableDaysMessage}}if(this.max!==null&&this.max!==""&&this.maxDate){t.max=this.maxDate}if(this.min!==null&&this.min!==""&&this.minDate){t.min=this.minDate}if(this.helperText!==undefined){t.helperText=this.helperText}if(this.hideHelperText!==false){t.hideHelperText=this.hideHelperText}if(this.inputId!==undefined){t.inputId=this.inputId}if(this.name!==undefined){t.name=this.name}if(this.disabled){t.disabled=this.disabled}if(this.required){t.required=this.required}if(this.size!=="medium"){t.size=this.size}if(this.validationStatus!==""){t.validationStatus=this.validationStatus}if(this.validationText!==""){t.validationText=this.validationText}return t}}watchDisabledHandler(){w(this.disabled,this.el)}watchDisableFutureHandler(){this.watchMaxHandler()}watchDisablePastHandler(){this.watchMinHandler()}watchMaxHandler(){if(this.disableFuture){this.maxDate=new Date}else{this.maxDate=f(this.max,this.dateFormat)}}watchMinHandler(){if(this.disablePast){this.minDate=new Date}else{this.minDate=f(this.min,this.dateFormat)}}watchStartOfWeekHandler(){this.orderedDaysOfWeek=this.daysOfWeek.slice(this.startOfWeek).concat(this.daysOfWeek.slice(0,this.startOfWeek));if(this.calendarOpen){this.updateMonthInView()}}watchOpenHandler(){if(this.calendarOpen){if(this.inputEl){let t=Y;if(this.size==="small"){t=I}else if(this.size==="large"){t=$}if(this.el.offsetTop+this.inputEl.offsetHeight+t>window.innerHeight&&this.el.offsetTop>t){this.showPickerAbove=true}else{this.showPickerAbove=false}}if(this.selectedDate===null||!n(this.selectedDate,this.minDate,this.maxDate)){let t=new Date;if(this.openAtDate!==""){t=f(this.openAtDate,this.dateFormat)}this.setFocussedDate(t)}else{this.setFocussedDate(this.selectedDate)}let t=this.getMonthInViewText();if(this.selectedDate===null){t+=" No date selected."}t+=" Use arrow keys to change day. Press enter or space to select a date or press escape to close the picker";this.dialogDescription=t;setTimeout((()=>this.focusFocussedDay()),C);document.addEventListener("click",this.handleDocumentClick)}else{document.removeEventListener("click",this.handleDocumentClick);this.monthPickerVisible=false;this.yearPickerVisible=false}}watchFocussedDateHandler(t,e){if(e===null||!(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())){this.updateMonthInView()}}watchMonthInViewHandler(){this.focussedMonth=this.monthInView}watchYearInViewHandler(){this.setFocussedYear(this.yearInView,false)}watchYearPickerVisibleHandler(){if(!this.yearPickerVisible){this.setFocussedYear(this.yearInView)}}watchMonthPickerVisibleHandler(){if(!this.monthPickerVisible){this.focussedMonth=this.monthInView}}watchFocussedDayEl(){if(this.focusDay){setTimeout((()=>this.focusFocussedDay()),C)}this.focusDay=true}componentWillLoad(){k([{prop:this.label,propName:"label"}],"Date Picker");this.monthNames=b(m);this.daysOfWeek=b(g);this.watchStartOfWeekHandler();this.watchMaxHandler();this.watchMinHandler();w(this.disabled,this.el)}componentWillRender(){this.dateInputProps=this.setDateInputProps()}componentWillUpdate(){this.dateInputProps=this.setDateInputProps()}localCalendarButtonClickHandler(t){this.myCalendarButtonClicked=true;if(!this.calendarOpen){this.setSelectedDate(t.detail.value,false)}this.calendarOpen=!this.calendarOpen}calendarButtonClickHandler(){if(!this.myCalendarButtonClicked){this.calendarOpen=false}this.myCalendarButtonClicked=false}render(){const{calendarOpen:e,dateInputProps:i,monthNames:a,size:r,focussedMonth:h,focussedYear:o,monthInView:d,yearInView:l,monthPickerVisible:u,yearPickerVisible:f,orderedDaysOfWeek:b,decadeView:p,minDate:m,maxDate:y,showPickerClearButton:w,showPickerTodayButton:k,dialogDescription:g,theme:v}=this;let H="";if(u){H=`Use the arrow keys to change the selected month. To return to day picker view, press Enter or Space to select a month, or press Escape.`}else{H=`Press Enter or Space to open month picker view or use the arrow keys to change month.`}let M="";if(f){M=`Use the arrow keys to change the selected year. To return to day picker view, press Enter or Space to select a year, or press Escape.`}else{M=`Press Enter or Space to open year picker view or use the arrow keys to change the selected year.`}const P="choose date";const V=a&&a[d]?a[d]:"Open month picker";const L=this.yearInView?this.yearInView:"Open year picker";let T=m;if(m&&this.disablePast){const t=new Date(m);t.setDate(m.getDate()-1);T=t}return t(s,{key:"f3e096ad765455113084b5c26571383bda7d3d75",onKeyDown:this.keyDownHandler,class:{[`ic-date-picker-${r}`]:true,[`ic-theme-${v}`]:v!=="inherit"}},t("div",{key:"db290c92bf7a22901f7888693fdd4a501b75da0f",class:"date-input-container"},t("ic-date-input",Object.assign({key:"1f2b3537e582d1abb5370e4b73f7d6e4bfb7ff6c",ref:t=>this.inputEl=t},i),t("slot",{key:"e1bd896a33c3fe7468287e19c3959809d2e12831",name:"helper-text",slot:"helper-text"}))),e&&t("div",{key:"3e15ffe8f4e3859197f212c232641e48ed9977fa"},t("span",{key:"5840a049f8f278395fc09a9ed4d63ac00a1dc00e",id:"dialog-description",class:"sr-only"},g),t("div",{key:"4c0dcd3ba00e077ccc7feee92389cc1b6ab33e7e",role:"dialog","aria-modal":"true","aria-label":P,"aria-describedBy":"dialog-description",class:{"calendar-container":true,above:this.showPickerAbove},onMouseDown:this.handleCalendarMouseDown,onClick:this.handleCalendarClick},t("span",{key:"5b273eb2c9651d28343c6626c1493858c87c35ec",ref:t=>this.liveRegionEl=t,id:"live-region","aria-live":"assertive",class:"sr-only"}),t("div",{key:"1b8699fbe3f8de8b321f9bf2d84b26eee18b949a",class:{"month-year-nav-container":true}},t("div",{key:"f5390a3d685bc75bc220b5e6c25634301b3b3001",class:"month-year-nav"},this.previousMonthButton(),t("span",{key:"23323f66c1fa8a68019f1c4dc7341d8e6d672adc",id:"select-month-hint","aria-hidden":"true"},H),t("ic-button",{key:"1f6d75f9f18eee7acbb59359dab51eecb0051415",ref:t=>this.monthButtonEl=t,size:r,class:"month-picker-button","aria-haspopup":"menu","aria-expanded":u?"true":"false","full-width":"true",variant:"tertiary","aria-label":V,"aria-describedby":"select-month-hint",onKeyDown:this.monthButtonKeyDownHandler,onClick:this.monthButtonClickHandler},a[d]),this.nextMonthButton()),t("div",{key:"42a149729b419b69e976896a097bedd040879a09",class:"month-year-nav"},this.previousYearButton(),t("span",{key:"f94101cb4e146f26822856a009f9238109d8f9ce",id:"select-year-hint","aria-hidden":"true"},M),t("ic-button",{key:"f1edef2db467cabec041e67c72920ce07ef30738",ref:t=>this.yearButtonEl=t,size:r,class:"year-picker-button","aria-haspopup":"menu","aria-expanded":f?"true":"false","full-width":"true",variant:"tertiary","aria-label":L,"aria-describedby":"select-year-hint",onKeyDown:this.yearButtonKeyDownHandler,onClick:this.yearButtonClickHandler},this.yearInView),this.nextYearButton())),!(u||f)&&t("div",{key:"30d7102d463465b51cce6087f9a89d4875d121fc",class:{calendar:true,hidden:u||f},onKeyDown:this.handleCalendarKeyDown},t("div",{key:"4b4bfc6e263a68db7706310b87b0176b67652bbe",class:"weekdays","aria-hidden":"true"},b.map((e=>{const i=r==="small"?e.charAt(0):e;return t("div",{class:"calendar-day-header"},t("ic-typography",{variant:"caption"},i))}))),t("div",{key:"57ceb661dd3a493e49f7eea698c04125d81460d6",class:"calendar-days-container"},this.currMonthView.map((e=>{var i;return t(x,{day:e,disableDay:(i=this.disableDays)===null||i===void 0?void 0:i.includes(Number(e.getDay())),today:c(e,this.today),selected:c(e,this.selectedDate),focussed:c(e,this.focussedDate),inRange:n(e,T,y),monthInView:d,onSelectDay:this.handleSelectDay,focussedDayRef:this.setFocussedDayEl,onFocusDay:this.onDayButtonFocusHandler,onBlurDay:this.onDayButtonBlurHandler,showDaysOutsideMonth:this.showDaysOutsideMonth})})))),t("div",{key:"da06f9d055aa5e45a05e56171122ae63be7fc129",class:{"month-picker-container":true,hidden:!u}},u&&t(D,{key:"af37ea4853db314da047c8d8156564897898cf5f",size:r,onSelectMonth:this.handleSelectMonth,monthInView:d,focussedMonth:h,onKeyDown:this.monthPickerKeyDownHandler,focussedMonthRef:this.setFocussedMonthEl,minDate:m,maxDate:y,yearInView:l})),t("div",{key:"8d57c717c9e693ea67b41d08a990a898adeec130",class:{"year-picker-container":true,hidden:!f}},f&&t(z,{key:"71b214123bd08a4808f25eae9e3e90ad82d56460",decadeView:p,size:r,focussedYear:o,onSelectYear:this.handleSelectYear,onKeyDown:this.yearPickerKeyDownHandler,onFocusYear:this.onYearButtonFocusHandler,onBlurYear:this.onYearButtonBlurHandler,yearInView:l,minDate:m,maxDate:y,focussedYearRef:this.setFocussedYearEl})),t("div",{key:"9d6cd8b19f7adf76c8f5249e985cdcdb8dd1f0ca",class:{"bottom-buttons":true,"no-today":!k}},k&&t("ic-button",{key:"75ab2fd1ce1d41d805e4082fe5d8e215782b59b4",id:"today-button",variant:"tertiary",ref:t=>this.todayButtonEl=t,size:r,"aria-label":"Navigate to current date",onClick:this.todayButtonClickHandler,onKeyDown:this.todayButtonKeyDownHandler,disabled:this.isCurrentMonth()},"Go to today"),w&&t("ic-button",{key:"5a60dca9237999a2ecbaaad8c254527178bfc94c",id:"clear-button","aria-label":"clear selected date",ref:t=>this.clearButtonEl=t,variant:"tertiary",size:r,onClick:this.clearButtonClickHandler,onKeyDown:this.clearButtonKeyDownHandler,disabled:this.value===""||this.value===null||this.value===undefined},"Clear")))))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],disableFuture:["watchDisableFutureHandler"],disablePast:["watchDisablePastHandler"],max:["watchMaxHandler"],min:["watchMinHandler"],startOfWeek:["watchStartOfWeekHandler"],calendarOpen:["watchOpenHandler"],focussedDate:["watchFocussedDateHandler"],monthInView:["watchMonthInViewHandler"],yearInView:["watchYearInViewHandler"],yearPickerVisible:["watchYearPickerVisibleHandler"],monthPickerVisible:["watchMonthPickerVisibleHandler"],focussedDayEl:["watchFocussedDayEl"]}}};A.style=M;export{A as ic_date_picker};
|
2
|
-
//# sourceMappingURL=p-b9369ce5.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["DayButton","focussed","today","day","monthInView","onFocusDay","onBlurDay","onSelectDay","selected","focussedDayRef","inRange","showDaysOutsideMonth","disableDay","handleDayClick","handleDayFocus","handleDayBlur","dayNames","stringEnumToArray","IcDayNames","months","IcDateInputMonths","outsideRange","outsideMonth","getMonth","disabled","h","class","hidden","tabIndex","undefined","getDay","getDate","getFullYear","onClick","onBlur","onFocus","ref","el","variant","italic","MonthPicker","size","focussedMonth","onSelectMonth","onKeyDown","focussedMonthRef","minDate","maxDate","yearInView","handleMonthClick","ev","button","target","Number","getAttribute","monthNames","role","map","month","index","current","dateInRange","Date","getMonthStart","getMonthEnd","YearPicker","decadeView","focussedYear","onSelectYear","onFocusYear","onBlurYear","focussedYearRef","handleYearClick","handleYearFocus","handleYearBlur","navButtonMouseDownHandler","preventDefault","prevDecade","nextDecade","years","slice","id","yearInRange","onMouseDown","slot","width","height","fill","xmlns","d","yr","flip","icDatePickerCss","IcDatePickerStyle0","DEFAULT_DATE_FORMAT","DEFAULT_DISABLE_DATES_FROM_NOW_MSG","DEFAULT_DISABLE_DATES_UNTIL_NOW_MSG","DEFAULT_DISABLE_DAYS_MSG","FOCUS_TIMER","PICKER_HEIGHT_SMALL","PICKER_HEIGHT_DEFAULT","PICKER_HEIGHT_LARGE","DatePicker","constructor","hostRef","this","clearButtonEl","daysOfWeek","dayButtonFocussed","dayPickerKeyboardNav","dialogDescription","focusDay","liveRegionEl","monthInViewUpdateHandled","myCalendarButtonClicked","showPickerAbove","todayButtonEl","yearButtonFocussed","calendarOpen","currMonthView","currYearPickerView","focussedDate","monthPickerVisible","orderedDaysOfWeek","selectedDate","yearPickerVisible","dateFormat","emitDatePartChange","disableDays","disableDaysMessage","disableFuture","disableFutureMessage","disablePast","disablePastMessage","hideHelperText","hideLabel","invalidDateMessage","max","min","openAtDate","required","showPickerClearButton","showPickerTodayButton","startOfWeek","IcWeekDays","Monday","theme","validationStatus","validationText","value","setDecadeView","start","currYear","decadeArr","push","decadeStart","decadeEnd","setSelectedDate","emit","dateMatches","_a","inputEl","triggerIcChange","handleCalendarMouseDown","event","tagName","handleCalendarClick","clearDialogDescription","stopImmediatePropagation","handleDocumentClick","keyDownHandler","key","closeButtonClickHandler","setCalendarFocus","focusFirstElement","monthButtonEl","setFocus","focusLastElement","focussedMonthEl","focussedYearEl","focussedDayEl","focus","focusFocussedDay","monthButtonClickHandler","setAriaLiveRegionText","setMonthSelectedLiveRegionText","yearButtonClickHandler","getDecadeInViewText","setYearSelectedLiveRegionText","todayButtonClickHandler","setFocussedDate","getMonthInViewText","setTimeout","todayButtonKeyDownHandler","shiftKey","clearButtonClickHandler","text","innerText","clearButtonKeyDownHandler","goToPreviousMonth","moveMonths","goToNextMonth","goToPreviousYear","isPrevYearAllowed","moveYears","goToNextYear","isNextYearAllowed","renderMonthYearNavButton","buttonSize","disableTooltip","monthYearNavClickHandler","innerHTML","chevron","previousMonthButton","yearMatch","nextMonthButton","previousYearButton","nextYearButton","isYearAllowed","getMonthView","date","getWeekStart","end","getWeekEnd","days","setDate","isCurrentMonth","updateMonthInView","focussedDay","handleSelectDay","handleSelectMonth","handleSelectYear","year","yrPos","indexOf","length","monthName","yearButtonEl","updateFocussedYear","monthPickerKeyDownHandler","handled","updateFocussedMonth","calendarTabHandler","yearPickerKeyDownHandler","onYearButtonFocusHandler","onYearButtonBlurHandler","monthButtonKeyDownHandler","yearButtonKeyDownHandler","handleCalendarKeyDown","moveDays","getNextDayToFocus","onDayButtonFocusHandler","onDayButtonBlurHandler","currDay","forward","level","move","nextDay","includes","numDays","numMonths","newMonth","setMonth","newDate","clampDate","numYears","newYear","setFullYear","adjust","focusYear","setFocussedYear","setFocussedDayEl","element","setFocussedMonthEl","setFocussedYearEl","prevYear","newDecade","Math","floor","oldDecade","setDateInputProps","inputProps","label","showClearButton","showCalendarButton","helperText","inputId","name","watchDisabledHandler","removeDisabledFalse","watchDisableFutureHandler","watchMaxHandler","watchDisablePastHandler","watchMinHandler","createDate","watchStartOfWeekHandler","concat","watchOpenHandler","pickerHeight","offsetTop","offsetHeight","window","innerHeight","openAt","dialogDesc","document","addEventListener","removeEventListener","watchFocussedDateHandler","previous","watchMonthInViewHandler","watchYearInViewHandler","watchYearPickerVisibleHandler","watchMonthPickerVisibleHandler","watchFocussedDayEl","componentWillLoad","onComponentRequiredPropUndefined","prop","propName","IcShortDayNames","componentWillRender","dateInputProps","componentWillUpdate","localCalendarButtonClickHandler","detail","calendarButtonClickHandler","render","monthButtonText","yearButtonText","dialogLabel","monthLabel","yearLabel","minDay","yesterday","Host","Object","assign","above","calendar","dayName","header","charAt"],"sources":["src/components/ic-date-picker/ic-day-button.tsx","src/components/ic-date-picker/ic-month-picker.tsx","src/components/ic-date-picker/ic-year-picker.tsx","src/components/ic-date-picker/ic-date-picker.css?tag=ic-date-picker&encapsulation=shadow","src/components/ic-date-picker/ic-date-picker.tsx"],"sourcesContent":["import { h, FunctionalComponent } from \"@stencil/core\";\nimport { stringEnumToArray } from \"../../utils/helpers\";\nimport { IcDayNames, IcDateInputMonths } from \"../../utils/types\";\n\nexport type DayButtonProps = {\n focussed: boolean;\n today: boolean;\n day: Date;\n monthInView: number;\n onFocusDay: () => void;\n onBlurDay: () => void;\n onSelectDay: (day: Date) => void;\n selected: boolean;\n focussedDayRef?: (element: HTMLButtonElement) => void;\n inRange: boolean;\n showDaysOutsideMonth?: boolean;\n disableDay?: boolean;\n};\n\nexport const DayButton: FunctionalComponent<DayButtonProps> = ({\n focussed,\n today,\n day,\n monthInView,\n onFocusDay,\n onBlurDay,\n onSelectDay,\n selected,\n focussedDayRef,\n inRange,\n showDaysOutsideMonth,\n disableDay,\n}) => {\n const handleDayClick = (): void => {\n onSelectDay(day);\n };\n\n const handleDayFocus = (): void => {\n onFocusDay();\n };\n\n const handleDayBlur = (): void => {\n onBlurDay();\n };\n\n const dayNames = stringEnumToArray(IcDayNames);\n const months = stringEnumToArray(IcDateInputMonths);\n const outsideRange = !inRange || disableDay;\n const outsideMonth = monthInView !== day.getMonth();\n const disabled = outsideRange || (outsideMonth && !showDaysOutsideMonth);\n\n return (\n <div class=\"day-button-container\">\n <button\n class={{\n \"day-button\": true,\n \"outside-month\": outsideMonth,\n \"outside-range\": !!outsideRange,\n hidden: outsideMonth && !showDaysOutsideMonth,\n disabled: disabled,\n today: today,\n selected: selected,\n focussed: focussed,\n }}\n tabIndex={focussed ? 0 : -1}\n aria-hidden={outsideMonth ? \"true\" : \"false\"}\n aria-disabled={disabled ? \"true\" : \"false\"}\n aria-current={today ? \"date\" : undefined}\n aria-label={\n disabled || outsideMonth || outsideRange\n ? undefined\n : `Choose ${dayNames[day.getDay()]}, ${day.getDate()} ${\n months[day.getMonth()]\n } ${day.getFullYear()}`\n }\n disabled={disabled}\n onClick={handleDayClick}\n onBlur={handleDayBlur}\n onFocus={handleDayFocus}\n ref={(el) => {\n if (focussed && el && focussedDayRef) {\n focussedDayRef(el);\n }\n }}\n >\n {(!outsideMonth || (outsideMonth && showDaysOutsideMonth)) && (\n <ic-typography variant=\"subtitle-small\" italic={outsideMonth}>\n {day.getDate()}\n </ic-typography>\n )}\n </button>\n </div>\n );\n};\n","import { h, FunctionalComponent } from \"@stencil/core\";\nimport {\n dateInRange,\n getMonthStart,\n getMonthEnd,\n} from \"../../utils/date-helpers\";\nimport { stringEnumToArray } from \"../../utils/helpers\";\nimport { IcSizes, IcDateInputMonths } from \"../../utils/types\";\n\nexport type MonthPickerProps = {\n focussedMonth: number;\n monthInView: number;\n yearInView: number;\n onSelectMonth: (month: number) => void;\n onKeyDown: (ev: KeyboardEvent) => void;\n focussedMonthRef: (element: HTMLIcButtonElement) => void;\n minDate: Date | null;\n maxDate: Date | null;\n size?: IcSizes;\n};\n\nexport const MonthPicker: FunctionalComponent<MonthPickerProps> = ({\n size,\n focussedMonth,\n monthInView,\n onSelectMonth,\n onKeyDown,\n focussedMonthRef,\n minDate,\n maxDate,\n yearInView,\n}) => {\n const handleMonthClick = (ev: MouseEvent): void => {\n const button = ev.target as HTMLElement;\n onSelectMonth(Number(button.getAttribute(\"data-month\")));\n };\n\n const monthNames = stringEnumToArray(IcDateInputMonths);\n\n return (\n <div\n class={{\n \"month-picker\": true,\n }}\n role=\"list\"\n >\n {monthNames.map((month, index) => {\n const current = monthInView === index;\n const focussed = focussedMonth === index;\n const outsideRange = !dateInRange(\n new Date(yearInView, index, 1),\n minDate ? getMonthStart(minDate) : null,\n maxDate ? getMonthEnd(maxDate) : null\n );\n\n return (\n <ic-button\n role=\"listitem\"\n class={{\n \"month-button\": true,\n selected: current,\n focussed: focussed,\n disabled: outsideRange,\n }}\n full-width\n disabled={outsideRange}\n variant={current ? \"primary\" : \"tertiary\"}\n data-month={index}\n size={size}\n tabIndex={focussed ? 0 : -1}\n aria-current={current ? \"true\" : \"false\"}\n aria-label={current ? \"\" : `select ${month}`}\n onClick={handleMonthClick}\n onKeyDown={onKeyDown}\n ref={(el?: HTMLIcButtonElement) => {\n if (focussed && el) {\n focussedMonthRef(el);\n }\n }}\n >\n {month}\n </ic-button>\n );\n })}\n </div>\n );\n};\n","import { h, FunctionalComponent } from \"@stencil/core\";\nimport { yearInRange } from \"../../utils/date-helpers\";\nimport { IcSizes } from \"../../utils/types\";\n\nexport type YearPickerProps = {\n decadeView: number[];\n focussedYear: number;\n yearInView: number;\n onSelectYear: (year: number) => void;\n onKeyDown: (ev: KeyboardEvent) => void;\n onFocusYear: () => void;\n onBlurYear: () => void;\n minDate: Date | null;\n maxDate: Date | null;\n focussedYearRef: (element: HTMLIcButtonElement) => void;\n size?: IcSizes;\n};\n\nexport const YearPicker: FunctionalComponent<YearPickerProps> = ({\n decadeView,\n size,\n focussedYear,\n yearInView,\n onSelectYear,\n onFocusYear,\n onBlurYear,\n onKeyDown,\n minDate,\n maxDate,\n focussedYearRef,\n}) => {\n const handleYearClick = (ev: MouseEvent): void => {\n const button = ev.target as HTMLElement;\n onSelectYear(Number(button.getAttribute(\"data-year\")));\n };\n\n const handleYearFocus = (): void => {\n onFocusYear();\n };\n\n const handleYearBlur = (): void => {\n onBlurYear();\n };\n\n const navButtonMouseDownHandler = (ev: MouseEvent): void => {\n ev.preventDefault();\n };\n\n const prevDecade = decadeView[0];\n const nextDecade = decadeView[11];\n const years = decadeView.slice(1, 11);\n\n return (\n <div class=\"year-picker\" role=\"list\">\n <div class=\"prev-decade\" aria-hidden=\"true\">\n <ic-button\n id=\"prev-decade-button\"\n class={{\n \"year-button\": true,\n }}\n disabled={!yearInRange(prevDecade, minDate, maxDate)}\n data-year={prevDecade}\n tabIndex={-1}\n variant=\"tertiary\"\n onClick={handleYearClick}\n onMouseDown={navButtonMouseDownHandler}\n aria-hidden=\"true\"\n size={size}\n >\n {`${prevDecade - 9}s`}\n <svg\n slot=\"left-icon\"\n width=\"12\"\n height=\"12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-button>\n </div>\n {years.map((yr) => {\n const current = yearInView === yr;\n const focussed = focussedYear === yr;\n return (\n <ic-button\n class={{\n \"year-button\": true,\n selected: current,\n focussed: focussed,\n }}\n disabled={!yearInRange(yr, minDate, maxDate)}\n data-year={yr}\n tabIndex={focussed ? 0 : -1}\n variant={current ? \"primary\" : \"tertiary\"}\n onClick={handleYearClick}\n aria-label={current ? \"\" : `select ${yr}`}\n role=\"listitem\"\n aria-current={current ? \"true\" : \"false\"}\n onKeyDown={onKeyDown}\n onFocus={handleYearFocus}\n onBlur={handleYearBlur}\n size={size}\n ref={(el: HTMLIcButtonElement) => {\n if (focussed && el) {\n focussedYearRef(el);\n }\n }}\n >\n {yr}\n </ic-button>\n );\n })}\n <div class=\"next-decade\" aria-hidden=\"true\">\n <ic-button\n id=\"next-decade-button\"\n class={{\n \"year-button\": true,\n flip: true,\n }}\n disabled={!yearInRange(nextDecade, minDate, maxDate)}\n data-year={nextDecade}\n tabIndex={-1}\n variant=\"tertiary\"\n onClick={handleYearClick}\n onMouseDown={navButtonMouseDownHandler}\n aria-hidden=\"true\"\n size={size}\n >\n {`${nextDecade}s`}\n <svg\n slot=\"right-icon\"\n width=\"12\"\n height=\"12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-button>\n </div>\n </div>\n );\n};\n","@import \"../../global/normalize.css\";\n\n/**\n* @prop --input-width: Width of the input field\n @prop --ic-z-index-date-picker: z-index of date picker.\n*/\n\n:host {\n display: block;\n position: relative;\n\n --month-year-picker-button-width: 5rem;\n --month-button-width: 5.5rem;\n --input-field-width: var(--input-width, 19.125rem);\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n}\n\n:host(.ic-date-picker-large) {\n --month-button-width: 6.3125rem;\n --input-field-width: var(--input-width, 21.125rem);\n}\n\n:host(.ic-date-picker-small) {\n --month-button-width: 6.25rem;\n --input-field-width: var(--input-width, 17.125rem);\n}\n\n:host .date-input-container {\n position: relative;\n}\n\nic-date-input {\n --input-width: var(--input-field-width);\n}\n\n:host .calendar-container {\n min-width: 19rem;\n max-width: 23.5rem;\n width: var(--input-width);\n display: flex;\n flex-direction: column;\n gap: var(--ic-space-xs);\n position: absolute;\n border: var(--ic-border-default);\n border-color: var(--ic-date-picker-calendar-border);\n border-radius: var(--ic-border-radius);\n align-items: center;\n background-color: var(--ic-date-picker-calendar-bg);\n z-index: var(--ic-z-index-date-picker);\n box-sizing: border-box;\n box-shadow: var(--ic-date-picker-calendar-elevation);\n margin-top: var(--ic-space-xxxs);\n padding: var(--ic-space-xs);\n animation: fade-in-calendar var(--ic-transition-duration-slow);\n}\n\n:host(.ic-date-picker-small) .calendar-container {\n min-width: 17rem;\n max-width: 21.5rem;\n}\n\n:host(.ic-date-picker-large) .calendar-container {\n min-width: 21rem;\n max-width: 25.5rem;\n}\n\n:host .calendar-container.above {\n bottom: calc(var(--ic-space-xxl) - var(--ic-space-xxs));\n}\n\n:host .month-year-nav-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n align-self: stretch;\n}\n\n:host .month-year-nav-container.hidden {\n display: none;\n}\n\n:host .month-year-nav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex: 1 0 0;\n}\n\n:host .month-picker,\n:host .year-picker {\n flex-wrap: wrap;\n display: inline-flex;\n align-items: center;\n width: 17.5rem;\n column-gap: var(--ic-space-xs);\n row-gap: var(--ic-space-xxs);\n}\n\n:host(.ic-date-picker-small) .month-picker,\n:host(.ic-date-picker-small) .year-picker {\n width: 13.125rem;\n}\n\n:host(.ic-date-picker-large) .month-picker,\n:host(.ic-date-picker-large) .year-picker {\n width: 20rem;\n}\n\n:host .month-picker-button,\n:host .year-picker-button {\n width: 5rem;\n\n --min-width: 5rem;\n}\n\n:host .month-button,\n:host .year-button {\n width: var(--month-button-width);\n}\n\n:host .month-button.focussed,\n:host .year-button.focussed {\n z-index: 1;\n}\n\n:host .month-button::part(button),\n:host .year-button::part(button) {\n min-width: var(--month-button-width);\n}\n\n:host .prev-decade .year-button svg {\n margin-right: calc(-1 * var(--ic-space-xl));\n padding-top: var(--ic-space-sm);\n}\n\n:host .prev-decade .year-button::part(button) {\n padding-left: 0;\n padding-right: var(--ic-space-lg);\n}\n\n:host(.ic-date-picker-small) .prev-decade .year-button::part(button) {\n padding-left: 0;\n padding-right: calc(var(--ic-space-lg) + var(--ic-space-xxs));\n}\n\n:host .next-decade .year-button svg {\n margin-left: calc(-1 * var(--ic-space-xl));\n padding-top: var(--ic-space-sm);\n}\n\n:host .next-decade .year-button::part(button) {\n padding-right: 0;\n padding-left: var(--ic-space-lg);\n}\n\n:host(.ic-date-picker-small) .next-decade .year-button::part(button),\n:host(.ic-date-picker-large) .next-decade .year-button::part(button) {\n padding-left: var(--ic-space-xl);\n}\n\n:host .bottom-buttons {\n padding-top: var(--ic-space-xs);\n display: flex;\n justify-content: space-between;\n align-items: center;\n align-self: stretch;\n animation: fade-in-buttons var(--ic-transition-duration-slow);\n}\n\n:host(.ic-date-picker-small) .bottom-buttons {\n padding-top: var(--ic-space-xxs);\n}\n\n:host .bottom-buttons.no-today {\n align-items: flex-end;\n flex-direction: column;\n}\n\n:host .bottom-buttons.hidden {\n display: none;\n}\n\n:host .calendar {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n width: 15.75rem;\n animation: fade-in-buttons var(--ic-transition-duration-slow);\n}\n\n:host(.ic-date-picker-large) .calendar {\n width: 19.25rem;\n}\n\n:host(.ic-date-picker-small) .calendar {\n padding-bottom: var(--ic-space-xxs);\n width: 14rem;\n}\n\n:host .hidden {\n display: none;\n}\n\n:host .weekdays {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding-bottom: var(--ic-space-xs);\n align-self: stretch;\n}\n\n:host .calendar-days-container {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n row-gap: var(--ic-space-xs);\n padding: var(--ic-space-xxs) 0;\n}\n\n:host(.ic-date-picker-small) .calendar-days-container {\n padding: var(--ic-space-xxxs) 0;\n}\n\n:host(.ic-date-picker-large) .calendar-days-container {\n padding: var(--ic-space-xs) 0;\n}\n\n:host .calendar-day-header {\n display: flex;\n width: 2rem;\n padding: var(--ic-space-xxs) 0;\n justify-content: center;\n align-items: center;\n}\n\n:host(.ic-date-picker-small) .calendar-day-header,\n:host(.ic-date-picker-large) .calendar-day-header {\n padding: var(--ic-space-xxs);\n}\n\n:host .calendar-day-header ic-typography {\n --ic-typography-color: var(--ic-date-picker-calendar-label);\n\n text-align: center;\n}\n\n:host .day-button-container {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2.25rem;\n height: 2.25rem;\n}\n\n:host(.ic-date-picker-small) .day-button-container {\n width: 2rem;\n height: 2rem;\n}\n\n:host(.ic-date-picker-large) .day-button-container {\n width: 2.5rem;\n height: 2.5rem;\n}\n\n:host .day-button {\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n border: 0;\n border-radius: 2rem;\n background-color: var(--ic-date-picker-calendar-bg);\n width: 2rem;\n height: 2rem;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n z-index: 0;\n}\n\n:host .day-button.disabled {\n cursor: default;\n}\n\n:host(.ic-date-picker-large) .day-button {\n width: 2.25rem;\n height: 2.25rem;\n}\n\n:host(.ic-date-picker-small) .day-button {\n width: 1.75rem;\n height: 1.75rem;\n}\n\n:host .day-button ic-typography {\n width: 1.75rem;\n\n --ic-typography-color: var(--ic-date-picker-date-label-default);\n}\n\n:host .day-button.outside-range ic-typography {\n --ic-typography-color: var(--ic-date-picker-date-label-disabled);\n}\n\n:host .day-button.outside-month ic-typography {\n font-weight: var(--ic-font-weight-regular) !important;\n}\n\n:host\n .day-button.outside-month:not(.outside-range):not(.selected)\n ic-typography {\n --ic-typography-color: var(--ic-date-picker-date-label-default);\n}\n\n:host .day-button:hover:not(.disabled) {\n background-color: var(--ic-date-picker-date-default-bg-hover);\n}\n\n:host .day-button:active:not(.disabled) {\n background-color: var(--ic-date-picker-date-default-bg-pressed);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host .day-button:hover:not(.disabled):not(.focussed),\n :host .day-button:active:not(.disabled):not(.focussed) {\n transition: background-color var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host .day-button.selected:not(.hidden) {\n background-color: var(--ic-date-picker-date-active-bg-default);\n}\n\n:host .day-button.selected ic-typography {\n --ic-typography-color: var(--ic-date-picker-date-label-selected);\n}\n\n:host .day-button.selected:not(.hidden):hover {\n background-color: var(--ic-date-picker-date-active-bg-hover);\n}\n\n:host .day-button.selected:not(.hidden):active {\n background-color: var(--ic-date-picker-date-active-bg-pressed);\n}\n\n:host .day-button.focussed {\n z-index: 1;\n}\n\n:host .day-button:focus {\n outline: none;\n}\n\n:host .day-button.focussed:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n:host .day-button.today:not(.hidden)::after {\n content: \"\";\n position: absolute;\n width: 0.875rem;\n height: 0.125rem;\n bottom: 0.4rem;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-date-picker-default-underline);\n}\n\n:host(.ic-date-picker-small) .day-button.today::after {\n bottom: 0.35rem;\n}\n\n:host(.ic-date-picker-large) .day-button.today::after {\n width: 1rem;\n}\n\n:host .day-button.today.selected::after {\n background-color: var(--ic-date-picker-selected-underline);\n}\n\n:host #select-month-hint,\n:host #select-year-hint {\n display: none;\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host .calendar-container,\n :host .calendar,\n :host .bottom-buttons {\n animation: none;\n }\n}\n\n@keyframes fade-in-buttons {\n 0% {\n opacity: 0;\n }\n\n 50% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes fade-in-calendar {\n 0% {\n display: flex;\n max-height: 0;\n }\n\n 100% {\n display: flex;\n max-height: 600px;\n }\n}\n\n@media (forced-colors: active) {\n :host .day-button.today:not(.hidden)::after {\n background-color: highlight;\n }\n\n :host .day-button.selected:not(.hidden) {\n background-color: highlight;\n }\n\n :host .day-button.focussed:focus {\n border: var(--ic-border-hc);\n }\n\n :host .month-button.selected::part(button),\n :host .year-button.selected::part(button) {\n background-color: highlight;\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n createDate,\n clampDate,\n dateMatches,\n dateInRange,\n getMonthStart,\n getMonthEnd,\n getWeekEnd,\n getWeekStart,\n yearInRange,\n} from \"../../utils/date-helpers\";\nimport {\n stringEnumToArray,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport {\n IcWeekDays,\n IcShortDayNames,\n IcDateInputMonths,\n IcDateFormat,\n IcSizes,\n IcInformationStatusOrEmpty,\n IcThemeMode,\n} from \"../../utils/types\";\nimport chevron from \"../../assets/chevron-icon.svg\";\nimport { DayButton } from \"./ic-day-button\";\nimport { MonthPicker } from \"./ic-month-picker\";\nimport { YearPicker } from \"./ic-year-picker\";\n\nconst DEFAULT_DATE_FORMAT = \"DD/MM/YYYY\";\nconst DEFAULT_DISABLE_DATES_FROM_NOW_MSG =\n \"Dates in the future are not allowed. Please select a date in the past.\";\nconst DEFAULT_DISABLE_DATES_UNTIL_NOW_MSG =\n \"Dates in the past are not allowed. Please select a date in the future.\";\nconst DEFAULT_DISABLE_DAYS_MSG =\n \"The date you have selected is on a day of the week that is not allowed. Please select another date.\";\nconst FOCUS_TIMER = 100;\nconst PICKER_HEIGHT_SMALL = 360;\nconst PICKER_HEIGHT_DEFAULT = 400;\nconst PICKER_HEIGHT_LARGE = 440;\n\ninterface IcDateInputProps {\n dateFormat?: IcDateFormat;\n disabled?: boolean;\n disableDays?: IcWeekDays[];\n disableDaysMessage?: string;\n disableFuture?: boolean;\n disableFutureMessage?: string;\n disablePast?: boolean;\n disablePastMessage?: string;\n emitDatePartChange?: boolean;\n helperText?: string;\n hideHelperText?: boolean;\n hideLabel?: boolean;\n inputId?: string;\n invalidDateMessage?: string;\n label: string;\n max?: string | Date;\n min?: string | Date;\n name?: string;\n required?: boolean;\n showClearButton?: boolean;\n showCalendarButton?: boolean;\n size?: IcSizes;\n value?: string | Date | null;\n validationStatus?: IcInformationStatusOrEmpty;\n validationText?: string;\n}\n\n/**\n * @slot helper-text - Content is set as the helper text for the date picker.\n */\n@Component({\n tag: \"ic-date-picker\",\n styleUrl: \"ic-date-picker.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class DatePicker {\n private inputEl?: HTMLIcDateInputElement;\n private clearButtonEl: HTMLIcButtonElement | null = null;\n private dateInputProps: IcDateInputProps;\n private daysOfWeek: string[] = [];\n private dayButtonFocussed: boolean = false;\n private dayPickerKeyboardNav: boolean = false;\n private decadeStart: number;\n private decadeEnd: number;\n private dialogDescription: string = \"\";\n private focusDay: boolean = true;\n private focussedYearEl: HTMLIcButtonElement;\n private liveRegionEl?: HTMLElement = undefined;\n private monthButtonEl: HTMLIcButtonElement;\n private monthNames: string[] = [];\n private monthInViewUpdateHandled: boolean = false;\n private myCalendarButtonClicked: boolean = false;\n private showPickerAbove: boolean = false;\n private today = new Date();\n private todayButtonEl: HTMLIcButtonElement | null = null;\n private yearButtonEl: HTMLIcButtonElement;\n private yearButtonFocussed: boolean = false;\n\n @Element() el: HTMLIcDatePickerElement;\n\n @State() calendarOpen: boolean = false;\n @State() currMonthView: Date[] = [];\n @State() currYearPickerView: number[] = [];\n @State() decadeView: number[] = [];\n @State() focussedDate: Date | null = null;\n @State() focussedDay: number;\n @State() focussedDayEl: HTMLButtonElement;\n @State() focussedMonth: number;\n @State() focussedMonthEl: HTMLIcButtonElement;\n @State() focussedYear: number;\n @State() maxDate: Date | null = null;\n @State() minDate: Date | null = null;\n @State() monthInView: number;\n @State() monthPickerVisible: boolean = false;\n @State() orderedDaysOfWeek: string[] = [];\n @State() selectedDate: Date | null = null;\n @State() yearInView: number;\n @State() yearPickerVisible: boolean = false;\n\n /**\n * The format in which the date will be displayed.\n */\n @Prop() dateFormat: IcDateFormat = \"DD/MM/YYYY\";\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 * If `true`, every individual input field completed will emit an icChange event.\n */\n @Prop() emitDatePartChange?: boolean = false;\n\n /**\n * The days of the week to disable.\n */\n @Prop() disableDays?: IcWeekDays[] = [];\n\n /**\n * The text to display as the validation message when `disableDays` is `true` and a disabled date is entered.\n */\n @Prop() disableDaysMessage?: string =\n \"The date you have selected is on a day of the week that is not allowed. Please select another date.\";\n\n /**\n * If `true`, dates in the future are not allowed. A validation message will appear if a date in the future is entered.\n */\n @Prop() disableFuture?: boolean = false;\n\n @Watch(\"disableFuture\")\n watchDisableFutureHandler(): void {\n this.watchMaxHandler();\n }\n\n /**\n * The text to display as the validation message when `disableFuture` is `true` and a date in the future is entered.\n */\n @Prop() disableFutureMessage?: string =\n \"Dates in the future are not allowed. Please select a date in the past.\";\n\n /**\n * If `true`, dates in the past are not allowed. A validation message will appear if a date in the past is entered.\n */\n @Prop() disablePast?: boolean = false;\n\n @Watch(\"disablePast\")\n watchDisablePastHandler(): void {\n this.watchMinHandler();\n }\n\n /**\n * The text to display as the validation message when `disablePast` is `true` and a date in the past is entered.\n */\n @Prop() disablePastMessage?: string =\n \"Dates in the past are not allowed. Please select a date in the future.\";\n\n /**\n * The helper text that will be displayed for additional field guidance. This will default to the text \"Use format\" along with the `dateFormat` value.\n */\n @Prop() helperText?: string;\n\n /**\n * If `true`, the helper text will be visually hidden, but still read out by screenreaders.\n */\n @Prop() hideHelperText: boolean = false;\n\n /**\n * If `true`, the label will be visually hidden, but the required label will still be read out by screen readers.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The ID for the input field. The default will be an automatically generated value.\n */\n @Prop() inputId?: string;\n\n /**\n * The text to display as the validation message when an invalid date is entered.\n */\n @Prop() invalidDateMessage?: string = \"Please enter a valid date.\";\n\n /**\n * The label for the date input.\n */\n @Prop() label!: string;\n\n /**\n * The latest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.\n * The value of this prop is ignored if `disableFuture` is set to `true`.\n */\n @Prop() max: string | Date = \"\";\n @Watch(\"max\")\n watchMaxHandler(): void {\n if (this.disableFuture) {\n this.maxDate = new Date();\n } else {\n this.maxDate = createDate(this.max, this.dateFormat);\n }\n }\n\n /**\n * The earliest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.\n * The value of this prop is ignored if `disablePast` is set to `true`.\n */\n @Prop() min: string | Date = \"\";\n @Watch(\"min\")\n watchMinHandler(): void {\n if (this.disablePast) {\n this.minDate = new Date();\n } else {\n this.minDate = createDate(this.min, this.dateFormat);\n }\n }\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string;\n\n /**\n * The date visible when the calendar opens. Used if no date is currently selected.\n * The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.\n */\n @Prop() openAtDate: string | Date = \"\";\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required?: boolean = false;\n\n /**\n * If `true`, days outside the current month will be visible in the date picker.\n */\n @Prop() showDaysOutsideMonth?: boolean = true;\n\n /**\n * If `true`, the `Clear` button on the date picker will be visible.\n */\n @Prop() showPickerClearButton?: boolean = true;\n\n /**\n * If `true`, the `Go to today` button on the date picker will be visible.\n */\n @Prop() showPickerTodayButton?: boolean = true;\n\n /**\n * The size of the date picker to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The first day of the week. `0` for Sunday, `1` for Monday, etc.\n * Default is Monday.\n */\n @Prop() startOfWeek: IcWeekDays = IcWeekDays.Monday;\n\n @Watch(\"startOfWeek\")\n watchStartOfWeekHandler(): void {\n this.orderedDaysOfWeek = this.daysOfWeek\n .slice(this.startOfWeek)\n .concat(this.daysOfWeek.slice(0, this.startOfWeek));\n if (this.calendarOpen) {\n this.updateMonthInView();\n }\n }\n\n /**\n * Sets the date picker to the dark or light theme colors. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in date validation.\n */\n @Prop() validationStatus?: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message. This will override the built-in date validation.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * The value of the date picker. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object.\n */\n @Prop({ mutable: true }) value?: string | Date | null | undefined = \"\";\n\n @Watch(\"calendarOpen\")\n watchOpenHandler(): void {\n if (this.calendarOpen) {\n if (this.inputEl) {\n let pickerHeight = PICKER_HEIGHT_DEFAULT;\n if (this.size === \"small\") {\n pickerHeight = PICKER_HEIGHT_SMALL;\n } else if (this.size === \"large\") {\n pickerHeight = PICKER_HEIGHT_LARGE;\n }\n if (\n this.el.offsetTop + this.inputEl.offsetHeight + pickerHeight >\n window.innerHeight &&\n this.el.offsetTop > pickerHeight\n ) {\n this.showPickerAbove = true;\n } else {\n this.showPickerAbove = false;\n }\n }\n if (\n this.selectedDate === null ||\n !dateInRange(this.selectedDate, this.minDate, this.maxDate)\n ) {\n let openAt = new Date();\n if (this.openAtDate !== \"\") {\n openAt = createDate(this.openAtDate, this.dateFormat);\n }\n this.setFocussedDate(openAt);\n } else {\n this.setFocussedDate(this.selectedDate);\n }\n let dialogDesc = this.getMonthInViewText();\n if (this.selectedDate === null) {\n dialogDesc += \" No date selected.\";\n }\n dialogDesc +=\n \" Use arrow keys to change day. Press enter or space to select a date or press escape to close the picker\";\n this.dialogDescription = dialogDesc;\n setTimeout(() => this.focusFocussedDay(), FOCUS_TIMER);\n document.addEventListener(\"click\", this.handleDocumentClick);\n } else {\n document.removeEventListener(\"click\", this.handleDocumentClick);\n this.monthPickerVisible = false;\n this.yearPickerVisible = false;\n }\n }\n\n @Watch(\"focussedDate\")\n watchFocussedDateHandler(current: Date, previous: Date): void {\n if (\n previous === null ||\n !(\n previous.getFullYear() === current.getFullYear() &&\n previous.getMonth() === current.getMonth()\n )\n ) {\n this.updateMonthInView();\n }\n }\n\n @Watch(\"monthInView\")\n watchMonthInViewHandler(): void {\n this.focussedMonth = this.monthInView;\n }\n\n @Watch(\"yearInView\")\n watchYearInViewHandler(): void {\n this.setFocussedYear(this.yearInView, false);\n }\n\n @Watch(\"yearPickerVisible\")\n watchYearPickerVisibleHandler(): void {\n if (!this.yearPickerVisible) {\n this.setFocussedYear(this.yearInView);\n }\n }\n\n @Watch(\"monthPickerVisible\")\n watchMonthPickerVisibleHandler(): void {\n if (!this.monthPickerVisible) {\n this.focussedMonth = this.monthInView;\n }\n }\n\n @Watch(\"focussedDayEl\")\n watchFocussedDayEl(): void {\n if (this.focusDay) {\n setTimeout(() => this.focusFocussedDay(), FOCUS_TIMER);\n }\n\n this.focusDay = true;\n }\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<{ value: Date }>;\n\n componentWillLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Date Picker\"\n );\n\n this.monthNames = stringEnumToArray(IcDateInputMonths);\n this.daysOfWeek = stringEnumToArray(IcShortDayNames);\n\n this.watchStartOfWeekHandler();\n this.watchMaxHandler();\n this.watchMinHandler();\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentWillRender(): void {\n this.dateInputProps = this.setDateInputProps();\n }\n\n componentWillUpdate(): void {\n this.dateInputProps = this.setDateInputProps();\n }\n\n @Listen(\"calendarButtonClicked\")\n localCalendarButtonClickHandler(\n ev: CustomEvent<{ value: Date | null }>\n ): void {\n this.myCalendarButtonClicked = true;\n if (!this.calendarOpen) {\n this.setSelectedDate(ev.detail.value, false);\n }\n\n this.calendarOpen = !this.calendarOpen;\n }\n\n @Listen(\"calendarButtonClicked\", { target: \"document\" })\n calendarButtonClickHandler(): void {\n //closes this picker if calendar button in another clicked\n if (!this.myCalendarButtonClicked) {\n this.calendarOpen = false;\n }\n this.myCalendarButtonClicked = false;\n }\n\n private setDecadeView = (start: number) => {\n let currYear = start - 1;\n const decadeArr = [];\n while (currYear <= start + 10) {\n decadeArr.push(currYear);\n currYear++;\n }\n this.decadeView = decadeArr;\n this.decadeStart = decadeArr[1];\n this.decadeEnd = decadeArr[10];\n };\n\n private setSelectedDate = (d: Date | null, emit = true): void => {\n if (d === null || !dateMatches(d, this.selectedDate)) {\n this.selectedDate = d;\n this.value = d;\n if (emit) {\n this.inputEl?.triggerIcChange(d);\n }\n }\n };\n\n private handleCalendarMouseDown = (event: MouseEvent): void => {\n const target = event.target as HTMLElement;\n if (target.tagName !== \"IC-BUTTON\") {\n event.preventDefault();\n }\n };\n\n private handleCalendarClick = (event: MouseEvent): void => {\n this.clearDialogDescription();\n event.stopImmediatePropagation();\n };\n\n private handleDocumentClick = (): void => {\n this.calendarOpen = false;\n };\n\n private keyDownHandler = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n if (this.calendarOpen) {\n this.closeButtonClickHandler();\n this.inputEl?.setCalendarFocus();\n event.stopImmediatePropagation();\n }\n } else {\n this.clearDialogDescription();\n event.stopImmediatePropagation();\n }\n };\n\n private closeButtonClickHandler = () => {\n this.calendarOpen = false;\n };\n\n private focusFirstElement = () => {\n this.monthButtonEl.setFocus();\n };\n\n private focusLastElement = () => {\n if (\n this.showPickerClearButton &&\n this.clearButtonEl &&\n !this.clearButtonEl.disabled\n ) {\n this.clearButtonEl.setFocus();\n } else if (\n this.showPickerTodayButton &&\n this.todayButtonEl &&\n !this.todayButtonEl.disabled\n ) {\n this.todayButtonEl.setFocus();\n } else if (this.monthPickerVisible) {\n this.focussedMonthEl.setFocus();\n } else if (this.yearPickerVisible) {\n this.focussedYearEl.setFocus();\n } else {\n this.focussedDayEl.focus();\n }\n };\n\n private focusFocussedDay = () => {\n this.focussedDayEl.focus();\n };\n\n private monthButtonClickHandler = () => {\n this.yearPickerVisible = false;\n this.focusDay = false;\n this.monthPickerVisible = !this.monthPickerVisible;\n if (this.monthPickerVisible) {\n this.setAriaLiveRegionText(\"Month picker view open\");\n } else {\n this.setMonthSelectedLiveRegionText();\n }\n };\n\n private yearButtonClickHandler = () => {\n this.monthPickerVisible = false;\n this.focusDay = false;\n this.yearPickerVisible = !this.yearPickerVisible;\n if (this.yearPickerVisible) {\n this.setAriaLiveRegionText(\n `Year picker view open. ${this.getDecadeInViewText()}`\n );\n } else {\n this.setYearSelectedLiveRegionText();\n }\n };\n\n private todayButtonClickHandler = () => {\n this.yearPickerVisible = false;\n this.monthPickerVisible = false;\n this.setFocussedDate(new Date());\n this.setAriaLiveRegionText(this.getMonthInViewText());\n\n setTimeout(() => this.focusFocussedDay(), FOCUS_TIMER);\n };\n\n private todayButtonKeyDownHandler = (ev: KeyboardEvent) => {\n if (ev.key === \"Tab\" && !ev.shiftKey && this.clearButtonEl?.disabled) {\n this.focusFirstElement();\n ev.preventDefault();\n }\n };\n\n private clearButtonClickHandler = () => {\n this.setSelectedDate(null);\n let text = \"Selected date cleared.\";\n if (!this.monthPickerVisible && !this.yearPickerVisible) {\n text += ` ${this.getMonthInViewText()}`;\n }\n if (this.monthPickerVisible) {\n this.focussedMonthEl.setFocus();\n } else if (this.yearPickerVisible) {\n this.focussedYearEl.setFocus();\n } else {\n this.focusFocussedDay();\n }\n this.setAriaLiveRegionText(text);\n };\n\n private setMonthSelectedLiveRegionText = () => {\n this.setAriaLiveRegionText(\n `${\n this.monthNames[this.monthInView]\n } selected. ${this.getMonthInViewText()}`\n );\n };\n\n private setYearSelectedLiveRegionText = () => {\n this.setAriaLiveRegionText(\n `${this.yearInView} selected. ${this.getMonthInViewText()}`\n );\n };\n\n private getMonthInViewText = () => {\n return `${this.monthNames[this.monthInView]} ${\n this.yearInView\n } currently in view.`;\n };\n\n private getDecadeInViewText = () => {\n return `${this.decadeStart} to ${this.decadeEnd} currently in view.`;\n };\n\n private setAriaLiveRegionText = (text: string) => {\n this.liveRegionEl && (this.liveRegionEl.innerText = text);\n };\n\n private clearDialogDescription = () => {\n this.dialogDescription = \"\";\n };\n\n private clearButtonKeyDownHandler = (ev: KeyboardEvent) => {\n if (ev.key === \"Tab\" && !ev.shiftKey) {\n this.focusFirstElement();\n ev.preventDefault();\n }\n };\n\n private goToPreviousMonth = (focusDay = false) => {\n this.focusDay = focusDay;\n this.moveMonths(-1);\n };\n\n private goToNextMonth = (focusDay = false) => {\n this.focusDay = focusDay;\n this.moveMonths(1);\n };\n\n private goToPreviousYear = (focusDay = false) => {\n if (this.isPrevYearAllowed()) {\n this.focusDay = focusDay;\n this.moveYears(-1);\n }\n };\n\n private goToNextYear = (focusDay = false) => {\n if (this.isNextYearAllowed()) {\n this.focusDay = focusDay;\n this.moveYears(1);\n }\n };\n\n private navButtonMouseDownHandler = (ev: MouseEvent): void => {\n ev.preventDefault();\n };\n\n private renderMonthYearNavButton = (\n id: string,\n flip: boolean,\n disabled: boolean\n ): void => {\n const buttonSize = this.size;\n return (\n <div aria-hidden=\"true\">\n <ic-button\n id={id}\n disableTooltip={true}\n disabled={disabled}\n onClick={this.monthYearNavClickHandler}\n class={{ flip: flip }}\n variant=\"icon-tertiary\"\n innerHTML={chevron}\n size={buttonSize}\n tabIndex={-1}\n aria-hidden=\"true\"\n onMouseDown={this.navButtonMouseDownHandler}\n />\n </div>\n );\n };\n\n private monthYearNavClickHandler = (ev: Event): void => {\n const target = ev.target as Element;\n switch (target.id) {\n case \"previous-month-button\":\n this.goToPreviousMonth(this.dayButtonFocussed);\n break;\n\n case \"next-month-button\":\n this.goToNextMonth(this.dayButtonFocussed);\n break;\n\n case \"previous-year-button\":\n this.goToPreviousYear(this.dayButtonFocussed);\n break;\n\n case \"next-year-button\":\n this.goToNextYear(this.dayButtonFocussed);\n break;\n }\n };\n\n private previousMonthButton = (): void => {\n let disabled = false;\n if (this.focussedDate !== null && this.minDate !== null) {\n const yearMatch =\n this.focussedDate.getFullYear() === this.minDate.getFullYear();\n if (yearMatch) {\n disabled = this.monthInView - 1 < this.minDate.getMonth();\n }\n }\n return this.renderMonthYearNavButton(\n \"previous-month-button\",\n true,\n disabled\n );\n };\n\n private nextMonthButton = (): void => {\n let disabled = false;\n if (this.focussedDate !== null && this.maxDate !== null) {\n const yearMatch =\n this.focussedDate.getFullYear() === this.maxDate.getFullYear();\n if (yearMatch) {\n disabled = this.monthInView + 1 > this.maxDate.getMonth();\n }\n }\n return this.renderMonthYearNavButton(\"next-month-button\", false, disabled);\n };\n\n private previousYearButton = (): void => {\n return this.renderMonthYearNavButton(\n \"previous-year-button\",\n true,\n !this.isPrevYearAllowed()\n );\n };\n\n private nextYearButton = (): void => {\n return this.renderMonthYearNavButton(\n \"next-year-button\",\n false,\n !this.isNextYearAllowed()\n );\n };\n\n private isPrevYearAllowed = (): boolean => {\n return this.isYearAllowed(this.yearInView - 1);\n };\n\n private isNextYearAllowed = (): boolean => {\n return this.isYearAllowed(this.yearInView + 1);\n };\n\n private isYearAllowed = (yr: number): boolean =>\n yearInRange(yr, this.minDate, this.maxDate);\n\n private getMonthView = (date: Date): Date[] => {\n const start = getWeekStart(getMonthStart(date), this.startOfWeek);\n const end = getWeekEnd(getMonthEnd(date), this.startOfWeek);\n\n const days: Date[] = [];\n let current = start;\n\n while (!dateMatches(current, end)) {\n days.push(current);\n current = new Date(current);\n current.setDate(current.getDate() + 1);\n }\n\n days.push(current);\n\n return days;\n };\n\n private isCurrentMonth = (): boolean => {\n const d = new Date();\n return (\n d.getFullYear() === this.yearInView && d.getMonth() === this.monthInView\n );\n };\n\n private updateMonthInView = (): void => {\n if (this.focussedDate) {\n this.currMonthView = this.getMonthView(this.focussedDate);\n\n this.focussedDay = this.focussedDate.getDate();\n this.monthInView = this.focussedDate.getMonth();\n this.yearInView = this.focussedDate.getFullYear();\n\n if (this.dayPickerKeyboardNav) {\n this.monthInViewUpdateHandled = true;\n this.setAriaLiveRegionText(this.getMonthInViewText());\n this.dayPickerKeyboardNav = false;\n }\n }\n };\n\n private handleSelectDay = (day: Date): void => {\n this.setSelectedDate(day);\n this.calendarOpen = false;\n this.inputEl?.setCalendarFocus();\n };\n\n private handleSelectMonth = (month: number): void => {\n this.moveMonths(month - this.monthInView);\n setTimeout(() => {\n this.monthButtonEl.setFocus();\n this.monthPickerVisible = false;\n this.setMonthSelectedLiveRegionText();\n }, FOCUS_TIMER);\n };\n\n private handleSelectYear = (year: number): void => {\n const yrPos = this.decadeView.indexOf(year);\n if (yrPos > 0 && yrPos < this.decadeView.length - 1) {\n this.moveYears(year - this.yearInView);\n this.focusDay = false;\n const monthName = this.monthNames[this.monthInView];\n this.setAriaLiveRegionText(\n `${year} selected. ${monthName} ${year} currently in view.`\n );\n setTimeout(() => {\n this.yearButtonEl.setFocus();\n this.yearPickerVisible = false;\n }, FOCUS_TIMER);\n } else {\n const moveYears = year - this.focussedYear > 0 ? 10 : -10;\n this.updateFocussedYear(moveYears, this.yearButtonFocussed);\n this.setAriaLiveRegionText(this.getDecadeInViewText());\n }\n };\n\n private monthPickerKeyDownHandler = (ev: KeyboardEvent): void => {\n let handled = true;\n switch (ev.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.updateFocussedMonth(-1);\n break;\n\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.updateFocussedMonth(1);\n break;\n\n case \"Home\":\n this.updateFocussedMonth(-this.focussedMonth);\n break;\n\n case \"End\":\n this.updateFocussedMonth(11 - this.focussedMonth);\n break;\n\n case \"Tab\":\n handled = this.calendarTabHandler(ev);\n break;\n\n case \"Escape\":\n ev.stopImmediatePropagation();\n this.monthPickerVisible = false;\n setTimeout(() => this.focusFocussedDay(), FOCUS_TIMER);\n break;\n\n default:\n handled = false;\n }\n\n if (handled) {\n ev.preventDefault();\n }\n };\n\n private yearPickerKeyDownHandler = (ev: KeyboardEvent): void => {\n let handled = true;\n switch (ev.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.updateFocussedYear(-1);\n break;\n\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.updateFocussedYear(1);\n break;\n\n case \"Home\":\n if (this.focussedYear > this.decadeStart) {\n this.updateFocussedYear(this.decadeStart - this.focussedYear);\n }\n break;\n\n case \"End\":\n if (this.focussedYear < this.decadeEnd) {\n this.updateFocussedYear(this.decadeEnd - this.focussedYear);\n }\n break;\n\n case \"PageUp\":\n this.updateFocussedYear(-10);\n break;\n\n case \"PageDown\":\n this.updateFocussedYear(10);\n break;\n\n case \"Tab\":\n handled = this.calendarTabHandler(ev);\n break;\n\n case \"Escape\":\n ev.stopImmediatePropagation();\n this.yearPickerVisible = false;\n setTimeout(() => this.focusFocussedDay(), FOCUS_TIMER);\n break;\n\n default:\n handled = false;\n }\n\n if (handled) {\n ev.preventDefault();\n }\n };\n\n private onYearButtonFocusHandler = () => {\n this.yearButtonFocussed = true;\n };\n\n private onYearButtonBlurHandler = () => {\n this.yearButtonFocussed = false;\n };\n\n private monthButtonKeyDownHandler = (ev: KeyboardEvent): void => {\n let handled = false;\n switch (ev.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n handled = true;\n this.goToPreviousMonth();\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n handled = true;\n this.goToNextMonth();\n break;\n\n case \"Home\":\n handled = true;\n this.focusDay = false;\n this.moveMonths(-this.monthInView);\n break;\n\n case \"End\":\n handled = true;\n this.focusDay = false;\n this.moveMonths(11 - this.monthInView);\n break;\n\n case \"Tab\":\n if (ev.shiftKey) {\n handled = true;\n this.focusLastElement();\n }\n break;\n\n case \"Escape\":\n if (this.monthPickerVisible) {\n this.monthPickerVisible = false;\n ev.stopImmediatePropagation();\n }\n break;\n\n default:\n break;\n }\n\n if (handled) {\n ev.preventDefault();\n }\n };\n\n private yearButtonKeyDownHandler = (ev: KeyboardEvent): void => {\n let handled = false;\n switch (ev.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n handled = true;\n this.goToPreviousYear();\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n handled = true;\n this.goToNextYear();\n break;\n\n case \"Home\":\n if (this.yearPickerVisible && this.yearInView > this.decadeStart) {\n handled = true;\n this.moveYears(this.decadeStart - this.yearInView);\n }\n break;\n\n case \"End\":\n if (this.yearPickerVisible && this.yearInView < this.decadeEnd) {\n handled = true;\n this.moveYears(this.decadeEnd - this.focussedYear);\n }\n break;\n\n case \"PageUp\":\n handled = true;\n this.focusDay = false;\n this.moveYears(-10);\n break;\n\n case \"PageDown\":\n handled = true;\n this.focusDay = false;\n this.moveYears(10);\n break;\n\n case \"Escape\":\n if (this.yearPickerVisible) {\n this.yearPickerVisible = false;\n ev.stopImmediatePropagation();\n }\n break;\n\n default:\n break;\n }\n\n if (handled) {\n ev.preventDefault();\n }\n };\n\n private handleCalendarKeyDown = (ev: KeyboardEvent): void => {\n let handled = true;\n switch (ev.key) {\n case \"ArrowDown\":\n this.dayPickerKeyboardNav = true;\n this.moveDays(7);\n break;\n\n case \"ArrowUp\":\n this.dayPickerKeyboardNav = true;\n this.moveDays(-7);\n break;\n\n case \"ArrowLeft\":\n this.dayPickerKeyboardNav = true;\n if (this.focussedDate)\n this.moveDays(-1 * this.getNextDayToFocus(this.focussedDate, false));\n break;\n\n case \"ArrowRight\":\n this.dayPickerKeyboardNav = true;\n if (this.focussedDate)\n this.moveDays(this.getNextDayToFocus(this.focussedDate, true));\n break;\n\n case \"PageUp\":\n this.dayPickerKeyboardNav = true;\n ev.shiftKey ? this.moveYears(-1) : this.moveMonths(-1);\n break;\n\n case \"PageDown\":\n this.dayPickerKeyboardNav = true;\n ev.shiftKey ? this.moveYears(1) : this.moveMonths(1);\n break;\n\n case \"Home\":\n this.dayPickerKeyboardNav = true;\n this.setFocussedDate(\n new Date(this.focussedYear, this.focussedMonth, 1)\n );\n break;\n\n case \"End\":\n this.dayPickerKeyboardNav = true;\n this.setFocussedDate(\n new Date(this.focussedYear, this.focussedMonth + 1, 0)\n );\n break;\n\n case \"Tab\":\n handled = this.calendarTabHandler(ev);\n break;\n\n default:\n handled = false;\n break;\n }\n\n if (handled) {\n ev.preventDefault();\n }\n };\n\n private calendarTabHandler = (ev: KeyboardEvent): boolean => {\n let handled = false;\n if (\n !ev.shiftKey &&\n (!this.showPickerTodayButton || this.isCurrentMonth()) &&\n (!this.showPickerClearButton || this.clearButtonEl?.disabled)\n ) {\n this.focusFirstElement();\n handled = true;\n } else if (ev.shiftKey) {\n this.yearButtonEl.setFocus();\n handled = true;\n }\n return handled;\n };\n\n private onDayButtonFocusHandler = () => {\n this.dayButtonFocussed = true;\n };\n\n private onDayButtonBlurHandler = () => {\n this.dayButtonFocussed = false;\n };\n\n private getNextDayToFocus = (\n currDay: Date,\n forward: boolean,\n level = 1\n ): number => {\n const move = forward ? 1 : -1;\n const nextDay = new Date(currDay);\n nextDay.setDate(nextDay.getDate() + move);\n return this.disableDays?.includes(Number(nextDay.getDay()))\n ? this.getNextDayToFocus(nextDay, forward, level + 1)\n : level;\n };\n\n private moveDays = (numDays: number): void => {\n if (this.focussedDate) {\n const d = new Date(this.focussedDate);\n d.setDate(d.getDate() + numDays);\n this.setFocussedDate(d);\n }\n };\n\n private moveMonths = (numMonths: number): void => {\n if (this.focussedDate) {\n const newMonth = this.focussedDate.getMonth() + numMonths;\n const min = new Date(\n new Date(getMonthStart(this.focussedDate)).setMonth(newMonth)\n );\n const max = getMonthEnd(min);\n const newDate = new Date(new Date(this.focussedDate).setMonth(newMonth));\n this.setFocussedDate(clampDate(newDate, min, max));\n\n if (\n this.monthPickerVisible === false &&\n this.yearPickerVisible === false &&\n this.monthInViewUpdateHandled === false\n ) {\n this.setAriaLiveRegionText(this.getMonthInViewText());\n }\n this.monthInViewUpdateHandled = false;\n }\n };\n\n private moveYears = (numYears: number): void => {\n if (this.focussedDate) {\n const newYear = this.focussedDate.getFullYear() + numYears;\n const min = new Date(\n new Date(getMonthStart(this.focussedDate)).setFullYear(newYear)\n );\n const max = getMonthEnd(min);\n const newDate = new Date(\n new Date(this.focussedDate).setFullYear(newYear)\n );\n this.setFocussedDate(clampDate(newDate, min, max));\n\n if (\n this.monthPickerVisible === false &&\n this.yearPickerVisible === false &&\n this.monthInViewUpdateHandled === false\n ) {\n this.setAriaLiveRegionText(this.getMonthInViewText());\n }\n this.monthInViewUpdateHandled = false;\n }\n };\n\n private updateFocussedMonth = (adjust: number): void => {\n const d = new Date(this.focussedYear, this.focussedMonth, 1);\n d.setMonth(this.focussedMonth + adjust);\n const newDate = clampDate(d, this.minDate, this.maxDate);\n this.focussedMonth = newDate.getMonth();\n setTimeout(() => this.focussedMonthEl.setFocus(), FOCUS_TIMER);\n };\n\n private updateFocussedYear = (adjust: number, focusYear = true): void => {\n const d = new Date(new Date().setFullYear(this.focussedYear + adjust));\n const newDate = clampDate(d, this.minDate, this.maxDate);\n this.setFocussedYear(newDate.getFullYear(), focusYear);\n };\n\n private setFocussedDate = (d: Date): void => {\n this.focussedDate = clampDate(d, this.minDate, this.maxDate);\n };\n\n private setFocussedDayEl = (element: HTMLButtonElement) => {\n this.focussedDayEl = element;\n };\n\n private setFocussedMonthEl = (element: HTMLIcButtonElement) => {\n this.focussedMonthEl = element;\n };\n\n private setFocussedYearEl = (element: HTMLIcButtonElement) => {\n this.focussedYearEl = element;\n };\n\n private setFocussedYear = (newYear: number, focus = true): void => {\n const prevYear = this.focussedYear;\n this.focussedYear = newYear;\n if (this.yearPickerVisible) {\n const newDecade = Math.floor(newYear / 10) * 10;\n const oldDecade = Math.floor(prevYear / 10) * 10;\n if (newDecade !== oldDecade) {\n this.setDecadeView(newDecade);\n this.setAriaLiveRegionText(this.getDecadeInViewText());\n }\n if (focus) {\n setTimeout(() => {\n if (this.focussedYearEl !== null) this.focussedYearEl.setFocus();\n }, FOCUS_TIMER);\n }\n } else {\n this.setDecadeView(Math.floor(newYear / 10) * 10);\n }\n };\n\n private setDateInputProps = (): IcDateInputProps => {\n const inputProps: IcDateInputProps = {\n hideLabel: this.hideLabel,\n invalidDateMessage: this.invalidDateMessage,\n label: this.label,\n showClearButton: true,\n showCalendarButton: true,\n value: this.value,\n emitDatePartChange: this.emitDatePartChange,\n };\n\n if (this.dateFormat !== DEFAULT_DATE_FORMAT) {\n inputProps.dateFormat = this.dateFormat;\n }\n if (this.disableFuture) {\n inputProps.disableFuture = this.disableFuture;\n if (this.disableFutureMessage !== DEFAULT_DISABLE_DATES_FROM_NOW_MSG) {\n inputProps.disableFutureMessage = this.disableFutureMessage;\n }\n }\n if (this.disablePast) {\n inputProps.disablePast = this.disablePast;\n if (this.disablePastMessage !== DEFAULT_DISABLE_DATES_UNTIL_NOW_MSG) {\n inputProps.disablePastMessage = this.disablePastMessage;\n }\n }\n if (this.disableDays && this.disableDays.length > 0) {\n inputProps.disableDays = this.disableDays;\n if (this.disableDaysMessage !== DEFAULT_DISABLE_DAYS_MSG) {\n inputProps.disableDaysMessage = this.disableDaysMessage;\n }\n }\n if (this.max !== null && this.max !== \"\" && this.maxDate) {\n inputProps.max = this.maxDate;\n }\n if (this.min !== null && this.min !== \"\" && this.minDate) {\n inputProps.min = this.minDate;\n }\n if (this.helperText !== undefined) {\n inputProps.helperText = this.helperText;\n }\n if (this.hideHelperText !== false) {\n inputProps.hideHelperText = this.hideHelperText;\n }\n if (this.inputId !== undefined) {\n inputProps.inputId = this.inputId;\n }\n if (this.name !== undefined) {\n inputProps.name = this.name;\n }\n if (this.disabled) {\n inputProps.disabled = this.disabled;\n }\n if (this.required) {\n inputProps.required = this.required;\n }\n if (this.size !== \"medium\") {\n inputProps.size = this.size;\n }\n if (this.validationStatus !== \"\") {\n inputProps.validationStatus = this.validationStatus;\n }\n if (this.validationText !== \"\") {\n inputProps.validationText = this.validationText;\n }\n return inputProps;\n };\n\n render() {\n const {\n calendarOpen,\n dateInputProps,\n monthNames,\n size,\n focussedMonth,\n focussedYear,\n monthInView,\n yearInView,\n monthPickerVisible,\n yearPickerVisible,\n orderedDaysOfWeek,\n decadeView,\n minDate,\n maxDate,\n showPickerClearButton,\n showPickerTodayButton,\n dialogDescription,\n theme,\n } = this;\n\n let monthButtonText = \"\";\n if (monthPickerVisible) {\n monthButtonText = `Use the arrow keys to change the selected month. To return to day picker view, press Enter or Space to select a month, or press Escape.`;\n } else {\n monthButtonText = `Press Enter or Space to open month picker view or use the arrow keys to change month.`;\n }\n\n let yearButtonText = \"\";\n if (yearPickerVisible) {\n yearButtonText = `Use the arrow keys to change the selected year. To return to day picker view, press Enter or Space to select a year, or press Escape.`;\n } else {\n yearButtonText = `Press Enter or Space to open year picker view or use the arrow keys to change the selected year.`;\n }\n\n const dialogLabel = \"choose date\";\n\n const monthLabel =\n monthNames && monthNames[monthInView]\n ? monthNames[monthInView]\n : \"Open month picker\";\n const yearLabel = this.yearInView ? this.yearInView : \"Open year picker\";\n\n let minDay = minDate;\n if (minDate && this.disablePast) {\n const yesterday = new Date(minDate);\n yesterday.setDate(minDate.getDate() - 1);\n minDay = yesterday;\n }\n\n return (\n <Host\n onKeyDown={this.keyDownHandler}\n class={{\n [`ic-date-picker-${size}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div class=\"date-input-container\">\n <ic-date-input ref={(el) => (this.inputEl = el)} {...dateInputProps}>\n <slot name=\"helper-text\" slot=\"helper-text\"></slot>\n </ic-date-input>\n </div>\n {calendarOpen && (\n <div>\n <span id=\"dialog-description\" class=\"sr-only\">\n {dialogDescription}\n </span>\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={dialogLabel}\n aria-describedBy=\"dialog-description\"\n class={{\n \"calendar-container\": true,\n above: this.showPickerAbove,\n }}\n onMouseDown={this.handleCalendarMouseDown}\n onClick={this.handleCalendarClick}\n >\n <span\n ref={(el) => (this.liveRegionEl = el)}\n id=\"live-region\"\n aria-live=\"assertive\"\n class=\"sr-only\"\n ></span>\n <div\n class={{\n \"month-year-nav-container\": true,\n }}\n >\n <div class=\"month-year-nav\">\n {this.previousMonthButton()}\n <span id=\"select-month-hint\" aria-hidden=\"true\">\n {monthButtonText}\n </span>\n <ic-button\n ref={(el: HTMLIcButtonElement) => (this.monthButtonEl = el)}\n size={size}\n class=\"month-picker-button\"\n aria-haspopup=\"menu\"\n aria-expanded={monthPickerVisible ? \"true\" : \"false\"}\n full-width=\"true\"\n variant=\"tertiary\"\n aria-label={monthLabel}\n aria-describedby=\"select-month-hint\"\n onKeyDown={this.monthButtonKeyDownHandler}\n onClick={this.monthButtonClickHandler}\n >\n {monthNames[monthInView]}\n </ic-button>\n {this.nextMonthButton()}\n </div>\n <div class=\"month-year-nav\">\n {this.previousYearButton()}\n <span id=\"select-year-hint\" aria-hidden=\"true\">\n {yearButtonText}\n </span>\n <ic-button\n ref={(el: HTMLIcButtonElement) => (this.yearButtonEl = el)}\n size={size}\n class=\"year-picker-button\"\n aria-haspopup=\"menu\"\n aria-expanded={yearPickerVisible ? \"true\" : \"false\"}\n full-width=\"true\"\n variant=\"tertiary\"\n aria-label={yearLabel}\n aria-describedby=\"select-year-hint\"\n onKeyDown={this.yearButtonKeyDownHandler}\n onClick={this.yearButtonClickHandler}\n >\n {this.yearInView}\n </ic-button>\n {this.nextYearButton()}\n </div>\n </div>\n {!(monthPickerVisible || yearPickerVisible) && (\n <div\n class={{\n calendar: true,\n hidden: monthPickerVisible || yearPickerVisible,\n }}\n onKeyDown={this.handleCalendarKeyDown}\n >\n <div class=\"weekdays\" aria-hidden=\"true\">\n {orderedDaysOfWeek.map((dayName) => {\n const header =\n size === \"small\" ? dayName.charAt(0) : dayName;\n return (\n <div class=\"calendar-day-header\">\n <ic-typography variant=\"caption\">\n {header}\n </ic-typography>\n </div>\n );\n })}\n </div>\n\n <div class=\"calendar-days-container\">\n {this.currMonthView.map((day) => (\n <DayButton\n day={day}\n disableDay={this.disableDays?.includes(\n Number(day.getDay())\n )}\n today={dateMatches(day, this.today)}\n selected={dateMatches(day, this.selectedDate)}\n focussed={dateMatches(day, this.focussedDate)}\n inRange={dateInRange(day, minDay, maxDate)}\n monthInView={monthInView}\n onSelectDay={this.handleSelectDay}\n focussedDayRef={this.setFocussedDayEl}\n onFocusDay={this.onDayButtonFocusHandler}\n onBlurDay={this.onDayButtonBlurHandler}\n showDaysOutsideMonth={this.showDaysOutsideMonth}\n ></DayButton>\n ))}\n </div>\n </div>\n )}\n <div\n class={{\n \"month-picker-container\": true,\n hidden: !monthPickerVisible,\n }}\n >\n {monthPickerVisible && (\n <MonthPicker\n size={size}\n onSelectMonth={this.handleSelectMonth}\n monthInView={monthInView}\n focussedMonth={focussedMonth}\n onKeyDown={this.monthPickerKeyDownHandler}\n focussedMonthRef={this.setFocussedMonthEl}\n minDate={minDate}\n maxDate={maxDate}\n yearInView={yearInView}\n ></MonthPicker>\n )}\n </div>\n <div\n class={{\n \"year-picker-container\": true,\n hidden: !yearPickerVisible,\n }}\n >\n {yearPickerVisible && (\n <YearPicker\n decadeView={decadeView}\n size={size}\n focussedYear={focussedYear}\n onSelectYear={this.handleSelectYear}\n onKeyDown={this.yearPickerKeyDownHandler}\n onFocusYear={this.onYearButtonFocusHandler}\n onBlurYear={this.onYearButtonBlurHandler}\n yearInView={yearInView}\n minDate={minDate}\n maxDate={maxDate}\n focussedYearRef={this.setFocussedYearEl}\n ></YearPicker>\n )}\n </div>\n <div\n class={{\n \"bottom-buttons\": true,\n \"no-today\": !showPickerTodayButton,\n }}\n >\n {showPickerTodayButton && (\n <ic-button\n id=\"today-button\"\n variant=\"tertiary\"\n ref={(el: HTMLIcButtonElement) => (this.todayButtonEl = el)}\n size={size}\n aria-label=\"Navigate to current date\"\n onClick={this.todayButtonClickHandler}\n onKeyDown={this.todayButtonKeyDownHandler}\n disabled={this.isCurrentMonth()}\n >\n Go to today\n </ic-button>\n )}\n {showPickerClearButton && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"clear selected date\"\n ref={(el: HTMLIcButtonElement) => (this.clearButtonEl = el)}\n variant=\"tertiary\"\n size={size}\n onClick={this.clearButtonClickHandler}\n onKeyDown={this.clearButtonKeyDownHandler}\n disabled={\n this.value === \"\" ||\n this.value === null ||\n this.value === undefined\n }\n >\n Clear\n </ic-button>\n )}\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"0bAmBO,MAAMA,EAAiD,EAC5DC,WACAC,QACAC,MACAC,cACAC,aACAC,YACAC,cACAC,WACAC,iBACAC,UACAC,uBACAC,iBAEA,MAAMC,EAAiB,KACr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AAaoH,IAGdA,GACCrH,EAAA,aAAAkJ,IAAA,2CACE1F,GAAG,eACH3C,QAAQ,WACRF,IAAMC,GAA6BoE,KAAKW,cAAgB/E,EACxDI,KAAMA,EAAI,aACC,2BACXR,QAASwE,KAAKoF,wBACdjJ,UAAW6D,KAAKwF,0BAChBzK,SAAUiF,KAAKyH,kBAAgB,eAKlCrF,GACCpH,EAAA,aAAAkJ,IAAA,2CACE1F,GAAG,eAAc,aACN,sBACX7C,IAAMC,GAA6BoE,KAAKC,cAAgBrE,EACxDC,QAAQ,WACRG,KAAMA,EACNR,QAASwE,KAAK0F,wBACdvJ,UAAW6D,KAAK6F,0BAChB9K,SACEiF,KAAK4C,QAAU,IACf5C,KAAK4C,QAAU,MACf5C,KAAK4C,QAAUxH,WAAS,Y","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icBadgeCss","IcBadgeStyle0","TOP_NAVIGATION","SIDE_NAVIGATION","Badge","constructor","hostRef","_a","this","ariaLabel","initialPosition","position","size","theme","type","variant","visible","setBadgeColour","colorRGBA","customColor","convertToRGBA","r","g","b","a","el","style","backgroundColor","foregroundColour","getBrandForegroundAppearance","getLabel","maxNumber","Number","label","setAccessibleLabel","parentEl","parentElement","defaultAriaLabel","isAccessibleLabelDefined","accessibleLabel","tagName","parentAriaLabel","ariaLabelPrefix","setPositionInTopNavigation","isInMobileMode","setPositionInSideNavigation","isInTopNav","grandparentEl","greatGrandparentEl","isInSideNav","classList","contains","isPropDefined","accessibleLabelHandler","customColorHandler","variantHandler","visibleHandler","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentWillRender","navBarMenuOpenHandler","navBarMenuCloseHandler","render","h","Host","key","class","id","role","name","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","../web-components/dist/collection/components/ic-badge/ic-badge.js"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.ic-badge-show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.ic-badge-hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: -moz-fit-content;\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host ic-typography {\n --ic-typography-color: var(--ic-badge-text);\n}\n\n:host(.ic-badge-neutral) {\n background-color: var(--ic-badge-dark) !important;\n}\n\n:host(.ic-badge-light) ic-typography {\n --ic-typography-color: var(--ic-badge-text-monochrome);\n}\n\n:host(.ic-badge-light) ::slotted(*) {\n fill: var(--ic-badge-icon-monochrome);\n}\n\n:host(.ic-badge-info) {\n background-color: var(--ic-badge-info) !important;\n}\n\n:host(.ic-badge-light) {\n background-color: var(--ic-badge-light) !important;\n}\n\n:host(.ic-badge-warning) {\n background-color: var(--ic-badge-warning) !important;\n}\n\n:host(.ic-badge-warning) ic-typography {\n --ic-typography-color: var(--ic-badge-warning-text);\n}\n\n:host(.ic-badge-warning) ::slotted(*) {\n fill: var(--ic-badge-warning-icon);\n}\n\n:host(.ic-badge-error) {\n background-color: var(--ic-badge-error) !important;\n}\n\n:host(.ic-badge-success) {\n background-color: var(--ic-badge-success) !important;\n}\n\n:host(.ic-badge-small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.ic-badge-large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-medium) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.ic-badge-dot.ic-badge-small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-dot.ic-badge-large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host ::slotted(*) {\n fill: var(--ic-badge-icon);\n}\n\n:host(.ic-badge-foreground-dark) ::slotted(*) {\n fill: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.ic-badge-foreground-dark) ic-typography {\n --ic-typography-color: var(--ic-color-text-primary-light);\n}\n\n:host(.ic-badge-foreground-light) ic-typography {\n --ic-typography-color: var(--ic-color-text-primary-dark);\n}\n\n:host(.ic-badge-text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-text.ic-badge-small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.ic-badge-text.ic-badge-large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.ic-badge-icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.ic-badge-icon.ic-badge-small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.ic-badge-icon.ic-badge-large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.ic-badge-far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.ic-badge-far.ic-badge-small),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-badge-dot.ic-badge-far),\n:host(.ic-badge-dot.ic-badge-far.ic-badge-small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.ic-badge-near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.ic-badge-dot.ic-badge-near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-badge-inline) {\n position: static;\n}\n\n:host(.ic-badge-hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.sr-only:dir(rtl) {\n right: -9999px;\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { convertToRGBA, getBrandForegroundAppearance, isPropDefined, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nconst TOP_NAVIGATION = \"IC-TOP-NAVIGATION\";\nconst SIDE_NAVIGATION = \"IC-SIDE-NAVIGATION\";\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\nexport class Badge {\n constructor() {\n var _a;\n this.ariaLabel = null;\n this.initialPosition = (_a = this.position) !== null && _a !== void 0 ? _a : \"far\";\n /**\n * The positioning of the badge in reference to the parent element.\n */\n this.position = \"far\";\n /**\n * The size of the badge to be displayed.\n */\n this.size = \"medium\";\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 this.theme = \"inherit\";\n /**\n * The type of badge to be displayed.\n */\n this.type = \"text\";\n /**\n * The variant of the badge to be displayed.\n */\n this.variant = \"neutral\";\n /**\n * If `true`, the badge will be displayed.\n */\n this.visible = true;\n this.setBadgeColour = () => {\n const colorRGBA = this.customColor ? convertToRGBA(this.customColor) : null;\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n this.el.style.backgroundColor = `rgba(${r}, ${g}, ${b}, ${a})`;\n this.foregroundColour = getBrandForegroundAppearance((r * 299 + g * 587 + b * 114) / 1000);\n }\n };\n this.getLabel = () => this.maxNumber && Number(this.label) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.label;\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n this.setAccessibleLabel = () => {\n const parentEl = this.el.parentElement;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.label || \"with badge being displayed\";\n if (parentEl) {\n const { tagName } = parentEl;\n if (tagName !== \"IC-CARD\" &&\n (tagName !== \"IC-TAB\" || (tagName === \"IC-TAB\" && this.parentAriaLabel))) {\n const ariaLabelPrefix = this.parentAriaLabel\n ? `${this.parentAriaLabel} ,`\n : \"\";\n parentEl.ariaLabel = this.visible\n ? `${ariaLabelPrefix} ${defaultAriaLabel}`\n : null;\n }\n else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n this.setPositionInTopNavigation = () => {\n this.position = this.isInMobileMode() ? \"inline\" : this.initialPosition;\n };\n this.setPositionInSideNavigation = () => {\n this.position = \"near\";\n };\n this.isInTopNav = () => {\n const parentEl = this.el.parentElement;\n if (!parentEl)\n return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl === null || grandparentEl === void 0 ? void 0 : grandparentEl.parentElement;\n return ((grandparentEl === null || grandparentEl === void 0 ? void 0 : grandparentEl.tagName) === TOP_NAVIGATION ||\n (greatGrandparentEl === null || greatGrandparentEl === void 0 ? void 0 : greatGrandparentEl.tagName) === TOP_NAVIGATION);\n };\n this.isInSideNav = () => {\n const parentEl = this.el.parentElement;\n if (!parentEl)\n return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl === null || grandparentEl === void 0 ? void 0 : grandparentEl.parentElement;\n return ((grandparentEl === null || grandparentEl === void 0 ? void 0 : grandparentEl.tagName) === SIDE_NAVIGATION ||\n (greatGrandparentEl === null || greatGrandparentEl === void 0 ? void 0 : greatGrandparentEl.tagName) === SIDE_NAVIGATION);\n };\n this.isInMobileMode = () => {\n const parentEl = this.el.parentElement;\n if (!parentEl)\n return false;\n const grandparentEl = parentEl.parentElement;\n const greatGrandparentEl = grandparentEl === null || grandparentEl === void 0 ? void 0 : grandparentEl.parentElement;\n return ((((grandparentEl === null || grandparentEl === void 0 ? void 0 : grandparentEl.tagName) === TOP_NAVIGATION ||\n (grandparentEl === null || grandparentEl === void 0 ? void 0 : grandparentEl.tagName) === SIDE_NAVIGATION) &&\n grandparentEl.classList.contains(\"mobile-mode\")) ||\n (((greatGrandparentEl === null || greatGrandparentEl === void 0 ? void 0 : greatGrandparentEl.tagName) === TOP_NAVIGATION ||\n (greatGrandparentEl === null || greatGrandparentEl === void 0 ? void 0 : greatGrandparentEl.tagName) === SIDE_NAVIGATION) &&\n greatGrandparentEl.classList.contains(\"mobile-mode\")));\n };\n this.isAccessibleLabelDefined = () => isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n }\n accessibleLabelHandler() {\n this.setAccessibleLabel();\n }\n customColorHandler() {\n this.variant === \"custom\" && this.setBadgeColour();\n }\n variantHandler() {\n if (this.variant === \"custom\") {\n this.setBadgeColour();\n }\n }\n visibleHandler() {\n this.setAccessibleLabel();\n }\n componentWillLoad() {\n var _a;\n this.variant === \"custom\" && this.setBadgeColour();\n const ariaLabel = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.ariaLabel;\n if (ariaLabel)\n this.parentAriaLabel = ariaLabel;\n this.setAccessibleLabel();\n }\n componentDidLoad() {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Badge\");\n }\n componentWillRender() {\n this.isInTopNav() && this.setPositionInTopNavigation();\n this.isInSideNav() && this.setPositionInSideNavigation();\n }\n navBarMenuOpenHandler() {\n this.isInTopNav() && (this.position = \"inline\");\n }\n navBarMenuCloseHandler() {\n this.isInTopNav() && (this.position = this.initialPosition);\n }\n render() {\n const { ariaLabel, el, foregroundColour, getLabel, position, size, label, type, variant, visible, theme, } = this;\n return (h(Host, { key: '720f5c35c4d16cc484ea53a0f277befdbb087883', class: {\n [`ic-badge-${position}`]: true,\n [`ic-badge-${size}`]: true,\n [`ic-badge-${variant}`]: true,\n [`ic-badge-${type}`]: true,\n [`ic-badge-foreground-${foregroundColour}`]: foregroundColour !== null && variant === \"custom\",\n [`${visible ? \"ic-badge-show\" : \"ic-badge-hide\"}`]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }, id: el.id || null, \"aria-label\": ariaLabel, role: \"status\" }, type === \"icon\" && h(\"slot\", { key: '611a931cbdbfd72a7031adaec19d9cd5f83b097a', name: \"badge-icon\" }), type === \"text\" && label && (h(\"ic-typography\", { key: '57620b02829df5547546474ad337f3cc23bb19c4', variant: size === \"small\" ? \"badge-small\" : \"badge\" }, getLabel())), type === \"dot\" && h(\"span\", { key: '6f583cc04572a1818afc11e43cb5b41f95afe630', class: \"sr-only\" }, \"badge\")));\n }\n static get is() { return \"ic-badge\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the badge component to provide context for screen reader users.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"customColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})` | undefined\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom badge colour. This will only style the badge component if variant=\\\"custom\\\".\\nCan be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"custom-color\",\n \"reflect\": false\n },\n \"maxNumber\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The maximum number shown on the badge appended with a +.\\nThis will only be displayed if type=\\\"text\\\" and label is not empty.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"max-number\",\n \"reflect\": false\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcBadgePositions\",\n \"resolved\": \"\\\"far\\\" | \\\"inline\\\" | \\\"near\\\" | undefined\",\n \"references\": {\n \"IcBadgePositions\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgePositions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The positioning of the badge in reference to the parent element.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"far\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\" | undefined\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the badge to be displayed.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text displayed in the badge. This will only be displayed if type=\\\"text\\\".\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\" | undefined\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"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 \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeTypes\",\n \"resolved\": \"\\\"dot\\\" | \\\"icon\\\" | \\\"text\\\" | undefined\",\n \"references\": {\n \"IcBadgeTypes\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The type of badge to be displayed.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"text\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeVariants\",\n \"resolved\": \"\\\"custom\\\" | \\\"error\\\" | \\\"info\\\" | \\\"light\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\" | undefined\",\n \"references\": {\n \"IcBadgeVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the badge to be displayed.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the badge will be displayed.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"visible\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"accessibleLabel\",\n \"methodName\": \"accessibleLabelHandler\"\n }, {\n \"propName\": \"customColor\",\n \"methodName\": \"customColorHandler\"\n }, {\n \"propName\": \"variant\",\n \"methodName\": \"variantHandler\"\n }, {\n \"propName\": \"visible\",\n \"methodName\": \"visibleHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icNavigationMenuOpened\",\n \"method\": \"navBarMenuOpenHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"icNavigationMenuClosed\",\n \"method\": \"navBarMenuCloseHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-badge.js.map\n"],"mappings":"kHAAA,MAAMA,EAAa,ogIACnB,MAAAC,EAAeD,ECCf,MAAME,EAAiB,oBACvB,MAAMC,EAAkB,qB,MAIXC,EAAK,MACd,WAAAC,CAAAC,G,UACI,IAAIC,EACJC,KAAKC,UAAY,KACjBD,KAAKE,iBAAmBH,EAAKC,KAAKG,YAAc,MAAQJ,SAAY,EAAIA,EAAK,MAI7EC,KAAKG,SAAW,MAIhBH,KAAKI,KAAO,SAIZJ,KAAKK,MAAQ,UAIbL,KAAKM,KAAO,OAIZN,KAAKO,QAAU,UAIfP,KAAKQ,QAAU,KACfR,KAAKS,eAAiB,KAClB,MAAMC,EAAYV,KAAKW,YAAcC,EAAcZ,KAAKW,aAAe,KACvE,GAAID,EAAW,CACX,MAAMG,EAAEA,EAACC,EAAEA,EAACC,EAAEA,EAACC,EAAEA,GAAMN,EACvBV,KAAKiB,GAAGC,MAAMC,gBAAkB,QAAQN,MAAMC,MAAMC,MAAMC,KAC1DhB,KAAKoB,iBAAmBC,GAA8BR,EAAI,IAAMC,EAAI,IAAMC,EAAI,KAAO,I,GAG7Ff,KAAKsB,SAAW,IAAMtB,KAAKuB,WAAaC,OAAOxB,KAAKyB,OAASzB,KAAKuB,UAC5D,GAAGvB,KAAKuB,aACRvB,KAAKyB,MAGXzB,KAAK0B,mBAAqB,KACtB,MAAMC,EAAW3B,KAAKiB,GAAGW,cACzB,MAAMC,EAAmB7B,KAAK8B,2BACxB9B,KAAK+B,gBACL/B,KAAKyB,OAAS,6BACpB,GAAIE,EAAU,CACV,MAAMK,QAAEA,GAAYL,EACpB,GAAIK,IAAY,YACXA,IAAY,UAAaA,IAAY,UAAYhC,KAAKiC,iBAAmB,CAC1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a,KAC1B,CAAC,YAAYC,KAAS,KACtB,CAAC,YAAYG,KAAY,KACzB,CAAC,YAAYD,KAAS,KACtB,CAAC,uBAAuBc,KAAqBA,IAAqB,MAAQb,IAAY,SACtF,CAAC,GAAGC,EAAU,gBAAkB,mBAAoB,KACpD,CAAC,YAAYH,KAAUA,IAAU,WAClCyD,GAAI7C,EAAG6C,IAAM,KAAM,aAAc7D,EAAW8D,KAAM,UAAYzD,IAAS,QAAUoD,EAAE,OAAQ,CAAEE,IAAK,2CAA4CI,KAAM,eAAiB1D,IAAS,QAAUmB,GAAUiC,EAAE,gBAAiB,CAAEE,IAAK,2CAA4CrD,QAASH,IAAS,QAAU,cAAgB,SAAWkB,KAAchB,IAAS,OAASoD,EAAE,OAAQ,CAAEE,IAAK,2CAA4CC,MAAO,WAAa,S,CAI3b,yBAAWI,GAAmB,OAAO,IAAK,C","ignoreList":[]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as i,h as t,H as e,g as s,c as n,F as c}from"./p-8e4e97b4.js";import{r as o,a as r,s as a,S as l,X as h,Y as u,b as d,Q as p}from"./p-13f52d7b.js";import{C as m}from"./p-0aa9ce8b.js";import{c as b}from"./p-aae38bee.js";const f="ic-input-component-container{display:flex;border:var(--ic-border-width) solid\n var(--border-color, var(--ic-architectural-400));border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-slow);height:2.5rem;min-height:2.5rem;width:var(--input-width, 20rem);padding:var(--ic-space-1px);background-color:var(--input-bg-color, var(--ic-color-background-primary));box-sizing:border-box;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.ic-input-component-container-full-width{width:100%}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed\n var(--border-color-disabled, var(--ic-color-border-neutral-disabled))}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-small.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-large.ic-input-component-container-readonly{height:auto;background:transparent}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-readonly:hover{border:none;padding:0}ic-input-component-container.ic-input-component-container-error{border:var(--ic-space-xxxs) solid\n var(--border-color-error, var(--ic-color-border-error));padding:0}ic-input-component-container.ic-input-component-container-error:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-error-hover, var(--ic-color-border-error-hover))}ic-input-component-container.ic-input-component-container-error:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-error-pressed, var(--ic-color-border-error-pressed))}ic-input-component-container.ic-input-component-container-warning{border:var(--ic-space-xxxs) solid\n var(--border-color-warning, var(--ic-color-border-warning));padding:0}ic-input-component-container.ic-input-component-container-warning:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-hover, var(--ic-color-border-warning-hover))}ic-input-component-container.ic-input-component-container-warning:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-pressed, var(--ic-color-border-warning-pressed))}ic-input-component-container.ic-input-component-container-success{border:var(--ic-space-xxxs) solid\n var(--border-color-success, var(--ic-color-border-success));padding:0}ic-input-component-container.ic-input-component-container-success:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-success-hover, var(--ic-color-border-success-hover))}ic-input-component-container.ic-input-component-container-success:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-success-pressed, var(--ic-color-border-success-pressed))}ic-input-component-container.ic-input-component-container-small{height:var(--ic-space-xl);min-height:var(--ic-space-xl)}ic-input-component-container.ic-input-component-container-large{height:var(--ic-space-xxl);min-height:var(--ic-space-xxl)}ic-input-component-container.ic-input-component-container-multiline{height:auto}ic-input-component-container .icon-container{margin-top:var(--ic-space-xxs);margin-left:0.438rem;display:flex;align-items:center}ic-input-component-container.ic-input-component-container-multiline .icon-container,ic-input-component-container.ic-input-component-container-multiline.ic-input-component-container-small .icon-container{margin-top:0.375rem;display:block}ic-input-component-container.ic-input-component-container-readonly .icon-container{margin-left:-0.313rem}ic-input-component-container.ic-input-component-container-disabled ::-moz-placeholder{display:none}ic-input-component-container.ic-input-component-container-disabled ::placeholder{display:none}ic-input-component-container .inline-success{margin:var(--ic-space-xs) 0.375rem;display:flex;align-items:center}ic-input-component-container .inline-success>svg{fill:var(--ic-input-component-container-success-icon-inline-color);height:1.25rem;width:1.25rem}ic-input-component-container:hover{border:var(--ic-input-component-container-hover-border);border-color:var(--border-color-hover, var(--ic-color-border-neutral-hover));color:var(--ic-action-monochrome-hover-dark)}ic-input-component-container:focus{border:var(--ic-border-pressed);border-color:var(\n --border-color-pressed,\n var(--ic-color-border-neutral-pressed)\n )}.focus-indicator{display:flex;width:100%;margin:-0.125rem;padding:0.125rem;border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.focus-indicator:focus-within,.focus-indicator-enabled{box-shadow:var(--ic-border-focus)}.focus-indicator.ic-input-component-container-dark:focus-within{box-shadow:var(--ic-border-focus)}@media (forced-colors: active){ic-input-component-container,.focus-indicator{transition:none}ic-input-component-container:focus-within{border:var(--ic-border-width) solid Highlight;outline:0.125rem solid Highlight}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed GrayText}}";const v=f;const g=class{constructor(t){i(this,t);this.disabled=false;this.fullWidth=false;this.multiLine=false;this.readonly=false;this.size="medium";this.validationInline=false;this.validationStatus=""}watchDisabledHandler(){o(this.disabled,this.el)}componentWillLoad(){o(this.disabled,this.el)}componentDidLoad(){this.hostMutationObserver=new MutationObserver((i=>r(i,"left-icon",this)));this.hostMutationObserver.observe(this.el,{childList:true})}render(){const{size:i,validationStatus:s,disabled:n,readonly:c,multiLine:o,fullWidth:r,validationInline:u}=this;return t(e,{key:"fc70461ae7d3922f07aa5a85209e376d42bfc451",class:{[`ic-input-component-container-${i}`]:true,[`ic-input-component-container-${s}`]:s!==""&&!n&&!c,"ic-input-component-container-disabled":!!n,"ic-input-component-container-readonly":!!c,"ic-input-component-container-multiline":!!o,"ic-input-component-container-full-width":!!r},"aria-disabled":n?"true":null},t("div",{key:"20934b81740e6c907bff86cc706d3aafe3a790df",class:"focus-indicator"},a(this.el,"left-icon")&&t("div",{key:"3577416fc719a575372188c43a78ac945b1b1526",class:"icon-container"},t("slot",{key:"36ee3e5c85ec77c69f88c2b74d272bdb6ee42ca1",name:"left-icon"})),t("slot",{key:"e0a79f50c8ba34c0d989e2402df8b00587c5878f"}),u&&s===l.Success&&t("span",{key:"b156fb5bb6fcfec8c6dec6febdeea6d2adc7e009",class:"inline-success",innerHTML:h})))}get el(){return s(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};g.style=v;const x="ic-input-container .component-container{display:flex;flex-direction:column}";const y=x;const w=class{constructor(t){i(this,t);this.disabled=false;this.readonly=false}render(){return t(e,{key:"49cd31d8dca09cc4b2f49e0b2e7829bb1771a5d6"},t("div",{key:"bb0e3a80161a86b40e0dc424264e71cf6c95c88a",class:{["component-container"]:true,["disabled"]:!!this.disabled,["readonly"]:!!this.readonly}},t("slot",{key:"4916ff0aebd6632d6e6f5daaa3c318e1e696ff2f"})))}};w.style=y;const k='html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type="button"].sc-ic-menu,[type="reset"].sc-ic-menu,[type="submit"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type="button"].sc-ic-menu::-moz-focus-inner,[type="reset"].sc-ic-menu::-moz-focus-inner,[type="submit"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type="button"].sc-ic-menu:-moz-focusring,[type="reset"].sc-ic-menu:-moz-focusring,[type="submit"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type="checkbox"].sc-ic-menu,[type="radio"].sc-ic-menu{box-sizing:border-box;padding:0}[type="number"].sc-ic-menu::-webkit-inner-spin-button,[type="number"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type="search"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type="search"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{max-height:0;width:var(--menu-width, var(--input-width, 20rem));color:var(--menu-item-text-color, var(--ic-menu-list-option-text-color));--ic-typography-color:var(\n --menu-item-text-color,\n var(--ic-menu-list-option-text-color)\n );background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:var(--ic-border-radius)}.ic-menu-open.sc-ic-menu-h:not(.ic-menu-no-focus):focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.ic-select-select-all-focused.sc-ic-menu-h{box-shadow:var(--ic-elevation-overlay) !important}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.on-dialog.sc-ic-menu-h{inset:auto !important}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border-radius:1px;background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );visibility:hidden;max-height:0;overflow-y:hidden}.menu.sc-ic-menu:has(+.option-bar).sc-ic-menu{border-radius:0 0 1px 1px}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.ic-menu-open.sc-ic-menu-h{max-height:none;display:flex;flex-direction:column-reverse;border:var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-menu-border-color));transition:box-shadow var(--ic-easing-transition-fast)}.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.ic-menu-open.sc-ic-menu-h .option-bar.sc-ic-menu{visibility:visible}.ic-menu-open.sc-ic-menu-h .select-all-button.sc-ic-menu{display:block}.ic-menu-full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));cursor:pointer;display:flex;align-items:center}.loading-option.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.ic-menu-small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.ic-menu-large.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))}.option.sc-ic-menu:last-child{border-radius:0 0 1px 1px}.sc-ic-menu:not(.menu:has(+.option-bar)).sc-ic-menu .option.sc-ic-menu:first-child{border-radius:1px 1px 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-menu-list-option-hover-background-color)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-menu-list-option-pressed-background-color)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{--ic-typography-color:var(\n --menu-item-desc-text-color,\n var(--ic-menu-list-option-description-text-color)\n )}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.option.sc-ic-menu .option-label.sc-ic-menu ic-typography.sc-ic-menu{max-width:100%;word-wrap:break-word}.option.sc-ic-menu .option-element.sc-ic-menu{margin-top:var(--ic-space-xxs)}.option.sc-ic-menu .option-icon.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);margin-top:var(--ic-space-xxs);margin-right:var(--ic-space-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none;width:100%}.option-text-container.show-check-icon.sc-ic-menu{width:calc(var(--ic-space-lg) * 10 + var(--ic-space-xl))}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:calc(var(--ic-space-xs) + var(--ic-space-xxxs));color:var(--ic-menu-loading-list-option-text-color);--ic-typography-color:var(--ic-menu-loading-list-option-text-color)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-atoms-status-icon-error);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);min-width:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-xs);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.option-group-title.sc-ic-menu{padding:var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);--ic-typography-color:var(--ic-menu-option-group-label-text-color)}.ic-menu-small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs)}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-menu-last-recommended-option-border)}.disabled-option.sc-ic-menu{color:var(--ic-atoms-list-option-text-disabled-light);--ic-typography-color:var(--ic-atoms-list-option-text-disabled-light);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;color:var(--ic-atoms-list-option-text-focused-light) !important;--ic-typography-color:var(\n --ic-atoms-list-option-text-focused-light\n ) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}.option-bar.sc-ic-menu{padding:var(--ic-space-xxs) var(--ic-space-xs);display:flex;align-items:center;justify-content:space-between;background-color:var(--ic-menu-option-bar-background-color);visibility:hidden;border-bottom:var(--ic-border-width) solid\n var(--ic-menu-option-bar-divider-color);border-radius:1px 1px 0 0}.option-bar.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.ic-menu-large.sc-ic-menu-h .option-bar.sc-ic-menu{padding:var(--ic-space-xs)}.select-all-button.sc-ic-menu{display:none}.select-all-button.sc-ic-menu:focus{z-index:calc(var(--ic-z-index-menu) + 1)}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}.disabled-option.sc-ic-menu{color:GrayText;--ic-typography-color:GrayText}}';const z=k;const L=class{constructor(e){i(this,e);this.icClear=n(this,"icClear",7);this.menuKeyPress=n(this,"menuKeyPress",7);this.menuOptionId=n(this,"menuOptionId",7);this.menuOptionSelect=n(this,"menuOptionSelect",7);this.menuOptionSelectAll=n(this,"menuOptionSelectAll",7);this.menuStateChange=n(this,"menuStateChange",7);this.retryButtonClicked=n(this,"retryButtonClicked",7);this.timeoutBlur=n(this,"timeoutBlur",7);this.ungroupedOptionsSet=n(this,"ungroupedOptionsSet",7);this.ACTIVE_DESCENDANT="aria-activedescendant";this.CLEAR_BUTTON_ID="clear-button";this.SEARCH_BAR_TAG="IC-SEARCH-BAR";this.disabledOptionSelected=false;this.hasPreviouslyBlurred=false;this.hasTimedOut=false;this.isLoading=false;this.isMultiSelect=false;this.isSearchBar=false;this.isSearchableSelect=false;this.lastOptionSelected=null;this.lastOptionFocused=null;this.multiOptionClicked=null;this.preventClickOpen=false;this.preventMenuFocus=false;this.shiftPressed=false;this.ungroupedOptions=[];this.focusFromSearchKeypress=false;this.initialOptionsListRender=false;this.keyboardNav=false;this.preventIncorrectTabOrder=false;this.popperProps={};this.activationType="automatic";this.autofocusOnSelected=true;this.closeOnSelect=true;this.fullWidth=false;this.labelField="label";this.searchMode="navigation";this.selectOnEnter=false;this.size="medium";this.valueField="value";this.handleClearListener=()=>{this.optionHighlighted=""};this.handleSubmitSearch=()=>{const i=this.options.findIndex((i=>i[this.valueField]===this.optionHighlighted));this.setInputValue(i)};this.handleMenuChange=(i,t)=>{var e;this.menuStateChange.emit({open:i,focusInput:t});if(!i){if(t!==false){(e=this.inputEl)===null||e===void 0?void 0:e.focus();this.preventClickOpen=false}if(this.isMultiSelect){this.optionHighlighted=undefined;this.multiOptionClicked=null}}};this.setNextOptionValue=i=>{if(this.ungroupedOptions[i+1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i+1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i+1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[0][this.valueField])})}};this.setPreviousOptionValue=i=>{if(this.ungroupedOptions[i-1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i-1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField])})}};this.getParentEl=i=>{if(i.tagName===this.SEARCH_BAR_TAG){this.isSearchBar=true}else if(i.tagName==="IC-SELECT"){if(i.getAttribute("searchable")!==null&&i.getAttribute("searchable")!==undefined){this.isSearchableSelect=true}else if(i.getAttribute("multiple")!==null&&i.getAttribute("multiple")!==undefined){this.isMultiSelect=true}}};this.arrowBehaviour=i=>{i.preventDefault();this.handleMenuChange(true)};this.getMenuOptions=()=>this.isSearchBar?this.options:this.ungroupedOptions;this.setHighlightedOption=i=>{const t=this.getMenuOptions();t[i]&&!t[i].timedOut&&(this.optionHighlighted=t[i][this.valueField]||undefined)};this.autoSetInputValueKeyboardOpen=i=>{const t=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));this.keyboardNav=false;switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);this.setNextOptionValue(t);break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);this.setPreviousOptionValue(t);break;case" ":case"Enter":if(i.target.id!==this.CLEAR_BUTTON_ID){this.handleMenuChange(true)}break}};this.selectHighlightedOption=(i,t)=>{if(!this.isLoading&&!this.hasTimedOut){this.keyboardNav=true}const e=this.isSearchBar||this.isSearchableSelect||this.open;if(e){if(t>=0){if(i[t]!==undefined){if(this.isSearchBar&&i[t].disabled===true){this.disabledOptionSelected=true}else{this.setInputValue(t)}}}else{this.setInputValue(t)}}else{this.handleMenuChange(true)}};this.isOptionSelected=i=>{const t=this.getMenuOptions();return this.value?this.value.includes(t[i][this.valueField]):false};this.deselectSelectedOptions=i=>{const t=this.getMenuOptions();if(this.value){const e=this.value.map((i=>t.findIndex((t=>t[this.valueField]===i))));e.forEach((t=>!i.includes(t)&&this.setInputValue(t)))}};this.manualSetInputValueKeyboardOpen=i=>{const t=this.getMenuOptions();const e=i.shiftKey||i.metaKey||i.ctrlKey;const s=this.getOptionHighlightedIndex();const n=t.findIndex((i=>i[this.valueField]===this.multiOptionClicked));const c=i=>{var t;return(t=Array.from(this.host.querySelectorAll("li"))[i])===null||t===void 0?void 0:t.id};if(i.key===" "&&this.isMultiSelect){this.handleOptionSelect(i,s)}else{switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);if(this.multiOptionClicked){this.setHighlightedOption(n);this.multiOptionClicked=null}else{this.handleSingleShiftSelect(i,s,t);if(s<t.length-1){this.setHighlightedOption(s+1);this.menuOptionId.emit({optionId:c(s+1)});this.handleSingleShiftSelect(i,s+1,t)}else{this.setHighlightedOption(0);this.menuOptionId.emit({optionId:c(0)});this.handleSingleShiftSelect(i,0,t)}if(this.isMultiSelect&&this.shiftPressed){this.deselectSelectedOptions([s,this.getOptionHighlightedIndex()]);this.shiftPressed=false}}this.lastOptionFocused=this.getOptionHighlightedIndex();this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);if(this.multiOptionClicked){this.setHighlightedOption(n);this.multiOptionClicked=null}else{this.handleSingleShiftSelect(i,s,t);if(s<=0||s>t.length+1){this.setHighlightedOption(t.length-1);this.menuOptionId.emit({optionId:c(t.length-1)});this.handleSingleShiftSelect(i,t.length-1,t)}else{this.setHighlightedOption(s-1);this.menuOptionId.emit({optionId:c(s-1)});this.handleSingleShiftSelect(i,s-1,t)}if(this.isMultiSelect&&this.shiftPressed){this.deselectSelectedOptions([s,this.getOptionHighlightedIndex()]);this.shiftPressed=false}}this.lastOptionFocused=this.getOptionHighlightedIndex();this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"Home":{const t=0;this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(t);this.menuOptionId.emit({optionId:c(t)});if(i.shiftKey&&i.ctrlKey){this.handleMultipleShiftSelect(t)}this.lastOptionFocused=t;this.lastOptionSelected=t;break}case"End":{const e=t.length-1;this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(e);this.menuOptionId.emit({optionId:c(e)});if(i.shiftKey&&i.ctrlKey){this.handleMultipleShiftSelect(e)}this.lastOptionFocused=e;this.lastOptionSelected=e;break}case" ":if(!e){this.keyboardNav=false}if(this.isSearchBar||this.isSearchableSelect){break}else{if(i.target.id!==this.CLEAR_BUTTON_ID){this.handleMenuChange(true)}}break;case"Enter":i.preventDefault();if(!e){this.keyboardNav=false}this.handleOptionSelect(i,s);break;case"Escape":if(this.open){i.stopImmediatePropagation()}this.handleMenuChange(false);this.menuOptionId.emit({optionId:undefined});break;case"a":if(u()&&i.metaKey||!u()&&i.ctrlKey){this.emitSelectAllEvents();this.lastOptionFocused=null;this.lastOptionSelected=null}break;case"Shift":case"Tab":if(i.key==="Shift"){this.shiftPressed=true}if(this.isSearchBar){this.keyboardNav=true}if(this.isMultiSelect){if(this.open&&!i.shiftKey&&this.selectAllButton){i.preventDefault();this.selectAllButton.focus();this.preventMenuFocus=true;this.preventClickOpen=true;this.optionHighlighted=undefined}}else{this.preventIncorrectTabOrder=true}break;default:if(!e){this.keyboardNav=false}this.focusOnSearchOrSelectInput(t,s)}}};this.setInputValue=i=>{const t=this.getMenuOptions();if(t[i]!==undefined){this.menuOptionSelect.emit({value:t[i][this.valueField]});if(this.closeOnSelect){this.optionHighlighted=undefined;this.menuOptionId.emit({optionId:undefined})}}if(this.closeOnSelect){if(!this.hasTimedOut){this.handleMenuChange(false)}else{this.parentEl.setFocus()}}};this.handleOptionClick=i=>{const{value:t,label:e}=i.target.dataset;if(this.isMultiSelect){const e=this.getMenuOptions();const s=e.findIndex((i=>i.value===t));this.handleOptionSelect(i,s,true);this.multiOptionClicked=t||null}else{this.menuOptionSelect.emit({value:t,label:e});this.handleMenuChange(false)}this.optionHighlighted=undefined};this.handleRetry=()=>{this.retryButtonClicked.emit({value:this.value})};this.handleRetryKeyDown=i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.retryButtonClicked.emit({value:this.value,keyPressed:i.key})}};this.handleBlur=i=>{var t,e,s,n;if(i.relatedTarget!==this.inputEl){if(i.relatedTarget===this.selectAllButton){(t=this.menu)===null||t===void 0?void 0:t.removeAttribute(this.ACTIVE_DESCENDANT)}if(!(((e=this.menu)===null||e===void 0?void 0:e.contains(i.relatedTarget))||i.relatedTarget===this.selectAllButton)){this.handleMenuChange(false,this.hasPreviouslyBlurred);(s=this.menu)===null||s===void 0?void 0:s.removeAttribute(this.ACTIVE_DESCENDANT);this.lastOptionFocused=null;this.lastOptionSelected=null}}else{this.handleMenuChange(false);this.preventClickOpen=true;(n=this.menu)===null||n===void 0?void 0:n.removeAttribute(this.ACTIVE_DESCENDANT);this.lastOptionFocused=null;this.lastOptionSelected=null}if(!this.isSearchBar)this.hasPreviouslyBlurred=!!i.relatedTarget};this.handleMouseDown=i=>{i.preventDefault()};this.handleMenuKeyDown=i=>{if(this.activationType==="automatic"){this.autoSetValueOnMenuKeyDown(i)}else if(this.activationType==="manual"&&!this.isSearchBar){this.manualSetInputValueKeyboardOpen(i)}};this.handleMenuKeyUp=i=>{if(i.key==="Tab"&&i.shiftKey){this.preventClickOpen=false}if(i.key==="Enter"&&this.disabledOptionSelected){this.disabledOptionSelected=false;i.stopImmediatePropagation()}if(i.key==="Shift"){this.shiftPressed=false}};this.handleSelectAllClick=()=>{var i;this.keyboardNav=false;(i=this.menu)===null||i===void 0?void 0:i.focus();this.emitSelectAllEvents();this.lastOptionFocused=null;this.lastOptionSelected=null};this.handleSelectAllBlur=i=>{var t;this.host.classList.remove("ic-select-select-all-focused");if(!((t=this.menu)===null||t===void 0?void 0:t.contains(i.relatedTarget))){this.handleMenuChange(false,false)}};this.handleSelectAllFocus=()=>{this.host.classList.add("ic-select-select-all-focused");this.lastOptionFocused=null;this.lastOptionSelected=null};this.handleSelectAllMouseDown=i=>{i.preventDefault()};this.handleSingleShiftSelect=(i,t,e)=>{if(this.isMultiSelect&&i.shiftKey&&!this.isOptionSelected(t)){this.selectHighlightedOption(e,t);this.lastOptionSelected=t}};this.handleMultipleShiftSelect=(i,t=false,e=null)=>{this.shiftPressed=false;const s=e===null?this.getFirstOptionInSelection(t):e;if(s!==null){const t=[];if(s<i){for(let e=s;e<i+1;e++){t.push(e)}}else{for(let e=s;e>i-1;e--){t.push(e)}}t.forEach((i=>!this.isOptionSelected(i)&&this.setInputValue(i)));this.deselectSelectedOptions(t)}};this.handleOptionSelect=(i,t,e=false)=>{const s=this.getMenuOptions();const n=this.getFirstOptionInSelection(e);if(i.shiftKey&&n!==null){this.handleMultipleShiftSelect(t,e,n)}else{this.selectHighlightedOption(s,t)}this.lastOptionFocused=t;this.lastOptionSelected=t};this.getFirstOptionInSelection=i=>i&&this.lastOptionFocused!==null?this.lastOptionFocused:this.lastOptionSelected!==null?this.lastOptionSelected:null;this.emitSelectAllEvents=()=>{var i,t;this.menuOptionSelectAll.emit({select:!this.value||!(((i=this.value)===null||i===void 0?void 0:i.length)===this.ungroupedOptions.length)});if(((t=this.value)===null||t===void 0?void 0:t.length)===this.ungroupedOptions.length){this.icClear.emit()}};this.emitMenuKeyPress=(i,t)=>{this.menuKeyPress.emit({isNavKey:i,key:t})};this.autoSetValueOnMenuKeyDown=i=>{var t,e;i.cancelBubble=true;const s=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));const n=!!this.inputEl&&this.inputEl.tagName==="INPUT";this.keyboardNav=false;switch(i.key){case" ":i.preventDefault();break;case"ArrowUp":if(!this.hasTimedOut){i.preventDefault();this.setPreviousOptionValue(s);this.keyboardNav=true}break;case"ArrowDown":if(!this.hasTimedOut){i.preventDefault();this.setNextOptionValue(s);this.keyboardNav=true}break;case"Home":this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField]});this.keyboardNav=true;break;case"End":this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField]});this.keyboardNav=true;break;case"Enter":!this.hasTimedOut&&this.handleMenuChange(false);break;case"Escape":this.handleMenuChange(false);break;case"Backspace":if(n){(t=this.inputEl)===null||t===void 0?void 0:t.focus()}break;case"Shift":break;default:if(n&&i.key!=="Tab"&&!this.hasTimedOut){(e=this.inputEl)===null||e===void 0?void 0:e.focus()}if(i.key.length===1){this.keyboardNav=true}break}this.emitMenuKeyPress(this.keyboardNav,i.key)};this.getOptionId=i=>`${this.menuId}-${i}`;this.getOptionAriaLabel=(i,t)=>{let e=i[this.labelField];if(i.description){e=`${e}, ${i.description}`}if(i.element){e=`${e}, ${i.element.ariaLabel}`}if(t){return`${e}, ${t[this.labelField]} group`}else{return e}};this.getSortedOptions=i=>{let t=[];if(i.sort){t=i.sort(((i,t)=>i.recommended&&!t.recommended?-1:0))}return t};this.getOptionHighlightedIndex=()=>{const i=this.getMenuOptions();return i.findIndex((i=>i[this.valueField]===this.optionHighlighted))};this.isManualMode=this.activationType==="manual";this.scrollToSelected=i=>{var t;const e=this.selectOnEnter?this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`):i.querySelector(".option[aria-selected='true']");if(e){const s=e.offsetTop+e.offsetHeight;if(s>i.scrollTop+i.offsetHeight||s<i.scrollTop+i.offsetHeight){i.scrollTop=e.offsetTop}(t=this.menu)===null||t===void 0?void 0:t.setAttribute(this.ACTIVE_DESCENDANT,e.id);e.focus()}};this.loadUngroupedOptions=()=>{if(this.options.length>0&&this.options.map){this.options.map((i=>{if(i.children){i.children.map((i=>!i.disabled&&this.ungroupedOptions.push(i)))}else if(!i.disabled){this.ungroupedOptions.push(i)}}))}this.ungroupedOptions=this.getSortedOptions(this.ungroupedOptions);this.ungroupedOptionsSet.emit({options:this.ungroupedOptions})};this.setMenuScrollbar=()=>{var i;let t=0;this.host.querySelectorAll(".option, .option-group-title").forEach((i=>t+=i.clientHeight));if(t>=320){(i=this.menu)===null||i===void 0?void 0:i.classList.add("menu-scroll")}};this.handleTimeoutBlur=i=>{this.timeoutBlur.emit({ev:i})};this.optionContent=(i,e)=>{var s;const n=!!i[this.valueField]&&!!this.value&&e&&((s=this.parentEl)===null||s===void 0?void 0:s.tagName)!==this.SEARCH_BAR_TAG;return t(c,null,i.loading&&t("ic-loading-indicator",{size:"icon"}),t("div",{class:{"option-text-container":true,"show-check-icon":n}},t("div",{class:"option-label"},i.icon&&t("div",{class:"option-icon",innerHTML:i.icon,"aria-hidden":"true"}),t("ic-typography",{variant:"body","aria-hidden":"true"},i[this.labelField])),i.description&&t("ic-typography",{id:`${this.getOptionId(i[this.valueField])}-description`,class:"option-description",variant:"caption","aria-hidden":"true"},t("p",null,i.description)),i.element&&t("div",{class:"option-element",innerHTML:i.element.component,"aria-hidden":"true"})),n&&t("span",{class:"check-icon",innerHTML:m}))};this.displayOption=(i,e,s,n)=>{const{open:o,keyboardNav:r,isManualMode:a,initialOptionsListRender:l,optionHighlighted:h,options:u}=this;return t("li",{id:this.getOptionId(i[this.valueField]),class:{option:true,"focused-option":a?(r||l)&&i[this.valueField]===h:r&&e,"last-recommended-option":!!(i.recommended&&u[s+1]&&!u[s+1].recommended),"disabled-option":!!i.disabled,"loading-option":!!i.loading,timeout:!!i.timedOut},role:"option",tabindex:o&&(e||i[this.valueField]===h)&&r?"0":"-1","aria-label":this.getOptionAriaLabel(i,n),"aria-selected":e?"true":"false","aria-disabled":i.disabled?"true":"false",onClick:!i.timedOut&&!i.loading?this.handleOptionClick:undefined,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,"data-value":i[this.valueField],"data-label":i[this.labelField]},i.timedOut?t(c,null,t("div",{class:"loading-error-info"},t("svg",{class:"error-icon-svg","aria-labelledby":"error-title",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#000000"},t("title",{id:"error-title"},"Error"),t("g",{id:"close-octagon"},t("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"}))),t("ic-typography",{variant:"label"},i[this.labelField])),t("ic-button",{size:"small",variant:"tertiary",onClick:this.handleRetry,onKeyDown:this.handleRetryKeyDown,onBlur:this.handleTimeoutBlur,id:"retry-button"},"Retry")):this.optionContent(i,e))}}watchOpenHandler(){if(!this.open&&this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}watchOptionsHandler(i){this.hasTimedOut=i.some((i=>i.timedOut));this.isLoading=i.some((i=>i.loading));this.ungroupedOptions=[];this.loadUngroupedOptions()}connectedCallback(){if(this.parentEl)this.getParentEl(this.parentEl);if(this.isSearchBar){if(this.searchMode==="navigation")this.setHighlightedOption(0);this.initialOptionsListRender=true}}disconnectedCallback(){var i,t,e;(i=this.popperInstance)===null||i===void 0?void 0:i.destroy();(t=this.parentEl)===null||t===void 0?void 0:t.removeEventListener("icClear",this.handleClearListener);(e=this.parentEl)===null||e===void 0?void 0:e.removeEventListener("icSubmitSearch",this.handleSubmitSearch)}componentWillLoad(){var i,t,e,s;this.loadUngroupedOptions();(i=this.parentEl)===null||i===void 0?void 0:i.addEventListener("icClear",this.handleClearListener);(t=this.parentEl)===null||t===void 0?void 0:t.addEventListener("icSubmitSearch",this.handleSubmitSearch);this.hasTimedOut=(e=this.options)===null||e===void 0?void 0:e.some((i=>i.timedOut));this.isLoading=(s=this.options)===null||s===void 0?void 0:s.some((i=>i.loading))}componentDidLoad(){if(this.isSearchBar&&this.parentEl.disableAutoFiltering){this.focusFromSearchKeypress=true}d([{prop:this.open,propName:"open"},{prop:this.options,propName:"options"},{prop:this.menuId,propName:"menu-id"},{prop:this.inputLabel,propName:"input-label"}],"Menu")}componentDidUpdate(){const i=this.options.some((i=>i[this.valueField]===this.value));if(this.menu&&this.open&&this.options.length!==0&&!this.preventMenuFocus){if(this.value&&this.keyboardNav&&i&&this.autofocusOnSelected&&!this.isSearchableSelect){this.scrollToSelected(this.menu)}else if(this.selectOnEnter){this.menu.focus()}else if(!!this.optionHighlighted&&!this.focusFromSearchKeypress&&!this.preventIncorrectTabOrder){const i=this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);if(i){this.menu.setAttribute(this.ACTIVE_DESCENDANT,i.id);i.focus()}}else if(this.inputEl&&this.inputEl.tagName!=="INPUT"){this.menu.focus()}}if(this.menu&&this.open&&!this.value&&this.selectOnEnter){this.scrollToSelected(this.menu)}this.preventMenuFocus=false}componentDidRender(){if(this.open&&!this.popperInstance&&this.anchorEl){this.initPopperJs(this.anchorEl)}if(this.open&&!!this.options.length){this.setMenuScrollbar()}}async handleClickOpen(){if(!this.preventClickOpen){this.menuStateChange.emit({open:!this.open});this.keyboardNav=false}this.preventClickOpen=false}async handleKeyboardOpen(i){if(this.activationType==="automatic"){this.autoSetInputValueKeyboardOpen(i)}else{this.manualSetInputValueKeyboardOpen(i)}}async handleSetFirstOption(){this.setHighlightedOption(0)}async initPopperJs(i){this.popperInstance=b(i,this.host,Object.assign({placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,7]}},{name:"flip",options:{fallbackPlacements:["top-start"],rootBoundary:"viewport"}}]},this.popperProps))}async setExternalPopperProps(i){this.popperProps=i}focusOnSearchOrSelectInput(i,t){if(!i[t])return;if(this.isSearchBar){this.parentEl.setFocus();if(this.searchMode==="navigation")this.setHighlightedOption(0)}if(this.isSearchableSelect){this.parentEl.setFocus()}this.focusFromSearchKeypress=true}render(){const{inputLabel:i,options:s,menuId:n,value:c,fullWidth:o,hasTimedOut:r,isLoading:a,size:l,open:h,inputEl:u,keyboardNav:d,parentEl:m,SEARCH_BAR_TAG:b}=this;const f=`${(c===null||c===void 0?void 0:c.length)===this.ungroupedOptions.length?"Clear":"Select"} all`;const v=this.host.classList.contains("no-results");return t(e,{key:"6c3e0c39d138c8622c3748c16294f0e21e202909",class:{"ic-menu-full-width":!!o,"ic-menu-no-focus":(u===null||u===void 0?void 0:u.tagName)==="INPUT"&&(m===null||m===void 0?void 0:m.tagName)!==b||r||a,[`ic-menu-${l}`]:true,"ic-menu-open":h&&s.length!==0,"ic-menu-multiple":this.isMultiSelect}},s.length!==0&&t("ul",{key:"69ea4424544b03896b65f0b30221872e131a04f6",id:n,class:"menu",role:"listbox","aria-label":`${i} pop-up`,"aria-multiselectable":this.isMultiSelect?"true":"false",tabindex:h&&!d&&((u===null||u===void 0?void 0:u.tagName)!=="INPUT"||(m===null||m===void 0?void 0:m.tagName)===b)?"0":"-1",ref:i=>this.menu=i,onKeyDown:this.handleMenuKeyDown,onKeyUp:this.handleMenuKeyUp,onBlur:this.handleBlur},this.getSortedOptions(s).map(((i,e)=>{if(i.children){if(i.children.length>0){return t("div",null,t("ic-typography",{class:"option-group-title",role:"presentation",variant:"subtitle-small"},t("p",null,i[this.labelField])),i.children.map((t=>t.label&&this.displayOption(t,this.isMultiSelect?c===null||c===void 0?void 0:c.includes(t[this.valueField]):t[this.valueField]===c,e,i))))}else{return null}}else{return i.label&&this.displayOption(i,this.isMultiSelect?c===null||c===void 0?void 0:c.includes(i[this.valueField]):i[this.valueField]===c,e)}}))),s.length!==0&&this.isMultiSelect&&!a&&!r&&!v&&t("div",{key:"17553f6e5ecd81b892894244b3a3a143b998c23c",class:"option-bar"},t("ic-typography",{key:"7f4ce460524beb936e4d4ef2bbbcedd03cacec5c"},t("p",{key:"aae0e564a9caf83b09d4ee8daa3d9409b7d69501"},`${c?c.length:0}/${p(this.options)} selected`)),t("ic-button",{key:"692b840395eafd8c4c5dd0f21bab2082debb44bf",class:"select-all-button","aria-label":`${f} options for ${i}`,ref:i=>this.selectAllButton=i,variant:"tertiary",onClick:this.handleSelectAllClick,onMouseDown:this.handleSelectAllMouseDown,onBlur:this.handleSelectAllBlur,onFocus:this.handleSelectAllFocus,size:l==="small"?"small":"medium"},f)))}get host(){return s(this)}static get watchers(){return{open:["watchOpenHandler"],options:["watchOptionsHandler"]}}};L.style=z;export{g as ic_input_component_container,w as ic_input_container,L as ic_menu};
|
2
|
-
//# sourceMappingURL=p-c73418dc.entry.js.map
|