@ukic/canary-web-components 3.0.0-canary.18 → 3.0.0-canary.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-6f33d131.js → helpers-a5405964.js} +12 -20
- package/dist/cjs/helpers-a5405964.js.map +1 -0
- package/dist/cjs/ic-accordion.cjs.entry.js +9 -7
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
- 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 +8 -8
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox_3.cjs.entry.js +20 -37
- package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +311 -319
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +6 -5
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +22 -21
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +7 -7
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +11 -21
- 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-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +115 -163
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +64 -61
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +4 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +6 -6
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +160 -231
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +4 -4
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +49 -31
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +23 -4
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +13 -13
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +4 -4
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +3 -3
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +53 -67
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +61 -63
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +64 -62
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +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-data-table/ic-data-table.css +3 -5
- package/dist/collection/components/ic-data-table/ic-data-table.js +310 -318
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +1 -0
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +30 -22
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/utils/helpers.js +23 -51
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers2.js +12 -20
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion.js +9 -7
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +1 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +2 -2
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +2 -2
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +3 -3
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-vertical.js +1 -1
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +2 -2
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox2.js +7 -12
- package/dist/components/ic-checkbox2.js.map +1 -1
- package/dist/components/ic-data-list.js +2 -2
- package/dist/components/ic-data-list.js.map +1 -1
- package/dist/components/ic-data-row.js +2 -2
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-data-table.js +311 -319
- package/dist/components/ic-data-table.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-empty-state2.js +2 -2
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer-link.js +2 -2
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-hero.js +6 -5
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +5 -5
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +3 -3
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-container2.js +2 -2
- package/dist/components/ic-input-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +4 -4
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +3 -3
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +12 -24
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +3 -3
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu2.js +17 -16
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +115 -163
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +67 -62
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +4 -4
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +6 -6
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +12 -23
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +4 -4
- 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 +4 -4
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +4 -4
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +50 -31
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +2 -2
- package/dist/components/ic-section-container2.js.map +1 -1
- package/dist/components/ic-select2.js +141 -217
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +24 -4
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +2 -2
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-skip-link.js +2 -2
- package/dist/components/ic-skip-link.js.map +1 -1
- package/dist/components/ic-status-tag.js +2 -2
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +13 -13
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +2 -2
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +4 -4
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +1 -1
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -2
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +2 -2
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-text-field2.js +16 -10
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast-region.js +1 -1
- package/dist/components/ic-toast-region.js.map +1 -1
- package/dist/components/ic-toast.js +3 -3
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +53 -67
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +61 -63
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +2 -2
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +65 -63
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-view.js +1 -1
- package/dist/components/ic-typography2.js +2 -2
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-ef07630d.entry.js → p-0c9c6c31.entry.js} +2 -2
- package/dist/core/{p-ef07630d.entry.js.map → p-0c9c6c31.entry.js.map} +1 -1
- package/dist/core/p-0e0e0942.js +2 -0
- package/dist/core/p-0e0e0942.js.map +1 -0
- package/dist/core/{p-824cbf95.entry.js → p-1673d010.entry.js} +2 -2
- package/dist/core/{p-824cbf95.entry.js.map → p-1673d010.entry.js.map} +1 -1
- package/dist/core/{p-e9683f52.entry.js → p-16e78c1d.entry.js} +2 -2
- package/dist/core/p-16e78c1d.entry.js.map +1 -0
- package/dist/core/p-17926ee3.entry.js +2 -0
- package/dist/core/p-17926ee3.entry.js.map +1 -0
- package/dist/core/{p-fbcc2a11.entry.js → p-188ba287.entry.js} +2 -2
- package/dist/core/{p-fbcc2a11.entry.js.map → p-188ba287.entry.js.map} +1 -1
- package/dist/core/{p-bff6fef6.entry.js → p-1f18bbf6.entry.js} +2 -2
- package/dist/core/{p-bff6fef6.entry.js.map → p-1f18bbf6.entry.js.map} +1 -1
- package/dist/core/{p-0e3a62cc.entry.js → p-2667c808.entry.js} +2 -2
- package/dist/core/{p-3800cda8.entry.js → p-28611f52.entry.js} +2 -2
- package/dist/core/p-28611f52.entry.js.map +1 -0
- package/dist/core/{p-fb1fce87.entry.js → p-29a49ea2.entry.js} +2 -2
- package/dist/core/{p-fb1fce87.entry.js.map → p-29a49ea2.entry.js.map} +1 -1
- package/dist/core/{p-bc2ca778.entry.js → p-3cb4ecef.entry.js} +2 -2
- package/dist/core/{p-bc2ca778.entry.js.map → p-3cb4ecef.entry.js.map} +1 -1
- package/dist/core/p-4444e787.entry.js +2 -0
- package/dist/core/{p-cd770df5.entry.js.map → p-4444e787.entry.js.map} +1 -1
- package/dist/core/p-4aaf10a5.entry.js +2 -0
- package/dist/core/p-4aaf10a5.entry.js.map +1 -0
- package/dist/core/{p-e7c00131.entry.js → p-578a02ff.entry.js} +2 -2
- package/dist/core/{p-e7c00131.entry.js.map → p-578a02ff.entry.js.map} +1 -1
- package/dist/core/{p-a054bb1b.entry.js → p-582da938.entry.js} +2 -2
- package/dist/core/{p-a054bb1b.entry.js.map → p-582da938.entry.js.map} +1 -1
- package/dist/core/{p-d328f6fc.entry.js → p-5926c2b2.entry.js} +2 -2
- package/dist/core/{p-d328f6fc.entry.js.map → p-5926c2b2.entry.js.map} +1 -1
- package/dist/core/p-61e78ce0.entry.js +2 -0
- package/dist/core/p-61e78ce0.entry.js.map +1 -0
- package/dist/core/{p-5744b8b3.entry.js → p-6a63a73a.entry.js} +2 -2
- package/dist/core/{p-5744b8b3.entry.js.map → p-6a63a73a.entry.js.map} +1 -1
- package/dist/core/{p-266686d0.entry.js → p-6bfff7ba.entry.js} +2 -2
- package/dist/core/p-6bfff7ba.entry.js.map +1 -0
- package/dist/core/{p-f6141c29.entry.js → p-7c3cd0b8.entry.js} +2 -2
- package/dist/core/p-7e4f5717.entry.js +2 -0
- package/dist/core/p-7e4f5717.entry.js.map +1 -0
- package/dist/core/{p-eb88b348.entry.js → p-7eaa223b.entry.js} +2 -2
- package/dist/core/{p-eb88b348.entry.js.map → p-7eaa223b.entry.js.map} +1 -1
- package/dist/core/{p-09f54ca3.entry.js → p-8112444e.entry.js} +2 -2
- package/dist/core/{p-09f54ca3.entry.js.map → p-8112444e.entry.js.map} +1 -1
- package/dist/core/{p-af1d6e41.entry.js → p-85a17585.entry.js} +2 -2
- package/dist/core/{p-1aed572a.entry.js → p-864e337f.entry.js} +2 -2
- package/dist/core/{p-1aed572a.entry.js.map → p-864e337f.entry.js.map} +1 -1
- package/dist/core/{p-fb8d27fa.entry.js → p-887b1302.entry.js} +2 -2
- package/dist/core/{p-fb8d27fa.entry.js.map → p-887b1302.entry.js.map} +1 -1
- package/dist/core/p-8d2d9e11.entry.js +2 -0
- package/dist/core/p-8d2d9e11.entry.js.map +1 -0
- package/dist/core/p-920f6480.entry.js +2 -0
- package/dist/core/p-920f6480.entry.js.map +1 -0
- package/dist/core/{p-7c096c5e.entry.js → p-9687e929.entry.js} +2 -2
- package/dist/core/{p-7c096c5e.entry.js.map → p-9687e929.entry.js.map} +1 -1
- package/dist/core/{p-33f4abc9.entry.js → p-976f4280.entry.js} +2 -2
- package/dist/core/{p-33f4abc9.entry.js.map → p-976f4280.entry.js.map} +1 -1
- package/dist/core/p-9989ec00.entry.js +2 -0
- package/dist/core/p-9989ec00.entry.js.map +1 -0
- package/dist/core/{p-93e154e0.entry.js → p-9a78f449.entry.js} +2 -2
- package/dist/core/{p-93e154e0.entry.js.map → p-9a78f449.entry.js.map} +1 -1
- package/dist/core/{p-f9a16fa8.entry.js → p-9aecbfe9.entry.js} +2 -2
- package/dist/core/{p-f9a16fa8.entry.js.map → p-9aecbfe9.entry.js.map} +1 -1
- package/dist/core/{p-45f32fea.entry.js → p-a894ddb6.entry.js} +2 -2
- package/dist/core/p-a894ddb6.entry.js.map +1 -0
- package/dist/core/p-abcaf14d.entry.js +2 -0
- package/dist/core/p-abcaf14d.entry.js.map +1 -0
- package/dist/core/p-aeeff0e5.entry.js +2 -0
- package/dist/core/p-aeeff0e5.entry.js.map +1 -0
- package/dist/core/{p-e38b20bf.entry.js → p-b92727c0.entry.js} +2 -2
- package/dist/core/{p-e38b20bf.entry.js.map → p-b92727c0.entry.js.map} +1 -1
- package/dist/core/{p-d3d48548.entry.js → p-ba5e1b21.entry.js} +2 -2
- package/dist/core/{p-d3d48548.entry.js.map → p-ba5e1b21.entry.js.map} +1 -1
- package/dist/core/{p-b9459ba2.entry.js → p-bf3b853e.entry.js} +2 -2
- package/dist/core/{p-b9459ba2.entry.js.map → p-bf3b853e.entry.js.map} +1 -1
- package/dist/core/{p-9882c572.entry.js → p-c3be8a0f.entry.js} +2 -2
- package/dist/core/p-c3be8a0f.entry.js.map +1 -0
- package/dist/core/{p-72c117b6.entry.js → p-c5ffe2cf.entry.js} +2 -2
- package/dist/core/{p-72c117b6.entry.js.map → p-c5ffe2cf.entry.js.map} +1 -1
- package/dist/core/{p-aa83f828.entry.js → p-c8d207e1.entry.js} +2 -2
- package/dist/core/p-ca7e1219.entry.js +2 -0
- package/dist/core/p-ca7e1219.entry.js.map +1 -0
- package/dist/core/p-d0c38d58.entry.js +2 -0
- package/dist/core/p-d0c38d58.entry.js.map +1 -0
- package/dist/core/{p-df88ff5b.entry.js → p-d4903dcd.entry.js} +2 -2
- package/dist/core/{p-df88ff5b.entry.js.map → p-d4903dcd.entry.js.map} +1 -1
- package/dist/core/{p-9ca147f3.entry.js → p-de1e04ac.entry.js} +2 -2
- package/dist/core/{p-9ca147f3.entry.js.map → p-de1e04ac.entry.js.map} +1 -1
- package/dist/core/{p-8b5022bc.entry.js → p-dee21f6d.entry.js} +2 -2
- package/dist/core/{p-8b5022bc.entry.js.map → p-dee21f6d.entry.js.map} +1 -1
- package/dist/core/{p-ad390076.entry.js → p-e003ad46.entry.js} +2 -2
- package/dist/core/{p-ad390076.entry.js.map → p-e003ad46.entry.js.map} +1 -1
- package/dist/core/{p-1be17f22.entry.js → p-e2629bfe.entry.js} +2 -2
- package/dist/core/{p-1be17f22.entry.js.map → p-e2629bfe.entry.js.map} +1 -1
- package/dist/core/p-e38dd019.entry.js +2 -0
- package/dist/core/p-e38dd019.entry.js.map +1 -0
- package/dist/core/{p-84daed4d.entry.js → p-e546d477.entry.js} +2 -2
- package/dist/core/p-e546d477.entry.js.map +1 -0
- package/dist/core/{p-5c363e21.entry.js → p-f9e78341.entry.js} +2 -2
- package/dist/core/{p-0a0b25c5.entry.js → p-fedfd000.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-0bb68835.js → helpers-ef2db990.js} +13 -21
- package/dist/esm/helpers-ef2db990.js.map +1 -0
- package/dist/esm/ic-accordion.entry.js +9 -7
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +2 -2
- 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 +8 -8
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-card-vertical.entry.js +1 -1
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +2 -2
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox_3.entry.js +20 -37
- package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +2 -2
- package/dist/esm/ic-data-list.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +2 -2
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +311 -319
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +6 -5
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +22 -21
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +7 -7
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +11 -21
- 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-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +115 -163
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +64 -61
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +4 -4
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +6 -6
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +161 -232
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +5 -5
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +4 -4
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +4 -4
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +49 -31
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +2 -2
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +23 -4
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +2 -2
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-skip-link.entry.js +2 -2
- package/dist/esm/ic-skip-link.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +2 -2
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +13 -13
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +2 -2
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +4 -4
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +1 -1
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +2 -2
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +2 -2
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +1 -1
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +3 -3
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +53 -67
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +61 -63
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +65 -63
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +1 -1
- package/dist/esm/ic-tree-view.entry.js +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-data-table/ic-data-table.d.ts +15 -4
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +4 -1
- package/dist/types/components.d.ts +8 -0
- package/dist/types/utils/helpers.d.ts +3 -3
- package/dist/types/utils/types.d.ts +2 -0
- package/hydrate/index.js +1085 -1214
- package/hydrate/index.mjs +1085 -1214
- package/package.json +3 -3
- package/dist/cjs/helpers-6f33d131.js.map +0 -1
- package/dist/core/p-10703715.entry.js +0 -2
- package/dist/core/p-10703715.entry.js.map +0 -1
- package/dist/core/p-266686d0.entry.js.map +0 -1
- package/dist/core/p-3800cda8.entry.js.map +0 -1
- package/dist/core/p-45f32fea.entry.js.map +0 -1
- package/dist/core/p-59bc9fe7.entry.js +0 -2
- package/dist/core/p-59bc9fe7.entry.js.map +0 -1
- package/dist/core/p-6724039c.entry.js +0 -2
- package/dist/core/p-6724039c.entry.js.map +0 -1
- package/dist/core/p-84daed4d.entry.js.map +0 -1
- package/dist/core/p-92a969b3.entry.js +0 -2
- package/dist/core/p-92a969b3.entry.js.map +0 -1
- package/dist/core/p-954959d4.entry.js +0 -2
- package/dist/core/p-954959d4.entry.js.map +0 -1
- package/dist/core/p-95868542.entry.js +0 -2
- package/dist/core/p-95868542.entry.js.map +0 -1
- package/dist/core/p-9882c572.entry.js.map +0 -1
- package/dist/core/p-9918c411.entry.js +0 -2
- package/dist/core/p-9918c411.entry.js.map +0 -1
- package/dist/core/p-ad45f8f8.entry.js +0 -2
- package/dist/core/p-ad45f8f8.entry.js.map +0 -1
- package/dist/core/p-b947e4ff.entry.js +0 -2
- package/dist/core/p-b947e4ff.entry.js.map +0 -1
- package/dist/core/p-c472cb32.entry.js +0 -2
- package/dist/core/p-c472cb32.entry.js.map +0 -1
- package/dist/core/p-cd770df5.entry.js +0 -2
- package/dist/core/p-e9683f52.entry.js.map +0 -1
- package/dist/core/p-ed542433.js +0 -2
- package/dist/core/p-ed542433.js.map +0 -1
- package/dist/core/p-edeb3823.entry.js +0 -2
- package/dist/core/p-edeb3823.entry.js.map +0 -1
- package/dist/core/p-fb8214a9.entry.js +0 -2
- package/dist/core/p-fb8214a9.entry.js.map +0 -1
- package/dist/esm/helpers-0bb68835.js.map +0 -1
- /package/dist/core/{p-0e3a62cc.entry.js.map → p-2667c808.entry.js.map} +0 -0
- /package/dist/core/{p-f6141c29.entry.js.map → p-7c3cd0b8.entry.js.map} +0 -0
- /package/dist/core/{p-af1d6e41.entry.js.map → p-85a17585.entry.js.map} +0 -0
- /package/dist/core/{p-aa83f828.entry.js.map → p-c8d207e1.entry.js.map} +0 -0
- /package/dist/core/{p-5c363e21.entry.js.map → p-f9e78341.entry.js.map} +0 -0
- /package/dist/core/{p-0a0b25c5.entry.js.map → p-fedfd000.entry.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["icBreadcrumbCss","IcBreadcrumbStyle0","Breadcrumb","constructor","hostRef","this","HREF_ATTR","linkSlotContent","slottedLinkEl","slottedLinkHref","current","monochrome","showBackIcon","theme","updatedSlottedLinkFocus","_a","_b","tabIndex","removeAttribute","setAttribute","getSlottedLinkEl","hasAttribute","querySelector","renderBackIcon","h","class","innerHTML","backIcon","watchCurrentHandler","el","ariaCurrent","componentDidLoad","slottedLinkWrapper","shadowRoot","slotEls","getSlotElements","getAttribute","componentWillRender","icLink","CURRENT_PAGE","classList","remove","contains","add","setFocus","focus","render","href","pageTitle","describedById","toLowerCase","replace","Host","key","role","chevronIcon","id","isSlotUsed","name","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg,\n:host(.ic-breadcrumb-monochrome) .chevron svg {\n color: var(--ic-breadcrumb-icon-chevron);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-breadcrumb-icon);\n}\n\n:host(.ic-breadcrumb-monochrome) .back-icon svg {\n color: var(--ic-breadcrumb-icon-monochrome);\n}\n\n:host(.ic-breadcrumb-back) {\n display: flex;\n align-items: center;\n}\n\n:host(.ic-breadcrumb-back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) {\n cursor: text;\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n color: var(--ic-breadcrumb-text);\n}\n\n:host([aria-current=\"page\"].ic-breadcrumb-monochrome) .current-page-container {\n color: var(--ic-breadcrumb-text-monochrome);\n}\n\n:host([aria-current=\"page\"]) slot {\n pointer-events: none;\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-color-hyperlink-default);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n.slotted-link-container {\n gap: var(--ic-space-xs);\n display: flex;\n}\n\n.slotted-link-container .back-icon {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.slotted-link-container .link-wrapper {\n line-height: 1.5rem;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-underline-offset: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\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","import { Host, h, } from \"@stencil/core\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { getSlotElements, isSlotUsed } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\nexport class Breadcrumb {\n constructor() {\n this.HREF_ATTR = \"href\";\n this.linkSlotContent = null;\n this.slottedLinkEl = null;\n this.slottedLinkHref = null;\n /**\n * If `true`, aria-current will be set on the breadcrumb.\n */\n this.current = false;\n /**\n * @internal If `true`, the breadcrumb will display as black in the light theme, and white in the dark theme.\n */\n this.monochrome = false;\n /**\n * @internal If `true`, back icon will be displayed.\n */\n this.showBackIcon = false;\n /**\n * @internal Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n this.theme = \"inherit\";\n // Prevent focus on breadcrumb if current page and contains slotted link\n this.updatedSlottedLinkFocus = () => {\n var _a, _b;\n // Sets tabindex on wrong element in unit test snapshots\n // - related to known Jest issue: https://github.com/ionic-team/stencil/issues/2830\n if (this.linkSlotContent) {\n this.linkSlotContent.tabIndex = this.current ? -1 : 0; // Prevent focus\n }\n if (this.current) {\n (_a = this.slottedLinkEl) === null || _a === void 0 ? void 0 : _a.removeAttribute(this.HREF_ATTR); // Prevent screen reader announcing breadcrumb as a link\n }\n else if (this.slottedLinkHref) {\n (_b = this.slottedLinkEl) === null || _b === void 0 ? void 0 : _b.setAttribute(this.HREF_ATTR, this.slottedLinkHref);\n }\n };\n this.getSlottedLinkEl = () => {\n if (!this.linkSlotContent)\n return null;\n return this.linkSlotContent.hasAttribute(this.HREF_ATTR)\n ? this.linkSlotContent\n : this.linkSlotContent.querySelector(\"[href]\");\n };\n this.renderBackIcon = () => (h(\"div\", { class: \"back-icon\", innerHTML: backIcon }));\n }\n watchCurrentHandler() {\n this.updatedSlottedLinkFocus();\n this.el.ariaCurrent = this.current ? \"page\" : null;\n }\n componentDidLoad() {\n var _a, _b;\n const slottedLinkWrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\".link-wrapper\");\n if (slottedLinkWrapper) {\n const slotEls = getSlotElements(slottedLinkWrapper);\n if (slotEls) {\n this.linkSlotContent = slotEls[0];\n this.slottedLinkEl = this.getSlottedLinkEl();\n this.slottedLinkHref = ((_b = this.slottedLinkEl) === null || _b === void 0 ? void 0 : _b.getAttribute(\"href\")) || null;\n }\n this.updatedSlottedLinkFocus();\n }\n }\n componentWillRender() {\n const icLink = this.el.querySelector(\"ic-link\");\n if (icLink) {\n const CURRENT_PAGE = \"current-page\";\n icLink.classList.remove(CURRENT_PAGE);\n if (this.current && !icLink.classList.contains(CURRENT_PAGE)) {\n icLink.classList.add(\"breadcrumb-link\", CURRENT_PAGE);\n }\n }\n }\n /**\n * Sets focus on the breadcrumb.\n */\n async setFocus() {\n var _a, _b;\n (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\"ic-link\")) === null || _b === void 0 ? void 0 : _b.focus();\n }\n render() {\n const { current, href, monochrome, pageTitle, showBackIcon, theme } = this;\n const describedById = `${pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.toLowerCase().replace(\" \", \"-\")}-describedby`;\n return (h(Host, { key: '0a6d1443010427dbc75347c9c69b7c40680be25f', class: {\n \"ic-breadcrumb-back\": showBackIcon,\n \"ic-breadcrumb-monochrome\": monochrome,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }, \"aria-current\": current && \"page\", role: \"listitem\" }, h(\"div\", { key: 'bd351348bd835963705c29c5aa4e857c3752d645', class: \"breadcrumb\" }, h(\"span\", { key: '9a4e28f31aa1c8cf2e111a0ce64902abba338461', innerHTML: chevronIcon, class: \"chevron\", \"aria-hidden\": \"true\" }), showBackIcon && (h(\"span\", { key: '289414d58963cea6e68b782ba36df782690db04a', id: describedById, class: \"hide\" }, `Back to ${pageTitle}`)), !href ? (h(\"div\", { class: \"slotted-link-container\" }, showBackIcon && this.renderBackIcon(), h(\"span\", { class: \"link-wrapper\" }, h(\"slot\", null)))) : current ? (h(\"span\", { class: \"current-page-container\" }, isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle)) : (h(\"ic-link\", { theme: theme, monochrome: monochrome, href: href, class: \"breadcrumb-link\", \"aria-describedby\": showBackIcon && describedById }, showBackIcon && this.renderBackIcon(), isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle)))));\n }\n static get is() { return \"ic-breadcrumb\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get properties() {\n return {\n \"current\": {\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`, aria-current will be set on the breadcrumb.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"current\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The URL that the breadcrumb link points to.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, the breadcrumb will display as black in the light theme, and white in the dark theme.\"\n }],\n \"text\": \"\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"pageTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title of the breadcrumb.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"page-title\",\n \"reflect\": false\n },\n \"showBackIcon\": {\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 \"name\": \"internal\",\n \"text\": \"If `true`, back icon will be displayed.\"\n }],\n \"text\": \"\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"show-back-icon\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\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 \"text\": \"\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n }\n };\n }\n static get methods() {\n return {\n \"setFocus\": {\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\": \"Sets focus on the breadcrumb.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"current\",\n \"methodName\": \"watchCurrentHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-breadcrumb.js.map\n"],"mappings":"wUAAA,MAAMA,EAAkB,u7EACxB,MAAAC,EAAeD,E,MCMFE,EAAU,MACnB,WAAAC,CAAAC,G,UACIC,KAAKC,UAAY,OACjBD,KAAKE,gBAAkB,KACvBF,KAAKG,cAAgB,KACrBH,KAAKI,gBAAkB,KAIvBJ,KAAKK,QAAU,MAIfL,KAAKM,WAAa,MAIlBN,KAAKO,aAAe,MAIpBP,KAAKQ,MAAQ,UAEbR,KAAKS,wBAA0B,KAC3B,IAAIC,EAAIC,EAGR,GAAIX,KAAKE,gBAAiB,CACtBF,KAAKE,gBAAgBU,SAAWZ,KAAKK,SAAW,EAAI,C,CAExD,GAAIL,KAAKK,QAAS,EACbK,EAAKV,KAAKG,iBAAmB,MAAQO,SAAY,OAAS,EAAIA,EAAGG,gBAAgBb,KAAKC,U,MAEtF,GAAID,KAAKI,gBAAiB,EAC1BO,EAAKX,KAAKG,iBAAmB,MAAQQ,SAAY,OAAS,EAAIA,EAAGG,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ACtE,MAAM4C,EAAgB,GAAGD,IAAc,MAAQA,SAAmB,OAAS,EAAIA,EAAUE,cAAcC,QAAQ,IAAK,mBACpH,OAAQ3B,EAAE4B,EAAM,CAAEC,IAAK,2CAA4C5B,MAAO,CAClE,qBAAsBb,EACtB,2BAA4BD,EAC5B,CAAC,YAAYE,KAAUA,IAAU,WAClC,eAAgBH,GAAW,OAAQ4C,KAAM,YAAc9B,EAAE,MAAO,CAAE6B,IAAK,2CAA4C5B,MAAO,cAAgBD,EAAE,OAAQ,CAAE6B,IAAK,2CAA4C3B,UAAW6B,EAAa9B,MAAO,UAAW,cAAe,SAAWb,GAAiBY,EAAE,OAAQ,CAAE6B,IAAK,2CAA4CG,GAAIP,EAAexB,MAAO,QAAU,WAAWuB,MAAgBD,EAAQvB,EAAE,MAAO,CAAEC,MAAO,0BAA4Bb,GAAgBP,KAAKkB,iBAAkBC,EAAE,OAAQ,CAAEC,MAAO,gBAAkBD,EAAE,OAAQ,QAAWd,EAAWc,EAAE,OAAQ,CAAEC,MAAO,0BAA4BgC,EAAWpD,KAAKwB,GAAI,SAAWL,EAAE,OAAQ,CAAEkC,KAAM,SAAWV,GAAexB,EAAE,UAAW,CAAEX,MAAOA,EAAOF,WAAYA,EAAYoC,KAAMA,EAAMtB,MAAO,kBAAmB,mBAAoBb,GAAgBqC,GAAiBrC,GAAgBP,KAAKkB,iBAAkBkC,EAAWpD,KAAKwB,GAAI,SAAWL,EAAE,OAAQ,CAAEkC,KAAM,SAAWV,I,CAIl7B,yBAAWW,GAAmB,OAAO,IAAK,C","ignoreList":[]}
|
1
|
+
{"version":3,"names":["icBreadcrumbCss","IcBreadcrumbStyle0","Breadcrumb","constructor","hostRef","this","HREF_ATTR","linkSlotContent","slottedLinkEl","slottedLinkHref","current","monochrome","showBackIcon","theme","updatedSlottedLinkFocus","_a","_b","tabIndex","removeAttribute","setAttribute","getSlottedLinkEl","hasAttribute","querySelector","renderBackIcon","h","class","innerHTML","backIcon","watchCurrentHandler","el","ariaCurrent","componentDidLoad","slottedLinkWrapper","shadowRoot","slotEls","getSlotElements","getAttribute","componentWillRender","icLink","CURRENT_PAGE","classList","remove","contains","add","setFocus","focus","render","href","pageTitle","describedById","toLowerCase","replace","Host","key","role","chevronIcon","id","isSlotUsed","name","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg,\n:host(.ic-breadcrumb-monochrome) .chevron svg {\n color: var(--ic-breadcrumb-icon-chevron);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: var(--ic-breadcrumb-icon);\n}\n\n:host(.ic-breadcrumb-monochrome) .back-icon svg {\n color: var(--ic-breadcrumb-icon-monochrome);\n}\n\n:host(.ic-breadcrumb-back) {\n display: flex;\n align-items: center;\n}\n\n:host(.ic-breadcrumb-back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) {\n cursor: text;\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n color: var(--ic-breadcrumb-text);\n}\n\n:host([aria-current=\"page\"].ic-breadcrumb-monochrome) .current-page-container {\n color: var(--ic-breadcrumb-text-monochrome);\n}\n\n:host([aria-current=\"page\"]) slot {\n pointer-events: none;\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-color-hyperlink-default);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n.slotted-link-container {\n gap: var(--ic-space-xs);\n display: flex;\n}\n\n.slotted-link-container .back-icon {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.slotted-link-container .link-wrapper {\n line-height: 1.5rem;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-underline-offset: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\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","import { Host, h, } from \"@stencil/core\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { getSlotElements, isSlotUsed } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\nexport class Breadcrumb {\n constructor() {\n this.HREF_ATTR = \"href\";\n this.linkSlotContent = null;\n this.slottedLinkEl = null;\n this.slottedLinkHref = null;\n /**\n * If `true`, aria-current will be set on the breadcrumb.\n */\n this.current = false;\n /**\n * @internal If `true`, the breadcrumb will display as black in the light theme, and white in the dark theme.\n */\n this.monochrome = false;\n /**\n * @internal If `true`, back icon will be displayed.\n */\n this.showBackIcon = false;\n /**\n * @internal Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n this.theme = \"inherit\";\n // Prevent focus on breadcrumb if current page and contains slotted link\n this.updatedSlottedLinkFocus = () => {\n var _a, _b;\n // Sets tabindex on wrong element in unit test snapshots\n // - related to known Jest issue: https://github.com/ionic-team/stencil/issues/2830\n if (this.linkSlotContent) {\n this.linkSlotContent.tabIndex = this.current ? -1 : 0; // Prevent focus\n }\n if (this.current) {\n (_a = this.slottedLinkEl) === null || _a === void 0 ? void 0 : _a.removeAttribute(this.HREF_ATTR); // Prevent screen reader announcing breadcrumb as a link\n }\n else if (this.slottedLinkHref) {\n (_b = this.slottedLinkEl) === null || _b === void 0 ? void 0 : _b.setAttribute(this.HREF_ATTR, this.slottedLinkHref);\n }\n };\n this.getSlottedLinkEl = () => {\n if (!this.linkSlotContent)\n return null;\n return this.linkSlotContent.hasAttribute(this.HREF_ATTR)\n ? this.linkSlotContent\n : this.linkSlotContent.querySelector(\"[href]\");\n };\n this.renderBackIcon = () => (h(\"div\", { class: \"back-icon\", innerHTML: backIcon }));\n }\n watchCurrentHandler() {\n this.updatedSlottedLinkFocus();\n this.el.ariaCurrent = this.current ? \"page\" : null;\n }\n componentDidLoad() {\n var _a, _b;\n const slottedLinkWrapper = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\".link-wrapper\");\n if (slottedLinkWrapper) {\n const slotEls = getSlotElements(slottedLinkWrapper);\n if (slotEls) {\n this.linkSlotContent = slotEls[0];\n this.slottedLinkEl = this.getSlottedLinkEl();\n this.slottedLinkHref = ((_b = this.slottedLinkEl) === null || _b === void 0 ? void 0 : _b.getAttribute(\"href\")) || null;\n }\n this.updatedSlottedLinkFocus();\n }\n }\n componentWillRender() {\n const icLink = this.el.querySelector(\"ic-link\");\n if (icLink) {\n const CURRENT_PAGE = \"current-page\";\n icLink.classList.remove(CURRENT_PAGE);\n if (this.current && !icLink.classList.contains(CURRENT_PAGE)) {\n icLink.classList.add(\"breadcrumb-link\", CURRENT_PAGE);\n }\n }\n }\n /**\n * Sets focus on the breadcrumb.\n */\n async setFocus() {\n var _a, _b;\n (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\"ic-link\")) === null || _b === void 0 ? void 0 : _b.focus();\n }\n render() {\n const { current, href, monochrome, pageTitle, showBackIcon, theme } = this;\n const describedById = `${pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.toLowerCase().replace(\" \", \"-\")}-describedby`;\n return (h(Host, { key: '55dd358ca0c5d865a9fdd17809b6d7f3ac12a966', class: {\n \"ic-breadcrumb-back\": showBackIcon,\n \"ic-breadcrumb-monochrome\": monochrome,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }, \"aria-current\": current && \"page\", role: \"listitem\" }, h(\"div\", { key: '768e4c78b20b1ad9b0100ff2a36ce512db5d7c1c', class: \"breadcrumb\" }, h(\"span\", { key: '930d48bd5661f977f0ce2edcc4ea3ce02c1e282a', innerHTML: chevronIcon, class: \"chevron\", \"aria-hidden\": \"true\" }), showBackIcon && (h(\"span\", { key: '0b932408b17ef65e2e25b6b4e124e2a4941d8eae', id: describedById, class: \"hide\" }, `Back to ${pageTitle}`)), !href ? (h(\"div\", { class: \"slotted-link-container\" }, showBackIcon && this.renderBackIcon(), h(\"span\", { class: \"link-wrapper\" }, h(\"slot\", null)))) : current ? (h(\"span\", { class: \"current-page-container\" }, isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle)) : (h(\"ic-link\", { theme: theme, monochrome: monochrome, href: href, class: \"breadcrumb-link\", \"aria-describedby\": showBackIcon && describedById }, showBackIcon && this.renderBackIcon(), isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle)))));\n }\n static get is() { return \"ic-breadcrumb\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get properties() {\n return {\n \"current\": {\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`, aria-current will be set on the breadcrumb.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"current\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The URL that the breadcrumb link points to.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, the breadcrumb will display as black in the light theme, and white in the dark theme.\"\n }],\n \"text\": \"\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"pageTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title of the breadcrumb.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"page-title\",\n \"reflect\": false\n },\n \"showBackIcon\": {\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 \"name\": \"internal\",\n \"text\": \"If `true`, back icon will be displayed.\"\n }],\n \"text\": \"\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"show-back-icon\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\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 \"text\": \"\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n }\n };\n }\n static get methods() {\n return {\n \"setFocus\": {\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\": \"Sets focus on the breadcrumb.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"current\",\n \"methodName\": \"watchCurrentHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-breadcrumb.js.map\n"],"mappings":"wUAAA,MAAMA,EAAkB,u7EACxB,MAAAC,EAAeD,E,MCMFE,EAAU,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C,KAAM,SAAWV,GAAexB,EAAE,UAAW,CAAEX,MAAOA,EAAOF,WAAYA,EAAYoC,KAAMA,EAAMtB,MAAO,kBAAmB,mBAAoBb,GAAgBqC,GAAiBrC,GAAgBP,KAAKkB,iBAAkBkC,EAAWpD,KAAKwB,GAAI,SAAWL,EAAE,OAAQ,CAAEkC,KAAM,SAAWV,I,CAIl7B,yBAAWW,GAAmB,OAAO,IAAK,C","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as a,c as e,h as t,g as i}from"./p-8e4e97b4.js";import{i as c}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as a,c as e,h as t,g as i}from"./p-8e4e97b4.js";import{i as c}from"./p-0e0e0942.js";const s='.title-bar-wrapper,.header-container,.description-actions,.action-area,.custom-actions-wrapper{display:flex}.title-bar-wrapper,.action-area,.custom-actions-wrapper{gap:var(--ic-space-xs)}.title-bar-wrapper{flex-direction:column;padding:var(--ic-space-sm) var(--ic-space-xs);border-bottom:var(--ic-space-1px) solid\n var(--ic-data-table-title-bar-keyline);background-color:var(--ic-data-table-title-bar-background)}.full-width{padding:var(--ic-space-sm) 0;border-bottom:none}ic-typography.heading h3{margin:0}ic-typography.ic-typography-subtitle-small{--ic-typography-color:var(--ic-data-table-title-bar-information)}ic-typography.ic-typography-h3,::slotted([slot="header"]){max-width:50rem;color:var(--ic-data-table-title-bar-title);--ic-typography-color:var(--ic-data-table-title-bar-title)}ic-typography.ic-typography-body,::slotted([slot="description"]){color:var(--ic-data-table-title-bar-description);--ic-typography-color:var(--ic-data-table-title-bar-description)}ic-typography.ic-typography-body,ic-typography.ic-typography-subtitle-small,::slotted([slot="description"]){max-width:40rem}.density-input{--input-width:7.625rem}@media (max-width: 1200px){.header-container{flex-direction:column}}@media (min-width: 1201px){.header-container{gap:var(--ic-space-xs);align-items:baseline}}@media (min-width: 769px){.description-actions{justify-content:space-between}}@media (max-width: 768px){.description-actions{flex-direction:column;align-items:flex-start;gap:var(--ic-space-xs)}}@media (min-width: 577px){.action-area{align-items:center}}@media (max-width: 576px){.action-area{flex-direction:column}}';const r=s;const o="Title Bar";const n=class{constructor(t){a(this,t);this.icTableDensityUpdate=e(this,"icTableDensityUpdate",7);this.initialDensitySelectOption="default";this.isEmbedded=false;this.heading=o;this.hideDensitySelect=false;this.changeDensity=a=>{this.icTableDensityUpdate.emit({value:a.detail.value})}}componentWillLoad(){const a=this.el.parentElement;if((a===null||a===void 0?void 0:a.tagName)==="IC-DATA-TABLE"){const{caption:e,density:t,embedded:i}=a;this.initialDensitySelectOption=t;this.isEmbedded=!!i;if(this.heading===o){this.heading=e}}}render(){const{changeDensity:a,description:e,el:i,heading:s,hideDensitySelect:r,initialDensitySelectOption:o,isEmbedded:n,metadata:d}=this;const l=c(i,"primary-action")||c(i,"custom-actions")||!r;const p=c(i,"description")||e;return t("div",{key:"f36585c5730a7a5c69ea13b5ebefb0da062cb8b7",class:{"title-bar-wrapper":true,"full-width":n}},t("div",{key:"f4321857a3f013c2138225f4d3994d8b00d686fd",class:"header-container"},t("slot",{key:"f403f6e936b12a0a1e94f4f5327fb0746e443232",name:"heading"},t("ic-typography",{key:"841a57bbc3e426c036b6d5eb86a0505e9567b870",variant:"h3",class:"heading"},t("h3",{key:"ee15ed41ade023c9e72f73de03f2a438a411ed3c"},s))),d&&t("ic-typography",{key:"e577c48e340c9780f6c28a2db8c68c13507ab2e2",variant:"subtitle-small"},d)),(l||p)&&t("div",{key:"1915ed0a874cf45b0bc37ee66e605040291476c8",class:"description-actions"},t("slot",{key:"7b8b96377409c80fc7832089e17e508fbf7b2d75",name:"description"},e&&t("ic-typography",{key:"3629998ba78578ff1aa1acf388447d5cae4ecb57",variant:"body"},e)),l&&t("div",{key:"ae469ae8726a57eeadb47c378bb8698cf96e8a4d",class:"action-area"},c(i,"custom-actions")&&t("div",{key:"3b2b53888a282a584ded2c1682bf58b3f49b2432",class:"custom-actions-wrapper"},t("slot",{key:"85d7e895d3be219b3403ccf4507ef792b625c374",name:"custom-actions"})),!r&&t("ic-select",{key:"69088722aa8720b874ca9539f8b9329884087515",size:"small",label:"Change density",class:"density-input",hideLabel:true,options:[{label:"Default",value:"default"},{label:"Dense",value:"dense"},{label:"Spacious",value:"spacious"}],value:o,onIcChange:a}),c(i,"primary-action")&&t("slot",{key:"804c56e9ada0368f5fb53320d45d4af47f3e531e",name:"primary-action"}))))}get el(){return i(this)}};n.style=r;export{n as ic_data_table_title_bar};
|
2
|
+
//# sourceMappingURL=p-85a17585.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{c as o}from"./p-e081702e.js";import{i as n,V as r,b as c,J as d,d as l}from"./p-eca2fea1.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.ic-toast-hidden){display:none}:host(:focus){outline:none}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-toast-background);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-toast-status-neutral)}.divider-info{background-color:var(--ic-toast-status-info)}.divider-warning{background-color:var(--ic-toast-status-warning)}.divider-error{background-color:var(--ic-toast-status-error)}.divider-success{background-color:var(--ic-toast-status-success)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant="neutral"]) .toast-icon svg,::slotted(svg){fill:var(--ic-toast-icon-neutral)}:host([variant="info"]) .toast-icon svg{fill:var(--ic-toast-icon-info)}:host([variant="warning"]) .toast-icon svg{fill:var(--ic-toast-icon-warning)}:host([variant="error"]) .toast-icon svg{fill:var(--ic-toast-icon-error)}:host([variant="success"]) .toast-icon svg{fill:var(--ic-toast-icon-success)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-text{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-heading{--ic-typography-color:var(--ic-toast-title)}.toast-message{--ic-typography-color:var(--ic-toast-description)}.toast-action-container{padding-bottom:var(--ic-space-md)}#dismiss-button{padding:var(--ic-space-xs)}#dismiss-button>svg{color:var(--ic-toast-dismiss-button)}ic-loading-indicator{--outer-color:transparent;--inner-color:var(--ic-action-monochrome)}.toast-dismiss-timer{padding:var(--ic-space-sm)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}';const b=h;const m=1e3;const u=70;const p=140;const f=class{constructor(e){t(this,e);this.icDismiss=i(this,"icDismiss",7);this.interactiveElements=[];this.timerProgress=100;this.visible=false;this.autoDismissTimeout=5e3;this.dismissButtonAriaLabel="dismiss";this.dismissMode="manual";this.dismissAction=()=>{this.icDismiss.emit()};this.handleProgressChange=()=>{this.timerProgress-=m/this.autoDismissTimeout*100};this.onFocus=()=>{if(this.focusInteractiveElement){this.isManual=true}};this.onBlur=()=>{this.handleTimer({type:"mouseleave"})}}dismissModeChangeHandler(t){this.isManual=t==="manual"}disconnectedCallback(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval)}componentWillLoad(){var t,i;this.handleLongText(this.heading.length>u,!!this.message&&((t=this.message)===null||t===void 0?void 0:t.length)>p);if(this.autoDismissTimeout<5e3)this.autoDismissTimeout=5e3;if(n(this.el,"action"))this.dismissMode="manual";this.isManual=this.dismissMode==="manual";if(n(this.el,"neutral-icon"))this.variant="neutral";if(this.variant==="neutral"){this.neutralVariantLabel=(i=this.neutralIconAriaLabel)!==null&&i!==void 0?i:r[this.variant].ariaLabel}if(this.isManual){const t=l(this.message)?`. ${this.message}`:"";this.el.setAttribute("aria-label",this.variant?this.neutralVariantLabel||r[this.variant].ariaLabel:this.heading);(this.variant||this.message)&&this.el.setAttribute("aria-description",this.variant?`${this.heading}${t}`:this.message||"")}}componentDidLoad(){c([{prop:this.heading,propName:"heading"}],"Toast")}componentDidUpdate(){var t;if(this.focusInteractiveElement&&this.isManual){this.resetAutoDismissTimer();const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e);this.focusInteractiveElement=false;this.findNextInteractiveElement(this.shiftKeyPressed).setFocus();this.shiftKeyPressed=false}}watchVisibleHandler(){var t;if(this.visible){const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e)}else{this.interactiveElements=[]}}handleDismiss(){this.visible=false;this.resetAutoDismissTimer()}handleKeyboard(t){if(this.visible){if(this.isManual){switch(t.key){case"Tab":t.preventDefault();this.findNextInteractiveElement(t.shiftKey).setFocus();break;case"Escape":!t.repeat&&this.dismissAction();t.stopImmediatePropagation();break}}else{if(t.key==="Tab"){this.shiftKeyPressed=t.shiftKey;this.focusInteractiveElement=true}}}}handleTimer(t){switch(t.type){case"mouseenter":if(!this.isManual){this.resetAutoDismissTimer()}this.isManual=true;break;case"mouseleave":if(this.dismissMode==="automatic"){this.isManual=false;this.interactiveElements=[];if(this.visible){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m)}}break}}async setVisible(){if(!this.visible)this.visible=true;if(!this.isManual){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m);return null}else{window.setTimeout((()=>this.interactiveElements[0].setFocus()),200);return document.activeElement}}handleLongText(t,i){if(i||t){console.error(`Too many characters in toast ${t?"heading":""}${t&&i?" and ":""}${i?"message":""}. Refer to character limits specified in the prop description`)}}findNextInteractiveElement(t){const i=this.interactiveElements[0];const e=this.interactiveElements[this.interactiveElements.length-1];if(this.isActive(t?i:e))return t?e:i;let s=0;return this.interactiveElements.some(((t,i)=>{if(!this.isActive(t))return false;s=i;return true}))?this.interactiveElements[s+(t?-1:1)]:i}resetAutoDismissTimer(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval);this.timerProgress=100}isActive(t){return t===this.el?!!this.el.shadowRoot.activeElement:document.activeElement===t}render(){const{variant:t,heading:i,message:a,visible:c,isManual:d,dismissButtonAriaLabel:l}=this;return e(s,{key:"0215a0779e769d0b9667f0b9b3899e6f9ab40c54",class:{["ic-toast-hidden"]:!c},tabindex:"0",onFocus:this.onFocus,onBlur:this.onBlur,role:d?"dialog":"alert","aria-live":d?null:"polite"},e("div",{key:"b34a48203f613cbcde37d0c7a75743a1c61ded70",class:"container"},t&&c&&e("div",{key:"f3dea0b812b6ab3ab2528f091139716b2781b8f6",class:"toast-icon-container"},e("div",{key:"215a58acb589a65efabf3837428e131c77bc1500",class:{["divider"]:true,[`divider-${t}`]:true}}),t==="neutral"?e("slot",{name:"neutral-icon"}):e("span",{class:"toast-icon",innerHTML:r[t].icon})),e("div",{key:"d19e6c1989aa5370383d6aafb319570fad9dbeba",class:{["toast-content"]:true,["no-icon"]:t==="neutral"&&!n(this.el,"neutral-icon")}},e("div",{key:"3c4b2bcf5563380c57685ddf27e9b9a68c11696c",class:"toast-text"},e("ic-typography",{key:"f04cd756f74a338d5e9fbb3db00d91219a018266",variant:"subtitle-large",class:"toast-heading"},c&&(d?e("h5",null,i):e("p",null,i))),a&&e("ic-typography",{key:"b414af6a0f49714c133d1420a11ce0cdabc5c886",variant:"body",class:"toast-message"},c&&e("p",{key:"2d98f3b3ead56cf54a67ebf3afdaa0f46775f293"},a))),n(this.el,"action")&&e("div",{key:"3eeaf3fe192ef351748ccabe3b51b3e588394c07",class:"toast-action-container"},e("slot",{key:"e618b7d9f135c816d7e2a1ce79e20027edb126cb",name:"action"}))),!d?e("ic-loading-indicator",{class:"toast-dismiss-timer",theme:"dark",monochrome:true,size:"icon",progress:this.timerProgress,description:"Dismiss timer"}):e("ic-button",{id:"dismiss-button",innerHTML:o,onClick:this.dismissAction,variant:"icon","aria-label":l})))}get el(){return a(this)}static get watchers(){return{dismissMode:["dismissModeChangeHandler"],visible:["watchVisibleHandler"]}}};f.style=b;export{f as ic_toast};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-8e4e97b4.js";import{c as o}from"./p-e081702e.js";import{i as n,V as r,b as c,J as d,d as l}from"./p-eca2fea1.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.ic-toast-hidden){display:none}:host(:focus){outline:none}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-toast-background);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-toast-status-neutral)}.divider-info{background-color:var(--ic-toast-status-info)}.divider-warning{background-color:var(--ic-toast-status-warning)}.divider-error{background-color:var(--ic-toast-status-error)}.divider-success{background-color:var(--ic-toast-status-success)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant="neutral"]) .toast-icon svg,::slotted(svg){fill:var(--ic-toast-icon-neutral)}:host([variant="info"]) .toast-icon svg{fill:var(--ic-toast-icon-info)}:host([variant="warning"]) .toast-icon svg{fill:var(--ic-toast-icon-warning)}:host([variant="error"]) .toast-icon svg{fill:var(--ic-toast-icon-error)}:host([variant="success"]) .toast-icon svg{fill:var(--ic-toast-icon-success)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-text{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-heading{--ic-typography-color:var(--ic-toast-title)}.toast-message{--ic-typography-color:var(--ic-toast-description)}.toast-action-container{padding-bottom:var(--ic-space-md)}#dismiss-button{padding:var(--ic-space-xs)}#dismiss-button>svg{color:var(--ic-toast-dismiss-button)}ic-loading-indicator{--outer-color:transparent;--inner-color:var(--ic-action-monochrome)}.toast-dismiss-timer{padding:var(--ic-space-sm)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}';const b=h;const m=1e3;const u=70;const p=140;const f=class{constructor(e){t(this,e);this.icDismiss=i(this,"icDismiss",7);this.interactiveElements=[];this.timerProgress=100;this.visible=false;this.autoDismissTimeout=5e3;this.dismissButtonAriaLabel="dismiss";this.dismissMode="manual";this.dismissAction=()=>{this.icDismiss.emit()};this.handleProgressChange=()=>{this.timerProgress-=m/this.autoDismissTimeout*100};this.onFocus=()=>{if(this.focusInteractiveElement){this.isManual=true}};this.onBlur=()=>{this.handleTimer({type:"mouseleave"})}}dismissModeChangeHandler(t){this.isManual=t==="manual"}disconnectedCallback(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval)}componentWillLoad(){var t,i;this.handleLongText(this.heading.length>u,!!this.message&&((t=this.message)===null||t===void 0?void 0:t.length)>p);if(this.autoDismissTimeout<5e3)this.autoDismissTimeout=5e3;if(n(this.el,"action"))this.dismissMode="manual";this.isManual=this.dismissMode==="manual";if(n(this.el,"neutral-icon"))this.variant="neutral";if(this.variant==="neutral"){this.neutralVariantLabel=(i=this.neutralIconAriaLabel)!==null&&i!==void 0?i:r[this.variant].ariaLabel}if(this.isManual){const t=l(this.message)?`. ${this.message}`:"";this.el.setAttribute("aria-label",this.variant?this.neutralVariantLabel||r[this.variant].ariaLabel:this.heading);(this.variant||this.message)&&this.el.setAttribute("aria-description",this.variant?`${this.heading}${t}`:this.message||"")}}componentDidLoad(){c([{prop:this.heading,propName:"heading"}],"Toast")}componentDidUpdate(){var t;if(this.focusInteractiveElement&&this.isManual){this.resetAutoDismissTimer();const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e);this.focusInteractiveElement=false;this.findNextInteractiveElement(this.shiftKeyPressed).setFocus();this.shiftKeyPressed=false}}watchVisibleHandler(){var t;if(this.visible){const i=d(this.el,"action");const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("ic-button");if(i)this.interactiveElements.push(i);if(e)this.interactiveElements.push(e)}else{this.interactiveElements=[]}}handleDismiss(){this.visible=false;this.resetAutoDismissTimer()}handleKeyboard(t){if(this.visible){if(this.isManual){switch(t.key){case"Tab":t.preventDefault();this.findNextInteractiveElement(t.shiftKey).setFocus();break;case"Escape":!t.repeat&&this.dismissAction();t.stopImmediatePropagation();break}}else{if(t.key==="Tab"){this.shiftKeyPressed=t.shiftKey;this.focusInteractiveElement=true}}}}handleTimer(t){switch(t.type){case"mouseenter":if(!this.isManual){this.resetAutoDismissTimer()}this.isManual=true;break;case"mouseleave":if(this.dismissMode==="automatic"){this.isManual=false;this.interactiveElements=[];if(this.visible){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m)}}break}}async setVisible(){if(!this.visible)this.visible=true;if(!this.isManual){this.dismissTimeout=window.setTimeout(this.dismissAction,this.autoDismissTimeout);this.timerRefreshInterval=window.setInterval(this.handleProgressChange,m);return null}else{window.setTimeout((()=>this.interactiveElements[0].setFocus()),200);return document.activeElement}}handleLongText(t,i){if(i||t){console.error(`Too many characters in toast ${t?"heading":""}${t&&i?" and ":""}${i?"message":""}. Refer to character limits specified in the prop description`)}}findNextInteractiveElement(t){const i=this.interactiveElements[0];const e=this.interactiveElements[this.interactiveElements.length-1];if(this.isActive(t?i:e))return t?e:i;let s=0;return this.interactiveElements.some(((t,i)=>{if(!this.isActive(t))return false;s=i;return true}))?this.interactiveElements[s+(t?-1:1)]:i}resetAutoDismissTimer(){window.clearTimeout(this.dismissTimeout);window.clearInterval(this.timerRefreshInterval);this.timerProgress=100}isActive(t){return t===this.el?!!this.el.shadowRoot.activeElement:document.activeElement===t}render(){const{variant:t,heading:i,message:a,visible:c,isManual:d,dismissButtonAriaLabel:l}=this;return e(s,{key:"07c2077a8b872900f4adc9943829b3fdc58d0910",class:{["ic-toast-hidden"]:!c},tabindex:"0",onFocus:this.onFocus,onBlur:this.onBlur,role:d?"dialog":"alert","aria-live":d?null:"polite"},e("div",{key:"d58b7d50131a67dadcaf03c85d1724bd57a522e3",class:"container"},t&&c&&e("div",{key:"15c75b6bdc7a3d3fb0c31a3e9cdfd05d5f47d969",class:"toast-icon-container"},e("div",{key:"e850996cd9d5f6d9a921dd56878bbec7d6d7c417",class:{["divider"]:true,[`divider-${t}`]:true}}),t==="neutral"?e("slot",{name:"neutral-icon"}):e("span",{class:"toast-icon",innerHTML:r[t].icon})),e("div",{key:"3ba943e248e9492209bd89144c2baebc82a2c1f9",class:{["toast-content"]:true,["no-icon"]:t==="neutral"&&!n(this.el,"neutral-icon")}},e("div",{key:"e66852571c15ca60983bae3ee886fcf08b762276",class:"toast-text"},e("ic-typography",{key:"3ca4cdb553d651db0642a2ed788789cf843bcb68",variant:"subtitle-large",class:"toast-heading"},c&&(d?e("h5",null,i):e("p",null,i))),a&&e("ic-typography",{key:"a5044b7a0916d2a1fb0f79bd747ffaf7b54b64f2",variant:"body",class:"toast-message"},c&&e("p",{key:"48e15b146bfbb18208f70998cf6df1c8c5758deb"},a))),n(this.el,"action")&&e("div",{key:"010fac8238b54e19783d164bb5fac2a4ead5cb54",class:"toast-action-container"},e("slot",{key:"770796e85017801b9f48b1762392bac5c4ee11e5",name:"action"}))),!d?e("ic-loading-indicator",{class:"toast-dismiss-timer",theme:"dark",monochrome:true,size:"icon",progress:this.timerProgress,description:"Dismiss timer"}):e("ic-button",{id:"dismiss-button",innerHTML:o,onClick:this.dismissAction,variant:"icon","aria-label":l})))}get el(){return a(this)}static get watchers(){return{dismissMode:["dismissModeChangeHandler"],visible:["watchVisibleHandler"]}}};f.style=b;export{f as ic_toast};
|
2
|
+
//# sourceMappingURL=p-864e337f.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["icToastCss","IcToastStyle0","AUTO_DISMISS_TIMER_REFRESH_RATE_MS","TOAST_HEADING_CHAR_LIMIT","TOAST_MESSAGE_CHAR_LIMIT","Toast","constructor","hostRef","this","interactiveElements","timerProgress","visible","autoDismissTimeout","dismissButtonAriaLabel","dismissMode","dismissAction","icDismiss","emit","handleProgressChange","onFocus","focusInteractiveElement","isManual","onBlur","handleTimer","type","dismissModeChangeHandler","newValue","disconnectedCallback","window","clearTimeout","dismissTimeout","clearInterval","timerRefreshInterval","componentWillLoad","_a","_b","handleLongText","heading","length","message","isSlotUsed","el","variant","neutralVariantLabel","neutralIconAriaLabel","VARIANT_ICONS","ariaLabel","toastMessage","isPropDefined","setAttribute","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentDidUpdate","resetAutoDismissTimer","actionContent","getSlot","dismissButton","shadowRoot","querySelector","push","findNextInteractiveElement","shiftKeyPressed","setFocus","watchVisibleHandler","handleDismiss","handleKeyboard","ev","key","preventDefault","shiftKey","repeat","stopImmediatePropagation","setTimeout","setInterval","setVisible","document","activeElement","headingTooLong","messageTooLong","console","error","isBackwards","firstEl","lastEl","isActive","currentIndex","some","index","targetEl","render","h","Host","class","tabindex","role","name","innerHTML","icon","theme","monochrome","size","progress","description","id","closeIcon","onClick"],"sources":["../web-components/dist/collection/components/ic-toast/ic-toast.css?tag=ic-toast&encapsulation=shadow","../web-components/dist/collection/components/ic-toast/ic-toast.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-toast: z-index of toast\n */\n\n@media (prefers-reduced-motion: no-preference) {\n :host {\n animation: fadein var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host(.hidden) {\n animation: fadeout var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n --bottom-position: var(--ic-space-xl);\n\n position: fixed;\n bottom: var(--bottom-position);\n left: 50%;\n transform: translate(-50%);\n z-index: var(--ic-z-index-toast);\n}\n\n:host(.ic-toast-hidden) {\n display: none;\n}\n\n:host(:focus) {\n outline: none;\n}\n\n.container {\n max-width: 32.5rem;\n min-width: 18rem;\n box-shadow: var(--ic-elevation-overlay);\n min-height: 3.5rem;\n background-color: var(--ic-toast-background);\n display: flex;\n align-items: center;\n position: relative;\n border-radius: var(--ic-border-radius);\n}\n\n.toast-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n position: absolute;\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n}\n\n.divider-neutral {\n background-color: var(--ic-toast-status-neutral);\n}\n\n.divider-info {\n background-color: var(--ic-toast-status-info);\n}\n\n.divider-warning {\n background-color: var(--ic-toast-status-warning);\n}\n\n.divider-error {\n background-color: var(--ic-toast-status-error);\n}\n\n.divider-success {\n background-color: var(--ic-toast-status-success);\n}\n\n.toast-icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n:host([variant=\"neutral\"]) .toast-icon svg,\n::slotted(svg) {\n fill: var(--ic-toast-icon-neutral);\n}\n\n:host([variant=\"info\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-info);\n}\n\n:host([variant=\"warning\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-warning);\n}\n\n:host([variant=\"error\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-error);\n}\n\n:host([variant=\"success\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-success);\n}\n\n.toast-content {\n margin-left: var(--ic-space-xs);\n width: 100%;\n}\n\n.no-icon {\n margin-left: var(--ic-space-md);\n}\n\n.toast-text {\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n.toast-heading {\n --ic-typography-color: var(--ic-toast-title);\n}\n\n.toast-message {\n --ic-typography-color: var(--ic-toast-description);\n}\n\n.toast-action-container {\n padding-bottom: var(--ic-space-md);\n}\n\n#dismiss-button {\n padding: var(--ic-space-xs);\n}\n\n#dismiss-button > svg {\n color: var(--ic-toast-dismiss-button);\n}\n\nic-loading-indicator {\n --outer-color: transparent;\n --inner-color: var(--ic-action-monochrome);\n}\n\n.toast-dismiss-timer {\n padding: var(--ic-space-sm);\n}\n\n@media (max-width: 576px) {\n :host {\n --bottom-position: var(--ic-space-lg);\n\n width: calc(100% - 2 * var(--ic-space-md));\n }\n}\n\n@media (min-width: 993px) {\n :host {\n --bottom-position: calc(var(--ic-space-xl) + var(--ic-space-xs));\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-border-hc);\n }\n}\n\n@keyframes fadein {\n from {\n bottom: 0;\n opacity: 0;\n }\n\n to {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n}\n\n@keyframes fadeout {\n from {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n\n to {\n bottom: 0;\n opacity: 0;\n }\n}\n","import { h, Host, } from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\nimport { getSlot, isPropDefined, isSlotUsed, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nconst AUTO_DISMISS_TIMER_REFRESH_RATE_MS = 1000;\nconst TOAST_HEADING_CHAR_LIMIT = 70;\nconst TOAST_MESSAGE_CHAR_LIMIT = 140;\n/**\n * @slot action - IcButton or IcLink is placed below header and message. If used will default toast to manual `dismiss` type.\n * @slot neutral-icon - A custom neutral icon is placed on the left side of the component. If used will default toast to `neutral` variant.\n */\nexport class Toast {\n constructor() {\n this.interactiveElements = [];\n this.timerProgress = 100;\n this.visible = false;\n /**\n * If toast dismissMode is set to `automatic`, use this prop to define the time before the toast dismisses (in MILLISECONDS)\n * (NOTE: Has a minimum value of `5000ms`)\n */\n this.autoDismissTimeout = 5000;\n /**\n * If toast can be manually dismissed, this prop sets a custom aria-label for the ic-button component\n */\n this.dismissButtonAriaLabel = \"dismiss\";\n /**\n * How the toast will be dismissed. If manual will display a dismiss button.\n */\n this.dismissMode = \"manual\";\n this.dismissAction = () => {\n this.icDismiss.emit();\n };\n this.handleProgressChange = () => {\n this.timerProgress -=\n (AUTO_DISMISS_TIMER_REFRESH_RATE_MS / this.autoDismissTimeout) * 100;\n };\n this.onFocus = () => {\n if (this.focusInteractiveElement) {\n this.isManual = true;\n }\n };\n this.onBlur = () => {\n this.handleTimer({ type: \"mouseleave\" });\n };\n }\n dismissModeChangeHandler(newValue) {\n this.isManual = newValue === \"manual\";\n }\n disconnectedCallback() {\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n }\n componentWillLoad() {\n var _a, _b;\n this.handleLongText(this.heading.length > TOAST_HEADING_CHAR_LIMIT, !!this.message && ((_a = this.message) === null || _a === void 0 ? void 0 : _a.length) > TOAST_MESSAGE_CHAR_LIMIT);\n if (this.autoDismissTimeout < 5000)\n this.autoDismissTimeout = 5000;\n if (isSlotUsed(this.el, \"action\"))\n this.dismissMode = \"manual\";\n this.isManual = this.dismissMode === \"manual\";\n if (isSlotUsed(this.el, \"neutral-icon\"))\n this.variant = \"neutral\";\n if (this.variant === \"neutral\") {\n this.neutralVariantLabel =\n (_b = this.neutralIconAriaLabel) !== null && _b !== void 0 ? _b : VARIANT_ICONS[this.variant].ariaLabel;\n }\n if (this.isManual) {\n const toastMessage = isPropDefined(this.message)\n ? `. ${this.message}`\n : \"\";\n this.el.setAttribute(\"aria-label\", this.variant\n ? this.neutralVariantLabel || VARIANT_ICONS[this.variant].ariaLabel\n : this.heading);\n (this.variant || this.message) &&\n this.el.setAttribute(\"aria-description\", this.variant ? `${this.heading}${toastMessage}` : this.message || \"\");\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.heading, propName: \"heading\" }], \"Toast\");\n }\n componentDidUpdate() {\n var _a;\n if (this.focusInteractiveElement && this.isManual) {\n this.resetAutoDismissTimer();\n const actionContent = getSlot(this.el, \"action\");\n const dismissButton = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\"ic-button\");\n if (actionContent)\n this.interactiveElements.push(actionContent);\n if (dismissButton)\n this.interactiveElements.push(dismissButton);\n this.focusInteractiveElement = false;\n this.findNextInteractiveElement(this.shiftKeyPressed).setFocus();\n this.shiftKeyPressed = false;\n }\n }\n watchVisibleHandler() {\n var _a;\n if (this.visible) {\n const actionContent = getSlot(this.el, \"action\");\n const dismissButton = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\"ic-button\");\n if (actionContent)\n this.interactiveElements.push(actionContent);\n if (dismissButton)\n this.interactiveElements.push(dismissButton);\n }\n else {\n this.interactiveElements = [];\n }\n }\n handleDismiss() {\n this.visible = false;\n this.resetAutoDismissTimer();\n }\n handleKeyboard(ev) {\n if (this.visible) {\n if (this.isManual) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.findNextInteractiveElement(ev.shiftKey).setFocus();\n break;\n case \"Escape\":\n !ev.repeat && this.dismissAction();\n ev.stopImmediatePropagation();\n break;\n }\n }\n else {\n if (ev.key === \"Tab\") {\n this.shiftKeyPressed = ev.shiftKey;\n this.focusInteractiveElement = true;\n }\n }\n }\n }\n handleTimer(ev) {\n switch (ev.type) {\n case \"mouseenter\":\n if (!this.isManual) {\n this.resetAutoDismissTimer();\n }\n this.isManual = true;\n break;\n case \"mouseleave\":\n if (this.dismissMode === \"automatic\") {\n this.isManual = false;\n this.interactiveElements = [];\n if (this.visible) {\n this.dismissTimeout = window.setTimeout(this.dismissAction, this.autoDismissTimeout);\n this.timerRefreshInterval = window.setInterval(this.handleProgressChange, AUTO_DISMISS_TIMER_REFRESH_RATE_MS);\n }\n }\n break;\n }\n }\n /**\n * @internal Used to display the individual toast.\n * @returns The element that previously had focus before the toast appeared\n */\n async setVisible() {\n if (!this.visible)\n this.visible = true;\n if (!this.isManual) {\n this.dismissTimeout = window.setTimeout(this.dismissAction, this.autoDismissTimeout);\n this.timerRefreshInterval = window.setInterval(this.handleProgressChange, AUTO_DISMISS_TIMER_REFRESH_RATE_MS);\n return null;\n }\n else {\n window.setTimeout(() => this.interactiveElements[0].setFocus(), 200);\n return document.activeElement;\n }\n }\n handleLongText(headingTooLong, messageTooLong) {\n if (messageTooLong || headingTooLong) {\n console.error(`Too many characters in toast ${headingTooLong ? \"heading\" : \"\"}${headingTooLong && messageTooLong ? \" and \" : \"\"}${messageTooLong ? \"message\" : \"\"}. Refer to character limits specified in the prop description`);\n }\n }\n findNextInteractiveElement(isBackwards) {\n const firstEl = this.interactiveElements[0];\n const lastEl = this.interactiveElements[this.interactiveElements.length - 1];\n if (this.isActive(isBackwards ? firstEl : lastEl))\n return isBackwards ? lastEl : firstEl;\n let currentIndex = 0;\n return this.interactiveElements.some((el, index) => {\n if (!this.isActive(el))\n return false;\n currentIndex = index;\n return true;\n })\n ? this.interactiveElements[currentIndex + (isBackwards ? -1 : 1)]\n : firstEl;\n }\n resetAutoDismissTimer() {\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n }\n isActive(targetEl) {\n return targetEl === this.el\n ? !!this.el.shadowRoot.activeElement\n : document.activeElement === targetEl;\n }\n render() {\n const { variant, heading, message, visible, isManual, dismissButtonAriaLabel, } = this;\n return (h(Host, { key: '0215a0779e769d0b9667f0b9b3899e6f9ab40c54', class: { [\"ic-toast-hidden\"]: !visible }, tabindex: \"0\", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? \"dialog\" : \"alert\", \"aria-live\": isManual ? null : \"polite\" }, h(\"div\", { key: 'b34a48203f613cbcde37d0c7a75743a1c61ded70', class: \"container\" }, variant && visible && (h(\"div\", { key: 'f3dea0b812b6ab3ab2528f091139716b2781b8f6', class: \"toast-icon-container\" }, h(\"div\", { key: '215a58acb589a65efabf3837428e131c77bc1500', class: {\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n } }), variant === \"neutral\" ? (h(\"slot\", { name: \"neutral-icon\" })) : (h(\"span\", { class: \"toast-icon\", innerHTML: VARIANT_ICONS[variant].icon })))), h(\"div\", { key: 'd19e6c1989aa5370383d6aafb319570fad9dbeba', class: {\n [\"toast-content\"]: true,\n [\"no-icon\"]: variant === \"neutral\" && !isSlotUsed(this.el, \"neutral-icon\"),\n } }, h(\"div\", { key: '3c4b2bcf5563380c57685ddf27e9b9a68c11696c', class: \"toast-text\" }, h(\"ic-typography\", { key: 'f04cd756f74a338d5e9fbb3db00d91219a018266', variant: \"subtitle-large\", class: \"toast-heading\" }, visible && (isManual ? h(\"h5\", null, heading) : h(\"p\", null, heading))), message && (h(\"ic-typography\", { key: 'b414af6a0f49714c133d1420a11ce0cdabc5c886', variant: \"body\", class: \"toast-message\" }, visible && h(\"p\", { key: '2d98f3b3ead56cf54a67ebf3afdaa0f46775f293' }, message)))), isSlotUsed(this.el, \"action\") && (h(\"div\", { key: '3eeaf3fe192ef351748ccabe3b51b3e588394c07', class: \"toast-action-container\" }, h(\"slot\", { key: 'e618b7d9f135c816d7e2a1ce79e20027edb126cb', name: \"action\" })))), !isManual ? (h(\"ic-loading-indicator\", { class: \"toast-dismiss-timer\", theme: \"dark\", monochrome: true, size: \"icon\", progress: this.timerProgress, description: \"Dismiss timer\" })) : (h(\"ic-button\", { id: \"dismiss-button\", innerHTML: closeIcon, onClick: this.dismissAction, variant: \"icon\", \"aria-label\": dismissButtonAriaLabel })))));\n }\n static get is() { return \"ic-toast\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toast.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toast.css\"]\n };\n }\n static get properties() {\n return {\n \"autoDismissTimeout\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number | undefined\",\n \"resolved\": \"number | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If toast dismissMode is set to `automatic`, use this prop to define the time before the toast dismisses (in MILLISECONDS)\\n(NOTE: Has a minimum value of `5000ms`)\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"auto-dismiss-timeout\",\n \"reflect\": false,\n \"defaultValue\": \"5000\"\n },\n \"dismissButtonAriaLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | undefined\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If toast can be manually dismissed, this prop sets a custom aria-label for the ic-button component\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"dismiss-button-aria-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dismiss\\\"\"\n },\n \"dismissMode\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcActivationTypes\",\n \"resolved\": \"\\\"automatic\\\" | \\\"manual\\\" | undefined\",\n \"references\": {\n \"IcActivationTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcActivationTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"How the toast will be dismissed. If manual will display a dismiss button.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"dismiss-mode\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"manual\\\"\"\n },\n \"heading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title to display at the start of the toast. (NOTE: Should be no more than `70` characters)\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"heading\",\n \"reflect\": false\n },\n \"message\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The main body message of the toast. (NOTE: Should be no more than `140` characters)\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"message\",\n \"reflect\": false\n },\n \"neutralIconAriaLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Provides a custom alt-text to be announced to screen readers, if slotting a custom neutral icon\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"neutral-icon-aria-label\",\n \"reflect\": false\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcStatusVariants\",\n \"resolved\": \"\\\"error\\\" | \\\"info\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\" | undefined\",\n \"references\": {\n \"IcStatusVariants\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcStatusVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toast being rendered\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"variant\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"isManual\": {},\n \"timerProgress\": {},\n \"visible\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDismiss\",\n \"name\": \"icDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Is emitted when the user dismisses the toast\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setVisible\": {\n \"complexType\": {\n \"signature\": \"() => Promise<HTMLElement | null>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n },\n \"return\": \"Promise<HTMLElement | null>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Used to display the individual toast.\"\n }, {\n \"name\": \"returns\",\n \"text\": \"The element that previously had focus before the toast appeared\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"dismissMode\",\n \"methodName\": \"dismissModeChangeHandler\"\n }, {\n \"propName\": \"visible\",\n \"methodName\": \"watchVisibleHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icDismiss\",\n \"method\": \"handleDismiss\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyboard\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"mouseenter\",\n \"method\": \"handleTimer\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": true\n }, {\n \"name\": \"mouseleave\",\n \"method\": \"handleTimer\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": true\n }];\n }\n}\n//# sourceMappingURL=ic-toast.js.map\n"],"mappings":"oKAAA,MAAMA,EAAa,k/JACnB,M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D,IAAY,YAAcF,EAAWhC,KAAKiC,GAAI,kBAC1DmD,EAAE,MAAO,CAAEvB,IAAK,2CAA4CyB,MAAO,cAAgBF,EAAE,gBAAiB,CAAEvB,IAAK,2CAA4C3B,QAAS,iBAAkBoD,MAAO,iBAAmBnF,IAAYU,EAAWuE,EAAE,KAAM,KAAMvD,GAAWuD,EAAE,IAAK,KAAMvD,KAAYE,GAAYqD,EAAE,gBAAiB,CAAEvB,IAAK,2CAA4C3B,QAAS,OAAQoD,MAAO,iBAAmBnF,GAAWiF,EAAE,IAAK,CAAEvB,IAAK,4CAA8C9B,KAAaC,EAAWhC,KAAKiC,GAAI,WAAcmD,EAAE,MAAO,CAAEvB,IAAK,2CAA4CyB,MAAO,0BAA4BF,EAAE,OAAQ,CAAEvB,IAAK,2CAA4C4B,KAAM,cAAiB5E,EAAYuE,EAAE,uBAAwB,CAAEE,MAAO,sBAAuBM,MAAO,OAAQC,WAAY,KAAMC,KAAM,OAAQC,SAAU/F,KAAKE,cAAe8F,YAAa,kBAAuBZ,EAAE,YAAa,CAAEa,GAAI,iBAAkBP,UAAWQ,EAAWC,QAASnG,KAAKO,cAAe2B,QAAS,OAAQ,aAAc7B,K","ignoreList":[]}
|
1
|
+
{"version":3,"names":["icToastCss","IcToastStyle0","AUTO_DISMISS_TIMER_REFRESH_RATE_MS","TOAST_HEADING_CHAR_LIMIT","TOAST_MESSAGE_CHAR_LIMIT","Toast","constructor","hostRef","this","interactiveElements","timerProgress","visible","autoDismissTimeout","dismissButtonAriaLabel","dismissMode","dismissAction","icDismiss","emit","handleProgressChange","onFocus","focusInteractiveElement","isManual","onBlur","handleTimer","type","dismissModeChangeHandler","newValue","disconnectedCallback","window","clearTimeout","dismissTimeout","clearInterval","timerRefreshInterval","componentWillLoad","_a","_b","handleLongText","heading","length","message","isSlotUsed","el","variant","neutralVariantLabel","neutralIconAriaLabel","VARIANT_ICONS","ariaLabel","toastMessage","isPropDefined","setAttribute","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentDidUpdate","resetAutoDismissTimer","actionContent","getSlot","dismissButton","shadowRoot","querySelector","push","findNextInteractiveElement","shiftKeyPressed","setFocus","watchVisibleHandler","handleDismiss","handleKeyboard","ev","key","preventDefault","shiftKey","repeat","stopImmediatePropagation","setTimeout","setInterval","setVisible","document","activeElement","headingTooLong","messageTooLong","console","error","isBackwards","firstEl","lastEl","isActive","currentIndex","some","index","targetEl","render","h","Host","class","tabindex","role","name","innerHTML","icon","theme","monochrome","size","progress","description","id","closeIcon","onClick"],"sources":["../web-components/dist/collection/components/ic-toast/ic-toast.css?tag=ic-toast&encapsulation=shadow","../web-components/dist/collection/components/ic-toast/ic-toast.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-toast: z-index of toast\n */\n\n@media (prefers-reduced-motion: no-preference) {\n :host {\n animation: fadein var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host(.hidden) {\n animation: fadeout var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n --bottom-position: var(--ic-space-xl);\n\n position: fixed;\n bottom: var(--bottom-position);\n left: 50%;\n transform: translate(-50%);\n z-index: var(--ic-z-index-toast);\n}\n\n:host(.ic-toast-hidden) {\n display: none;\n}\n\n:host(:focus) {\n outline: none;\n}\n\n.container {\n max-width: 32.5rem;\n min-width: 18rem;\n box-shadow: var(--ic-elevation-overlay);\n min-height: 3.5rem;\n background-color: var(--ic-toast-background);\n display: flex;\n align-items: center;\n position: relative;\n border-radius: var(--ic-border-radius);\n}\n\n.toast-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n position: absolute;\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n}\n\n.divider-neutral {\n background-color: var(--ic-toast-status-neutral);\n}\n\n.divider-info {\n background-color: var(--ic-toast-status-info);\n}\n\n.divider-warning {\n background-color: var(--ic-toast-status-warning);\n}\n\n.divider-error {\n background-color: var(--ic-toast-status-error);\n}\n\n.divider-success {\n background-color: var(--ic-toast-status-success);\n}\n\n.toast-icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n}\n\n:host([variant=\"neutral\"]) .toast-icon svg,\n::slotted(svg) {\n fill: var(--ic-toast-icon-neutral);\n}\n\n:host([variant=\"info\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-info);\n}\n\n:host([variant=\"warning\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-warning);\n}\n\n:host([variant=\"error\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-error);\n}\n\n:host([variant=\"success\"]) .toast-icon svg {\n fill: var(--ic-toast-icon-success);\n}\n\n.toast-content {\n margin-left: var(--ic-space-xs);\n width: 100%;\n}\n\n.no-icon {\n margin-left: var(--ic-space-md);\n}\n\n.toast-text {\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n.toast-heading {\n --ic-typography-color: var(--ic-toast-title);\n}\n\n.toast-message {\n --ic-typography-color: var(--ic-toast-description);\n}\n\n.toast-action-container {\n padding-bottom: var(--ic-space-md);\n}\n\n#dismiss-button {\n padding: var(--ic-space-xs);\n}\n\n#dismiss-button > svg {\n color: var(--ic-toast-dismiss-button);\n}\n\nic-loading-indicator {\n --outer-color: transparent;\n --inner-color: var(--ic-action-monochrome);\n}\n\n.toast-dismiss-timer {\n padding: var(--ic-space-sm);\n}\n\n@media (max-width: 576px) {\n :host {\n --bottom-position: var(--ic-space-lg);\n\n width: calc(100% - 2 * var(--ic-space-md));\n }\n}\n\n@media (min-width: 993px) {\n :host {\n --bottom-position: calc(var(--ic-space-xl) + var(--ic-space-xs));\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-border-hc);\n }\n}\n\n@keyframes fadein {\n from {\n bottom: 0;\n opacity: 0;\n }\n\n to {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n}\n\n@keyframes fadeout {\n from {\n bottom: var(--bottom-position);\n opacity: 1;\n }\n\n to {\n bottom: 0;\n opacity: 0;\n }\n}\n","import { h, Host, } from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\nimport { getSlot, isPropDefined, isSlotUsed, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nconst AUTO_DISMISS_TIMER_REFRESH_RATE_MS = 1000;\nconst TOAST_HEADING_CHAR_LIMIT = 70;\nconst TOAST_MESSAGE_CHAR_LIMIT = 140;\n/**\n * @slot action - IcButton or IcLink is placed below header and message. If used will default toast to manual `dismiss` type.\n * @slot neutral-icon - A custom neutral icon is placed on the left side of the component. If used will default toast to `neutral` variant.\n */\nexport class Toast {\n constructor() {\n this.interactiveElements = [];\n this.timerProgress = 100;\n this.visible = false;\n /**\n * If toast dismissMode is set to `automatic`, use this prop to define the time before the toast dismisses (in MILLISECONDS)\n * (NOTE: Has a minimum value of `5000ms`)\n */\n this.autoDismissTimeout = 5000;\n /**\n * If toast can be manually dismissed, this prop sets a custom aria-label for the ic-button component\n */\n this.dismissButtonAriaLabel = \"dismiss\";\n /**\n * How the toast will be dismissed. If manual will display a dismiss button.\n */\n this.dismissMode = \"manual\";\n this.dismissAction = () => {\n this.icDismiss.emit();\n };\n this.handleProgressChange = () => {\n this.timerProgress -=\n (AUTO_DISMISS_TIMER_REFRESH_RATE_MS / this.autoDismissTimeout) * 100;\n };\n this.onFocus = () => {\n if (this.focusInteractiveElement) {\n this.isManual = true;\n }\n };\n this.onBlur = () => {\n this.handleTimer({ type: \"mouseleave\" });\n };\n }\n dismissModeChangeHandler(newValue) {\n this.isManual = newValue === \"manual\";\n }\n disconnectedCallback() {\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n }\n componentWillLoad() {\n var _a, _b;\n this.handleLongText(this.heading.length > TOAST_HEADING_CHAR_LIMIT, !!this.message && ((_a = this.message) === null || _a === void 0 ? void 0 : _a.length) > TOAST_MESSAGE_CHAR_LIMIT);\n if (this.autoDismissTimeout < 5000)\n this.autoDismissTimeout = 5000;\n if (isSlotUsed(this.el, \"action\"))\n this.dismissMode = \"manual\";\n this.isManual = this.dismissMode === \"manual\";\n if (isSlotUsed(this.el, \"neutral-icon\"))\n this.variant = \"neutral\";\n if (this.variant === \"neutral\") {\n this.neutralVariantLabel =\n (_b = this.neutralIconAriaLabel) !== null && _b !== void 0 ? _b : VARIANT_ICONS[this.variant].ariaLabel;\n }\n if (this.isManual) {\n const toastMessage = isPropDefined(this.message)\n ? `. ${this.message}`\n : \"\";\n this.el.setAttribute(\"aria-label\", this.variant\n ? this.neutralVariantLabel || VARIANT_ICONS[this.variant].ariaLabel\n : this.heading);\n (this.variant || this.message) &&\n this.el.setAttribute(\"aria-description\", this.variant ? `${this.heading}${toastMessage}` : this.message || \"\");\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.heading, propName: \"heading\" }], \"Toast\");\n }\n componentDidUpdate() {\n var _a;\n if (this.focusInteractiveElement && this.isManual) {\n this.resetAutoDismissTimer();\n const actionContent = getSlot(this.el, \"action\");\n const dismissButton = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\"ic-button\");\n if (actionContent)\n this.interactiveElements.push(actionContent);\n if (dismissButton)\n this.interactiveElements.push(dismissButton);\n this.focusInteractiveElement = false;\n this.findNextInteractiveElement(this.shiftKeyPressed).setFocus();\n this.shiftKeyPressed = false;\n }\n }\n watchVisibleHandler() {\n var _a;\n if (this.visible) {\n const actionContent = getSlot(this.el, \"action\");\n const dismissButton = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\"ic-button\");\n if (actionContent)\n this.interactiveElements.push(actionContent);\n if (dismissButton)\n this.interactiveElements.push(dismissButton);\n }\n else {\n this.interactiveElements = [];\n }\n }\n handleDismiss() {\n this.visible = false;\n this.resetAutoDismissTimer();\n }\n handleKeyboard(ev) {\n if (this.visible) {\n if (this.isManual) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.findNextInteractiveElement(ev.shiftKey).setFocus();\n break;\n case \"Escape\":\n !ev.repeat && this.dismissAction();\n ev.stopImmediatePropagation();\n break;\n }\n }\n else {\n if (ev.key === \"Tab\") {\n this.shiftKeyPressed = ev.shiftKey;\n this.focusInteractiveElement = true;\n }\n }\n }\n }\n handleTimer(ev) {\n switch (ev.type) {\n case \"mouseenter\":\n if (!this.isManual) {\n this.resetAutoDismissTimer();\n }\n this.isManual = true;\n break;\n case \"mouseleave\":\n if (this.dismissMode === \"automatic\") {\n this.isManual = false;\n this.interactiveElements = [];\n if (this.visible) {\n this.dismissTimeout = window.setTimeout(this.dismissAction, this.autoDismissTimeout);\n this.timerRefreshInterval = window.setInterval(this.handleProgressChange, AUTO_DISMISS_TIMER_REFRESH_RATE_MS);\n }\n }\n break;\n }\n }\n /**\n * @internal Used to display the individual toast.\n * @returns The element that previously had focus before the toast appeared\n */\n async setVisible() {\n if (!this.visible)\n this.visible = true;\n if (!this.isManual) {\n this.dismissTimeout = window.setTimeout(this.dismissAction, this.autoDismissTimeout);\n this.timerRefreshInterval = window.setInterval(this.handleProgressChange, AUTO_DISMISS_TIMER_REFRESH_RATE_MS);\n return null;\n }\n else {\n window.setTimeout(() => this.interactiveElements[0].setFocus(), 200);\n return document.activeElement;\n }\n }\n handleLongText(headingTooLong, messageTooLong) {\n if (messageTooLong || headingTooLong) {\n console.error(`Too many characters in toast ${headingTooLong ? \"heading\" : \"\"}${headingTooLong && messageTooLong ? \" and \" : \"\"}${messageTooLong ? \"message\" : \"\"}. Refer to character limits specified in the prop description`);\n }\n }\n findNextInteractiveElement(isBackwards) {\n const firstEl = this.interactiveElements[0];\n const lastEl = this.interactiveElements[this.interactiveElements.length - 1];\n if (this.isActive(isBackwards ? firstEl : lastEl))\n return isBackwards ? lastEl : firstEl;\n let currentIndex = 0;\n return this.interactiveElements.some((el, index) => {\n if (!this.isActive(el))\n return false;\n currentIndex = index;\n return true;\n })\n ? this.interactiveElements[currentIndex + (isBackwards ? -1 : 1)]\n : firstEl;\n }\n resetAutoDismissTimer() {\n window.clearTimeout(this.dismissTimeout);\n window.clearInterval(this.timerRefreshInterval);\n this.timerProgress = 100;\n }\n isActive(targetEl) {\n return targetEl === this.el\n ? !!this.el.shadowRoot.activeElement\n : document.activeElement === targetEl;\n }\n render() {\n const { variant, heading, message, visible, isManual, dismissButtonAriaLabel, } = this;\n return (h(Host, { key: '07c2077a8b872900f4adc9943829b3fdc58d0910', class: { [\"ic-toast-hidden\"]: !visible }, tabindex: \"0\", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? \"dialog\" : \"alert\", \"aria-live\": isManual ? null : \"polite\" }, h(\"div\", { key: 'd58b7d50131a67dadcaf03c85d1724bd57a522e3', class: \"container\" }, variant && visible && (h(\"div\", { key: '15c75b6bdc7a3d3fb0c31a3e9cdfd05d5f47d969', class: \"toast-icon-container\" }, h(\"div\", { key: 'e850996cd9d5f6d9a921dd56878bbec7d6d7c417', class: {\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n } }), variant === \"neutral\" ? (h(\"slot\", { name: \"neutral-icon\" })) : (h(\"span\", { class: \"toast-icon\", innerHTML: VARIANT_ICONS[variant].icon })))), h(\"div\", { key: '3ba943e248e9492209bd89144c2baebc82a2c1f9', class: {\n [\"toast-content\"]: true,\n [\"no-icon\"]: variant === \"neutral\" && !isSlotUsed(this.el, \"neutral-icon\"),\n } }, h(\"div\", { key: 'e66852571c15ca60983bae3ee886fcf08b762276', class: \"toast-text\" }, h(\"ic-typography\", { key: '3ca4cdb553d651db0642a2ed788789cf843bcb68', variant: \"subtitle-large\", class: \"toast-heading\" }, visible && (isManual ? h(\"h5\", null, heading) : h(\"p\", null, heading))), message && (h(\"ic-typography\", { key: 'a5044b7a0916d2a1fb0f79bd747ffaf7b54b64f2', variant: \"body\", class: \"toast-message\" }, visible && h(\"p\", { key: '48e15b146bfbb18208f70998cf6df1c8c5758deb' }, message)))), isSlotUsed(this.el, \"action\") && (h(\"div\", { key: '010fac8238b54e19783d164bb5fac2a4ead5cb54', class: \"toast-action-container\" }, h(\"slot\", { key: '770796e85017801b9f48b1762392bac5c4ee11e5', name: \"action\" })))), !isManual ? (h(\"ic-loading-indicator\", { class: \"toast-dismiss-timer\", theme: \"dark\", monochrome: true, size: \"icon\", progress: this.timerProgress, description: \"Dismiss timer\" })) : (h(\"ic-button\", { id: \"dismiss-button\", innerHTML: closeIcon, onClick: this.dismissAction, variant: \"icon\", \"aria-label\": dismissButtonAriaLabel })))));\n }\n static get is() { return \"ic-toast\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toast.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toast.css\"]\n };\n }\n static get properties() {\n return {\n \"autoDismissTimeout\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number | undefined\",\n \"resolved\": \"number | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If toast dismissMode is set to `automatic`, use this prop to define the time before the toast dismisses (in MILLISECONDS)\\n(NOTE: Has a minimum value of `5000ms`)\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"auto-dismiss-timeout\",\n \"reflect\": false,\n \"defaultValue\": \"5000\"\n },\n \"dismissButtonAriaLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | undefined\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If toast can be manually dismissed, this prop sets a custom aria-label for the ic-button component\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"dismiss-button-aria-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dismiss\\\"\"\n },\n \"dismissMode\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcActivationTypes\",\n \"resolved\": \"\\\"automatic\\\" | \\\"manual\\\" | undefined\",\n \"references\": {\n \"IcActivationTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcActivationTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"How the toast will be dismissed. If manual will display a dismiss button.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"dismiss-mode\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"manual\\\"\"\n },\n \"heading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title to display at the start of the toast. (NOTE: Should be no more than `70` characters)\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"heading\",\n \"reflect\": false\n },\n \"message\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The main body message of the toast. (NOTE: Should be no more than `140` characters)\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"message\",\n \"reflect\": false\n },\n \"neutralIconAriaLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Provides a custom alt-text to be announced to screen readers, if slotting a custom neutral icon\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"neutral-icon-aria-label\",\n \"reflect\": false\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcStatusVariants\",\n \"resolved\": \"\\\"error\\\" | \\\"info\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\" | undefined\",\n \"references\": {\n \"IcStatusVariants\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcStatusVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toast being rendered\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"variant\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"isManual\": {},\n \"timerProgress\": {},\n \"visible\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDismiss\",\n \"name\": \"icDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Is emitted when the user dismisses the toast\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setVisible\": {\n \"complexType\": {\n \"signature\": \"() => Promise<HTMLElement | null>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n },\n \"return\": \"Promise<HTMLElement | null>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Used to display the individual toast.\"\n }, {\n \"name\": \"returns\",\n \"text\": \"The element that previously had focus before the toast appeared\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"dismissMode\",\n \"methodName\": \"dismissModeChangeHandler\"\n }, {\n \"propName\": \"visible\",\n \"methodName\": \"watchVisibleHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icDismiss\",\n \"method\": \"handleDismiss\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyboard\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"mouseenter\",\n \"method\": \"handleTimer\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": true\n }, {\n \"name\": \"mouseleave\",\n \"method\": \"handleTimer\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": true\n }];\n }\n}\n//# sourceMappingURL=ic-toast.js.map\n"],"mappings":"oKAAA,MAAMA,EAAa,k/JACnB,MAAAC,EAAeD,ECGf,MAAME,EAAqC,IAC3C,MAAMC,EAA2B,GACjC,MAAMC,EAA2B,I,MAKpBC,EAAK,MACd,WAAAC,CAAAC,G,+CACIC,KAAKC,oBAAsB,GAC3BD,KAAKE,cAAgB,IACrBF,KAAKG,QAAU,MAKfH,KAAKI,mBAAqB,IAI1BJ,KAAKK,uBAAyB,UAI9BL,KAAKM,YAAc,SACnBN,KAAKO,cAAgB,KACjBP,KAAKQ,UAAUC,MAAM,EAEzBT,KAAKU,qBAAuB,KACxBV,KAAKE,eACAR,EAAqCM,KAAKI,mBAAsB,GAAG,EAE5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EAAWhC,KAAKiC,GAAI,WAAcmD,EAAE,MAAO,CAAEvB,IAAK,2CAA4CyB,MAAO,0BAA4BF,EAAE,OAAQ,CAAEvB,IAAK,2CAA4C4B,KAAM,cAAiB5E,EAAYuE,EAAE,uBAAwB,CAAEE,MAAO,sBAAuBM,MAAO,OAAQC,WAAY,KAAMC,KAAM,OAAQC,SAAU/F,KAAKE,cAAe8F,YAAa,kBAAuBZ,EAAE,YAAa,CAAEa,GAAI,iBAAkBP,UAAWQ,EAAWC,QAASnG,KAAKO,cAAe2B,QAAS,OAAQ,aAAc7B,K","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as i,h as t,H as c,g as s}from"./p-8e4e97b4.js";import{r as a,x as o,y as r,b as n,E as l,j as
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as i,h as t,H as c,g as s}from"./p-8e4e97b4.js";import{r as a,x as o,y as r,b as n,E as l,j as d}from"./p-eca2fea1.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;--ic-input-label-text-color:var(--ic-switch-label);--ic-input-label-helper-text-color:var(--ic-switch-help-text)}input{overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ic-switch-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ic-space-xxs);cursor:pointer}.ic-switch-label{margin-left:var(--ic-space-xxs);margin-bottom:var(--ic-space-sm)}.ic-switch-label-small{margin-bottom:0.625rem}.ic-switch-toggle{display:flex;align-items:center;justify-content:space-around;width:4rem;height:var(--ic-space-xl);position:relative;border-radius:100vw;background-color:var(--ic-switch-unchecked-bg);border:var(--ic-border-width) solid var(--ic-switch-unchecked);box-sizing:border-box;transition:var(--ic-transition-duration-fast)}.ic-switch-line-break{flex:1 0 100%}.ic-switch-toggle::before{content:"";width:1.333rem;height:1.333rem;border-radius:50%;position:absolute;z-index:2;top:50%;left:0.333rem;transform:translate(0, -50%);background-color:var(--ic-switch-unchecked);transition:var(--ic-transition-duration-slow)}.ic-switch-icon{display:inline-block;vertical-align:middle;width:0.625rem;height:0.625rem}.ic-switch-icon-circle,.ic-switch-icon-line{stroke-width:1}.ic-switch-icon-circle{stroke:var(--ic-switch-indicator-off)}.ic-switch-icon-line{stroke:var(--ic-switch-indicator-on)}@media (prefers-reduced-motion: reduce){.ic-switch-toggle::before{transition-duration:0ms}}.ic-switch-input:checked+.ic-switch-toggle{background-color:var(--ic-switch-checked-bg);border:none}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-xl), -50%);background-color:var(--ic-switch-checked)}.ic-switch-input:not([disabled])+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-switch-unchecked-bg-hover)}.ic-switch-input:not([disabled])+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-switch-unchecked-bg-pressed)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:hover::before{box-shadow:0 0 0 0.75rem var(--ic-switch-checked-bg-hover)}.ic-switch-input:not([disabled]):checked+.ic-switch-toggle:active::before{box-shadow:0 0 0 0.75rem var(--ic-switch-checked-bg-pressed)}.ic-switch-input:focus:not([disabled])+.ic-switch-toggle,.ic-switch-input:focus-visible:not([disabled])+.ic-switch-toggle{box-shadow:var(--ic-border-focus)}.ic-switch-disabled{cursor:default}.ic-switch-disabled .ic-switch-icon-circle{stroke:var(--ic-switch-indicator-off-disabled)}.ic-switch-disabled .ic-switch-icon-line{stroke:var(--ic-switch-indicator-on-disabled)}.ic-switch-input:disabled+.ic-switch-toggle{background-color:var(--ic-switch-unchecked-bg-disabled);border:var(--ic-space-1px) dashed var(--ic-switch-unchecked-outline-disabled)}.ic-switch-input:disabled+.ic-switch-toggle::before{background-color:var(--ic-switch-unchecked-disabled)}.ic-switch-input:disabled:checked+.ic-switch-toggle{background-color:var(--ic-switch-checked-bg-disabled);border:var(--ic-border-width) dashed\n var(--ic-switch-checked-outline-disabled)}.ic-switch-input:disabled:checked+.ic-switch-toggle::before{background-color:var(--ic-switch-checked)}.ic-switch-small{gap:var(--ic-space-xxxs)}.ic-switch-small .ic-switch-toggle{width:var(--ic-space-xxl);height:var(--ic-space-lg)}.ic-switch-small .ic-switch-toggle::before{width:var(--ic-space-md);height:var(--ic-space-md);left:var(--ic-space-xxs)}.ic-switch-small .ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(var(--ic-space-lg), -50%)}::slotted(*){margin-left:var(--ic-space-sm)}::slotted(svg){fill:var(--ic-switch-icon)}@media (forced-colors: active){.ic-switch-toggle::before,.ic-switch-input:checked+.ic-switch-toggle{border:var(--ic-border-hc)}.ic-switch-input:focus+.ic-switch-toggle{border-color:highlight;outline:var(--ic-space-xxxs) solid highlight}.ic-switch-input:checked+.ic-switch-toggle::before{transform:translate(calc(var(--ic-space-xl) - 0.125rem), -50%)}.ic-switch-input:disabled+.ic-switch-toggle,.ic-switch-input:disabled:checked+.ic-switch-toggle,.ic-switch-input:disabled+.ic-switch-toggle::before{border-color:GrayText}.ic-switch-disabled .ic-switch-icon-circle,.ic-switch-disabled .ic-switch-icon-line{stroke:GrayText}}';const b=h;let p=0;const w=class{constructor(t){e(this,t);this.icBlur=i(this,"icBlur",7);this.icChange=i(this,"icChange",7);this.icFocus=i(this,"icFocus",7);this.inputId=`ic-switch-input-${p++}`;this.checkedState=false;this.initiallyChecked=this.checked;this.checked=false;this.disabled=false;this.helperText="";this.hideLabel=false;this.name=this.inputId;this.size="medium";this.theme="inherit";this.value="on";this.handleChange=()=>{this.checkedState=!this.checkedState;this.icChange.emit({checked:this.checkedState,value:this.value})};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=()=>{this.icBlur.emit()};this.handleFormReset=()=>{this.checkedState=this.initiallyChecked}}checkedChangeHandler(){this.checkedState=!!this.checked}watchDisabledHandler(){a(this.disabled,this.el)}disconnectedCallback(){o(this.el,this.handleFormReset)}componentWillLoad(){this.checkedState=this.checked;r(this.el,this.handleFormReset);a(this.disabled,this.el)}componentDidLoad(){n([{prop:this.label,propName:"label"}],"Switch")}async setFocus(){var e,i;(i=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("input"))===null||i===void 0?void 0:i.focus()}render(){const{label:e,checkedState:i,size:s,disabled:a,name:o,value:r,hideLabel:n,helperText:h,inputId:b,theme:p}=this;const w=s==="small";l(this.el,i?r:"",o,a);return t(c,{key:"66d9e066d1e0f20f7fa59fa0ca51c1769562a80e",class:{[`ic-theme-${p}`]:p!=="inherit"}},t("label",{key:"4bb0893e84a0c5f5f60ae02a00f1939987d5feb6",class:{"ic-switch-container":true,"ic-switch-disabled":!!a,"ic-switch-small":w},htmlFor:b},!n&&t("ic-input-label",{key:"30301d042cec22cb7075eaf3bb424253b6ca1a36",for:b,label:e,helperText:h,readonly:true,disabled:a,class:{"ic-switch-label":true,"ic-switch-label-small":w}}),!n&&t("span",{key:"6427efd9a6a645dd73783cc6e0356c437856c1bb",class:"ic-switch-line-break"}),t("input",{key:"dace8d204c141350a2e5cf9ab6ea47337b98731c",checked:i,disabled:a,"aria-label":e,"aria-checked":i?"true":"false","aria-describedby":d(b,h!=="",false),role:"switch",class:"ic-switch-input",type:"checkbox",name:"toggle",id:b,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.handleChange}),t("span",{key:"a443193b38189567ecb9740b47c60c6d9e09fdbc",class:"ic-switch-toggle"},t("svg",{key:"b8b91083bb4afa7dc2d63c858e44594cebc5ee89",class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("line",{key:"af086eb2f9f000b7c881620d19f879956b82a3e8",class:"ic-switch-icon-line",x1:"9",y1:w?"2":"1",x2:"9",y2:w?"8":"9"})),t("svg",{key:"788815cfaf4aae19e33b5adb03a8452365d8c700",class:"ic-switch-icon","aria-hidden":"true",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t("circle",{key:"f214643ebf7dfdd76f719e82f2241dc779bf5911",class:"ic-switch-icon-circle",fill:"none",cx:"5",cy:"5",r:w?"3.335":"4.445"}))),t("slot",{key:"a88bdfafceb94160a60e4396c34d1a80ca21a58e",name:"right-adornment"})))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{checked:["checkedChangeHandler"],disabled:["watchDisabledHandler"]}}};w.style=b;export{w as ic_switch};
|
2
|
+
//# sourceMappingURL=p-887b1302.entry.js.map
|