@ukic/canary-web-components 2.0.0-canary.6 → 2.0.0-canary.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/helpers-93c5fc92.js +198 -0
- package/dist/cjs/helpers-93c5fc92.js.map +1 -0
- package/dist/cjs/{helpers-86375e76.js → helpers-b525d45a.js} +45 -4
- package/dist/cjs/helpers-b525d45a.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +6 -2
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +4 -3
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +34 -10
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +7 -7
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +4 -2
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +12 -10
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +2599 -0
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +2 -18
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +21 -13
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +837 -0
- package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -5
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +184 -0
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-toggle-button.cjs.entry.js +6 -3
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/index-4cf27b16.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/ic-menu-with-multi/ic-menu.css +701 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js +1458 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -0
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +880 -0
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/assets/Check.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.css +693 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.js +1649 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/story-data.js +216 -0
- package/dist/collection/components/ic-select-with-multi/story-data.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +146 -0
- package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +2040 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1518 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -0
- package/dist/collection/utils/constants.js +28 -0
- package/dist/collection/utils/constants.js.map +1 -0
- package/dist/collection/utils/helpers.js +168 -5
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js +13 -0
- package/dist/collection/utils/types.js.map +1 -0
- package/dist/components/helpers.js +44 -4
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +183 -0
- package/dist/components/helpers2.js.map +1 -0
- package/dist/components/ic-accordion-group.js +7 -2
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-alert2.js +1 -1
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-back-to-top.js +1 -1
- package/dist/components/ic-badge.js +4 -3
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-button2.js +38 -9
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +8 -20
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox.js +1 -1
- package/dist/components/ic-chip.js +1 -1
- package/dist/components/ic-data-entity.js +3 -6
- package/dist/components/ic-data-entity.js.map +1 -1
- package/dist/components/ic-data-row.js +21 -35
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-dialog.js +5 -2
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +7 -6
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu-with-multi.d.ts +11 -0
- package/dist/components/ic-menu-with-multi.js +8 -0
- package/dist/components/ic-menu-with-multi.js.map +1 -0
- package/dist/components/ic-menu2.js +5 -4
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +2665 -0
- package/dist/components/ic-menu3.js.map +1 -0
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +1 -1
- package/dist/components/ic-pagination-bar2.js +1 -17
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination2.js +1 -1
- package/dist/components/ic-popover-menu.js +2 -2
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select-with-multi.d.ts +11 -0
- package/dist/components/ic-select-with-multi.js +962 -0
- package/dist/components/ic-select-with-multi.js.map +1 -0
- package/dist/components/ic-select2.js +23 -14
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -5
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-step.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-tab-panel.js +1 -1
- package/dist/components/ic-tab.js +1 -1
- package/dist/components/ic-text-field2.js +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +210 -0
- package/dist/components/ic-toggle-button-group.js.map +1 -0
- package/dist/components/ic-toggle-button.js +6 -3
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +1 -1
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/core/core.css +8 -5
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-4119a26b.entry.js → p-045359e1.entry.js} +2 -2
- package/dist/core/{p-cae71c32.entry.js → p-10fb4c46.entry.js} +2 -2
- package/dist/core/{p-7a0790e4.entry.js → p-169bfa51.entry.js} +2 -2
- package/dist/core/{p-56645c00.entry.js → p-1ca332ca.entry.js} +2 -2
- package/dist/core/{p-fddc7254.entry.js → p-204ace96.entry.js} +2 -2
- package/dist/core/p-21150122.entry.js +2 -0
- package/dist/core/p-21150122.entry.js.map +1 -0
- package/dist/core/{p-5332a426.entry.js → p-2eac7dcc.entry.js} +2 -2
- package/dist/core/{p-3294eba4.entry.js → p-3803a5b5.entry.js} +2 -2
- package/dist/core/{p-24945ee5.entry.js → p-452985d9.entry.js} +2 -2
- package/dist/core/p-452985d9.entry.js.map +1 -0
- package/dist/core/p-4753bac8.entry.js +2 -0
- package/dist/core/p-4753bac8.entry.js.map +1 -0
- package/dist/core/{p-a048beab.entry.js → p-4baa0916.entry.js} +2 -2
- package/dist/core/{p-7e0197a4.entry.js → p-4f413fc0.entry.js} +2 -2
- package/dist/core/{p-a6a90c56.entry.js → p-595be57d.entry.js} +2 -2
- package/dist/core/{p-5f8c4c83.entry.js → p-5ae93c16.entry.js} +2 -2
- package/dist/core/{p-03fdee20.entry.js → p-5e0c830b.entry.js} +2 -2
- package/dist/core/{p-03fdee20.entry.js.map → p-5e0c830b.entry.js.map} +1 -1
- package/dist/core/p-624d4f5f.entry.js +2 -0
- package/dist/core/p-624d4f5f.entry.js.map +1 -0
- package/dist/core/{p-fff91bd9.entry.js → p-6933f8e9.entry.js} +2 -2
- package/dist/core/{p-043e4073.entry.js → p-6c3044b6.entry.js} +2 -2
- package/dist/core/{p-7b17f3ce.entry.js → p-73be1251.entry.js} +2 -2
- package/dist/core/{p-e0d8d7a5.entry.js → p-75dac3d1.entry.js} +2 -2
- package/dist/core/{p-a3ab9f4c.entry.js → p-76915584.entry.js} +2 -2
- package/dist/core/p-76915584.entry.js.map +1 -0
- package/dist/core/{p-78ad0c34.entry.js → p-7ef8d616.entry.js} +2 -2
- package/dist/core/{p-78ad0c34.entry.js.map → p-7ef8d616.entry.js.map} +1 -1
- package/dist/core/{p-f2318ddc.entry.js → p-81ddc39d.entry.js} +2 -2
- package/dist/core/{p-3e36c9e4.entry.js → p-869954a2.entry.js} +2 -2
- package/dist/core/{p-a561980f.entry.js → p-88d54b72.entry.js} +2 -2
- package/dist/core/{p-f4c11be0.entry.js → p-8b08d8fe.entry.js} +2 -2
- package/dist/core/p-8b08d8fe.entry.js.map +1 -0
- package/dist/core/{p-c2884fcd.entry.js → p-917c5721.entry.js} +2 -2
- package/dist/core/{p-217db3af.entry.js → p-942282cd.entry.js} +2 -2
- package/dist/core/p-99cad6c2.js +2 -0
- package/dist/core/p-99cad6c2.js.map +1 -0
- package/dist/core/p-9caf19eb.js +2 -0
- package/dist/core/p-9caf19eb.js.map +1 -0
- package/dist/core/{p-99a9ce86.entry.js → p-a0f8efb2.entry.js} +2 -2
- package/dist/core/{p-234edce6.entry.js → p-a31031a5.entry.js} +2 -2
- package/dist/core/{p-faaa06d7.entry.js → p-a434c3d4.entry.js} +2 -2
- package/dist/core/{p-ae337896.entry.js → p-a43c12cd.entry.js} +2 -2
- package/dist/core/{p-010053ab.entry.js → p-a50c3b9e.entry.js} +2 -2
- package/dist/core/{p-b4591bfe.entry.js → p-ab09986c.entry.js} +2 -2
- package/dist/core/p-ab09986c.entry.js.map +1 -0
- package/dist/core/p-ac4e40a7.entry.js +2 -0
- package/dist/core/p-ac4e40a7.entry.js.map +1 -0
- package/dist/core/{p-cedabab7.entry.js → p-b82dcc29.entry.js} +2 -2
- package/dist/core/{p-8eaed5b7.entry.js → p-ba86928c.entry.js} +2 -2
- package/dist/core/{p-9c6e48fb.entry.js → p-c125b65a.entry.js} +2 -2
- package/dist/core/{p-452be32a.entry.js → p-c34848da.entry.js} +2 -2
- package/dist/core/{p-1e9f689b.entry.js → p-d8469ac0.entry.js} +2 -2
- package/dist/core/{p-79b39c8a.entry.js → p-db9c03c0.entry.js} +2 -2
- package/dist/core/{p-dd0a5ef0.entry.js → p-e0462b23.entry.js} +2 -2
- package/dist/core/p-e0462b23.entry.js.map +1 -0
- package/dist/core/p-e0a94f2d.entry.js +2 -0
- package/dist/core/p-e0a94f2d.entry.js.map +1 -0
- package/dist/core/{p-eb922333.entry.js → p-e3997d60.entry.js} +2 -2
- package/dist/core/p-e79e0292.entry.js +2 -0
- package/dist/core/p-e79e0292.entry.js.map +1 -0
- package/dist/core/{p-26ca8030.entry.js → p-e834344e.entry.js} +2 -2
- package/dist/core/{p-2addb040.entry.js → p-f14454b1.entry.js} +2 -2
- package/dist/core/{p-e9bc9ee2.entry.js → p-f3c840cd.entry.js} +2 -2
- package/dist/core/{p-e9bc9ee2.entry.js.map → p-f3c840cd.entry.js.map} +1 -1
- package/dist/core/{p-fc406db5.entry.js → p-f6888309.entry.js} +2 -2
- package/dist/core/p-f74a8752.entry.js +2 -0
- package/dist/core/p-f74a8752.entry.js.map +1 -0
- package/dist/core/{p-e31125df.entry.js → p-f7a14c01.entry.js} +2 -2
- package/dist/core/{p-da1f0a53.entry.js → p-f843da01.entry.js} +2 -2
- package/dist/core/{p-da1f0a53.entry.js.map → p-f843da01.entry.js.map} +1 -1
- package/dist/core/{p-b7d5ced3.entry.js → p-fc5611e2.entry.js} +2 -2
- package/dist/core/p-fc5611e2.entry.js.map +1 -0
- package/dist/core/p-fde45b29.entry.js +2 -0
- package/dist/core/p-fde45b29.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-229a5574.js → helpers-12b4266a.js} +45 -5
- package/dist/esm/helpers-12b4266a.js.map +1 -0
- package/dist/esm/helpers-5271897c.js +183 -0
- package/dist/esm/helpers-5271897c.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +6 -2
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +2 -2
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +4 -3
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +34 -10
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +7 -7
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-entity.entry.js +3 -6
- package/dist/esm/ic-data-entity.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +21 -35
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +4 -2
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +12 -10
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +2595 -0
- package/dist/esm/ic-menu-with-multi.entry.js.map +1 -0
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination-bar.entry.js +1 -17
- package/dist/esm/ic-pagination-bar.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +21 -13
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +833 -0
- package/dist/esm/ic-select-with-multi.entry.js.map +1 -0
- package/dist/esm/ic-side-navigation.entry.js +1 -5
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +180 -0
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
- package/dist/esm/ic-toggle-button.entry.js +6 -3
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/index-93509377.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +208 -0
- package/dist/types/components/ic-select-with-multi/ic-select.d.ts +289 -0
- package/dist/types/components/ic-select-with-multi/story-data.d.ts +32 -0
- package/dist/types/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts +1 -0
- package/dist/types/components.d.ts +531 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +61 -2
- package/dist/types/utils/types.d.ts +16 -0
- package/hydrate/index.js +6853 -2907
- package/package.json +3 -3
- package/dist/cjs/helpers-86375e76.js.map +0 -1
- package/dist/core/p-0aa1fe4e.entry.js +0 -2
- package/dist/core/p-0aa1fe4e.entry.js.map +0 -1
- package/dist/core/p-24945ee5.entry.js.map +0 -1
- package/dist/core/p-8cde58bf.entry.js +0 -2
- package/dist/core/p-8cde58bf.entry.js.map +0 -1
- package/dist/core/p-93828f0e.entry.js +0 -2
- package/dist/core/p-93828f0e.entry.js.map +0 -1
- package/dist/core/p-9fdd7d73.entry.js +0 -2
- package/dist/core/p-9fdd7d73.entry.js.map +0 -1
- package/dist/core/p-a3ab9f4c.entry.js.map +0 -1
- package/dist/core/p-b4591bfe.entry.js.map +0 -1
- package/dist/core/p-b7d5ced3.entry.js.map +0 -1
- package/dist/core/p-dd0a5ef0.entry.js.map +0 -1
- package/dist/core/p-e0102744.js +0 -2
- package/dist/core/p-e0102744.js.map +0 -1
- package/dist/core/p-e2ccb52b.entry.js +0 -2
- package/dist/core/p-e2ccb52b.entry.js.map +0 -1
- package/dist/core/p-f4c11be0.entry.js.map +0 -1
- package/dist/esm/helpers-229a5574.js.map +0 -1
- /package/dist/core/{p-4119a26b.entry.js.map → p-045359e1.entry.js.map} +0 -0
- /package/dist/core/{p-cae71c32.entry.js.map → p-10fb4c46.entry.js.map} +0 -0
- /package/dist/core/{p-7a0790e4.entry.js.map → p-169bfa51.entry.js.map} +0 -0
- /package/dist/core/{p-56645c00.entry.js.map → p-1ca332ca.entry.js.map} +0 -0
- /package/dist/core/{p-fddc7254.entry.js.map → p-204ace96.entry.js.map} +0 -0
- /package/dist/core/{p-5332a426.entry.js.map → p-2eac7dcc.entry.js.map} +0 -0
- /package/dist/core/{p-3294eba4.entry.js.map → p-3803a5b5.entry.js.map} +0 -0
- /package/dist/core/{p-a048beab.entry.js.map → p-4baa0916.entry.js.map} +0 -0
- /package/dist/core/{p-7e0197a4.entry.js.map → p-4f413fc0.entry.js.map} +0 -0
- /package/dist/core/{p-a6a90c56.entry.js.map → p-595be57d.entry.js.map} +0 -0
- /package/dist/core/{p-5f8c4c83.entry.js.map → p-5ae93c16.entry.js.map} +0 -0
- /package/dist/core/{p-fff91bd9.entry.js.map → p-6933f8e9.entry.js.map} +0 -0
- /package/dist/core/{p-043e4073.entry.js.map → p-6c3044b6.entry.js.map} +0 -0
- /package/dist/core/{p-7b17f3ce.entry.js.map → p-73be1251.entry.js.map} +0 -0
- /package/dist/core/{p-e0d8d7a5.entry.js.map → p-75dac3d1.entry.js.map} +0 -0
- /package/dist/core/{p-f2318ddc.entry.js.map → p-81ddc39d.entry.js.map} +0 -0
- /package/dist/core/{p-3e36c9e4.entry.js.map → p-869954a2.entry.js.map} +0 -0
- /package/dist/core/{p-a561980f.entry.js.map → p-88d54b72.entry.js.map} +0 -0
- /package/dist/core/{p-c2884fcd.entry.js.map → p-917c5721.entry.js.map} +0 -0
- /package/dist/core/{p-217db3af.entry.js.map → p-942282cd.entry.js.map} +0 -0
- /package/dist/core/{p-99a9ce86.entry.js.map → p-a0f8efb2.entry.js.map} +0 -0
- /package/dist/core/{p-234edce6.entry.js.map → p-a31031a5.entry.js.map} +0 -0
- /package/dist/core/{p-faaa06d7.entry.js.map → p-a434c3d4.entry.js.map} +0 -0
- /package/dist/core/{p-ae337896.entry.js.map → p-a43c12cd.entry.js.map} +0 -0
- /package/dist/core/{p-010053ab.entry.js.map → p-a50c3b9e.entry.js.map} +0 -0
- /package/dist/core/{p-cedabab7.entry.js.map → p-b82dcc29.entry.js.map} +0 -0
- /package/dist/core/{p-8eaed5b7.entry.js.map → p-ba86928c.entry.js.map} +0 -0
- /package/dist/core/{p-9c6e48fb.entry.js.map → p-c125b65a.entry.js.map} +0 -0
- /package/dist/core/{p-452be32a.entry.js.map → p-c34848da.entry.js.map} +0 -0
- /package/dist/core/{p-1e9f689b.entry.js.map → p-d8469ac0.entry.js.map} +0 -0
- /package/dist/core/{p-79b39c8a.entry.js.map → p-db9c03c0.entry.js.map} +0 -0
- /package/dist/core/{p-eb922333.entry.js.map → p-e3997d60.entry.js.map} +0 -0
- /package/dist/core/{p-26ca8030.entry.js.map → p-e834344e.entry.js.map} +0 -0
- /package/dist/core/{p-2addb040.entry.js.map → p-f14454b1.entry.js.map} +0 -0
- /package/dist/core/{p-fc406db5.entry.js.map → p-f6888309.entry.js.map} +0 -0
- /package/dist/core/{p-e31125df.entry.js.map → p-f7a14c01.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-8455d1bb.js";import{c as n}from"./p-e081702e.js";import{f as o,d as r,i as h}from"./p-e0102744.js";import"./p-fd186591.js";const l='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.disable-height-constraint){background:none;justify-content:unset;align-items:unset}.dialog.disable-height-constraint{max-height:none;position:relative}.dialog.disable-height-constraint .content-area{overflow-y:visible}:host(.fade-in){opacity:1;transition:opacity var(--ic-easing-transition-slow)}:host(.hidden){display:none}.dialog{background-color:var(--ic-architectural-white);border:var(--ic-border-default);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) 0 var(--ic-space-md);transform:translateY(-3rem);transition:transform 1000s;display:flex;flex-direction:column;box-sizing:border-box;overflow-x:visible}:host(.fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs);padding:0 var(--ic-space-md)}.heading{overflow-wrap:break-word}.close-icon{margin-left:auto}.content-area{-ms-overflow-style:none;scrollbar-width:none;padding:0 var(--ic-space-md);margin:0;overflow-y:auto}.content-area::-webkit-scrollbar{display:none}#dialog-content{margin-bottom:var(--ic-space-sm)}#dialog-content ::slotted(ic-typography){overflow-wrap:break-word}#dialog-content ::slotted(*){position:relative}.status-alert{margin-bottom:var(--ic-space-xs)}.dialog-controls{margin-top:auto;padding:var(--ic-space-xs) var(--ic-space-md) 0;display:flex;justify-content:flex-end;gap:var(--ic-space-md)}.dialog-control-button{width:-moz-fit-content;width:fit-content}.backdrop{overflow-y:auto;position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);padding-top:16px;padding-bottom:16px}@media (min-width: 800px){:host([size="large"]) .content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;transform:translateY(-5rem);max-width:none;max-height:none;box-sizing:border-box}.backdrop{padding:0}.dialog.disable-height-constraint{height:auto;min-height:100vh}}@media (max-width: 364px){.triple-button{flex-direction:column;gap:var(--ic-space-xs)}.dialog-control-button{width:unset}}';const d=class{constructor(s){t(this,s);this.icDialogCancelled=i(this,"icDialogCancelled",7);this.icDialogClosed=i(this,"icDialogClosed",7);this.icDialogConfirmed=i(this,"icDialogConfirmed",7);this.icDialogOpened=i(this,"icDialogOpened",7);this.DATA_GETS_FOCUS="data-gets-focus";this.DATA_GETS_FOCUS_SELECTOR="[data-gets-focus]";this.DIALOG_CONTROLS="dialog-controls";this.dialogHeight=0;this.focusedElementIndex=0;this.IC_TEXT_FIELD="IC-TEXT-FIELD";this.IC_ACCORDION="IC-ACCORDION";this.resizeObserver=null;this.dialogOpened=()=>{this.dialogRendered=true;if(this.disableHeightConstraint){this.dialogEl.show()}else{this.dialogEl.showModal()}setTimeout((()=>{this.fadeIn=true;if(this.disableHeightConstraint&&this.backdropEl.scrollTop!==0){this.backdropEl.scrollTop=0}}),10);setTimeout((()=>{this.setInitialFocus();o(this.runResizeObserver)}),75);setTimeout((()=>{this.getFocusedElementIndex();this.icDialogOpened.emit()}),80)};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout(this.resizeObserverCallback,80)}));this.resizeObserver.observe(this.dialogEl)};this.resizeObserverCallback=()=>{if(this.dialogEl.clientHeight!==this.dialogHeight){this.dialogHeight=this.dialogEl.clientHeight}};this.refreshInteractiveElementsOnSlotChange=()=>{this.contentArea=this.el.shadowRoot.querySelector("#dialog-content slot");this.contentArea.addEventListener("slotchange",this.getInteractiveElements)};this.removeSlotChangeListener=()=>{if(this.contentArea){this.contentArea.removeEventListener("slotchange",this.getInteractiveElements)}};this.setInitialFocus=()=>{this.sourceElement=document.activeElement;let t;if(this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR)!==null){t=this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR)}else{t=this.el.shadowRoot.querySelector(this.DATA_GETS_FOCUS_SELECTOR)}if(t.tagName===this.IC_TEXT_FIELD){t.setFocus()}else if(t.tagName===this.IC_ACCORDION){t.setFocus()}else{t.focus({preventScroll:this.disableHeightConstraint?true:false})}};this.getFocusedElementIndex=()=>{for(let t=0;t<this.interactiveElementList.length;t++){if(this.interactiveElementList[t]===(this.el.shadowRoot.activeElement||document.activeElement)){this.focusedElementIndex=t}}};this.setAlertVariant=()=>{if(r(this.status)&&this.status!==null){const t=this.el.shadowRoot.querySelector("ic-alert");t.setAttribute("variant",this.status)}};this.closeIconClick=()=>{this.open=false};this.getInteractiveElements=()=>{this.interactiveElementList=Array.from(this.el.shadowRoot.querySelectorAll("ic-button"));const t=Array.from(this.el.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex="-1"]), \n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-group, ic-radio-group, \n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button, \n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion`));if(t.length>0){if(t[0].slot!==this.DIALOG_CONTROLS){t[0].setAttribute(this.DATA_GETS_FOCUS,"")}else if(!this.destructive){t[t.length-1].setAttribute(this.DATA_GETS_FOCUS,"")}}for(let i=0;i<t.length;i++){this.interactiveElementList.splice(1+i,0,t[i])}};this.getNextFocusEl=t=>this.interactiveElementList[t];this.focusNextInteractiveElement=t=>{this.getFocusedElementIndex();this.setFocusIndexBasedOnShiftKey(t);this.loopNextFocusIndexIfLastElement();let i=this.getNextFocusEl(this.focusedElementIndex);const e=getComputedStyle(i).visibility==="hidden";if(i.tagName===this.IC_TEXT_FIELD){i.setFocus()}else{if(e){this.setFocusIndexBasedOnShiftKey(t);this.loopNextFocusIndexIfLastElement();i=this.getNextFocusEl(this.focusedElementIndex)}if(i.tagName===this.IC_ACCORDION){i.setFocus()}else{i.focus()}}};this.setButtonOnClick=()=>{var t,i,e;if(this.buttons){this.buttonOnclick0=new Function((t=this.buttonProps[0])===null||t===void 0?void 0:t.onclick);this.buttonOnclick1=new Function((i=this.buttonProps[1])===null||i===void 0?void 0:i.onclick);this.buttonOnclick2=new Function((e=this.buttonProps[2])===null||e===void 0?void 0:e.onclick)}};this.getButtonOnclick=t=>{if(t===0){return this.buttonOnclick0()}else if(t===1){return this.buttonOnclick1()}else{return this.buttonOnclick2()}};this.getButtonVariant=t=>{const i=this.destructive?"destructive":"primary";if(this.buttonProps.length===1){return i}else if(this.buttonProps.length===2){if(t===0){return"tertiary"}else{return i}}else{if(t===2){return i}else{return"secondary"}}};this.renderDialog=()=>{const{alertHeading:t,alertMessage:i,buttons:s,buttonProps:a,size:o,heading:r,label:l,status:d,destructive:c,dismissLabel:u,hideCloseButton:m}=this;return e("dialog",{class:{["dialog"]:true,[`${o}`]:true,["disable-height-constraint"]:this.disableHeightConstraint},"aria-labelledby":"dialog-label dialog-heading","aria-describedby":"dialog-alert dialog-content",ref:t=>this.dialogEl=t},e("div",{class:"heading-area"},e("div",{class:"heading-content"},e("div",{class:"label"},e("slot",{name:"label"},e("ic-typography",{variant:"label",id:"dialog-label"},l))),e("div",{class:"heading"},e("slot",{name:"heading"},e("ic-typography",{variant:"h4",id:"dialog-heading"},r)))),!m&&e("ic-button",{class:"close-icon",variant:"icon",innerHTML:n,"aria-label":u,onClick:this.closeIconClick,"data-gets-focus":c||!s?"":null})),e("div",{class:"content-area"},h(this.el,"alert")?e("slot",{name:"alert"}):d&&e("ic-alert",{variant:d,heading:t,message:i,"title-above":true,class:"status-alert",id:"dialog-alert"}),e("div",{id:"dialog-content"},e("slot",null))),(s||h(this.el,this.DIALOG_CONTROLS))&&e("div",{class:{[this.DIALOG_CONTROLS]:true,["triple-button"]:a.length===3}},e("slot",{name:this.DIALOG_CONTROLS},!h(this.el,this.DIALOG_CONTROLS)&&a.map(((t,i)=>{if(i>2){return}else{return e("ic-button",{variant:this.getButtonVariant(i),onClick:()=>this.getButtonOnclick(i),class:"dialog-control-button","full-width":a.length===3,"data-gets-focus":this.getButtonVariant(i)==="primary"?"":null},t.label)}})))))};this.dialogRendered=false;this.fadeIn=false;this.alertHeading=undefined;this.alertMessage=undefined;this.buttons=true;this.closeOnBackdropClick=true;this.destructive=false;this.dismissLabel="Dismiss";this.disableHeightConstraint=false;this.hideCloseButton=false;this.heading=undefined;this.label=undefined;this.open=undefined;this.size="small";this.status=undefined;this.buttonProps=[{label:"Cancel",onclick:"this.cancelDialog();"},{label:"Confirm",onclick:"this.confirmDialog();"}]}watchOpenHandler(){if(this.open){this.dialogOpened()}else{this.fadeIn=false;if(this.resizeObserver!==null){this.resizeObserver.disconnect()}setTimeout((()=>{var t;this.dialogRendered=false;this.dialogEl.close();(t=this.sourceElement)===null||t===void 0?void 0:t.focus();this.dialogHeight=0;this.icDialogClosed.emit()}),80)}}watchPropHandler(){this.setButtonOnClick()}disconnectedCallback(){this.removeSlotChangeListener()}componentWillLoad(){if(this.buttonProps.length){this.setButtonOnClick()}}componentDidLoad(){this.getInteractiveElements();this.setAlertVariant();this.refreshInteractiveElementsOnSlotChange();if(this.open){this.dialogOpened()}}componentDidRender(){if(getComputedStyle(this.el).display!=="none"&&this.disableHeightConstraint){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}}handleKeyboard(t){if(this.dialogRendered){switch(t.key){case"Tab":t.preventDefault();this.focusNextInteractiveElement(t.shiftKey);break;case"Escape":if(!t.repeat){this.open=false}t.stopImmediatePropagation();break}}}handleClick(t){const i=this.el.shadowRoot.querySelector("dialog");if(this.closeOnBackdropClick&&t.composedPath().indexOf(i)<=0){const i=this.dialogEl.getBoundingClientRect();const e=i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width;if(!e){this.open=false}}}async showDialog(){this.open=true}async hideDialog(){this.open=false}async cancelDialog(){this.icDialogCancelled.emit();this.open=false}async confirmDialog(){this.icDialogConfirmed.emit()}loopNextFocusIndexIfLastElement(){if(this.focusedElementIndex>this.interactiveElementList.length-1)this.focusedElementIndex=0;else if(this.focusedElementIndex<0){this.focusedElementIndex=this.interactiveElementList.length-1}}setFocusIndexBasedOnShiftKey(t){if(t){this.focusedElementIndex-=1}else{this.focusedElementIndex+=1}}render(){return e(s,{class:{["hidden"]:!this.dialogRendered,["fade-in"]:this.fadeIn,["disable-height-constraint"]:this.disableHeightConstraint}},this.disableHeightConstraint?e("div",{class:"backdrop",ref:t=>this.backdropEl=t},this.renderDialog()):this.renderDialog())}get el(){return a(this)}static get watchers(){return{open:["watchOpenHandler"],buttonProps:["watchPropHandler"]}}};d.style=l;export{d as ic_dialog};
|
2
|
-
//# sourceMappingURL=p-93828f0e.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icDialogCss","Dialog","constructor","hostRef","this","DATA_GETS_FOCUS","DATA_GETS_FOCUS_SELECTOR","DIALOG_CONTROLS","dialogHeight","focusedElementIndex","IC_TEXT_FIELD","IC_ACCORDION","resizeObserver","dialogOpened","dialogRendered","disableHeightConstraint","dialogEl","show","showModal","setTimeout","fadeIn","backdropEl","scrollTop","setInitialFocus","checkResizeObserver","runResizeObserver","getFocusedElementIndex","icDialogOpened","emit","ResizeObserver","clearTimeout","resizeTimeout","window","resizeObserverCallback","observe","clientHeight","refreshInteractiveElementsOnSlotChange","contentArea","el","shadowRoot","querySelector","addEventListener","getInteractiveElements","removeSlotChangeListener","removeEventListener","sourceElement","document","activeElement","focusedElement","tagName","setFocus","focus","preventScroll","i","interactiveElementList","length","setAlertVariant","isPropDefined","status","alert","setAttribute","closeIconClick","open","Array","from","querySelectorAll","slottedInteractiveElements","slot","destructive","splice","getNextFocusEl","focusNextInteractiveElement","shiftKey","setFocusIndexBasedOnShiftKey","loopNextFocusIndexIfLastElement","nextFocusEl","isHidden","getComputedStyle","visibility","setButtonOnClick","_a","_b","_c","buttons","buttonOnclick0","Function","buttonProps","onclick","buttonOnclick1","buttonOnclick2","getButtonOnclick","index","getButtonVariant","mainVariant","renderDialog","alertHeading","alertMessage","size","heading","label","dismissLabel","hideCloseButton","h","class","ref","name","variant","id","innerHTML","closeIcon","onClick","isSlotUsed","message","map","props","undefined","closeOnBackdropClick","watchOpenHandler","disconnect","close","icDialogClosed","watchPropHandler","disconnectedCallback","componentWillLoad","componentDidLoad","componentDidRender","display","body","style","overflow","handleKeyboard","ev","key","preventDefault","repeat","stopImmediatePropagation","handleClick","dialogElement","composedPath","indexOf","rect","getBoundingClientRect","isInDialog","top","clientY","height","left","clientX","width","showDialog","hideDialog","cancelDialog","icDialogCancelled","confirmDialog","icDialogConfirmed","render","Host"],"sources":["../web-components/dist/collection/components/ic-dialog/ic-dialog.css?tag=ic-dialog&encapsulation=shadow","../web-components/dist/collection/components/ic-dialog/ic-dialog.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-dialog: z-index of dialog \n */\n\n:host {\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100% !important;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n opacity: 0;\n transition: opacity var(--ic-easing-transition-slow);\n}\n\n:host(.disable-height-constraint) {\n background: none;\n justify-content: unset;\n align-items: unset;\n}\n\n.dialog.disable-height-constraint {\n max-height: none;\n position: relative;\n}\n\n.dialog.disable-height-constraint .content-area {\n overflow-y: visible;\n}\n\n:host(.fade-in) {\n opacity: 1;\n transition: opacity var(--ic-easing-transition-slow);\n}\n\n:host(.hidden) {\n display: none;\n}\n\n.dialog {\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n padding: var(--ic-space-xs) 0 var(--ic-space-md);\n transform: translateY(-3rem);\n transition: transform 1000s;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n overflow-x: visible;\n}\n\n:host(.fade-in) .dialog {\n transform: translateY(0);\n transition: transform var(--ic-easing-transition-slow);\n}\n\n.small {\n width: 50%;\n max-width: 25rem;\n min-height: 11rem;\n max-height: 70vh;\n}\n\n.medium {\n width: 70vw;\n max-width: 44rem;\n min-height: 12.5rem;\n max-height: 70vh;\n}\n\n.large {\n width: 90vw;\n max-width: 62.5rem;\n min-height: 12.5rem;\n max-height: 90vh;\n}\n\n.heading-area {\n display: flex;\n margin-bottom: var(--ic-space-xs);\n padding: 0 var(--ic-space-md);\n}\n\n.heading {\n overflow-wrap: break-word;\n}\n\n.close-icon {\n margin-left: auto;\n}\n\n.content-area {\n -ms-overflow-style: none;\n scrollbar-width: none;\n padding: 0 var(--ic-space-md);\n margin: 0;\n overflow-y: auto;\n}\n\n.content-area::-webkit-scrollbar {\n display: none;\n}\n\n#dialog-content {\n margin-bottom: var(--ic-space-sm);\n}\n\n#dialog-content ::slotted(ic-typography) {\n overflow-wrap: break-word;\n}\n\n#dialog-content ::slotted(*) {\n position: relative;\n}\n\n.status-alert {\n margin-bottom: var(--ic-space-xs);\n}\n\n.dialog-controls {\n margin-top: auto;\n padding: var(--ic-space-xs) var(--ic-space-md) 0;\n display: flex;\n justify-content: flex-end;\n gap: var(--ic-space-md);\n}\n\n.dialog-control-button {\n width: -moz-fit-content;\n width: fit-content;\n}\n\n.backdrop {\n overflow-y: auto;\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n padding-top: 16px;\n padding-bottom: 16px;\n}\n\n@media (min-width: 800px) {\n :host([size=\"large\"]) .content-area {\n width: 75%;\n }\n}\n\n@media (max-width: 576px) {\n .dialog {\n width: 100vw;\n height: 100vh;\n transform: translateY(-5rem);\n max-width: none;\n max-height: none;\n box-sizing: border-box;\n }\n\n .backdrop {\n padding: 0;\n }\n\n .dialog.disable-height-constraint {\n height: auto;\n min-height: 100vh;\n }\n}\n\n@media (max-width: 364px) {\n .triple-button {\n flex-direction: column;\n gap: var(--ic-space-xs);\n }\n\n .dialog-control-button {\n width: unset;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, checkResizeObserver, isPropDefined, } from \"../../utils/helpers\";\n/**\n * @slot dialog-controls - Content will be place at the bottom of the dialog.\n * @slot heading - Content will be placed at the top of the dialog.\n * @slot label - Content will be placed above the dialog heading.\n * @slot alert - Content will be placed at the top of the content area of the dialog.\n */\nexport class Dialog {\n constructor() {\n this.DATA_GETS_FOCUS = \"data-gets-focus\";\n this.DATA_GETS_FOCUS_SELECTOR = \"[data-gets-focus]\";\n this.DIALOG_CONTROLS = \"dialog-controls\";\n this.dialogHeight = 0;\n this.focusedElementIndex = 0;\n this.IC_TEXT_FIELD = \"IC-TEXT-FIELD\";\n this.IC_ACCORDION = \"IC-ACCORDION\";\n this.resizeObserver = null;\n this.dialogOpened = () => {\n this.dialogRendered = true;\n if (this.disableHeightConstraint) {\n this.dialogEl.show();\n }\n else {\n this.dialogEl.showModal();\n }\n setTimeout(() => {\n this.fadeIn = true;\n /**\n * This is required to set scroll back to top if:\n * - dialog content goes below the fold\n * - is closed using cancel or confirm and reopened.\n *\n * Without this, the scroll bar will start from the dialog's last scroll-x coordinate.\n */\n if (this.disableHeightConstraint && this.backdropEl.scrollTop !== 0) {\n this.backdropEl.scrollTop = 0;\n }\n }, 10);\n setTimeout(() => {\n this.setInitialFocus();\n checkResizeObserver(this.runResizeObserver);\n }, 75);\n setTimeout(() => {\n this.getFocusedElementIndex();\n this.icDialogOpened.emit();\n }, 80);\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = window.setTimeout(this.resizeObserverCallback, 80);\n });\n this.resizeObserver.observe(this.dialogEl);\n };\n this.resizeObserverCallback = () => {\n if (this.dialogEl.clientHeight !== this.dialogHeight) {\n this.dialogHeight = this.dialogEl.clientHeight;\n }\n };\n this.refreshInteractiveElementsOnSlotChange = () => {\n this.contentArea = this.el.shadowRoot.querySelector(\"#dialog-content slot\");\n this.contentArea.addEventListener(\"slotchange\", this.getInteractiveElements);\n };\n this.removeSlotChangeListener = () => {\n if (this.contentArea) {\n this.contentArea.removeEventListener(\"slotchange\", this.getInteractiveElements);\n }\n };\n this.setInitialFocus = () => {\n this.sourceElement = document.activeElement;\n let focusedElement;\n if (this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR) !== null) {\n focusedElement = this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR);\n }\n else {\n focusedElement = this.el.shadowRoot.querySelector(this.DATA_GETS_FOCUS_SELECTOR);\n }\n if (focusedElement.tagName === this.IC_TEXT_FIELD) {\n focusedElement.setFocus();\n }\n else if (focusedElement.tagName === this.IC_ACCORDION) {\n focusedElement.setFocus();\n }\n else {\n focusedElement.focus({\n preventScroll: this.disableHeightConstraint ? true : false,\n });\n }\n };\n this.getFocusedElementIndex = () => {\n for (let i = 0; i < this.interactiveElementList.length; i++) {\n if (this.interactiveElementList[i] ===\n (this.el.shadowRoot.activeElement || document.activeElement)) {\n this.focusedElementIndex = i;\n }\n }\n };\n this.setAlertVariant = () => {\n if (isPropDefined(this.status) && this.status !== null) {\n const alert = this.el.shadowRoot.querySelector(\"ic-alert\");\n alert.setAttribute(\"variant\", this.status);\n }\n };\n this.closeIconClick = () => {\n this.open = false;\n };\n this.getInteractiveElements = () => {\n this.interactiveElementList = Array.from(this.el.shadowRoot.querySelectorAll(\"ic-button\"));\n const slottedInteractiveElements = Array.from(this.el.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), \n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-group, ic-radio-group, \n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible=\"true\"], ic-footer-link, ic-link, ic-navigation-button, \n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion`));\n if (slottedInteractiveElements.length > 0) {\n if (slottedInteractiveElements[0].slot !== this.DIALOG_CONTROLS) {\n slottedInteractiveElements[0].setAttribute(this.DATA_GETS_FOCUS, \"\");\n }\n else if (!this.destructive) {\n slottedInteractiveElements[slottedInteractiveElements.length - 1].setAttribute(this.DATA_GETS_FOCUS, \"\");\n }\n }\n for (let i = 0; i < slottedInteractiveElements.length; i++) {\n this.interactiveElementList.splice(1 + i, 0, slottedInteractiveElements[i]);\n }\n };\n this.getNextFocusEl = (focusedElementIndex) => this.interactiveElementList[focusedElementIndex];\n this.focusNextInteractiveElement = (shiftKey) => {\n this.getFocusedElementIndex();\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n let nextFocusEl = this.getNextFocusEl(this.focusedElementIndex);\n const isHidden = getComputedStyle(nextFocusEl).visibility === \"hidden\";\n if (nextFocusEl.tagName === this.IC_TEXT_FIELD) {\n nextFocusEl.setFocus();\n }\n else {\n if (isHidden) {\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n nextFocusEl = this.getNextFocusEl(this.focusedElementIndex);\n }\n if (nextFocusEl.tagName === this.IC_ACCORDION) {\n nextFocusEl.setFocus();\n }\n else {\n nextFocusEl.focus();\n }\n }\n };\n this.setButtonOnClick = () => {\n var _a, _b, _c;\n if (this.buttons) {\n this.buttonOnclick0 = new Function((_a = this.buttonProps[0]) === null || _a === void 0 ? void 0 : _a.onclick);\n this.buttonOnclick1 = new Function((_b = this.buttonProps[1]) === null || _b === void 0 ? void 0 : _b.onclick);\n this.buttonOnclick2 = new Function((_c = this.buttonProps[2]) === null || _c === void 0 ? void 0 : _c.onclick);\n }\n };\n this.getButtonOnclick = (index) => {\n if (index === 0) {\n return this.buttonOnclick0();\n }\n else if (index === 1) {\n return this.buttonOnclick1();\n }\n else {\n return this.buttonOnclick2();\n }\n };\n this.getButtonVariant = (index) => {\n const mainVariant = this.destructive ? \"destructive\" : \"primary\";\n if (this.buttonProps.length === 1) {\n return mainVariant;\n }\n else if (this.buttonProps.length === 2) {\n if (index === 0) {\n return \"tertiary\";\n }\n else {\n return mainVariant;\n }\n }\n else {\n if (index === 2) {\n return mainVariant;\n }\n else {\n return \"secondary\";\n }\n }\n };\n this.renderDialog = () => {\n const { alertHeading, alertMessage, buttons, buttonProps, size, heading, label, status, destructive, dismissLabel, hideCloseButton, } = this;\n return (h(\"dialog\", { class: {\n [\"dialog\"]: true,\n [`${size}`]: true,\n [\"disable-height-constraint\"]: this.disableHeightConstraint,\n }, \"aria-labelledby\": \"dialog-label dialog-heading\", \"aria-describedby\": \"dialog-alert dialog-content\", ref: (el) => (this.dialogEl = el) }, h(\"div\", { class: \"heading-area\" }, h(\"div\", { class: \"heading-content\" }, h(\"div\", { class: \"label\" }, h(\"slot\", { name: \"label\" }, h(\"ic-typography\", { variant: \"label\", id: \"dialog-label\" }, label))), h(\"div\", { class: \"heading\" }, h(\"slot\", { name: \"heading\" }, h(\"ic-typography\", { variant: \"h4\", id: \"dialog-heading\" }, heading)))), !hideCloseButton && (h(\"ic-button\", { class: \"close-icon\", variant: \"icon\", innerHTML: closeIcon, \"aria-label\": dismissLabel, onClick: this.closeIconClick, \"data-gets-focus\": destructive || !buttons ? \"\" : null }))), h(\"div\", { class: \"content-area\" }, isSlotUsed(this.el, \"alert\") ? (h(\"slot\", { name: \"alert\" })) : (status && (h(\"ic-alert\", { variant: status, heading: alertHeading, message: alertMessage, \"title-above\": true, class: \"status-alert\", id: \"dialog-alert\" }))), h(\"div\", { id: \"dialog-content\" }, h(\"slot\", null))), (buttons || isSlotUsed(this.el, this.DIALOG_CONTROLS)) && (h(\"div\", { class: {\n [this.DIALOG_CONTROLS]: true,\n [\"triple-button\"]: buttonProps.length === 3,\n } }, h(\"slot\", { name: this.DIALOG_CONTROLS }, !isSlotUsed(this.el, this.DIALOG_CONTROLS) &&\n buttonProps.map((props, index) => {\n if (index > 2) {\n return;\n }\n else {\n return (h(\"ic-button\", { variant: this.getButtonVariant(index), onClick: () => this.getButtonOnclick(index), class: \"dialog-control-button\", \"full-width\": buttonProps.length === 3, \"data-gets-focus\": this.getButtonVariant(index) === \"primary\" ? \"\" : null }, props.label));\n }\n }))))));\n };\n this.dialogRendered = false;\n this.fadeIn = false;\n this.alertHeading = undefined;\n this.alertMessage = undefined;\n this.buttons = true;\n this.closeOnBackdropClick = true;\n this.destructive = false;\n this.dismissLabel = \"Dismiss\";\n this.disableHeightConstraint = false;\n this.hideCloseButton = false;\n this.heading = undefined;\n this.label = undefined;\n this.open = undefined;\n this.size = \"small\";\n this.status = undefined;\n this.buttonProps = [\n {\n label: \"Cancel\",\n onclick: \"this.cancelDialog();\",\n },\n { label: \"Confirm\", onclick: \"this.confirmDialog();\" },\n ];\n }\n watchOpenHandler() {\n if (this.open) {\n this.dialogOpened();\n }\n else {\n this.fadeIn = false;\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n setTimeout(() => {\n var _a;\n this.dialogRendered = false;\n this.dialogEl.close();\n (_a = this.sourceElement) === null || _a === void 0 ? void 0 : _a.focus();\n this.dialogHeight = 0;\n this.icDialogClosed.emit();\n }, 80);\n }\n }\n watchPropHandler() {\n this.setButtonOnClick();\n }\n disconnectedCallback() {\n this.removeSlotChangeListener();\n }\n componentWillLoad() {\n if (this.buttonProps.length) {\n this.setButtonOnClick();\n }\n }\n componentDidLoad() {\n this.getInteractiveElements();\n this.setAlertVariant();\n this.refreshInteractiveElementsOnSlotChange();\n if (this.open) {\n this.dialogOpened();\n }\n }\n componentDidRender() {\n if (getComputedStyle(this.el).display !== \"none\" &&\n this.disableHeightConstraint) {\n document.body.style.overflow = \"hidden\";\n }\n else {\n document.body.style.overflow = \"auto\";\n }\n }\n handleKeyboard(ev) {\n if (this.dialogRendered) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.focusNextInteractiveElement(ev.shiftKey);\n break;\n case \"Escape\":\n if (!ev.repeat) {\n this.open = false;\n }\n ev.stopImmediatePropagation();\n break;\n }\n }\n }\n handleClick(ev) {\n const dialogElement = this.el.shadowRoot.querySelector(\"dialog\");\n if (this.closeOnBackdropClick &&\n ev.composedPath().indexOf(dialogElement) <= 0) {\n const rect = this.dialogEl.getBoundingClientRect();\n const isInDialog = rect.top <= ev.clientY &&\n ev.clientY <= rect.top + rect.height &&\n rect.left <= ev.clientX &&\n ev.clientX <= rect.left + rect.width;\n if (!isInDialog) {\n this.open = false;\n }\n }\n }\n /**\n * @deprecated This method should not be used anymore. Use open prop to set dialog visibility.\n */\n async showDialog() {\n this.open = true;\n }\n /**\n * @deprecated This method should not be used anymore. Use open prop to set dialog visibility.\n */\n async hideDialog() {\n this.open = false;\n }\n /**\n * Cancels the dialog. Used by the default 'Cancel' button or can be called manually to trigger cancelling of dialog.\n */\n async cancelDialog() {\n this.icDialogCancelled.emit();\n this.open = false;\n }\n /**\n * Confirms the dialog. Used by the default 'Confirm' button or can be called manually to trigger confirming of dialog.\n */\n async confirmDialog() {\n this.icDialogConfirmed.emit();\n }\n loopNextFocusIndexIfLastElement() {\n if (this.focusedElementIndex > this.interactiveElementList.length - 1)\n this.focusedElementIndex = 0;\n else if (this.focusedElementIndex < 0) {\n this.focusedElementIndex = this.interactiveElementList.length - 1;\n }\n }\n setFocusIndexBasedOnShiftKey(shiftKey) {\n if (shiftKey) {\n this.focusedElementIndex -= 1;\n }\n else {\n this.focusedElementIndex += 1;\n }\n }\n render() {\n return (h(Host, { class: {\n [\"hidden\"]: !this.dialogRendered,\n [\"fade-in\"]: this.fadeIn,\n [\"disable-height-constraint\"]: this.disableHeightConstraint,\n } }, this.disableHeightConstraint ? (h(\"div\", { class: \"backdrop\", ref: (el) => (this.backdropEl = el) }, this.renderDialog())) : (this.renderDialog())));\n }\n static get is() { return \"ic-dialog\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-dialog.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-dialog.css\"]\n };\n }\n static get properties() {\n return {\n \"alertHeading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Use an ic-alert/IcAlert component within an alert slot with a heading instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"alert-heading\",\n \"reflect\": false\n },\n \"alertMessage\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Use an ic-alert/IcAlert component within an alert slot with a message instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"alert-message\",\n \"reflect\": false\n },\n \"buttons\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If set to `false`, dialog controls will not be displayed overriding buttonProps or slotted dialog controls.\"\n },\n \"attribute\": \"buttons\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"closeOnBackdropClick\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If set to `true`, the dialog will not close when the backdrop is clicked.\"\n },\n \"attribute\": \"close-on-backdrop-click\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"destructive\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If default buttons are displayed, sets the 'primary' or rightmost button to the destructive variant. Stops initial focus being set on the 'primary' or rightmost default or slotted button.\"\n },\n \"attribute\": \"destructive\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"dismissLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the dismiss label tooltip and aria label.\"\n },\n \"attribute\": \"dismiss-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Dismiss\\\"\"\n },\n \"disableHeightConstraint\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If set to `true`, the content area max height and overflow properties are removed allowing the dialog to stretch below the fold.\\nThis prop also prevents popover elements from being cut off within the content area.\"\n },\n \"attribute\": \"disable-height-constraint\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"hideCloseButton\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the close button will not be displayed.\"\n },\n \"attribute\": \"hide-close-button\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\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\": \"Sets the heading for the dialog.\"\n },\n \"attribute\": \"heading\",\n \"reflect\": false\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the optional label for the dialog which appears above the heading.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"open\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the dialog will be displayed.\"\n },\n \"attribute\": \"open\",\n \"reflect\": true,\n \"defaultValue\": \"undefined\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"small\\\" | \\\"medium\\\" | \\\"large\\\"\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the maximum and minimum height and width for the dialog.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"small\\\"\"\n },\n \"status\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"neutral\\\" | \\\"info\\\" | \\\"warning\\\" | \\\"error\\\" | \\\"success\\\"\",\n \"resolved\": \"\\\"error\\\" | \\\"info\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Use an ic-alert/IcAlert component within an alert slot with a variant instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"status\",\n \"reflect\": false\n },\n \"buttonProps\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"{ label: string; onclick: string }[]\",\n \"resolved\": \"{ label: string; onclick: string; }[]\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the label and onclick functions for default buttons.\"\n },\n \"defaultValue\": \"[\\n {\\n label: \\\"Cancel\\\",\\n onclick: \\\"this.cancelDialog();\\\",\\n },\\n { label: \\\"Confirm\\\", onclick: \\\"this.confirmDialog();\\\" },\\n ]\"\n }\n };\n }\n static get states() {\n return {\n \"dialogRendered\": {},\n \"fadeIn\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDialogCancelled\",\n \"name\": \"icDialogCancelled\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Cancelation event emitted when default 'Cancel' button clicked or 'cancelDialog' method is called.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icDialogClosed\",\n \"name\": \"icDialogClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when dialog has closed.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icDialogConfirmed\",\n \"name\": \"icDialogConfirmed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Confirmation event emitted when default 'Confirm' primary button clicked or 'confirmDialog' method is called.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icDialogOpened\",\n \"name\": \"icDialogOpened\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when dialog has opened.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"showDialog\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use open prop to set dialog visibility.\"\n }]\n }\n },\n \"hideDialog\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use open prop to set dialog visibility.\"\n }]\n }\n },\n \"cancelDialog\": {\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\": \"Cancels the dialog. Used by the default 'Cancel' button or can be called manually to trigger cancelling of dialog.\",\n \"tags\": []\n }\n },\n \"confirmDialog\": {\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\": \"Confirms the dialog. Used by the default 'Confirm' button or can be called manually to trigger confirming of dialog.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"open\",\n \"methodName\": \"watchOpenHandler\"\n }, {\n \"propName\": \"buttonProps\",\n \"methodName\": \"watchPropHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"keydown\",\n \"method\": \"handleKeyboard\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"click\",\n \"method\": \"handleClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-dialog.js.map\n"],"mappings":"8KAAA,MAAMA,EAAc,i0J,MCSPC,EAAM,MACf,WAAAC,CAAAC,G,kNACIC,KAAKC,gBAAkB,kBACvBD,KAAKE,yBAA2B,oBAChCF,KAAKG,gBAAkB,kBACvBH,KAAKI,aAAe,EACpBJ,KAAKK,oBAAsB,EAC3BL,KAAKM,cAAgB,gBACrBN,KAAKO,aAAe,eACpBP,KAAKQ,eAAiB,KACtBR,KAAKS,aAAe,KAChBT,KAAKU,eAAiB,KACtB,GAAIV,KAAKW,wBAAyB,CAC9BX,KAAKY,SAASC,M,KAEb,CACDb,KAAKY,SAASE,W,CAElBC,YAAW,KACPf,KAAKgB,OAAS,KAQd,GAAIhB,KAAKW,yBAA2BX,KAAKiB,WAAWC,YAAc,EAAG,CACjElB,KAAKiB,WAAWC,UAAY,C,IAEjC,IACHH,YAAW,KACPf,KAAKmB,kBACLC,EAAoBpB,KAAKqB,kBAAkB,GAC5C,IACHN,YAAW,KACPf,KAAKsB,yBACLtB,KAAKuB,eAAeC,MAAM,GAC3B,GAAG,EAEVxB,KAAKqB,kBAAoB,KACrBrB,KA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AYV,KAAKgB,OAClB,CAAC,6BAA8BhB,KAAKW,0BACnCX,KAAKW,wBAA2BuF,EAAE,MAAO,CAAEC,MAAO,WAAYC,IAAMlE,GAAQlC,KAAKiB,WAAaiB,GAAOlC,KAAK0F,gBAAoB1F,KAAK0F,e"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as i,h as e,g as s}from"./p-8455d1bb.js";const a=t=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){t()}};const n=t=>getComputedStyle(document.documentElement).getPropertyValue(t);({XS:Number(n("--ic-breakpoint-xs").replace("px","")),S:Number(n("--ic-breakpoint-sm").replace("px","")),M:Number(n("--ic-breakpoint-md").replace("px","")),L:Number(n("--ic-breakpoint-lg").replace("px","")),XL:Number(n("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200});const l=":host(){display:block}.pagination-bar{height:3.5rem;display:flex;align-items:center;justify-content:flex-end;gap:var(--ic-space-xl);padding:var(--ic-space-xs) var(--ic-space-md);box-sizing:border-box}.pagination-bar-left{justify-content:flex-start}.item-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-bar-space-between .item-controls{margin-right:auto}.items-per-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.items-per-page-input{--input-width:5rem}.pagination-controls{display:flex;align-items:center;gap:var(--ic-space-xl)}.pagination-controls-wrap{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-space-between .pagination-controls{margin-left:auto}.go-to-page-holder{display:flex;align-items:center;gap:var(--ic-space-xs)}.go-to-page-input{--input-width:var(--ic-space-xl)}.go-to-page-button{--min-width:var(--ic-space-xl)}.pagination-text-default,.pagination-text-dark,.pagination-text-light{white-space:nowrap}.pagination-text-light{color:var(--ic-color-white-text)}@media screen and (max-width: 768px){.pagination-bar{flex-direction:column;align-items:flex-end;height:-moz-fit-content;height:fit-content;gap:var(--ic-space-xs)}.pagination-bar-left{align-items:flex-start}}@media screen and (max-width: 320px){.item-controls,.pagination-controls{flex-direction:column;align-items:flex-end;gap:var(--ic-space-xs)}.pagination-bar-left .item-controls,.pagination-bar-left .pagination-controls,.pagination-bar-space-between .item-controls,.pagination-bar-space-between .pagination-controls{align-items:flex-start}}";const o=class{constructor(e){t(this,e);this.icPageChange=i(this,"icPageChange",7);this.icItemsPerPageChange=i(this,"icItemsPerPageChange",7);this.PAGINATION="ic-pagination";this.TEXT_FIELD="ic-text-field";this.TOOLTIP="ic-tooltip";this.PAGE_INPUT_FIELD_ID="go-to-page-input";this.INVALID_PAGE_ERROR="Please enter a valid page";this.NAN_ERROR="Please enter a number";this.resizeObserver=null;this.changeItemsPerPage=()=>{const t=this.el.shadowRoot.querySelector("ic-select");const i=t.value;this.itemsPerPage=i;this.setNumberPages();this.setUpperBound();const e=this.el.shadowRoot.querySelector(this.PAGINATION);if(this.currentPage>this.totalPages){e.setCurrentPage(this.totalPages);this.currentPage=this.totalPages}this.icItemsPerPageChange.emit({value:Number(this.itemsPerPage)});this.icPageChange.emit({value:this.currentPage})};this.changePage=t=>{this.currentPage=t;this.lowerBound=t!==1?(t-1)*Number(this.itemsPerPage)+1:t;this.setUpperBound()};this.goToPage=()=>{const t=this.el.shadowRoot.querySelector(this.TEXT_FIELD);const i=Number(t.value);const e=this.el.shadowRoot.querySelector("ic-tooltip");if(i<=this.totalPages&&i>0){this.changePage(i);const s=this.el.shadowRoot.querySelector(this.PAGINATION);s.setCurrentPage(i);this.currentPage=i;t.value="";this.icPageChange.emit({value:i});e.displayTooltip(false,false);t.validationStatus=""}else{this.inputError=this.INVALID_PAGE_ERROR;t.validationStatus="error";t.setFocus()}};this.handleBlur=()=>{var t,i;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(this.TEXT_FIELD);const s=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector(this.TOOLTIP);if(Number(e.value)<=this.totalPages&&Number(e.value)>0||e.value===""){e.validationStatus=""}s.displayTooltip(false,false)};this.handleFocus=()=>{var t,i;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(this.TEXT_FIELD);const s=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector(this.TOOLTIP);if(e.validationStatus==="error"){s.displayTooltip(true,true)}};this.handleInputChange=()=>{const t=this.el.shadowRoot.querySelector(this.TOOLTIP);const i=this.el.shadowRoot.querySelector(this.TEXT_FIELD);const e=parseInt(i.value);if(e>this.totalPages||e<=0){this.inputError=this.INVALID_PAGE_ERROR;t.displayTooltip(true,true);i.validationStatus="error";i.focus()}};this.handleKeydown=t=>{const i=this.el.shadowRoot.querySelector(this.TOOLTIP);const e=this.el.shadowRoot.querySelector(this.TEXT_FIELD);if(t.key==="Enter"){if(e.validationStatus==="error"){i.displayTooltip(true,true)}else{this.goToPage()}}else{i.displayTooltip(false,false);e.validationStatus=""}};this.handleKeyUp=t=>{const i=this.el.shadowRoot.querySelector(this.TOOLTIP);const e=this.el.shadowRoot.querySelector(this.TEXT_FIELD);const s=parseInt(e.value);if(Number.isNaN(s)&&t.key!=="Backspace"&&t.key!=="Enter"&&t.key!=="Tab"&&t.key!=="Shift"){this.inputError=this.NAN_ERROR;i.displayTooltip(true,false);e.validationStatus="error"}};this.paginationShouldWrap=()=>{const t=this.el.shadowRoot.querySelector(this.PAGINATION);if(this.paginationControl==="simple"){if(t.clientHeight>63){this.paginationWrapped=true}else{this.paginationWrapped=false}}};this.resizeObserverCallback=t=>{if(t-this.paginationWidth>50||t-this.paginationWidth<-50){this.paginationWidth=t;this.paginationShouldWrap()}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const t=this.paginationBarEl.clientWidth;this.resizeObserverCallback(t)}));this.resizeObserver.observe(this.paginationBarEl)};this.setDefaultItemsPerPage=()=>{this.itemsPerPage=this.itemsPerPageOptions[0].value};this.setDefaultItemsPerPageOptions=()=>{this.itemsPerPageOptions=this.totalItems<=100?[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"},{label:"All",value:String(this.totalItems)}]:[{label:"25",value:"25"},{label:"100",value:"100"},{label:"1000",value:"1000"},{label:"All",value:String(this.totalItems)}]};this.setGoToPageInputStyles=()=>{var t,i;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(`.${this.PAGE_INPUT_FIELD_ID}`);if(e!==undefined){const t=(i=e===null||e===void 0?void 0:e.shadowRoot)===null||i===void 0?void 0:i.querySelector("input");if(t!==undefined){t.style.textAlign="center";t.style.padding="0"}}};this.setNumberPages=()=>{this.totalPages=Math.ceil(this.totalItems/Number(this.itemsPerPage))};this.setUpperBound=()=>{this.upperBound=Math.min(this.lowerBound+Number(this.itemsPerPage)-1,this.totalItems)};this.trimItemsPerPageOptions=()=>{this.itemsPerPageOptions=this.itemsPerPageOptions.slice(0,3);this.itemsPerPageOptions.push({label:"All",value:String(this.totalItems)});for(let t=0;t<this.itemsPerPageOptions.length-1;t++){if(this.totalItems<=Number(this.itemsPerPageOptions[t].value)){this.itemsPerPageOptions.splice(t,this.itemsPerPageOptions.length-(t+1))}}};this.currentPage=1;this.inputError="Please enter a valid page";this.itemsPerPage=undefined;this.lowerBound=1;this.paginationWidth=undefined;this.paginationWrapped=false;this.totalPages=undefined;this.upperBound=undefined;this.alignment="right";this.appearance="default";this.itemLabel="Item";this.itemsPerPageOptions=undefined;this.paginationControl="simple";this.paginationType="page";this.pageLabel="Page";this.showGoToPageControl=false;this.showItemsPerPage=true;this.showItemsPerPageControl=false;this.totalItems=undefined}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){if(this.itemsPerPageOptions===undefined||this.itemsPerPageOptions===null){this.setDefaultItemsPerPageOptions()}this.trimItemsPerPageOptions();this.setDefaultItemsPerPage();this.setNumberPages();this.setUpperBound()}componentDidLoad(){this.paginationWidth=this.paginationBarEl.clientWidth;a(this.runResizeObserver);this.setGoToPageInputStyles();this.paginationShouldWrap()}pageChangeHandler(t){const i=t.detail.value;this.changePage(i)}render(){const{appearance:t,alignment:i,itemsPerPageOptions:s,PAGE_INPUT_FIELD_ID:a,paginationControl:n,paginationType:l,showItemsPerPage:o,showItemsPerPageControl:h,showGoToPageControl:r}=this;const c=t=>{var i;(i=this.paginationBarEl.querySelector(t))===null||i===void 0?void 0:i.setFocus()};return e("div",{class:{["pagination-bar"]:true,[`pagination-bar-${i}`]:true},ref:t=>this.paginationBarEl=t},(o||h)&&e("div",{class:"item-controls"},h&&e("div",{class:"items-per-page-holder"},e("ic-typography",{class:{[`pagination-text-${t}`]:true,["items-per-page-control-label"]:true},variant:"label",onClick:()=>c("ic-select")},this.itemLabel,"s per ",this.pageLabel.toLowerCase()),e("ic-select",{small:true,label:"items-per-page-input",class:"items-per-page-input",hideLabel:true,options:s,value:this.itemsPerPage,onIcChange:()=>this.changeItemsPerPage()})),o&&l==="data"?e("ic-typography",{class:{[`pagination-text-${t}`]:true,["item-pagination-label"]:true},variant:"label","aria-live":"polite"},this.lowerBound," - ",this.upperBound," of ",this.totalItems," ",this.itemLabel.toLowerCase(),this.totalItems>1?"s":""):o&&e("ic-typography",{class:{[`pagination-text-${t}`]:true,["page-pagination-label"]:true},variant:"label","aria-live":"polite"},this.pageLabel," ",this.currentPage," of ",this.totalPages)),e("div",{class:{["pagination-controls"]:true,["pagination-controls-wrap"]:this.paginationWrapped}},e("div",{class:"pagination-holder"},e("ic-pagination",{appearance:t,type:n,pages:this.totalPages})),r&&e("div",{class:"go-to-page-holder"},e("ic-typography",{class:{[`pagination-text-${t}`]:true},variant:"label",onClick:()=>c("ic-text-field")},"Go to ",this.pageLabel.toLowerCase()),e("ic-tooltip",{label:this.inputError,target:`#${a}`,disableHover:true,disableClick:true},e("ic-text-field",{type:"number",size:"small",label:a,class:a,id:a,hideLabel:true,onKeyDown:t=>this.handleKeydown(t),onKeyUp:t=>this.handleKeyUp(t),onInput:()=>this.handleInputChange(),max:this.totalPages,min:"1",validationInlineInternal:true,onBlur:()=>this.handleBlur(),onFocus:()=>this.handleFocus()})),e("ic-button",{appearance:t,variant:"secondary",onClick:()=>this.goToPage(),size:"small",class:"go-to-page-button"},"Go"))))}get el(){return s(this)}};o.style=l;export{o as ic_pagination_bar};
|
2
|
-
//# sourceMappingURL=p-9fdd7d73.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["checkResizeObserver","callbackFn","window","ResizeObserver","getCssProperty","cssVar","getComputedStyle","document","documentElement","getPropertyValue","XS","Number","replace","S","M","L","XL","UNDEFINED","icPaginationBarCss","PaginationBar","this","PAGINATION","TEXT_FIELD","TOOLTIP","PAGE_INPUT_FIELD_ID","INVALID_PAGE_ERROR","NAN_ERROR","resizeObserver","changeItemsPerPage","select","el","shadowRoot","querySelector","value","itemsPerPage","setNumberPages","setUpperBound","pagination","currentPage","totalPages","setCurrentPage","icItemsPerPageChange","emit","icPageChange","changePage","page","lowerBound","goToPage","input","tooltip","displayTooltip","validationStatus","inputError","setFocus","handleBlur","textField","_a","_b","handleFocus","handleInputChange","inputValue","parseInt","focus","handleKeydown","ev","key","handleKeyUp","isNaN","paginationShouldWrap","paginationControl","clientHeight","paginationWrapped","resizeObserverCallback","currSize","paginationWidth","runResizeObserver","paginationBarEl","clientWidth","observe","setDefaultItemsPerPage","itemsPerPageOptions","setDefaultItemsPerPageOptions","totalItems","label","String","setGoToPageInputStyles","undefined","style","textAlign","padding","Math","ceil","upperBound","min","trimItemsPerPageOptions","slice","push","i","length","splice","disconnectedCallback","disconnect","componentWillLoad","componentDidLoad","pageChangeHandler","detail","render","appearance","alignment","paginationType","showItemsPerPage","showItemsPerPageControl","showGoToPageControl","focusElFromLabel","h","class","ref","variant","onClick","itemLabel","pageLabel","toLowerCase","small","hideLabel","options","onIcChange","type","pages","target","disableHover","disableClick","size","id","onKeyDown","onKeyUp","onInput","max","validationInlineInternal","onBlur","onFocus"],"sources":["src/utils/helpers.ts","src/components/ic-pagination-bar/ic-pagination-bar.css?tag=ic-pagination-bar&encapsulation=shadow","src/components/ic-pagination-bar/ic-pagination-bar.tsx"],"sourcesContent":["import { IcCallbackFunctionNoReturn } from \"@ukic/web-components\";\n\n// Build does not recognise this function being passed via @ukic/web-components so it has been added locally\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n",":host() {\n display: block;\n}\n\n.pagination-bar {\n height: 3.5rem;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--ic-space-xl);\n padding: var(--ic-space-xs) var(--ic-space-md);\n box-sizing: border-box;\n}\n\n.pagination-bar-left {\n justify-content: flex-start;\n}\n\n.item-controls {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xl);\n}\n\n.pagination-bar-space-between .item-controls {\n margin-right: auto;\n}\n\n.items-per-page-holder {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n.items-per-page-input {\n --input-width: 5rem;\n}\n\n.pagination-controls {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xl);\n}\n\n.pagination-controls-wrap {\n flex-direction: column;\n align-items: flex-end;\n gap: var(--ic-space-xs);\n}\n\n.pagination-bar-space-between .pagination-controls {\n margin-left: auto;\n}\n\n.go-to-page-holder {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n.go-to-page-input {\n --input-width: var(--ic-space-xl);\n}\n\n.go-to-page-button {\n --min-width: var(--ic-space-xl);\n}\n\n.pagination-text-default,\n.pagination-text-dark,\n.pagination-text-light {\n white-space: nowrap;\n}\n\n.pagination-text-light {\n color: var(--ic-color-white-text);\n}\n\n@media screen and (max-width: 768px) {\n .pagination-bar {\n flex-direction: column;\n align-items: flex-end;\n height: fit-content;\n gap: var(--ic-space-xs);\n }\n\n .pagination-bar-left {\n align-items: flex-start;\n }\n}\n\n@media screen and (max-width: 320px) {\n .item-controls,\n .pagination-controls {\n flex-direction: column;\n align-items: flex-end;\n gap: var(--ic-space-xs);\n }\n\n .pagination-bar-left .item-controls,\n .pagination-bar-left .pagination-controls,\n .pagination-bar-space-between .item-controls,\n .pagination-bar-space-between .pagination-controls {\n align-items: flex-start;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Listen,\n h,\n} from \"@stencil/core\";\nimport { IcThemeForeground } from \"@ukic/web-components/dist/types/interface\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\nimport {\n IcPaginationAlignmentOptions,\n IcPaginationControlTypes,\n IcPaginationTypes,\n} from \"../ic-pagination/ic-pagination.types\";\n\n@Component({\n tag: \"ic-pagination-bar\",\n styleUrl: \"ic-pagination-bar.css\",\n shadow: true,\n})\nexport class PaginationBar {\n private PAGINATION = \"ic-pagination\";\n private TEXT_FIELD = \"ic-text-field\";\n private TOOLTIP = \"ic-tooltip\";\n private PAGE_INPUT_FIELD_ID = \"go-to-page-input\";\n\n private INVALID_PAGE_ERROR = \"Please enter a valid page\";\n private NAN_ERROR = \"Please enter a number\";\n\n private resizeObserver: ResizeObserver = null;\n private paginationBarEl: HTMLElement;\n\n @Element() el: HTMLIcPaginationBarElement;\n\n @State() currentPage: number = 1;\n\n @State() inputError: string = \"Please enter a valid page\";\n\n @State() itemsPerPage: string;\n\n @State() lowerBound: number = 1;\n\n @State() paginationWidth: number;\n\n @State() paginationWrapped: boolean = false;\n\n @State() totalPages: number;\n\n @State() upperBound: number;\n\n /**\n * Sets the alignment of the items in the pagination bar.\n */\n @Prop() alignment?: IcPaginationAlignmentOptions = \"right\";\n\n /**\n * Sets the styling for the items in the pagination bar.\n */\n @Prop() appearance?: IcThemeForeground = \"default\";\n\n /**\n * The label which will be used in place of 'items' if paginationType is data. Should be capitalised.\n */\n @Prop() itemLabel?: string = \"Item\";\n\n /**\n * The options which will be displayed for 'items per page' select input. Set a maximum of 4 options including a required 'All' option with value equal to total number of items.\n */\n @Prop({ mutable: true }) itemsPerPageOptions?: {\n label: string;\n value: string;\n }[];\n\n /**\n * Whether the displayed pagination is simple or complex.\n */\n @Prop() paginationControl?: IcPaginationControlTypes = \"simple\";\n\n /**\n * Whether total number of items and current item range or total number of pages and current page is displayed.\n */\n @Prop() paginationType?: IcPaginationTypes = \"page\";\n\n /**\n * The label which will be used in place of 'Page' if paginationType is page. Should be capitalised.\n */\n @Prop() pageLabel?: string = \"Page\";\n\n /**\n * If `true`, the 'go to page' control should be displayed.\n */\n @Prop() showGoToPageControl?: boolean = false;\n\n /**\n * If `true`, the number of total items and current item range or number of total pages and current page should be displayed.\n */\n @Prop() showItemsPerPage?: boolean = true;\n\n /**\n * If `true`, the select input to control 'items per page' should be displayed.\n */\n @Prop() showItemsPerPageControl?: boolean = false;\n\n /**\n * Total number of items to be displayed across all pages.\n */\n @Prop() totalItems!: number;\n\n /**\n * Emitted when a page is navigated to via the 'go to' input.\n */\n @Event() icPageChange: EventEmitter<{ value: number }>;\n\n /**\n * Emitted when the items per page option is changed.\n */\n @Event() icItemsPerPageChange: EventEmitter<{ value: number }>;\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad(): void {\n if (\n this.itemsPerPageOptions === undefined ||\n this.itemsPerPageOptions === null\n ) {\n this.setDefaultItemsPerPageOptions();\n }\n this.trimItemsPerPageOptions();\n this.setDefaultItemsPerPage();\n this.setNumberPages();\n this.setUpperBound();\n }\n\n componentDidLoad(): void {\n this.paginationWidth = this.paginationBarEl.clientWidth;\n checkResizeObserver(this.runResizeObserver);\n this.setGoToPageInputStyles();\n this.paginationShouldWrap();\n }\n\n @Listen(\"icPageChange\")\n pageChangeHandler(ev: CustomEvent): void {\n const page = ev.detail.value;\n this.changePage(page);\n }\n\n private changeItemsPerPage = () => {\n const select = this.el.shadowRoot.querySelector(\"ic-select\");\n const value = select.value;\n this.itemsPerPage = value;\n this.setNumberPages();\n this.setUpperBound();\n const pagination = this.el.shadowRoot.querySelector(\n this.PAGINATION\n ) as HTMLIcPaginationElement;\n if (this.currentPage > this.totalPages) {\n pagination.setCurrentPage(this.totalPages);\n this.currentPage = this.totalPages;\n }\n this.icItemsPerPageChange.emit({ value: Number(this.itemsPerPage) });\n this.icPageChange.emit({ value: this.currentPage });\n };\n\n private changePage = (page: number) => {\n this.currentPage = page;\n this.lowerBound =\n page !== 1 ? (page - 1) * Number(this.itemsPerPage) + 1 : page;\n this.setUpperBound();\n };\n\n private goToPage = () => {\n const input = this.el.shadowRoot.querySelector(\n this.TEXT_FIELD\n ) as HTMLIcTextFieldElement;\n const page = Number(input.value);\n const tooltip = this.el.shadowRoot.querySelector(\"ic-tooltip\");\n if (page <= this.totalPages && page > 0) {\n this.changePage(page);\n const pagination = this.el.shadowRoot.querySelector(\n this.PAGINATION\n ) as HTMLIcPaginationElement;\n pagination.setCurrentPage(page);\n this.currentPage = page;\n input.value = \"\";\n this.icPageChange.emit({ value: page });\n tooltip.displayTooltip(false, false);\n input.validationStatus = \"\";\n } else {\n this.inputError = this.INVALID_PAGE_ERROR;\n input.validationStatus = \"error\";\n input.setFocus();\n }\n };\n\n private handleBlur = () => {\n const textField = this.el.shadowRoot?.querySelector(\n this.TEXT_FIELD\n ) as HTMLIcTextFieldElement;\n const tooltip = this.el.shadowRoot?.querySelector(\n this.TOOLTIP\n ) as HTMLIcTooltipElement;\n if (\n (Number(textField.value) <= this.totalPages &&\n Number(textField.value) > 0) ||\n textField.value === \"\"\n ) {\n textField.validationStatus = \"\";\n }\n tooltip.displayTooltip(false, false);\n };\n\n private handleFocus = () => {\n const textField = this.el.shadowRoot?.querySelector(\n this.TEXT_FIELD\n ) as HTMLIcTextFieldElement;\n const tooltip = this.el.shadowRoot?.querySelector(\n this.TOOLTIP\n ) as HTMLIcTooltipElement;\n if (textField.validationStatus === \"error\") {\n tooltip.displayTooltip(true, true);\n }\n };\n\n private handleInputChange = () => {\n const tooltip = this.el.shadowRoot.querySelector(\n this.TOOLTIP\n ) as HTMLIcTooltipElement;\n const textField = this.el.shadowRoot.querySelector(\n this.TEXT_FIELD\n ) as HTMLIcTextFieldElement;\n const inputValue = parseInt(textField.value);\n\n if (inputValue > this.totalPages || inputValue <= 0) {\n this.inputError = this.INVALID_PAGE_ERROR;\n tooltip.displayTooltip(true, true);\n textField.validationStatus = \"error\";\n textField.focus();\n }\n };\n\n private handleKeydown = (ev: KeyboardEvent) => {\n const tooltip = this.el.shadowRoot.querySelector(\n this.TOOLTIP\n ) as HTMLIcTooltipElement;\n const textField = this.el.shadowRoot.querySelector(\n this.TEXT_FIELD\n ) as HTMLIcTextFieldElement;\n\n if (ev.key === \"Enter\") {\n if (textField.validationStatus === \"error\") {\n tooltip.displayTooltip(true, true);\n } else {\n this.goToPage();\n }\n } else {\n tooltip.displayTooltip(false, false);\n textField.validationStatus = \"\";\n }\n };\n\n private handleKeyUp = (ev: KeyboardEvent) => {\n const tooltip = this.el.shadowRoot.querySelector(\n this.TOOLTIP\n ) as HTMLIcTooltipElement;\n const textField = this.el.shadowRoot.querySelector(\n this.TEXT_FIELD\n ) as HTMLIcTextFieldElement;\n const inputValue = parseInt(textField.value);\n\n if (\n Number.isNaN(inputValue) &&\n ev.key !== \"Backspace\" &&\n ev.key !== \"Enter\" &&\n ev.key !== \"Tab\" &&\n ev.key !== \"Shift\"\n ) {\n this.inputError = this.NAN_ERROR;\n tooltip.displayTooltip(true, false);\n textField.validationStatus = \"error\";\n }\n };\n\n private paginationShouldWrap = () => {\n const pagination = this.el.shadowRoot.querySelector(\n this.PAGINATION\n ) as HTMLIcPaginationElement;\n if (this.paginationControl === \"simple\") {\n if (pagination.clientHeight > 63) {\n this.paginationWrapped = true;\n } else {\n this.paginationWrapped = false;\n }\n }\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (\n currSize - this.paginationWidth > 50 ||\n currSize - this.paginationWidth < -50\n ) {\n this.paginationWidth = currSize;\n this.paginationShouldWrap();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = this.paginationBarEl.clientWidth;\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(this.paginationBarEl);\n };\n\n private setDefaultItemsPerPage = () => {\n this.itemsPerPage = this.itemsPerPageOptions[0].value;\n };\n\n private setDefaultItemsPerPageOptions = () => {\n this.itemsPerPageOptions =\n this.totalItems <= 100\n ? [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n { label: \"All\", value: String(this.totalItems) },\n ]\n : [\n { label: \"25\", value: \"25\" },\n { label: \"100\", value: \"100\" },\n { label: \"1000\", value: \"1000\" },\n { label: \"All\", value: String(this.totalItems) },\n ];\n };\n\n private setGoToPageInputStyles = () => {\n const textField = this.el.shadowRoot?.querySelector(\n `.${this.PAGE_INPUT_FIELD_ID}`\n );\n if (textField !== undefined) {\n const input = textField?.shadowRoot?.querySelector(\"input\");\n if (input !== undefined) {\n input.style.textAlign = \"center\";\n input.style.padding = \"0\";\n }\n }\n };\n\n private setNumberPages = () => {\n this.totalPages = Math.ceil(this.totalItems / Number(this.itemsPerPage));\n };\n\n private setUpperBound = () => {\n this.upperBound = Math.min(\n this.lowerBound + Number(this.itemsPerPage) - 1,\n this.totalItems\n );\n };\n\n private trimItemsPerPageOptions = () => {\n this.itemsPerPageOptions = this.itemsPerPageOptions.slice(0, 3);\n this.itemsPerPageOptions.push({\n label: \"All\",\n value: String(this.totalItems),\n });\n\n for (let i = 0; i < this.itemsPerPageOptions.length - 1; i++) {\n if (this.totalItems <= Number(this.itemsPerPageOptions[i].value)) {\n this.itemsPerPageOptions.splice(\n i,\n this.itemsPerPageOptions.length - (i + 1)\n );\n }\n }\n };\n\n render() {\n const {\n appearance,\n alignment,\n itemsPerPageOptions,\n PAGE_INPUT_FIELD_ID,\n paginationControl,\n paginationType,\n showItemsPerPage,\n showItemsPerPageControl,\n showGoToPageControl,\n } = this;\n\n const focusElFromLabel = (el: \"ic-select\" | \"ic-text-field\") => {\n this.paginationBarEl.querySelector(el)?.setFocus();\n };\n\n return (\n <div\n class={{\n [\"pagination-bar\"]: true,\n [`pagination-bar-${alignment}`]: true,\n }}\n ref={(el) => (this.paginationBarEl = el)}\n >\n {(showItemsPerPage || showItemsPerPageControl) && (\n <div class=\"item-controls\">\n {showItemsPerPageControl && (\n <div class=\"items-per-page-holder\">\n <ic-typography\n class={{\n [`pagination-text-${appearance}`]: true,\n [\"items-per-page-control-label\"]: true,\n }}\n variant=\"label\"\n onClick={() => focusElFromLabel(\"ic-select\")}\n >\n {this.itemLabel}s per {this.pageLabel.toLowerCase()}\n </ic-typography>\n <ic-select\n small\n label=\"items-per-page-input\"\n class=\"items-per-page-input\"\n hideLabel\n options={itemsPerPageOptions}\n value={this.itemsPerPage}\n onIcChange={() => this.changeItemsPerPage()}\n ></ic-select>\n </div>\n )}\n {showItemsPerPage && paginationType === \"data\" ? (\n <ic-typography\n class={{\n [`pagination-text-${appearance}`]: true,\n [\"item-pagination-label\"]: true,\n }}\n variant=\"label\"\n aria-live=\"polite\"\n >\n {this.lowerBound} - {this.upperBound} of {this.totalItems}{\" \"}\n {this.itemLabel.toLowerCase()}\n {this.totalItems > 1 ? \"s\" : \"\"}\n </ic-typography>\n ) : (\n showItemsPerPage && (\n <ic-typography\n class={{\n [`pagination-text-${appearance}`]: true,\n [\"page-pagination-label\"]: true,\n }}\n variant=\"label\"\n aria-live=\"polite\"\n >\n {this.pageLabel} {this.currentPage} of {this.totalPages}\n </ic-typography>\n )\n )}\n </div>\n )}\n <div\n class={{\n [\"pagination-controls\"]: true,\n [\"pagination-controls-wrap\"]: this.paginationWrapped,\n }}\n >\n <div class=\"pagination-holder\">\n <ic-pagination\n appearance={appearance}\n type={paginationControl}\n pages={this.totalPages}\n ></ic-pagination>\n </div>\n {showGoToPageControl && (\n <div class=\"go-to-page-holder\">\n <ic-typography\n class={{ [`pagination-text-${appearance}`]: true }}\n variant=\"label\"\n onClick={() => focusElFromLabel(\"ic-text-field\")}\n >\n Go to {this.pageLabel.toLowerCase()}\n </ic-typography>\n <ic-tooltip\n label={this.inputError}\n target={`#${PAGE_INPUT_FIELD_ID}`}\n disableHover\n disableClick\n >\n <ic-text-field\n type=\"number\"\n size=\"small\"\n label={PAGE_INPUT_FIELD_ID}\n class={PAGE_INPUT_FIELD_ID}\n id={PAGE_INPUT_FIELD_ID}\n hideLabel\n onKeyDown={(ev: KeyboardEvent) => this.handleKeydown(ev)}\n onKeyUp={(ev: KeyboardEvent) => this.handleKeyUp(ev)}\n onInput={() => this.handleInputChange()}\n max={this.totalPages}\n min=\"1\"\n validationInlineInternal\n onBlur={() => this.handleBlur()}\n onFocus={() => this.handleFocus()}\n ></ic-text-field>\n </ic-tooltip>\n <ic-button\n appearance={appearance}\n variant=\"secondary\"\n onClick={() => this.goToPage()}\n size=\"small\"\n class=\"go-to-page-button\"\n >\n Go\n </ic-button>\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"mappings":"yDAGO,MAAMA,EACXC,IAEA,UACSC,SAAW,oBACXA,OAAOC,iBAAmB,YACjC,CACAF,G,GAIG,MAAMG,EAAkBC,GAC7BC,iBAAiBC,SAASC,iBAAiBC,iBAAiBJ,I,CAG5DK,GAAIC,OAAOP,EAAe,sBAAsBQ,QAAQ,KAAM,KAC9DC,EAAGF,OAAOP,EAAe,sBAAsBQ,QAAQ,KAAM,KAC7DE,EAAGH,OAAOP,EAAe,sBAAsBQ,QAAQ,KAAM,KAC7DG,EAAGJ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,EAAA,iBACEY,KAAK,SACLK,KAAK,QACLhD,MAAO3D,EACP2F,MAAO3F,EACP4G,GAAI5G,EACJmG,UAAS,KACTU,UAAYrE,GAAsB5C,KAAK2C,cAAcC,GACrDsE,QAAUtE,GAAsB5C,KAAK8C,YAAYF,GACjDuE,QAAS,IAAMnH,KAAKuC,oBACpB6E,IAAKpH,KAAKmB,WACVsD,IAAI,IACJ4C,yBAAwB,KACxBC,OAAQ,IAAMtH,KAAKkC,aACnBqF,QAAS,IAAMvH,KAAKsC,iBAGxBwD,EAAA,aACEP,WAAYA,EACZU,QAAQ,YACRC,QAAS,IAAMlG,KAAK2B,WACpBoF,KAAK,QACLhB,MAAM,qBAAmB,Q"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icAccordionGroupCss","accordionGroupIds","AccordionGroup","constructor","hostRef","this","accordionGroupId","handleExpanded","areAllAccordionsOpen","expanded","accordions","forEach","acc","setExpandedToAreAllAccordionsOpen","linkAccordions","accordion","setAttribute","every","undefined","appearance","groupTitle","singleExpansion","size","componentDidLoad","accordionDirectChildren","el","children","Array","from","filter","child","tagName","handleAccordionClicked","event","detail","id","render","h","Host","class","variant","onClick","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-accordion-group/ic-accordion-group.css?tag=ic-accordion-group&encapsulation=shadow","../web-components/dist/collection/components/ic-accordion-group/ic-accordion-group.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n.group-title-container {\n padding: var(--ic-space-xs);\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n:host(.small) .group-title-container {\n padding: var(--ic-space-xxs) var(--ic-space-xs);\n}\n\n:host(.large) .group-title-container {\n padding: var(--ic-space-sm) var(--ic-space-xs);\n}\n\n:host(.light) {\n color: var(--ic-architectural-white);\n}\n\n:host(.accordion-group.dark) ::slotted(ic-accordion) {\n color: var(--ic-architectural-white);\n}\n","import { h, Host, } from \"@stencil/core\";\nlet accordionGroupIds = 0;\nexport class AccordionGroup {\n constructor() {\n this.accordionGroupId = `ic-accordion-group-${accordionGroupIds++}`;\n this.handleExpanded = () => {\n if (this.areAllAccordionsOpen) {\n this.expanded = false;\n this.accordions.forEach((acc) => {\n acc.expanded = this.expanded;\n });\n }\n else {\n this.expanded = true;\n this.accordions.forEach((acc) => {\n acc.expanded = this.expanded;\n });\n }\n this.setExpandedToAreAllAccordionsOpen();\n };\n this.linkAccordions = () => {\n this.accordions.forEach((accordion) => {\n accordion.setAttribute(\"context-id\", this.accordionGroupId);\n });\n };\n this.setExpandedToAreAllAccordionsOpen = () => {\n this.areAllAccordionsOpen = this.accordions.every((accordion) => !!accordion.expanded);\n };\n this.accordions = undefined;\n this.areAllAccordionsOpen = undefined;\n this.appearance = \"default\";\n this.expanded = false;\n this.groupTitle = \"\";\n this.singleExpansion = false;\n this.size = \"default\";\n }\n componentDidLoad() {\n const accordionDirectChildren = this.el.children;\n this.accordions = Array.from(accordionDirectChildren).filter((child) => child.tagName === \"IC-ACCORDION\");\n this.linkAccordions();\n this.accordions.forEach((acc) => {\n acc.appearance = this.appearance;\n });\n this.accordions.forEach((acc) => {\n acc.size = this.size;\n });\n if (this.expanded) {\n this.accordions.forEach((acc) => {\n acc.expanded = true;\n });\n this.setExpandedToAreAllAccordionsOpen();\n }\n else {\n this.setExpandedToAreAllAccordionsOpen();\n this.expanded = this.areAllAccordionsOpen;\n }\n }\n handleAccordionClicked(event) {\n if (!this.singleExpansion) {\n // 'See all' should be visible until all accordions are open, then 'Hide all' should be visible\n this.setExpandedToAreAllAccordionsOpen();\n }\n else {\n this.accordions.forEach((acc) => {\n if (acc.expanded && event.detail.id !== acc.id) {\n acc.expanded = false;\n }\n });\n }\n }\n render() {\n const { appearance, size, groupTitle, singleExpansion } = this;\n return (h(Host, { \"context-id\": this.accordionGroupId, class: {\n [`${appearance}`]: true,\n [`${size}`]: true,\n [\"accordion-group\"]: true,\n } }, h(\"div\", { class: \"group-title-container\" }, h(\"ic-typography\", { variant: \"h4\" }, h(\"h3\", null, groupTitle)), !singleExpansion && (h(\"ic-button\", { appearance: appearance === \"light\" ? \"light\" : \"default\", onClick: this.handleExpanded, variant: \"tertiary\" }, !this.areAllAccordionsOpen ? \"See all\" : \"Hide all\"))), h(\"slot\", null)));\n }\n static get is() { return \"ic-accordion-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-accordion-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-accordion-group.css\"]\n };\n }\n static get properties() {\n return {\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForeground\",\n \"resolved\": \"\\\"dark\\\" | \\\"default\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForeground\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForeground\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the accordion group, e.g dark, or light.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"expanded\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the accordion will load in an expanded state.\"\n },\n \"attribute\": \"expanded\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"groupTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The header for the accordion group.\"\n },\n \"attribute\": \"group-title\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"singleExpansion\": {\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`, only one accordion will open at a time.\"\n },\n \"attribute\": \"single-expansion\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"default\\\" | \\\"large\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the accordion.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"accordions\": {},\n \"areAllAccordionsOpen\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"accordionClicked\",\n \"method\": \"hand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,oCACLR,KAAKI,SAAWJ,KAAKG,oB,EAG7B,sBAAAwB,CAAuBC,GACnB,IAAK5B,KAAKgB,gBAAiB,CAEvBhB,KAAKQ,mC,KAEJ,CACDR,KAAKK,WAAWC,SAASC,IACrB,GAAIA,EAAIH,UAAYwB,EAAMC,OAAOC,KAAOvB,EAAIuB,GAAI,CAC5CvB,EAAIH,SAAW,K,MAK/B,MAAA2B,GACI,MAAMjB,WAAEA,EAAUG,KAAEA,EAAIF,WAAEA,EAAUC,gBAAEA,GAAoBhB,KAC1D,OAAQgC,EAAEC,EAAM,CAAE,aAAcjC,KAAKC,iBAAkBiC,MAAO,CACtD,CAAC,GAAGpB,KAAe,KACnB,CAAC,GAAGG,KAAS,KACb,CAAC,mBAAoB,OACpBe,EAAE,MAAO,CAAEE,MAAO,yBAA2BF,EAAE,gBAAiB,CAAEG,QAAS,MAAQH,EAAE,KAAM,KAAMjB,KAAeC,GAAoBgB,EAAE,YAAa,CAAElB,WAAYA,IAAe,QAAU,QAAU,UAAWsB,QAASpC,KAAKE,eAAgBiC,QAAS,aAAenC,KAAKG,qBAAuB,UAAY,aAAe6B,EAAE,OAAQ,M,CAInV,yBAAWK,GAAmB,OAAO,IAAK,C"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icDataRowCss","DataRow","constructor","hostRef","this","hasEndComponent","resizeObserver","runResizeObserver","ResizeObserver","checkLabelAbove","observe","el","renderLabel","label","isSlotUsed","h","class","name","variant","entitySize","deviceSize","DEVICE_SIZES","XL","undefined","size","small","value","disconnectedCallback","disconnect","componentWillLoad","getCurrentDeviceSize","slotHasContent","componentDidLoad","checkResizeObserver","labelEndComponent","_a","rowSize","shadowRoot","querySelector","clientWidth","S","M","component","querySelectorAll","forEach","child","setAttribute","render","Host","role"],"sources":["../web-components/dist/collection/components/ic-data-row/ic-data-row.css?tag=ic-data-row&encapsulation=shadow","../web-components/dist/collection/components/ic-data-row/ic-data-row.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n position: relative;\n display: block;\n}\n\n.data {\n display: flex;\n align-items: center;\n}\n\n.text-cells {\n display: flex;\n flex-grow: 1;\n min-width: 0;\n}\n\n.label {\n width: 12.5rem;\n min-width: 12.5rem;\n margin-right: var(--ic-space-md);\n color: var(--ic-color-tertiary-text);\n}\n\n.value {\n flex-grow: 1;\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xxs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]) {\n margin-top: calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs));\n}\n\n.end-component {\n width: -moz-fit-content;\n width: fit-content;\n margin-left: 3.5rem;\n}\n\n.divider {\n margin-top: var(--ic-space-md);\n height: var(--ic-border-width);\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-xs);\n}\n\n:host(.breakpoint-medium) .label {\n width: 10rem;\n min-width: 10rem;\n}\n\n:host(.breakpoint-xs) .text-cells {\n flex-direction: column;\n}\n\n:host(.breakpoint-xs) .label {\n width: 8rem;\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.breakpoint-xs) .value {\n max-width: 95%;\n}\n\n:host(.breakpoint-xs) .end-component {\n margin-left: 0;\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Host, h } from \"@stencil/core\";\nimport { checkResizeObserver, DEVICE_SIZES, getCurrentDeviceSize, isSlotUsed, slotHasContent, } from \"../../utils/helpers\";\n/**\n * @slot label - Content will be rendered in the leftmost cell.\n * @slot value - Content will be rendered to the right of the label.\n * @slot end-component - Content will be displayed in the rightmost cell.\n */\nexport class DataRow {\n constructor() {\n this.hasEndComponent = false;\n this.resizeObserver = null;\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkLabelAbove();\n });\n this.resizeObserver.observe(this.el);\n };\n /**\n * Renders the label either as a ic-typography or slot. Slotted content takes precedence.\n * @param label string - label of value\n * @returns HTMLDivElement - returns label as slot or ic-typography with label as textContent\n */\n this.renderLabel = (label) => {\n if (isSlotUsed(this.el, \"label\")) {\n return (h(\"div\", { class: \"label\" }, h(\"slot\", { name: \"label\" })));\n }\n else if (label) {\n return (h(\"div\", { class: \"label\" }, h(\"ic-typography\", { variant: this.entitySize === \"xs\" ? \"label\" : \"subtitle-large\" }, label)));\n }\n return null;\n };\n this.deviceSize = DEVICE_SIZES.XL;\n this.entitySize = undefined;\n this.label = undefined;\n this.size = \"default\";\n this.small = false;\n this.value = undefined;\n }\n disconnectedCallback() {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n componentWillLoad() {\n this.deviceSize = getCurrentDeviceSize();\n this.hasEndComponent = slotHasContent(this.el, \"end-component\");\n this.checkLabelAbove();\n }\n componentDidLoad() {\n checkResizeObserver(this.runResizeObserver);\n if (this.hasEndComponent) {\n this.labelEndComponent();\n }\n }\n checkLabelAbove() {\n var _a;\n const rowSize = (_a = this.el.shadowRoot.querySelector(\".data\")) === null || _a === void 0 ? void 0 : _a.clientWidth;\n if (rowSize) {\n if (rowSize + 46 < DEVICE_SIZES.S) {\n this.entitySize = \"xs\";\n }\n else if (rowSize + 46 < DEVICE_SIZES.M) {\n this.entitySize = \"m\";\n }\n else {\n this.entitySize = \"xl\";\n }\n }\n }\n labelEndComponent() {\n const component = this.el.shadowRoot.querySelectorAll(\"slot[name=end-component]\");\n component.forEach((child) => child.setAttribute(\"aria-label\", \"for \" + this.label + \" row\"));\n }\n render() {\n const { label, value, small, size } = this;\n return (h(Host, { class: {\n [\"small\"]: small || size === \"small\",\n [\"breakpoint-medium\"]: this.entitySize === \"m\",\n [\"breakpoint-xs\"]: this.entitySize === \"xs\",\n }, role: \"listitem\" }, h(\"div\", { class: \"data\" }, h(\"div\", { class: \"text-cells\" }, this.renderLabel(label), h(\"div\", { class: \"value\" }, h(\"slot\", { name: \"value\" }, h(\"ic-typography\", { variant: \"body\" }, value)))), this.hasEndComponent && (h(\"div\", { class: \"end-component\" }, h(\"div\", { role: \"cell\" }, h(\"slot\", { name: \"end-component\" }))))), h(\"div\", { class: \"divider\" })));\n }\n static get is() { return \"ic-data-row\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-data-row.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-data-row.css\"]\n };\n }\n static get properties() {\n return {\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label in the leftmost cell of the row.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizesNoLarge\",\n \"resolved\": \"\\\"default\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizesNoLarge\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizesNoLarge\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the data row component.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"small\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Set prop `size` to \\\"small\\\" instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"small\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"value\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The value of the middle (right if no end-component supplied) cell of the row.\"\n },\n \"attribute\": \"value\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"deviceSize\": {},\n \"entitySize\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-data-row.js.map\n"],"mappings":"iJAAA,MAAMA,EAAe,shH,MCORC,EAAO,MAChB,WAAAC,CAAAC,G,UACIC,KAAKC,gBAAkB,MACvBD,KAAKE,eAAiB,KACtBF,KAAKG,kBAAoB,KACrBH,KAAKE,eAAiB,IAAIE,gBAAe,KACrCJ,KAAKK,iBAAiB,IAE1BL,KAAKE,eAAeI,QAAQN,KAAKO,GAAG,EAOxCP,KAAKQ,YAAeC,IAChB,GAAIC,EAAWV,KAAKO,GAAI,SAAU,CAC9B,OAAQI,EAAE,MAAO,CAAEC,MAAO,SAAWD,EAAE,OAAQ,CAAEE,KAAM,U,MAEtD,GAAI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Ae,MACxC8B,KAAM,YAAclC,EAAE,MAAO,CAAEC,MAAO,QAAUD,EAAE,MAAO,CAAEC,MAAO,cAAgBZ,KAAKQ,YAAYC,GAAQE,EAAE,MAAO,CAAEC,MAAO,SAAWD,EAAE,OAAQ,CAAEE,KAAM,SAAWF,EAAE,gBAAiB,CAAEG,QAAS,QAAUQ,MAAWtB,KAAKC,iBAAoBU,EAAE,MAAO,CAAEC,MAAO,iBAAmBD,EAAE,MAAO,CAAEkC,KAAM,QAAUlC,EAAE,OAAQ,CAAEE,KAAM,qBAAwBF,EAAE,MAAO,CAAEC,MAAO,Y"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icBadgeCss","Badge","constructor","hostRef","this","setBadgeColour","colorRGBA","customColor","firstChar","slice","hexToRgba","toLowerCase","rgbaStrToObj","customColorRGBA","el","style","backgroundColor","r","toString","g","b","a","getBadgeForeground","red","green","blue","variant","parseInt","getCssProperty","info","neutral","light","brightness","foregroundColour","IcThemeForegroundEnum","Dark","Light","getTextLabel","label","textLabel","maxNumber","Number","setAccessibleLabel","getParentElement","getParentElementType","setAttribute","ariaLabel","accessibleLabel","isAccessibleLabelDefined","isPropDefined","undefined","position","size","type","visible","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","showBadge","hideBadge","render","h","Host","class","id","name","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","../web-components/dist/collection/components/ic-badge/ic-badge.js"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: -moz-fit-content;\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host(.neutral) {\n background-color: var(--ic-architectural-500);\n}\n\n:host(.light) {\n background-color: var(--ic-architectural-40);\n}\n\n:host(.info) {\n background-color: var(--ic-status-info);\n}\n\n:host(.warning) {\n background-color: var(--ic-status-warning-mid);\n}\n\n:host(.error) {\n background-color: var(--ic-status-error);\n}\n\n:host(.success) {\n background-color: var(--ic-status-success);\n}\n\n:host(.small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.dot.default) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.dot.small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.dot.large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.foreground-dark) ::slotted(*) {\n fill: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.foreground-dark) ic-typography {\n color: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ic-typography {\n color: white;\n}\n\n:host(.text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.text.small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.text.large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.icon.small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.icon.large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.far.small),\n:host(.dot.far.large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.dot.far),\n:host(.dot.far.small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.dot.near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.inline) {\n position: static;\n}\n\n:host(.hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import { Host, h } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { getCssProperty, getParentElement, getParentElementType, hexToRgba, isPropDefined, onComponentRequiredPropUndefined, rgbaStrToObj, } from \"../../utils/helpers\";\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\nexport class Badge {\n constructor() {\n this.setBadgeColour = () => {\n let colorRGBA = null;\n if (this.customColor !== null) {\n const firstChar = this.customColor.slice(0, 1);\n if (firstChar === \"#\") {\n colorRGBA = hexToRgba(this.customColor);\n }\n else if (firstChar.toLowerCase() === \"r\") {\n colorRGBA = rgbaStrToObj(this.customColor);\n }\n this.customColorRGBA = colorRGBA;\n this.el.style.backgroundColor = `rgba(${colorRGBA.r.toString()}, ${colorRGBA.g.toString()}, ${colorRGBA.b.toString()}, ${colorRGBA.a.toString()})`;\n }\n };\n this.getBadgeForeground = () => {\n let red;\n let green;\n let blue;\n switch (this.variant) {\n case \"custom\":\n red = this.customColorRGBA.r;\n green = this.customColorRGBA.g;\n blue = this.customColorRGBA.b;\n break;\n case \"error\":\n red = parseInt(getCssProperty(\"--ic-status-error-r\"));\n green = parseInt(getCssProperty(\"--ic-status-error-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-error-b\"));\n break;\n case \"success\":\n red = parseInt(getCssProperty(\"--ic-status-success-r\"));\n green = parseInt(getCssProperty(\"--ic-status-success-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-success-b\"));\n break;\n case \"warning\":\n red = parseInt(getCssProperty(\"--ic-status-warning-r\"));\n green = parseInt(getCssProperty(\"--ic-status-warning-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-warning-b\"));\n break;\n case \"info\": {\n const info = hexToRgba(getCssProperty(\"--ic-status-info\"));\n red = info.r;\n green = info.g;\n blue = info.b;\n break;\n }\n case \"neutral\": {\n const neutral = hexToRgba(getCssProperty(\"--ic-architectural-500\"));\n red = neutral.r;\n green = neutral.g;\n blue = neutral.b;\n break;\n }\n case \"light\": {\n const light = hexToRgba(getCssProperty(\"--ic-architectural-40\"));\n red = light.r;\n green = light.g;\n blue = light.b;\n break;\n }\n }\n const brightness = (red * 299 + green * 587 + blue * 114) / 1000;\n this.foregroundColour =\n brightness > 133.3505\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n };\n this.getTextLabel = () => {\n let label;\n if (this.textLabel !== null) {\n if (this.maxNumber !== null) {\n label =\n Number(this.textLabel) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.textLabel;\n }\n else {\n label = this.textLabel;\n }\n }\n return label;\n };\n this.setAccessibleLabel = () => {\n if (getParentElement(this.el) !== null) {\n if (getParentElementType(this.el) === \"IC-TAB\") {\n getParentElement(this.el).setAttribute(\"aria-describedby\", \"badge\");\n }\n else {\n getParentElement(this.el).ariaLabel = `badge displaying ${this.accessibleLabel}`;\n }\n }\n };\n this.isAccessibleLabelDefined = () => {\n return isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n };\n this.accessibleLabel = undefined;\n this.customColor = null;\n this.maxNumber = undefined;\n this.position = \"far\";\n this.size = \"default\";\n this.textLabel = undefined;\n this.type = \"text\";\n this.variant = \"neutral\";\n this.visible = true;\n }\n componentWillLoad() {\n this.variant === \"custom\" && this.setBadgeColour();\n this.getBadgeForeground();\n this.isAccessibleLabelDefined() && this.setAccessibleLabel();\n }\n componentDidLoad() {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined([{ prop: this.textLabel, propName: \"text-label\" }], \"Badge\");\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async showBadge() {\n this.visible = true;\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async hideBadge() {\n this.visible = false;\n }\n render() {\n const { position, size, type, variant, foregroundColour, visible } = this;\n return (h(Host, { class: {\n [`${position}`]: true,\n [`${size}`]: true,\n [`${variant}`]: true,\n [`${type}`]: true,\n [`foreground-${foregroundColour}`]: foregroundColour !== null,\n [\"show\"]: visible,\n [\"hide\"]: !visible,\n }, id: \"badge\", \"aria-label\": this.isAccessibleLabelDefined() &&\n `badge displaying ${this.accessibleLabel}` }, type === \"icon\" && h(\"slot\", { name: \"badge-icon\" }), type === \"text\" && (h(\"ic-typography\", { variant: size === \"small\" ? \"badge-small\" : \"badge\" }, this.getTextLabel()))));\n }\n static get is() { return \"ic-badge\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the badge component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"customColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})`\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom badge colour. This will only style the badge component if variant=\\\"custom\\\".\\nCan be a hex value e.g. \\\"#ff0000\\\", RGB e.g. \\\"rgb(255, 0, 0)\\\", or RGBA e.g. \\\"rgba(255, 0, 0, 1)\\\".\"\n },\n \"attribute\": \"custom-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"maxNumber\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The maximum number shown on the badge appended with a +.\\nThis will only be displayed if type=\\\"text\\\" and textLabel is not empty.\"\n },\n \"attribute\": \"max-number\",\n \"reflect\": false\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgePositions\",\n \"resolved\": \"\\\"far\\\" | \\\"inline\\\" | \\\"near\\\"\",\n \"references\": {\n \"IcBadgePositions\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgePositions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The positioning of the badge in reference to the parent element.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"far\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"default\\\" | \\\"large\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the badge to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"textLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text displayed in the badge. This will only be displayed if type=\\\"text\\\".\"\n },\n \"attribute\": \"text-label\",\n \"reflect\": false\n },\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeTypes\",\n \"resolved\": \"\\\"dot\\\" | \\\"icon\\\" | \\\"text\\\"\",\n \"references\": {\n \"IcBadgeTypes\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The type of badge to be displayed.\"\n },\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"text\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeVariants\",\n \"resolved\": \"\\\"custom\\\" | \\\"error\\\" | \\\"info\\\" | \\\"light\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcBadgeVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the badge to be displayed.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the badge will be displayed.\"\n },\n \"attribute\": \"visible\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n }\n };\n }\n static get methods() {\n return {\n \"showBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n },\n \"hideBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-badge.js.map\n"],"mappings":"2KAAA,MAAMA,EAAa,u/F,MCMNC,EAAK,MACd,WAAAC,CAAAC,G,UACIC,KAAKC,eAAiB,KAClB,IAAIC,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