@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
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as i,f as e,h as t,H as s,g as a}from"./p-8455d1bb.js";import{c,m as r,i as h}from"./p-808715e2.js";const n=':host{display:block;width:var(--tree-view-width, 100%);background-color:var(--ic-tree-view-background)}:host .heading-area-container{border-bottom:var(--ic-space-1px) solid var(--ic-tree-view-divider);display:flex;align-items:center;min-height:calc(\n var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px)\n );padding:0 var(--ic-space-xs);--ic-typography-color:var(--ic-tree-view-text)}:host(.ic-tree-view-small) .heading-area-container{min-height:calc(var(--ic-space-xl) - var(--ic-space-1px))}:host(.ic-tree-view-large) .heading-area-container{min-height:calc(var(--ic-space-xxl) - var(--ic-space-1px))}:host(.ic-tree-view-truncate) .heading-area-container{height:calc(var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px))}:host(.ic-tree-view-truncate.ic-tree-view-small) .heading-area-container{height:calc(var(--ic-space-xl) - var(--ic-space-1px))}:host(.ic-tree-view-truncate.ic-tree-view-large) .heading-area-container{height:calc(var(--ic-space-xxl) - var(--ic-space-1px))}.icon-container{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}:host(.ic-tree-view-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}}';let o=0;const l=class{constructor(t){i(this,t);this.treeViewId=`ic-tree-view-${o++}`;this.treeItemTag="IC-TREE-ITEM";this.hostMutationObserver=null;this.handleKeyDown=i=>{var e;const t=this.treeItems.indexOf(this.treeItems.filter((i=>i===document.activeElement))[0]);const s=(e=this.treeItems[t])===null||e===void 0?void 0:e.expanded;switch(i.key){case"ArrowDown":this.treeItems[this.getNextItemToSelect(t,true)].setFocus();if(t!==this.treeItems.length-1){i.preventDefault()}break;case"ArrowUp":this.treeItems[this.getNextItemToSelect(t,false)].setFocus();if(t!==0){i.preventDefault()}break;case"ArrowRight":if(this.treeItems[t].isParent&&!s){this.treeItems[t].expanded=true;this.treeItems[t].hasParentExpanded=true;this.treeItems[t].updateAriaLabel()}else if(this.treeItems[t].isParent&&s){this.treeItems[t].children[0].setFocus()}i.preventDefault();break;case"ArrowLeft":if(this.treeItems[t].isParent&&s){this.treeItems[t].expanded=false;this.treeItems[t].hasParentExpanded=false;this.treeItems[t].updateAriaLabel()}else if(this.treeItems[t].parentElement.tagName===this.treeItemTag){this.treeItems[t].parentElement.setFocus()}i.preventDefault();break}};this.getNextItemToSelect=(i,e)=>{const t=this.treeItems.length-1;if(i<1){i=0}let s=e?i+1:i-1;if(s<0){s=0}else if(s>t){s=t}const a=t+1;let c=0;while(c<a){if(s<0||s>t){return i}if(!this.treeItems[s].disabled&&(this.treeItems[s].parentElement.tagName!==this.treeItemTag||this.treeItems[s].parentElement.expanded)){return s}if(s===t&&this.treeItems[s].disabled){return i}s=e?s+1:s-1;c++}return i};this.linkTreeItems=()=>{this.treeItems.forEach((i=>{i.setAttribute("context-id",this.treeViewId)}))};this.setTreeItems=()=>{this.treeItems=this.getAllTreeItems(this.el);this.linkTreeItems()};this.addSlotChangeListener=()=>{this.el.addEventListener("slotchange",this.setTreeItems)};this.truncateTreeViewHeading=()=>{const i=this.el.shadowRoot.querySelector(".tree-view-header");const e=i===null||i===void 0?void 0:i.closest("ic-tooltip");const t=this.el.shadowRoot.querySelector(".heading-area-container");if((i===null||i===void 0?void 0:i.scrollHeight)>(t===null||t===void 0?void 0:t.clientHeight)){i.classList.add("ic-text-overflow");if(!e){const e=document.createElement("ic-tooltip");e.setAttribute("target",this.el.id);e.setAttribute("label",i.textContent);e.classList.add("ic-tooltip-overflow");e.setAttribute("placement","right");t.appendChild(e);e.appendChild(i)}}};this.hostMutationCallback=i=>{if(i.some((({type:i,addedNodes:e,removedNodes:t})=>i==="childList"?c(e,t,"icon"):false))){e(this)}};this.isHeadingDefined=()=>r(this.heading)&&this.heading!==null;this.hasHeadingAreaContent=()=>h(this.el,"heading")||this.isHeadingDefined()||h(this.el,"icon");this.treeItems=undefined;this.focusInset=false;this.heading="";this.size="medium";this.theme="inherit";this.truncateHeading=false;this.truncateTreeItems=false}watchFocusInsetHandler(){this.treeItems.forEach((i=>{i.focusInset=this.focusInset}))}watchSizeHandler(){this.treeItems.forEach((i=>{i.size=this.size}))}watchThemeHandler(){this.treeItems.forEach((i=>{i.theme=this.theme}))}watchTruncateTreeItemsHandler(){this.treeItems.forEach((i=>{if(i.truncateTreeItem===undefined){i.truncateTreeItem=this.truncateTreeItems}}))}disconnectedCallback(){var i,e;(i=this.el)===null||i===void 0?void 0:i.removeEventListener("slotchange",this.setTreeItems);(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentDidLoad(){this.setTreeItems();this.watchSizeHandler();this.watchFocusInsetHandler();this.watchThemeHandler();this.watchTruncateTreeItemsHandler();setTimeout((()=>{this.truncateHeading&&this.truncateTreeViewHeading()}),100);this.addSlotChangeListener();this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}handleTreeItemSelected(i){this.treeItems.forEach((e=>{if(e.selected&&e.id!==i.detail.id){e.selected=false}}))}getAllTreeItems(i){const e=[];const t=i=>{Array.from(i.children).forEach((i=>{if(i.tagName===this.treeItemTag){e.push(i)}t(i)}))};t(i);return e}render(){const{heading:i,size:e,theme:a}=this;return t(s,{"context-id":this.treeViewId,class:{[`ic-tree-view-${e}`]:e!=="medium",[`ic-theme-${a}`]:a!=="inherit","ic-tree-view-truncate":this.truncateHeading},onKeyDown:this.handleKeyDown,"aria-label":this.isHeadingDefined()?i:null},this.hasHeadingAreaContent()&&t("div",{class:"heading-area-container"},h(this.el,"icon")&&t("div",{class:"icon-container"},t("slot",{name:"icon"})),t("ic-typography",{variant:"subtitle-large",class:"tree-view-header"},h(this.el,"heading")?t("slot",{name:"heading"}):i)),t("slot",null))}get el(){return a(this)}static get watchers(){return{focusInset:["watchFocusInsetHandler"],size:["watchSizeHandler"],theme:["watchThemeHandler"],truncateTreeItems:["watchTruncateTreeItemsHandler"]}}};l.style=n;export{l as ic_tree_view};
|
2
|
+
//# sourceMappingURL=p-aa876e5e.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icTreeViewCss","treeViewIds","TreeView","this","treeViewId","treeItemTag","hostMutationObserver","handleKeyDown","event","focussedChild","treeItems","indexOf","filter","el","document","activeElement","expanded","_a","key","getNextItemToSelect","setFocus","length","preventDefault","isParent","hasParentExpanded","updateAriaLabel","children","parentElement","tagName","currentItem","movingDown","numItems","nextItem","maxAttempts","attempts","disabled","linkTreeItems","forEach","treeItem","setAttribute","setTreeItems","getAllTreeItems","addSlotChangeListener","addEventListener","truncateTreeViewHeading","typographyEl","shadowRoot","querySelector","tooltip","closest","headingContainer","scrollHeight","clientHeight","classList","add","tooltipEl","createElement","id","textContent","appendChild","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","isHeadingDefined","isPropDefined","heading","hasHeadingAreaContent","isSlotUsed","watchFocusInsetHandler","focusInset","watchSizeHandler","size","watchThemeHandler","theme","watchTruncateTreeItemsHandler","truncateTreeItem","undefined","truncateTreeItems","disconnectedCallback","removeEventListener","_b","disconnect","componentDidLoad","setTimeout","truncateHeading","MutationObserver","observe","childList","handleTreeItemSelected","selected","detail","element","collectTreeItems","Array","from","child","push","render","h","Host","class","onKeyDown","name","variant"],"sources":["src/components/ic-tree-view/ic-tree-view.css?tag=ic-tree-view&encapsulation=shadow","src/components/ic-tree-view/ic-tree-view.tsx"],"sourcesContent":["/**\n* @prop --tree-view-width: Width of the tree view\n*/\n\n:host {\n display: block;\n width: var(--tree-view-width, 100%);\n background-color: var(--ic-tree-view-background);\n}\n\n:host .heading-area-container {\n border-bottom: var(--ic-space-1px) solid var(--ic-tree-view-divider);\n display: flex;\n align-items: center;\n min-height: calc(\n var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px)\n );\n padding: 0 var(--ic-space-xs);\n\n --ic-typography-color: var(--ic-tree-view-text);\n}\n\n:host(.ic-tree-view-small) .heading-area-container {\n min-height: calc(var(--ic-space-xl) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-large) .heading-area-container {\n min-height: calc(var(--ic-space-xxl) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-truncate) .heading-area-container {\n height: calc(var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-truncate.ic-tree-view-small) .heading-area-container {\n height: calc(var(--ic-space-xl) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-truncate.ic-tree-view-large) .heading-area-container {\n height: calc(var(--ic-space-xxl) - var(--ic-space-1px));\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-view-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","import {\n Component,\n h,\n Prop,\n Element,\n Host,\n Watch,\n State,\n Listen,\n forceUpdate,\n} from \"@stencil/core\";\nimport { IcSizes, IcThemeMode } from \"../../utils/types\";\nimport {\n isPropDefined,\n isSlotUsed,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\n\nlet treeViewIds = 0;\n\n/**\n * @slot heading - Content is set as the tree view heading.\n * @slot icon - Content is placed to the left of the heading.\n */\n\n@Component({\n tag: \"ic-tree-view\",\n styleUrl: \"ic-tree-view.css\",\n shadow: true,\n})\nexport class TreeView {\n private treeViewId = `ic-tree-view-${treeViewIds++}`;\n private treeItemTag = \"IC-TREE-ITEM\";\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcTreeViewElement;\n\n @State() treeItems: HTMLIcTreeItemElement[];\n\n /**\n * If `true`, tree items will have inset focus.\n */\n @Prop() focusInset?: boolean = false;\n @Watch(\"focusInset\")\n watchFocusInsetHandler(): void {\n this.treeItems.forEach((treeItem) => {\n treeItem.focusInset = this.focusInset;\n });\n }\n\n /**\n * The heading of the tree view.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The size of the tree view.\n */\n @Prop() size?: IcSizes = \"medium\";\n @Watch(\"size\")\n watchSizeHandler(): void {\n this.treeItems.forEach((treeItem) => {\n treeItem.size = this.size;\n });\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n watchThemeHandler(): void {\n this.treeItems.forEach((treeItem) => {\n treeItem.theme = this.theme;\n });\n }\n\n /**\n * If `true`, the tree view heading will be truncated instead of text wrapping.\n */\n @Prop() truncateHeading?: boolean = false;\n\n /**\n * If `true`, tree items will be truncated, unless they are individually overridden.\n */\n @Prop() truncateTreeItems?: boolean = false;\n @Watch(\"truncateTreeItems\")\n watchTruncateTreeItemsHandler() {\n this.treeItems.forEach((treeItem) => {\n if (treeItem.truncateTreeItem === undefined) {\n treeItem.truncateTreeItem = this.truncateTreeItems;\n }\n });\n }\n\n disconnectedCallback(): void {\n this.el?.removeEventListener(\"slotchange\", this.setTreeItems);\n\n this.hostMutationObserver?.disconnect();\n }\n\n componentDidLoad(): void {\n this.setTreeItems();\n\n this.watchSizeHandler();\n this.watchFocusInsetHandler();\n this.watchThemeHandler();\n this.watchTruncateTreeItemsHandler();\n\n setTimeout(() => {\n this.truncateHeading && this.truncateTreeViewHeading();\n }, 100);\n\n this.addSlotChangeListener();\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"icTreeItemSelected\")\n handleTreeItemSelected(event: CustomEvent): void {\n this.treeItems.forEach((treeItem) => {\n if (treeItem.selected && treeItem.id !== event.detail.id) {\n treeItem.selected = false;\n }\n });\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n const focussedChild = this.treeItems.indexOf(\n this.treeItems.filter((el) => el === document.activeElement)[0]\n );\n const expanded = this.treeItems[focussedChild]?.expanded;\n switch (event.key) {\n case \"ArrowDown\":\n this.treeItems[\n this.getNextItemToSelect(focussedChild, true)\n ].setFocus();\n if (focussedChild !== this.treeItems.length - 1) {\n event.preventDefault();\n }\n break;\n case \"ArrowUp\":\n this.treeItems[\n this.getNextItemToSelect(focussedChild, false)\n ].setFocus();\n if (focussedChild !== 0) {\n event.preventDefault();\n }\n break;\n case \"ArrowRight\":\n if (this.treeItems[focussedChild].isParent && !expanded) {\n this.treeItems[focussedChild].expanded = true;\n this.treeItems[focussedChild].hasParentExpanded = true;\n this.treeItems[focussedChild].updateAriaLabel();\n } else if (this.treeItems[focussedChild].isParent && expanded) {\n (\n this.treeItems[focussedChild].children[0] as HTMLIcTreeItemElement\n ).setFocus();\n }\n event.preventDefault();\n break;\n case \"ArrowLeft\":\n if (this.treeItems[focussedChild].isParent && expanded) {\n this.treeItems[focussedChild].expanded = false;\n this.treeItems[focussedChild].hasParentExpanded = false;\n this.treeItems[focussedChild].updateAriaLabel();\n } else if (\n this.treeItems[focussedChild].parentElement.tagName ===\n this.treeItemTag\n ) {\n (\n this.treeItems[focussedChild].parentElement as HTMLIcTreeItemElement\n ).setFocus();\n }\n event.preventDefault();\n break;\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numItems = this.treeItems.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = 0;\n } else if (nextItem > numItems) {\n nextItem = numItems;\n }\n\n const maxAttempts = numItems + 1;\n let attempts = 0;\n\n while (attempts < maxAttempts) {\n if (nextItem < 0 || nextItem > numItems) {\n return currentItem;\n }\n\n if (\n !this.treeItems[nextItem].disabled &&\n (this.treeItems[nextItem].parentElement.tagName !== this.treeItemTag ||\n (this.treeItems[nextItem].parentElement as HTMLIcTreeItemElement)\n .expanded)\n ) {\n return nextItem;\n }\n\n if (nextItem === numItems && this.treeItems[nextItem].disabled) {\n return currentItem;\n }\n\n nextItem = movingDown ? nextItem + 1 : nextItem - 1;\n attempts++;\n }\n\n return currentItem;\n };\n\n private linkTreeItems = () => {\n this.treeItems.forEach((treeItem) => {\n treeItem.setAttribute(\"context-id\", this.treeViewId);\n });\n };\n\n private setTreeItems = () => {\n this.treeItems = this.getAllTreeItems(this.el as HTMLElement);\n\n this.linkTreeItems();\n };\n\n private getAllTreeItems(element: HTMLElement): HTMLIcTreeItemElement[] {\n const treeItems: HTMLIcTreeItemElement[] = [];\n\n const collectTreeItems = (el: HTMLElement) => {\n Array.from(el.children).forEach((child) => {\n if (child.tagName === this.treeItemTag) {\n treeItems.push(child as HTMLIcTreeItemElement);\n }\n\n collectTreeItems(child as HTMLElement);\n });\n };\n\n collectTreeItems(element);\n return treeItems;\n }\n\n private addSlotChangeListener = () => {\n this.el.addEventListener(\"slotchange\", this.setTreeItems);\n };\n\n private truncateTreeViewHeading = () => {\n const typographyEl: HTMLIcTypographyElement =\n this.el.shadowRoot.querySelector(\".tree-view-header\");\n const tooltip = typographyEl?.closest(\"ic-tooltip\");\n const headingContainer: HTMLElement = this.el.shadowRoot.querySelector(\n \".heading-area-container\"\n );\n\n if (typographyEl?.scrollHeight > headingContainer?.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 headingContainer.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n }\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 isHeadingDefined = () =>\n isPropDefined(this.heading) && this.heading !== null;\n\n private hasHeadingAreaContent = (): boolean => {\n return (\n isSlotUsed(this.el, \"heading\") ||\n this.isHeadingDefined() ||\n isSlotUsed(this.el, \"icon\")\n );\n };\n\n render() {\n const { heading, size, theme } = this;\n\n return (\n <Host\n context-id={this.treeViewId}\n class={{\n [`ic-tree-view-${size}`]: size !== \"medium\",\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n \"ic-tree-view-truncate\": this.truncateHeading,\n }}\n onKeyDown={this.handleKeyDown}\n aria-label={this.isHeadingDefined() ? heading : null}\n >\n {this.hasHeadingAreaContent() && (\n <div class=\"heading-area-container\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography variant=\"subtitle-large\" class=\"tree-view-header\">\n {isSlotUsed(this.el, \"heading\") ? (\n <slot name=\"heading\" />\n ) : (\n heading\n )}\n </ic-typography>\n </div>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"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"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,c as e,h as o,H as i,g as n}from"./p-8455d1bb.js";import{r as s}from"./p-4bcd86cf.js";const r='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:root{display:block}:host{display:flex;flex-direction:row;width:-moz-fit-content;width:fit-content;min-width:-moz-min-content;min-width:min-content;border:var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);border-radius:var(--ic-border-radius)}:host(.ic-toggle-button-group-full-width){width:100%;max-width:100%}:host(.ic-toggle-button-group-loading){min-width:-moz-max-content;min-width:max-content}:host(:focus){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}::slotted(ic-toggle-button){flex-grow:1;width:-moz-min-content;width:min-content;--toggle-button-border:none !important;--toggle-button-border-hover:none !important;--toggle-button-border-active:none !important}::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border)}:host(.ic-toggle-button-group-disabled){border:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);pointer-events:none}:host(.ic-toggle-button-group-disabled) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled)}:host(.ic-toggle-button-group-monochrome){border:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome){border:var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}';const a="IC-TOGGLE-BUTTON-GROUP";const l=class{constructor(o){t(this,o);this.icChange=e(this,"icChange",7);this.keyListener=t=>{this.lastKeyPressed={key:t.key,shift:t.shiftKey}};this.setSlottedAria=t=>{const e=t.shadowRoot.querySelector("ic-button").shadowRoot.querySelector("button");let o=e.getAttribute("aria-label");o+=", ";o+=this.accessibleLabel;e.setAttribute("aria-label",o)};this.handleHostFocus=t=>{if(this.loading||this.disabled){return null}const e=t.target;const o=t.relatedTarget;const i=Array.from(e.querySelectorAll("ic-toggle-button"));if((i.every((t=>!t.checked))||this.selectType!=="single")&&this.lastKeyPressed.shift===false||i.every((t=>!t.checked))&&this.lastKeyPressed.shift===true&&o.tagName==a){i[0].focus()}else if(this.lastKeyPressed.shift===false||this.lastKeyPressed.shift===true&&o.tagName==a){const t=i.filter((t=>t.checked));t[0].focus()}};this.handleKeyDown=t=>{const e=this.getAllToggleButtons();const o=e.indexOf(e.filter((t=>t===document.activeElement))[0]);switch(t.key){case"ArrowDown":case"ArrowRight":this.selectMethod==="auto"?this.proxySelectHandler(e[this.getNextItemToSelect(o,true)]):e[this.getNextItemToSelect(o,true)].focus();break;case"ArrowUp":case"ArrowLeft":this.selectMethod==="auto"?this.proxySelectHandler(e[this.getNextItemToSelect(o,false)]):e[this.getNextItemToSelect(o,false)].focus();break}};this.getNextItemToSelect=(t,e)=>{const o=this.getAllToggleButtons();const i=o.length-1;if(t<1){t=0}let n=e?t+1:t-1;if(n<0){n=i}else if(n>i){n=0}if(o[n].disabled){n=this.getNextItemToSelect(n,e)}return n};this.lastKeyPressed={key:null,shift:false};this.accessibleLabel="Toggle button group";this.disabled=false;this.fullWidth=false;this.iconPlacement=undefined;this.loading=false;this.monochrome=false;this.selectMethod="manual";this.selectType="single";this.size="medium";this.theme="inherit";this.variant="default"}watchDisabledHandler(){this.getAllToggleButtons().forEach((t=>{t.disabled=this.disabled}));s(this.disabled,this.el)}watchMonochromeHandler(){this.getAllToggleButtons().forEach((t=>{t.monochrome=this.monochrome}))}watchThemeHandler(){this.getAllToggleButtons().forEach((t=>{t.theme=this.theme}))}selectHandler(t,e){const o=this.getAllToggleButtons();let i=t.target;e&&e.focus();if(this.selectType==="single"){if(!i){i=e}o.forEach((t=>{if(t.id!==i.id&&t.checked){t.checked=false}}));this.icChange.emit({checked:t.detail.checked,selectedOption:i})}else{const t=this.getAllToggleButtons().filter((t=>t.checked&&!t.disabled));this.icChange.emit({checked:t.map((t=>t.checked)),toggledOptions:t.map((t=>({toggleButton:t}))),selectedOption:i})}}componentWillLoad(){this.selectType==="multi"&&(this.selectMethod="manual");document.addEventListener("keydown",this.keyListener);s(this.disabled,this.el)}componentDidLoad(){this.getAllToggleButtons().forEach(((t,e)=>{this.setSlottedAria(t);t.size=this.size;t.loading=this.loading;t.iconPlacement=this.iconPlacement;t.disabled?null:t.disabled=this.disabled;t.theme=this.theme;t.monochrome=this.monochrome;t.variant=this.variant;t.fullWidth=this.fullWidth;t.id=e.toString();t.tabIndex=-1;t.addEventListener("keydown",(t=>{this.handleKeyDown(t)}));t.classList.add("expand-toggle-group-child")}))}disconnectedCallback(){document===null||document===void 0?void 0:document.removeEventListener("keydown",this.keyListener)}proxySelectHandler(t){t.checked=true;const e=new CustomEvent("icToggleChecked",{detail:{checked:t.checked}});this.selectHandler(e,t)}getAllToggleButtons(){return Array.from(this.el.querySelectorAll("ic-toggle-button"))}render(){return o(i,{role:"group","aria-label":this.accessibleLabel,"aria-disabled":this.disabled?"true":"false",tabindex:0,class:{[`ic-theme-${this.theme}`]:this.theme!=="inherit",["ic-toggle-button-group-full-width"]:this.fullWidth,["ic-toggle-button-group-loading"]:this.loading,["ic-toggle-button-group-disabled"]:this.disabled,[`ic-toggle-button-group-monochrome`]:this.monochrome,[`ic-theme-${this.theme}`]:this.theme!=="inherit"},onFocus:this.handleHostFocus},o("slot",null))}get el(){return n(this)}static get watchers(){return{disabled:["watchDisabledHandler"],monochrome:["watchMonochromeHandler"],theme:["watchThemeHandler"]}}};l.style=r;export{l as ic_toggle_button_group};
|
2
|
+
//# sourceMappingURL=p-b047cd84.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icToggleButtonGroupCss","TOGGLE_GROUP","ToggleButtonGroup","constructor","hostRef","this","keyListener","ev","lastKeyPressed","key","shift","shiftKey","setSlottedAria","el","btn","shadowRoot","querySelector","aria","getAttribute","accessibleLabel","setAttribute","handleHostFocus","loading","disabled","target","relEl","relatedTarget","toggleButtons","Array","from","querySelectorAll","every","checked","selectType","tagName","focus","toggledButton","filter","handleKeyDown","event","toggleButtonOptions","getAllToggleButtons","focussedChild","indexOf","document","activeElement","selectMethod","proxySelectHandler","getNextItemToSelect","currentItem","movingDown","numToggles","length","nextItem","fullWidth","iconPlacement","undefined","monochrome","size","theme","variant","watchDisabledHandler","forEach","removeDisabledFalse","watchMonochromeHandler","watchThemeHandler","selectHandler","tabTarget","allToggles","clickedToggle","id","icChange","emit","detail","selectedOption","toggledOptions","map","opt","toggleButton","componentWillLoad","addEventListener","componentDidLoad","i","toString","tabIndex","classList","add","disconnectedCallback","removeEventListener","toggle","customEv","CustomEvent","render","h","Host","role","tabindex","class","onFocus"],"sources":["../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.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/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: -moz-fit-content;\n width: fit-content;\n min-width: -moz-min-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.ic-toggle-button-group-full-width) {\n width: 100%;\n max-width: 100%;\n}\n\n:host(.ic-toggle-button-group-loading) {\n min-width: -moz-max-content;\n min-width: max-content;\n}\n\n:host(:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n/* CHILDREN SLOTTED */\n\n::slotted(ic-toggle-button) {\n flex-grow: 1;\n width: -moz-min-content;\n width: min-content;\n\n --toggle-button-border: none !important;\n --toggle-button-border-hover: none !important;\n --toggle-button-border-active: none !important;\n}\n\n::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border);\n}\n\n/* DISABLED */\n:host(.ic-toggle-button-group-disabled) {\n border: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n pointer-events: none;\n}\n\n:host(.ic-toggle-button-group-disabled)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n}\n\n:host(.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { removeDisabledFalse } from \"../../utils/helpers\";\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\nexport class ToggleButtonGroup {\n constructor() {\n this.keyListener = (ev) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n this.setSlottedAria = (el) => {\n const btn = el.shadowRoot\n .querySelector(\"ic-button\")\n .shadowRoot.querySelector(\"button\");\n let aria = btn.getAttribute(\"aria-label\");\n aria += \", \";\n aria += this.accessibleLabel;\n btn.setAttribute(\"aria-label\", aria);\n };\n this.handleHostFocus = (ev) => {\n if (this.loading || this.disabled) {\n return null;\n }\n const el = ev.target;\n const relEl = ev.relatedTarget;\n const toggleButtons = Array.from(el.querySelectorAll(\"ic-toggle-button\"));\n if (((toggleButtons.every((el) => !el.checked) ||\n this.selectType !== \"single\") &&\n this.lastKeyPressed.shift === false) ||\n (toggleButtons.every((el) => !el.checked) &&\n this.lastKeyPressed.shift === true &&\n relEl.tagName == TOGGLE_GROUP)) {\n toggleButtons[0].focus();\n }\n else if (this.lastKeyPressed.shift === false ||\n (this.lastKeyPressed.shift === true && relEl.tagName == TOGGLE_GROUP)) {\n // if checked is true and selectMethod is \"single\", focus that toggle\n const toggledButton = toggleButtons.filter((el) => el.checked);\n toggledButton[0].focus();\n }\n };\n this.handleKeyDown = (event) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const focussedChild = toggleButtonOptions.indexOf(toggleButtonOptions.filter((el) => el === document.activeElement)[0]);\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)])\n : toggleButtonOptions[this.getNextItemToSelect(focussedChild, true)].focus();\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n this.selectMethod === \"auto\"\n ? this.proxySelectHandler(toggleButtonOptions[this.getNextItemToSelect(focussedChild, false)])\n : toggleButtonOptions[this.getNextItemToSelect(focussedChild, false)].focus();\n break;\n case \"Tab\":\n break;\n }\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n }\n else if (nextItem > numToggles) {\n nextItem = 0;\n }\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n return nextItem;\n };\n this.lastKeyPressed = {\n key: null,\n shift: false,\n };\n this.accessibleLabel = \"Toggle button group\";\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = undefined;\n this.loading = false;\n this.monochrome = false;\n this.selectMethod = \"manual\";\n this.selectType = \"single\";\n this.size = \"medium\";\n this.theme = \"inherit\";\n this.variant = \"default\";\n }\n watchDisabledHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.disabled = this.disabled;\n });\n removeDisabledFalse(this.disabled, this.el);\n }\n watchMonochromeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.monochrome = this.monochrome;\n });\n }\n watchThemeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.theme = this.theme;\n });\n }\n selectHandler(ev, tabTarget) {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target;\n // tabTarget used in proxySelectHandler\n tabTarget && tabTarget.focus();\n if (this.selectType === \"single\") {\n if (!clickedToggle) {\n clickedToggle = tabTarget;\n }\n allToggles.forEach((el) => {\n if (el.id !== clickedToggle.id && el.checked) {\n el.checked = false;\n }\n });\n this.icChange.emit({\n checked: ev.detail.checked,\n selectedOption: clickedToggle,\n });\n }\n else {\n const toggledOptions = this.getAllToggleButtons().filter((el) => el.checked && !el.disabled);\n this.icChange.emit({\n checked: toggledOptions.map((opt) => opt.checked),\n toggledOptions: toggledOptions.map((opt) => ({\n toggleButton: opt,\n })),\n selectedOption: clickedToggle,\n });\n }\n }\n componentWillLoad() {\n this.selectType === \"multi\" && (this.selectMethod = \"manual\");\n this.selectMethod === \"auto\" && this.selectType === \"single\";\n document.addEventListener(\"keydown\", this.keyListener);\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidLoad() {\n this.getAllToggleButtons().forEach((el, i) => {\n this.setSlottedAria(el);\n el.size = this.size;\n el.loading = this.loading;\n el.iconPlacement = this.iconPlacement;\n el.disabled ? null : (el.disabled = this.disabled);\n el.theme = this.theme;\n el.monochrome = this.monochrome;\n el.variant = this.variant;\n el.fullWidth = this.fullWidth;\n el.id = i.toString();\n el.tabIndex = -1;\n el.addEventListener(\"keydown\", (ev) => {\n this.handleKeyDown(ev);\n });\n el.classList.add(\"expand-toggle-group-child\");\n });\n }\n disconnectedCallback() {\n document === null || document === void 0 ? void 0 : document.removeEventListener(\"keydown\", this.keyListener);\n }\n // trigger selectHandler when unable to add 'target'\n proxySelectHandler(toggle) {\n toggle.checked = true;\n const customEv = new CustomEvent(\"icToggleChecked\", {\n detail: {\n checked: toggle.checked,\n },\n });\n this.selectHandler(customEv, toggle);\n }\n getAllToggleButtons() {\n return Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n }\n render() {\n return (h(Host, { role: \"group\", \"aria-label\": this.accessibleLabel, \"aria-disabled\": this.disabled ? \"true\" : \"false\", tabindex: 0, class: {\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n [\"ic-toggle-button-group-full-width\"]: this.fullWidth,\n [\"ic-toggle-button-group-loading\"]: this.loading,\n [\"ic-toggle-button-group-disabled\"]: this.disabled,\n [`ic-toggle-button-group-monochrome`]: this.monochrome,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }, onFocus: this.handleHostFocus }, h(\"slot\", null)));\n }\n static get is() { return \"ic-toggle-button-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.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 of the toggle button group component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Toggle button group\\\"\"\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\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will be set to the 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 group 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 icons in relation to the toggle button labels.\"\n },\n \"attribute\": \"icon-placement\",\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 group will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"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 \"text\": \"If `true`, the toggle button group will display as black in the light theme, and white in dark theme.\"\n },\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"selectMethod\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcSelectMethodTypes\",\n \"resolved\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcSelectMethodTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectMethodTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `auto`, controls are toggled automatically when navigated to. If `manual`, the controls must be actioned to change their toggled state. The value of this prop is ignored if `selectType` is set to`multi`.\"\n },\n \"attribute\": \"select-method\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"manual\\\"\"\n },\n \"selectType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSelectTypes\",\n \"resolved\": \"\\\"multi\\\" | \\\"single\\\"\",\n \"references\": {\n \"IcSelectTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\"\n },\n \"attribute\": \"select-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"single\\\"\"\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 buttons to be displayed. This does not affect the font size of the accessible label.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\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 \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\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 states() {\n return {\n \"lastKeyPressed\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a toggle button is selected.\"\n },\n \"complexType\": {\n \"original\": \"IcChangeEventDetail\",\n \"resolved\": \"IcChangeEventDetail\",\n \"references\": {\n \"IcChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-toggle-button-group.types\",\n \"id\": \"src/components/ic-toggle-button-group/ic-toggle-button-group.types.ts::IcChangeEventDetail\"\n }\n }\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }, {\n \"propName\": \"monochrome\",\n \"methodName\": \"watchMonochromeHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemeHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icToggleChecked\",\n \"method\": \"selectHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button-group.js.map\n"],"mappings":"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"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as o,c as r,h as t,H as s}from"./p-8455d1bb.js";import{G as i,H as e,W as a,b as c,g as h}from"./p-4bcd86cf.js";const n=class{constructor(t){o(this,t);this.brandChange=r(this,"brandChange",7);this.darkModeChangeHandler=()=>{if(this.theme==="system"){this.themeClass=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"ic-theme-dark":"ic-theme-light"}else{this.themeClass=`ic-theme-${this.theme}`}};this.checkBrandColorContrast=()=>{if(i()<e&&i()>a){console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setBrandColor=()=>{const o=c(this.brandColor);if(o){const{r,g:t,b:s,a:i}=o;const{style:e}=document.documentElement;e.setProperty("--ic-brand-color-primary-r",`${r}`);e.setProperty("--ic-brand-color-primary-g",`${t}`);e.setProperty("--ic-brand-color-primary-b",`${s}`);e.setProperty("--ic-brand-color-primary-a",`${i}`);this.checkBrandColorContrast();this.brandChange.emit({mode:h(),color:o})}};this.themeClass="";this.brandColor=null;this.theme="light"}watchBrandColorPropHandler(){this.setBrandColor()}watchThemePropHandler(){this.darkModeChangeHandler()}componentWillLoad(){this.darkModeChangeHandler();this.setBrandColor();window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.darkModeChangeHandler)}render(){const{themeClass:o}=this;return t(s,{class:o},t("slot",null))}static get watchers(){return{brandColor:["watchBrandColorPropHandler"],theme:["watchThemePropHandler"]}}};export{n as ic_theme};
|
2
|
+
//# sourceMappingURL=p-b1c68968.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Theme","constructor","hostRef","this","darkModeChangeHandler","theme","themeClass","window","matchMedia","matches","checkBrandColorContrast","getBrandColorBrightness","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","console","warn","setBrandColor","colorRGBA","convertToRGBA","brandColor","r","g","b","a","style","document","documentElement","setProperty","brandChange","emit","mode","getBrandForegroundAppearance","color","watchBrandColorPropHandler","watchThemePropHandler","componentWillLoad","addEventListener","render","h","Host","class"],"sources":["../web-components/dist/collection/components/ic-theme/ic-theme.js"],"sourcesContent":["import { Host, h, } from \"@stencil/core\";\nimport { convertToRGBA, getBrandForegroundAppearance, } from \"../../utils/helpers\";\nimport { getBrandColorBrightness } from \"../../utils/helpers\";\nimport { BLACK_MIN_COLOR_BRIGHTNESS, WHITE_MAX_COLOR_BRIGHTNESS, } from \"../../utils/constants\";\nexport class Theme {\n constructor() {\n this.darkModeChangeHandler = () => {\n if (this.theme === \"system\") {\n this.themeClass =\n window.matchMedia &&\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"ic-theme-dark\"\n : \"ic-theme-light\";\n }\n else {\n this.themeClass = `ic-theme-${this.theme}`;\n }\n };\n this.checkBrandColorContrast = () => {\n if (getBrandColorBrightness() < BLACK_MIN_COLOR_BRIGHTNESS &&\n getBrandColorBrightness() > WHITE_MAX_COLOR_BRIGHTNESS) {\n console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`);\n }\n };\n this.setBrandColor = () => {\n const colorRGBA = convertToRGBA(this.brandColor);\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n const { style } = document.documentElement;\n style.setProperty(\"--ic-brand-color-primary-r\", `${r}`);\n style.setProperty(\"--ic-brand-color-primary-g\", `${g}`);\n style.setProperty(\"--ic-brand-color-primary-b\", `${b}`);\n style.setProperty(\"--ic-brand-color-primary-a\", `${a}`);\n this.checkBrandColorContrast();\n this.brandChange.emit({\n mode: getBrandForegroundAppearance(),\n color: colorRGBA,\n });\n }\n };\n this.themeClass = \"\";\n this.brandColor = null;\n this.theme = \"light\";\n }\n watchBrandColorPropHandler() {\n this.setBrandColor();\n }\n watchThemePropHandler() {\n this.darkModeChangeHandler();\n }\n componentWillLoad() {\n this.darkModeChangeHandler();\n this.setBrandColor();\n window.matchMedia &&\n window\n .matchMedia(\"(prefers-color-scheme: dark)\")\n .addEventListener(\"change\", this.darkModeChangeHandler);\n }\n render() {\n const { themeClass } = this;\n return (h(Host, { class: themeClass }, h(\"slot\", null)));\n }\n static get is() { return \"ic-theme\"; }\n static get properties() {\n return {\n \"brandColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})`\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The brand colour. Can be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"attribute\": \"brand-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"dark\\\" | \\\"light\\\" | \\\"system\\\"\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\" | \\\"system\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The theme mode. Can be \\\"dark\\\", \\\"light\\\", or \\\"system\\\". \\\"system\\\" will use the device or browser settings.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"light\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"themeClass\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"brandChange\",\n \"name\": \"brandChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when the brand color is changed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcBrand\",\n \"resolved\": \"{ mode: IcBrandForeground; color: IcColorRGB; }\",\n \"references\": {\n \"IcBrand\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcBrand\"\n }\n }\n }\n }];\n }\n static get watchers() {\n return [{\n \"propName\": \"brandColor\",\n \"methodName\": \"watchBrandColorPropHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemePropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-theme.js.map\n"],"mappings":"+HAIaA,EAAK,MACd,WAAAC,CAAAC,G,mDACIC,KAAKC,sBAAwB,KACzB,GAAID,KAAKE,QAAU,SAAU,CACzBF,KAAKG,WACDC,OAAOC,YACHD,OAAOC,WAAW,gCAAgCC,QAChD,gBACA,gB,KAET,CACDN,KAAKG,WAAa,YAAYH,KAAKE,O,GAG3CF,KAAKO,wBAA0B,KAC3B,GAAIC,IAA4BC,GAC5BD,IAA4BE,EAA4B,CACxDC,QAAQC,KAAK,4T,GAGrBZ,KAAKa,cAAgB,KACjB,MAAMC,EAAYC,EAAcf,KAAKgB,YACrC,GAAIF,EAAW,CACX,MAAMG,EAAGC,EAAEA,EAACC,EAAEA,EAACC,EAAEA,GAAMN,EACvB,MAAMO,MAAEA,GAAUC,SAASC,gBAC3BF,EAAMG,YAAY,6BAA8B,GAAGP,KACnDI,EAAMG,YAAY,6BAA8B,GAAGN,KACnDG,EAAMG,YAAY,6BAA8B,GAAGL,KACnDE,EAAMG,YAAY,6BAA8B,GAAGJ,KACnDpB,KAAKO,0BACLP,KAAKyB,YAAYC,KAAK,CAClBC,KAAMC,IACNC,MAAOf,G,GAInBd,KAAKG,WAAa,GAClBH,KAAKgB,WAAa,KAClBhB,KAAKE,MAAQ,O,CAEjB,0BAAA4B,GACI9B,KAAKa,e,CAET,qBAAAkB,GACI/B,KAAKC,uB,CAET,iBAAA+B,GACIhC,KAAKC,wBACLD,KAAKa,gBACLT,OAAOC,YACHD,OACKC,WAAW,gCACX4B,iBAAiB,SAAUjC,KAAKC,sB,CAE7C,MAAAiC,GACI,MAAM/B,WAAEA,GAAeH,KACvB,OAAQmC,EAAEC,EAAM,CAAEC,MAAOlC,GAAcgC,EAAE,OAAQ,M"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as t,h as i,H as o,g as s}from"./p-8455d1bb.js";import{
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as t,h as i,H as o,g as s}from"./p-8455d1bb.js";import{z as n,d as a}from"./p-4bcd86cf.js";import{c as r}from"./p-aae38bee.js";const l='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host{border-radius:var(--ic-border-radius);color:var(--ic-popover-nav-text);--ic-typography-color:var(--ic-popover-nav-text);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-color:var(--ic-popover-border);border-radius:var(--ic-border-radius);background-color:var(--ic-popover-background);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.ic-popover-menu-open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.ic-popover-menu-open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{--ic-typography-color:var(--ic-popover-parent-label);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}';const h=class{constructor(i){e(this,i);this.icPopoverClosed=t(this,"icPopoverClosed",7);this.ARIA_LABEL="aria-label";this.popoverMenuEls=[];this.setButtonFocus=()=>{var e;(e=this.popoverMenuEls[this.currentFocus])===null||e===void 0?void 0:e.focus()};this.findAnchorEl=e=>{let t=null;if(!e){this.submenuId===undefined&&console.error("No anchor specified for popover component")}else{t=document.querySelector(e.indexOf("#")===0?e:"#"+e);if(t===null){console.error(`Popover anchor element '${e}' not found`)}}return t};this.isNotPopoverMenuEl=e=>{const{id:t,tagName:i}=e.target;return t!==this.anchor&&i!=="IC-MENU-ITEM"&&i!=="IC-MENU-GROUP"&&i!=="IC-POPOVER-MENU"};this.getNextItemToSelect=(e,t)=>{const i=this.popoverMenuEls.length-1;if(e<1){e=0}let o=t?e+1:e-1;if(o<0){o=i}else if(o>i){o=0}return o};this.addMenuItems=e=>{for(let t=0;t<e.length;t++){const i=e[t];if(i.tagName==="IC-MENU-ITEM"){this.popoverMenuEls.push(i)}else if(i.tagName==="IC-MENU-GROUP"){const e=i.shadowRoot.querySelector(".menu-items-wrapper");const t=n(e);this.addMenuItems(t)}}};this.getMenuAriaLabel=()=>{const e=this.el.getAttribute(this.ARIA_LABEL);if(a(this.submenuId)){return`${e}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`}else{return e}};this.handleBackButtonClick=()=>{this.parentPopover.openFromChild();this.open=false};this.initPopperJS=()=>{this.popperInstance=r(this.anchorEl,this.el,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"flip",options:{fallbackPlacements:["top-start","top-end","bottom-end"],rootBoundary:"viewport"}}]})};this.openingFromChild=false;this.openingFromParent=false;this.anchor=undefined;this.parentLabel=undefined;this.parentPopover=undefined;this.submenuId=undefined;this.submenuLevel=1;this.theme="inherit";this.open=undefined}watchOpenHandler(){if(this.open){if(this.parentPopover!==undefined&&!this.popoverMenuEls.some((e=>e.id))){this.popoverMenuEls.unshift(this.backButton)}this.currentFocus=0;setTimeout(this.setButtonFocus,50)}else if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}componentDidLoad(){const e=this.el.shadowRoot.querySelector("ul.button");const t=n(e);if(t!==null){this.addMenuItems(t)}if(this.submenuId===undefined&&this.el.getAttribute(this.ARIA_LABEL)===null){console.error(`No aria-label specified for popover menu component - aria-label required`)}}componentWillRender(){this.anchorEl=this.findAnchorEl(this.anchor)}componentDidRender(){if(this.open&&!this.popperInstance){this.initPopperJS()}}handleMenuItemClick(e){if(!e.detail.submenuTriggerFor&&e.detail.label!=="Back"){this.closeMenu(false,e.detail)}}handleSubmenuChange(e){const t=e.target;this.open=false;const i=document.querySelector(`ic-popover-menu[submenu-id=${t.submenuTriggerFor}]`);i.parentPopover=this.el;i.anchor=this.anchor;i.ariaLabel=this.el.getAttribute(this.ARIA_LABEL);i.openFromParent();i.submenuLevel=this.submenuLevel+1;i.parentLabel=t.label}handleClick(e){if(this.open&&this.isNotPopoverMenuEl(e)){this.closeMenu()}}handleKeyDown(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault();this.currentFocus=this.getNextItemToSelect(this.currentFocus,e.key==="ArrowDown");this.setButtonFocus();break;case"Home":this.currentFocus=0;this.setButtonFocus();break;case"End":this.currentFocus=this.popoverMenuEls.length-1;this.setButtonFocus();break;case"Escape":case"Tab":e.preventDefault();if(this.open){this.closeMenu(true);this.el.blur()}break}}async openFromChild(){this.open=true;this.openingFromChild=true;setTimeout((()=>this.openingFromChild=false),1e3)}async openFromParent(){this.open=true;this.openingFromParent=true;setTimeout((()=>this.openingFromParent=false),1e3)}async closeMenu(e=false,t){var i;this.open=false;if(this.parentPopover){this.parentPopover.closeMenu(e,t)}else{if(e){(i=this.anchorEl)===null||i===void 0?void 0:i.focus()}this.icPopoverClosed.emit(t)}}render(){return i(o,{class:{["ic-popover-menu-open"]:this.open,[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},i("div",{id:this.parentPopover===undefined?`ic-popover-submenu-${this.submenuId}`:"",class:{menu:true},tabindex:open?"0":"-1"},i("span",{class:{"opening-from-parent":this.openingFromParent,"opening-from-child":this.openingFromChild}},a(this.submenuId)&&i("span",null,i("span",{role:"menu"},i("ic-menu-item",{class:"ic-popover-submenu-back-button",ref:e=>this.backButton=e,label:"Back",onClick:this.handleBackButtonClick,id:`ic-popover-submenu-back-button-${this.submenuLevel}`},i("svg",{slot:"icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"submenu-back-icon"},i("path",{d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})))),i("ic-typography",{variant:"subtitle-small",class:"parent-label"},this.parentLabel)),i("ul",{class:"button","aria-label":this.getMenuAriaLabel(),role:"menu"},i("slot",null)))))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{open:["watchOpenHandler"]}}};h.style=l;export{h as ic_popover_menu};
|
2
|
+
//# sourceMappingURL=p-b7e5b682.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icPopoverMenuCss","PopoverMenu","constructor","hostRef","this","ARIA_LABEL","popoverMenuEls","setButtonFocus","_a","currentFocus","focus","findAnchorEl","anchor","anchorElement","submenuId","undefined","console","error","document","querySelector","indexOf","isNotPopoverMenuEl","ev","id","tagName","target","getNextItemToSelect","currentItem","movingDown","numButtons","length","nextItem","addMenuItems","elements","i","el","push","groupSlotWrapper","shadowRoot","menuGroupElements","getSlotElements","getMenuAriaLabel","ariaLabel","getAttribute","isPropDefined","submenuLevel","parentLabel","handleBackButtonClick","parentPopover","openFromChild","open","initPopperJS","popperInstance","createPopper","anchorEl","placement","modifiers","name","options","offset","fallbackPlacements","rootBoundary","openingFromChild","openingFromParent","theme","watchOpenHandler","some","menuItem","unshift","backButton","setTimeout","destroy","disconnectedCallback","componentDidLoad","slotWrapper","popoverMenuElements","componentWillRender","componentDidRender","handleMenuItemClick","detail","submenuTriggerFor","label","closeMenu","handleSubmenuChange","childEl","openFromParent","handleClick","handleKeyDown","key","preventDefault","blur","setFocusToAnchor","menuElement","icPopoverClosed","emit","render","h","Host","class","menu","tabindex","role","ref","onClick","slot","viewBox","fill","xmlns","d","variant","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","../web-components/dist/collection/components/ic-popover-menu/ic-popover-menu.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/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-popover-nav-text);\n\n --ic-typography-color: var(--ic-popover-nav-text);\n\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-color: var(--ic-popover-border);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-popover-background);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.ic-popover-menu-open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.ic-popover-menu-open) .menu {\n visibility: visible;\n height: -moz-fit-content;\n height: fit-content;\n max-height: var(--max-height, -moz-fit-content);\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n --ic-typography-color: var(--ic-popover-parent-label);\n\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport { createPopper } from \"@popperjs/core\";\nexport class PopoverMenu {\n constructor() {\n this.ARIA_LABEL = \"aria-label\";\n this.popoverMenuEls = [];\n this.setButtonFocus = () => {\n var _a;\n (_a = this.popoverMenuEls[this.currentFocus]) === null || _a === void 0 ? void 0 : _a.focus();\n };\n // Checks that the popover menu has an anchor\n this.findAnchorEl = (anchor) => {\n let anchorElement = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n }\n else {\n anchorElement = document.querySelector(anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor);\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n this.isNotPopoverMenuEl = (ev) => {\n const { id, tagName } = ev.target;\n return (id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\");\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const numButtons = this.popoverMenuEls.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n }\n else if (nextItem > numButtons) {\n nextItem = 0;\n }\n return nextItem;\n };\n this.addMenuItems = (elements) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n }\n else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\".menu-items-wrapper\");\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n this.getMenuAriaLabel = () => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n }\n else {\n return ariaLabel;\n }\n };\n this.handleBackButtonClick = () => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n this.initPopperJS = () => {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n };\n this.openingFromChild = false;\n this.openingFromParent = false;\n this.anchor = undefined;\n this.parentLabel = undefined;\n this.parentPopover = undefined;\n this.submenuId = undefined;\n this.submenuLevel = 1;\n this.theme = \"inherit\";\n this.open = undefined;\n }\n watchOpenHandler() {\n if (this.open) {\n if (this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n this.currentFocus = 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n }\n else if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n componentDidLoad() {\n const slotWrapper = this.el.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n if (this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null) {\n console.error(`No aria-label specified for popover menu component - aria-label required`);\n }\n }\n componentWillRender() {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n componentDidRender() {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n handleMenuItemClick(ev) {\n if (!ev.detail.submenuTriggerFor && ev.detail.label !== \"Back\") {\n this.closeMenu(false, ev.detail);\n }\n }\n // This is listening for the event emitted when a menu item is acting as a trigger button\n handleSubmenuChange(ev) {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target;\n this.open = false;\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(`ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`);\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n handleClick(ev) {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n // Manages the keyboard navigation in the popover menu\n handleKeyDown(ev) {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, ev.key === \"ArrowDown\");\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n ev.preventDefault();\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n /**\n * @internal Opens the menu from the child menu.\n */\n async openFromChild() {\n this.open = true;\n this.openingFromChild = true;\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n /**\n * @internal Opens the menu from the parent menu.\n */\n async openFromParent() {\n this.open = true;\n this.openingFromParent = true;\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n /**\n * @internal Close the menu, emit icPopoverClosed of the root popover\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n async closeMenu(setFocusToAnchor = false, menuElement) {\n var _a;\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor, menuElement);\n }\n else {\n if (setFocusToAnchor) {\n (_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.focus();\n }\n this.icPopoverClosed.emit(menuElement);\n }\n }\n render() {\n return (h(Host, { class: {\n [\"ic-popover-menu-open\"]: this.open,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n } }, h(\"div\", { id: this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\", class: {\n menu: true,\n }, tabindex: open ? \"0\" : \"-1\" }, h(\"span\", { class: {\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n } }, isPropDefined(this.submenuId) && (h(\"span\", null, h(\"span\", { role: \"menu\" }, h(\"ic-menu-item\", { class: \"ic-popover-submenu-back-button\", ref: (el) => (this.backButton = el), label: \"Back\", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, h(\"svg\", { slot: \"icon\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", class: \"submenu-back-icon\" }, h(\"path\", { d: \"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\", fill: \"currentColor\" })))), h(\"ic-typography\", { variant: \"subtitle-small\", class: \"parent-label\" }, this.parentLabel))), h(\"ul\", { class: \"button\", \"aria-label\": this.getMenuAriaLabel(), role: \"menu\" }, h(\"slot\", null))))));\n }\n static get is() { return \"ic-popover-menu\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get properties() {\n return {\n \"anchor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\"\n },\n \"attribute\": \"anchor\",\n \"reflect\": false\n },\n \"parentLabel\": {\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 \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"parent-label\",\n \"reflect\": false\n },\n \"parentPopover\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLIcPopoverMenuElement\",\n \"resolved\": \"HTMLIcPopoverMenuElement\",\n \"references\": {\n \"HTMLIcPopoverMenuElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcPopoverMenuElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n }\n },\n \"submenuId\": {\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 unique identifier for a popover submenu.\"\n },\n \"attribute\": \"submenu-id\",\n \"reflect\": false\n },\n \"submenuLevel\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The level of menu being displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"submenu-level\",\n \"reflect\": false,\n \"defaultValue\": \"1\"\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 \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"open\": {\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 popover menu will be displayed.\"\n },\n \"attribute\": \"open\",\n \"reflect\": true,\n \"defaultValue\": \"undefined\"\n }\n };\n }\n static get states() {\n return {\n \"openingFromChild\": {},\n \"openingFromParent\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icPopoverClosed\",\n \"name\": \"icPopoverClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover menu is closed.\"\n },\n \"complexType\": {\n \"original\": \"HTMLIcMenuItemElement\",\n \"resolved\": \"HTMLIcMenuItemElement\",\n \"references\": {\n \"HTMLIcMenuItemElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcMenuItemElement\"\n }\n }\n }\n }];\n }\n static get methods() {\n return {\n \"openFromChild\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the child menu.\"\n }]\n }\n },\n \"openFromParent\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the parent menu.\"\n }]\n }\n },\n \"closeMenu\": {\n \"complexType\": {\n \"signature\": \"(setFocusToAnchor?: boolean, menuElement?: HTMLIcMenuItemElement) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"setFocusToAnchor\",\n \"type\": \"boolean\",\n \"docs\": \"when true return focus to anchor element when menu is closed\"\n }, {\n \"name\": \"menuElement\",\n \"type\": \"HTMLIcMenuItemElement\",\n \"docs\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"HTMLIcMenuItemElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcMenuItemElement\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Close the menu, emit icPopoverClosed of the root popover\"\n }, {\n \"name\": \"param\",\n \"text\": \"setFocusToAnchor when true return focus to anchor element when menu is closed\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"open\",\n \"methodName\": \"watchOpenHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"handleMenuItemClick\",\n \"method\": \"handleMenuItemClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"triggerPopoverMenuInstance\",\n \"method\": \"handleSubmenuChange\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }, {\n \"name\": \"click\",\n \"method\": \"handleClick\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyDown\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-popover-menu.js.map\n"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as t,H as i,g as o}from"./p-8455d1bb.js";import{D as r,g as n}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t,H as i,g as o}from"./p-8455d1bb.js";import{D as r,g as n}from"./p-4bcd86cf.js";const l='/*! 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(.footer-link-ungrouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:2.5rem;--footer-link-margin-bottom:0}:host(.footer-link-ungrouped-small){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-sparse){--footer-link-margin-left:0;--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link-grouped-small){--footer-link-margin-left:var(--ic-space-md);--footer-link-margin-right:0;--footer-link-margin-bottom:var(--ic-space-md)}:host(.footer-link){margin-left:var(--footer-link-margin-left);margin-right:var(--footer-link-margin-right);margin-bottom:var(--footer-link-margin-bottom)}.ic-link-open-in-new-icon{vertical-align:middle;margin-left:var(--ic-space-xxs)}.ic-link>.ic-link-open-in-new-icon{fill:var(--ic-color-hyperlink-default)}.ic-link-open-in-new-icon>svg{width:var(--ic-space-md);height:var(--ic-space-md);fill:currentcolor}.ic-link:visited>.ic-link-open-in-new-icon{fill:var(--ic-color-hyperlink-visited)}.ic-link.light:visited>.ic-link-open-in-new-icon{fill:var(--ic-color-hyperlink-contrast-visited)}:host(.breadcrumb-link) .ic-link{display:var(--breadcrumb-link-display);align-items:var(--breadcrumb-link-align-items);gap:var(--breadcrumb-link-gap)}:host(.breadcrumb-link) .ic-link ::slotted(.back-icon){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.breadcrumb-link.current-page) a,:host(.breadcrumb-link.current-page) ::slotted(a){font-weight:normal;color:inherit;text-decoration:none;display:flex;align-items:center}:host(.breadcrumb-link.current-page) .ic-link,:host(.breadcrumb-link.current-page) ::slotted(a:focus){outline:var(--ic-hc-focus-outline);text-decoration:none}:host(.breadcrumb-link.current-page) .ic-link:visited{color:var(--ic-color-text-primary)}:host(.footer-link-light) ::part(link),:host(.footer-link-dark) ::part(link){color:var(--ic-footer-link)}:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:var(--ic-footer-icon)}@media (forced-colors: active){:host(.footer-link-light) ::slotted(svg),:host(.footer-link-dark) ::slotted(svg){fill:currentcolor}}';const a=class{constructor(t){e(this,t);this.deviceSize=r.XL;this.footerConfig={small:false,grouped:false};this.foregroundColor=n();this.download=false;this.href=null;this.hreflang=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.target=undefined}componentWillLoad(){this.footerConfig=this.inferConfig(this.el)}footerResizeHandler(){this.footerConfig=this.inferConfig(this.el)}footerBrandChangeHandler(e){this.foregroundColor=e.detail.mode}inferConfig(e){if(e.parentElement!==null){if(e.parentElement.classList.contains("ic-footer")){return{small:e.parentElement.classList.contains("ic-footer-small"),grouped:e.parentElement.classList.contains("ic-footer-grouped")}}else{return this.inferConfig(e.parentElement)}}else{return{small:false,grouped:false}}}render(){const{footerConfig:e,href:o,hreflang:r,referrerpolicy:n,rel:l,target:a,download:s}=this;const{small:c,grouped:d}=e;return t(i,{class:{"footer-link":true,[`footer-link-${d?"grouped":"ungrouped"}-${c?"small":"sparse"}`]:true,[`footer-link-${this.foregroundColor}`]:true},role:"listitem"},t("ic-link",{href:o,hreflang:r,referrerpolicy:n,rel:l,download:s!==false?s:null,target:a},t("slot",null)))}static get delegatesFocus(){return true}get el(){return o(this)}};a.style=l;export{a as ic_footer_link};
|
2
|
+
//# sourceMappingURL=p-b9081a99.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icFooterLinkCss","FooterLink","constructor","hostRef","this","deviceSize","DEVICE_SIZES","XL","footerConfig","small","grouped","foregroundColor","getBrandForegroundAppearance","download","href","hreflang","undefined","referrerpolicy","rel","target","componentWillLoad","inferConfig","el","footerResizeHandler","footerBrandChangeHandler","ev","detail","mode","e","parentElement","classList","contains","render","h","Host","class","role","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-footer-link/ic-footer-link.css?tag=ic-footer-link&encapsulation=shadow","../web-components/dist/collection/components/ic-footer-link/ic-footer-link.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:host(.footer-link-ungrouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 2.5rem;\n --footer-link-margin-bottom: 0;\n}\n\n:host(.footer-link-ungrouped-small) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-sparse) {\n --footer-link-margin-left: 0;\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link-grouped-small) {\n --footer-link-margin-left: var(--ic-space-md);\n --footer-link-margin-right: 0;\n --footer-link-margin-bottom: var(--ic-space-md);\n}\n\n:host(.footer-link) {\n margin-left: var(--footer-link-margin-left);\n margin-right: var(--footer-link-margin-right);\n margin-bottom: var(--footer-link-margin-bottom);\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-color-hyperlink-default);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-color-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-color-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-text-primary);\n}\n\n:host(.footer-link-light) ::part(link),\n:host(.footer-link-dark) ::part(link) {\n color: var(--ic-footer-link);\n}\n\n:host(.footer-link-light) ::slotted(svg),\n:host(.footer-link-dark) ::slotted(svg) {\n fill: var(--ic-footer-icon);\n}\n\n@media (forced-colors: active) {\n :host(.footer-link-light) ::slotted(svg),\n :host(.footer-link-dark) ::slotted(svg) {\n fill: currentcolor;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { DEVICE_SIZES, getBrandForegroundAppearance, } from \"../../utils/helpers\";\nexport class FooterLink {\n constructor() {\n this.deviceSize = DEVICE_SIZES.XL;\n this.footerConfig = { small: false, grouped: false };\n this.foregroundColor = getBrandForegroundAppearance();\n this.download = false;\n this.href = null;\n this.hreflang = undefined;\n this.referrerpolicy = undefined;\n this.rel = undefined;\n this.target = undefined;\n }\n componentWillLoad() {\n this.footerConfig = this.inferConfig(this.el);\n }\n footerResizeHandler() {\n this.footerConfig = this.inferConfig(this.el);\n }\n footerBrandChangeHandler(ev) {\n this.foregroundColor = ev.detail.mode;\n }\n inferConfig(e) {\n if (e.parentElement !== null) {\n if (e.parentElement.classList.contains(\"ic-footer\")) {\n return {\n small: e.parentElement.classList.contains(\"ic-footer-small\"),\n grouped: e.parentElement.classList.contains(\"ic-footer-grouped\"),\n };\n }\n else {\n return this.inferConfig(e.parentElement);\n }\n }\n else {\n return { small: false, grouped: false };\n }\n }\n render() {\n const { footerConfig, href, hreflang, referrerpolicy, rel, target, download, } = this;\n const { small, grouped } = footerConfig;\n return (h(Host, { class: {\n \"footer-link\": true,\n [`footer-link-${grouped ? \"grouped\" : \"ungrouped\"}-${small ? \"small\" : \"sparse\"}`]: true,\n [`footer-link-${this.foregroundColor}`]: true,\n }, role: \"listitem\" }, h(\"ic-link\", { href: href, hreflang: hreflang, referrerpolicy: referrerpolicy, rel: rel, download: download !== false ? download : null, target: target }, h(\"slot\", null))));\n }\n static get is() { return \"ic-footer-link\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-footer-link.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-footer-link.css\"]\n };\n }\n static get properties() {\n return {\n \"download\": {\n \"type\": \"any\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | boolean\",\n \"resolved\": \"boolean | string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the user can save the linked URL instead of navigating to it.\"\n },\n \"attribute\": \"download\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\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 URL that the link points to.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"hreflang\": {\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 human language of the linked URL.\"\n },\n \"attribute\": \"hreflang\",\n \"reflect\": false\n },\n \"referrerpolicy\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ReferrerPolicy\",\n \"resolved\": \"\\\"\\\" | \\\"no-referrer\\\" | \\\"no-referrer-when-downgrade\\\" | \\\"origin\\\" | \\\"origin-when-cross-origin\\\" | \\\"same-origin\\\" | \\\"strict-origin\\\" | \\\"strict-origin-when-cross-origin\\\" | \\\"unsafe-url\\\"\",\n \"references\": {\n \"ReferrerPolicy\": {\n \"location\": \"global\",\n \"id\": \"global::ReferrerPolicy\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"How much of the referrer to send when following the link.\"\n },\n \"attribute\": \"referrerpolicy\",\n \"reflect\": false\n },\n \"rel\": {\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 relationship of the linked URL as space-separated link types.\"\n },\n \"attribute\": \"rel\",\n \"reflect\": false\n },\n \"target\": {\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 place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\"\n },\n \"attribute\": \"target\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"deviceSize\": {},\n \"footerConfig\": {},\n \"foregroundColor\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"footerResized\",\n \"method\": \"footerResizeHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"brandChange\",\n \"method\": \"footerBrandChangeHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-footer-link.js.map\n"],"mappings":"oGAAA,MAAMA,EAAkB,g+I,MCEXC,EAAU,MACnB,WAAAC,CAAAC,G,UACIC,KAAKC,WAAaC,EAAaC,GAC/BH,KAAKI,aAAe,CAAEC,MAAO,MAAOC,QAAS,OAC7CN,KAAKO,gBAAkBC,IACvBR,KAAKS,SAAW,MAChBT,KAAKU,KAAO,KACZV,KAAKW,SAAWC,UAChBZ,KAAKa,eAAiBD,UACtBZ,KAAKc,IAAMF,UACXZ,KAAKe,OAASH,S,CAElB,iBAAAI,GACIhB,KAAKI,aAAeJ,KAAKiB,YAAYjB,KAAKkB,G,CAE9C,mBAAAC,GACInB,KAAKI,aAAeJ,KAAKiB,YAAYjB,KAAKkB,G,CAE9C,wBAAAE,CAAyBC,GACrBrB,KAAKO,gBAAkBc,EAAGC,OAAOC,I,CAErC,WAAAN,CAAYO,GACR,GAAIA,EAAEC,gBAAkB,KAAM,CAC1B,GAAID,EAAEC,cAAcC,UAAUC,SAAS,aAAc,CACjD,MAAO,CACHtB,MAAOmB,EAAEC,cAAcC,UAAUC,SAAS,mBAC1CrB,QAASkB,EAAEC,cAAcC,UAAUC,SAAS,qB,KAG/C,CACD,OAAO3B,KAAKiB,YAAYO,EAAEC,c,MAG7B,CACD,MAAO,CAAEpB,MAAO,MAAOC,QAAS,M,EAGxC,MAAAsB,GACI,MAAMxB,aAAEA,EAAYM,KAAEA,EAAIC,SAAEA,EAAQE,eAAEA,EAAcC,IAAEA,EAAGC,OAAEA,EAAMN,SAAEA,GAAcT,KACjF,MAAMK,MAAEA,EAAKC,QAAEA,GAAYF,EAC3B,OAAQyB,EAAEC,EAAM,CAAEC,MAAO,CACjB,cAAe,KACf,CAAC,eAAezB,EAAU,UAAY,eAAeD,EAAQ,QAAU,YAAa,KACpF,CAAC,eAAeL,KAAKO,mBAAoB,MAC1CyB,KAAM,YAAcH,EAAE,UAAW,CAAEnB,KAAMA,EAAMC,SAAUA,EAAUE,eAAgBA,EAAgBC,IAAKA,EAAKL,SAAUA,IAAa,MAAQA,EAAW,KAAMM,OAAQA,GAAUc,EAAE,OAAQ,O,CAIpM,yBAAWI,GAAmB,OAAO,IAAK,C"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as n,f as e,h as t,H as i,g as r}from"./p-8455d1bb.js";import{c as o,r as a,i as s,a as d,h as c,I as l}from"./p-4bcd86cf.js";import{C as h}from"./p-170ddfc2.js";const m='/*! 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:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-card-text-primary) !important;\n}\n\na:visited {\n color: var(--ic-card-link-action-dark) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card {\n display: flex;\n flex-direction: column;\n border: var(--ic-space-1px) solid var(--ic-card-border-primary);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-card-text-primary);\n transition: var(--ic-easing-transition-fast);\n position: relative;\n width: inherit;\n min-width: -moz-fit-content;\n min-width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n min-height: 100%;\n\n ::slotted(svg) {\n fill: var(--ic-card-icon);\n }\n &.monochrome {\n border: var(--ic-border-width) solid var(--ic-card-border-monochrome);\n }\n &.fullwidth {\n width: 100%;\n }\n &.clickable {\n &:hover {\n background-color: var(--ic-card-background-hover);\n border: var(--ic-space-1px) solid var(--ic-card-hover-border-color);\n cursor: pointer;\n }\n &.focussed,\n &:focus {\n background-color: var(--ic-card-background-hover);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n border: var(--ic-space-1px) solid var(--ic-card-pressed-border-color);\n }\n &:active {\n background-color: var(--ic-card-background-pressed);\n box-shadow: var(--ic-border-focus);\n\n .card-title {\n text-decoration: none;\n }\n }\n .card-title {\n --ic-typography-color: var(--ic-card-clickable-text);\n\n color: var(--ic-card-clickable-text);\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n }\n }\n &.disabled {\n border: var(--ic-space-1px) dashed var(--ic-card-disabled-border-color);\n\n .card-message,\n .subheading,\n .card-title {\n --ic-typography-color: var(--ic-card-disabled-text);\n }\n .card-title {\n text-decoration: underline;\n text-decoration-thickness: var(--ic-space-1px);\n text-decoration-color: var(--ic-card-disabled-text);\n color: var(--ic-card-disabled-text);\n }\n ::slotted(svg) {\n fill: var(--ic-card-disabled-text);\n }\n }\n}\n\n.card-header {\n display: flex;\n align-items: center;\n}\n\n.icon {\n display: flex;\n align-items: center;\n padding-right: var(--ic-space-xs);\n}\n\n.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title {\n display: inline-block;\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n@supports (text-underline-offset: 25%) {\n .card.clickable:hover .card-title,\n .card.clickable:focus .card-title,\n .card.clickable.focussed .card-title {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n\n.subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n.adornment {\n margin-top: var(--ic-space-xxs);\n}\n\n.card-message {\n margin-top: var(--ic-space-md);\n align-items: left;\n}\n\n.interaction-button {\n margin-left: auto;\n}\n\n.image-top {\n margin-bottom: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.image-mid {\n margin-top: var(--ic-space-md);\n display: flex;\n justify-content: center;\n}\n\n.interaction-area {\n display: flex;\n flex-grow: 1;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-md);\n align-items: flex-end;\n}\n\n.interaction-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--ic-space-sm);\n}\n\n.toggle-button {\n width: 2.5rem;\n height: 2.5rem;\n padding: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n min-width: 0;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n\n &:hover {\n background-color: var(--ic-card-background-hover);\n }\n &:focus {\n box-shadow: var(--ic-border-focus);\n }\n &:active:not(:focus) {\n background-color: var(--ic-card-background-pressed);\n }\n\n svg {\n pointer-events: none;\n width: 100% !important;\n height: 100% !important;\n fill: currentcolor !important;\n }\n}\n\n#ic-tooltip-expand-button {\n margin-left: auto;\n position: relative;\n}\n\n.toggle-button-closed svg {\n transform: rotate(90deg);\n}\n\n.toggle-button-expanded svg {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n margin-top: var(--ic-space-md);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .card {\n ::slotted(svg) {\n fill: currentcolor;\n }\n &.disabled {\n border-color: GrayText !important;\n\n ::slotted(svg) {\n fill: GrayText !important;\n }\n .card-message,\n .subheading,\n .card-title {\n color: GrayText;\n\n --ic-typography-color: GrayText;\n }\n }\n }\n}\n';const p=class{constructor(t){n(this,t);this.hostMutationObserver=null;this.parentFocussed=()=>{this.isFocussed=true};this.parentBlurred=()=>{this.isFocussed=false};this.toggleExpanded=()=>{this.areaExpanded=!this.areaExpanded};this.hostMutationCallback=n=>{if(n.some((({type:n,addedNodes:e,removedNodes:t})=>n==="childList"?o(e,t,["message","adornment","expanded-content","image-top","image-mid","icon","interaction-button","badge","interaction-controls"]):false))){e(this)}};this.areaExpanded=false;this.isFocussed=false;this.monochrome=false;this.parentEl=null;this.parentIsAnchorTag=false;this.clickable=false;this.disabled=false;this.expandable=false;this.fullWidth=false;this.heading=undefined;this.href=undefined;this.hreflang="";this.message="";this.referrerpolicy=undefined;this.rel=undefined;this.subheading=undefined;this.target=undefined;this.theme="inherit"}watchDisabledHandler(){a(this.disabled,this.el)}disconnectedCallback(){var n;if(this.parentIsAnchorTag){this.parentEl.removeEventListener("focus",this.parentFocussed);this.parentEl.removeEventListener("blur",this.parentBlurred)}(n=this.hostMutationObserver)===null||n===void 0?void 0:n.disconnect()}componentWillLoad(){this.parentEl=this.el.parentElement;if(this.parentEl.tagName==="A"){this.clickable=true;this.parentIsAnchorTag=true;this.parentEl.classList.add("ic-card-wrapper-link");this.parentEl.addEventListener("focus",this.parentFocussed);this.parentEl.addEventListener("blur",this.parentBlurred)}a(this.disabled,this.el)}componentDidLoad(){!s(this.el,"heading")&&d([{prop:this.heading,propName:"heading"}],"Card");this.updateTheme();this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}handleHostClick(n){if(this.disabled){n.stopImmediatePropagation()}}brandChangeHandler(n){this.updateTheme(n.detail.mode)}async setFocus(){if(this.el.shadowRoot.querySelector("a")){this.el.shadowRoot.querySelector("a").focus()}else if(this.el.shadowRoot.querySelector("button")){this.el.shadowRoot.querySelector("button").focus()}}updateTheme(n=null){const e=c(this.el,n);if(e!==l.Default){this.monochrome=true;this.theme=e===l.Light?l.Dark:l.Light}}render(){const{clickable:n,disabled:e,expandable:r,fullWidth:o,heading:a,isFocussed:d,message:c,monochrome:l,href:m,hreflang:p,parentIsAnchorTag:b,referrerpolicy:u,rel:g,subheading:f,target:v,theme:x}=this;const y=b||!n?"div":m===undefined?"button":"a";const w=y=="a"&&{href:m,hrefLang:p,referrerPolicy:u,rel:g,target:v};return t(i,{class:{[`ic-theme-${x}`]:x!=="inherit"}},t(y,Object.assign({class:{card:true,clickable:n&&!e,disabled:e,fullwidth:o,focussed:d,monochrome:l},tabindex:n&&!b?0:null,"aria-disabled":e?"true":null,disabled:e?true:null},w),s(this.el,"image-top")&&t("div",{class:"image-top"},t("slot",{name:"image-top"})),t("div",{class:"card-header"},s(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("div",{class:"card-title"},t("slot",{name:"heading"},t("ic-typography",{variant:"h4"},t("p",null,a)))),s(this.el,"interaction-button")&&t("div",{class:"interaction-button"},t("slot",{name:"interaction-button"}))),(f||s(this.el,"subheading"))&&t("div",{class:"subheading"},t("slot",{name:"subheading"},t("ic-typography",{variant:"subtitle-small"},f))),s(this.el,"adornment")&&t("div",{class:"adornment"},t("slot",{name:"adornment"})),s(this.el,"image-mid")&&t("div",{class:"image-mid"},t("slot",{name:"image-mid"})),(c||s(this.el,"message"))&&t("div",{class:"card-message"},c&&t("ic-typography",{variant:"body"},c),s(this.el,"message")&&t("slot",{name:"message"})),(s(this.el,"interaction-controls")||r)&&t("div",{class:"interaction-area"},t("div",{class:"interaction-controls"},t("slot",{name:"interaction-controls"})),r&&t("ic-tooltip",{id:"ic-tooltip-expand-button",label:"Toggle expandable area",silent:true},t("button",{class:{"toggle-button":true,[`toggle-button-${this.areaExpanded?"expanded":"closed"}`]:true},"aria-label":"Toggle expandable area","aria-expanded":`${this.areaExpanded}`,"aria-controls":this.areaExpanded?"expanded-content-area":null,onClick:this.toggleExpanded,innerHTML:h}))),s(this.el,"expanded-content")&&this.areaExpanded&&t("div",{class:"expanded-content",id:"expanded-content-area"},t("slot",{name:"expanded-content"})),s(this.el,"badge")&&t("slot",{name:"badge"})))}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};p.style=m;export{p as ic_card_vertical};
|
2
|
+
//# sourceMappingURL=p-c6bdbee1.entry.js.map
|