@ukic/canary-web-components 3.0.0-canary.4 → 3.0.0-canary.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-36cdc6cb.js → helpers-0d86316e.js} +33 -28
- package/dist/cjs/helpers-0d86316e.js.map +1 -0
- package/dist/cjs/{helpers-a67ad3a4.js → helpers-e0da4ae1.js} +27 -25
- package/dist/cjs/helpers-e0da4ae1.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +4 -4
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +8 -5
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +3 -3
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +43 -20
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +18 -17
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +17 -8
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +20 -10
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -4
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +7 -7
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +86 -72
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +14 -9
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +14 -5
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +3 -3
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +9 -6
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +6 -7
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +4 -5
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +7 -8
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +6 -7
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +14 -7
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +22 -25
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +21 -25
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +10 -12
- 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 +16 -9
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +11 -8
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +7 -6
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +31 -6
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +5 -3
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +66 -54
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +9 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +10 -6
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +14 -10
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +5 -4
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +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 +7 -3
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -19
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +5 -2
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +20 -20
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +31 -4
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +15 -6
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +13 -7
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +13 -4
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +16 -4
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +14 -11
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +22 -10
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +10 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +70 -32
- package/dist/collection/components/ic-data-table/ic-data-table.js +116 -90
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +129 -2
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +39 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +9 -4
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +5 -5
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.css +60 -7
- package/dist/collection/components/ic-date-input/ic-date-input.js +40 -9
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.css +16 -15
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +39 -4
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +1 -5
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +8 -5
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +24 -4
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +33 -5
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +3 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.css +16 -2
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +53 -3
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/helpers.js +31 -32
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js +6 -6
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +30 -25
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +26 -24
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion.js +9 -1
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +4 -4
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +9 -5
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +3 -3
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +43 -19
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +21 -19
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +20 -9
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card-vertical.js +25 -13
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +5 -0
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +5 -0
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +11 -4
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-table-title-bar.js +6 -6
- package/dist/components/ic-data-table-title-bar.js.map +1 -1
- package/dist/components/ic-data-table.js +86 -71
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +16 -9
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +16 -5
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +4 -4
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +7 -8
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +5 -6
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +8 -9
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +7 -8
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +16 -7
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +21 -23
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +12 -17
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +8 -8
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +13 -15
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +20 -11
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +4 -4
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-button.js +13 -9
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +9 -7
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +33 -7
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +6 -4
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +5 -2
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +7 -4
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +6 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +9 -22
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +5 -5
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +8 -0
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +11 -6
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select2.js +20 -14
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +15 -11
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-status-tag.js +5 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-switch.js +9 -4
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -18
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab.js +5 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +40 -20
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +22 -22
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +38 -6
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +20 -8
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +15 -8
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +15 -4
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +19 -4
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/components/ic-typography2.js +1 -1
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +899 -123
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-006d37d0.entry.js +2 -0
- package/dist/core/p-006d37d0.entry.js.map +1 -0
- package/dist/core/p-06cda732.entry.js +2 -0
- package/dist/core/p-06cda732.entry.js.map +1 -0
- package/dist/core/{p-606ad46f.entry.js → p-07881c14.entry.js} +2 -2
- package/dist/core/{p-1d24a02a.entry.js → p-1084a7f9.entry.js} +2 -2
- package/dist/core/p-1084a7f9.entry.js.map +1 -0
- package/dist/core/p-1893f635.entry.js +2 -0
- package/dist/core/p-1893f635.entry.js.map +1 -0
- package/dist/core/{p-fbb5c8f2.entry.js → p-19f85b60.entry.js} +2 -2
- package/dist/core/p-21f6619f.entry.js +2 -0
- package/dist/core/p-21f6619f.entry.js.map +1 -0
- package/dist/core/p-2412ba0b.entry.js +2 -0
- package/dist/core/p-2412ba0b.entry.js.map +1 -0
- package/dist/core/p-2664bfab.entry.js +2 -0
- package/dist/core/p-2664bfab.entry.js.map +1 -0
- package/dist/core/{p-42f1b9cc.entry.js → p-26a41692.entry.js} +2 -2
- package/dist/core/p-29a86adf.entry.js +2 -0
- package/dist/core/p-29a86adf.entry.js.map +1 -0
- package/dist/core/p-2c38ff71.entry.js +2 -0
- package/dist/core/p-2c38ff71.entry.js.map +1 -0
- package/dist/core/p-324be8cf.entry.js +2 -0
- package/dist/core/p-324be8cf.entry.js.map +1 -0
- package/dist/core/p-3272931c.entry.js +2 -0
- package/dist/core/p-3272931c.entry.js.map +1 -0
- package/dist/core/p-34e57694.entry.js +2 -0
- package/dist/core/p-34e57694.entry.js.map +1 -0
- package/dist/core/{p-5eecd3fc.entry.js → p-35caddb3.entry.js} +2 -2
- package/dist/core/p-35caddb3.entry.js.map +1 -0
- package/dist/core/p-38aca488.entry.js +2 -0
- package/dist/core/p-38aca488.entry.js.map +1 -0
- package/dist/core/{p-878df16f.entry.js → p-39190da3.entry.js} +2 -2
- package/dist/core/p-39190da3.entry.js.map +1 -0
- package/dist/core/p-3ae329ab.entry.js +2 -0
- package/dist/core/p-3ae329ab.entry.js.map +1 -0
- package/dist/core/p-3b84953c.entry.js +2 -0
- package/dist/core/p-3b84953c.entry.js.map +1 -0
- package/dist/core/p-3bc4bc81.entry.js +2 -0
- package/dist/core/p-3bc4bc81.entry.js.map +1 -0
- package/dist/core/{p-cc22644d.entry.js → p-47f2f713.entry.js} +2 -2
- package/dist/core/p-4bcd86cf.js +2 -0
- package/dist/core/p-4bcd86cf.js.map +1 -0
- package/dist/core/{p-3b0fae40.entry.js → p-5284ccab.entry.js} +2 -2
- package/dist/core/p-5284ccab.entry.js.map +1 -0
- package/dist/core/p-5d749879.entry.js +2 -0
- package/dist/core/p-5d749879.entry.js.map +1 -0
- package/dist/core/{p-8ffdd236.entry.js → p-670c10af.entry.js} +2 -2
- package/dist/core/p-670c10af.entry.js.map +1 -0
- package/dist/core/p-68eb216b.entry.js +2 -0
- package/dist/core/p-68eb216b.entry.js.map +1 -0
- package/dist/core/{p-7c6710f8.entry.js → p-6a2ed698.entry.js} +2 -2
- package/dist/core/p-6aa0f42b.entry.js +2 -0
- package/dist/core/p-6aa0f42b.entry.js.map +1 -0
- package/dist/core/p-6d179eed.entry.js +2 -0
- package/dist/core/p-6d179eed.entry.js.map +1 -0
- package/dist/core/p-7765a219.entry.js +2 -0
- package/dist/core/p-7765a219.entry.js.map +1 -0
- package/dist/core/p-77a98aa2.entry.js +2 -0
- package/dist/core/p-77a98aa2.entry.js.map +1 -0
- package/dist/core/p-78f747ee.entry.js +2 -0
- package/dist/core/p-78f747ee.entry.js.map +1 -0
- package/dist/core/{p-80b296cd.entry.js → p-7a9de1bb.entry.js} +2 -2
- package/dist/core/{p-e6a330e4.js → p-808715e2.js} +2 -2
- package/dist/core/p-808715e2.js.map +1 -0
- package/dist/core/{p-7aa6b76e.entry.js → p-83f39782.entry.js} +2 -2
- package/dist/core/p-8e300091.entry.js +2 -0
- package/dist/core/p-8e300091.entry.js.map +1 -0
- package/dist/core/p-92398f47.entry.js +2 -0
- package/dist/core/p-92398f47.entry.js.map +1 -0
- package/dist/core/p-95d1c9e6.entry.js +2 -0
- package/dist/core/p-95d1c9e6.entry.js.map +1 -0
- package/dist/core/p-9b600ef3.entry.js +2 -0
- package/dist/core/p-9b600ef3.entry.js.map +1 -0
- package/dist/core/{p-53228014.entry.js → p-a0dfd2cf.entry.js} +2 -2
- package/dist/core/p-a0dfd2cf.entry.js.map +1 -0
- package/dist/core/p-a7cda2d6.entry.js +2 -0
- package/dist/core/p-a7cda2d6.entry.js.map +1 -0
- package/dist/core/p-aa876e5e.entry.js +2 -0
- package/dist/core/p-aa876e5e.entry.js.map +1 -0
- package/dist/core/p-b047cd84.entry.js +2 -0
- package/dist/core/p-b047cd84.entry.js.map +1 -0
- package/dist/core/p-b1c68968.entry.js +2 -0
- package/dist/core/p-b1c68968.entry.js.map +1 -0
- package/dist/core/{p-00ff3a06.entry.js → p-b7e5b682.entry.js} +2 -2
- package/dist/core/p-b7e5b682.entry.js.map +1 -0
- package/dist/core/{p-e7b6d9c5.entry.js → p-b9081a99.entry.js} +2 -2
- package/dist/core/p-b9081a99.entry.js.map +1 -0
- package/dist/core/p-c6bdbee1.entry.js +2 -0
- package/dist/core/p-c6bdbee1.entry.js.map +1 -0
- package/dist/core/p-ca4bfffd.entry.js +2 -0
- package/dist/core/p-ca4bfffd.entry.js.map +1 -0
- package/dist/core/p-ccd141a9.entry.js +2 -0
- package/dist/core/p-ccd141a9.entry.js.map +1 -0
- package/dist/core/{p-b3d93bc1.entry.js → p-d5648fdc.entry.js} +2 -2
- package/dist/core/p-d5648fdc.entry.js.map +1 -0
- package/dist/core/p-d7bc2e7f.entry.js +2 -0
- package/dist/core/p-d7bc2e7f.entry.js.map +1 -0
- package/dist/core/p-d981ef7a.entry.js +2 -0
- package/dist/core/p-d981ef7a.entry.js.map +1 -0
- package/dist/core/p-e0b556b4.entry.js +2 -0
- package/dist/core/p-e0b556b4.entry.js.map +1 -0
- package/dist/core/{p-8bec76d1.entry.js → p-eb6e3878.entry.js} +2 -2
- package/dist/core/p-eb6e3878.entry.js.map +1 -0
- package/dist/core/{p-82aa8136.entry.js → p-efd608ab.entry.js} +2 -2
- package/dist/core/p-efd608ab.entry.js.map +1 -0
- package/dist/core/p-f02d5539.entry.js +2 -0
- package/dist/core/p-f02d5539.entry.js.map +1 -0
- package/dist/core/p-f95e52d8.entry.js +2 -0
- package/dist/core/p-f95e52d8.entry.js.map +1 -0
- package/dist/core/{p-26613dbd.entry.js → p-fafc157b.entry.js} +2 -2
- package/dist/core/p-fafc157b.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-1e2516ae.js → helpers-759bbf51.js} +27 -25
- package/dist/esm/helpers-759bbf51.js.map +1 -0
- package/dist/esm/{helpers-c326255f.js → helpers-fcc7a364.js} +31 -26
- package/dist/esm/helpers-fcc7a364.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +8 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +4 -4
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +9 -6
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +3 -3
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +43 -20
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +2 -2
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +18 -17
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +17 -8
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +20 -10
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +5 -1
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +9 -4
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +7 -7
- package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -1
- package/dist/esm/ic-data-table.entry.js +86 -72
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +14 -9
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +14 -5
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +3 -3
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +9 -6
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +6 -7
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +4 -5
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +7 -8
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +6 -7
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +14 -7
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +22 -25
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +21 -25
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +10 -12
- 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 +16 -9
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +11 -8
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +7 -6
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +31 -6
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -4
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +5 -3
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +66 -54
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +6 -6
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +9 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +10 -6
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +14 -10
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +5 -4
- package/dist/esm/ic-status-tag.entry.js.map +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 +7 -3
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -19
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +5 -2
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +20 -20
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +31 -4
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +15 -6
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +13 -7
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +13 -4
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +16 -4
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +4 -3
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +8 -5
- package/dist/types/components/ic-data-table/story-data.d.ts +103 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +6 -1
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +6 -1
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +1 -1
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +7 -2
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +10 -2
- package/dist/types/components.d.ts +55 -17
- package/dist/types/utils/helpers.d.ts +9 -9
- package/dist/types/utils/types.d.ts +5 -5
- package/hydrate/index.js +736 -493
- package/package.json +3 -3
- package/dist/cjs/helpers-36cdc6cb.js.map +0 -1
- package/dist/cjs/helpers-a67ad3a4.js.map +0 -1
- package/dist/core/p-00ff3a06.entry.js.map +0 -1
- package/dist/core/p-036d251b.entry.js +0 -2
- package/dist/core/p-036d251b.entry.js.map +0 -1
- package/dist/core/p-043cf5de.js +0 -2
- package/dist/core/p-043cf5de.js.map +0 -1
- package/dist/core/p-13d2db9b.entry.js +0 -2
- package/dist/core/p-13d2db9b.entry.js.map +0 -1
- package/dist/core/p-1d24a02a.entry.js.map +0 -1
- package/dist/core/p-235b461f.entry.js +0 -2
- package/dist/core/p-235b461f.entry.js.map +0 -1
- package/dist/core/p-24d03bbd.entry.js +0 -2
- package/dist/core/p-24d03bbd.entry.js.map +0 -1
- package/dist/core/p-26613dbd.entry.js.map +0 -1
- package/dist/core/p-2873f871.entry.js +0 -2
- package/dist/core/p-2873f871.entry.js.map +0 -1
- package/dist/core/p-2a3bd99a.entry.js +0 -2
- package/dist/core/p-2a3bd99a.entry.js.map +0 -1
- package/dist/core/p-2f4bec06.entry.js +0 -2
- package/dist/core/p-2f4bec06.entry.js.map +0 -1
- package/dist/core/p-350074d4.entry.js +0 -2
- package/dist/core/p-350074d4.entry.js.map +0 -1
- package/dist/core/p-39101ffc.entry.js +0 -2
- package/dist/core/p-39101ffc.entry.js.map +0 -1
- package/dist/core/p-3b0fae40.entry.js.map +0 -1
- package/dist/core/p-50dd2744.entry.js +0 -2
- package/dist/core/p-50dd2744.entry.js.map +0 -1
- package/dist/core/p-53228014.entry.js.map +0 -1
- package/dist/core/p-574355c9.entry.js +0 -2
- package/dist/core/p-574355c9.entry.js.map +0 -1
- package/dist/core/p-5af1273f.entry.js +0 -2
- package/dist/core/p-5af1273f.entry.js.map +0 -1
- package/dist/core/p-5eecd3fc.entry.js.map +0 -1
- package/dist/core/p-620b758c.entry.js +0 -2
- package/dist/core/p-620b758c.entry.js.map +0 -1
- package/dist/core/p-637035c3.entry.js +0 -2
- package/dist/core/p-637035c3.entry.js.map +0 -1
- package/dist/core/p-6727166b.entry.js +0 -2
- package/dist/core/p-6727166b.entry.js.map +0 -1
- package/dist/core/p-6dc00a8f.entry.js +0 -2
- package/dist/core/p-6dc00a8f.entry.js.map +0 -1
- package/dist/core/p-6dffaac0.entry.js +0 -2
- package/dist/core/p-6dffaac0.entry.js.map +0 -1
- package/dist/core/p-72210cd4.entry.js +0 -2
- package/dist/core/p-72210cd4.entry.js.map +0 -1
- package/dist/core/p-7b90f0ae.entry.js +0 -2
- package/dist/core/p-7b90f0ae.entry.js.map +0 -1
- package/dist/core/p-7c3c080a.entry.js +0 -2
- package/dist/core/p-7c3c080a.entry.js.map +0 -1
- package/dist/core/p-7c663d4a.entry.js +0 -2
- package/dist/core/p-7c663d4a.entry.js.map +0 -1
- package/dist/core/p-80dee118.entry.js +0 -2
- package/dist/core/p-80dee118.entry.js.map +0 -1
- package/dist/core/p-82aa8136.entry.js.map +0 -1
- package/dist/core/p-83b4efe2.entry.js +0 -2
- package/dist/core/p-83b4efe2.entry.js.map +0 -1
- package/dist/core/p-83e4d955.entry.js +0 -2
- package/dist/core/p-83e4d955.entry.js.map +0 -1
- package/dist/core/p-85d51975.entry.js +0 -2
- package/dist/core/p-85d51975.entry.js.map +0 -1
- package/dist/core/p-878df16f.entry.js.map +0 -1
- package/dist/core/p-8bec76d1.entry.js.map +0 -1
- package/dist/core/p-8ffdd236.entry.js.map +0 -1
- package/dist/core/p-97953d8b.entry.js +0 -2
- package/dist/core/p-97953d8b.entry.js.map +0 -1
- package/dist/core/p-9a62c3b8.entry.js +0 -2
- package/dist/core/p-9a62c3b8.entry.js.map +0 -1
- package/dist/core/p-a22d335b.entry.js +0 -2
- package/dist/core/p-a22d335b.entry.js.map +0 -1
- package/dist/core/p-a22e5356.entry.js +0 -2
- package/dist/core/p-a22e5356.entry.js.map +0 -1
- package/dist/core/p-b03218df.entry.js +0 -2
- package/dist/core/p-b03218df.entry.js.map +0 -1
- package/dist/core/p-b3d93bc1.entry.js.map +0 -1
- package/dist/core/p-c1feb2b2.entry.js +0 -2
- package/dist/core/p-c1feb2b2.entry.js.map +0 -1
- package/dist/core/p-c40c57ee.entry.js +0 -2
- package/dist/core/p-c40c57ee.entry.js.map +0 -1
- package/dist/core/p-c883b5c1.entry.js +0 -2
- package/dist/core/p-c883b5c1.entry.js.map +0 -1
- package/dist/core/p-d7632baf.entry.js +0 -2
- package/dist/core/p-d7632baf.entry.js.map +0 -1
- package/dist/core/p-dcbfc485.entry.js +0 -2
- package/dist/core/p-dcbfc485.entry.js.map +0 -1
- package/dist/core/p-e6a330e4.js.map +0 -1
- package/dist/core/p-e7b6d9c5.entry.js.map +0 -1
- package/dist/core/p-ea3e2419.entry.js +0 -2
- package/dist/core/p-ea3e2419.entry.js.map +0 -1
- package/dist/core/p-f32ab3de.entry.js +0 -2
- package/dist/core/p-f32ab3de.entry.js.map +0 -1
- package/dist/core/p-f3f9acbb.entry.js +0 -2
- package/dist/core/p-f3f9acbb.entry.js.map +0 -1
- package/dist/esm/helpers-1e2516ae.js.map +0 -1
- package/dist/esm/helpers-c326255f.js.map +0 -1
- /package/dist/core/{p-606ad46f.entry.js.map → p-07881c14.entry.js.map} +0 -0
- /package/dist/core/{p-fbb5c8f2.entry.js.map → p-19f85b60.entry.js.map} +0 -0
- /package/dist/core/{p-42f1b9cc.entry.js.map → p-26a41692.entry.js.map} +0 -0
- /package/dist/core/{p-cc22644d.entry.js.map → p-47f2f713.entry.js.map} +0 -0
- /package/dist/core/{p-7c6710f8.entry.js.map → p-6a2ed698.entry.js.map} +0 -0
- /package/dist/core/{p-80b296cd.entry.js.map → p-7a9de1bb.entry.js.map} +0 -0
- /package/dist/core/{p-7aa6b76e.entry.js.map → p-83f39782.entry.js.map} +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icDateInputCss","inputIds","DateInput","this","ARIA_INVALID","ARIA_LABEL","ARIA_LABELLED_BY","EVENT_OBJECT_STRING","FIT_TO_VALUE","initialValue","value","INPUT_EVENT_OBJECT_STRING","inputsInOrder","isAfterMax","isBeforeMin","isDateSetFromKeyboardEvent","isDisabledDate","isValidDay","isValidMonth","isValidDate","isZuluTime","KEYBOARD_EVENT_OBJECT_STRING","MAX_DAY","MAX_MONTH","previousEmittedDate","undefined","previousSelectedDate","selectedDate","setInputPasteValue","input","pastedValue","inputEl","classList","add","checkSingleCopiedValueIsValid","isValid","Number","dayInputEl","monthInputEl","yearInputEl","isKeyboardOrEvent","event","Object","prototype","toString","call","setDateValidity","isEmptyString","day","month","handleInput","inputEvent","target","inputType","preventAutoFormatting","length","setInputValue","notifyScreenReader","moveToNextInput","setPreventInput","setFitToValueStyling","setValidationMessage","handleKeyDown","isInputPrevented","eventKey","_a","key","toLowerCase","regex","test","ctrlKey","metaKey","preventDefault","setPasteInvalidText","handleLeftRightArrowKeyPress","handleUpDownArrowKeyPress","preventInput","handleFocus","select","handleBlur","autocompleteInput","moveToPreviousInput","notifyScreenReaderSelectedDate","dayNames","stringEnumToArray","IcDayNames","months","IcDateInputMonths","selectedDateInfoEl","textContent","getDay","getDate","getMonth","getFullYear","minValue","maxValue","Date","handleDateChange","force","dateMatches","forEach","year","invalidDateText","setValueAndEmitChange","updateInputValues","slicePastedDate","valueLength","datePart","slice","isPastedStringDateValid","handlePaste","clipboardData","getData","setPastedValueAndValidation","setDate","date","remove","isDateOrEpoch","newDate","convertToDoubleDigits","defaultDateArray","splitStringDate","dateFormat","formatMinMax","formattedDate","clear","newValue","convertToDate","isSelectedDateDisabled","setAttribute","removeAttribute","invalidDateMessage","disablePast","disablePastMessage","minDate","disableFuture","disableFutureMessage","maxDate","disableDays","disableDaysMessage","setInputsInOrder","inputs","el","shadowRoot","querySelectorAll","push","setAriaLabelledBy","disabled","inputCompContainerEl","getAttribute","removeAriaLabelledBy","labelEl","querySelector","labelId","inputId","id","hasValidation","validationStatus","validationText","labelledBy","_b","screenReaderInfoId","getInputDescribedByText","helperText","defaultHelperText","selectedDateInfoId","assistiveHintId","isPrevented","preventDayInput","preventMonthInput","preventYearInput","getInputFromDatePart","dayInput","h","class","ref","placeholder","onPaste","inputmode","pattern","onKeyDown","monthInput","yearInput","maxLength","getInputsInOrder","dateParts","split","part","substring","getDescOfInputsOrder","description","getScreenReaderInfo","inputDescriptors","required","IcInformationStatus","Error","selectedString","selectionStart","selectionEnd","currentDate","isNotToday","toDateString","includes","currentInput","currentInputPos","findIndex","nextInput","focus","autocompleteYear","inputValue","yearNumbers","autocompletedInput","number","index","handleHostBlur","removeLabelledBy","icBlur","emit","handleHostFocus","activeElement","match","icFocus","handleFormReset","getAriaLabel","notifyScreenReaderArrowKeys","liveRegion","announcement","ariaLabel","notifyScreenReaderInput","setAriaInvalid","validDay","validMonth","validDate","disabledDate","handleClear","handleCalendarOpen","ev","stopImmediatePropagation","calendarButtonEl","displayTooltip","calendarButtonClicked","emitIcChange","handleCalendarFocus","calendarFocused","handleCalendarBlur","handleClearFocus","clearButtonFocused","handleClearBlur","relatedTarget","d","icChange","watchDisableFutureHandler","watchMaxHandler","watchDisablePastHandler","watchMinHandler","createDate","max","min","watchRequiredHandler","asteriskSpan","document","createElement","appendChild","disconnectedCallback","removeFormResetListener","componentWillLoad","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","addEventListener","componentWillUpdate","componentDidRender","setCalendarFocus","setDisableDays","days","triggerIcChange","nextParsedValue","extractDateFromZuluDateTime","pasteZuluDateTime","dateValue","isNumeric","displayPastedValidation","previousInvalidDateTest","isPasteValidationDisplayed","render","hideHelperText","hideLabel","showClearButton","showCalendarButton","size","hasCustomValidation","assistiveHint","renderHiddenInput","name","Host","onBlur","onFocus","for","role","innerHTML","Clear","onClick","variant","appearance","IcThemeForegroundEnum","Light","Dark","divider","Calendar","Default","status","message"],"sources":["src/components/ic-date-input/ic-date-input.css?tag=ic-date-input&encapsulation=shadow","src/components/ic-date-input/ic-date-input.tsx"],"sourcesContent":["@import \"../../../dist/core/normalize.css\";\n\n:host {\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n}\n\ninput {\n border: 0;\n height: 100%;\n padding: 0;\n outline: none;\n background: none;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n}\n\ninput:-webkit-autofill {\n box-shadow: 0 0 0 var(--ic-space-sm) var(--ic-architectural-white) inset;\n}\n\nic-input-component-container {\n cursor: text;\n}\n\nic-input-component-container,\nic-input-component-container:hover {\n color: var(--ic-color-text-tertiary);\n}\n\nic-input-component-container .focus-indicator {\n padding: var(--ic-space-xxxs) var(--ic-space-xs);\n align-items: center;\n}\n\n.day-input {\n width: 1.438rem;\n}\n\n.month-input {\n width: 1.813rem;\n}\n\n.year-input,\n.year-input.fit-to-value {\n width: 2.313rem;\n}\n\n.fit-to-value {\n width: 1.25rem;\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n.input-container {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n}\n\n.action-buttons {\n display: flex;\n align-items: center;\n}\n\n.show-calendar-button-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.clear-button,\n.calendar-button {\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n margin: 0;\n}\n\n.clear-button.hidden {\n display: none;\n}\n\n.clear-button:focus,\n.calendar-button:focus,\n.clear-button:active,\n.calendar-button:active {\n background-color: var(--ic-color-focus-inner) !important;\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;\n border-radius: 0.25rem;\n}\n\n.clear-button:focus,\n.calendar-button:focus,\n.clear-button:active *,\n.calendar-button:active * {\n fill: var(--ic-architectural-white);\n}\n\n.divider {\n margin: 0 var(--ic-space-xxs);\n width: var(--ic-space-1px);\n background-color: var(--ic-architectural-400);\n border-radius: var(--ic-space-1px);\n}\n\n.divider.small {\n height: var(--ic-space-md);\n}\n\n.divider.medium {\n height: calc(var(--ic-space-sm) + var(--ic-space-xs));\n}\n\n.divider.large {\n height: var(--ic-space-lg);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Host,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcSizes,\n IcThemeForegroundEnum,\n IcDateFormat,\n IcDateInputMonths,\n IcDayNames,\n IcWeekDays,\n} from \"../../utils/types\";\nimport {\n convertToDoubleDigits,\n createDate,\n dateMatches,\n extractDateFromZuluDateTime,\n isDateOrEpoch,\n splitStringDate,\n} from \"../../utils/date-helpers\";\nimport {\n addFormResetListener,\n getInputDescribedByText,\n isEmptyString,\n isNumeric,\n onComponentRequiredPropUndefined,\n removeFormResetListener,\n renderHiddenInput,\n stringEnumToArray,\n} from \"../../utils/helpers\";\nimport Clear from \"../../assets/clear-icon.svg\";\nimport Calendar from \"../../assets/calendar.svg\";\n\nlet inputIds = 0;\n\n@Component({\n tag: \"ic-date-input\",\n styleUrl: \"ic-date-input.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class DateInput {\n private ARIA_INVALID = \"aria-invalid\";\n private ARIA_LABEL = \"aria-label\";\n private ARIA_LABELLED_BY = \"aria-labelledby\";\n private assistiveHintId: string;\n private calendarButtonEl: HTMLIcButtonElement;\n private dayInputEl: HTMLInputElement;\n private defaultHelperText: string;\n private EVENT_OBJECT_STRING = \"[object Event]\";\n private FIT_TO_VALUE = \"fit-to-value\";\n\n private initialValue = this.value;\n private inputCompContainerEl: HTMLIcInputComponentContainerElement;\n private INPUT_EVENT_OBJECT_STRING = \"[object InputEvent]\";\n private inputsInOrder: HTMLInputElement[] = [];\n\n private isAfterMax: boolean = false;\n private isBeforeMin: boolean = false;\n private isDateSetFromKeyboardEvent: boolean = false;\n private isDisabledDate: boolean = false;\n private isPasteValidationDisplayed: boolean;\n private isValidDay: boolean = true;\n private isValidMonth: boolean = true;\n private isValidDate: boolean = true;\n private isZuluTime: boolean = false;\n\n private KEYBOARD_EVENT_OBJECT_STRING = \"[object KeyboardEvent]\";\n private MAX_DAY = 31;\n private MAX_MONTH = 12;\n private monthInputEl: HTMLInputElement;\n\n private preventAutoFormatting: boolean;\n private preventDayInput: boolean;\n private preventMonthInput: boolean;\n private preventYearInput: boolean;\n\n private previousInvalidDateTest: string;\n private previousEmittedDate: Date = undefined;\n private previousSelectedDate: Date = null;\n\n private selectedDate: Date = null;\n private selectedDateInfoEl: HTMLSpanElement;\n private screenReaderInfoId: string;\n private selectedDateInfoId: string;\n\n private yearInputEl: HTMLInputElement;\n\n @Element() el: HTMLIcDateInputElement;\n\n @State() day: string = \"\";\n @State() invalidDateText: string;\n @State() maxDate: Date;\n @State() minDate: Date;\n @State() month: string = \"\";\n @State() year: string = \"\";\n @State() calendarFocused: boolean = false;\n @State() clearButtonFocused: boolean = false;\n @State() removeLabelledBy: boolean = false;\n\n /**\n * The format in which the date will be displayed.\n */\n // eslint-disable-next-line sonarjs/no-duplicate-string\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\n /**\n * The days of the week to disable.\n */\n @Prop({ mutable: true }) disableDays?: IcWeekDays[] = [];\n\n /**\n * The text to display as the validation message when `disableDays` is set 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({ mutable: true }) 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 will still be read out by screen readers.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-date-input-${inputIds++}`;\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\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\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 = this.inputId;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required?: boolean = false;\n\n @Watch(\"required\")\n watchRequiredHandler(): void {\n // Prevent asterisk being read out after the label by screen reader (by applying aria-hidden)\n // Needed because label is included in 'aria-labelledby' instead of using 'aria-label'\n const labelEl = this.el.shadowRoot.querySelector(\"label\");\n if (this.required) {\n const asteriskSpan = document.createElement(\"span\");\n asteriskSpan.setAttribute(\"id\", \"asterisk-span\");\n asteriskSpan.setAttribute(\"aria-hidden\", \"true\");\n asteriskSpan.textContent = \" *\";\n labelEl?.appendChild(asteriskSpan);\n } else {\n const asteriskSpan = this.el.shadowRoot.querySelector(\"#asterisk-span\");\n if (asteriskSpan) {\n asteriskSpan.remove();\n }\n }\n }\n\n /**\n * @internal If `true`, a button which displays the calendar view when clicked will be displayed.\n */\n @Prop() showCalendarButton?: boolean = false;\n\n /**\n * If `true`, a button which clears the date input when clicked will be displayed.\n */\n @Prop() showClearButton?: boolean = true;\n\n /**\n * The size of the date input to be displayed.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The value of the date input. 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 /**\n * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in date validation.\n */\n @Prop({ mutable: true }) 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 * @internal Emitted when the calendar is opened.\n */\n @Event() calendarButtonClicked: EventEmitter<{ value: Date }>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() icBlur: EventEmitter<{ value: Date }>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<{ value: Date }>;\n\n /**\n * Emitted when the input gains focus.\n */\n @Event() icFocus: EventEmitter<{ value: Date }>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.defaultHelperText = `Use format ${this.dateFormat}`;\n\n if (isEmptyString(this.helperText))\n this.helperText = this.defaultHelperText;\n\n this.watchMinHandler();\n this.watchMaxHandler();\n\n if (this.value) {\n this.setDate(this.value);\n this.previousEmittedDate = this.selectedDate;\n } else {\n this.previousEmittedDate = null;\n }\n\n this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;\n this.assistiveHintId = `${this.inputId}-assistive-hint`;\n this.selectedDateInfoId = `${this.inputId}-selected-date-info`;\n\n addFormResetListener(this.el, this.handleFormReset);\n }\n\n componentDidLoad(): void {\n this.setInputsInOrder();\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Date Input\"\n );\n\n if (this.value) {\n this.updateInputValues(this.day, this.month, this.year);\n this.inputsInOrder.forEach((input) => {\n input.classList.add(this.FIT_TO_VALUE);\n });\n }\n\n this.setAriaInvalid(\n this.isValidDay,\n this.isValidMonth,\n this.isValidDate,\n this.isDisabledDate\n );\n\n if (this.value) {\n this.notifyScreenReaderSelectedDate();\n }\n\n this.inputsInOrder.forEach((input) => {\n input.addEventListener(\"input\", this.handleInput);\n input.addEventListener(\"focus\", this.handleFocus);\n input.addEventListener(\"blur\", this.handleBlur);\n });\n\n this.watchRequiredHandler();\n }\n\n componentWillUpdate(): void {\n if (isEmptyString(this.helperText))\n this.helperText = this.defaultHelperText;\n\n if (!this.isDateSetFromKeyboardEvent) this.setDate(this.value);\n\n this.setAriaInvalid(\n this.isValidDay,\n this.isValidMonth,\n this.isValidDate,\n this.isDisabledDate\n );\n this.handleDateChange(false);\n this.isDateSetFromKeyboardEvent = false;\n }\n\n componentDidRender(): void {\n if (this.removeLabelledBy) {\n this.removeAriaLabelledBy();\n return;\n }\n\n this.setAriaLabelledBy();\n }\n\n /**\n * Returns the value as a Date object\n * @returns Date\n */\n @Method()\n async getDate(): Promise<Date> {\n return this.selectedDate;\n }\n\n /**\n * @internal Sets focus on the calendar button.\n */\n @Method()\n async setCalendarFocus(): Promise<void> {\n if (this.calendarButtonEl) {\n this.calendarButtonEl.focus();\n }\n }\n\n /**\n * @internal Used to pass disabledDays from parent component.\n */\n @Method()\n async setDisableDays(days: IcWeekDays[]): Promise<void> {\n this.disableDays = days;\n }\n\n /**\n * @internal Used to enable other components to invoke an IcChange event from the input.\n */\n @Method()\n async triggerIcChange(d: Date): Promise<void> {\n this.emitIcChange(d);\n }\n\n private setInputPasteValue = (input: EventTarget, pastedValue: string) => {\n const inputEl = input as HTMLInputElement;\n\n inputEl.value = pastedValue;\n inputEl.classList.add(this.FIT_TO_VALUE);\n };\n\n private checkSingleCopiedValueIsValid = (\n input: EventTarget,\n pastedValue: string\n ) => {\n let isValid = false;\n const value = Number(pastedValue);\n\n switch (input) {\n case this.dayInputEl:\n isValid = value >= 1 && value <= this.MAX_DAY;\n break;\n case this.monthInputEl:\n isValid = value >= 1 && value <= this.MAX_MONTH;\n break;\n case this.yearInputEl:\n isValid = true;\n break;\n default:\n isValid = false;\n break;\n }\n\n return isValid;\n };\n\n /**\n * Using Object.prototype.string to determine type if event from user\n * @param event - event object used to differentiate keyboard, generic or input event\n * @returns boolean\n */\n private isKeyboardOrEvent = (event: Event) => {\n return (\n Object.prototype.toString.call(event) === this.EVENT_OBJECT_STRING ||\n Object.prototype.toString.call(event) ===\n this.KEYBOARD_EVENT_OBJECT_STRING\n );\n };\n\n private setDateValidity = () => {\n if (!isEmptyString(this.day)) {\n this.isValidDay = +this.day > this.MAX_DAY ? false : true;\n } else {\n this.isValidDay = true;\n }\n\n if (!isEmptyString(this.month)) {\n this.isValidMonth = +this.month > this.MAX_MONTH ? false : true;\n } else {\n this.isValidMonth = true;\n }\n };\n\n private handleInput = (event: Event) => {\n const inputEvent = event as InputEvent;\n const input = event.target as HTMLInputElement;\n\n if (input !== this.yearInputEl) {\n // Only auto-format if input event is not a character being deleted\n // and not as user is changing value using up / down keys\n if (\n inputEvent.inputType !== \"deleteContentBackward\" &&\n !this.preventAutoFormatting\n ) {\n if (\n input.value.length === 1 &&\n ((input === this.dayInputEl && +input.value >= 4) ||\n (input === this.monthInputEl && +input.value >= 2)) &&\n +input.value <= 9\n ) {\n this.setInputValue(input);\n this.notifyScreenReader(input, event);\n this.moveToNextInput(input);\n }\n\n if (input.value.length === 2) {\n if (+input.value === 0) {\n input.value = \"01\";\n }\n this.setInputValue(input);\n this.setPreventInput(input, true);\n this.notifyScreenReader(input, event);\n this.moveToNextInput(input);\n } else {\n this.setPreventInput(input, false);\n }\n } else if (this.preventAutoFormatting) {\n /**\n * Using arrow keys prevents auto formatting so need to deal with\n * switching from arrow keys to inputting numbers\n **/\n if (input.value.length === 2 && !this.isKeyboardOrEvent(event)) {\n this.setInputValue(input);\n this.setPreventInput(input, true);\n this.moveToNextInput(input);\n } else {\n this.setInputValue(input);\n }\n }\n\n if (input.value.length !== 2) {\n this.setPreventInput(input, false);\n }\n } else {\n if (input.value.length === 4) {\n this.setInputValue(input);\n if (\n Object.prototype.toString.call(event) !== this.EVENT_OBJECT_STRING\n ) {\n this.moveToNextInput(input);\n }\n this.setPreventInput(input, true);\n } else {\n this.setInputValue(input, true);\n this.setPreventInput(input, false);\n }\n }\n\n // Add / remove class to make input width match size of value i.e. 2 digits' width for day / month, 4 for year\n this.setFitToValueStyling(input);\n\n if (input.value.length === 0) {\n this.setInputValue(input, true);\n this.setValidationMessage();\n }\n\n this.notifyScreenReader(input, event);\n };\n\n private handleKeyDown = (event: KeyboardEvent, isInputPrevented: boolean) => {\n const input = event.target as HTMLInputElement;\n\n const eventKey = event.key?.toLowerCase();\n // Regex required due to FF allowing all characters as values for number text field.\n const regex =\n /-?\\d*\\.?\\d+(e[-+]?\\d+)?|[/-]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;\n if (\n !regex.test(eventKey) &&\n !(\n (event.ctrlKey || event.metaKey) &&\n (eventKey === \"v\" || eventKey === \"c\")\n )\n ) {\n event.preventDefault();\n }\n\n switch (eventKey) {\n case \"/\":\n case \"-\":\n case \".\":\n event.preventDefault();\n this.setPasteInvalidText();\n this.moveToNextInput(input);\n break;\n case \"arrowright\":\n case \"arrowleft\":\n event.preventDefault();\n this.handleLeftRightArrowKeyPress(input, eventKey);\n break;\n case \"arrowup\":\n case \"arrowdown\":\n this.preventAutoFormatting = true;\n this.handleUpDownArrowKeyPress(input, event);\n break;\n default:\n break;\n }\n\n this.preventInput(event, isInputPrevented);\n this.isDateSetFromKeyboardEvent = true;\n };\n\n private handleFocus = (event: FocusEvent) => {\n // Highlight / select all characters in input for easy replacement\n const input = event.target as HTMLInputElement;\n\n input.select();\n };\n\n private handleBlur = (event: FocusEvent) => {\n const input = event.target as HTMLInputElement;\n\n this.setPasteInvalidText();\n this.autocompleteInput(input);\n };\n\n private handleLeftRightArrowKeyPress = (\n input: HTMLInputElement,\n key: string\n ) => {\n if (key === \"arrowright\") {\n this.moveToNextInput(input);\n } else {\n this.moveToPreviousInput(input);\n }\n\n this.setPasteInvalidText();\n };\n\n private notifyScreenReaderSelectedDate = () => {\n const dayNames = stringEnumToArray(IcDayNames);\n const months = stringEnumToArray(IcDateInputMonths);\n\n this.selectedDateInfoEl.textContent = `Selected date: ${\n dayNames[this.selectedDate.getDay()]\n }, ${this.selectedDate.getDate()} ${\n months[this.selectedDate.getMonth()]\n } ${this.selectedDate.getFullYear()}`;\n };\n\n private handleUpDownArrowKeyPress = (\n input: HTMLInputElement,\n event: KeyboardEvent\n ) => {\n const minValue = input === this.yearInputEl ? 0 : 1;\n\n let maxValue;\n\n switch (input) {\n case this.dayInputEl:\n maxValue = this.MAX_DAY;\n break;\n case this.monthInputEl:\n maxValue = this.MAX_MONTH;\n break;\n case this.yearInputEl:\n maxValue = 9999;\n }\n\n // Make value loop round when min / max reached\n if (input?.value) {\n if (event.key === \"ArrowUp\") {\n if (+input.value === maxValue) {\n event.preventDefault();\n input.value = `0${minValue}`;\n } else {\n input.value =\n +input.value + 1 < 10\n ? `0${+input.value + 1}`\n : (+input.value + 1).toString();\n }\n this.notifyScreenReader(input, event);\n }\n\n if (event.key === \"ArrowDown\") {\n if (+input.value === minValue) {\n event.preventDefault();\n input.value = maxValue.toString();\n } else {\n input.value =\n +input.value - 1 < 10\n ? `0${+input.value - 1}`\n : (+input.value - 1).toString();\n }\n this.notifyScreenReader(input, event);\n }\n } else {\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n if (input === this.yearInputEl) {\n input.value = new Date().getFullYear().toString();\n } else {\n input.value = maxValue.toString();\n }\n this.notifyScreenReader(input, event);\n } else if (event.key === \"ArrowUp\") {\n event.preventDefault();\n if (input === this.yearInputEl) {\n input.value = new Date().getFullYear().toString();\n } else {\n input.value = `0${minValue}`;\n }\n this.notifyScreenReader(input, event);\n }\n }\n\n this.setInputValue(input);\n this.setFitToValueStyling(input);\n };\n\n private handleDateChange = (force: boolean) => {\n // Prevent icChange being emitted when each individual input is changed\n // This method is used within componentWillUpdate instead of using @Watch('value');\n if (force || !dateMatches(this.selectedDate, this.previousSelectedDate)) {\n if (this.value) {\n this.inputsInOrder.forEach((input) => {\n input.classList.add(this.FIT_TO_VALUE);\n });\n }\n if (this.day && this.month && this.year && this.invalidDateText === \"\") {\n this.setValueAndEmitChange(this.selectedDate);\n this.notifyScreenReaderSelectedDate();\n } else if (\n !(this.selectedDate === null && this.previousSelectedDate === null)\n ) {\n this.setValueAndEmitChange(null);\n this.selectedDateInfoEl.textContent = \"\";\n }\n this.previousSelectedDate = this.selectedDate;\n\n if (!this.isDateSetFromKeyboardEvent) {\n this.updateInputValues(this.day, this.month, this.year);\n }\n }\n };\n\n private slicePastedDate = (valueLength: number, datePart: string): string => {\n return datePart.length > valueLength\n ? datePart.slice(0, valueLength)\n : datePart;\n };\n\n private isPastedStringDateValid = (value: string) => {\n if (\n /\\d+-\\d+-\\d+$/.test(value) ||\n /\\d+\\/\\d+\\/\\d+/.test(value) ||\n /\\d+\\.\\d+\\.\\d+/.test(value)\n ) {\n return true;\n }\n\n if (\n /[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:\\.\\d+)?)?Z/.test(\n value\n )\n ) {\n this.isZuluTime = true;\n return true;\n }\n\n return false;\n };\n\n // Set value of each input to value of pasted date part\n // Allows formats separated by '-' or '/'\n private handlePaste = (event: ClipboardEvent) => {\n event.preventDefault();\n\n const pastedValue = event.clipboardData.getData(\"Text\");\n const isValidDate = this.isPastedStringDateValid(pastedValue);\n\n this.setPastedValueAndValidation(isValidDate, pastedValue, event);\n };\n\n private setDate = (date: string | Date) => {\n if (date === null || date === \"\" || date === undefined) {\n this.day = null;\n this.month = null;\n this.year = null;\n this.inputsInOrder.forEach((input) => {\n input.classList.remove(this.FIT_TO_VALUE);\n this.setPreventInput(input, false);\n });\n this.handleDateChange(true);\n } else {\n if (isDateOrEpoch(date)) {\n let newDate;\n if (typeof date === \"string\") {\n // Checking if epoch date time\n newDate = new Date(+date);\n } else {\n newDate = date;\n }\n\n this.day = convertToDoubleDigits(newDate.getDate());\n this.month = convertToDoubleDigits(newDate.getMonth() + 1);\n this.year = newDate.getFullYear().toString();\n } else if (typeof date === \"string\") {\n const defaultDateArray = splitStringDate(date, this.dateFormat);\n this.year = defaultDateArray[0];\n this.month = defaultDateArray[1];\n this.day = defaultDateArray[2];\n }\n }\n\n this.setValidationMessage();\n };\n\n private formatMinMax = (date: Date) => {\n let formattedDate;\n\n const day = convertToDoubleDigits(date.getDate());\n const month = convertToDoubleDigits(date.getMonth() + 1);\n const year = date.getFullYear();\n\n switch (this.dateFormat) {\n case \"DD/MM/YYYY\":\n formattedDate = `${day}/${month}/${year}`;\n break;\n case \"MM/DD/YYYY\":\n formattedDate = `${month}/${day}/${year}`;\n break;\n case \"YYYY/MM/DD\":\n formattedDate = `${year}/${month}/${day}`;\n break;\n default:\n break;\n }\n return formattedDate;\n };\n private updateInputValues = (day: string, month: string, year: string) => {\n this.dayInputEl.value = day;\n this.monthInputEl.value = month;\n this.yearInputEl.value = year;\n };\n\n // Set value in state based on input\n private setInputValue = (input: HTMLInputElement, clear = false) => {\n const newValue = clear ? \"\" : input.value;\n\n switch (input) {\n case this.dayInputEl:\n this.day = newValue;\n break;\n case this.monthInputEl:\n this.month = newValue;\n break;\n case this.yearInputEl:\n if (this.year !== newValue) {\n this.year = newValue;\n }\n }\n\n this.setValidationMessage();\n };\n\n private setValidationMessage = () => {\n this.setDateValidity();\n\n if (\n !isEmptyString(this.day) &&\n !isEmptyString(this.month) &&\n !isEmptyString(this.year)\n ) {\n // Check whether date actually exists\n // (used https://www.hectane.com/blog/javascript-date-validation-with-leap-year)\n this.selectedDate = this.convertToDate(this.year, this.month, this.day);\n this.isValidDate =\n +this.selectedDate !== 0 && this.selectedDate.getDate() == +this.day;\n this.isDisabledDate = this.isSelectedDateDisabled();\n\n if (!this.isValidDate || this.isDisabledDate) {\n this.inputsInOrder.forEach((input) =>\n input.setAttribute(this.ARIA_INVALID, \"true\")\n );\n } else {\n this.inputsInOrder.forEach((input) =>\n input.removeAttribute(this.ARIA_INVALID)\n );\n }\n } else {\n this.selectedDate = null;\n }\n\n if (!(this.isValidDay && this.isValidMonth && this.isValidDate)) {\n this.invalidDateText = this.invalidDateMessage;\n } else if (this.isDisabledDate && this.selectedDate !== null) {\n if (this.isBeforeMin) {\n if (this.disablePast) {\n this.invalidDateText = this.disablePastMessage;\n } else {\n this.invalidDateText = `Please enter a date after ${this.formatMinMax(\n this.minDate\n )}.`;\n }\n } else if (this.isAfterMax) {\n if (this.disableFuture) {\n this.invalidDateText = this.disableFutureMessage;\n } else {\n this.invalidDateText = `Please enter a date before ${this.formatMinMax(\n this.maxDate\n )}.`;\n }\n } else if (this.disableDays.length !== 0) {\n this.invalidDateText = this.disableDaysMessage;\n } else {\n if (this.disablePast) {\n this.invalidDateText = this.disablePastMessage;\n }\n if (this.disableFuture) {\n this.invalidDateText = this.disableFutureMessage;\n }\n }\n } else {\n this.invalidDateText = \"\";\n }\n };\n\n // Set refs to the input elements in the order they are displayed (based on the dateFormat)\n private setInputsInOrder = () => {\n const inputs = this.el.shadowRoot.querySelectorAll(\"input\");\n inputs.forEach((input) => this.inputsInOrder.push(input));\n };\n\n // Includes text usually added using aria-describedby\n // (which doesn't work on input component container)\n private setAriaLabelledBy = () => {\n if (\n this.disabled &&\n !isEmptyString(\n this.inputCompContainerEl?.getAttribute(this.ARIA_LABELLED_BY)\n )\n ) {\n this.removeAriaLabelledBy();\n return;\n }\n\n if (this.disabled) {\n return;\n }\n\n const labelEl = this.el.shadowRoot.querySelector(\"label\");\n const labelId = `${this.inputId}-label`;\n\n if (labelEl !== null && labelEl !== undefined) {\n labelEl.id = labelId;\n }\n\n const hasValidation =\n (!isEmptyString(this.validationStatus) &&\n !isEmptyString(this.validationText)) ||\n !isEmptyString(this.invalidDateText);\n\n const labelledBy = `${labelEl?.id ?? \"\"} ${\n this.screenReaderInfoId\n } ${getInputDescribedByText(\n this.inputId,\n this.helperText !== \"\" && this.helperText !== this.defaultHelperText,\n hasValidation\n )} ${this.selectedDate ? this.selectedDateInfoId : \"\"} ${\n this.assistiveHintId\n }`;\n\n this.inputCompContainerEl.setAttribute(this.ARIA_LABELLED_BY, labelledBy);\n };\n\n // Sets boolean for each input, used to limit the number of characters within each field (2 for day / month, 4 for year)\n private setPreventInput = (input: HTMLInputElement, isPrevented: boolean) => {\n switch (input) {\n case this.dayInputEl:\n this.preventDayInput = isPrevented;\n break;\n case this.monthInputEl:\n this.preventMonthInput = isPrevented;\n break;\n case this.yearInputEl:\n this.preventYearInput = isPrevented;\n }\n };\n\n // Get input based on letter representing each date part (\"D\", \"M\" or \"Y\")\n // (retrieved from dateFormat)\n private getInputFromDatePart = (datePart: string) => {\n const dayInput = (\n <input\n class=\"day-input\"\n id=\"day-input\"\n ref={(el) => (this.dayInputEl = el)}\n aria-label=\"day\"\n placeholder=\"DD\"\n disabled={this.disabled}\n onPaste={this.handlePaste}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onKeyDown={(event) => this.handleKeyDown(event, this.preventDayInput)}\n ></input>\n );\n\n const monthInput = (\n <input\n id=\"month-input\"\n class=\"month-input\"\n ref={(el) => (this.monthInputEl = el)}\n aria-label=\"month\"\n placeholder=\"MM\"\n disabled={this.disabled}\n onPaste={this.handlePaste}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onKeyDown={(event) => this.handleKeyDown(event, this.preventMonthInput)}\n ></input>\n );\n\n const yearInput = (\n <input\n id=\"year-input\"\n class=\"year-input\"\n ref={(el) => (this.yearInputEl = el)}\n aria-label=\"year\"\n placeholder=\"YYYY\"\n maxLength={4}\n disabled={this.disabled}\n onPaste={this.handlePaste}\n inputmode=\"number\"\n pattern=\"[0-9]*\"\n onKeyDown={(event) => this.handleKeyDown(event, this.preventYearInput)}\n ></input>\n );\n\n let input;\n\n switch (datePart) {\n case \"D\":\n input = dayInput;\n break;\n case \"M\":\n input = monthInput;\n break;\n case \"Y\":\n input = yearInput;\n }\n\n return input;\n };\n\n // Get input elements in order of chosen date format\n private getInputsInOrder = () => {\n const dateParts = this.dateFormat.split(\"/\");\n\n const inputsInOrder: HTMLInputElement[] = [];\n\n dateParts.forEach((part: string) => {\n inputsInOrder.push(this.getInputFromDatePart(part.substring(0, 1)));\n });\n\n return inputsInOrder;\n };\n\n // To add to the end of assistive hint to make it clearer that each date part has its own input\n // that can be changed individually\n private getDescOfInputsOrder = () => {\n let description;\n\n switch (this.dateFormat) {\n case \"DD/MM/YYYY\":\n description = \"day, month, and year\";\n break;\n case \"MM/DD/YYYY\":\n description = \"month, day, and year\";\n break;\n case \"YYYY/MM/DD\":\n description = \"year, month, and day\";\n }\n\n return description;\n };\n\n // Add 'required' or 'invalid data' to span used in aria-labelledby\n // Many ARIA attributes aren't read out by screen reader when on the input component container\n private getScreenReaderInfo = (validationStatus: string) => {\n let inputDescriptors = \"\";\n\n if (this.required) {\n inputDescriptors += \"required\";\n }\n\n if (validationStatus === IcInformationStatus.Error) {\n inputDescriptors += \" invalid data\";\n }\n\n return inputDescriptors === \"\" ? \"\" : inputDescriptors + \", \";\n };\n\n // Prevent non-number characters being entered\n // ('e' or '.' - which are usually allowed in <input type=\"number\">)\n // And limit the number of characters within each field (2 for day / month, 4 for year)\n // (because 'maxlength' doesn't work on <input type=\"number\">)\n private preventInput = (event: KeyboardEvent, isInputPrevented: boolean) => {\n const key = event.key;\n const input = event.target as HTMLInputElement;\n let selectedString;\n\n if (input) {\n selectedString = input.value.substring(\n input.selectionStart,\n input.selectionEnd\n );\n }\n\n if (\n key === \"e\" ||\n key === \".\" ||\n key === \"-\" ||\n (event.key >= \"0\" &&\n event.key <= \"9\" &&\n isInputPrevented &&\n !selectedString)\n ) {\n event.preventDefault();\n }\n };\n\n // Get whether date has been disabled using disableFuture or disablePast prop, but always allow current day\n // Consider using dateClamp and inDateRange\n private isSelectedDateDisabled = () => {\n const currentDate = new Date();\n this.isAfterMax = false;\n this.isBeforeMin = false;\n\n let disabled = false;\n const isNotToday =\n this.selectedDate.toDateString() !== currentDate.toDateString();\n\n if (this.minDate && this.selectedDate < this.minDate && isNotToday) {\n this.isBeforeMin = true;\n disabled = true;\n }\n\n if (this.maxDate && this.selectedDate > this.maxDate && isNotToday) {\n this.isAfterMax = true;\n disabled = true;\n }\n\n if (this.disableDays.includes(this.selectedDate.getDay())) {\n disabled = true;\n }\n\n if (\n ((this.disablePast && this.selectedDate < currentDate) ||\n (this.disableFuture && this.selectedDate > currentDate)) &&\n isNotToday\n ) {\n disabled = true;\n }\n\n return disabled;\n };\n\n private moveToNextInput = (currentInput: HTMLInputElement) => {\n const currentInputPos = this.inputsInOrder.findIndex(\n (input) => input === currentInput\n );\n const nextInput = this.inputsInOrder[currentInputPos + 1];\n\n this.preventAutoFormatting = false;\n\n if (nextInput) {\n nextInput.focus();\n }\n };\n\n private moveToPreviousInput = (currentInput: HTMLInputElement) => {\n const currentInputPos = this.inputsInOrder.findIndex(\n (input) => input === currentInput\n );\n\n this.preventAutoFormatting = false;\n\n if (this.inputsInOrder[currentInputPos - 1]) {\n this.inputsInOrder[currentInputPos - 1].focus();\n }\n };\n\n private autocompleteInput = (input: HTMLInputElement) => {\n if (input === this.yearInputEl) {\n this.autocompleteYear();\n } else {\n const inputValue = input.value;\n\n // Autocomplete input as 2 characters (leading zero) when only 1 character entered (for day and month)\n if (inputValue.length === 1) {\n if (+inputValue === 0) {\n input.value = \"01\";\n } else {\n input.value = `0${inputValue}`;\n }\n }\n }\n\n if (input.value) {\n this.setInputValue(input);\n }\n };\n\n // Autocomplete year as current millennium when fewer than 4 characters entered\n private autocompleteYear = () => {\n const inputValue = this.yearInputEl.value;\n const yearNumbers = [\"2\", \"0\", \"0\"];\n\n let autocompletedInput = \"\";\n\n if (inputValue) {\n yearNumbers.forEach((number, index) => {\n if (inputValue.length + index <= 3) {\n autocompletedInput += number;\n }\n });\n\n this.yearInputEl.value = `${autocompletedInput}${inputValue}`;\n }\n };\n\n private convertToDate = (\n year: string,\n month: string,\n day: string\n ): Date | null => {\n if (!isEmptyString(year) && !isEmptyString(month) && !isEmptyString(day)) {\n return new Date(+year, +month - 1, +day);\n } else {\n return null;\n }\n };\n\n private handleHostBlur = () => {\n this.removeLabelledBy = false;\n this.icBlur.emit({ value: this.selectedDate });\n };\n\n private handleHostFocus = () => {\n if (this.el.shadowRoot.activeElement?.id.match(/(day|month|year)-input$/)) {\n this.removeLabelledBy = false;\n } else {\n this.removeLabelledBy = true;\n }\n this.icFocus.emit({ value: this.selectedDate });\n };\n\n private handleFormReset = () => {\n // Get the initial value and populate day, month and year again.\n this.setDate(this.initialValue);\n this.setValidationMessage();\n this.handleDateChange(false);\n };\n\n private getAriaLabel = (input: HTMLInputElement): string => {\n return input.getAttribute(this.ARIA_LABEL);\n };\n\n private notifyScreenReaderArrowKeys = (input: HTMLInputElement) => {\n const liveRegion = this.el.shadowRoot.querySelector(\"#live-region\");\n let announcement = \"\";\n const ariaLabel = this.getAriaLabel(input);\n\n if (liveRegion && input.value) {\n if (\n input === this.monthInputEl &&\n !!IcDateInputMonths[+input.value - 1]\n ) {\n announcement = `${input.value} - ${\n IcDateInputMonths[+input.value - 1]\n }, ${ariaLabel}`;\n }\n\n if (input === this.dayInputEl || input === this.yearInputEl) {\n announcement = `${input.value}, ${ariaLabel}`;\n }\n\n liveRegion.textContent = announcement;\n }\n };\n\n private removeAriaLabelledBy() {\n this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY);\n }\n\n private setPastedValueAndValidation(\n isValidDate: boolean,\n pastedValue: string,\n event: ClipboardEvent\n ) {\n switch (true) {\n case isValidDate: {\n const nextParsedValue = this.isZuluTime\n ? extractDateFromZuluDateTime(pastedValue)\n : pastedValue;\n const dateParts = nextParsedValue.split(/-|\\/|\\./);\n this.inputsInOrder.forEach((input, index) => {\n input.classList.add(this.FIT_TO_VALUE);\n\n if (this.isZuluTime) {\n this.pasteZuluDateTime(dateParts, index);\n } else {\n let dateValue;\n\n if (input === this.dayInputEl || input === this.monthInputEl) {\n dateValue = this.slicePastedDate(2, dateParts[index]);\n } else {\n dateValue = this.slicePastedDate(4, dateParts[index]);\n }\n\n input.value = dateValue;\n\n this.setInputValue(input);\n this.autocompleteInput(input);\n }\n });\n this.isZuluTime = false;\n break;\n }\n\n case (pastedValue.length === 1 ||\n pastedValue.length === 2 ||\n pastedValue.length === 4) &&\n isNumeric(pastedValue):\n if (this.checkSingleCopiedValueIsValid(event.target, pastedValue)) {\n // Check if copied value can be pasted into input\n this.setInputPasteValue(event.target, pastedValue);\n this.setInputValue(event.target as HTMLInputElement);\n } else {\n this.displayPastedValidation(event);\n }\n break;\n\n case pastedValue.length === 3 && isNumeric(pastedValue):\n if (event.target !== this.yearInputEl) {\n this.displayPastedValidation(event);\n } else {\n this.setInputPasteValue(event.target, pastedValue);\n this.setInputValue(event.target as HTMLInputElement);\n }\n break;\n\n case pastedValue.length >= 5 && isNumeric(pastedValue):\n this.displayPastedValidation(event);\n }\n }\n\n private pasteZuluDateTime(dateParts: string[], index: number) {\n // ['YYYY', 'MM', 'DD']\n if (index === 0) {\n const dateValue = this.slicePastedDate(4, dateParts[index]);\n this.yearInputEl.value = dateValue;\n this.setInputValue(this.yearInputEl);\n } else if (index === 1) {\n // The month value is the second item in the array\n const dateValue = this.slicePastedDate(2, dateParts[index]);\n this.monthInputEl.value = dateValue;\n this.setInputValue(this.monthInputEl);\n } else {\n const dateValue = this.slicePastedDate(2, dateParts[index]);\n this.dayInputEl.value = dateValue;\n this.setInputValue(this.dayInputEl);\n }\n }\n\n private displayPastedValidation(event: ClipboardEvent) {\n if (this.invalidDateText?.length > 0) {\n this.previousInvalidDateTest = this.invalidDateText;\n }\n\n this.invalidDateText = `Please paste a valid ${this.getAriaLabel(\n event.target as HTMLInputElement\n )}`;\n\n this.validationStatus = IcInformationStatus.Error;\n this.isPasteValidationDisplayed = true;\n }\n\n private setPasteInvalidText() {\n if (this.isPasteValidationDisplayed) {\n this.invalidDateText = this.previousInvalidDateTest ?? \"\";\n this.isPasteValidationDisplayed = false;\n\n // This is to prevent setDate from triggering within componentWillUpdate\n this.isDateSetFromKeyboardEvent = true;\n }\n }\n\n private notifyScreenReader(input: HTMLInputElement, event: Event) {\n const liveRegion = this.el.shadowRoot.querySelector(\"#live-region\");\n\n if (liveRegion) {\n if (this.isKeyboardOrEvent(event)) {\n this.notifyScreenReaderArrowKeys(input);\n } else if (\n Object.prototype.toString.call(event) === this.INPUT_EVENT_OBJECT_STRING\n ) {\n this.notifyScreenReaderInput(input, liveRegion as HTMLElement);\n }\n }\n }\n\n private notifyScreenReaderInput = (\n input: HTMLInputElement,\n liveRegion: HTMLElement\n ) => {\n let announcement = \"\";\n const ariaLabel = this.getAriaLabel(input);\n\n if (input === this.dayInputEl || input === this.monthInputEl) {\n if (input.value.length === 2) {\n if (\n input === this.monthInputEl &&\n !!IcDateInputMonths[+input.value - 1] &&\n this.isValidMonth\n ) {\n announcement = `${input.value} - ${\n IcDateInputMonths[+input.value - 1]\n }, ${ariaLabel}`;\n }\n\n if (input === this.dayInputEl && this.isValidDay) {\n announcement = `${input.value}, ${ariaLabel}`;\n }\n } else {\n announcement = \"\";\n }\n } else {\n if (input.value.length === 4) {\n announcement = `${input.value}, ${ariaLabel}`;\n } else {\n announcement = \"\";\n }\n }\n liveRegion.textContent = announcement;\n };\n\n private setFitToValueStyling = (input: HTMLInputElement) => {\n if (input.value) {\n input.classList.add(this.FIT_TO_VALUE);\n } else {\n input.classList.remove(this.FIT_TO_VALUE);\n }\n };\n\n private setAriaInvalid = (\n validDay: boolean,\n validMonth: boolean,\n validDate: boolean,\n disabledDate: boolean\n ) => {\n if (this.inputsInOrder.length) {\n this.inputsInOrder.forEach((input) => {\n input.removeAttribute(this.ARIA_INVALID);\n });\n\n if (!validDay) {\n this.dayInputEl.setAttribute(this.ARIA_INVALID, \"true\");\n }\n\n if (!validMonth) {\n this.monthInputEl.setAttribute(this.ARIA_INVALID, \"true\");\n }\n\n if (!validDate || disabledDate) {\n this.inputsInOrder.forEach((input) => {\n input.setAttribute(this.ARIA_INVALID, \"true\");\n });\n }\n }\n };\n\n private handleClear = () => {\n this.inputsInOrder.forEach((input) => {\n input.classList.remove(this.FIT_TO_VALUE);\n this.setInputValue(input, true);\n this.setPreventInput(input, false);\n });\n this.isDateSetFromKeyboardEvent = false;\n this.setValidationMessage();\n this.handleDateChange(true);\n\n this.inputsInOrder[0].focus();\n };\n\n private handleCalendarOpen = (ev: MouseEvent) => {\n ev.stopImmediatePropagation();\n this.calendarButtonEl?.shadowRoot\n .querySelector(\"ic-tooltip\")\n .displayTooltip(false);\n this.calendarButtonClicked.emit({ value: this.selectedDate });\n this.calendarButtonEl?.shadowRoot\n .querySelector(\"ic-tooltip\")\n .displayTooltip(false);\n this.isDateSetFromKeyboardEvent = false;\n };\n\n private setValueAndEmitChange = (value: Date) => {\n if (!dateMatches(new Date(this.value), value)) {\n this.emitIcChange(value);\n this.value = value;\n }\n };\n\n private handleCalendarFocus = () => {\n this.calendarFocused = true;\n };\n\n private handleCalendarBlur = () => {\n this.calendarFocused = false;\n };\n\n private handleClearFocus = () => {\n this.removeLabelledBy = true;\n this.clearButtonFocused = true;\n };\n\n private handleClearBlur = (ev: FocusEvent) => {\n this.clearButtonFocused = false;\n if ((ev.relatedTarget as HTMLElement)?.id.match(/(day|year)-input$/)) {\n this.removeLabelledBy = false;\n return;\n }\n\n this.removeLabelledBy = true;\n };\n\n private emitIcChange = (d: Date) => {\n if (\n !(d === null && this.previousEmittedDate === null) &&\n !dateMatches(d, this.previousEmittedDate)\n ) {\n this.previousEmittedDate = d;\n this.icChange.emit({ value: d });\n }\n };\n\n render() {\n const {\n inputId,\n label,\n disabled,\n helperText,\n hideHelperText,\n hideLabel,\n showClearButton,\n showCalendarButton,\n size,\n } = this;\n\n const hasCustomValidation =\n !isEmptyString(this.validationStatus) &&\n !isEmptyString(this.validationText);\n\n const validationStatus = hasCustomValidation\n ? this.validationStatus\n : !isEmptyString(this.invalidDateText)\n ? IcInformationStatus.Error\n : \"\";\n\n const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;\n\n renderHiddenInput(\n true,\n this.el,\n this.name,\n this.convertToDate(this.year, this.month, this.day),\n this.disabled\n );\n\n return (\n <Host onBlur={this.handleHostBlur} onFocus={this.handleHostFocus}>\n <ic-input-container disabled={disabled}>\n {!(hideLabel && hideHelperText) && (\n <ic-input-label\n for={inputId}\n label={label}\n hideLabel={hideLabel}\n helperText={!hideHelperText ? helperText : null}\n disabled={disabled}\n ></ic-input-label>\n )}\n <span id={this.screenReaderInfoId} class=\"sr-only\" aria-hidden=\"true\">\n {this.getScreenReaderInfo(validationStatus)}\n {hideLabel && `${label}\\n`}\n {hideHelperText && `${helperText}\\n`}\n {`${this.defaultHelperText}.`}\n </span>\n <span id={this.assistiveHintId} class=\"sr-only\" aria-hidden=\"true\">\n {assistiveHint}\n </span>\n <span id=\"live-region\" aria-live=\"assertive\" class=\"sr-only\"></span>\n <ic-input-component-container\n id={inputId}\n ref={(el: HTMLIcInputComponentContainerElement) =>\n (this.inputCompContainerEl = el)\n }\n disabled={disabled}\n validationStatus={validationStatus}\n size={size}\n role=\"group\"\n >\n <div class=\"input-container\">\n <div class=\"date-inputs\">\n {this.getInputsInOrder()[0]}/{this.getInputsInOrder()[1]}/\n {this.getInputsInOrder()[2]}\n </div>\n <div class=\"action-buttons\">\n {showClearButton && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear input\"\n class={{\n [\"clear-button\"]: true,\n [\"hidden\"]:\n isEmptyString(this.day) &&\n isEmptyString(this.month) &&\n isEmptyString(this.year),\n }}\n disabled={this.disabled}\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearFocus}\n onBlur={this.handleClearBlur}\n variant=\"icon\"\n appearance={\n this.clearButtonFocused\n ? IcThemeForegroundEnum.Light\n : IcThemeForegroundEnum.Dark\n }\n size={size}\n ></ic-button>\n )}\n {showCalendarButton && (\n <div class=\"show-calendar-button-wrapper\">\n <div class={{ divider: true, [size]: true }}></div>\n <ic-button\n id=\"calendar-button\"\n ref={(el: HTMLIcButtonElement) =>\n (this.calendarButtonEl = el)\n }\n aria-label=\"Display calendar\"\n aria-haspopup=\"dialog\"\n class=\"calendar-button\"\n disabled={this.disabled}\n innerHTML={Calendar}\n onClick={this.handleCalendarOpen}\n variant=\"icon\"\n size={size}\n onFocus={this.handleCalendarFocus}\n onBlur={this.handleCalendarBlur}\n appearance={\n this.calendarFocused\n ? IcThemeForegroundEnum.Light\n : IcThemeForegroundEnum.Default\n }\n ></ic-button>\n </div>\n )}\n </div>\n </div>\n </ic-input-component-container>\n <span id={this.selectedDateInfoId} class=\"sr-only\" aria-live=\"polite\">\n <span\n ref={(el) => (this.selectedDateInfoEl = el)}\n role=\"status\"\n ></span>\n </span>\n {(hasCustomValidation || !isEmptyString(this.invalidDateText)) && (\n <ic-input-validation\n status={validationStatus}\n message={\n hasCustomValidation ? this.validationText : this.invalidDateText\n }\n for={inputId}\n ></ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"4kCAAA,MAAMA,EAAiB,0uIC2CvB,IAAIC,EAAW,E,MASFC,EAAS,M,yLACZC,KAAAC,aAAe,eACfD,KAAAE,WAAa,aACbF,KAAAG,iBAAmB,kBAKnBH,KAAAI,oBAAsB,iBACtBJ,KAAAK,aAAe,eAEfL,KAAAM,aAAeN,KAAKO,MAEpBP,KAAAQ,0BAA4B,sBAC5BR,KAAAS,cAAoC,GAEpCT,KAAAU,WAAsB,MACtBV,KAAAW,YAAuB,MACvBX,KAAAY,2BAAsC,MACtCZ,KAAAa,eAA0B,MAE1Bb,KAAAc,WAAsB,KACtBd,KAAAe,aAAwB,KACxBf,KAAAgB,YAAuB,KACvBhB,KAAAiB,WAAsB,MAEtBjB,KAAAkB,6BAA+B,yBAC/BlB,KAAAmB,QAAU,GACVnB,KAAAoB,UAAY,GASZpB,KAAAqB,oBAA4BC,UAC5BtB,KAAAuB,qBAA6B,KAE7BvB,KAAAwB,aAAqB,KA8UrBxB,KAAAyB,mBAAqB,CAACC,EAAoBC,KAChD,MAAMC,EAAUF,EAEhBE,EAAQrB,MAAQoB,EAChBC,EAAQC,UAAUC,IAAI9B,KAAKK,aAAa,EAGlCL,KAAA+B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const s='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n )}:host(.ic-toggle-button-dark){--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n )}:host(.ic-toggle-button-light){--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n )}:host(.ic-toggle-button-disabled){--button-border:var(--toggle-button-border, var(--ic-border-disabled))}:host(.expand-toggle-group-child) ::part(button){width:100%;min-height:inherit;white-space:inherit;height:inherit}:host ic-button{--icon-width:var(--ic-space-lg);--icon-height:var(--ic-space-lg)}:host(.expand-toggle-group-child) ic-button{min-width:100%;min-height:100%;white-space:normal;height:100%}:host(.expand-toggle-group-child) ::part(button):focus,:host(.expand-toggle-group-child.ic-toggle-button-checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus)}:host(.expand-toggle-group-child.ic-toggle-button-light) ::part(button):focus,:host(.expand-toggle-group-child.ic-toggle-button-dark) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus)}:host(:focus){z-index:1}:host ::part(button){border:var(--button-border)}:host(.ic-toggle-button-checked) ::part(button){background-color:var(--ic-action-default);color:var(--ic-architectural-white);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white)}:host(.ic-toggle-button-checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus)}:host(.ic-toggle-button-checked) ::part(button):hover{background-color:var(--button-default-hover)}:host(.ic-toggle-button-checked) ::part(button):active,:host(.ic-toggle-button-icon.ic-toggle-button-checked) ::part(button):active{background-color:var(--ic-action-default-pressed)}:host(.ic-toggle-button-dark.ic-toggle-button-checked) ::part(button){background-color:var(--ic-action-dark)}:host(.ic-toggle-button-dark.ic-toggle-button-checked) ::part(button):hover{background-color:var(--ic-action-dark-hover)}:host(.ic-toggle-button-dark.ic-toggle-button-checked) ::part(button):active,:host(.ic-toggle-button-icon.ic-toggle-button-dark.ic-toggle-button-checked) ::part(button):active{background-color:var(--ic-action-dark-pressed)}:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button){background-color:var(--ic-action-light);color:var(--ic-color-text-primary);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black)}:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button):hover{background-color:var(--ic-action-light-hover)}:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button):active,:host(.ic-toggle-button-icon.ic-toggle-button-light.ic-toggle-button-checked) ::part(button):active{background-color:var(--ic-action-light-pressed)}:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus)}:host(.ic-toggle-button-disabled) ::part(button),:host(.ic-toggle-button-icon.ic-toggle-button-disabled) ::part(button){border:var(--button-border)}:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button){background-color:transparent}:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button)::before{background-image:radial-gradient(var(--ic-architectural-400) 95%, white 20%);background-repeat:no-repeat}:host(.ic-toggle-button-icon) ::part(button){border:var(--button-border);height:calc(var(--ic-space-xl) + var(--ic-space-xs));width:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-toggle-button-icon) ::part(button):active{background-color:var(--ic-action-default-bg-active)}:host(.ic-toggle-button-icon.ic-toggle-button-dark) ::part(button):active{background-color:var(--ic-action-dark-bg-pressed)}:host(.ic-toggle-button-icon.ic-toggle-button-light) ::part(button):active{background-color:var(--ic-action-light-bg-pressed)}:host(.ic-toggle-button-icon.ic-toggle-button-small) ::part(button){height:var(--ic-space-xl);width:var(--ic-space-xl)}:host(.ic-toggle-button-icon.ic-toggle-button-large) ::part(button){height:var(--ic-space-xxl);width:var(--ic-space-xxl)}:host(.ic-toggle-button-checked.ic-toggle-button-loading) ::part(button){background-color:var(--button-default-active)}:host(.ic-toggle-button-loading) ::part(ic-loading-container){--inner-color:var(--ic-architectural-white)}:host(.ic-toggle-button-checked.ic-toggle-button-loading.ic-toggle-button-light) ::part(button){background-color:var(--ic-action-light-pressed)}:host(.ic-toggle-button-checked.ic-toggle-button-loading.ic-toggle-button-dark) ::part(button){background-color:var(--ic-action-dark-pressed)}@media (forced-colors: active){:host(.ic-toggle-button-checked) ::part(button),:host(.ic-toggle-button-checked) ::part(button):hover{background-color:Highlight}:host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button),:host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button):hover{background-color:Highlight}:host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button),:host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button):hover{background-color:Highlight}:host(.ic-toggle-button-checked.ic-toggle-button-disabled) ::part(button){background-color:GrayText}}';const g=class{constructor(e){t(this,e);this.icToggleChecked=o(this,"icToggleChecked",7);this.handleFocus=t=>{t.stopImmediatePropagation()};this.handleClick=()=>{!this.loading&&!this.disabled&&this.icToggleChecked.emit({checked:this.checked})};this.accessibleLabel=undefined;this.appearance="default";this.disabled=false;this.fullWidth=false;this.iconPlacement=undefined;this.label=undefined;this.loading=false;this.size="medium";this.checked=false;this.variant="default"}componentWillLoad(){n(this.disabled,this.el);const t=this.el.parentElement.iconPlacement;this.iconPosition=this.iconPlacement||t||"left"}componentDidLoad(){a([{prop:this.variant==="icon"?this.accessibleLabel:this.label,propName:this.variant==="icon"?"accessible-label":"label"}],"Toggle button")}handleHostClick(t){if(this.disabled){t.stopImmediatePropagation()}else if(!this.loading){this.checked=!this.checked}}render(){return e(i,{class:{["ic-toggle-button-disabled"]:this.disabled,["ic-toggle-button-checked"]:this.checked,[`ic-toggle-button-${this.appearance}`]:true,["ic-toggle-button-icon"]:this.variant==="icon",[`ic-toggle-button-${this.size}`]:true,["ic-toggle-button-loading"]:this.loading},onFocus:this.handleFocus},e("ic-button",{"aria-pressed":this.checked.toString(),variant:this.variant==="icon"?"icon":"secondary",onClick:this.handleClick,title:this.accessibleLabel,"aria-label":`${this.accessibleLabel?this.accessibleLabel:this.label}, ${this.checked?"ticked":"unticked"}`,disabled:this.disabled,appearance:this.appearance,size:this.size,fullWidth:this.fullWidth,loading:this.loading,"aria-disabled":`${this.disabled}`},this.variant!=="icon"&&this.label,e("slot",null),r(this.el,"icon")&&e("slot",{name:"icon",slot:`${this.iconPosition}-icon`}),r(this.el,"badge")&&e("slot",{name:"badge",slot:"badge"})))}static get delegatesFocus(){return true}get el(){return c(this)}};g.style=s;export{g as ic_toggle_button};
|
2
|
-
//# sourceMappingURL=p-c40c57ee.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icToggleButtonCss","ToggleButton","constructor","hostRef","this","handleFocus","ev","stopImmediatePropagation","handleClick","loading","disabled","icToggleChecked","emit","checked","accessibleLabel","undefined","appearance","fullWidth","iconPlacement","label","size","variant","componentWillLoad","removeDisabledFalse","el","parentIconPlacement","parentElement","iconPosition","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","handleHostClick","e","render","h","Host","class","onFocus","toString","onClick","title","isSlotUsed","name","slot","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/* VARIABLES FOR IC-TOGGLE-BUTTON-GROUP */\n:host {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n );\n}\n\n:host(.ic-toggle-button-dark) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n );\n}\n\n:host(.ic-toggle-button-light) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n );\n}\n\n:host(.ic-toggle-button-disabled) {\n --button-border: var(--toggle-button-border, var(--ic-border-disabled));\n}\n\n:host(.expand-toggle-group-child) ::part(button) {\n width: 100%;\n min-height: inherit;\n white-space: inherit;\n height: inherit;\n}\n\n:host ic-button {\n --icon-width: var(--ic-space-lg);\n --icon-height: var(--ic-space-lg);\n}\n\n:host(.expand-toggle-group-child) ic-button {\n min-width: 100%;\n min-height: 100%;\n white-space: normal;\n height: 100%;\n}\n\n:host(.expand-toggle-group-child) ::part(button):focus,\n:host(.expand-toggle-group-child.ic-toggle-button-checked)\n ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus);\n}\n\n:host(.expand-toggle-group-child.ic-toggle-button-light) ::part(button):focus,\n:host(.expand-toggle-group-child.ic-toggle-button-dark) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus);\n}\n\n:host(:focus) {\n z-index: 1;\n}\n\n:host ::part(button) {\n border: var(--button-border);\n}\n\n:host(.ic-toggle-button-checked) ::part(button) {\n background-color: var(--ic-action-default);\n color: var(--ic-architectural-white);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white);\n}\n\n:host(.ic-toggle-button-checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus);\n}\n\n:host(.ic-toggle-button-checked) ::part(button):hover {\n background-color: var(--button-default-hover);\n}\n\n:host(.ic-toggle-button-checked) ::part(button):active,\n:host(.ic-toggle-button-icon.ic-toggle-button-checked) ::part(button):active {\n background-color: var(--ic-action-default-pressed);\n}\n\n:host(.ic-toggle-button-dark.ic-toggle-button-checked) ::part(button) {\n background-color: var(--ic-action-dark);\n}\n\n:host(.ic-toggle-button-dark.ic-toggle-button-checked) ::part(button):hover {\n background-color: var(--ic-action-dark-hover);\n}\n\n:host(.ic-toggle-button-dark.ic-toggle-button-checked) ::part(button):active,\n:host(.ic-toggle-button-icon.ic-toggle-button-dark.ic-toggle-button-checked)\n ::part(button):active {\n background-color: var(--ic-action-dark-pressed);\n}\n\n:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button) {\n background-color: var(--ic-action-light);\n color: var(--ic-color-text-primary);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black);\n}\n\n:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button):hover {\n background-color: var(--ic-action-light-hover);\n}\n\n:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button):active,\n:host(.ic-toggle-button-icon.ic-toggle-button-light.ic-toggle-button-checked)\n ::part(button):active {\n background-color: var(--ic-action-light-pressed);\n}\n\n:host(.ic-toggle-button-light.ic-toggle-button-checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus);\n}\n\n:host(.ic-toggle-button-disabled) ::part(button),\n:host(.ic-toggle-button-icon.ic-toggle-button-disabled) ::part(button) {\n border: var(--button-border);\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),\n:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked)\n ::part(button) {\n background-color: transparent;\n}\n\n:host(.ic-toggle-button-disabled.ic-toggle-button-checked) ::part(button),\n:host(.ic-toggle-button-icon.ic-toggle-button-disabled.ic-toggle-button-checked)\n ::part(button)::before {\n background-image: radial-gradient(var(--ic-architectural-400) 95%, white 20%);\n background-repeat: no-repeat;\n}\n\n:host(.ic-toggle-button-icon) ::part(button) {\n border: var(--button-border);\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n width: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.ic-toggle-button-icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-active);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-light) ::part(button):active {\n background-color: var(--ic-action-light-bg-pressed);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.ic-toggle-button-icon.ic-toggle-button-large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.ic-toggle-button-checked.ic-toggle-button-loading) ::part(button) {\n background-color: var(--button-default-active);\n}\n\n:host(.ic-toggle-button-loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.ic-toggle-button-checked.ic-toggle-button-loading.ic-toggle-button-light)\n ::part(button) {\n background-color: var(--ic-action-light-pressed);\n}\n\n:host(.ic-toggle-button-checked.ic-toggle-button-loading.ic-toggle-button-dark)\n ::part(button) {\n background-color: var(--ic-action-dark-pressed);\n}\n\n@media (forced-colors: active) {\n :host(.ic-toggle-button-checked) ::part(button),\n :host(.ic-toggle-button-checked) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button),\n :host(.ic-toggle-button-checked.ic-toggle-button-light) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button),\n :host(.ic-toggle-button-checked.ic-toggle-button-dark) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.ic-toggle-button-checked.ic-toggle-button-disabled) ::part(button) {\n background-color: GrayText;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { isSlotUsed, onComponentRequiredPropUndefined, removeDisabledFalse, } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be displayed alongside the toggle button label.\n * @slot badge - Badge component overlaying the top right of the toggle button.\n */\nexport class ToggleButton {\n constructor() {\n this.handleFocus = (ev) => {\n ev.stopImmediatePropagation();\n };\n this.handleClick = () => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.checked,\n });\n };\n this.accessibleLabel = undefined;\n this.appearance = \"default\";\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = undefined;\n this.label = undefined;\n this.loading = false;\n this.size = \"medium\";\n this.checked = false;\n this.variant = \"default\";\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n const parentIconPlacement = this.el.parentElement.iconPlacement;\n this.iconPosition = this.iconPlacement || parentIconPlacement || \"left\";\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ], \"Toggle button\");\n }\n handleHostClick(e) {\n if (this.disabled) {\n e.stopImmediatePropagation();\n }\n else if (!this.loading) {\n this.checked = !this.checked;\n }\n }\n render() {\n return (h(Host, { class: {\n [\"ic-toggle-button-disabled\"]: this.disabled,\n [\"ic-toggle-button-checked\"]: this.checked,\n [`ic-toggle-button-${this.appearance}`]: true,\n [\"ic-toggle-button-icon\"]: this.variant === \"icon\",\n [`ic-toggle-button-${this.size}`]: true,\n [\"ic-toggle-button-loading\"]: this.loading,\n }, onFocus: this.handleFocus }, h(\"ic-button\", { \"aria-pressed\": this.checked.toString(), variant: this.variant === \"icon\" ? \"icon\" : \"secondary\", onClick: this.handleClick, title: this.accessibleLabel, \"aria-label\": `${this.accessibleLabel ? this.accessibleLabel : this.label}, ${this.checked ? \"ticked\" : \"unticked\"}`, disabled: this.disabled, appearance: this.appearance, size: this.size, fullWidth: this.fullWidth, loading: this.loading, \"aria-disabled\": `${this.disabled}` }, this.variant !== \"icon\" && this.label, h(\"slot\", null), isSlotUsed(this.el, \"icon\") && (h(\"slot\", { name: \"icon\", slot: `${this.iconPosition}-icon` })), isSlotUsed(this.el, \"badge\") && (h(\"slot\", { name: \"badge\", slot: \"badge\" })))));\n }\n static get is() { return \"ic-toggle-button\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button.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\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForeground\",\n \"resolved\": \"\\\"dark\\\" | \\\"default\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForeground\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForeground\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the toggle button.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icon in relation to the toggle button label.\"\n },\n \"attribute\": \"icon-placement\",\n \"reflect\": false\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label to display in the toggle button. This is required for the default variant of toggle buttons.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\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 toggle button to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"checked\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in a checked state.\"\n },\n \"attribute\": \"checked\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icToggleChecked\",\n \"name\": \"icToggleChecked\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the user clicks a toggle button.\"\n },\n \"complexType\": {\n \"original\": \"{\\n checked: boolean;\\n }\",\n \"resolved\": \"{ checked: boolean; }\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"click\",\n \"method\": \"handleHostClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button.js.map\n"],"mappings":"6GAAA,MAAMA,EAAoB,o8P,MCMbC,EAAY,MACrB,WAAAC,CAAAC,G,2DACIC,KAAKC,YAAeC,IAChBA,EAAGC,0BAA0B,EAEjCH,KAAKI,YAAc,MACdJ,KAAKK,UACDL,KAAKM,UACNN,KAAKO,gBAAgBC,KAAK,CACtBC,QAAST,KAAKS,SAChB,EAEVT,KAAKU,gBAAkBC,UACvBX,KAAKY,WAAa,UAClBZ,KAAKM,SAAW,MAChBN,KAAKa,UAAY,MACjBb,KAAKc,cAAgBH,UACrBX,KAAKe,MAAQJ,UACbX,KAAKK,QAAU,MACfL,KAAKgB,KAAO,SACZhB,KAAKS,QAAU,MACfT,KAAKiB,QAAU,S,CAEnB,iBAAAC,GACIC,EAAoBnB,KAAKM,SAAUN,KAAKoB,IACxC,MAAMC,EAAsBrB,KAAKoB,GAAGE,cAAcR,cAClDd,KAAKuB,aAAevB,KAAKc,eAAiBO,GAAuB,M,CAErE,gBAAAG,GACIC,EAAiC,CAC7B,CACIC,KAAM1B,KAAKiB,UAAY,OAASjB,KAAKU,gBAAkBV,KAAKe,MAC5DY,SAAU3B,KAAKiB,UAAY,OAAS,mBAAqB,UAE9D,gB,CAEP,eAAAW,CAAgBC,GACZ,GAAI7B,KAAKM,SAAU,CACfuB,EAAE1B,0B,MAED,IAAKH,KAAKK,QAAS,CACpBL,KAAKS,SAAWT,KAAKS,O,EAG7B,MAAAqB,GACI,OAAQC,EAAEC,EAAM,CAAEC,MAAO,CACjB,CAAC,6BAA8BjC,KAAKM,SACpC,CAAC,4BAA6BN,KAAKS,QACnC,CAAC,oBAAoBT,KAAKY,cAAe,KACzC,CAAC,yBAA0BZ,KAAKiB,UAAY,OAC5C,CAAC,oBAAoBjB,KAAKgB,QAAS,KACnC,CAAC,4BAA6BhB,KAAKK,SACpC6B,QAASlC,KAAKC,aAAe8B,EAAE,YAAa,CAAE,eAAgB/B,KAAKS,QAAQ0B,WAAYlB,QAASjB,KAAKiB,UAAY,OAAS,OAAS,YAAamB,QAASpC,KAAKI,YAAaiC,MAAOrC,KAAKU,gBAAiB,aAAc,GAAGV,KAAKU,gBAAkBV,KAAKU,gBAAkBV,KAAKe,UAAUf,KAAKS,QAAU,SAAW,aAAcH,SAAUN,KAAKM,SAAUM,WAAYZ,KAAKY,WAAYI,KAAMhB,KAAKgB,KAAMH,UAAWb,KAAKa,UAAWR,QAASL,KAAKK,QAAS,gBAAiB,GAAGL,KAAKM,YAAcN,KAAKiB,UAAY,QAAUjB,KAAKe,MAAOgB,EAAE,OAAQ,MAAOO,EAAWtC,KAAKoB,GAAI,SAAYW,EAAE,OAAQ,CAAEQ,KAAM,OAAQC,KAAM,GAAGxC,KAAKuB,sBAAyBe,EAAWtC,KAAKoB,GAAI,UAAaW,EAAE,OAAQ,CAAEQ,KAAM,QAASC,KAAM,W,CAIpsB,yBAAWC,GAAmB,OAAO,IAAK,C"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as e,f as i,h as s,H as o,g as r}from"./p-8455d1bb.js";import{c,i as l,o as a}from"./p-e6a330e4.js";const n=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>\n</svg>`;const h=':host{display:block;border:none;position:relative}:host .tree-item-content{display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs));padding:0 var(--ic-space-xs);text-decoration:none;color:var(--ic-tree-view-text);--ic-typography-color:var(--ic-tree-view-text)}::slotted([slot="router-item"]){display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs));text-decoration:none;font-family:var(--ic-font-body-family);color:var(--ic-tree-view-text);padding:0 var(--ic-space-xs) !important}::slotted([slot="router-item"].ic-tree-item-single){padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs)) !important}:host .tree-item-content:focus,::slotted([slot="router-item"]:focus){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}:host(.ic-tree-item-focus-inset) .tree-item-content:focus,:host(.ic-tree-item-focus-inset) ::slotted([slot="router-item"]:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset)}:host(.ic-tree-item-focus-inset) .tree-item-content,:host(.ic-tree-item-focus-inset) ::slotted([slot="router-item"]){padding:0 var(--ic-space-sm)}:host .tree-item-content:hover,::slotted([slot="router-item"]:hover){background-color:var(--ic-tree-view-hover) !important;cursor:pointer}:host .tree-item-content:active,::slotted([slot="router-item"]:active){background-color:var(--ic-tree-view-pressed) !important}:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){background-color:var(--ic-tree-view-selected) !important}:host(.ic-tree-item-small) .tree-item-content,:host(.ic-tree-item-small) ::slotted([slot="router-item"]){height:var(--ic-space-xl)}:host(.ic-tree-item-large) .tree-item-content,:host(.ic-tree-item-large) ::slotted([slot="router-item"]){height:var(--ic-space-xxl)}:host(.ic-tree-item-disabled){pointer-events:none}:host(.ic-tree-item-disabled) .tree-item-content,:host(.ic-tree-item-disabled) .arrow-dropdown,:host(.ic-tree-item-disabled) ::slotted([slot="icon"]),:host(.ic-tree-item-disabled) ::slotted([slot="router-item"]){color:var(--ic-tree-view-text-disabled) !important;--ic-typography-color:var(--ic-tree-view-text-disabled) !important;fill:var(--ic-tree-view-icon-disabled);pointer-events:none}:host .arrow-dropdown{color:var(--ic-tree-view-dropdown-arrow);margin-right:var(--ic-space-xs)}:host(.ic-tree-item-small) .arrow-dropdown{margin-right:var(--ic-space-xxs)}:host .tree-item-expanded{transform:rotate(180deg);margin-top:calc(-1 * var(--ic-space-xxs))}:host .ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-tree-item-small) .ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xxs))}.icon-container{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}:host(.ic-tree-item-small) .icon-container{margin:0 var(--ic-space-xxs) 0 0}.ic-text-overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ic-tooltip-overflow{overflow:hidden}::slotted([slot="icon"]){fill:var(--ic-tree-view-icon)}@media (forced-colors: active){::slotted([slot="icon"]){fill:currentcolor}:host .tree-item-content:hover,::slotted([slot="router-item"]:hover),:host .tree-item-content:active,::slotted([slot="router-item"]:active),:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){background-color:none !important}:host(.ic-tree-item-disabled) .tree-item-content,:host(.ic-tree-item-disabled) .arrow-dropdown,:host(.ic-tree-item-disabled) ::slotted([slot="icon"]),:host(.ic-tree-item-disabled) ::slotted([slot="router-item"]){color:GrayText !important;--ic-typography-color:GrayText !important;fill:GrayText !important}:host .tree-item-content:focus,::slotted([slot="router-item"]:focus){border:var(--ic-border-hc) !important}:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){color:Highlight !important;--ic-typography-color:Highlight !important}}';let d=0;const m=class{constructor(s){t(this,s);this.icTreeItemSelected=e(this,"icTreeItemSelected",7);this.treeItemId=`ic-tree-item-${d++}`;this.treeItemTag="IC-TREE-ITEM";this.hostMutationObserver=null;this.TOOLTIP="ic-tooltip";this.handleTreeItemClicked=()=>{if(this.isParent){this.expanded=!this.expanded;this.hasParentExpanded=true}this.updateAriaLabel();this.selected=true;this.watchSelectedHandler()};this.setTreeItemPadding=()=>{let t=1;let e=this.el.parentElement;const i=this.el.shadowRoot.querySelector(".tree-item-content");const s=Array.from(e.children).map((t=>{if(t!==this.el&&!t.querySelector('[slot="router-item"]')&&!t.querySelector('[slot="label"]')){return t.children.length>0}else{return false}})).includes(true);const o=e.tagName===this.treeItemTag;const r=this.hasRouterSlot();if(s&&!this.el.isParent||o&&!this.el.isParent){if(r){this.routerSlot.classList.add("ic-tree-item-single")}else{i.classList.add("ic-tree-item-single")}}while(e){if(e.tagName===this.treeItemTag){t++;if(!this.el.isParent&&s){i.style.paddingLeft=`calc(var(--ic-space-xl) + ${t*16}px)`}else if(!this.el.isParent){i.style.paddingLeft=`calc(var(--ic-space-xs) + ${t*24}px`}else{i.style.paddingLeft=`${t*16}px`}}e=e.parentElement}};this.truncateTreeItemLabel=t=>{const e=t.shadowRoot.querySelector(".tree-item-label");const i=e===null||e===void 0?void 0:e.closest(this.TOOLTIP);const s=t.shadowRoot.querySelector(".tree-item-content");if((e===null||e===void 0?void 0:e.scrollHeight)>(s===null||s===void 0?void 0:s.clientHeight)){e.classList.add("ic-text-overflow");if(!i){const t=document.createElement("ic-tooltip");t.setAttribute("target",this.el.id);t.setAttribute("label",e.textContent);t.classList.add("ic-tooltip-overflow");t.setAttribute("placement","right");s.appendChild(t);t.appendChild(e)}}};this.hostMutationCallback=t=>{if(t.some((({type:t,addedNodes:e,removedNodes:i})=>t==="childList"?c(e,i,"icon"):false))){i(this)}};this.handleDisplayTooltip=t=>{const e=this.el.shadowRoot.querySelector(".tree-item-label");const i=e===null||e===void 0?void 0:e.closest(this.TOOLTIP);i===null||i===void 0?void 0:i.displayTooltip(t)};this.childTreeItems=undefined;this.disabled=false;this.expanded=false;this.focusInset=false;this.hasParentExpanded=false;this.href=undefined;this.hreflang="";this.isParent=false;this.label="";this.referrerpolicy=undefined;this.rel=undefined;this.selected=false;this.size="medium";this.target=undefined;this.theme="inherit"}watchSelectedHandler(){if(this.selected){this.icTreeItemSelected.emit({id:this.el.id})}this.updateAriaLabel()}disconnectedCallback(){var t;(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentDidLoad(){this.childTreeItems=Array.from(this.el.children).filter((t=>t.tagName===this.treeItemTag));if(this.childTreeItems.length>0){this.isParent=true}this.setTreeItemPadding();this.updateAriaLabel();setTimeout((()=>{this.truncateTreeItemLabel(this.el)}),100);!l(this.el,"label")&&a([{prop:this.label,propName:"label"}],"Tree item");this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}componentDidUpdate(){if(this.hasParentExpanded){this.childTreeItems.forEach((t=>{this.truncateTreeItemLabel(t)}));this.hasParentExpanded=false}}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){t.stopImmediatePropagation();this.handleTreeItemClicked()}}async setFocus(){var t,e;if(this.hasRouterSlot()){(t=this.routerSlot)===null||t===void 0?void 0:t.focus()}else{(e=this.treeItemElement)===null||e===void 0?void 0:e.focus()}}async updateAriaLabel(){let t;if(this.hasRouterSlot()){t=this.routerSlot.textContent}else if(l(this.el,"label")){t=this.el.querySelector('[slot="label"]').textContent}else{t=this.label}if(this.isParent){t=`${t}, triggers submenu, ${this.expanded?"expanded":"collapsed"}`}if(this.el.parentElement){const e=Array.from(this.el.parentElement.children).filter((t=>t.tagName===this.treeItemTag));const i=e.indexOf(this.el)+1;const s=e.length;t=`${t}, ${i} of ${s}`}if(this.selected){t=`${t}, active`}if(this.disabled){t=`${t}, dimmed`}if(this.hasRouterSlot()){this.routerSlot.ariaLabel=t}else{this.treeItemElement.ariaLabel=t}}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');return!!this.routerSlot}render(){const{disabled:t,label:e,selected:i,size:r,expanded:c,focusInset:a,theme:h}=this;const d=this.href&&!this.disabled?"a":"div";const m=d=="a"&&{href:this.href,hrefLang:this.hreflang,referrerPolicy:this.referrerpolicy,rel:this.rel,target:this.target};return s(o,{class:{"ic-tree-item-disabled":t,"ic-tree-item-selected":!t&&i,[`ic-tree-item-${r}`]:r!=="medium",[`ic-tree-item-focus-inset`]:a,[`ic-theme-${h}`]:h!=="inherit"},id:this.treeItemId},this.hasRouterSlot()?s("slot",{name:"router-item"}):s(d,Object.assign({class:{"tree-item-content":true},tabIndex:t?-1:0,onClick:this.handleTreeItemClicked,ref:t=>this.treeItemElement=t,"aria-disabled":t?"true":"false","aria-live":"polite"},m,{onFocus:()=>this.handleDisplayTooltip(true),onBlur:()=>this.handleDisplayTooltip(false)}),this.isParent&&s("span",{class:{["arrow-dropdown"]:true,["tree-item-expanded"]:c},"aria-hidden":"true",innerHTML:n}),l(this.el,"icon")&&s("div",{class:"icon-container"},s("slot",{name:"icon"})),s("ic-typography",{class:"tree-item-label"},l(this.el,"label")?s("slot",{name:"label"}):e)),c&&s("div",{"aria-hidden":`${!c}`},s("slot",null)))}get el(){return r(this)}static get watchers(){return{selected:["watchSelectedHandler"]}}};m.style=h;export{m as ic_tree_item};
|
2
|
-
//# sourceMappingURL=p-c883b5c1.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icTreeItemCss","treeItemIds","TreeItem","this","treeItemId","treeItemTag","hostMutationObserver","TOOLTIP","handleTreeItemClicked","isParent","expanded","hasParentExpanded","updateAriaLabel","selected","watchSelectedHandler","setTreeItemPadding","level","parentElement","el","treeItemContent","shadowRoot","querySelector","isSiblingOfParent","Array","from","children","map","sibling","length","includes","isChild","tagName","isRouterItem","hasRouterSlot","routerSlot","classList","add","style","paddingLeft","truncateTreeItemLabel","treeItem","typographyEl","tooltip","closest","treeContent","scrollHeight","clientHeight","tooltipEl","document","createElement","setAttribute","id","textContent","appendChild","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","handleDisplayTooltip","display","displayTooltip","icTreeItemSelected","emit","disconnectedCallback","_a","disconnect","componentDidLoad","childTreeItems","filter","child","setTimeout","isSlotUsed","onComponentRequiredPropUndefined","prop","label","propName","MutationObserver","observe","childList","componentDidUpdate","forEach","handleKeyDown","ev","key","stopImmediatePropagation","setFocus","focus","_b","treeItemElement","ariaLabel","treeItems","index","indexOf","parentChildren","disabled","render","size","focusInset","theme","Component","href","attrs","hrefLang","hreflang","referrerPolicy","referrerpolicy","rel","target","h","Host","class","name","Object","assign","tabIndex","onClick","ref","onFocus","onBlur","innerHTML","arrowDropdown"],"sources":["src/components/ic-tree-item/ic-tree-item.css?tag=ic-tree-item&encapsulation=shadow","src/components/ic-tree-item/ic-tree-item.tsx"],"sourcesContent":[":host {\n display: block;\n border: none;\n position: relative;\n}\n\n:host .tree-item-content {\n display: flex;\n align-items: center;\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n padding: 0 var(--ic-space-xs);\n text-decoration: none;\n color: var(--ic-tree-view-text);\n\n --ic-typography-color: var(--ic-tree-view-text);\n}\n\n::slotted([slot=\"router-item\"]) {\n display: flex;\n align-items: center;\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n text-decoration: none;\n font-family: var(--ic-font-body-family);\n color: var(--ic-tree-view-text);\n padding: 0 var(--ic-space-xs) !important;\n}\n\n::slotted([slot=\"router-item\"].ic-tree-item-single) {\n padding-left: calc(var(--ic-space-xl) + var(--ic-space-xs)) !important;\n}\n\n:host .tree-item-content:focus,\n::slotted([slot=\"router-item\"]:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n:host(.ic-tree-item-focus-inset) .tree-item-content:focus,\n:host(.ic-tree-item-focus-inset) ::slotted([slot=\"router-item\"]:focus) {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n}\n\n:host(.ic-tree-item-focus-inset) .tree-item-content,\n:host(.ic-tree-item-focus-inset) ::slotted([slot=\"router-item\"]) {\n padding: 0 var(--ic-space-sm);\n}\n\n:host .tree-item-content:hover,\n::slotted([slot=\"router-item\"]:hover) {\n background-color: var(--ic-tree-view-hover) !important;\n cursor: pointer;\n}\n\n:host .tree-item-content:active,\n::slotted([slot=\"router-item\"]:active) {\n background-color: var(--ic-tree-view-pressed) !important;\n}\n\n:host(.ic-tree-item-selected) .tree-item-content,\n:host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"]) {\n background-color: var(--ic-tree-view-selected) !important;\n}\n\n:host(.ic-tree-item-small) .tree-item-content,\n:host(.ic-tree-item-small) ::slotted([slot=\"router-item\"]) {\n height: var(--ic-space-xl);\n}\n\n:host(.ic-tree-item-large) .tree-item-content,\n:host(.ic-tree-item-large) ::slotted([slot=\"router-item\"]) {\n height: var(--ic-space-xxl);\n}\n\n:host(.ic-tree-item-disabled) {\n pointer-events: none;\n}\n\n:host(.ic-tree-item-disabled) .tree-item-content,\n:host(.ic-tree-item-disabled) .arrow-dropdown,\n:host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n:host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"]) {\n color: var(--ic-tree-view-text-disabled) !important;\n\n --ic-typography-color: var(--ic-tree-view-text-disabled) !important;\n\n fill: var(--ic-tree-view-icon-disabled);\n pointer-events: none;\n}\n\n:host .arrow-dropdown {\n color: var(--ic-tree-view-dropdown-arrow);\n margin-right: var(--ic-space-xs);\n}\n\n:host(.ic-tree-item-small) .arrow-dropdown {\n margin-right: var(--ic-space-xxs);\n}\n\n:host .tree-item-expanded {\n transform: rotate(180deg);\n margin-top: calc(-1 * var(--ic-space-xxs));\n}\n\n:host .ic-tree-item-single {\n padding-left: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.ic-tree-item-small) .ic-tree-item-single {\n padding-left: calc(var(--ic-space-xl) + var(--ic-space-xxs));\n}\n\n.icon-container {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n margin: 0 var(--ic-space-xs) 0 0;\n}\n\n:host(.ic-tree-item-small) .icon-container {\n margin: 0 var(--ic-space-xxs) 0 0;\n}\n\n.ic-text-overflow {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.ic-tooltip-overflow {\n overflow: hidden;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-tree-view-icon);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n\n :host .tree-item-content:hover,\n ::slotted([slot=\"router-item\"]:hover),\n :host .tree-item-content:active,\n ::slotted([slot=\"router-item\"]:active),\n :host(.ic-tree-item-selected) .tree-item-content,\n :host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"]) {\n background-color: none !important;\n }\n\n :host(.ic-tree-item-disabled) .tree-item-content,\n :host(.ic-tree-item-disabled) .arrow-dropdown,\n :host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n :host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"]) {\n color: GrayText !important;\n\n --ic-typography-color: GrayText !important;\n\n fill: GrayText !important;\n }\n\n :host .tree-item-content:focus,\n ::slotted([slot=\"router-item\"]:focus) {\n border: var(--ic-border-hc) !important;\n }\n\n :host(.ic-tree-item-selected) .tree-item-content,\n :host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"]) {\n color: Highlight !important;\n\n --ic-typography-color: Highlight !important;\n }\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Host,\n Watch,\n State,\n Listen,\n forceUpdate,\n Method,\n} from \"@stencil/core\";\nimport { IcSizes } from \"../../utils/types\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\nimport { IcThemeMode } from \"@ukic/web-components\";\n\nlet treeItemIds = 0;\n\n/**\n * @slot label - Content is set as the tree item label.\n * @slot icon - Content is placed to the left of the label.\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n@Component({\n tag: \"ic-tree-item\",\n styleUrl: \"ic-tree-item.css\",\n shadow: true,\n})\nexport class TreeItem {\n private treeItemId = `ic-tree-item-${treeItemIds++}`;\n private treeItemElement: HTMLElement;\n private treeItemTag = \"IC-TREE-ITEM\";\n private routerSlot: HTMLElement;\n private hostMutationObserver: MutationObserver = null;\n private TOOLTIP = \"ic-tooltip\";\n\n @Element() el: HTMLIcTreeItemElement;\n\n @State() childTreeItems: HTMLIcTreeItemElement[];\n\n /**\n * If `true`, the tree item appears in the disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the tree item appears in the expanded state.\n */\n @Prop({ mutable: true }) expanded: boolean = false;\n\n /**\n * @internal If `true`, the tree item will have an inset focus border.\n */\n @Prop() focusInset?: boolean = false;\n\n /**\n * @internal Determines if the parent tree item has been expanded.\n */\n @Prop({ mutable: true }) hasParentExpanded: boolean = false;\n\n /**\n * The URL that the tree item link points to. If set, the tree item will render as an \"a\" tag, otherwise it will render as a div.\n */\n @Prop() href?: string | undefined;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n\n /**\n * @internal If `true`, the tree item is a parent of other tree items.\n */\n @Prop({ mutable: true }) isParent: boolean = false;\n\n /**\n * The label of the tree item.\n */\n @Prop() label: string = \"\";\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * If `true`, the tree item appears in the selected state.\n */\n @Prop({ mutable: true }) selected: boolean = false;\n @Watch(\"selected\")\n watchSelectedHandler() {\n if (this.selected) {\n this.icTreeItemSelected.emit({ id: this.el.id });\n }\n this.updateAriaLabel();\n }\n\n /**\n * @internal Determines the size of the tree item.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * Emitted when tree item is selected.\n */\n @Event() icTreeItemSelected: EventEmitter<{ id: string }>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentDidLoad(): void {\n this.childTreeItems = Array.from((this.el as HTMLElement).children).filter(\n (child) => child.tagName === this.treeItemTag\n ) as HTMLIcTreeItemElement[];\n\n if (this.childTreeItems.length > 0) {\n this.isParent = true;\n }\n\n this.setTreeItemPadding();\n\n this.updateAriaLabel();\n\n setTimeout(() => {\n this.truncateTreeItemLabel(this.el);\n }, 100);\n\n !isSlotUsed(this.el, \"label\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tree item\"\n );\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n componentDidUpdate(): void {\n if (this.hasParentExpanded) {\n this.childTreeItems.forEach((child) => {\n this.truncateTreeItemLabel(child);\n });\n this.hasParentExpanded = false;\n }\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n if (ev.key === \"Enter\" || ev.key === \" \") {\n ev.stopImmediatePropagation();\n this.handleTreeItemClicked();\n }\n }\n\n /**\n * Sets focus on the native `input`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.hasRouterSlot()) {\n this.routerSlot?.focus();\n } else {\n this.treeItemElement?.focus();\n }\n }\n\n private handleTreeItemClicked = (): void => {\n if (this.isParent) {\n this.expanded = !this.expanded;\n this.hasParentExpanded = true;\n }\n\n this.updateAriaLabel();\n this.selected = true;\n this.watchSelectedHandler();\n };\n\n /**\n * @internal Updates the aria-label of the tree item.\n */\n @Method()\n async updateAriaLabel(): Promise<void> {\n let ariaLabel;\n\n if (this.hasRouterSlot()) {\n ariaLabel = this.routerSlot.textContent;\n } else if (isSlotUsed(this.el, \"label\")) {\n ariaLabel = this.el.querySelector('[slot=\"label\"]').textContent;\n } else {\n ariaLabel = this.label;\n }\n\n if (this.isParent) {\n ariaLabel = `${ariaLabel}, triggers submenu, ${\n this.expanded ? \"expanded\" : \"collapsed\"\n }`;\n }\n\n if (this.el.parentElement) {\n const treeItems = Array.from(\n (this.el.parentElement as HTMLElement).children\n ).filter(\n (child) => child.tagName === this.treeItemTag\n ) as HTMLIcTreeItemElement[];\n\n const index = treeItems.indexOf(this.el) + 1;\n const parentChildren = treeItems.length;\n\n ariaLabel = `${ariaLabel}, ${index} of ${parentChildren}`;\n }\n\n if (this.selected) {\n ariaLabel = `${ariaLabel}, active`;\n }\n\n if (this.disabled) {\n ariaLabel = `${ariaLabel}, dimmed`;\n }\n\n if (this.hasRouterSlot()) {\n this.routerSlot.ariaLabel = ariaLabel;\n } else {\n this.treeItemElement.ariaLabel = ariaLabel;\n }\n }\n\n private setTreeItemPadding = () => {\n let level = 1;\n let parentElement = this.el.parentElement;\n const treeItemContent = this.el.shadowRoot.querySelector(\n \".tree-item-content\"\n ) as HTMLElement;\n\n const isSiblingOfParent = Array.from(parentElement.children)\n .map((sibling) => {\n if (\n sibling !== this.el &&\n !sibling.querySelector('[slot=\"router-item\"]') &&\n !sibling.querySelector('[slot=\"label\"]')\n ) {\n return sibling.children.length > 0;\n } else {\n return false;\n }\n })\n .includes(true);\n\n const isChild = parentElement.tagName === this.treeItemTag;\n\n const isRouterItem = this.hasRouterSlot();\n\n if (\n (isSiblingOfParent && !this.el.isParent) ||\n (isChild && !this.el.isParent)\n ) {\n if (isRouterItem) {\n this.routerSlot.classList.add(\"ic-tree-item-single\");\n } else {\n treeItemContent.classList.add(\"ic-tree-item-single\");\n }\n }\n\n while (parentElement) {\n if (parentElement.tagName === this.treeItemTag) {\n level++;\n if (!this.el.isParent && isSiblingOfParent) {\n treeItemContent.style.paddingLeft = `calc(var(--ic-space-xl) + ${\n level * 16\n }px)`;\n } else if (!this.el.isParent) {\n treeItemContent.style.paddingLeft = `calc(var(--ic-space-xs) + ${\n level * 24\n }px`;\n } else {\n treeItemContent.style.paddingLeft = `${level * 16}px`;\n }\n }\n parentElement = parentElement.parentElement;\n }\n };\n\n private truncateTreeItemLabel = (treeItem: HTMLIcTreeItemElement) => {\n const typographyEl: HTMLIcTypographyElement =\n treeItem.shadowRoot.querySelector(\".tree-item-label\");\n const tooltip = typographyEl?.closest(this.TOOLTIP);\n const treeContent: HTMLElement =\n treeItem.shadowRoot.querySelector(\".tree-item-content\");\n\n if (typographyEl?.scrollHeight > treeContent?.clientHeight) {\n typographyEl.classList.add(\"ic-text-overflow\");\n\n if (!tooltip) {\n const tooltipEl = document.createElement(\"ic-tooltip\");\n tooltipEl.setAttribute(\"target\", this.el.id);\n tooltipEl.setAttribute(\"label\", typographyEl.textContent);\n tooltipEl.classList.add(\"ic-tooltip-overflow\");\n tooltipEl.setAttribute(\"placement\", \"right\");\n treeContent.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n }\n };\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n return !!this.routerSlot;\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"icon\")\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n private handleDisplayTooltip = (display: boolean) => {\n const typographyEl: HTMLIcTypographyElement =\n this.el.shadowRoot.querySelector(\".tree-item-label\");\n const tooltip: HTMLIcTooltipElement = typographyEl?.closest(this.TOOLTIP);\n\n tooltip?.displayTooltip(display);\n };\n\n render() {\n const { disabled, label, selected, size, expanded, focusInset, theme } =\n this;\n\n const Component = this.href && !this.disabled ? \"a\" : \"div\";\n\n const attrs = Component == \"a\" && {\n href: this.href,\n hrefLang: this.hreflang,\n referrerPolicy: this.referrerpolicy,\n rel: this.rel,\n target: this.target,\n };\n\n return (\n <Host\n class={{\n \"ic-tree-item-disabled\": disabled,\n \"ic-tree-item-selected\": !disabled && selected,\n [`ic-tree-item-${size}`]: size !== \"medium\",\n [`ic-tree-item-focus-inset`]: focusInset,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n id={this.treeItemId}\n >\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\" />\n ) : (\n <Component\n class={{\n \"tree-item-content\": true,\n }}\n tabIndex={disabled ? -1 : 0}\n onClick={this.handleTreeItemClicked}\n ref={(el) => (this.treeItemElement = el)}\n aria-disabled={disabled ? \"true\" : \"false\"}\n aria-live=\"polite\"\n {...attrs}\n onFocus={() => this.handleDisplayTooltip(true)}\n onBlur={() => this.handleDisplayTooltip(false)}\n >\n {this.isParent && (\n <span\n class={{\n [\"arrow-dropdown\"]: true,\n [\"tree-item-expanded\"]: expanded,\n }}\n aria-hidden=\"true\"\n innerHTML={arrowDropdown}\n />\n )}\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography class=\"tree-item-label\">\n {isSlotUsed(this.el, \"label\") ? <slot name=\"label\" /> : label}\n </ic-typography>\n </Component>\n )}\n {expanded && (\n <div aria-hidden={`${!expanded}`}>\n <slot />\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"oSAAA,MAAMA,EAAgB,4gICuBtB,IAAIC,EAAc,E,MAYLC,EAAQ,M,gFACXC,KAAAC,WAAa,gBAAgBH,MAE7BE,KAAAE,YAAc,eAEdF,KAAAG,qBAAyC,KACzCH,KAAAI,QAAU,aAsJVJ,KAAAK,sBAAwB,KAC9B,GAAIL,KAAKM,SAAU,CACjBN,KAAKO,UAAYP,KAAKO,SACtBP,KAAKQ,kBAAoB,I,CAG3BR,KAAKS,kBACLT,KAAKU,SAAW,KAChBV,KAAKW,sBAAsB,EAoDrBX,KAAAY,mBAAqB,KAC3B,IAAIC,EAAQ,EACZ,IAAIC,EAAgBd,KAAKe,GAAGD,cAC5B,MAAME,EAAkBhB,KAAKe,GAAGE,WAAWC,cACzC,sBAGF,MAAMC,EAAoBC,MAAMC,KAAKP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,GACCsG,EAAA,qBAAkB,IAAItG,KACpBsG,EAAA,c"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as o,h as t,H as r}from"./p-8455d1bb.js";import{a as e}from"./p-043cf5de.js";const i=":host{display:block;margin-bottom:var(--ic-space-md);border-bottom:var(--ic-space-1px) solid var(--ic-tab-bottom-border)}:host(.ic-tab-group-monochrome){border-bottom:var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome)}:host(.ic-tab-group-inline){margin-bottom:0;border-bottom:none}.tabs-container{display:flex;flex-direction:row}.tabs-container::-webkit-scrollbar{display:none}";const s=class{constructor(t){o(this,t);this.handleHorizontalScrollAppearance=()=>{if(this.theme==="dark"||this.theme==="inherit"&&window.matchMedia("(prefers-color-scheme: dark)").matches){return"light"}else if(this.monochrome){return"dark"}else{return"default"}};this.inline=false;this.label=undefined;this.monochrome=false;this.theme="inherit"}componentDidLoad(){e([{prop:this.label,propName:"label"}],"Tab Group")}render(){const{theme:o,label:e,monochrome:i}=this;return t(r,{role:"tablist","aria-label":e,class:{["ic-tab-group-inline"]:this.inline,[`ic-theme-${o}`]:o!=="inherit",["ic-tab-group-monochrome"]:i}},t("ic-horizontal-scroll",{appearance:this.handleHorizontalScrollAppearance(),"focus-trigger":"tabFocus"},t("div",{class:"tabs-container"},t("slot",null))))}static get delegatesFocus(){return true}};s.style=i;export{s as ic_tab_group};
|
2
|
-
//# sourceMappingURL=p-d7632baf.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icTabGroupCss","TabGroup","constructor","hostRef","this","handleHorizontalScrollAppearance","theme","window","matchMedia","matches","monochrome","inline","label","undefined","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","render","h","Host","role","class","appearance","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","../web-components/dist/collection/components/ic-tab-group/ic-tab-group.js"],"sourcesContent":[":host {\n display: block;\n margin-bottom: var(--ic-space-md);\n border-bottom: var(--ic-space-1px) solid var(--ic-tab-bottom-border);\n}\n\n:host(.ic-tab-group-monochrome) {\n border-bottom: var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome);\n}\n\n:host(.ic-tab-group-inline) {\n margin-bottom: 0;\n border-bottom: none;\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n","import { Host, h } from \"@stencil/core\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nexport class TabGroup {\n constructor() {\n /**\n * Temporary function to handle horizontal scroll appearance until other dark mode work is completed.\n */\n this.handleHorizontalScrollAppearance = () => {\n if (this.theme === \"dark\" ||\n (this.theme === \"inherit\" &&\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches)) {\n return \"light\";\n }\n else if (this.monochrome) {\n return \"dark\";\n }\n else {\n return \"default\";\n }\n };\n this.inline = false;\n this.label = undefined;\n this.monochrome = false;\n this.theme = \"inherit\";\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Tab Group\");\n }\n render() {\n const { theme, label, monochrome } = this;\n return (h(Host, { role: \"tablist\", \"aria-label\": label, class: {\n [\"ic-tab-group-inline\"]: this.inline,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-tab-group-monochrome\"]: monochrome,\n } }, h(\"ic-horizontal-scroll\", { appearance: this.handleHorizontalScrollAppearance(), \"focus-trigger\": \"tabFocus\" }, h(\"div\", { class: \"tabs-container\" }, h(\"slot\", null)))));\n }\n static get is() { return \"ic-tab-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-tab-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-tab-group.css\"]\n };\n }\n static get properties() {\n return {\n \"inline\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the tabs and tab panels will be positioned separately.\"\n },\n \"attribute\": \"inline\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label to describe the purpose of the set of tabs to screen reader users.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Determines whether black variant of the tabs should be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\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 \"name\": \"internal\",\n \"text\": \"Determines whether the light or dark variant of the tabs should be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n }\n };\n }\n}\n//# sourceMappingURL=ic-tab-group.js.map\n"],"mappings":"sFAAA,MAAMA,EAAgB,+Y,MCETC,EAAQ,MACjB,WAAAC,CAAAC,G,UAIIC,KAAKC,iCAAmC,KACpC,GAAID,KAAKE,QAAU,QACdF,KAAKE,QAAU,WACZC,OAAOC,WAAW,gCAAgCC,QAAU,CAChE,MAAO,O,MAEN,GAAIL,KAAKM,WAAY,CACtB,MAAO,M,KAEN,CACD,MAAO,S,GAGfN,KAAKO,OAAS,MACdP,KAAKQ,MAAQC,UACbT,KAAKM,WAAa,MAClBN,KAAKE,MAAQ,S,CAEjB,gBAAAQ,GACIC,EAAiC,CAAC,CAAEC,KAAMZ,KAAKQ,MAAOK,SAAU,UAAY,Y,CAEhF,MAAAC,GACI,MAAMZ,MAAEA,EAAKM,MAAEA,EAAKF,WAAEA,GAAeN,KACrC,OAAQe,EAAEC,EAAM,CAAEC,KAAM,UAAW,aAAcT,EAAOU,MAAO,CACvD,CAAC,uBAAwBlB,KAAKO,OAC9B,CAAC,YAAYL,KAAUA,IAAU,UACjC,CAAC,2BAA4BI,IAC5BS,EAAE,uBAAwB,CAAEI,WAAYnB,KAAKC,mCAAoC,gBAAiB,YAAcc,EAAE,MAAO,CAAEG,MAAO,kBAAoBH,EAAE,OAAQ,Q,CAI7K,yBAAWK,GAAmB,OAAO,IAAK,G"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as i,c as t,h as e,H as s,g as a}from"./p-8455d1bb.js";import{c as o}from"./p-e081702e.js";import{f as n,i as r,a as l}from"./p-043cf5de.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0}:host(.ic-dialog-fade-in){opacity:1}:host(.disable-height-constraint){background:none;justify-content:unset;align-items:unset}.dialog.disable-height-constraint{max-height:none;position:relative}.dialog.disable-height-constraint .content-area{overflow-y:visible}@media (prefers-reduced-motion: no-preference){:host{transition:opacity var(--ic-easing-transition-slow)}.dialog{transform:translateY(-3rem);transition:transform 1000s}:host(.ic-dialog-fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}}:host(.ic-dialog-hidden){display:none}.dialog{background-color:var(--ic-dialog-background);color:var(--ic-dialog-text-primary);--ic-typography-color:var(--ic-dialog-text-primary);border:var(--ic-space-1px) solid var(--ic-dialog-border);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) 0 var(--ic-space-md);display:flex;flex-direction:column;box-sizing:border-box;overflow-x:visible}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs);padding:0 var(--ic-space-md)}.heading{overflow-wrap:break-word}.close-icon{margin-left:auto}.close-icon>svg{color:var(--ic-dialog-icon)}.content-area{-ms-overflow-style:none;scrollbar-width:none;padding:0 var(--ic-space-md);margin:0;overflow-y:auto}.content-area::-webkit-scrollbar{display:none}#dialog-content{margin-bottom:var(--ic-space-sm)}#dialog-content ::slotted(ic-typography){overflow-wrap:break-word}#dialog-content ::slotted(*){position:relative}.dialog-controls{margin-top:auto;padding:var(--ic-space-xs) var(--ic-space-md) 0;display:flex;justify-content:flex-end;gap:var(--ic-space-md)}.dialog-control-button{width:-moz-fit-content;width:fit-content}.backdrop{overflow-y:auto;position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);padding-top:16px;padding-bottom:16px}.heading ic-typography{--ic-typography-color:var(--ic-dialog-text-primary)}.label ic-typography{--ic-typography-color:var(--ic-dialog-label)}@media (min-width: 800px){:host([size="large"]) .dialog:not(.disable-width-constraint)>.content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;transform:translateY(-5rem);max-width:none;max-height:none;box-sizing:border-box}.backdrop{padding:0}.dialog.disable-height-constraint{height:auto;min-height:100vh}}@media (max-width: 364px){.dialog-control-button{width:unset}}';const d=class{constructor(s){i(this,s);this.icDialogCancelled=t(this,"icDialogCancelled",7);this.icDialogClosed=t(this,"icDialogClosed",7);this.icDialogConfirmed=t(this,"icDialogConfirmed",7);this.icDialogOpened=t(this,"icDialogOpened",7);this.DATA_GETS_FOCUS="data-gets-focus";this.DATA_GETS_FOCUS_SELECTOR="[data-gets-focus]";this.DIALOG_CONTROLS="dialog-controls";this.dialogHeight=0;this.focusedElementIndex=0;this.IC_TEXT_FIELD="IC-TEXT-FIELD";this.IC_ACCORDION="IC-ACCORDION";this.IC_ACCORDION_GROUP="IC-ACCORDION-GROUP";this.resizeObserver=null;this.dialogOpened=()=>{var i;this.dialogRendered=true;if(this.disableHeightConstraint){this.dialogEl.show()}else{(i=this.dialogEl)===null||i===void 0?void 0:i.showModal()}setTimeout((()=>{this.fadeIn=true;if(this.disableHeightConstraint&&this.backdropEl.scrollTop!==0){this.backdropEl.scrollTop=0}}),10);setTimeout((()=>{this.setInitialFocus();n(this.runResizeObserver)}),75);setTimeout((()=>{this.getFocusedElementIndex();this.icDialogOpened.emit()}),80)};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout(this.resizeObserverCallback,80)}));this.resizeObserver.observe(this.dialogEl)};this.resizeObserverCallback=()=>{if(this.dialogEl.clientHeight!==this.dialogHeight){this.dialogHeight=this.dialogEl.clientHeight}};this.refreshInteractiveElementsOnSlotChange=()=>{this.contentArea=this.el.shadowRoot.querySelector("#dialog-content slot");this.contentArea.addEventListener("slotchange",this.getInteractiveElements)};this.removeSlotChangeListener=()=>{if(this.contentArea){this.contentArea.removeEventListener("slotchange",this.getInteractiveElements)}};this.setInitialFocus=()=>{this.sourceElement=document.activeElement;let i;if(this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR)!==null){i=this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR)}else{i=this.el.shadowRoot.querySelector(this.DATA_GETS_FOCUS_SELECTOR)}if(i.tagName===this.IC_TEXT_FIELD){i.setFocus()}else if(i.tagName===this.IC_ACCORDION_GROUP){i.setFocus()}else if(i.tagName===this.IC_ACCORDION){i.setFocus()}else{i.focus({preventScroll:this.disableHeightConstraint?true:false})}};this.getFocusedElementIndex=()=>{for(let i=0;i<this.interactiveElementList.length;i++){if(this.interactiveElementList[i]===(this.el.shadowRoot.activeElement||document.activeElement)){this.focusedElementIndex=i}}};this.closeIconClick=()=>{this.open=false};this.getInteractiveElements=()=>{this.interactiveElementList=Array.from(this.el.shadowRoot.querySelectorAll("ic-button"));const i=Array.from(this.el.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex="-1"]), \n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-group, ic-radio-group, \n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button, \n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion`));if(i.length>0){if(i[0].slot!==this.DIALOG_CONTROLS){i[0].setAttribute(this.DATA_GETS_FOCUS,"")}else if(!this.destructive){i[i.length-1].setAttribute(this.DATA_GETS_FOCUS,"")}}for(let t=0;t<i.length;t++){this.interactiveElementList.splice(1+t,0,i[t])}};this.getNextFocusEl=i=>this.interactiveElementList[i];this.focusNextInteractiveElement=i=>{this.getFocusedElementIndex();this.setFocusIndexBasedOnShiftKey(i);this.loopNextFocusIndexIfLastElement();let t=this.getNextFocusEl(this.focusedElementIndex);const e=getComputedStyle(t).visibility==="hidden"||t.tagName===this.IC_ACCORDION_GROUP&&t.hasAttribute("single-expansion");if(t.tagName===this.IC_TEXT_FIELD){t.setFocus()}else{if(e){this.setFocusIndexBasedOnShiftKey(i);this.loopNextFocusIndexIfLastElement();t=this.getNextFocusEl(this.focusedElementIndex)}if(t.tagName===this.IC_ACCORDION_GROUP){t.setFocus()}else if(t.tagName===this.IC_ACCORDION){t.setFocus()}else{t.focus()}}};this.renderDialog=()=>{const{buttons:i,size:t,heading:s,label:a,destructive:n,dismissLabel:l,hideCloseButton:h}=this;return e("dialog",{class:{["dialog"]:true,[`${t}`]:true,["disable-height-constraint"]:this.disableHeightConstraint,["disable-width-constraint"]:this.disableWidthConstraint},"aria-labelledby":"dialog-label dialog-heading","aria-describedby":"dialog-alert dialog-content",ref:i=>this.dialogEl=i},e("div",{class:"heading-area"},e("div",{class:"heading-content"},e("div",{class:"label"},e("slot",{name:"label"},e("ic-typography",{variant:"label",id:"dialog-label"},a))),e("div",{class:"heading"},e("slot",{name:"heading"},e("ic-typography",{variant:"h4",id:"dialog-heading"},s)))),!h&&e("ic-button",{class:"close-icon",variant:"icon",innerHTML:o,"aria-label":l,onClick:this.closeIconClick,"data-gets-focus":n||!i?"":null})),e("div",{class:"content-area"},r(this.el,"alert")&&e("slot",{name:"alert"}),e("div",{id:"dialog-content"},e("slot",null))),i&&(r(this.el,this.DIALOG_CONTROLS)?e("div",{class:{[this.DIALOG_CONTROLS]:true}},e("slot",{name:this.DIALOG_CONTROLS})):e("div",{class:{[this.DIALOG_CONTROLS]:true}},e("ic-button",{variant:"tertiary",onClick:()=>this.cancelDialog(),class:"dialog-control-button","data-gets-focus":null},"Cancel"),e("ic-button",{variant:this.destructive?"destructive":"primary",onClick:()=>this.confirmDialog(),class:"dialog-control-button","data-gets-focus":""},"Confirm"))))};this.dialogRendered=false;this.fadeIn=false;this.buttons=true;this.closeOnBackdropClick=true;this.destructive=false;this.dismissLabel="Dismiss";this.disableHeightConstraint=false;this.disableWidthConstraint=false;this.hideCloseButton=false;this.heading=undefined;this.label=undefined;this.open=undefined;this.size="small";this.theme="inherit"}watchOpenHandler(){if(this.open){this.dialogOpened()}else{this.fadeIn=false;if(this.resizeObserver!==null){this.resizeObserver.disconnect()}setTimeout((()=>{var i;this.dialogRendered=false;this.dialogEl.close();(i=this.sourceElement)===null||i===void 0?void 0:i.focus();this.dialogHeight=0;this.icDialogClosed.emit()}),80)}}disconnectedCallback(){this.removeSlotChangeListener()}componentDidLoad(){this.getInteractiveElements();this.refreshInteractiveElementsOnSlotChange();if(this.open){this.dialogOpened()}!r(this.el,"heading")&&l([{prop:this.heading,propName:"heading"}],"Dialog")}componentDidRender(){if(getComputedStyle(this.el).display!=="none"&&this.disableHeightConstraint){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}}handleKeyboard(i){if(this.dialogRendered){switch(i.key){case"Tab":i.preventDefault();this.focusNextInteractiveElement(i.shiftKey);break;case"Escape":if(!i.repeat){this.open=false}i.stopImmediatePropagation();break}}}handleClick(i){const t=this.el.shadowRoot.querySelector("dialog");if(this.closeOnBackdropClick&&i.composedPath().indexOf(t)<=0){const t=this.dialogEl.getBoundingClientRect();const e=t.top<=i.clientY&&i.clientY<=t.top+t.height&&t.left<=i.clientX&&i.clientX<=t.left+t.width;if(!e){this.open=false}}}async cancelDialog(){this.icDialogCancelled.emit();this.open=false}async confirmDialog(){this.icDialogConfirmed.emit()}loopNextFocusIndexIfLastElement(){if(this.focusedElementIndex>this.interactiveElementList.length-1)this.focusedElementIndex=0;else if(this.focusedElementIndex<0){this.focusedElementIndex=this.interactiveElementList.length-1}}setFocusIndexBasedOnShiftKey(i){if(i){this.focusedElementIndex-=1}else{this.focusedElementIndex+=1}}render(){return e(s,{class:{["ic-dialog-hidden"]:!this.dialogRendered,["ic-dialog-fade-in"]:this.fadeIn,["disable-height-constraint"]:this.disableHeightConstraint,[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},this.disableHeightConstraint?e("div",{class:"backdrop",ref:i=>this.backdropEl=i},this.renderDialog()):this.renderDialog())}get el(){return a(this)}static get watchers(){return{open:["watchOpenHandler"]}}};d.style=h;export{d as ic_dialog};
|
2
|
-
//# sourceMappingURL=p-dcbfc485.entry.js.map
|