@ukic/canary-web-components 2.0.0-canary.31 → 2.0.0-canary.32
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-093368be.js → helpers-aa5ff032.js} +5 -1
- package/dist/cjs/helpers-aa5ff032.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +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 +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +6 -0
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +7 -1
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -4
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +32 -33
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +5 -0
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +5 -0
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +5 -2
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +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_4.cjs.entry.js +11 -2
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +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 +7 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +1 -1
- 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_4.cjs.entry.js +17 -1
- 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-radio-group.cjs.entry.js +2 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +5 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +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 +6 -2
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +5 -2
- package/dist/cjs/ic-tab.cjs.entry.js.map +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 +9 -0
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +7 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +7 -0
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +9 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +10 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +32 -33
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +36 -2
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +8 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +8 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +4 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +10 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +3 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -1
- package/dist/components/helpers.js +4 -0
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-accordion.js +9 -1
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +9 -1
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card.js +9 -1
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +5 -0
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +5 -0
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +11 -4
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-table.js +32 -33
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +7 -1
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +7 -1
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +13 -2
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +9 -1
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +4 -1
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +6 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +5 -0
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -0
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +6 -1
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select2.js +6 -1
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-switch.js +8 -3
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab.js +5 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +6 -1
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +11 -1
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +9 -1
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tree-item.js +9 -1
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-e210f51a.entry.js → p-05c9dee1.entry.js} +2 -2
- package/dist/core/p-05c9dee1.entry.js.map +1 -0
- package/dist/core/p-0695b4b7.entry.js +2 -0
- package/dist/core/p-0695b4b7.entry.js.map +1 -0
- package/dist/core/p-09d4fe07.entry.js +2 -0
- package/dist/core/p-09d4fe07.entry.js.map +1 -0
- package/dist/core/{p-0180e00a.entry.js → p-0bc92c30.entry.js} +2 -2
- package/dist/core/{p-924548ec.entry.js → p-120a38ce.entry.js} +2 -2
- package/dist/core/{p-2d063032.entry.js → p-1419c8ae.entry.js} +2 -2
- package/dist/core/{p-ca8ddad0.entry.js → p-1619b3d7.entry.js} +2 -2
- package/dist/core/{p-438abe40.entry.js → p-19a9ab60.entry.js} +2 -2
- package/dist/core/p-19a9ab60.entry.js.map +1 -0
- package/dist/core/{p-41916ef7.entry.js → p-1a5c1bfa.entry.js} +2 -2
- package/dist/core/{p-418a84d4.entry.js → p-1b5a47c6.entry.js} +2 -2
- package/dist/core/p-1eb5d7f3.entry.js +2 -0
- package/dist/core/p-1eb5d7f3.entry.js.map +1 -0
- package/dist/core/{p-cb3afdbf.entry.js → p-1ef02273.entry.js} +2 -2
- package/dist/core/p-20075bc7.entry.js +2 -0
- package/dist/core/p-20075bc7.entry.js.map +1 -0
- package/dist/core/p-2308d041.entry.js +2 -0
- package/dist/core/p-2308d041.entry.js.map +1 -0
- package/dist/core/{p-d56593cc.entry.js → p-23f32e1e.entry.js} +2 -2
- package/dist/core/{p-8128572e.js → p-3a3a8a71.js} +2 -2
- package/dist/core/{p-8128572e.js.map → p-3a3a8a71.js.map} +1 -1
- package/dist/core/{p-0a01a7ae.entry.js → p-40471551.entry.js} +2 -2
- package/dist/core/{p-5e967ea4.entry.js → p-43f87eb3.entry.js} +2 -2
- package/dist/core/{p-2f7e6e38.entry.js → p-456282e2.entry.js} +2 -2
- package/dist/core/{p-74abc3bb.entry.js → p-48b62c20.entry.js} +2 -2
- package/dist/core/{p-486a6957.entry.js → p-5041cbeb.entry.js} +2 -2
- package/dist/core/{p-21d0dea6.entry.js → p-516de675.entry.js} +2 -2
- package/dist/core/{p-648fb902.entry.js → p-522b1526.entry.js} +2 -2
- package/dist/core/{p-6fb3d61e.entry.js → p-59e677e4.entry.js} +2 -2
- package/dist/core/{p-de630a67.entry.js → p-5dc274f0.entry.js} +2 -2
- package/dist/core/{p-15edd1aa.entry.js → p-67b25dfc.entry.js} +2 -2
- package/dist/core/p-67b25dfc.entry.js.map +1 -0
- package/dist/core/{p-f4e57aaf.entry.js → p-6bd76154.entry.js} +2 -2
- package/dist/core/{p-9b70d4f8.entry.js → p-73dab780.entry.js} +2 -2
- package/dist/core/{p-8d276e8f.entry.js → p-77637e28.entry.js} +2 -2
- package/dist/core/p-782cd387.entry.js +2 -0
- package/dist/core/p-782cd387.entry.js.map +1 -0
- package/dist/core/p-7e20c194.entry.js +2 -0
- package/dist/core/p-7e20c194.entry.js.map +1 -0
- package/dist/core/{p-77696f7d.entry.js → p-85101c9a.entry.js} +2 -2
- package/dist/core/p-85101c9a.entry.js.map +1 -0
- package/dist/core/{p-f10f7f37.entry.js → p-89290d94.entry.js} +2 -2
- package/dist/core/p-89290d94.entry.js.map +1 -0
- package/dist/core/{p-521abb6e.entry.js → p-895d05f9.entry.js} +2 -2
- package/dist/core/p-895d05f9.entry.js.map +1 -0
- package/dist/core/{p-969cadfa.entry.js → p-89ec372e.entry.js} +2 -2
- package/dist/core/p-89ec372e.entry.js.map +1 -0
- package/dist/core/{p-b53455c3.entry.js → p-9271a06b.entry.js} +2 -2
- package/dist/core/{p-673a4a62.entry.js → p-9445c2f3.entry.js} +2 -2
- package/dist/core/p-94e47a21.entry.js +2 -0
- package/dist/core/p-94e47a21.entry.js.map +1 -0
- package/dist/core/{p-0fc36045.entry.js → p-952bdeb2.entry.js} +2 -2
- package/dist/core/p-95c8513d.entry.js +2 -0
- package/dist/core/p-95c8513d.entry.js.map +1 -0
- package/dist/core/{p-a7331e7c.entry.js → p-96a909bf.entry.js} +2 -2
- package/dist/core/{p-9e5c8813.entry.js → p-9b85340f.entry.js} +2 -2
- package/dist/core/p-9b85340f.entry.js.map +1 -0
- package/dist/core/{p-99185fd5.entry.js → p-9ce35989.entry.js} +2 -2
- package/dist/core/p-9ce35989.entry.js.map +1 -0
- package/dist/core/p-a44c0351.entry.js +2 -0
- package/dist/core/p-a44c0351.entry.js.map +1 -0
- package/dist/core/p-a7f4168c.entry.js +2 -0
- package/dist/core/{p-ccf72538.entry.js → p-ab485b11.entry.js} +2 -2
- package/dist/core/{p-3a59391f.entry.js → p-ad786103.entry.js} +2 -2
- package/dist/core/{p-789ae7f5.entry.js → p-c32f4c0f.entry.js} +2 -2
- package/dist/core/{p-16a48a63.entry.js → p-cc99e774.entry.js} +2 -2
- package/dist/core/p-ce2162a2.entry.js +2 -0
- package/dist/core/{p-a72af8db.entry.js.map → p-ce2162a2.entry.js.map} +1 -1
- package/dist/core/{p-c8141cac.entry.js → p-ce90d1b2.entry.js} +2 -2
- package/dist/core/p-cf3f9b02.entry.js +2 -0
- package/dist/core/p-cf3f9b02.entry.js.map +1 -0
- package/dist/core/{p-5348af01.entry.js → p-d0d2952b.entry.js} +2 -2
- package/dist/core/{p-7eb980aa.entry.js → p-d61ef782.entry.js} +2 -2
- package/dist/core/p-d61ef782.entry.js.map +1 -0
- package/dist/core/{p-6398a726.entry.js → p-f0e85611.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-886489d5.js → helpers-25eb1cb0.js} +6 -2
- package/dist/esm/helpers-25eb1cb0.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +8 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +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 +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +6 -0
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +7 -1
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +5 -1
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +9 -4
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +32 -33
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +6 -1
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +6 -1
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +5 -2
- package/dist/esm/ic-empty-state_2.entry.js.map +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_4.entry.js +11 -2
- package/dist/esm/ic-input-component-container_4.entry.js.map +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 +7 -1
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu.entry.js +1 -1
- 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_4.entry.js +17 -1
- 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-radio-group.entry.js +2 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +5 -1
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +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 +6 -2
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +5 -2
- package/dist/esm/ic-tab.entry.js.map +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 +9 -0
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +7 -1
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-tree-item.entry.js +8 -1
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +1 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +34 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +1 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +1 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -0
- package/hydrate/index.js +156 -40
- package/package.json +3 -10
- package/dist/cjs/helpers-093368be.js.map +0 -1
- package/dist/core/p-01bc462e.entry.js +0 -2
- package/dist/core/p-01bc462e.entry.js.map +0 -1
- package/dist/core/p-15edd1aa.entry.js.map +0 -1
- package/dist/core/p-1c25353c.entry.js +0 -2
- package/dist/core/p-1c25353c.entry.js.map +0 -1
- package/dist/core/p-213a9f8f.entry.js +0 -2
- package/dist/core/p-213a9f8f.entry.js.map +0 -1
- package/dist/core/p-383ba7e8.entry.js +0 -2
- package/dist/core/p-383ba7e8.entry.js.map +0 -1
- package/dist/core/p-438abe40.entry.js.map +0 -1
- package/dist/core/p-43a2cad3.entry.js +0 -2
- package/dist/core/p-43a2cad3.entry.js.map +0 -1
- package/dist/core/p-4aa6b8a4.entry.js +0 -2
- package/dist/core/p-4aa6b8a4.entry.js.map +0 -1
- package/dist/core/p-521abb6e.entry.js.map +0 -1
- package/dist/core/p-5334bc96.entry.js +0 -2
- package/dist/core/p-5334bc96.entry.js.map +0 -1
- package/dist/core/p-67ae9d37.entry.js +0 -2
- package/dist/core/p-72446de0.entry.js +0 -2
- package/dist/core/p-72446de0.entry.js.map +0 -1
- package/dist/core/p-77696f7d.entry.js.map +0 -1
- package/dist/core/p-7e5da5eb.entry.js +0 -2
- package/dist/core/p-7e5da5eb.entry.js.map +0 -1
- package/dist/core/p-7eb980aa.entry.js.map +0 -1
- package/dist/core/p-969cadfa.entry.js.map +0 -1
- package/dist/core/p-97f141a6.entry.js +0 -2
- package/dist/core/p-97f141a6.entry.js.map +0 -1
- package/dist/core/p-99185fd5.entry.js.map +0 -1
- package/dist/core/p-9e5c8813.entry.js.map +0 -1
- package/dist/core/p-a72af8db.entry.js +0 -2
- package/dist/core/p-db1887ee.entry.js +0 -2
- package/dist/core/p-db1887ee.entry.js.map +0 -1
- package/dist/core/p-e210f51a.entry.js.map +0 -1
- package/dist/core/p-f10f7f37.entry.js.map +0 -1
- package/dist/esm/helpers-886489d5.js.map +0 -1
- /package/dist/core/{p-0180e00a.entry.js.map → p-0bc92c30.entry.js.map} +0 -0
- /package/dist/core/{p-924548ec.entry.js.map → p-120a38ce.entry.js.map} +0 -0
- /package/dist/core/{p-2d063032.entry.js.map → p-1419c8ae.entry.js.map} +0 -0
- /package/dist/core/{p-ca8ddad0.entry.js.map → p-1619b3d7.entry.js.map} +0 -0
- /package/dist/core/{p-41916ef7.entry.js.map → p-1a5c1bfa.entry.js.map} +0 -0
- /package/dist/core/{p-418a84d4.entry.js.map → p-1b5a47c6.entry.js.map} +0 -0
- /package/dist/core/{p-cb3afdbf.entry.js.map → p-1ef02273.entry.js.map} +0 -0
- /package/dist/core/{p-d56593cc.entry.js.map → p-23f32e1e.entry.js.map} +0 -0
- /package/dist/core/{p-0a01a7ae.entry.js.map → p-40471551.entry.js.map} +0 -0
- /package/dist/core/{p-5e967ea4.entry.js.map → p-43f87eb3.entry.js.map} +0 -0
- /package/dist/core/{p-2f7e6e38.entry.js.map → p-456282e2.entry.js.map} +0 -0
- /package/dist/core/{p-74abc3bb.entry.js.map → p-48b62c20.entry.js.map} +0 -0
- /package/dist/core/{p-486a6957.entry.js.map → p-5041cbeb.entry.js.map} +0 -0
- /package/dist/core/{p-21d0dea6.entry.js.map → p-516de675.entry.js.map} +0 -0
- /package/dist/core/{p-648fb902.entry.js.map → p-522b1526.entry.js.map} +0 -0
- /package/dist/core/{p-6fb3d61e.entry.js.map → p-59e677e4.entry.js.map} +0 -0
- /package/dist/core/{p-de630a67.entry.js.map → p-5dc274f0.entry.js.map} +0 -0
- /package/dist/core/{p-f4e57aaf.entry.js.map → p-6bd76154.entry.js.map} +0 -0
- /package/dist/core/{p-9b70d4f8.entry.js.map → p-73dab780.entry.js.map} +0 -0
- /package/dist/core/{p-8d276e8f.entry.js.map → p-77637e28.entry.js.map} +0 -0
- /package/dist/core/{p-b53455c3.entry.js.map → p-9271a06b.entry.js.map} +0 -0
- /package/dist/core/{p-673a4a62.entry.js.map → p-9445c2f3.entry.js.map} +0 -0
- /package/dist/core/{p-0fc36045.entry.js.map → p-952bdeb2.entry.js.map} +0 -0
- /package/dist/core/{p-a7331e7c.entry.js.map → p-96a909bf.entry.js.map} +0 -0
- /package/dist/core/{p-67ae9d37.entry.js.map → p-a7f4168c.entry.js.map} +0 -0
- /package/dist/core/{p-ccf72538.entry.js.map → p-ab485b11.entry.js.map} +0 -0
- /package/dist/core/{p-3a59391f.entry.js.map → p-ad786103.entry.js.map} +0 -0
- /package/dist/core/{p-789ae7f5.entry.js.map → p-c32f4c0f.entry.js.map} +0 -0
- /package/dist/core/{p-16a48a63.entry.js.map → p-cc99e774.entry.js.map} +0 -0
- /package/dist/core/{p-c8141cac.entry.js.map → p-ce90d1b2.entry.js.map} +0 -0
- /package/dist/core/{p-5348af01.entry.js.map → p-d0d2952b.entry.js.map} +0 -0
- /package/dist/core/{p-6398a726.entry.js.map → p-f0e85611.entry.js.map} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icCheckboxGroupCss","CheckboxGroup","constructor","hostRef","this","disabled","helperText","hideLabel","label","undefined","name","required","size","small","validationStatus","validationText","watchDisabledHandler","removeDisabledFalse","el","labelNameHandler","newValue","oldValue","propName","Array","from","querySelectorAll","forEach","checkbox","groupLabel","handleChange","ev","target","tagName","stopImmediatePropagation","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","selectHandler","checkedOptions","filter","checked","icChange","emit","value","map","opt","_a","textFieldValue","querySelector","selectedOption","render","describedBy","getInputDescribedByText","h","Host","class","id","trim","for","hasValidationStatus","ariaLiveMode","status","message"],"sources":["../web-components/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","../web-components/dist/collection/components/ic-checkbox-group/ic-checkbox-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:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-label ic-typography {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\nic-input-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getInputDescribedByText, hasValidationStatus, onComponentRequiredPropUndefined, removeDisabledFalse, } from \"../../utils/helpers\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class CheckboxGroup {\n constructor() {\n this.disabled = false;\n this.helperText = \"\";\n this.hideLabel = false;\n this.label = undefined;\n this.name = undefined;\n this.required = false;\n this.size = \"default\";\n this.small = false;\n this.validationStatus = \"\";\n this.validationText = \"\";\n }\n watchDisabledHandler() {\n removeDisabledFalse(this.disabled, this.el);\n }\n labelNameHandler(newValue, oldValue, propName) {\n Array.from(this.el.querySelectorAll(\"ic-checkbox\")).forEach((checkbox) => {\n if (propName === \"label\")\n checkbox.groupLabel = newValue;\n else if (checkbox.name === oldValue) {\n // If the checkbox name has been set by the parent, then override it\n checkbox.name = newValue;\n }\n });\n }\n handleChange(ev) {\n //don't pass on the event if it has come from slotted text field\n //otherwise any icChange handler bound to the checkbox group will also run\n if (ev.target.tagName === \"IC-TEXT-FIELD\") {\n ev.stopImmediatePropagation();\n }\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ], \"Checkbox Group\");\n }\n selectHandler({ target }) {\n const checkedOptions = Array.from(this.el.querySelectorAll(\"ic-checkbox\")).filter(({ checked, disabled }) => checked && !disabled);\n this.icChange.emit({\n value: checkedOptions.map(({ value }) => value),\n checkedOptions: checkedOptions.map((opt) => {\n var _a;\n return ({\n checkbox: opt,\n textFieldValue: (_a = opt.querySelector(\"ic-text-field\")) === null || _a === void 0 ? void 0 : _a.value,\n });\n }),\n selectedOption: target,\n });\n }\n render() {\n const { disabled, helperText, hideLabel, label, name, required, size, small, validationStatus, validationText, } = this;\n const describedBy = getInputDescribedByText(name, helperText !== \"\", validationStatus !== \"\");\n return (h(Host, { class: { [\"small\"]: small, [`${size}`]: true } }, (validationStatus === \"error\" || required || hideLabel) && (h(\"span\", { id: \"screenReaderOnlyText\", class: \"screen-reader-only-text\", \"aria-hidden\": \"true\" }, label, \" \", validationStatus === \"error\" ? \"invalid data \" : null, \" \", required ? \"required\" : null)), h(\"fieldset\", { id: name, \"aria-labelledby\": `${validationStatus === \"error\" || required || hideLabel\n ? \"screenReaderOnlyText\"\n : \"\"} ${describedBy}`.trim(), disabled: disabled }, !hideLabel && (h(\"legend\", null, h(\"ic-input-label\", { class: { [`${validationStatus}`]: true }, label: label, helperText: helperText, required: required, disabled: disabled, for: name }))), h(\"div\", { class: \"checkboxes-container\" }, h(\"slot\", null))), hasValidationStatus(validationStatus, disabled) && (h(\"ic-input-validation\", { for: name, ariaLiveMode: \"polite\", status: validationStatus, message: validationText }))));\n }\n static get is() { return \"ic-checkbox-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-checkbox-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-checkbox-group.css\"]\n };\n }\n static get properties() {\n return {\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the checkbox group will be set to the disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"helperText\": {\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 helper text that will be displayed for additional field guidance.\"\n },\n \"attribute\": \"helper-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"hideLabel\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the label will be hidden and the required label value will be applied as an aria-label.\"\n },\n \"attribute\": \"hide-label\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label for the checkbox group to be displayed.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"name\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The name for the checkbox group to differentiate from other groups.\"\n },\n \"attribute\": \"name\",\n \"reflect\": false\n },\n \"required\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the checkbox group will require a value.\"\n },\n \"attribute\": \"required\",\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 checkboxes to be displayed. This does not affect the font size of the label.\"\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\": false,\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 \"validationStatus\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcInformationStatusOrEmpty\",\n \"resolved\": \"\\\"\\\" | \\\"error\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcInformationStatusOrEmpty\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcInformationStatusOrEmpty\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The validation status - e.g. 'error' | 'warning' | 'success'.\"\n },\n \"attribute\": \"validation-status\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"validationText\": {\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 validation text - e.g. 'error' | 'warning' | 'success'.\"\n },\n \"attribute\": \"validation-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a checkbox is checked.\"\n },\n \"complexType\": {\n \"original\": \"IcChangeEventDetail\",\n \"resolved\": \"IcChangeEventDetail\",\n \"references\": {\n \"IcChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-checkbox-group.types\",\n \"id\": \"src/components/ic-checkbox-group/ic-checkbox-group.types.ts::IcChangeEventDetail\"\n }\n }\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }, {\n \"propName\": \"label\",\n \"methodName\": \"labelNameHandler\"\n }, {\n \"propName\": \"name\",\n \"methodName\": \"labelNameHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icChange\",\n \"method\": \"handleChange\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"icCheck\",\n \"method\": \"selectHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-checkbox-group.js.map\n"],"mappings":"iJAAA,MAAMA,EAAqB,47F,MCGdC,EAAa,MACtB,WAAAC,CAAAC,G,6CACIC,KAAKC,SAAW,MAChBD,KAAKE,WAAa,GAClBF,KAAKG,UAAY,MACjBH,KAAKI,MAAQC,UACbL,KAAKM,KAAOD,UACZL,KAAKO,SAAW,MAChBP,KAAKQ,KAAO,UACZR,KAAKS,MAAQ,MACbT,KAAKU,iBAAmB,GACxBV,KAAKW,eAAiB,E,CAE1B,oBAAAC,GACIC,EAAoBb,KAAKC,SAAUD,KAAKc,G,CAE5C,gBAAAC,CAAiBC,EAAUC,EAAUC,GACjCC,MAAMC,KAAKpB,KAAKc,GAAGO,iBAAiB,gBAAgBC,SAASC,IACzD,GAAIL,IAAa,QACbK,EAASC,WAAaR,OACrB,GAAIO,EAASjB,OAASW,EAAU,CAEjCM,EAASjB,KAAOU,C,KAI5B,YAAAS,CAAaC,GAGT,GAAIA,EAAGC,OAAOC,UAAY,gBAAiB,CACvCF,EAAGG,0B,EAGX,iBAAAC,GACIjB,EAAoBb,KAAKC,SAAUD,KAAKc,G,CAE5C,gBAAAiB,GACIC,EAAiC,CAC7B,CAAEC,KAAMjC,KAAKI,MAAOc,SAAU,SAC9B,CAAEe,KAAMjC,KAAKM,KAAMY,SAAU,SAC9B,iB,CAEP,aAAAgB,EAAcP,OAAEA,IACZ,MAAMQ,EAAiBhB,MAAMC,KAAKpB,KAAKc,GAAGO,iBAAiB,gBAAgBe,QAAO,EAAGC,UAASpC,cAAeoC,IAAYpC,IACzHD,KAAKsC,SAASC,KAAK,CACfC,MAAOL,EAAeM,KAAI,EAAGD,WAAYA,IACzCL,eAAgBA,EAAeM,KAAKC,IAChC,IAAIC,EACJ,OACIpB,SAAUmB,EACVE,gBAAiBD,EAAKD,EAAIG,cAAc,oBAAsB,MAAQF,SAAY,OAAS,EAAIA,EAAGH,MACrG,IAELM,eAAgBnB,G,CAGxB,MAAAoB,GACI,MAAM9C,SAAEA,EAAQC,WAAEA,EAAUC,UAAEA,EAASC,MAAEA,EAAKE,KAAEA,EAAIC,SAAEA,EAAQC,KAAEA,EAAIC,MAAEA,EAAKC,iBAAEA,EAAgBC,eAAEA,GAAoBX,KACnH,MAAMgD,EAAcC,EAAwB3C,EAAMJ,IAAe,GAAIQ,IAAqB,IAC1F,OAAQwC,EAAEC,EAAM,CAAEC,MAAO,CAAE,CAAC,SAAU3C,EAAO,CAAC,GAAGD,KAAS,QAAWE,IAAqB,SAAWH,GAAYJ,IAAe+C,EAAE,OAAQ,CAAEG,GAAI,uBAAwBD,MAAO,0BAA2B,cAAe,QAAUhD,EAAO,IAAKM,IAAqB,QAAU,gBAAkB,KAAM,IAAKH,EAAW,WAAa,MAAQ2C,EAAE,WAAY,CAAEG,GAAI/C,EAAM,kBAAmB,GAAGI,IAAqB,SAAWH,GAAYJ,EAC7Z,uBACA,MAAM6C,IAAcM,OAAQrD,SAAUA,IAAaE,GAAc+C,EAAE,SAAU,KAAMA,EAAE,iBAAkB,CAAEE,MAAO,CAAE,CAAC,GAAG1C,KAAqB,MAAQN,MAAOA,EAAOF,WAAYA,EAAYK,SAAUA,EAAUN,SAAUA,EAAUsD,IAAKjD,KAAW4C,EAAE,MAAO,CAAEE,MAAO,wBAA0BF,EAAE,OAAQ,QAASM,EAAoB9C,EAAkBT,IAAciD,EAAE,sBAAuB,CAAEK,IAAKjD,EAAMmD,aAAc,SAAUC,OAAQhD,EAAkBiD,QAAShD,I"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as e,f as o,h as i,H as a,g as r}from"./p-8455d1bb.js";import{r as c,a as n,i as s}from"./p-3a3a8a71.js";import"./p-fd186591.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n )}:host(.dark){--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n )}:host(.light){--button-border:var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n )}:host(.disabled){--button-border:var(--toggle-button-border, var(--ic-border-disabled))}:host(.expand-toggle-group-child) ::part(button){width:100%;min-height:inherit;white-space:inherit;height:inherit}:host ic-button{--icon-width:var(--ic-space-lg);--icon-height:var(--ic-space-lg)}:host(.expand-toggle-group-child) ic-button{min-width:100%;min-height:100%;white-space:normal;height:100%}:host(.expand-toggle-group-child) ::part(button):focus,:host(.expand-toggle-group-child.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus)}:host(.expand-toggle-group-child.light) ::part(button):focus,:host(.expand-toggle-group-child.dark) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus)}:host(:focus){z-index:1}:host ::part(button){border:var(--button-border)}:host(.checked) ::part(button){background-color:var(--ic-action-default);color:var(--ic-architectural-white);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white)}:host(.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus)}:host(.checked) ::part(button):hover{background-color:var(--button-default-hover)}:host(.checked) ::part(button):active,:host(.icon.checked) ::part(button):active{background-color:var(--ic-action-default-active)}:host(.dark.checked) ::part(button){background-color:var(--ic-action-dark)}:host(.dark.checked) ::part(button):hover{background-color:var(--ic-action-dark-hover)}:host(.dark.checked) ::part(button):active,:host(.icon.dark.checked) ::part(button):active{background-color:var(--ic-action-dark-active)}:host(.light.checked) ::part(button){background-color:var(--ic-action-light);color:var(--ic-color-primary-text);box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black)}:host(.light.checked) ::part(button):hover{background-color:var(--ic-action-light-hover)}:host(.light.checked) ::part(button):active,:host(.icon.light.checked) ::part(button):active{background-color:var(--ic-action-light-active)}:host(.light.checked) ::part(button):focus{box-shadow:inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus)}:host(.disabled) ::part(button),:host(.icon.disabled) ::part(button){border:var(--button-border)}:host(.disabled.checked) ::part(button),:host(.icon.disabled.checked) ::part(button){background-color:transparent}:host(.disabled.checked) ::part(button),:host(.icon.disabled.checked) ::part(button)::before{background-image:radial-gradient(var(--ic-architectural-400) 95%, white 20%);background-repeat:no-repeat}:host(.icon) ::part(button){border:var(--button-border);height:calc(var(--ic-space-xl) + var(--ic-space-xs));width:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.icon) ::part(button):active{background-color:var(--ic-action-default-bg-active)}:host(.icon.dark) ::part(button):active{background-color:var(--ic-action-dark-bg-active)}:host(.icon.light) ::part(button):active{background-color:var(--ic-action-light-bg-active)}:host(.icon.small) ::part(button){height:var(--ic-space-xl);width:var(--ic-space-xl)}:host(.icon.large) ::part(button){height:var(--ic-space-xxl);width:var(--ic-space-xxl)}:host(.checked.loading) ::part(button){background-color:var(--button-default-active)}:host(.loading) ::part(ic-loading-container){--inner-color:var(--ic-architectural-white)}:host(.checked.loading.light) ::part(button){background-color:var(--ic-action-light-active)}:host(.checked.loading.dark) ::part(button){background-color:var(--ic-action-dark-active)}@media (forced-colors: active){:host(.checked) ::part(button),:host(.checked) ::part(button):hover{background-color:Highlight}:host(.checked.light) ::part(button),:host(.checked.light) ::part(button):hover{background-color:Highlight}:host(.checked.dark) ::part(button),:host(.checked.dark) ::part(button):hover{background-color:Highlight}:host(.checked.disabled) ::part(button){background-color:GrayText}}';const d=class{constructor(i){t(this,i);this.icToggleChecked=e(this,"icToggleChecked",7);this.hostMutationObserver=null;this.hostMutationCallback=()=>{o(this)};this.handleFocus=t=>{t.stopImmediatePropagation()};this.handleClick=()=>{!this.loading&&!this.disabled&&this.icToggleChecked.emit({checked:this.toggleChecked})};this.accessibleLabel=undefined;this.appearance="default";this.disabled=false;this.fullWidth=false;this.iconPlacement=undefined;this.label=undefined;this.loading=false;this.size="default";this.toggleChecked=false;this.variant="default"}watchDisabledHandler(){c(this.disabled,this.el)}componentWillLoad(){c(this.disabled,this.el);const t=this.el.parentElement.iconPlacement;this.iconPosition=this.iconPlacement||t}componentDidLoad(){n([{prop:this.variant==="icon"?this.accessibleLabel:this.label,propName:this.variant==="icon"?"accessible-label":"label"}],"Toggle button");if(typeof MutationObserver!=="undefined"){this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}}disconnectedCallback(){if(this.hostMutationObserver!==null&&this.hostMutationObserver!==undefined){this.hostMutationObserver.disconnect()}}handleHostClick(t){if(this.disabled){t.stopImmediatePropagation()}else if(!this.loading){this.toggleChecked=!this.toggleChecked}}render(){return i(a,{class:{["disabled"]:this.disabled,["checked"]:this.toggleChecked,[`${this.appearance}`]:true,["icon"]:this.variant==="icon",[`${this.size}`]:true,["loading"]:this.loading},onFocus:this.handleFocus},i("ic-button",{"aria-pressed":this.toggleChecked.toString(),variant:this.variant==="icon"?"icon":"secondary",onClick:this.handleClick,title:this.accessibleLabel,"aria-label":`${this.accessibleLabel?this.accessibleLabel:this.label}, ${this.toggleChecked?"ticked":"unticked"}`,disabled:this.disabled,appearance:this.appearance,size:this.size,fullWidth:this.fullWidth,loading:this.loading,"aria-disabled":`${this.disabled}`},this.variant!=="icon"&&this.label,i("slot",null),s(this.el,"icon")&&i("slot",{name:"icon",slot:`${this.iconPosition?`${this.iconPosition}-icon`:"icon"}`}),s(this.el,"badge")&&i("slot",{name:"badge",slot:"badge"})))}static get delegatesFocus(){return true}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};d.style=h;export{d as ic_toggle_button};
|
2
|
+
//# sourceMappingURL=p-895d05f9.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icToggleButtonCss","ToggleButton","constructor","hostRef","this","hostMutationObserver","hostMutationCallback","forceUpdate","handleFocus","ev","stopImmediatePropagation","handleClick","loading","disabled","icToggleChecked","emit","checked","toggleChecked","accessibleLabel","undefined","appearance","fullWidth","iconPlacement","label","size","variant","watchDisabledHandler","removeDisabledFalse","el","componentWillLoad","parentIconPlacement","parentElement","iconPosition","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","MutationObserver","observe","childList","disconnectedCallback","disconnect","handleHostClick","e","render","h","Host","class","onFocus","toString","onClick","title","isSlotUsed","name","slot","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.css?tag=ic-toggle-button&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button/ic-toggle-button.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/* VARIABLES FOR IC-TOGGLE-BUTTON-GROUP */\n:host {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-default)\n );\n}\n\n:host(.dark) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-dark)\n );\n}\n\n:host(.light) {\n --button-border: var(\n --toggle-button-border,\n var(--ic-border-width) solid var(--ic-action-light)\n );\n}\n\n:host(.disabled) {\n --button-border: var(--toggle-button-border, var(--ic-border-disabled));\n}\n\n:host(.expand-toggle-group-child) ::part(button) {\n width: 100%;\n min-height: inherit;\n white-space: inherit;\n height: inherit;\n}\n\n:host ic-button {\n --icon-width: var(--ic-space-lg);\n --icon-height: var(--ic-space-lg);\n}\n\n:host(.expand-toggle-group-child) ic-button {\n min-width: 100%;\n min-height: 100%;\n white-space: normal;\n height: 100%;\n}\n\n:host(.expand-toggle-group-child) ::part(button):focus,\n:host(.expand-toggle-group-child.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-default),\n var(--ic-border-focus);\n}\n\n:host(.expand-toggle-group-child.light) ::part(button):focus,\n:host(.expand-toggle-group-child.dark) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-action-dark),\n var(--ic-border-focus);\n}\n\n:host(:focus) {\n z-index: 1;\n}\n\n:host ::part(button) {\n border: var(--button-border);\n}\n\n:host(.checked) ::part(button) {\n background-color: var(--ic-action-default);\n color: var(--ic-architectural-white);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white);\n}\n\n:host(.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-white),\n var(--ic-border-focus);\n}\n\n:host(.checked) ::part(button):hover {\n background-color: var(--button-default-hover);\n}\n\n:host(.checked) ::part(button):active,\n:host(.icon.checked) ::part(button):active {\n background-color: var(--ic-action-default-active);\n}\n\n:host(.dark.checked) ::part(button) {\n background-color: var(--ic-action-dark);\n}\n\n:host(.dark.checked) ::part(button):hover {\n background-color: var(--ic-action-dark-hover);\n}\n\n:host(.dark.checked) ::part(button):active,\n:host(.icon.dark.checked) ::part(button):active {\n background-color: var(--ic-action-dark-active);\n}\n\n:host(.light.checked) ::part(button) {\n background-color: var(--ic-action-light);\n color: var(--ic-color-primary-text);\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black);\n}\n\n:host(.light.checked) ::part(button):hover {\n background-color: var(--ic-action-light-hover);\n}\n\n:host(.light.checked) ::part(button):active,\n:host(.icon.light.checked) ::part(button):active {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.light.checked) ::part(button):focus {\n box-shadow: inset 0 0 0 var(--ic-space-xxxs) var(--ic-architectural-black),\n var(--ic-border-focus);\n}\n\n:host(.disabled) ::part(button),\n:host(.icon.disabled) ::part(button) {\n border: var(--button-border);\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button) {\n background-color: transparent;\n}\n\n:host(.disabled.checked) ::part(button),\n:host(.icon.disabled.checked) ::part(button)::before {\n background-image: radial-gradient(var(--ic-architectural-400) 95%, white 20%);\n background-repeat: no-repeat;\n}\n\n:host(.icon) ::part(button) {\n border: var(--button-border);\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n width: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.icon) ::part(button):active {\n background-color: var(--ic-action-default-bg-active);\n}\n\n:host(.icon.dark) ::part(button):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n:host(.icon.light) ::part(button):active {\n background-color: var(--ic-action-light-bg-active);\n}\n\n:host(.icon.small) ::part(button) {\n height: var(--ic-space-xl);\n width: var(--ic-space-xl);\n}\n\n:host(.icon.large) ::part(button) {\n height: var(--ic-space-xxl);\n width: var(--ic-space-xxl);\n}\n\n:host(.checked.loading) ::part(button) {\n background-color: var(--button-default-active);\n}\n\n:host(.loading) ::part(ic-loading-container) {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.checked.loading.light) ::part(button) {\n background-color: var(--ic-action-light-active);\n}\n\n:host(.checked.loading.dark) ::part(button) {\n background-color: var(--ic-action-dark-active);\n}\n\n@media (forced-colors: active) {\n :host(.checked) ::part(button),\n :host(.checked) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.light) ::part(button),\n :host(.checked.light) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.dark) ::part(button),\n :host(.checked.dark) ::part(button):hover {\n background-color: Highlight;\n }\n\n :host(.checked.disabled) ::part(button) {\n background-color: GrayText;\n }\n}\n","import { Host, h, forceUpdate, } from \"@stencil/core\";\nimport { isSlotUsed, onComponentRequiredPropUndefined, removeDisabledFalse, } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be displayed alongside the toggle button label.\n * @slot badge - Badge component overlaying the top right of the toggle button.\n */\nexport class ToggleButton {\n constructor() {\n this.hostMutationObserver = null;\n this.hostMutationCallback = () => {\n forceUpdate(this);\n };\n this.handleFocus = (ev) => {\n ev.stopImmediatePropagation();\n };\n this.handleClick = () => {\n !this.loading &&\n !this.disabled &&\n this.icToggleChecked.emit({\n checked: this.toggleChecked,\n });\n };\n this.accessibleLabel = undefined;\n this.appearance = \"default\";\n this.disabled = false;\n this.fullWidth = false;\n this.iconPlacement = undefined;\n this.label = undefined;\n this.loading = false;\n this.size = \"default\";\n this.toggleChecked = false;\n this.variant = \"default\";\n }\n watchDisabledHandler() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n const parentIconPlacement = this.el.parentElement.iconPlacement;\n this.iconPosition = this.iconPlacement || parentIconPlacement;\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([\n {\n prop: this.variant === \"icon\" ? this.accessibleLabel : this.label,\n propName: this.variant === \"icon\" ? \"accessible-label\" : \"label\",\n },\n ], \"Toggle button\");\n if (typeof MutationObserver !== \"undefined\") {\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n }\n disconnectedCallback() {\n if (this.hostMutationObserver !== null &&\n this.hostMutationObserver !== undefined) {\n this.hostMutationObserver.disconnect();\n }\n }\n handleHostClick(e) {\n if (this.disabled) {\n e.stopImmediatePropagation();\n }\n else if (!this.loading) {\n this.toggleChecked = !this.toggleChecked;\n }\n }\n render() {\n return (h(Host, { class: {\n [\"disabled\"]: this.disabled,\n [\"checked\"]: this.toggleChecked,\n [`${this.appearance}`]: true,\n [\"icon\"]: this.variant === \"icon\",\n [`${this.size}`]: true,\n [\"loading\"]: this.loading,\n }, onFocus: this.handleFocus }, h(\"ic-button\", { \"aria-pressed\": this.toggleChecked.toString(), variant: this.variant === \"icon\" ? \"icon\" : \"secondary\", onClick: this.handleClick, title: this.accessibleLabel, \"aria-label\": `${this.accessibleLabel ? this.accessibleLabel : this.label}, ${this.toggleChecked ? \"ticked\" : \"unticked\"}`, disabled: this.disabled, appearance: this.appearance, size: this.size, fullWidth: this.fullWidth, loading: this.loading, \"aria-disabled\": `${this.disabled}` }, this.variant !== \"icon\" && this.label, h(\"slot\", null), isSlotUsed(this.el, \"icon\") && (h(\"slot\", { name: \"icon\", slot: `${this.iconPosition ? `${this.iconPosition}-icon` : \"icon\"}` })), isSlotUsed(this.el, \"badge\") && (h(\"slot\", { name: \"badge\", slot: \"badge\" })))));\n }\n static get is() { return \"ic-toggle-button\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label that will be applied to the toggle button. This is required for the icon variant of toggle buttons.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForeground\",\n \"resolved\": \"\\\"dark\\\" | \\\"default\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForeground\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForeground\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the toggle button.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in disabled state.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icon in relation to the toggle button label.\"\n },\n \"attribute\": \"icon-placement\",\n \"reflect\": false\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label to display in the toggle button. This is required for the default variant of toggle buttons.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in loading state.\"\n },\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"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 toggle button to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"toggleChecked\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button will be in a checked state.\"\n },\n \"attribute\": \"toggle-checked\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"icToggleChecked\",\n \"name\": \"icToggleChecked\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the user clicks a toggle button.\"\n },\n \"complexType\": {\n \"original\": \"{\\n checked: boolean;\\n }\",\n \"resolved\": \"{ checked: boolean; }\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"click\",\n \"method\": \"handleHostClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button.js.map\n"],"mappings":"iJAAA,MAAMA,EAAoB,irN,MCMbC,EAAY,MACrB,WAAAC,CAAAC,G,2DACIC,KAAKC,qBAAuB,KAC5BD,KAAKE,qBAAuB,KACxBC,EAAYH,KAAK,EAErBA,KAAKI,YAAeC,IAChBA,EAAGC,0BAA0B,EAEjCN,KAAKO,YAAc,MACdP,KAAKQ,UACDR,KAAKS,UACNT,KAAKU,gBAAgBC,KAAK,CACtBC,QAASZ,KAAKa,eAChB,EAEVb,KAAKc,gBAAkBC,UACvBf,KAAKgB,WAAa,UAClBhB,KAAKS,SAAW,MAChBT,KAAKiB,UAAY,MACjBjB,KAAKkB,cAAgBH,UACrBf,KAAKmB,MAAQJ,UACbf,KAAKQ,QAAU,MACfR,KAAKoB,KAAO,UACZpB,KAAKa,cAAgB,MACrBb,KAAKqB,QAAU,S,CAEnB,oBAAAC,GACIC,EAAoBvB,KAAKS,SAAUT,KAAKwB,G,CAE5C,iBAAAC,GACIF,EAAoBvB,KAAKS,SAAUT,KAAKwB,IACxC,MAAME,EAAsB1B,KAAKwB,GAAGG,cAAcT,cAClDlB,KAAK4B,aAAe5B,KAAKkB,eAAiBQ,C,CAE9C,gBAAAG,GACIC,EAAiC,CAC7B,CACIC,KAAM/B,KAAKqB,UAAY,OAASrB,KAAKc,gBAAkBd,KAAKmB,MAC5Da,SAAUhC,KAAKqB,UAAY,OAAS,mBAAqB,UAE9D,iBACH,UAAWY,mBAAqB,YAAa,CACzCjC,KAAKC,qBAAuB,IAAIgC,iBAAiBjC,KAAKE,sBACtDF,KAAKC,qBAAqBiC,QAAQlC,KAAKwB,GAAI,CACvCW,UAAW,M,EAIvB,oBAAAC,GACI,GAAIpC,KAAKC,uBAAyB,MAC9BD,KAAKC,uBAAyBc,UAAW,CACzCf,KAAKC,qBAAqBoC,Y,EAGlC,eAAAC,CAAgBC,GACZ,GAAIvC,KAAKS,SAAU,CACf8B,EAAEjC,0B,MAED,IAAKN,KAAKQ,QAAS,CACpBR,KAAKa,eAAiBb,KAAKa,a,EAGnC,MAAA2B,GACI,OAAQC,EAAEC,EAAM,CAAEC,MAAO,CACjB,CAAC,YAAa3C,KAAKS,SACnB,CAAC,WAAYT,KAAKa,cAClB,CAAC,GAAGb,KAAKgB,cAAe,KACxB,CAAC,QAAShB,KAAKqB,UAAY,OAC3B,CAAC,GAAGrB,KAAKoB,QAAS,KAClB,CAAC,WAAYpB,KAAKQ,SACnBoC,QAAS5C,KAAKI,aAAeqC,EAAE,YAAa,CAAE,eAAgBzC,KAAKa,cAAcgC,WAAYxB,QAASrB,KAAKqB,UAAY,OAAS,OAAS,YAAayB,QAAS9C,KAAKO,YAAawC,MAAO/C,KAAKc,gBAAiB,aAAc,GAAGd,KAAKc,gBAAkBd,KAAKc,gBAAkBd,KAAKmB,UAAUnB,KAAKa,cAAgB,SAAW,aAAcJ,SAAUT,KAAKS,SAAUO,WAAYhB,KAAKgB,WAAYI,KAAMpB,KAAKoB,KAAMH,UAAWjB,KAAKiB,UAAWT,QAASR,KAAKQ,QAAS,gBAAiB,GAAGR,KAAKS,YAAcT,KAAKqB,UAAY,QAAUrB,KAAKmB,MAAOsB,EAAE,OAAQ,MAAOO,EAAWhD,KAAKwB,GAAI,SAAYiB,EAAE,OAAQ,CAAEQ,KAAM,OAAQC,KAAM,GAAGlD,KAAK4B,aAAe,GAAG5B,KAAK4B,oBAAsB,WAAcoB,EAAWhD,KAAKwB,GAAI,UAAaiB,EAAE,OAAQ,CAAEQ,KAAM,QAASC,KAAM,W,CAIlvB,yBAAWC,GAAmB,OAAO,IAAK,C"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,c as e,h as t,g as a}from"./p-8455d1bb.js";import{c as o,
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,c as e,h as t,g as a}from"./p-8455d1bb.js";import{c as o,r as s,u as r,a as c,i as n}from"./p-3a3a8a71.js";import"./p-fd186591.js";const l=`<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block;max-width:100%}.chip{display:flex;padding:var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.chip.large{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within),.chip.outlined.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--chip-custom-color, var(--ic-architectural-200));color:var(--chip-custom-foreground-color, black);border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline,.outlined{color:var(--ic-architectural-900);border:var(--ic-border-width) solid\n var(--chip-custom-color, var(--ic-architectural-900));padding:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.outline.small,.outlined.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.outline.large,.outlined.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.outline.disabled,.outlined.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-500)}.filled.disabled ic-typography{color:var(--ic-architectural-600)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}.chip.white-background{background-color:var(--ic-architectural-white)}.chip.white-background.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover-no-alpha) !important}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.filled{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}.filled.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const p=class{constructor(t){i(this,t);this.dismiss=e(this,"dismiss",7);this.icDismiss=e(this,"icDismiss",7);this.inAGGrid=false;this.dismissAction=()=>{this.dismiss.emit();this.icDismiss.emit()};this.mouseEnterHandler=()=>{this.hovered=true};this.mouseLeaveHandler=()=>{this.hovered=false};this.setChipColour=()=>{const i=o(this.customColor);if(i){const{r:e,g:t,b:a,a:o}=i;const s=(e*299+t*587+a*114)/1e3>133.3505?"black":"white";this.el.setAttribute("style",`--chip-custom-color: rgba(${e}, ${t}, ${a}, ${o}); --chip-custom-foreground-color: var(--ic-architectural-${s})`)}};this.hovered=false;this.visible=true;this.appearance=undefined;this.customColor=null;this.disabled=false;this.dismissible=false;this.label=undefined;this.size="default";this.transparentBackground=true;this.variant="filled";this.dismissLabel="Dismiss"}customColorHandler(){if(!this.dismissible){this.setChipColour()}}watchDisabledHandler(){s(this.disabled,this.el)}componentWillLoad(){s(this.disabled,this.el);if(!this.dismissible){this.setChipColour()}if(this.appearance==="outline"){this.variant="outlined"}}componentWillRender(){if(r(this.el)){this.inAGGrid=true}}componentDidLoad(){c([{prop:this.label,propName:"label"}],"Chip")}handleClick(){this.visible=!this.visible}async setFocus(){var i;(i=this.el.shadowRoot.querySelector("button"))===null||i===void 0?void 0:i.focus()}render(){const{label:i,appearance:e,variant:a,size:o,dismissible:s,visible:r,disabled:c,hovered:d,dismissLabel:p}=this;return r&&t("div",{class:{chip:true,[`${e}`]:e!==undefined,[`${a}`]:true,[`${o}`]:true,disabled:c,dismissible:s,hovered:d,"white-background":this.variant==="outlined"&&!this.transparentBackground}},n(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("ic-typography",{variant:"label","apply-vertical-margins":false,class:{label:true,"in-ag-grid":this.inAGGrid}},t("span",null,i)),s&&t("ic-tooltip",{label:p,target:"dismiss-icon",class:{"tooltip-disabled":c}},t("button",{id:"dismiss-icon",class:"dismiss-icon","aria-label":`${p} ${i} chip`,disabled:c,tabindex:c?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:l})),n(this.el,"badge")&&t("slot",{name:"badge"}))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{customColor:["customColorHandler"],disabled:["watchDisabledHandler"]}}};p.style=d;export{p as ic_chip};
|
2
|
+
//# sourceMappingURL=p-89ec372e.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icChipCss","Chip","constructor","hostRef","this","inAGGrid","dismissAction","dismiss","emit","icDismiss","mouseEnterHandler","hovered","mouseLeaveHandler","setChipColour","colorRGBA","convertToRGBA","customColor","r","g","b","a","foregroundColour","el","setAttribute","visible","appearance","undefined","disabled","dismissible","label","size","transparentBackground","variant","dismissLabel","customColorHandler","watchDisabledHandler","removeDisabledFalse","componentWillLoad","componentWillRender","isElInAGGrid","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","handleClick","setFocus","_a","shadowRoot","querySelector","focus","render","h","class","chip","isSlotUsed","name","target","id","tabindex","onClick","onMouseEnter","onMouseLeave","innerHTML","dismissIcon","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","../web-components/dist/collection/components/ic-chip/ic-chip.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 display: inline-block;\n max-width: 100%;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n text-align: left;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--chip-custom-color, var(--ic-architectural-200));\n color: var(--chip-custom-foreground-color, black);\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline,\n.outlined {\n color: var(--ic-architectural-900);\n border: var(--ic-border-width) solid\n var(--chip-custom-color, var(--ic-architectural-900));\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.outline.small,\n.outlined.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n}\n\n.outline.large,\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n.outline.disabled,\n.outlined.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-500);\n}\n\n.filled.disabled ic-typography {\n color: var(--ic-architectural-600);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n.chip.white-background {\n background-color: var(--ic-architectural-white);\n}\n\n.chip.white-background.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover-no-alpha) !important;\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n }\n\n .chip.disabled {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import { h, } from \"@stencil/core\";\nimport { onComponentRequiredPropUndefined, isSlotUsed, removeDisabledFalse, convertToRGBA, isElInAGGrid, } from \"../../utils/helpers\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n * @slot badge - Badge component overlaying the top right of the chip.\n */\nexport class Chip {\n constructor() {\n this.inAGGrid = false;\n this.dismissAction = () => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n this.mouseEnterHandler = () => {\n this.hovered = true;\n };\n this.mouseLeaveHandler = () => {\n this.hovered = false;\n };\n this.setChipColour = () => {\n const colorRGBA = convertToRGBA(this.customColor);\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n const foregroundColour = (r * 299 + g * 587 + b * 114) / 1000 > 133.3505 ? \"black\" : \"white\";\n this.el.setAttribute(\"style\", `--chip-custom-color: rgba(${r}, ${g}, ${b}, ${a}); --chip-custom-foreground-color: var(--ic-architectural-${foregroundColour})`);\n }\n };\n this.hovered = false;\n this.visible = true;\n this.appearance = undefined;\n this.customColor = null;\n this.disabled = false;\n this.dismissible = false;\n this.label = undefined;\n this.size = \"default\";\n this.transparentBackground = true;\n this.variant = \"filled\";\n this.dismissLabel = \"Dismiss\";\n }\n customColorHandler() {\n if (!this.dismissible) {\n this.setChipColour();\n }\n }\n watchDisabledHandler() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n if (!this.dismissible) {\n this.setChipColour();\n }\n if (this.appearance === \"outline\") {\n this.variant = \"outlined\";\n }\n }\n componentWillRender() {\n if (isElInAGGrid(this.el)) {\n this.inAGGrid = true;\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Chip\");\n }\n handleClick() {\n this.visible = !this.visible;\n }\n /**\n * Sets focus on the chip.\n */\n async setFocus() {\n var _a;\n (_a = this.el.shadowRoot.querySelector(\"button\")) === null || _a === void 0 ? void 0 : _a.focus();\n }\n render() {\n const { label, appearance, variant, size, dismissible, visible, disabled, hovered, dismissLabel, } = this;\n return (visible && (h(\"div\", { class: {\n chip: true,\n [`${appearance}`]: appearance !== undefined,\n [`${variant}`]: true,\n [`${size}`]: true,\n disabled,\n dismissible,\n hovered,\n \"white-background\": this.variant === \"outlined\" && !this.transparentBackground,\n } }, isSlotUsed(this.el, \"icon\") && (h(\"div\", { class: \"icon\" }, h(\"slot\", { name: \"icon\" }))), h(\"ic-typography\", { variant: \"label\", \"apply-vertical-margins\": false, class: { label: true, \"in-ag-grid\": this.inAGGrid } }, h(\"span\", null, label)), dismissible && (h(\"ic-tooltip\", { label: dismissLabel, target: \"dismiss-icon\", class: { \"tooltip-disabled\": disabled } }, h(\"button\", { id: \"dismiss-icon\", class: \"dismiss-icon\", \"aria-label\": `${dismissLabel} ${label} chip`, disabled: disabled, tabindex: disabled ? -1 : 0, onClick: this.dismissAction, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, innerHTML: dismissIcon }))), isSlotUsed(this.el, \"badge\") && h(\"slot\", { name: \"badge\" }))));\n }\n static get is() { return \"ic-chip\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-chip.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-chip.css\"]\n };\n }\n static get properties() {\n return {\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcChipAppearance\",\n \"resolved\": \"\\\"filled\\\" | \\\"outline\\\"\",\n \"references\": {\n \"IcChipAppearance\": {\n \"location\": \"import\",\n \"path\": \"./ic-chip.types\",\n \"id\": \"src/components/ic-chip/ic-chip.types.ts::IcChipAppearance\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Use variant prop instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"appearance\",\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\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom chip colour. This prop will be applied to the chip component if `dismissible` is set to `false`.\\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 \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the chip will appear disabled.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"dismissible\": {\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 chip will have a close button at the end to dismiss it.\"\n },\n \"attribute\": \"dismissible\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text rendered within the chip.\"\n },\n \"attribute\": \"label\",\n \"reflect\": 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 chip.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"transparentBackground\": {\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 outlined variant of chip will have a transparent background rather than white.\"\n },\n \"attribute\": \"transparent-background\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcEmphasisType\",\n \"resolved\": \"\\\"filled\\\" | \\\"outlined\\\"\",\n \"references\": {\n \"IcEmphasisType\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcEmphasisType\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The emphasis of the chip.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"filled\\\"\"\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\": \"The text in the dismiss button tooltip and aria label.\"\n },\n \"attribute\": \"dismiss-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Dismiss\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"hovered\": {},\n \"visible\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"dismiss\",\n \"name\": \"dismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This event should not be used anymore. Use icDismiss instead.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icDismiss\",\n \"name\": \"icDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Is emitted when the user dismisses the chip.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the chip.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"customColor\",\n \"methodName\": \"customColorHandler\"\n }, {\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icDismiss\",\n \"method\": \"handleClick\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-chip.js.map\n"],"mappings":"wdAAA,MAAMA,EAAY,krK,MCOLC,EAAI,MACb,WAAAC,CAAAC,G,gFACIC,KAAKC,SAAW,MAChBD,KAAKE,cAAgB,KACjBF,KAAKG,QAAQC,OACbJ,KAAKK,UAAUD,MAAM,EAEzBJ,KAAKM,kBAAoB,KACrBN,KAAKO,QAAU,IAAI,EAEvBP,KAAKQ,kBAAoB,KACrBR,KAAKO,QAAU,KAAK,EAExBP,KAAKS,cAAgB,KACjB,MAAMC,EAAYC,EAAcX,KAAKY,aACrC,GAAIF,EAAW,CACX,MAAMG,EAAEA,EAACC,EAAEA,EAACC,EAAEA,EAACC,EAAEA,GAAMN,EACvB,MAAMO,GAAoBJ,EAAI,IAAMC,EAAI,IAAMC,EAAI,KAAO,IAAO,SAAW,QAAU,QACrFf,KAAKkB,GAAGC,aAAa,QAAS,6BAA6BN,MAAMC,MAAMC,MAAMC,8DAA8DC,K,GAGnJjB,KAAKO,QAAU,MACfP,KAAKoB,QAAU,KACfpB,KAAKqB,WAAaC,UAClBtB,KAAKY,YAAc,KACnBZ,KAAKuB,SAAW,MAChBvB,KAAKwB,YAAc,MACnBxB,KAAKyB,MAAQH,UACbtB,KAAK0B,KAAO,UACZ1B,KAAK2B,sBAAwB,KAC7B3B,KAAK4B,QAAU,SACf5B,KAAK6B,aAAe,S,CAExB,kBAAAC,GACI,IAAK9B,KAAKwB,YAAa,CACnBxB,KAAKS,e,EAGb,oBAAAsB,GACIC,EAAoBhC,KAAKuB,SAAUvB,KAAKkB,G,CAE5C,iBAAAe,GACID,EAAoBhC,KAAKuB,SAAUvB,KAAKkB,IACxC,IAAKlB,KAAKwB,YAAa,CACnBxB,KAAKS,e,CAET,GAAIT,KAAKqB,aAAe,UAAW,CAC/BrB,KAAK4B,QAAU,U,EAGvB,mBAAAM,GACI,GAAIC,EAAanC,KAAKkB,IAAK,CACvBlB,KAAKC,SAAW,I,EAGxB,gBAAAmC,GACIC,EAAiC,CAAC,CAAEC,KAAMtC,KAAKyB,MAAOc,SAAU,UAAY,O,CAEhF,WAAAC,GACIxC,KAAKoB,SAAWpB,KAAKoB,O,CAKzB,cAAMqB,GACF,IAAIC,GACHA,EAAK1C,KAAKkB,GAAGyB,WAAWC,cAAc,aAAe,MAAQF,SAAY,OAAS,EAAIA,EAAGG,O,CAE9F,MAAAC,GACI,MAAMrB,MAAEA,EAAKJ,WAAEA,EAAUO,QAAEA,EAAOF,KAAEA,EAAIF,YAAEA,EAAWJ,QAAEA,EAAOG,SAAEA,EAAQhB,QAAEA,EAAOsB,aAAEA,GAAkB7B,KACrG,OAAQoB,GAAY2B,EAAE,MAAO,CAAEC,MAAO,CAC9BC,KAAM,KACN,CAAC,GAAG5B,KAAeA,IAAeC,UAClC,CAAC,GAAGM,KAAY,KAChB,CAAC,GAAGF,KAAS,KACbH,WACAC,cACAjB,UACA,mBAAoBP,KAAK4B,UAAY,aAAe5B,KAAK2B,wBACxDuB,EAAWlD,KAAKkB,GAAI,SAAY6B,EAAE,MAAO,CAAEC,MAAO,QAAUD,EAAE,OAAQ,CAAEI,KAAM,UAAaJ,EAAE,gBAAiB,CAAEnB,QAAS,QAAS,yBAA0B,MAAOoB,MAAO,CAAEvB,MAAO,KAAM,aAAczB,KAAKC,WAAc8C,EAAE,OAAQ,KAAMtB,IAASD,GAAgBuB,EAAE,aAAc,CAAEtB,MAAOI,EAAcuB,OAAQ,eAAgBJ,MAAO,CAAE,mBAAoBzB,IAAcwB,EAAE,SAAU,CAAEM,GAAI,eAAgBL,MAAO,eAAgB,aAAc,GAAGnB,KAAgBJ,SAAcF,SAAUA,EAAU+B,SAAU/B,GAAY,EAAI,EAAGgC,QAASvD,KAAKE,cAAesD,aAAcxD,KAAKM,kBAAmBmD,aAAczD,KAAKQ,kBAAmBkD,UAAWC,KAAkBT,EAAWlD,KAAKkB,GAAI,UAAY6B,EAAE,OAAQ,CAAEI,KAAM,U,CAI3sB,yBAAWS,GAAmB,OAAO,IAAK,C"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as o,h as t,H as e,g as i}from"./p-8455d1bb.js";import{D as r,
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as o,h as t,H as e,g as i}from"./p-8455d1bb.js";import{D as r,d as n,a as l}from"./p-3a3a8a71.js";import"./p-fd186591.js";const s='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host(.footer-link-group-sparse){--footer-link-group-margin-right:5.938rem;--footer-link-group-border-bottom:0 solid transparent;--footer-link-group-title-margin-top:0;--footer-link-group-title-margin-bottom:var(--ic-space-md)}:host(.footer-link-group-small){--footer-link-group-margin-right:0;--footer-link-group-title-margin-top:var(--ic-space-md);--footer-link-group-title-margin-bottom:var(--ic-space-md);--footer-link-group-links-padding-left:var(--ic-space-md);--footer-link-group-links-padding-bottom:var(--ic-space-md)}:host(.footer-link-group-light.footer-link-group-small){--footer-link-group-border-bottom:var(--ic-keyline-lighten)}:host(.footer-link-group-dark.footer-link-group-small){--footer-link-group-border-bottom:var(--ic-keyline-darken)}:host(.footer-link-group){margin-right:var(--footer-link-group-margin-right);border-bottom:var(--footer-link-group-border-bottom)}:host(.footer-link-group-small.footer-link-group-light:hover){background-color:var(--ic-action-light-bg-hover);cursor:pointer}:host(.footer-link-group-small.footer-link-group-dark:hover){background-color:var(--ic-action-dark-bg-hover);cursor:pointer}:host(.footer-link-group-sparse:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline);z-index:1}:host(.footer-link-group-small.footer-link-group-light:active){background-color:var(--ic-action-light-bg-active)}:host(.footer-link-group-small.footer-link-group-dark:active){background-color:var(--ic-action-dark-bg-active)}:host ic-section-container{outline:none}.footer-link-group-title{margin-top:var(--footer-link-group-title-margin-top);margin-bottom:var(--footer-link-group-title-margin-bottom);flex-grow:1}.footer-link-group-toggle{fill:white !important}.footer-link-group-links{display:flex;flex-direction:column}.footer-link-group-header{display:flex;align-items:center}';const a=class{constructor(t){o(this,t);this.handleKeydown=o=>{if(o.key===" "||o.key==="Enter"){this.toggleExpanded()}};this.toggleExpanded=()=>{this.expanded=!this.expanded};this.expanded=false;this.deviceSize=r.XL;this.dropdownIconStyle=n();this.small=false;this.groupTitle=undefined}componentWillLoad(){this.small=this.isSmall(this.el)}componentDidLoad(){l([{prop:this.groupTitle,propName:"group-title"}],"Footer Link Group")}footerResizeHandler(){this.small=this.isSmall(this.el)}footerThemeChangeHandler(o){const t=o.detail;this.dropdownIconStyle=t.mode}isSmall(o){if(o.parentElement!==null){if(o.parentElement.classList.contains("footer")){return o.parentElement.classList.contains("footer-small")}else{return this.isSmall(o.parentElement)}}else{return false}}render(){const{small:o,groupTitle:i}=this;return!o?t(e,{class:{["footer-link-group footer-link-group-sparse"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true},role:"listitem"},t("div",{class:"footer-link-group-title"},t("ic-typography",{variant:"subtitle-small"},i)),t("div",{class:"footer-link-group-links",role:"list"},t("slot",null))):t(e,{class:{["footer-link-group footer-link-group-small"]:true,[`footer-link-group-${this.dropdownIconStyle}`]:true},onClick:this.toggleExpanded,onKeydown:this.handleKeydown,"aria-expanded":this.expanded,role:"listitem"},t("ic-section-container",{tabindex:"0",fullHeight:true},t("div",{class:"footer-link-group-header"},t("div",{class:"footer-link-group-title"},t("ic-typography",{variant:"label"},i)),this.expanded?t("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},t("path",{fill:"currentColor",d:"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z"})):t("svg",{class:"footer-link-group-toggle",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1200 1200"},t("g",{transform:"translate(0 1200) scale(1 -1)"},t("path",{fill:"currentColor",d:"M600.002 210.605L421.285 389.336L0 810.559l178.721 178.836l421.281-421.341l421.281 421.341L1200 810.559L778.733 389.336L600.002 210.605z"})))),this.expanded&&t("div",{class:"footer-link-group-links",role:"list"},t("slot",null))))}static get delegatesFocus(){return true}get el(){return i(this)}};a.style=s;export{a as ic_footer_link_group};
|
2
|
+
//# sourceMappingURL=p-9271a06b.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-8455d1bb.js";import{c as o}from"./p-e081702e.js";import{f as n,d as r,i as h,a as l}from"./p-8128572e.js";import"./p-fd186591.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0}:host(.fade-in){opacity:1}:host(.disable-height-constraint){background:none;justify-content:unset;align-items:unset}.dialog.disable-height-constraint{max-height:none;position:relative}.dialog.disable-height-constraint .content-area{overflow-y:visible}@media (prefers-reduced-motion: no-preference){:host{transition:opacity var(--ic-easing-transition-slow)}.dialog{transform:translateY(-3rem);transition:transform 1000s}:host(.fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}}:host(.hidden){display:none}.dialog{background-color:var(--ic-architectural-white);color:var(--ic-architectural-black);border:var(--ic-border-default);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) 0 var(--ic-space-md);display:flex;flex-direction:column;box-sizing:border-box;overflow-x:visible}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs);padding:0 var(--ic-space-md)}.heading{overflow-wrap:break-word}.close-icon{margin-left:auto}.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"]) .dialog:not(.disable-width-constraint)>.content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;transform:translateY(-5rem);max-width:none;max-height:none;box-sizing:border-box}.backdrop{padding:0}.dialog.disable-height-constraint{height:auto;min-height:100vh}}@media (max-width: 364px){.triple-button{flex-direction:column;gap:var(--ic-space-xs)}.dialog-control-button{width:unset}}';const c=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.IC_ACCORDION_GROUP="IC-ACCORDION-GROUP";this.resizeObserver=null;this.dialogOpened=()=>{var t;this.dialogRendered=true;if(this.disableHeightConstraint){this.dialogEl.show()}else{(t=this.dialogEl)===null||t===void 0?void 0:t.showModal()}setTimeout((()=>{this.fadeIn=true;if(this.disableHeightConstraint&&this.backdropEl.scrollTop!==0){this.backdropEl.scrollTop=0}}),10);setTimeout((()=>{this.setInitialFocus();n(this.runResizeObserver)}),75);setTimeout((()=>{this.getFocusedElementIndex();this.icDialogOpened.emit()}),80)};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout(this.resizeObserverCallback,80)}));this.resizeObserver.observe(this.dialogEl)};this.resizeObserverCallback=()=>{if(this.dialogEl.clientHeight!==this.dialogHeight){this.dialogHeight=this.dialogEl.clientHeight}};this.refreshInteractiveElementsOnSlotChange=()=>{this.contentArea=this.el.shadowRoot.querySelector("#dialog-content slot");this.contentArea.addEventListener("slotchange",this.getInteractiveElements)};this.removeSlotChangeListener=()=>{if(this.contentArea){this.contentArea.removeEventListener("slotchange",this.getInteractiveElements)}};this.setInitialFocus=()=>{this.sourceElement=document.activeElement;let 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_GROUP){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"||i.tagName===this.IC_ACCORDION_GROUP&&i.hasAttribute("single-expansion");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_GROUP){i.setFocus()}else 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:n,heading:r,label:l,status:d,destructive:c,dismissLabel:u,hideCloseButton:m}=this;return e("dialog",{class:{["dialog"]:true,[`${n}`]:true,["disable-height-constraint"]:this.disableHeightConstraint,["disable-width-constraint"]:this.disableWidthConstraint},"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:o,"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.disableWidthConstraint=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()}!h(this.el,"heading")&&l([{prop:this.heading,propName:"heading"}],"Dialog")}componentDidRender(){if(getComputedStyle(this.el).display!=="none"&&this.disableHeightConstraint){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}}handleKeyboard(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"]}}};c.style=d;export{c as ic_dialog};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-8455d1bb.js";import{c as o}from"./p-e081702e.js";import{j as n,e as r,i as h,a as l}from"./p-3a3a8a71.js";import"./p-fd186591.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0}:host(.fade-in){opacity:1}:host(.disable-height-constraint){background:none;justify-content:unset;align-items:unset}.dialog.disable-height-constraint{max-height:none;position:relative}.dialog.disable-height-constraint .content-area{overflow-y:visible}@media (prefers-reduced-motion: no-preference){:host{transition:opacity var(--ic-easing-transition-slow)}.dialog{transform:translateY(-3rem);transition:transform 1000s}:host(.fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}}:host(.hidden){display:none}.dialog{background-color:var(--ic-architectural-white);color:var(--ic-architectural-black);border:var(--ic-border-default);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) 0 var(--ic-space-md);display:flex;flex-direction:column;box-sizing:border-box;overflow-x:visible}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs);padding:0 var(--ic-space-md)}.heading{overflow-wrap:break-word}.close-icon{margin-left:auto}.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"]) .dialog:not(.disable-width-constraint)>.content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;transform:translateY(-5rem);max-width:none;max-height:none;box-sizing:border-box}.backdrop{padding:0}.dialog.disable-height-constraint{height:auto;min-height:100vh}}@media (max-width: 364px){.triple-button{flex-direction:column;gap:var(--ic-space-xs)}.dialog-control-button{width:unset}}';const c=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.IC_ACCORDION_GROUP="IC-ACCORDION-GROUP";this.resizeObserver=null;this.dialogOpened=()=>{var t;this.dialogRendered=true;if(this.disableHeightConstraint){this.dialogEl.show()}else{(t=this.dialogEl)===null||t===void 0?void 0:t.showModal()}setTimeout((()=>{this.fadeIn=true;if(this.disableHeightConstraint&&this.backdropEl.scrollTop!==0){this.backdropEl.scrollTop=0}}),10);setTimeout((()=>{this.setInitialFocus();n(this.runResizeObserver)}),75);setTimeout((()=>{this.getFocusedElementIndex();this.icDialogOpened.emit()}),80)};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout(this.resizeObserverCallback,80)}));this.resizeObserver.observe(this.dialogEl)};this.resizeObserverCallback=()=>{if(this.dialogEl.clientHeight!==this.dialogHeight){this.dialogHeight=this.dialogEl.clientHeight}};this.refreshInteractiveElementsOnSlotChange=()=>{this.contentArea=this.el.shadowRoot.querySelector("#dialog-content slot");this.contentArea.addEventListener("slotchange",this.getInteractiveElements)};this.removeSlotChangeListener=()=>{if(this.contentArea){this.contentArea.removeEventListener("slotchange",this.getInteractiveElements)}};this.setInitialFocus=()=>{this.sourceElement=document.activeElement;let 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_GROUP){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"||i.tagName===this.IC_ACCORDION_GROUP&&i.hasAttribute("single-expansion");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_GROUP){i.setFocus()}else 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:n,heading:r,label:l,status:d,destructive:c,dismissLabel:u,hideCloseButton:m}=this;return e("dialog",{class:{["dialog"]:true,[`${n}`]:true,["disable-height-constraint"]:this.disableHeightConstraint,["disable-width-constraint"]:this.disableWidthConstraint},"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:o,"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.disableWidthConstraint=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()}!h(this.el,"heading")&&l([{prop:this.heading,propName:"heading"}],"Dialog")}componentDidRender(){if(getComputedStyle(this.el).display!=="none"&&this.disableHeightConstraint){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}}handleKeyboard(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"]}}};c.style=d;export{c as ic_dialog};
|
2
|
+
//# sourceMappingURL=p-9445c2f3.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as h}from"./p-8455d1bb.js";import{a,s as n,x as r,r as l,t as o,v as c,o as d,D as u,B as f,w as p,I as b,h as m,j as v}from"./p-b9d9273f.js";import{b as w,i as g,j as y,s as k,h as x,k as $}from"./p-33dd24eb.js";const D=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M15.8327 5.34199L14.6577 4.16699L9.99935 8.82533L5.34102 4.16699L4.16602 5.34199L8.82435 10.0003L4.16602 14.6587L5.34102 15.8337L9.99935 11.1753L14.6577 15.8337L15.8327 14.6587L11.1743 10.0003L15.8327 5.34199Z" fill="currentColor"/>\n</svg>\n`;const Y=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M16.6667 2.50004H15.8334V0.833374H14.1667V2.50004H5.83342V0.833374H4.16675V2.50004H3.33341C2.41675 2.50004 1.66675 3.25004 1.66675 4.16671V17.5C1.66675 18.4167 2.41675 19.1667 3.33341 19.1667H16.6667C17.5834 19.1667 18.3334 18.4167 18.3334 17.5V4.16671C18.3334 3.25004 17.5834 2.50004 16.6667 2.50004ZM16.6667 17.5H3.33341V6.66671H16.6667V17.5Z" fill="currentColor"/>\n</svg>`;const M='/*! 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}input{border:0;height:100%;padding:0;outline:none;background:none;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}input:-webkit-autofill{box-shadow:0 0 0 var(--ic-space-sm) var(--ic-architectural-white) inset}ic-input-component-container{cursor:text}ic-input-component-container,ic-input-component-container:hover{color:var(--ic-color-tertiary-text)}ic-input-component-container .focus-indicator{padding:var(--ic-space-xxxs) var(--ic-space-xs);align-items:center}.day-input{width:1.438rem}.month-input{width:1.813rem}.year-input,.year-input.fit-to-value{width:2.313rem}.fit-to-value{width:1.25rem}.sr-only{position:absolute;left:-9999px}.input-container{width:100%;display:flex;justify-content:space-between;align-items:center;position:relative}.action-buttons{display:flex;align-items:center}.show-calendar-button-wrapper{display:flex;justify-content:center;align-items:center}.clear-button,.calendar-button{border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);margin:0}.clear-button.hidden{display:none}.clear-button:focus,.calendar-button:focus,.clear-button:active,.calendar-button:active{background-color:var(--ic-focus-blue) !important;box-shadow:inset 0 0 0 0.125rem var(--ic-focus-glow) !important;border-radius:0.25rem}.clear-button:focus,.calendar-button:focus,.clear-button:active *,.calendar-button:active *{fill:var(--ic-architectural-white)}.divider{margin:0 var(--ic-space-xxs);width:var(--ic-space-1px);background-color:var(--ic-architectural-400);border-radius:var(--ic-space-1px)}.divider.small{height:var(--ic-space-md)}.divider.default{height:calc(var(--ic-space-sm) + var(--ic-space-xs))}.divider.large{height:var(--ic-space-lg)}';let z=0;const H=class{constructor(e){t(this,e);this.calendarButtonClicked=i(this,"calendarButtonClicked",7);this.icBlur=i(this,"icBlur",7);this.icChange=i(this,"icChange",7);this.icFocus=i(this,"icFocus",7);this.ARIA_INVALID="aria-invalid";this.ARIA_LABEL="aria-label";this.ARIA_LABELLED_BY="aria-labelledby";this.EVENT_OBJECT_STRING="[object Event]";this.FIT_TO_VALUE="fit-to-value";this.initialValue=this.value;this.INPUT_EVENT_OBJECT_STRING="[object InputEvent]";this.inputsInOrder=[];this.isAfterMax=false;this.isBeforeMin=false;this.isDateSetFromKeyboardEvent=false;this.isDisabledDate=false;this.isValidDay=true;this.isValidMonth=true;this.isValidDate=true;this.isZuluTime=false;this.KEYBOARD_EVENT_OBJECT_STRING="[object KeyboardEvent]";this.MAX_DAY=31;this.MAX_MONTH=12;this.previousEmittedDate=undefined;this.previousSelectedDate=null;this.selectedDate=null;this.setInputPasteValue=(t,i)=>{const s=t;s.value=i;s.classList.add(this.FIT_TO_VALUE)};this.checkSingleCopiedValueIsValid=(t,i)=>{let s=false;const e=Number(i);switch(t){case this.dayInputEl:s=e>=1&&e<=this.MAX_DAY;break;case this.monthInputEl:s=e>=1&&e<=this.MAX_MONTH;break;case this.yearInputEl:s=true;break;default:s=false;break}return s};this.isKeyboardOrEvent=t=>Object.prototype.toString.call(t)===this.EVENT_OBJECT_STRING||Object.prototype.toString.call(t)===this.KEYBOARD_EVENT_OBJECT_STRING;this.setDateValidity=()=>{if(!a(this.day)){this.isValidDay=+this.day>this.MAX_DAY?false:true}else{this.isValidDay=true}if(!a(this.month)){this.isValidMonth=+this.month>this.MAX_MONTH?false:true}else{this.isValidMonth=true}};this.handleInput=t=>{const i=t;const s=t.target;if(s!==this.yearInputEl){if(i.inputType!=="deleteContentBackward"&&!this.preventAutoFormatting){if(s.value.length===1&&(s===this.dayInputEl&&+s.value>=4||s===this.monthInputEl&&+s.value>=2)&&+s.value<=9){this.setInputValue(s);this.notifyScreenReader(s,t);this.moveToNextInput(s)}if(s.value.length===2){if(+s.value===0){s.value="01"}this.setInputValue(s);this.setPreventInput(s,true);this.notifyScreenReader(s,t);this.moveToNextInput(s)}else{this.setPreventInput(s,false)}}else if(this.preventAutoFormatting){if(s.value.length===2&&!this.isKeyboardOrEvent(t)){this.setInputValue(s);this.setPreventInput(s,true);this.moveToNextInput(s)}else{this.setInputValue(s)}}if(s.value.length!==2){this.setPreventInput(s,false)}}else{if(s.value.length===4){this.setInputValue(s);if(Object.prototype.toString.call(t)!==this.EVENT_OBJECT_STRING){this.moveToNextInput(s)}this.setPreventInput(s,true)}else{this.setInputValue(s,true);this.setPreventInput(s,false)}}this.setFitToValueStyling(s);if(s.value.length===0){this.setInputValue(s,true);this.setValidationMessage()}this.notifyScreenReader(s,t)};this.handleKeyDown=(t,i)=>{var s;const e=t.target;const h=(s=t.key)===null||s===void 0?void 0:s.toLowerCase();const a=/-?\d*\.?\d+(e[-+]?\d+)?|[/-]|arrowup|arrowdown|arrowleft|arrowright|shift|tab|backspace|delete/;if(!a.test(h)&&!((t.ctrlKey||t.metaKey)&&(h==="v"||h==="c"))){t.preventDefault()}switch(h){case"/":case"-":case".":t.preventDefault();this.setPasteInvalidText();this.moveToNextInput(e);break;case"arrowright":case"arrowleft":t.preventDefault();this.handleLeftRightArrowKeyPress(e,h);break;case"arrowup":case"arrowdown":this.preventAutoFormatting=true;this.handleUpDownArrowKeyPress(e,t);break}this.preventInput(t,i);this.isDateSetFromKeyboardEvent=true};this.handleFocus=t=>{const i=t.target;i.select()};this.handleBlur=t=>{const i=t.target;this.setPasteInvalidText();this.autocompleteInput(i)};this.handleLeftRightArrowKeyPress=(t,i)=>{if(i==="arrowright"){this.moveToNextInput(t)}else{this.moveToPreviousInput(t)}this.setPasteInvalidText()};this.notifyScreenReaderSelectedDate=()=>{const t=n(m);const i=n(v);this.selectedDateInfoEl.textContent=`Selected date: ${t[this.selectedDate.getDay()]}, ${this.selectedDate.getDate()} ${i[this.selectedDate.getMonth()]} ${this.selectedDate.getFullYear()}`};this.handleUpDownArrowKeyPress=(t,i)=>{const s=t===this.yearInputEl?0:1;let e;switch(t){case this.dayInputEl:e=this.MAX_DAY;break;case this.monthInputEl:e=this.MAX_MONTH;break;case this.yearInputEl:e=9999}if(t===null||t===void 0?void 0:t.value){if(i.key==="ArrowUp"){if(+t.value===e){i.preventDefault();t.value=`0${s}`}else{t.value=+t.value+1<10?`0${+t.value+1}`:(+t.value+1).toString()}this.notifyScreenReader(t,i)}if(i.key==="ArrowDown"){if(+t.value===s){i.preventDefault();t.value=e.toString()}else{t.value=+t.value-1<10?`0${+t.value-1}`:(+t.value-1).toString()}this.notifyScreenReader(t,i)}}else{if(i.key==="ArrowDown"){i.preventDefault();if(t===this.yearInputEl){t.value=(new Date).getFullYear().toString()}else{t.value=e.toString()}this.notifyScreenReader(t,i)}else if(i.key==="ArrowUp"){i.preventDefault();if(t===this.yearInputEl){t.value=(new Date).getFullYear().toString()}else{t.value=`0${s}`}this.notifyScreenReader(t,i)}}this.setInputValue(t);this.setFitToValueStyling(t)};this.handleDateChange=t=>{if(t||!w(this.selectedDate,this.previousSelectedDate)){if(this.value){this.inputsInOrder.forEach((t=>{t.classList.add(this.FIT_TO_VALUE)}))}if(this.day&&this.month&&this.year&&this.invalidDateText===""){this.setValueAndEmitChange(this.selectedDate);this.notifyScreenReaderSelectedDate()}else if(!(this.selectedDate===null&&this.previousSelectedDate===null)){this.setValueAndEmitChange(null);this.selectedDateInfoEl.textContent=""}this.previousSelectedDate=this.selectedDate;if(!this.isDateSetFromKeyboardEvent){this.updateInputValues(this.day,this.month,this.year)}}};this.slicePastedDate=(t,i)=>i.length>t?i.slice(0,t):i;this.isPastedStringDateValid=t=>{if(/\d+-\d+-\d+$/.test(t)||/\d+\/\d+\/\d+/.test(t)||/\d+\.\d+\.\d+/.test(t)){return true}if(/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:\.\d+)?)?Z/.test(t)){this.isZuluTime=true;return true}return false};this.handlePaste=t=>{t.preventDefault();const i=t.clipboardData.getData("Text");const s=this.isPastedStringDateValid(i);this.setPastedValueAndValidation(s,i,t)};this.setDate=t=>{if(t===null||t===""||t===undefined){this.day=null;this.month=null;this.year=null;this.inputsInOrder.forEach((t=>{t.classList.remove(this.FIT_TO_VALUE);this.setPreventInput(t,false)}));this.handleDateChange(true)}else{if(g(t)){let i;if(typeof t==="string"){i=new Date(+t)}else{i=t}this.day=y(i.getDate());this.month=y(i.getMonth()+1);this.year=i.getFullYear().toString()}else if(typeof t==="string"){const i=k(t,this.dateFormat);this.year=i[0];this.month=i[1];this.day=i[2]}}this.setValidationMessage()};this.formatMinMax=t=>{let i;const s=y(t.getDate());const e=y(t.getMonth()+1);const h=t.getFullYear();switch(this.dateFormat){case"DD/MM/YYYY":i=`${s}/${e}/${h}`;break;case"MM/DD/YYYY":i=`${e}/${s}/${h}`;break;case"YYYY/MM/DD":i=`${h}/${e}/${s}`;break}return i};this.updateInputValues=(t,i,s)=>{this.dayInputEl.value=t;this.monthInputEl.value=i;this.yearInputEl.value=s};this.setInputValue=(t,i=false)=>{const s=i?"":t.value;switch(t){case this.dayInputEl:this.day=s;break;case this.monthInputEl:this.month=s;break;case this.yearInputEl:if(this.year!==s){this.year=s}}this.setValidationMessage()};this.setValidationMessage=()=>{this.setDateValidity();if(!a(this.day)&&!a(this.month)&&!a(this.year)){this.selectedDate=this.convertToDate(this.year,this.month,this.day);this.isValidDate=+this.selectedDate!==0&&this.selectedDate.getDate()==+this.day;this.isDisabledDate=this.isSelectedDateDisabled();if(!this.isValidDate||this.isDisabledDate){this.inputsInOrder.forEach((t=>t.setAttribute(this.ARIA_INVALID,"true")))}else{this.inputsInOrder.forEach((t=>t.removeAttribute(this.ARIA_INVALID)))}}else{this.selectedDate=null}if(!(this.isValidDay&&this.isValidMonth&&this.isValidDate)){this.invalidDateText=this.invalidDateMessage}else if(this.isDisabledDate&&this.selectedDate!==null){if(this.isBeforeMin){if(this.disablePast){this.invalidDateText=this.disablePastMessage}else{this.invalidDateText=`Please enter a date after ${this.formatMinMax(this.minDate)}.`}}else if(this.isAfterMax){if(this.disableFuture){this.invalidDateText=this.disableFutureMessage}else{this.invalidDateText=`Please enter a date before ${this.formatMinMax(this.maxDate)}.`}}else if(this.disableDays.length!==0){this.invalidDateText=this.disableDaysMessage}else{if(this.disablePast){this.invalidDateText=this.disablePastMessage}if(this.disableFuture){this.invalidDateText=this.disableFutureMessage}}}else{this.invalidDateText=""}};this.setInputsInOrder=()=>{const t=this.el.shadowRoot.querySelectorAll("input");t.forEach((t=>this.inputsInOrder.push(t)))};this.setAriaLabelledBy=()=>{var t,i;if(this.disabled&&!a((t=this.inputCompContainerEl)===null||t===void 0?void 0:t.getAttribute(this.ARIA_LABELLED_BY))){this.removeAriaLabelledBy();return}if(this.disabled){return}const s=this.el.shadowRoot.querySelector("label");const e=`${this.inputId}-label`;if(s!==null&&s!==undefined){s.id=e}const h=!a(this.validationStatus)&&!a(this.validationText)||!a(this.invalidDateText);const n=`${(i=s===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:""} ${this.screenReaderInfoId} ${r(this.inputId,this.helperText!==""&&this.helperText!==this.defaultHelperText,h)} ${this.selectedDate?this.selectedDateInfoId:""} ${this.assistiveHintId}`;this.inputCompContainerEl.setAttribute(this.ARIA_LABELLED_BY,n)};this.setPreventInput=(t,i)=>{switch(t){case this.dayInputEl:this.preventDayInput=i;break;case this.monthInputEl:this.preventMonthInput=i;break;case this.yearInputEl:this.preventYearInput=i}};this.getInputFromDatePart=t=>{const i=s("input",{class:"day-input",id:"day-input",ref:t=>this.dayInputEl=t,"aria-label":"day",placeholder:"DD",disabled:this.disabled,onPaste:this.handlePaste,inputmode:"number",pattern:"[0-9]*",onKeyDown:t=>this.handleKeyDown(t,this.preventDayInput)});const e=s("input",{id:"month-input",class:"month-input",ref:t=>this.monthInputEl=t,"aria-label":"month",placeholder:"MM",disabled:this.disabled,onPaste:this.handlePaste,inputmode:"number",pattern:"[0-9]*",onKeyDown:t=>this.handleKeyDown(t,this.preventMonthInput)});const h=s("input",{id:"year-input",class:"year-input",ref:t=>this.yearInputEl=t,"aria-label":"year",placeholder:"YYYY",maxLength:4,disabled:this.disabled,onPaste:this.handlePaste,inputmode:"number",pattern:"[0-9]*",onKeyDown:t=>this.handleKeyDown(t,this.preventYearInput)});let a;switch(t){case"D":a=i;break;case"M":a=e;break;case"Y":a=h}return a};this.getInputsInOrder=()=>{const t=this.dateFormat.split("/");const i=[];t.forEach((t=>{i.push(this.getInputFromDatePart(t.substring(0,1)))}));return i};this.getDescOfInputsOrder=()=>{let t;switch(this.dateFormat){case"DD/MM/YYYY":t="day, month, and year";break;case"MM/DD/YYYY":t="month, day, and year";break;case"YYYY/MM/DD":t="year, month, and day"}return t};this.getScreenReaderInfo=t=>{let i="";if(this.required){i+="required"}if(t===f.Error){i+=" invalid data"}return i===""?"":i+", "};this.preventInput=(t,i)=>{const s=t.key;const e=t.target;let h;if(e){h=e.value.substring(e.selectionStart,e.selectionEnd)}if(s==="e"||s==="."||s==="-"||t.key>="0"&&t.key<="9"&&i&&!h){t.preventDefault()}};this.isSelectedDateDisabled=()=>{const t=new Date;this.isAfterMax=false;this.isBeforeMin=false;let i=false;const s=this.selectedDate.toDateString()!==t.toDateString();if(this.minDate&&this.selectedDate<this.minDate&&s){this.isBeforeMin=true;i=true}if(this.maxDate&&this.selectedDate>this.maxDate&&s){this.isAfterMax=true;i=true}if(this.disableDays.includes(this.selectedDate.getDay())){i=true}if((this.disablePast&&this.selectedDate<t||this.disableFuture&&this.selectedDate>t)&&s){i=true}return i};this.moveToNextInput=t=>{const i=this.inputsInOrder.findIndex((i=>i===t));const s=this.inputsInOrder[i+1];this.preventAutoFormatting=false;if(s){s.focus()}};this.moveToPreviousInput=t=>{const i=this.inputsInOrder.findIndex((i=>i===t));this.preventAutoFormatting=false;if(this.inputsInOrder[i-1]){this.inputsInOrder[i-1].focus()}};this.autocompleteInput=t=>{if(t===this.yearInputEl){this.autocompleteYear()}else{const i=t.value;if(i.length===1){if(+i===0){t.value="01"}else{t.value=`0${i}`}}}if(t.value){this.setInputValue(t)}};this.autocompleteYear=()=>{const t=this.yearInputEl.value;const i=["2","0","0"];let s="";if(t){i.forEach(((i,e)=>{if(t.length+e<=3){s+=i}}));this.yearInputEl.value=`${s}${t}`}};this.convertToDate=(t,i,s)=>{if(!a(t)&&!a(i)&&!a(s)){return new Date(+t,+i-1,+s)}else{return null}};this.handleHostBlur=()=>{this.removeLabelledBy=false;this.icBlur.emit({value:this.selectedDate})};this.handleHostFocus=()=>{var t;if((t=this.el.shadowRoot.activeElement)===null||t===void 0?void 0:t.id.match(/(day|month|year)-input$/)){this.removeLabelledBy=false}else{this.removeLabelledBy=true}this.icFocus.emit({value:this.selectedDate})};this.handleFormReset=()=>{this.setDate(this.initialValue);this.setValidationMessage();this.handleDateChange(false)};this.getAriaLabel=t=>t.getAttribute(this.ARIA_LABEL);this.notifyScreenReaderArrowKeys=t=>{const i=this.el.shadowRoot.querySelector("#live-region");let s="";const e=this.getAriaLabel(t);if(i&&t.value){if(t===this.monthInputEl&&!!v[+t.value-1]){s=`${t.value} - ${v[+t.value-1]}, ${e}`}if(t===this.dayInputEl||t===this.yearInputEl){s=`${t.value}, ${e}`}i.textContent=s}};this.notifyScreenReaderInput=(t,i)=>{let s="";const e=this.getAriaLabel(t);if(t===this.dayInputEl||t===this.monthInputEl){if(t.value.length===2){if(t===this.monthInputEl&&!!v[+t.value-1]&&this.isValidMonth){s=`${t.value} - ${v[+t.value-1]}, ${e}`}if(t===this.dayInputEl&&this.isValidDay){s=`${t.value}, ${e}`}}else{s=""}}else{if(t.value.length===4){s=`${t.value}, ${e}`}else{s=""}}i.textContent=s};this.setFitToValueStyling=t=>{if(t.value){t.classList.add(this.FIT_TO_VALUE)}else{t.classList.remove(this.FIT_TO_VALUE)}};this.setAriaInvalid=(t,i,s,e)=>{if(this.inputsInOrder.length){this.inputsInOrder.forEach((t=>{t.removeAttribute(this.ARIA_INVALID)}));if(!t){this.dayInputEl.setAttribute(this.ARIA_INVALID,"true")}if(!i){this.monthInputEl.setAttribute(this.ARIA_INVALID,"true")}if(!s||e){this.inputsInOrder.forEach((t=>{t.setAttribute(this.ARIA_INVALID,"true")}))}}};this.handleClear=()=>{this.inputsInOrder.forEach((t=>{t.classList.remove(this.FIT_TO_VALUE);this.setInputValue(t,true);this.setPreventInput(t,false)}));this.isDateSetFromKeyboardEvent=false;this.setValidationMessage();this.handleDateChange(true);this.inputsInOrder[0].focus()};this.handleCalendarOpen=t=>{var i,s;t.stopImmediatePropagation();(i=this.calendarButtonEl)===null||i===void 0?void 0:i.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);this.calendarButtonClicked.emit({value:this.selectedDate});(s=this.calendarButtonEl)===null||s===void 0?void 0:s.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);this.isDateSetFromKeyboardEvent=false};this.setValueAndEmitChange=t=>{if(!w(new Date(this.value),t)){this.emitIcChange(t);this.value=t}};this.handleCalendarFocus=()=>{this.calendarFocused=true};this.handleCalendarBlur=()=>{this.calendarFocused=false};this.handleClearFocus=()=>{this.removeLabelledBy=true;this.clearButtonFocused=true};this.handleClearBlur=t=>{var i;this.clearButtonFocused=false;if((i=t.relatedTarget)===null||i===void 0?void 0:i.id.match(/(day|year)-input$/)){this.removeLabelledBy=false;return}this.removeLabelledBy=true};this.emitIcChange=t=>{if(!(t===null&&this.previousEmittedDate===null)&&!w(t,this.previousEmittedDate)){this.previousEmittedDate=t;this.icChange.emit({value:t})}};this.day="";this.invalidDateText=undefined;this.maxDate=undefined;this.minDate=undefined;this.month="";this.year="";this.calendarFocused=false;this.clearButtonFocused=false;this.removeLabelledBy=false;this.dateFormat="DD/MM/YYYY";this.disabled=false;this.disableDays=[];this.disableDaysMessage="The date you have selected is on a day of the week that is not allowed. Please select another date.";this.disableFuture=false;this.disableFutureMessage="Dates in the future are not allowed. Please select a date in the past.";this.disablePast=false;this.disablePastMessage="Dates in the past are not allowed. Please select a date in the future.";this.helperText=undefined;this.hideHelperText=false;this.hideLabel=false;this.inputId=`ic-date-input-${z++}`;this.invalidDateMessage="Please enter a valid date.";this.label=undefined;this.max="";this.min="";this.name=this.inputId;this.required=false;this.showCalendarButton=false;this.showClearButton=true;this.size="default";this.value="";this.validationStatus="";this.validationText=""}watchDisabledHandler(){l(this.disabled,this.el)}watchDisableFutureHandler(){this.watchMaxHandler()}watchDisablePastHandler(){this.watchMinHandler()}watchMaxHandler(){if(this.disableFuture){this.maxDate=new Date}else{this.maxDate=x(this.max,this.dateFormat)}}watchMinHandler(){if(this.disablePast){this.minDate=new Date}else{this.minDate=x(this.min,this.dateFormat)}}watchRequiredHandler(){const t=this.el.shadowRoot.querySelector("label");if(this.required){const i=document.createElement("span");i.setAttribute("id","asterisk-span");i.setAttribute("aria-hidden","true");i.textContent=" *";t===null||t===void 0?void 0:t.appendChild(i)}else{const t=this.el.shadowRoot.querySelector("#asterisk-span");if(t){t.remove()}}}disconnectedCallback(){o(this.el,this.handleFormReset)}componentWillLoad(){this.defaultHelperText=`Use format ${this.dateFormat}`;if(a(this.helperText))this.helperText=this.defaultHelperText;this.watchMinHandler();this.watchMaxHandler();if(this.value){this.setDate(this.value);this.previousEmittedDate=this.selectedDate}else{this.previousEmittedDate=null}this.screenReaderInfoId=`${this.inputId}-screen-reader-info`;this.assistiveHintId=`${this.inputId}-assistive-hint`;this.selectedDateInfoId=`${this.inputId}-selected-date-info`;c(this.el,this.handleFormReset);l(this.disabled,this.el)}componentDidLoad(){this.setInputsInOrder();d([{prop:this.label,propName:"label"}],"Date Input");if(this.value){this.updateInputValues(this.day,this.month,this.year);this.inputsInOrder.forEach((t=>{t.classList.add(this.FIT_TO_VALUE)}))}this.setAriaInvalid(this.isValidDay,this.isValidMonth,this.isValidDate,this.isDisabledDate);if(this.value){this.notifyScreenReaderSelectedDate()}this.inputsInOrder.forEach((t=>{t.addEventListener("input",this.handleInput);t.addEventListener("focus",this.handleFocus);t.addEventListener("blur",this.handleBlur)}));this.watchRequiredHandler()}componentWillUpdate(){if(a(this.helperText))this.helperText=this.defaultHelperText;if(!this.isDateSetFromKeyboardEvent)this.setDate(this.value);this.setAriaInvalid(this.isValidDay,this.isValidMonth,this.isValidDate,this.isDisabledDate);this.handleDateChange(false);this.isDateSetFromKeyboardEvent=false}componentDidRender(){if(this.removeLabelledBy){this.removeAriaLabelledBy();return}this.setAriaLabelledBy()}async getDate(){return this.selectedDate}async setCalendarFocus(){if(this.calendarButtonEl){this.calendarButtonEl.focus()}}async setDisableDays(t){this.disableDays=t}async triggerIcChange(t){this.emitIcChange(t)}removeAriaLabelledBy(){this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY)}setPastedValueAndValidation(t,i,s){switch(true){case t:{const t=this.isZuluTime?$(i):i;const s=t.split(/-|\/|\./);this.inputsInOrder.forEach(((t,i)=>{t.classList.add(this.FIT_TO_VALUE);if(this.isZuluTime){this.pasteZuluDateTime(s,i)}else{let e;if(t===this.dayInputEl||t===this.monthInputEl){e=this.slicePastedDate(2,s[i])}else{e=this.slicePastedDate(4,s[i])}t.value=e;this.setInputValue(t);this.autocompleteInput(t)}}));this.isZuluTime=false;break}case(i.length===1||i.length===2||i.length===4)&&u(i):if(this.checkSingleCopiedValueIsValid(s.target,i)){this.setInputPasteValue(s.target,i);this.setInputValue(s.target)}else{this.displayPastedValidation(s)}break;case i.length===3&&u(i):if(s.target!==this.yearInputEl){this.displayPastedValidation(s)}else{this.setInputPasteValue(s.target,i);this.setInputValue(s.target)}break;case i.length>=5&&u(i):this.displayPastedValidation(s)}}pasteZuluDateTime(t,i){if(i===0){const s=this.slicePastedDate(4,t[i]);this.yearInputEl.value=s;this.setInputValue(this.yearInputEl)}else if(i===1){const s=this.slicePastedDate(2,t[i]);this.monthInputEl.value=s;this.setInputValue(this.monthInputEl)}else{const s=this.slicePastedDate(2,t[i]);this.dayInputEl.value=s;this.setInputValue(this.dayInputEl)}}displayPastedValidation(t){var i;if(((i=this.invalidDateText)===null||i===void 0?void 0:i.length)>0){this.previousInvalidDateTest=this.invalidDateText}this.invalidDateText=`Please paste a valid ${this.getAriaLabel(t.target)}`;this.validationStatus=f.Error;this.isPasteValidationDisplayed=true}setPasteInvalidText(){var t;if(this.isPasteValidationDisplayed){this.invalidDateText=(t=this.previousInvalidDateTest)!==null&&t!==void 0?t:"";this.isPasteValidationDisplayed=false;this.isDateSetFromKeyboardEvent=true}}notifyScreenReader(t,i){const s=this.el.shadowRoot.querySelector("#live-region");if(s){if(this.isKeyboardOrEvent(i)){this.notifyScreenReaderArrowKeys(t)}else if(Object.prototype.toString.call(i)===this.INPUT_EVENT_OBJECT_STRING){this.notifyScreenReaderInput(t,s)}}}render(){const{inputId:t,label:i,disabled:h,helperText:n,hideHelperText:r,hideLabel:l,showClearButton:o,showCalendarButton:c,size:d}=this;const u=!a(this.validationStatus)&&!a(this.validationText);const m=u?this.validationStatus:!a(this.invalidDateText)?f.Error:"";const v=`Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;p(true,this.el,this.name,this.convertToDate(this.year,this.month,this.day),this.disabled);return s(e,{onBlur:this.handleHostBlur,onFocus:this.handleHostFocus},s("ic-input-container",{disabled:h},!(l&&r)&&s("ic-input-label",{for:t,label:i,hideLabel:l,helperText:!r?n:null,disabled:h}),s("span",{id:this.screenReaderInfoId,class:"sr-only","aria-hidden":"true"},this.getScreenReaderInfo(m),l&&`${i}\n`,r&&`${n}\n`,`${this.defaultHelperText}.`),s("span",{id:this.assistiveHintId,class:"sr-only","aria-hidden":"true"},v),s("span",{id:"live-region","aria-live":"assertive",class:"sr-only"}),s("ic-input-component-container",{id:t,ref:t=>this.inputCompContainerEl=t,disabled:h,validationStatus:m,size:d,role:"group"},s("div",{class:"input-container"},s("div",{class:"date-inputs"},this.getInputsInOrder()[0],"/",this.getInputsInOrder()[1],"/",this.getInputsInOrder()[2]),s("div",{class:"action-buttons"},o&&s("ic-button",{id:"clear-button","aria-label":"Clear input",class:{["clear-button"]:true,["hidden"]:a(this.day)&&a(this.month)&&a(this.year)},disabled:this.disabled,innerHTML:D,onClick:this.handleClear,onFocus:this.handleClearFocus,onBlur:this.handleClearBlur,variant:"icon",appearance:this.clearButtonFocused?b.Light:b.Dark,size:d}),c&&s("div",{class:"show-calendar-button-wrapper"},s("div",{class:{divider:true,[d]:true}}),s("ic-button",{id:"calendar-button",ref:t=>this.calendarButtonEl=t,"aria-label":"Display calendar","aria-haspopup":"dialog",class:"calendar-button",disabled:this.disabled,innerHTML:Y,onClick:this.handleCalendarOpen,variant:"icon",size:d,onFocus:this.handleCalendarFocus,onBlur:this.handleCalendarBlur,appearance:this.calendarFocused?b.Light:b.Default}))))),s("span",{id:this.selectedDateInfoId,class:"sr-only","aria-live":"polite"},s("span",{ref:t=>this.selectedDateInfoEl=t,role:"status"})),(u||!a(this.invalidDateText))&&s("ic-input-validation",{status:m,message:u?this.validationText:this.invalidDateText,for:t})))}static get delegatesFocus(){return true}get el(){return h(this)}static get watchers(){return{disabled:["watchDisabledHandler"],disableFuture:["watchDisableFutureHandler"],disablePast:["watchDisablePastHandler"],max:["watchMaxHandler"],min:["watchMinHandler"],required:["watchRequiredHandler"]}}};H.style=M;export{H as ic_date_input};
|
2
|
+
//# sourceMappingURL=p-94e47a21.entry.js.map
|