@ukic/canary-web-components 2.0.0-canary.20 → 2.0.0-canary.22
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-73d277d1.js → helpers-093368be.js} +6 -2
- package/dist/cjs/helpers-093368be.js.map +1 -0
- package/dist/cjs/{helpers-fc9441f8.js → helpers-85c5ca15.js} +94 -1
- package/dist/cjs/helpers-85c5ca15.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +17 -1
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +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 +11 -6
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +131 -0
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-card.cjs.entry.js +25 -1
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -3
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +12 -3
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +526 -71
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +4 -3
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +15 -4
- 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 +21 -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 +17 -1
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +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 +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +41 -22
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +2 -30
- package/dist/cjs/ic-select-with-multi.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 +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +241 -0
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js +203 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-typography.cjs.entry.js +47 -12
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-4cf27b16.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/arrow-dropdown.svg +3 -0
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +655 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +373 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +130 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
- package/dist/collection/components/ic-data-table/ic-data-table.css +55 -5
- package/dist/collection/components/ic-data-table/ic-data-table.js +570 -77
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +364 -21
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +21 -2
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +7 -0
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +34 -3
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +29 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +150 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +592 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +114 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.css +56 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +296 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
- package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
- package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
- package/dist/collection/utils/helpers.js +4 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +5 -2
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +88 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert2.js +18 -2
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-back-to-top.js +1 -1
- package/dist/components/ic-badge.js +1 -1
- package/dist/components/ic-breadcrumb-group.js +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-button2.js +1 -1
- package/dist/components/ic-card-horizontal.d.ts +11 -0
- package/dist/components/ic-card-horizontal.js +167 -0
- package/dist/components/ic-card-horizontal.js.map +1 -0
- package/dist/components/ic-card.js +26 -2
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox.js +1 -1
- package/dist/components/ic-chip.js +9 -3
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +12 -3
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-row.js +1 -1
- package/dist/components/ic-data-table.js +531 -72
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +5 -3
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +17 -4
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state2.js +21 -2
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-hero.js +18 -2
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-label2.js +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu3.js +1 -1
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +1 -1
- package/dist/components/ic-pagination-bar2.js +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-radio-group.js +41 -22
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-select-with-multi.js +1 -29
- package/dist/components/ic-select-with-multi.js.map +1 -1
- package/dist/components/ic-select2.js +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-step.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-tab-panel.js +1 -1
- package/dist/components/ic-text-field2.js +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-tooltip2.js +12 -5
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-tree-item.d.ts +11 -0
- package/dist/components/ic-tree-item.js +286 -0
- package/dist/components/ic-tree-item.js.map +1 -0
- package/dist/components/ic-tree-view.d.ts +11 -0
- package/dist/components/ic-tree-view.js +237 -0
- package/dist/components/ic-tree-view.js.map +1 -0
- package/dist/components/ic-typography2.js +53 -15
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-0cdd4c93.entry.js → p-0180e00a.entry.js} +2 -2
- package/dist/core/{p-0970c8a1.entry.js → p-046f4de6.entry.js} +2 -2
- package/dist/core/{p-2536b95b.entry.js → p-06732eaf.entry.js} +2 -2
- package/dist/core/p-0ec04c16.entry.js +2 -0
- package/dist/core/p-0ec04c16.entry.js.map +1 -0
- package/dist/core/{p-4c57eef0.entry.js → p-13993bf3.entry.js} +2 -2
- package/dist/core/p-16a48a63.entry.js +2 -0
- package/dist/core/p-16a48a63.entry.js.map +1 -0
- package/dist/core/{p-12120521.entry.js → p-216fbd5e.entry.js} +2 -2
- package/dist/core/{p-14b363d0.entry.js → p-2d063032.entry.js} +2 -2
- package/dist/core/{p-e2387530.entry.js → p-2ee5d3fb.entry.js} +2 -2
- package/dist/core/p-355c8532.entry.js +2 -0
- package/dist/core/p-355c8532.entry.js.map +1 -0
- package/dist/core/p-3a59391f.entry.js +2 -0
- package/dist/core/{p-2b9b9f6e.entry.js.map → p-3a59391f.entry.js.map} +1 -1
- package/dist/core/{p-edf3411a.entry.js → p-3f2723aa.entry.js} +2 -2
- package/dist/core/p-401d0c66.entry.js +2 -0
- package/dist/core/p-401d0c66.entry.js.map +1 -0
- package/dist/core/p-413e68be.entry.js +2 -0
- package/dist/core/{p-60ca1000.entry.js.map → p-413e68be.entry.js.map} +1 -1
- package/dist/core/{p-a484c41c.entry.js → p-418a84d4.entry.js} +2 -2
- package/dist/core/{p-a1369740.entry.js → p-41916ef7.entry.js} +2 -2
- package/dist/core/p-4309460f.entry.js +2 -0
- package/dist/core/p-4309460f.entry.js.map +1 -0
- package/dist/core/{p-7168b71a.entry.js → p-486a6957.entry.js} +2 -2
- package/dist/core/{p-87868dd2.entry.js → p-5348af01.entry.js} +2 -2
- package/dist/core/p-57043b1e.entry.js +2 -0
- package/dist/core/p-57043b1e.entry.js.map +1 -0
- package/dist/core/p-59993f36.entry.js +2 -0
- package/dist/core/p-59993f36.entry.js.map +1 -0
- package/dist/core/{p-c2b5e7b1.entry.js → p-5fea8f1c.entry.js} +2 -2
- package/dist/core/{p-c2b5e7b1.entry.js.map → p-5fea8f1c.entry.js.map} +1 -1
- package/dist/core/{p-eeae7272.entry.js → p-6398a726.entry.js} +2 -2
- package/dist/core/{p-0629691b.entry.js → p-648fb902.entry.js} +2 -2
- package/dist/core/{p-7e850bad.entry.js → p-673a4a62.entry.js} +2 -2
- package/dist/core/{p-0ecde7a8.entry.js → p-67ae9d37.entry.js} +2 -2
- package/dist/core/{p-d3e186a3.entry.js → p-6b01e096.entry.js} +2 -2
- package/dist/core/{p-92a858f7.entry.js → p-6b1fcf87.entry.js} +2 -2
- package/dist/core/{p-94ce6f29.entry.js → p-6fb3d61e.entry.js} +2 -2
- package/dist/core/{p-47c91e08.entry.js → p-789ae7f5.entry.js} +2 -2
- package/dist/core/{p-1440cdd1.js → p-8128572e.js} +2 -2
- package/dist/core/p-8128572e.js.map +1 -0
- package/dist/core/p-84eaa486.entry.js +2 -0
- package/dist/core/p-84eaa486.entry.js.map +1 -0
- package/dist/core/{p-24f9f6d4.entry.js → p-89c7ea3e.entry.js} +2 -2
- package/dist/core/{p-992b6161.entry.js → p-8d276e8f.entry.js} +2 -2
- package/dist/core/{p-db5c4969.entry.js → p-91cf89c8.entry.js} +2 -2
- package/dist/core/p-91cf89c8.entry.js.map +1 -0
- package/dist/core/p-969cadfa.entry.js +2 -0
- package/dist/core/p-969cadfa.entry.js.map +1 -0
- package/dist/core/p-97f141a6.entry.js +2 -0
- package/dist/core/p-97f141a6.entry.js.map +1 -0
- package/dist/core/{p-cb7793b0.entry.js → p-99185fd5.entry.js} +2 -2
- package/dist/core/{p-4883e147.entry.js → p-99f96c33.entry.js} +2 -2
- package/dist/core/p-a052bb95.entry.js +2 -0
- package/dist/core/p-a052bb95.entry.js.map +1 -0
- package/dist/core/{p-8100f45c.entry.js → p-a72af8db.entry.js} +2 -2
- package/dist/core/{p-6eafa62e.entry.js → p-a787bba7.entry.js} +2 -2
- package/dist/core/{p-6c5c6aaf.entry.js → p-aa72f551.entry.js} +2 -2
- package/dist/core/{p-781e8391.entry.js → p-aaaa9261.entry.js} +2 -2
- package/dist/core/p-adbe0d89.js +2 -0
- package/dist/core/p-adbe0d89.js.map +1 -0
- package/dist/core/{p-646b886c.entry.js → p-b29e96b5.entry.js} +2 -2
- package/dist/core/p-b97eba08.entry.js +2 -0
- package/dist/core/p-b97eba08.entry.js.map +1 -0
- package/dist/core/{p-3245554e.entry.js → p-bfc5f3f4.entry.js} +2 -2
- package/dist/core/{p-e1e04f34.entry.js → p-cb3afdbf.entry.js} +2 -2
- package/dist/core/{p-6cf5343b.entry.js → p-ccf72538.entry.js} +2 -2
- package/dist/core/{p-3eb33ef4.entry.js → p-ce0999f1.entry.js} +2 -2
- package/dist/core/{p-0a99994a.entry.js → p-d02a4d1b.entry.js} +2 -2
- package/dist/core/{p-b7161816.entry.js → p-d8322108.entry.js} +2 -2
- package/dist/core/{p-d67a5c90.entry.js → p-d86cdbc8.entry.js} +2 -2
- package/dist/core/{p-a5bb7bb0.entry.js → p-da8255b8.entry.js} +2 -2
- package/dist/core/{p-6a7a5ed5.entry.js → p-e9f5ebb3.entry.js} +2 -2
- package/dist/core/p-e9f5ebb3.entry.js.map +1 -0
- package/dist/core/p-ede631c5.entry.js +2 -0
- package/dist/core/p-ede631c5.entry.js.map +1 -0
- package/dist/core/{p-66c26240.entry.js → p-f09b2041.entry.js} +2 -2
- package/dist/core/{p-b8d3f121.entry.js → p-f1044e4d.entry.js} +2 -2
- package/dist/core/{p-af21360a.entry.js → p-f10f7f37.entry.js} +2 -2
- package/dist/core/{p-34cc7b3d.entry.js → p-fa77211d.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-4e2e4787.js → helpers-886489d5.js} +6 -3
- package/dist/esm/helpers-886489d5.js.map +1 -0
- package/dist/esm/{helpers-1cd71f8a.js → helpers-f543bc77.js} +89 -2
- package/dist/{cjs/helpers-fc9441f8.js.map → esm/helpers-f543bc77.js.map} +1 -1
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +18 -2
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +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 +11 -6
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +127 -0
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
- package/dist/esm/ic-card.entry.js +26 -2
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +9 -3
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +12 -3
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +526 -71
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +4 -3
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +15 -4
- 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 +22 -3
- 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 +18 -2
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +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 +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +41 -22
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +1 -29
- package/dist/esm/ic-select-with-multi.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 +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-tree-item.entry.js +237 -0
- package/dist/esm/ic-tree-item.entry.js.map +1 -0
- package/dist/esm/ic-tree-view.entry.js +199 -0
- package/dist/esm/ic-tree-view.entry.js.map +1 -0
- package/dist/esm/ic-typography.entry.js +48 -13
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-93509377.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +68 -7
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +9 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +112 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +5 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +95 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +40 -0
- package/dist/types/components.d.ts +272 -6
- package/dist/types/utils/helpers.d.ts +1 -0
- package/hydrate/index.js +2198 -899
- package/package.json +3 -3
- package/dist/cjs/helpers-73d277d1.js.map +0 -1
- package/dist/core/p-06e0b5b6.entry.js +0 -2
- package/dist/core/p-06e0b5b6.entry.js.map +0 -1
- package/dist/core/p-0b14be10.entry.js +0 -2
- package/dist/core/p-0b14be10.entry.js.map +0 -1
- package/dist/core/p-1440cdd1.js.map +0 -1
- package/dist/core/p-20d4ded5.js +0 -2
- package/dist/core/p-20d4ded5.js.map +0 -1
- package/dist/core/p-2b9b9f6e.entry.js +0 -2
- package/dist/core/p-34e72f79.entry.js +0 -2
- package/dist/core/p-34e72f79.entry.js.map +0 -1
- package/dist/core/p-352b9c17.entry.js +0 -2
- package/dist/core/p-352b9c17.entry.js.map +0 -1
- package/dist/core/p-3fa986f8.entry.js +0 -2
- package/dist/core/p-3fa986f8.entry.js.map +0 -1
- package/dist/core/p-4ec1ce96.entry.js +0 -2
- package/dist/core/p-4ec1ce96.entry.js.map +0 -1
- package/dist/core/p-60ca1000.entry.js +0 -2
- package/dist/core/p-6a7a5ed5.entry.js.map +0 -1
- package/dist/core/p-9769c195.entry.js +0 -2
- package/dist/core/p-9769c195.entry.js.map +0 -1
- package/dist/core/p-cb15d0b6.entry.js +0 -2
- package/dist/core/p-cb15d0b6.entry.js.map +0 -1
- package/dist/core/p-db5c4969.entry.js.map +0 -1
- package/dist/core/p-e32cce28.entry.js +0 -2
- package/dist/core/p-e32cce28.entry.js.map +0 -1
- package/dist/core/p-ef996e40.entry.js +0 -2
- package/dist/core/p-ef996e40.entry.js.map +0 -1
- package/dist/esm/helpers-1cd71f8a.js.map +0 -1
- package/dist/esm/helpers-4e2e4787.js.map +0 -1
- /package/dist/core/{p-0cdd4c93.entry.js.map → p-0180e00a.entry.js.map} +0 -0
- /package/dist/core/{p-0970c8a1.entry.js.map → p-046f4de6.entry.js.map} +0 -0
- /package/dist/core/{p-2536b95b.entry.js.map → p-06732eaf.entry.js.map} +0 -0
- /package/dist/core/{p-4c57eef0.entry.js.map → p-13993bf3.entry.js.map} +0 -0
- /package/dist/core/{p-12120521.entry.js.map → p-216fbd5e.entry.js.map} +0 -0
- /package/dist/core/{p-14b363d0.entry.js.map → p-2d063032.entry.js.map} +0 -0
- /package/dist/core/{p-e2387530.entry.js.map → p-2ee5d3fb.entry.js.map} +0 -0
- /package/dist/core/{p-edf3411a.entry.js.map → p-3f2723aa.entry.js.map} +0 -0
- /package/dist/core/{p-a484c41c.entry.js.map → p-418a84d4.entry.js.map} +0 -0
- /package/dist/core/{p-a1369740.entry.js.map → p-41916ef7.entry.js.map} +0 -0
- /package/dist/core/{p-7168b71a.entry.js.map → p-486a6957.entry.js.map} +0 -0
- /package/dist/core/{p-87868dd2.entry.js.map → p-5348af01.entry.js.map} +0 -0
- /package/dist/core/{p-eeae7272.entry.js.map → p-6398a726.entry.js.map} +0 -0
- /package/dist/core/{p-0629691b.entry.js.map → p-648fb902.entry.js.map} +0 -0
- /package/dist/core/{p-7e850bad.entry.js.map → p-673a4a62.entry.js.map} +0 -0
- /package/dist/core/{p-0ecde7a8.entry.js.map → p-67ae9d37.entry.js.map} +0 -0
- /package/dist/core/{p-d3e186a3.entry.js.map → p-6b01e096.entry.js.map} +0 -0
- /package/dist/core/{p-92a858f7.entry.js.map → p-6b1fcf87.entry.js.map} +0 -0
- /package/dist/core/{p-94ce6f29.entry.js.map → p-6fb3d61e.entry.js.map} +0 -0
- /package/dist/core/{p-47c91e08.entry.js.map → p-789ae7f5.entry.js.map} +0 -0
- /package/dist/core/{p-24f9f6d4.entry.js.map → p-89c7ea3e.entry.js.map} +0 -0
- /package/dist/core/{p-992b6161.entry.js.map → p-8d276e8f.entry.js.map} +0 -0
- /package/dist/core/{p-cb7793b0.entry.js.map → p-99185fd5.entry.js.map} +0 -0
- /package/dist/core/{p-4883e147.entry.js.map → p-99f96c33.entry.js.map} +0 -0
- /package/dist/core/{p-8100f45c.entry.js.map → p-a72af8db.entry.js.map} +0 -0
- /package/dist/core/{p-6eafa62e.entry.js.map → p-a787bba7.entry.js.map} +0 -0
- /package/dist/core/{p-6c5c6aaf.entry.js.map → p-aa72f551.entry.js.map} +0 -0
- /package/dist/core/{p-781e8391.entry.js.map → p-aaaa9261.entry.js.map} +0 -0
- /package/dist/core/{p-646b886c.entry.js.map → p-b29e96b5.entry.js.map} +0 -0
- /package/dist/core/{p-3245554e.entry.js.map → p-bfc5f3f4.entry.js.map} +0 -0
- /package/dist/core/{p-e1e04f34.entry.js.map → p-cb3afdbf.entry.js.map} +0 -0
- /package/dist/core/{p-6cf5343b.entry.js.map → p-ccf72538.entry.js.map} +0 -0
- /package/dist/core/{p-3eb33ef4.entry.js.map → p-ce0999f1.entry.js.map} +0 -0
- /package/dist/core/{p-0a99994a.entry.js.map → p-d02a4d1b.entry.js.map} +0 -0
- /package/dist/core/{p-b7161816.entry.js.map → p-d8322108.entry.js.map} +0 -0
- /package/dist/core/{p-d67a5c90.entry.js.map → p-d86cdbc8.entry.js.map} +0 -0
- /package/dist/core/{p-a5bb7bb0.entry.js.map → p-da8255b8.entry.js.map} +0 -0
- /package/dist/core/{p-66c26240.entry.js.map → p-f09b2041.entry.js.map} +0 -0
- /package/dist/core/{p-b8d3f121.entry.js.map → p-f1044e4d.entry.js.map} +0 -0
- /package/dist/core/{p-af21360a.entry.js.map → p-f10f7f37.entry.js.map} +0 -0
- /package/dist/core/{p-34cc7b3d.entry.js.map → p-fa77211d.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
@@ -7643,15 +7643,15 @@ const IC_DEVICE_SIZES = {
|
|
7643
7643
|
L: 1200,
|
7644
7644
|
XL: 99999,
|
7645
7645
|
};
|
7646
|
-
const IC_BLOCK_COLOR_COMPONENTS = [
|
7646
|
+
const IC_BLOCK_COLOR_COMPONENTS$1 = [
|
7647
7647
|
"ic-hero",
|
7648
7648
|
"ic-top-navigation",
|
7649
7649
|
"ic-footer",
|
7650
7650
|
"ic-side-navigation",
|
7651
7651
|
"ic-alert",
|
7652
7652
|
];
|
7653
|
-
const IC_FIXED_COLOR_COMPONENTS = ["ic-alert"];
|
7654
|
-
const IC_BLOCK_COLOR_EXCEPTIONS = {
|
7653
|
+
const IC_FIXED_COLOR_COMPONENTS$1 = ["ic-alert"];
|
7654
|
+
const IC_BLOCK_COLOR_EXCEPTIONS$1 = {
|
7655
7655
|
"ic-alert": ["ic-link"],
|
7656
7656
|
};
|
7657
7657
|
/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours
|
@@ -7692,10 +7692,10 @@ const debounceEvent = (event, wait) => {
|
|
7692
7692
|
const original = event._original || event;
|
7693
7693
|
return {
|
7694
7694
|
_original: event,
|
7695
|
-
emit: debounce$
|
7695
|
+
emit: debounce$3(original.emit.bind(original), wait),
|
7696
7696
|
};
|
7697
7697
|
};
|
7698
|
-
const debounce$
|
7698
|
+
const debounce$3 = (func, wait = 0) => {
|
7699
7699
|
let timer;
|
7700
7700
|
return (...args) => {
|
7701
7701
|
clearTimeout(timer);
|
@@ -7797,19 +7797,19 @@ const getInputDescribedByText$1 = (inputId, helperText, validationText) => `${he
|
|
7797
7797
|
* ""
|
7798
7798
|
* @returns IcThemeForeground depending on the context
|
7799
7799
|
*/
|
7800
|
-
const getThemeFromContext = (el, themeFromEvent = null) => {
|
7800
|
+
const getThemeFromContext$1 = (el, themeFromEvent = null) => {
|
7801
7801
|
var _a;
|
7802
7802
|
const parentElement = el.parentElement || el.getRootNode().host.parentElement;
|
7803
|
-
const blockColorParent = parentElement.closest(IC_BLOCK_COLOR_COMPONENTS.join(","));
|
7803
|
+
const blockColorParent = parentElement.closest(IC_BLOCK_COLOR_COMPONENTS$1.join(","));
|
7804
7804
|
// If within a block color component
|
7805
7805
|
if (blockColorParent !== null) {
|
7806
7806
|
const parentTag = blockColorParent.tagName.toLowerCase();
|
7807
7807
|
const currentTag = el.tagName.toLowerCase();
|
7808
|
-
if ((_a = IC_BLOCK_COLOR_EXCEPTIONS[parentTag]) === null || _a === void 0 ? void 0 : _a.includes(currentTag)) {
|
7808
|
+
if ((_a = IC_BLOCK_COLOR_EXCEPTIONS$1[parentTag]) === null || _a === void 0 ? void 0 : _a.includes(currentTag)) {
|
7809
7809
|
return IcThemeForegroundEnum$1.Default;
|
7810
7810
|
}
|
7811
7811
|
else if (themeFromEvent !== null &&
|
7812
|
-
!IC_FIXED_COLOR_COMPONENTS.includes(parentTag)) {
|
7812
|
+
!IC_FIXED_COLOR_COMPONENTS$1.includes(parentTag)) {
|
7813
7813
|
return themeFromEvent;
|
7814
7814
|
}
|
7815
7815
|
else if (blockColorParent.classList.contains(IcThemeForegroundEnum$1.Dark)) {
|
@@ -7844,7 +7844,7 @@ const handleHiddenFormButtonClick = (form, button) => {
|
|
7844
7844
|
};
|
7845
7845
|
const isEmptyString$1 = (value) => value ? value.trim().length === 0 : true;
|
7846
7846
|
// A helper function that checks if a prop has been defined
|
7847
|
-
const isPropDefined = (prop) => prop !== undefined ? prop : null;
|
7847
|
+
const isPropDefined$1 = (prop) => prop !== undefined ? prop : null;
|
7848
7848
|
/**
|
7849
7849
|
* Extracts the label using the value from an object. Requires the object to have a label and value property.
|
7850
7850
|
* @param value - value from object
|
@@ -8052,7 +8052,7 @@ const removeFormResetListener$1 = (el, callbackFn) => {
|
|
8052
8052
|
var _a;
|
8053
8053
|
(_a = el.closest("FORM")) === null || _a === void 0 ? void 0 : _a.removeEventListener("reset", callbackFn);
|
8054
8054
|
};
|
8055
|
-
const pxToRem = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;
|
8055
|
+
const pxToRem$1 = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;
|
8056
8056
|
const removeDisabledFalse$1 = (disabled, element) => {
|
8057
8057
|
if (!disabled) {
|
8058
8058
|
element.removeAttribute("disabled");
|
@@ -8067,10 +8067,13 @@ const convertToRGBA = (color) => {
|
|
8067
8067
|
: null;
|
8068
8068
|
};
|
8069
8069
|
const capitalize$1 = (text) => text.charAt(0).toUpperCase() + text.slice(1);
|
8070
|
-
const checkSlotInChildMutations = (addedNodes, removedNodes, slotName) => {
|
8071
|
-
const hasSlot = (nodeList) => Array.from(nodeList).some((node) =>
|
8070
|
+
const checkSlotInChildMutations$1 = (addedNodes, removedNodes, slotName) => {
|
8071
|
+
const hasSlot = (nodeList) => Array.from(nodeList).some((node) => Array.isArray(slotName)
|
8072
|
+
? slotName.some((name) => node.slot === name)
|
8073
|
+
: node.slot === slotName);
|
8072
8074
|
return hasSlot(addedNodes) || hasSlot(removedNodes);
|
8073
8075
|
};
|
8076
|
+
const isElInAGGrid = (el) => !!el.closest(".ag-cell") && !!el.closest(".ag-root");
|
8074
8077
|
|
8075
8078
|
var chevronIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
8076
8079
|
<path d="M9.70687 6L8.29688 7.41L12.8769 12L8.29688 16.59L9.70687 18L15.7069 12L9.70687 6Z" fill="currentColor"/>
|
@@ -8353,10 +8356,16 @@ class Alert {
|
|
8353
8356
|
registerInstance(this, hostRef);
|
8354
8357
|
this.dismiss = createEvent(this, "dismiss", 7);
|
8355
8358
|
this.icDismiss = createEvent(this, "icDismiss", 7);
|
8359
|
+
this.hostMutationObserver = null;
|
8356
8360
|
this.dismissAction = () => {
|
8357
8361
|
this.dismiss.emit();
|
8358
8362
|
this.icDismiss.emit();
|
8359
8363
|
};
|
8364
|
+
this.hostMutationCallback = (mutationList) => {
|
8365
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
8366
|
+
? checkSlotInChildMutations$1(addedNodes, removedNodes, "action")
|
8367
|
+
: false)) ;
|
8368
|
+
};
|
8360
8369
|
this.alertTitleWrap = false;
|
8361
8370
|
this.visible = true;
|
8362
8371
|
this.announced = true;
|
@@ -8366,8 +8375,16 @@ class Alert {
|
|
8366
8375
|
this.titleAbove = false;
|
8367
8376
|
this.variant = "neutral";
|
8368
8377
|
}
|
8378
|
+
disconnectedCallback() {
|
8379
|
+
var _a;
|
8380
|
+
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
8381
|
+
}
|
8369
8382
|
componentDidLoad() {
|
8370
8383
|
this.alertTitleShouldWrap();
|
8384
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
8385
|
+
this.hostMutationObserver.observe(this.el, {
|
8386
|
+
childList: true,
|
8387
|
+
});
|
8371
8388
|
}
|
8372
8389
|
handleClick() {
|
8373
8390
|
this.visible = !this.visible;
|
@@ -8643,7 +8660,7 @@ class Badge {
|
|
8643
8660
|
}
|
8644
8661
|
}
|
8645
8662
|
};
|
8646
|
-
this.isAccessibleLabelDefined = () => isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;
|
8663
|
+
this.isAccessibleLabelDefined = () => isPropDefined$1(this.accessibleLabel) && this.accessibleLabel !== null;
|
8647
8664
|
this.accessibleLabel = undefined;
|
8648
8665
|
this.customColor = null;
|
8649
8666
|
this.maxNumber = undefined;
|
@@ -8747,7 +8764,7 @@ class Breadcrumb {
|
|
8747
8764
|
constructor(hostRef) {
|
8748
8765
|
registerInstance(this, hostRef);
|
8749
8766
|
this.renderDefaultBreadcrumb = (current, pageTitle, describedById, href) => {
|
8750
|
-
const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== "";
|
8767
|
+
const hasPageTitle = pageTitle !== null && isPropDefined$1(pageTitle) && pageTitle !== "";
|
8751
8768
|
if (current && hasPageTitle) {
|
8752
8769
|
return (hAsync("span", { class: {
|
8753
8770
|
"current-page-container": current,
|
@@ -8789,8 +8806,8 @@ class Breadcrumb {
|
|
8789
8806
|
render() {
|
8790
8807
|
const { current, href, pageTitle } = this;
|
8791
8808
|
const describedById = `${pageTitle && pageTitle.toLowerCase().replace(" ", "-")}-describedby`;
|
8792
|
-
const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== "";
|
8793
|
-
const hasHref = href !== null && isPropDefined(href) && href !== "";
|
8809
|
+
const hasPageTitle = pageTitle !== null && isPropDefined$1(pageTitle) && pageTitle !== "";
|
8810
|
+
const hasHref = href !== null && isPropDefined$1(href) && href !== "";
|
8794
8811
|
return (hAsync(Host, { class: {
|
8795
8812
|
back: this.showBackIcon,
|
8796
8813
|
}, "aria-current": current && "page", role: "listitem" }, hAsync("div", { class: "breadcrumb" }, hAsync("span", { innerHTML: chevronIcon, class: "chevron", "aria-hidden": "true" }), this.showBackIcon && describedById && (hAsync("span", { id: describedById, class: "hide" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (hAsync("slot", null)))));
|
@@ -9029,7 +9046,7 @@ class BreadcrumbGroup {
|
|
9029
9046
|
}; }
|
9030
9047
|
}
|
9031
9048
|
|
9032
|
-
var arrowDropdown = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
9049
|
+
var arrowDropdown$1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
9033
9050
|
<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>
|
9034
9051
|
</svg>`;
|
9035
9052
|
|
@@ -9255,7 +9272,7 @@ class Button {
|
|
9255
9272
|
return !!this.routerSlot;
|
9256
9273
|
}
|
9257
9274
|
updateTheme(newTheme = null) {
|
9258
|
-
const foregroundColor = getThemeFromContext(this.el, newTheme);
|
9275
|
+
const foregroundColor = getThemeFromContext$1(this.el, newTheme);
|
9259
9276
|
if (foregroundColor !== IcThemeForegroundEnum$1.Default) {
|
9260
9277
|
this.appearance = foregroundColor;
|
9261
9278
|
}
|
@@ -9312,7 +9329,7 @@ class Button {
|
|
9312
9329
|
this.variant !== "destructive" && (hAsync("span", { class: {
|
9313
9330
|
["arrow-dropdown"]: !this.dropdownExpanded,
|
9314
9331
|
["dropdown-expanded"]: this.dropdownExpanded,
|
9315
|
-
}, innerHTML: arrowDropdown }))));
|
9332
|
+
}, innerHTML: arrowDropdown$1 }))));
|
9316
9333
|
};
|
9317
9334
|
return (hAsync(Host, { class: {
|
9318
9335
|
["disabled"]: this.disabled && !this.loading,
|
@@ -9400,9 +9417,10 @@ const icCardCss = "/*!@html*/html.sc-ic-card{line-height:1.15;-webkit-text-size-
|
|
9400
9417
|
* @slot expanded-content - Content will be placed below the interaction controls but will not initially be rendered.
|
9401
9418
|
* @slot badge - Badge component overlaying the top right of the card.
|
9402
9419
|
*/
|
9403
|
-
class Card {
|
9420
|
+
class Card$1 {
|
9404
9421
|
constructor(hostRef) {
|
9405
9422
|
registerInstance(this, hostRef);
|
9423
|
+
this.hostMutationObserver = null;
|
9406
9424
|
this.parentFocussed = () => {
|
9407
9425
|
this.isFocussed = true;
|
9408
9426
|
};
|
@@ -9412,6 +9430,21 @@ class Card {
|
|
9412
9430
|
this.toggleExpanded = () => {
|
9413
9431
|
this.areaExpanded = !this.areaExpanded;
|
9414
9432
|
};
|
9433
|
+
this.hostMutationCallback = (mutationList) => {
|
9434
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
9435
|
+
? checkSlotInChildMutations$1(addedNodes, removedNodes, [
|
9436
|
+
"message",
|
9437
|
+
"adornment",
|
9438
|
+
"expanded-content",
|
9439
|
+
"image-top",
|
9440
|
+
"image-mid",
|
9441
|
+
"icon",
|
9442
|
+
"interaction-button",
|
9443
|
+
"badge",
|
9444
|
+
"interaction-controls",
|
9445
|
+
])
|
9446
|
+
: false)) ;
|
9447
|
+
};
|
9415
9448
|
this.appearance = "default";
|
9416
9449
|
this.areaExpanded = false;
|
9417
9450
|
this.isFocussed = false;
|
@@ -9431,10 +9464,12 @@ class Card {
|
|
9431
9464
|
this.target = undefined;
|
9432
9465
|
}
|
9433
9466
|
disconnectedCallback() {
|
9467
|
+
var _a;
|
9434
9468
|
if (this.parentIsAnchorTag) {
|
9435
9469
|
this.parentEl.removeEventListener("focus", this.parentFocussed);
|
9436
9470
|
this.parentEl.removeEventListener("blur", this.parentBlurred);
|
9437
9471
|
}
|
9472
|
+
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
9438
9473
|
}
|
9439
9474
|
componentWillLoad() {
|
9440
9475
|
this.parentEl = this.el.parentElement;
|
@@ -9451,6 +9486,10 @@ class Card {
|
|
9451
9486
|
!isSlotUsed$1(this.el, "heading") &&
|
9452
9487
|
onComponentRequiredPropUndefined$1([{ prop: this.heading, propName: "heading" }], "Card");
|
9453
9488
|
this.updateTheme();
|
9489
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
9490
|
+
this.hostMutationObserver.observe(this.el, {
|
9491
|
+
childList: true,
|
9492
|
+
});
|
9454
9493
|
}
|
9455
9494
|
handleHostClick(event) {
|
9456
9495
|
if (this.disabled) {
|
@@ -9473,7 +9512,7 @@ class Card {
|
|
9473
9512
|
}
|
9474
9513
|
}
|
9475
9514
|
updateTheme(newTheme = null) {
|
9476
|
-
const foregroundColor = getThemeFromContext(this.el, newTheme || null);
|
9515
|
+
const foregroundColor = getThemeFromContext$1(this.el, newTheme || null);
|
9477
9516
|
if (foregroundColor !== IcThemeForegroundEnum$1.Default) {
|
9478
9517
|
this.appearance = foregroundColor;
|
9479
9518
|
}
|
@@ -9539,871 +9578,1085 @@ class Card {
|
|
9539
9578
|
}; }
|
9540
9579
|
}
|
9541
9580
|
|
9542
|
-
const icCheckboxCss = "/*!@html*/html.sc-ic-checkbox{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-checkbox{margin:0}/*!@main*/main.sc-ic-checkbox{display:block}/*!@h1*/h1.sc-ic-checkbox{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-checkbox{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-checkbox{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-checkbox{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-checkbox{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-checkbox,strong.sc-ic-checkbox{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-checkbox,kbd.sc-ic-checkbox,samp.sc-ic-checkbox{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-checkbox{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-checkbox,sup.sc-ic-checkbox{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-checkbox{bottom:-0.25em}/*!@sup*/sup.sc-ic-checkbox{top:-0.5em}/*!@img*/img.sc-ic-checkbox{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-checkbox,input.sc-ic-checkbox,optgroup.sc-ic-checkbox,select.sc-ic-checkbox,textarea.sc-ic-checkbox{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-checkbox,input.sc-ic-checkbox{overflow:visible}/*!@button,\nselect*/button.sc-ic-checkbox,select.sc-ic-checkbox{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-checkbox,[type=\"button\"].sc-ic-checkbox,[type=\"reset\"].sc-ic-checkbox,[type=\"submit\"].sc-ic-checkbox{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-checkbox::-moz-focus-inner,[type=\"button\"].sc-ic-checkbox::-moz-focus-inner,[type=\"reset\"].sc-ic-checkbox::-moz-focus-inner,[type=\"submit\"].sc-ic-checkbox::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-checkbox:-moz-focusring,[type=\"button\"].sc-ic-checkbox:-moz-focusring,[type=\"reset\"].sc-ic-checkbox:-moz-focusring,[type=\"submit\"].sc-ic-checkbox:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-checkbox{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-checkbox{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-checkbox{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-checkbox{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-checkbox,[type=\"radio\"].sc-ic-checkbox{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-checkbox::-webkit-inner-spin-button,[type=\"number\"].sc-ic-checkbox::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-checkbox{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-checkbox::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-checkbox::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-checkbox{display:block}/*!@summary*/summary.sc-ic-checkbox{display:list-item}/*!@template*/template.sc-ic-checkbox{display:none}/*!@[hidden]*/[hidden].sc-ic-checkbox{display:none}/*!@html,\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*/html.sc-ic-checkbox,body.sc-ic-checkbox,div.sc-ic-checkbox,span.sc-ic-checkbox,applet.sc-ic-checkbox,object.sc-ic-checkbox,iframe.sc-ic-checkbox,h1.sc-ic-checkbox,h2.sc-ic-checkbox,h3.sc-ic-checkbox,h4.sc-ic-checkbox,h5.sc-ic-checkbox,h6.sc-ic-checkbox,p.sc-ic-checkbox,blockquote.sc-ic-checkbox,pre.sc-ic-checkbox,a.sc-ic-checkbox,abbr.sc-ic-checkbox,acronym.sc-ic-checkbox,address.sc-ic-checkbox,big.sc-ic-checkbox,cite.sc-ic-checkbox,code.sc-ic-checkbox,del.sc-ic-checkbox,dfn.sc-ic-checkbox,em.sc-ic-checkbox,img.sc-ic-checkbox,ins.sc-ic-checkbox,kbd.sc-ic-checkbox,q.sc-ic-checkbox,s.sc-ic-checkbox,samp.sc-ic-checkbox,small.sc-ic-checkbox,strike.sc-ic-checkbox,strong.sc-ic-checkbox,sub.sc-ic-checkbox,sup.sc-ic-checkbox,tt.sc-ic-checkbox,var.sc-ic-checkbox,b.sc-ic-checkbox,u.sc-ic-checkbox,i.sc-ic-checkbox,center.sc-ic-checkbox,dl.sc-ic-checkbox,dt.sc-ic-checkbox,dd.sc-ic-checkbox,ol.sc-ic-checkbox,ul.sc-ic-checkbox,li.sc-ic-checkbox,fieldset.sc-ic-checkbox,form.sc-ic-checkbox,label.sc-ic-checkbox,legend.sc-ic-checkbox,table.sc-ic-checkbox,caption.sc-ic-checkbox,tbody.sc-ic-checkbox,tfoot.sc-ic-checkbox,thead.sc-ic-checkbox,tr.sc-ic-checkbox,th.sc-ic-checkbox,td.sc-ic-checkbox,article.sc-ic-checkbox,aside.sc-ic-checkbox,canvas.sc-ic-checkbox,details.sc-ic-checkbox,embed.sc-ic-checkbox,figure.sc-ic-checkbox,figcaption.sc-ic-checkbox,footer.sc-ic-checkbox,header.sc-ic-checkbox,hgroup.sc-ic-checkbox,menu.sc-ic-checkbox,nav.sc-ic-checkbox,output.sc-ic-checkbox,ruby.sc-ic-checkbox,section.sc-ic-checkbox,summary.sc-ic-checkbox,time.sc-ic-checkbox,mark.sc-ic-checkbox,audio.sc-ic-checkbox,video.sc-ic-checkbox{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host(.disabled)*/.disabled.sc-ic-checkbox-h{color:var(--ic-architectural-200);pointer-events:none}/*!@.container*/.container.sc-ic-checkbox{display:flex;width:-moz-fit-content;width:fit-content;padding:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);margin-bottom:var(--ic-space-xxs);align-items:center}/*!@:host(.small) .container*/.small.sc-ic-checkbox-h .container.sc-ic-checkbox{margin-bottom:var(--ic-space-xxxs)}/*!@.checkbox*/.checkbox.sc-ic-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:var(--ic-architectural-white);border:var(--ic-border-width) solid var(--ic-architectural-400);border-radius:var(--ic-border-radius);outline:none;cursor:pointer;transition:var(--ic-easing-transition-fast);flex-shrink:0}/*!@:host(.small) .checkbox,\n:host(.small) .container svg*/.small.sc-ic-checkbox-h .checkbox.sc-ic-checkbox,.small.sc-ic-checkbox-h .container.sc-ic-checkbox svg.sc-ic-checkbox{width:var(--ic-space-md);height:var(--ic-space-md)}/*!@:host(.large) .checkbox,\n:host(.large) .container svg*/.large.sc-ic-checkbox-h .checkbox.sc-ic-checkbox,.large.sc-ic-checkbox-h .container.sc-ic-checkbox svg.sc-ic-checkbox{width:var(--ic-space-xl);height:var(--ic-space-xl)}/*!@.checkbox:checked*/.checkbox.sc-ic-checkbox:checked{background-color:var(--ic-action-default);border:var(--ic-border-width) solid var(--ic-action-default);transition:var(--ic-easing-transition-slow)}/*!@.checkbox:checked:disabled*/.checkbox.sc-ic-checkbox:checked:disabled{background-color:var(--ic-architectural-200)}/*!@.checkbox:indeterminate,\n.checkbox.indeterminate:checked*/.checkbox.sc-ic-checkbox:indeterminate,.checkbox.indeterminate.sc-ic-checkbox:checked{background-color:var(--ic-architectural-white);border:0.125rem solid var(--ic-action-default)}/*!@.checkbox:checked:hover*/.checkbox.sc-ic-checkbox:checked:hover{background-color:var(--ic-action-default-hover)}/*!@.checkbox:indeterminate:hover,\n.checkbox.indeterminate:checked:hover*/.checkbox.sc-ic-checkbox:indeterminate:hover,.checkbox.indeterminate.sc-ic-checkbox:checked:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);border:0.125rem solid var(--ic-action-default-hover)}/*!@.checkbox:checked:active*/.checkbox.sc-ic-checkbox:checked:active{background-color:var(--ic-action-default-active)}/*!@.checkbox:indeterminate:active,\n.checkbox.indeterminate:checked:active*/.checkbox.sc-ic-checkbox:indeterminate:active,.checkbox.indeterminate.sc-ic-checkbox:checked:active{background-color:var(--ic-action-default-bg-active-no-alpha);border:0.125rem solid var(--ic-action-default-active)}/*!@.checkbox:hover*/.checkbox.sc-ic-checkbox:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-hover);border:var(--ic-border-width) solid var(--ic-action-default-hover)}/*!@.checkbox:active*/.checkbox.sc-ic-checkbox:active{background-color:var(--ic-action-default-bg-active-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active);border:var(--ic-border-width) solid var(--ic-action-default-active)}/*!@.checkbox:focus*/.checkbox.sc-ic-checkbox:focus{box-shadow:var(--ic-border-focus)}/*!@.checkbox:disabled*/.checkbox.sc-ic-checkbox:disabled{border:var(--ic-border-width) dashed var(--ic-architectural-200)}/*!@.checkbox-label*/.checkbox-label.sc-ic-checkbox{padding-left:var(--ic-space-sm)}/*!@.checkbox-label:hover*/.checkbox-label.sc-ic-checkbox:hover{cursor:pointer}/*!@.checkmark*/.checkmark.sc-ic-checkbox{position:relative;right:calc(-1 * var(--ic-space-lg));margin-left:calc(-1 * var(--ic-space-lg));fill:white;z-index:1;background-color:transparent;pointer-events:none;flex-shrink:0}/*!@:host(.small) .checkmark*/.small.sc-ic-checkbox-h .checkmark.sc-ic-checkbox{margin-left:calc(-1 * var(--ic-space-md));right:calc(-1 * var(--ic-space-md))}/*!@:host(.large) .checkmark*/.large.sc-ic-checkbox-h .checkmark.sc-ic-checkbox{margin-left:calc(-1 * var(--ic-space-xl));right:calc(-1 * var(--ic-space-xl))}/*!@.indeterminate-symbol*/.indeterminate-symbol.sc-ic-checkbox{position:relative;width:0.875rem;height:var(--ic-space-xxxs);right:-1.188rem;margin-left:-0.875rem;z-index:1;background-color:var(--ic-action-default);pointer-events:none;flex-shrink:0}/*!@:host(.small) .indeterminate-symbol*/.small.sc-ic-checkbox-h .indeterminate-symbol.sc-ic-checkbox{width:0.6rem;right:-0.8rem;margin-left:-0.6rem}/*!@:host(.large) .indeterminate-symbol*/.large.sc-ic-checkbox-h .indeterminate-symbol.sc-ic-checkbox{width:1.25rem;right:-1.625rem;margin-left:-1.25rem}/*!@.container:hover .indeterminate-symbol*/.container.sc-ic-checkbox:hover .indeterminate-symbol.sc-ic-checkbox{background-color:var(--ic-action-default-hover)}/*!@.container:active .indeterminate-symbol*/.container.sc-ic-checkbox:active .indeterminate-symbol.sc-ic-checkbox{background-color:var(--ic-action-default-active)}/*!@.additional-field-wrapper*/.additional-field-wrapper.sc-ic-checkbox{margin-left:calc(var(--ic-space-md) + var(--ic-space-lg));margin-top:calc(var(--ic-space-sm) / 2)}/*!@.branch-corner*/.branch-corner.sc-ic-checkbox{color:var(--ic-action-default);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-action-default);border-left:0.125rem solid var(--ic-action-default)}/*!@.dynamic-container*/.dynamic-container.sc-ic-checkbox{display:flex;position:relative;margin:var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}/*!@.dynamic-text*/.dynamic-text.sc-ic-checkbox{color:var(--ic-action-default);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){/*!@::slotted(ic-text-field)*/.sc-ic-checkbox-s>ic-text-field{--input-width:100%}}@media (forced-colors: active){/*!@.checkbox*/.checkbox.sc-ic-checkbox{-webkit-appearance:revert;-moz-appearance:revert;appearance:revert;transition:none}/*!@.checkbox:checked*/.checkbox.sc-ic-checkbox:checked{transition:none}/*!@.checkbox:focus-visible*/.checkbox.sc-ic-checkbox:focus-visible{outline:0.125rem solid highlight}/*!@.checkbox:disabled:not(:checked)*/.checkbox.sc-ic-checkbox:disabled:not(:checked){-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}/*!@.checkmark*/.checkmark.sc-ic-checkbox{fill:none}/*!@.indeterminate-symbol*/.indeterminate-symbol.sc-ic-checkbox{display:none}}";
|
9581
|
+
// Global ARIA attributes
|
9582
|
+
const IC_INHERITED_ARIA = [
|
9583
|
+
"aria-atomic",
|
9584
|
+
"aria-autocomplete",
|
9585
|
+
"aria-busy",
|
9586
|
+
"aria-controls",
|
9587
|
+
"aria-current",
|
9588
|
+
"aria-describedby",
|
9589
|
+
"aria-description",
|
9590
|
+
"aria-details",
|
9591
|
+
"aria-disabled",
|
9592
|
+
"aria-dropeffect",
|
9593
|
+
"aria-errormessage",
|
9594
|
+
"aria-expanded",
|
9595
|
+
"aria-flowto",
|
9596
|
+
"aria-grabbed",
|
9597
|
+
"aria-haspopup",
|
9598
|
+
"aria-hidden",
|
9599
|
+
"aria-invalid",
|
9600
|
+
"aria-keyshortcuts",
|
9601
|
+
"aria-label",
|
9602
|
+
"aria-labelledby",
|
9603
|
+
"aria-live",
|
9604
|
+
"aria-owns",
|
9605
|
+
"aria-relevant",
|
9606
|
+
"aria-roledescription",
|
9607
|
+
];
|
9608
|
+
const IC_BLOCK_COLOR_COMPONENTS = [
|
9609
|
+
"ic-hero",
|
9610
|
+
"ic-top-navigation",
|
9611
|
+
"ic-footer",
|
9612
|
+
"ic-side-navigation",
|
9613
|
+
"ic-alert",
|
9614
|
+
];
|
9615
|
+
const IC_FIXED_COLOR_COMPONENTS = ["ic-alert"];
|
9616
|
+
const IC_BLOCK_COLOR_EXCEPTIONS = {
|
9617
|
+
"ic-alert": ["ic-link"],
|
9618
|
+
};
|
9619
|
+
|
9620
|
+
var IcInformationStatus;
|
9621
|
+
(function (IcInformationStatus) {
|
9622
|
+
IcInformationStatus["Warning"] = "warning";
|
9623
|
+
IcInformationStatus["Error"] = "error";
|
9624
|
+
IcInformationStatus["Success"] = "success";
|
9625
|
+
})(IcInformationStatus || (IcInformationStatus = {}));
|
9626
|
+
var IcThemeForegroundEnum;
|
9627
|
+
(function (IcThemeForegroundEnum) {
|
9628
|
+
IcThemeForegroundEnum["Default"] = "default";
|
9629
|
+
IcThemeForegroundEnum["Dark"] = "dark";
|
9630
|
+
IcThemeForegroundEnum["Light"] = "light";
|
9631
|
+
})(IcThemeForegroundEnum || (IcThemeForegroundEnum = {}));
|
9632
|
+
var IcDateInputMonths;
|
9633
|
+
(function (IcDateInputMonths) {
|
9634
|
+
IcDateInputMonths[IcDateInputMonths["January"] = 0] = "January";
|
9635
|
+
IcDateInputMonths[IcDateInputMonths["February"] = 1] = "February";
|
9636
|
+
IcDateInputMonths[IcDateInputMonths["March"] = 2] = "March";
|
9637
|
+
IcDateInputMonths[IcDateInputMonths["April"] = 3] = "April";
|
9638
|
+
IcDateInputMonths[IcDateInputMonths["May"] = 4] = "May";
|
9639
|
+
IcDateInputMonths[IcDateInputMonths["June"] = 5] = "June";
|
9640
|
+
IcDateInputMonths[IcDateInputMonths["July"] = 6] = "July";
|
9641
|
+
IcDateInputMonths[IcDateInputMonths["August"] = 7] = "August";
|
9642
|
+
IcDateInputMonths[IcDateInputMonths["September"] = 8] = "September";
|
9643
|
+
IcDateInputMonths[IcDateInputMonths["October"] = 9] = "October";
|
9644
|
+
IcDateInputMonths[IcDateInputMonths["November"] = 10] = "November";
|
9645
|
+
IcDateInputMonths[IcDateInputMonths["December"] = 11] = "December";
|
9646
|
+
})(IcDateInputMonths || (IcDateInputMonths = {}));
|
9647
|
+
var IcShortDayNames;
|
9648
|
+
(function (IcShortDayNames) {
|
9649
|
+
IcShortDayNames[IcShortDayNames["Sun"] = 0] = "Sun";
|
9650
|
+
IcShortDayNames[IcShortDayNames["Mon"] = 1] = "Mon";
|
9651
|
+
IcShortDayNames[IcShortDayNames["Tue"] = 2] = "Tue";
|
9652
|
+
IcShortDayNames[IcShortDayNames["Wed"] = 3] = "Wed";
|
9653
|
+
IcShortDayNames[IcShortDayNames["Thu"] = 4] = "Thu";
|
9654
|
+
IcShortDayNames[IcShortDayNames["Fri"] = 5] = "Fri";
|
9655
|
+
IcShortDayNames[IcShortDayNames["Sat"] = 6] = "Sat";
|
9656
|
+
})(IcShortDayNames || (IcShortDayNames = {}));
|
9657
|
+
var IcDayNames;
|
9658
|
+
(function (IcDayNames) {
|
9659
|
+
IcDayNames[IcDayNames["Sunday"] = 0] = "Sunday";
|
9660
|
+
IcDayNames[IcDayNames["Monday"] = 1] = "Monday";
|
9661
|
+
IcDayNames[IcDayNames["Tuesday"] = 2] = "Tuesday";
|
9662
|
+
IcDayNames[IcDayNames["Wednesday"] = 3] = "Wednesday";
|
9663
|
+
IcDayNames[IcDayNames["Thursday"] = 4] = "Thursday";
|
9664
|
+
IcDayNames[IcDayNames["Friday"] = 5] = "Friday";
|
9665
|
+
IcDayNames[IcDayNames["Saturday"] = 6] = "Saturday";
|
9666
|
+
})(IcDayNames || (IcDayNames = {}));
|
9667
|
+
var IcWeekDays;
|
9668
|
+
(function (IcWeekDays) {
|
9669
|
+
IcWeekDays[IcWeekDays["Sunday"] = 0] = "Sunday";
|
9670
|
+
IcWeekDays[IcWeekDays["Monday"] = 1] = "Monday";
|
9671
|
+
IcWeekDays[IcWeekDays["Tuesday"] = 2] = "Tuesday";
|
9672
|
+
IcWeekDays[IcWeekDays["Wednesday"] = 3] = "Wednesday";
|
9673
|
+
IcWeekDays[IcWeekDays["Thursday"] = 4] = "Thursday";
|
9674
|
+
IcWeekDays[IcWeekDays["Friday"] = 5] = "Friday";
|
9675
|
+
IcWeekDays[IcWeekDays["Saturday"] = 6] = "Saturday";
|
9676
|
+
})(IcWeekDays || (IcWeekDays = {}));
|
9543
9677
|
|
9544
9678
|
/**
|
9545
|
-
*
|
9679
|
+
* converts an enum of strings into an array of strings
|
9546
9680
|
*/
|
9547
|
-
|
9548
|
-
|
9549
|
-
|
9550
|
-
|
9551
|
-
|
9552
|
-
|
9553
|
-
this.handleClick = () => {
|
9554
|
-
this.checked = !this.checked;
|
9555
|
-
this.displayIndeterminate = this.nativeIndeterminateBehaviour
|
9556
|
-
? false
|
9557
|
-
: this.indeterminate && this.checked;
|
9558
|
-
this.icCheck.emit();
|
9559
|
-
this.checkboxChecked.emit();
|
9560
|
-
};
|
9561
|
-
this.handleFormReset = () => {
|
9562
|
-
this.checked = this.initiallyChecked;
|
9563
|
-
};
|
9564
|
-
this.additionalFieldDisplay = "static";
|
9565
|
-
this.checked = false;
|
9566
|
-
this.initiallyChecked = this.checked;
|
9567
|
-
this.disabled = false;
|
9568
|
-
this.dynamicText = "This selection requires additional answers";
|
9569
|
-
this.form = undefined;
|
9570
|
-
this.formaction = undefined;
|
9571
|
-
this.formenctype = undefined;
|
9572
|
-
this.formmethod = undefined;
|
9573
|
-
this.formnovalidate = undefined;
|
9574
|
-
this.formtarget = undefined;
|
9575
|
-
this.groupLabel = undefined;
|
9576
|
-
this.indeterminate = false;
|
9577
|
-
this.displayIndeterminate = this.indeterminate;
|
9578
|
-
this.label = undefined;
|
9579
|
-
this.name = undefined;
|
9580
|
-
this.nativeIndeterminateBehaviour = false;
|
9581
|
-
this.size = undefined;
|
9582
|
-
this.small = false;
|
9583
|
-
this.value = undefined;
|
9584
|
-
this.hideLabel = false;
|
9585
|
-
}
|
9586
|
-
watchIndeterminateHandler() {
|
9587
|
-
this.displayIndeterminate = this.nativeIndeterminateBehaviour
|
9588
|
-
? this.indeterminate
|
9589
|
-
: this.indeterminate && this.checked;
|
9590
|
-
}
|
9591
|
-
componentWillLoad() {
|
9592
|
-
removeDisabledFalse$1(this.disabled, this.el);
|
9593
|
-
addFormResetListener$1(this.el, this.handleFormReset);
|
9594
|
-
const checkboxGroup = this.el.parentElement;
|
9595
|
-
if (checkboxGroup) {
|
9596
|
-
if (!this.name)
|
9597
|
-
this.name = checkboxGroup.name;
|
9598
|
-
this.groupLabel = checkboxGroup.label;
|
9681
|
+
const stringEnumToArray = (theEnum) => {
|
9682
|
+
const arr = [];
|
9683
|
+
Object.values(theEnum).forEach((val) => {
|
9684
|
+
if (isNaN(Number(val))) {
|
9685
|
+
const str = val;
|
9686
|
+
arr.push(str);
|
9599
9687
|
}
|
9600
|
-
}
|
9601
|
-
|
9602
|
-
|
9603
|
-
|
9604
|
-
|
9605
|
-
|
9606
|
-
|
9607
|
-
|
9608
|
-
|
9609
|
-
|
9610
|
-
|
9611
|
-
|
9612
|
-
|
9613
|
-
|
9614
|
-
|
9688
|
+
});
|
9689
|
+
return arr;
|
9690
|
+
};
|
9691
|
+
/**
|
9692
|
+
* Used to inherit global attributes set on the host. Called in componentWillLoad and assigned
|
9693
|
+
* to a variable that is later used in the render function.
|
9694
|
+
*
|
9695
|
+
* This does not need to be reactive as changing attributes on the host element
|
9696
|
+
* does not trigger a re-render.
|
9697
|
+
*/
|
9698
|
+
const inheritAttributes = (element, attributes = []) => {
|
9699
|
+
const attributeObject = {};
|
9700
|
+
attributes.forEach((attr) => {
|
9701
|
+
if (element.hasAttribute(attr)) {
|
9702
|
+
const value = element.getAttribute(attr);
|
9703
|
+
if (value !== null) {
|
9704
|
+
attributeObject[attr] = element.getAttribute(attr);
|
9615
9705
|
}
|
9706
|
+
element.removeAttribute(attr);
|
9707
|
+
}
|
9708
|
+
});
|
9709
|
+
return attributeObject;
|
9710
|
+
};
|
9711
|
+
const debounce$2 = (func, wait = 0) => {
|
9712
|
+
let timer;
|
9713
|
+
return (...args) => {
|
9714
|
+
clearTimeout(timer);
|
9715
|
+
timer = setTimeout(func, wait, ...args);
|
9716
|
+
};
|
9717
|
+
};
|
9718
|
+
/**
|
9719
|
+
* This method is used to add a hidden input to a host element that contains
|
9720
|
+
* a Shadow DOM. It does not add the input inside of the Shadow root which
|
9721
|
+
* allows it to be picked up inside of forms. It should contain the same
|
9722
|
+
* values as the host element.
|
9723
|
+
*
|
9724
|
+
* @param always Add a hidden input even if the container does not use Shadow
|
9725
|
+
* @param container The element where the input will be added
|
9726
|
+
* @param name The name of the input
|
9727
|
+
* @param value The value of the input
|
9728
|
+
* @param disabled If true, the input is disabled
|
9729
|
+
*/
|
9730
|
+
const renderHiddenInput = (always, container, name, value, disabled) => {
|
9731
|
+
if (name !== undefined && (always || hasShadowDom(container))) {
|
9732
|
+
const inputs = container.querySelectorAll("input.ic-input");
|
9733
|
+
const inputEls = Array.from(inputs);
|
9734
|
+
const filtered = inputEls.filter((el) => container === el.parentElement);
|
9735
|
+
let input = filtered[0];
|
9736
|
+
if (input === null || input === undefined) {
|
9737
|
+
input = container.ownerDocument.createElement("input");
|
9738
|
+
input.type = "hidden";
|
9739
|
+
input.classList.add("ic-input");
|
9740
|
+
container.appendChild(input);
|
9741
|
+
}
|
9742
|
+
input.disabled = disabled;
|
9743
|
+
input.name = name;
|
9744
|
+
if (value instanceof Date) {
|
9745
|
+
input.value = value ? value.toISOString() : null;
|
9746
|
+
}
|
9747
|
+
else {
|
9748
|
+
input.value = value || "";
|
9616
9749
|
}
|
9617
|
-
else if (this.additionalFieldContainer) {
|
9618
|
-
this.additionalFieldContainer.style.display = !this.checked
|
9619
|
-
? "none"
|
9620
|
-
: "flex";
|
9621
|
-
}
|
9622
|
-
}
|
9623
|
-
disconnectedCallback() {
|
9624
|
-
removeFormResetListener$1(this.el, this.handleFormReset);
|
9625
|
-
}
|
9626
|
-
/**
|
9627
|
-
* Sets focus on the checkbox.
|
9628
|
-
*/
|
9629
|
-
async setFocus() {
|
9630
|
-
var _a;
|
9631
|
-
(_a = this.el.shadowRoot.querySelector(".checkbox")) === null || _a === void 0 ? void 0 : _a.focus();
|
9632
|
-
}
|
9633
|
-
render() {
|
9634
|
-
const { additionalFieldDisplay, checked, disabled, dynamicText, el, form, formaction, formenctype, formmethod, formnovalidate, formtarget, displayIndeterminate, groupLabel, label, name, size, small, value, } = this;
|
9635
|
-
const id = `ic-checkbox-${isPropDefined(label) || value}-${groupLabel}`.replace(/ /g, "-");
|
9636
|
-
const parentElementSize = el.parentElement
|
9637
|
-
.size;
|
9638
|
-
checked
|
9639
|
-
? renderHiddenInput$1(true, el, name, checked && value, disabled)
|
9640
|
-
: removeHiddenInput(el);
|
9641
|
-
return (hAsync(Host, { class: {
|
9642
|
-
disabled,
|
9643
|
-
small,
|
9644
|
-
[`${size || parentElementSize}`]: true,
|
9645
|
-
} }, hAsync("div", { class: "container" }, displayIndeterminate && hAsync("div", { class: "indeterminate-symbol" }), !displayIndeterminate && checked && (hAsync("svg", { class: "checkmark", width: "1.5rem", height: "1.5rem", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "fill-rule": "evenodd", "clip-rule": "evenodd" }, hAsync("title", null, "checkmark icon"), hAsync("path", { d: "M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z" }))), hAsync("input", { role: "checkbox", class: {
|
9646
|
-
checkbox: true,
|
9647
|
-
checked,
|
9648
|
-
indeterminate: displayIndeterminate,
|
9649
|
-
}, type: "checkbox", name: name, id: id, value: value, disabled: disabled ? true : null, checked: checked, indeterminate: displayIndeterminate, onClick: this.handleClick, form: form, formaction: formaction, formenctype: formenctype, formmethod: formmethod, formnovalidate: formnovalidate, formtarget: formtarget, "aria-label": this.hideLabel ? this.label : undefined }), !this.hideLabel && (hAsync("ic-typography", { class: "checkbox-label", variant: "body" }, hAsync("label", { htmlFor: id }, label)))), isSlotUsed$1(el, "additional-field") && (hAsync("div", { class: "dynamic-container", ref: (el) => (this.additionalFieldContainer = el) }, additionalFieldDisplay === "dynamic" && (hAsync("div", { class: "branch-corner" })), hAsync("div", null, additionalFieldDisplay === "dynamic" && (hAsync("ic-typography", { variant: "caption" }, hAsync("p", { class: "dynamic-text", "aria-live": "polite" }, dynamicText))), hAsync("div", { class: {
|
9650
|
-
"additional-field-wrapper": additionalFieldDisplay === "static",
|
9651
|
-
} }, hAsync("slot", { name: "additional-field" })))))));
|
9652
9750
|
}
|
9653
|
-
|
9654
|
-
|
9655
|
-
|
9656
|
-
|
9657
|
-
|
9658
|
-
|
9659
|
-
|
9660
|
-
|
9661
|
-
|
9662
|
-
|
9663
|
-
|
9664
|
-
|
9665
|
-
|
9666
|
-
|
9667
|
-
|
9668
|
-
|
9669
|
-
|
9670
|
-
|
9671
|
-
|
9672
|
-
|
9673
|
-
|
9674
|
-
|
9675
|
-
|
9676
|
-
|
9677
|
-
|
9678
|
-
|
9679
|
-
|
9680
|
-
|
9681
|
-
|
9682
|
-
|
9683
|
-
|
9684
|
-
|
9685
|
-
|
9686
|
-
|
9687
|
-
|
9688
|
-
|
9689
|
-
|
9690
|
-
|
9751
|
+
};
|
9752
|
+
/**
|
9753
|
+
* This method helps to understand the context in which a component exists,
|
9754
|
+
* to assist with choosing appropriate foreground colours to use. For example,
|
9755
|
+
* this method will help you use the 'white' version of a button if it's within
|
9756
|
+
* a block colour element using white foreground text.
|
9757
|
+
*
|
9758
|
+
* This only works for components/elements passed via <slot> and not if they
|
9759
|
+
* are part of an IC component.
|
9760
|
+
*
|
9761
|
+
* ""
|
9762
|
+
* @returns IcThemeForeground depending on the context
|
9763
|
+
*/
|
9764
|
+
const getThemeFromContext = (el, themeFromEvent = null) => {
|
9765
|
+
var _a;
|
9766
|
+
const parentElement = el.parentElement || el.getRootNode().host.parentElement;
|
9767
|
+
const blockColorParent = parentElement.closest(IC_BLOCK_COLOR_COMPONENTS.join(","));
|
9768
|
+
// If within a block color component
|
9769
|
+
if (blockColorParent !== null) {
|
9770
|
+
const parentTag = blockColorParent.tagName.toLowerCase();
|
9771
|
+
const currentTag = el.tagName.toLowerCase();
|
9772
|
+
if ((_a = IC_BLOCK_COLOR_EXCEPTIONS[parentTag]) === null || _a === void 0 ? void 0 : _a.includes(currentTag)) {
|
9773
|
+
return IcThemeForegroundEnum.Default;
|
9774
|
+
}
|
9775
|
+
else if (themeFromEvent !== null &&
|
9776
|
+
!IC_FIXED_COLOR_COMPONENTS.includes(parentTag)) {
|
9777
|
+
return themeFromEvent;
|
9778
|
+
}
|
9779
|
+
else if (blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)) {
|
9780
|
+
return IcThemeForegroundEnum.Dark;
|
9781
|
+
}
|
9782
|
+
return IcThemeForegroundEnum.Light;
|
9783
|
+
}
|
9784
|
+
return IcThemeForegroundEnum.Default;
|
9785
|
+
};
|
9786
|
+
const isEmptyString = (value) => value ? value.trim().length === 0 : true;
|
9787
|
+
// A helper function that checks if a prop has been defined
|
9788
|
+
const isPropDefined = (prop) => prop !== undefined ? prop : null;
|
9789
|
+
const getCssProperty = (cssVar) => getComputedStyle(document.documentElement).getPropertyValue(cssVar);
|
9790
|
+
const getSlot = (element, name) => {
|
9791
|
+
if (element && element.querySelector) {
|
9792
|
+
return element.querySelector(`[slot="${name}"]`);
|
9793
|
+
}
|
9794
|
+
return null;
|
9795
|
+
};
|
9796
|
+
const getSlotContent = (element, name) => {
|
9797
|
+
const slot = getSlot(element, name);
|
9798
|
+
if (slot) {
|
9799
|
+
return getSlotElements(slot);
|
9800
|
+
}
|
9801
|
+
return null;
|
9802
|
+
};
|
9803
|
+
const getSlotElements = (slot) => {
|
9804
|
+
const slotContent = slot.firstElementChild;
|
9805
|
+
if (slotContent !== null) {
|
9806
|
+
const elements = slotContent.assignedElements
|
9807
|
+
? slotContent.assignedElements()
|
9808
|
+
: slotContent.childNodes;
|
9809
|
+
return elements.length ? elements : slot.tagName ? [slot] : null;
|
9810
|
+
}
|
9811
|
+
else {
|
9812
|
+
//check for single element
|
9813
|
+
return slot === null ? null : [slot];
|
9814
|
+
}
|
9815
|
+
};
|
9816
|
+
({
|
9817
|
+
XS: Number(getCssProperty("--ic-breakpoint-xs").replace("px", "")),
|
9818
|
+
S: Number(getCssProperty("--ic-breakpoint-sm").replace("px", "")),
|
9819
|
+
M: Number(getCssProperty("--ic-breakpoint-md").replace("px", "")),
|
9820
|
+
L: Number(getCssProperty("--ic-breakpoint-lg").replace("px", "")),
|
9821
|
+
XL: Number(getCssProperty("--ic-breakpoint-xl").replace("px", "")),
|
9822
|
+
UNDEFINED: 1200,
|
9823
|
+
});
|
9824
|
+
const isSlotUsed = (element, slotName) => Array.from(element.children).some((child) => child.getAttribute("slot") === slotName);
|
9825
|
+
const hasShadowDom = (el) => !!el.shadowRoot && !!el.attachShadow;
|
9826
|
+
const getInputHelperTextID = (id) => id + "-helper-text";
|
9827
|
+
const getInputValidationTextID = (id) => id + "-validation-text";
|
9828
|
+
const getInputDescribedByText = (inputId, helperText, validationText) => `${helperText ? getInputHelperTextID(inputId) : ""} ${validationText ? getInputValidationTextID(inputId) : ""}`.trim();
|
9829
|
+
const isMobileOrTablet = () => "maxTouchPoints" in navigator ? navigator.maxTouchPoints > 0 : false;
|
9830
|
+
/**
|
9831
|
+
* Extracts the label using the value from an object. Requires the object to have a label and value property.
|
9832
|
+
* @param value - value from object
|
9833
|
+
* @param options - list of menu items
|
9834
|
+
* @returns - label corresponding to value
|
9835
|
+
*/
|
9836
|
+
const getLabelFromValue = (value, options, valueField = "value", labelField = "label") => {
|
9837
|
+
const ungroupedOptions = [];
|
9838
|
+
if (options.length > 0 && options.map) {
|
9839
|
+
options.map((option) => {
|
9840
|
+
if (option.children) {
|
9841
|
+
option.children.map((option) => ungroupedOptions.push(option));
|
9842
|
+
}
|
9843
|
+
else {
|
9844
|
+
ungroupedOptions.push(option);
|
9845
|
+
}
|
9846
|
+
});
|
9847
|
+
const matchingValue = ungroupedOptions.find((option) => option[valueField] === value);
|
9848
|
+
if (matchingValue !== undefined)
|
9849
|
+
return matchingValue[labelField];
|
9850
|
+
}
|
9851
|
+
return undefined;
|
9852
|
+
};
|
9853
|
+
/**
|
9854
|
+
* Filters the options based on the search string.
|
9855
|
+
* @param options - array of options
|
9856
|
+
* @param includeDescriptions - determines whether option descriptions are included when filtering options
|
9857
|
+
* @param searchString - string used to filter the options
|
9858
|
+
* @param position - whether the search string matches the start of or anywhere in the options
|
9859
|
+
* @returns filtered array of options
|
9860
|
+
*/
|
9861
|
+
const getFilteredMenuOptions = (options, includeDescriptions, searchString, position, labelField = "label") => options.filter((option) => {
|
9862
|
+
var _a;
|
9863
|
+
const label = option[labelField].toLowerCase();
|
9864
|
+
const description = (_a = option.description) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
9865
|
+
const lowerSearchString = searchString.toLowerCase();
|
9866
|
+
return position === "anywhere"
|
9867
|
+
? includeDescriptions
|
9868
|
+
? label.includes(lowerSearchString) ||
|
9869
|
+
(description === null || description === void 0 ? void 0 : description.includes(lowerSearchString))
|
9870
|
+
: label.includes(lowerSearchString)
|
9871
|
+
: includeDescriptions
|
9872
|
+
? label.startsWith(lowerSearchString) ||
|
9873
|
+
(description === null || description === void 0 ? void 0 : description.startsWith(lowerSearchString))
|
9874
|
+
: label.startsWith(lowerSearchString);
|
9875
|
+
});
|
9876
|
+
/**
|
9877
|
+
* Gets count of options where only group title "parent" options have been removed.
|
9878
|
+
* Disabled options are included in the count.
|
9879
|
+
* @param options - array of options
|
9880
|
+
* @returns number of options not including group titles
|
9881
|
+
*/
|
9882
|
+
const getOptionsWithoutGroupTitlesCount = (options) => {
|
9883
|
+
const optionsWithoutGroupTitles = [];
|
9884
|
+
if (options.length > 0 && options.map) {
|
9885
|
+
options.map((option) => {
|
9886
|
+
if (option.children) {
|
9887
|
+
option.children.map((option) => optionsWithoutGroupTitles.push(option));
|
9888
|
+
}
|
9889
|
+
else {
|
9890
|
+
optionsWithoutGroupTitles.push(option);
|
9891
|
+
}
|
9892
|
+
});
|
9893
|
+
}
|
9894
|
+
return optionsWithoutGroupTitles.length;
|
9895
|
+
};
|
9896
|
+
const pxToRem = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;
|
9897
|
+
const isNumeric = (value) => {
|
9898
|
+
return /^-?\d+$/.test(value);
|
9899
|
+
};
|
9900
|
+
const hasValidationStatus = (status, disabled) => {
|
9901
|
+
return status !== "" && !disabled;
|
9902
|
+
};
|
9903
|
+
const onComponentRequiredPropUndefined = (props, component) => {
|
9904
|
+
for (let i = 0; i < props.length; i++) {
|
9905
|
+
const { prop, propName } = props[i];
|
9906
|
+
if (prop === null || prop === undefined) {
|
9907
|
+
console.error(`No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(propName)}' (react) required`);
|
9908
|
+
}
|
9909
|
+
}
|
9910
|
+
};
|
9911
|
+
const kebabToCamelCase = (kebabCase) => {
|
9912
|
+
kebabCase = kebabCase.toLowerCase();
|
9913
|
+
const individualWords = kebabCase.split("-");
|
9914
|
+
let camelCase = individualWords[0];
|
9915
|
+
for (let i = 1; i < individualWords.length; i++) {
|
9916
|
+
camelCase +=
|
9917
|
+
individualWords[i].substring(0, 1).toUpperCase() +
|
9918
|
+
individualWords[i].substring(1);
|
9919
|
+
}
|
9920
|
+
return camelCase;
|
9921
|
+
};
|
9922
|
+
const checkResizeObserver = (callbackFn) => {
|
9923
|
+
if (typeof window !== "undefined" &&
|
9924
|
+
typeof window.ResizeObserver !== "undefined") {
|
9925
|
+
callbackFn();
|
9926
|
+
}
|
9927
|
+
};
|
9928
|
+
const getForm = (el) => el.closest("FORM");
|
9929
|
+
const addFormResetListener = (el, callbackFn) => {
|
9930
|
+
const form = getForm(el);
|
9931
|
+
if (form !== null) {
|
9932
|
+
form.addEventListener("reset", callbackFn);
|
9933
|
+
}
|
9934
|
+
};
|
9935
|
+
const removeFormResetListener = (el, callbackFn) => {
|
9936
|
+
const form = getForm(el);
|
9937
|
+
if (form !== null) {
|
9938
|
+
form.removeEventListener("reset", callbackFn);
|
9939
|
+
}
|
9940
|
+
};
|
9941
|
+
const removeDisabledFalse = (disabled, element) => {
|
9942
|
+
if (!disabled) {
|
9943
|
+
element.removeAttribute("disabled");
|
9944
|
+
}
|
9945
|
+
};
|
9946
|
+
const isMacDevice = () => {
|
9947
|
+
return window.navigator.userAgent.toUpperCase().indexOf("MAC") >= 0;
|
9948
|
+
};
|
9949
|
+
const capitalize = (text) => {
|
9950
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
9951
|
+
};
|
9952
|
+
const checkSlotInChildMutations = (addedNodes, removedNodes, slotName) => {
|
9953
|
+
const hasSlot = (nodeList) => Array.from(nodeList).some((node) => node.slot === slotName);
|
9954
|
+
return hasSlot(addedNodes) || hasSlot(removedNodes);
|
9955
|
+
};
|
9691
9956
|
|
9692
|
-
const icCheckboxGroupCss = "/*!@html*/html.sc-ic-checkbox-group{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-checkbox-group{margin:0}/*!@main*/main.sc-ic-checkbox-group{display:block}/*!@h1*/h1.sc-ic-checkbox-group{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-checkbox-group{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-checkbox-group{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-checkbox-group{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-checkbox-group{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-checkbox-group,strong.sc-ic-checkbox-group{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-checkbox-group,kbd.sc-ic-checkbox-group,samp.sc-ic-checkbox-group{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-checkbox-group{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-checkbox-group,sup.sc-ic-checkbox-group{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-checkbox-group{bottom:-0.25em}/*!@sup*/sup.sc-ic-checkbox-group{top:-0.5em}/*!@img*/img.sc-ic-checkbox-group{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-checkbox-group,input.sc-ic-checkbox-group,optgroup.sc-ic-checkbox-group,select.sc-ic-checkbox-group,textarea.sc-ic-checkbox-group{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-checkbox-group,input.sc-ic-checkbox-group{overflow:visible}/*!@button,\nselect*/button.sc-ic-checkbox-group,select.sc-ic-checkbox-group{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-checkbox-group,[type=\"button\"].sc-ic-checkbox-group,[type=\"reset\"].sc-ic-checkbox-group,[type=\"submit\"].sc-ic-checkbox-group{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-checkbox-group::-moz-focus-inner,[type=\"button\"].sc-ic-checkbox-group::-moz-focus-inner,[type=\"reset\"].sc-ic-checkbox-group::-moz-focus-inner,[type=\"submit\"].sc-ic-checkbox-group::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-checkbox-group:-moz-focusring,[type=\"button\"].sc-ic-checkbox-group:-moz-focusring,[type=\"reset\"].sc-ic-checkbox-group:-moz-focusring,[type=\"submit\"].sc-ic-checkbox-group:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-checkbox-group{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-checkbox-group{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-checkbox-group{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-checkbox-group{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-checkbox-group,[type=\"radio\"].sc-ic-checkbox-group{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-checkbox-group::-webkit-inner-spin-button,[type=\"number\"].sc-ic-checkbox-group::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-checkbox-group{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-checkbox-group::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-checkbox-group::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-checkbox-group{display:block}/*!@summary*/summary.sc-ic-checkbox-group{display:list-item}/*!@template*/template.sc-ic-checkbox-group{display:none}/*!@[hidden]*/[hidden].sc-ic-checkbox-group{display:none}/*!@html,\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*/html.sc-ic-checkbox-group,body.sc-ic-checkbox-group,div.sc-ic-checkbox-group,span.sc-ic-checkbox-group,applet.sc-ic-checkbox-group,object.sc-ic-checkbox-group,iframe.sc-ic-checkbox-group,h1.sc-ic-checkbox-group,h2.sc-ic-checkbox-group,h3.sc-ic-checkbox-group,h4.sc-ic-checkbox-group,h5.sc-ic-checkbox-group,h6.sc-ic-checkbox-group,p.sc-ic-checkbox-group,blockquote.sc-ic-checkbox-group,pre.sc-ic-checkbox-group,a.sc-ic-checkbox-group,abbr.sc-ic-checkbox-group,acronym.sc-ic-checkbox-group,address.sc-ic-checkbox-group,big.sc-ic-checkbox-group,cite.sc-ic-checkbox-group,code.sc-ic-checkbox-group,del.sc-ic-checkbox-group,dfn.sc-ic-checkbox-group,em.sc-ic-checkbox-group,img.sc-ic-checkbox-group,ins.sc-ic-checkbox-group,kbd.sc-ic-checkbox-group,q.sc-ic-checkbox-group,s.sc-ic-checkbox-group,samp.sc-ic-checkbox-group,small.sc-ic-checkbox-group,strike.sc-ic-checkbox-group,strong.sc-ic-checkbox-group,sub.sc-ic-checkbox-group,sup.sc-ic-checkbox-group,tt.sc-ic-checkbox-group,var.sc-ic-checkbox-group,b.sc-ic-checkbox-group,u.sc-ic-checkbox-group,i.sc-ic-checkbox-group,center.sc-ic-checkbox-group,dl.sc-ic-checkbox-group,dt.sc-ic-checkbox-group,dd.sc-ic-checkbox-group,ol.sc-ic-checkbox-group,ul.sc-ic-checkbox-group,li.sc-ic-checkbox-group,fieldset.sc-ic-checkbox-group,form.sc-ic-checkbox-group,label.sc-ic-checkbox-group,legend.sc-ic-checkbox-group,table.sc-ic-checkbox-group,caption.sc-ic-checkbox-group,tbody.sc-ic-checkbox-group,tfoot.sc-ic-checkbox-group,thead.sc-ic-checkbox-group,tr.sc-ic-checkbox-group,th.sc-ic-checkbox-group,td.sc-ic-checkbox-group,article.sc-ic-checkbox-group,aside.sc-ic-checkbox-group,canvas.sc-ic-checkbox-group,details.sc-ic-checkbox-group,embed.sc-ic-checkbox-group,figure.sc-ic-checkbox-group,figcaption.sc-ic-checkbox-group,footer.sc-ic-checkbox-group,header.sc-ic-checkbox-group,hgroup.sc-ic-checkbox-group,menu.sc-ic-checkbox-group,nav.sc-ic-checkbox-group,output.sc-ic-checkbox-group,ruby.sc-ic-checkbox-group,section.sc-ic-checkbox-group,summary.sc-ic-checkbox-group,time.sc-ic-checkbox-group,mark.sc-ic-checkbox-group,audio.sc-ic-checkbox-group,video.sc-ic-checkbox-group{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-checkbox-group-h{display:block}/*!@ic-input-label.error*/ic-input-label.error.sc-ic-checkbox-group{color:var(--ic-status-error)}/*!@ic-input-label ic-typography*/ic-input-label.sc-ic-checkbox-group ic-typography.sc-ic-checkbox-group{margin-bottom:var(--ic-space-sm)}/*!@:host(.small) ic-input-label ic-typography*/.small.sc-ic-checkbox-group-h ic-input-label.sc-ic-checkbox-group ic-typography.sc-ic-checkbox-group{margin-bottom:calc(var(--ic-space-sm) / 2)}/*!@ic-input-validation*/ic-input-validation.sc-ic-checkbox-group{margin-top:var(--ic-space-sm)}/*!@:host(.small) ic-input-validation*/.small.sc-ic-checkbox-group-h ic-input-validation.sc-ic-checkbox-group{margin-top:calc(var(--ic-space-sm) / 2)}/*!@.checkboxes-container*/.checkboxes-container.sc-ic-checkbox-group{margin-bottom:calc(-1 * var(--ic-space-xxs))}/*!@:host(.small) .checkboxes-container*/.small.sc-ic-checkbox-group-h .checkboxes-container.sc-ic-checkbox-group{margin-bottom:calc(-1 * var(--ic-space-xxxs))}/*!@.screen-reader-only-text*/.screen-reader-only-text.sc-ic-checkbox-group{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}";
|
9957
|
+
const icCardHorizontalCss = "/*!@html*/html.sc-ic-card-horizontal{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-card-horizontal{margin:0}/*!@main*/main.sc-ic-card-horizontal{display:block}/*!@h1*/h1.sc-ic-card-horizontal{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-card-horizontal{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-card-horizontal{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-card-horizontal{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-card-horizontal{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-card-horizontal,strong.sc-ic-card-horizontal{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-card-horizontal,kbd.sc-ic-card-horizontal,samp.sc-ic-card-horizontal{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-card-horizontal{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-card-horizontal,sup.sc-ic-card-horizontal{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-card-horizontal{bottom:-0.25em}/*!@sup*/sup.sc-ic-card-horizontal{top:-0.5em}/*!@img*/img.sc-ic-card-horizontal{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-card-horizontal,input.sc-ic-card-horizontal,optgroup.sc-ic-card-horizontal,select.sc-ic-card-horizontal,textarea.sc-ic-card-horizontal{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-card-horizontal,input.sc-ic-card-horizontal{overflow:visible}/*!@button,\nselect*/button.sc-ic-card-horizontal,select.sc-ic-card-horizontal{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-card-horizontal,[type=\"button\"].sc-ic-card-horizontal,[type=\"reset\"].sc-ic-card-horizontal,[type=\"submit\"].sc-ic-card-horizontal{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-card-horizontal::-moz-focus-inner,[type=\"button\"].sc-ic-card-horizontal::-moz-focus-inner,[type=\"reset\"].sc-ic-card-horizontal::-moz-focus-inner,[type=\"submit\"].sc-ic-card-horizontal::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-card-horizontal:-moz-focusring,[type=\"button\"].sc-ic-card-horizontal:-moz-focusring,[type=\"reset\"].sc-ic-card-horizontal:-moz-focusring,[type=\"submit\"].sc-ic-card-horizontal:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-card-horizontal{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-card-horizontal{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-card-horizontal{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-card-horizontal{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-card-horizontal,[type=\"radio\"].sc-ic-card-horizontal{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-card-horizontal::-webkit-inner-spin-button,[type=\"number\"].sc-ic-card-horizontal::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-card-horizontal{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-card-horizontal::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-card-horizontal::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-card-horizontal{display:block}/*!@summary*/summary.sc-ic-card-horizontal{display:list-item}/*!@template*/template.sc-ic-card-horizontal{display:none}/*!@[hidden]*/[hidden].sc-ic-card-horizontal{display:none}/*!@html,\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*/html.sc-ic-card-horizontal,body.sc-ic-card-horizontal,div.sc-ic-card-horizontal,span.sc-ic-card-horizontal,applet.sc-ic-card-horizontal,object.sc-ic-card-horizontal,iframe.sc-ic-card-horizontal,h1.sc-ic-card-horizontal,h2.sc-ic-card-horizontal,h3.sc-ic-card-horizontal,h4.sc-ic-card-horizontal,h5.sc-ic-card-horizontal,h6.sc-ic-card-horizontal,p.sc-ic-card-horizontal,blockquote.sc-ic-card-horizontal,pre.sc-ic-card-horizontal,a.sc-ic-card-horizontal,abbr.sc-ic-card-horizontal,acronym.sc-ic-card-horizontal,address.sc-ic-card-horizontal,big.sc-ic-card-horizontal,cite.sc-ic-card-horizontal,code.sc-ic-card-horizontal,del.sc-ic-card-horizontal,dfn.sc-ic-card-horizontal,em.sc-ic-card-horizontal,img.sc-ic-card-horizontal,ins.sc-ic-card-horizontal,kbd.sc-ic-card-horizontal,q.sc-ic-card-horizontal,s.sc-ic-card-horizontal,samp.sc-ic-card-horizontal,small.sc-ic-card-horizontal,strike.sc-ic-card-horizontal,strong.sc-ic-card-horizontal,sub.sc-ic-card-horizontal,sup.sc-ic-card-horizontal,tt.sc-ic-card-horizontal,var.sc-ic-card-horizontal,b.sc-ic-card-horizontal,u.sc-ic-card-horizontal,i.sc-ic-card-horizontal,center.sc-ic-card-horizontal,dl.sc-ic-card-horizontal,dt.sc-ic-card-horizontal,dd.sc-ic-card-horizontal,ol.sc-ic-card-horizontal,ul.sc-ic-card-horizontal,li.sc-ic-card-horizontal,fieldset.sc-ic-card-horizontal,form.sc-ic-card-horizontal,label.sc-ic-card-horizontal,legend.sc-ic-card-horizontal,table.sc-ic-card-horizontal,caption.sc-ic-card-horizontal,tbody.sc-ic-card-horizontal,tfoot.sc-ic-card-horizontal,thead.sc-ic-card-horizontal,tr.sc-ic-card-horizontal,th.sc-ic-card-horizontal,td.sc-ic-card-horizontal,article.sc-ic-card-horizontal,aside.sc-ic-card-horizontal,canvas.sc-ic-card-horizontal,details.sc-ic-card-horizontal,embed.sc-ic-card-horizontal,figure.sc-ic-card-horizontal,figcaption.sc-ic-card-horizontal,footer.sc-ic-card-horizontal,header.sc-ic-card-horizontal,hgroup.sc-ic-card-horizontal,menu.sc-ic-card-horizontal,nav.sc-ic-card-horizontal,output.sc-ic-card-horizontal,ruby.sc-ic-card-horizontal,section.sc-ic-card-horizontal,summary.sc-ic-card-horizontal,time.sc-ic-card-horizontal,mark.sc-ic-card-horizontal,audio.sc-ic-card-horizontal,video.sc-ic-card-horizontal{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-card-horizontal-h{display:flex;--card-max-width:548px;--image-size:114px;--message-max-lines:2}/*!@.card.small*/.card.small.sc-ic-card-horizontal{--card-max-width:360px}/*!@.card.large*/.card.large.sc-ic-card-horizontal{--card-max-width:720px;--image-size:142px;--message-max-lines:3}/*!@.card.extra-large*/.card.extra-large.sc-ic-card-horizontal{--card-max-width:1130px;--image-size:186px;--message-max-lines:5}/*!@a*/a.sc-ic-card-horizontal{text-decoration:none !important;color:var(--ic-architectural-black) !important}/*!@button*/button.sc-ic-card-horizontal{border:none;background-color:transparent;outline:var(--ic-hc-focus-outline);padding:0}/*!@.card,\n.card.clickable*/.card.sc-ic-card-horizontal,.card.clickable.sc-ic-card-horizontal{display:flex;flex-direction:row;border:var(--ic-border-default);border-radius:var(--ic-border-radius);box-sizing:border-box;text-align:left;color:var(--ic-architectural-black);transition:var(--ic-easing-transition-fast);position:relative;max-width:var(--card-max-width);height:-moz-fit-content;height:fit-content;width:var(--card-horizontal-width, -moz-fit-content);width:var(--card-horizontal-width, fit-content)}/*!@.dark.card,\n.dark.card.clickable*/.dark.card.sc-ic-card-horizontal,.dark.card.clickable.sc-ic-card-horizontal{border:var(--ic-border-width) solid var(--ic-architectural-700)}/*!@.card.clickable:hover*/.card.clickable.sc-ic-card-horizontal:hover{background-color:var(--ic-action-default-bg-hover);border:var(--ic-border-hover);cursor:pointer}/*!@.card.clickable:focus,\n.card.clickable.focussed*/.card.clickable.sc-ic-card-horizontal:focus,.card.clickable.focussed.sc-ic-card-horizontal{background-color:var(--ic-action-default-bg-hover);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border:var(--ic-border-pressed)}/*!@.card.clickable:active*/.card.clickable.sc-ic-card-horizontal:active{background-color:var(--ic-action-default-bg-active);box-shadow:var(--ic-border-focus)}/*!@.card.disabled*/.card.disabled.sc-ic-card-horizontal{border:var(--ic-border-disabled)}/*!@.card-header*/.card-header.sc-ic-card-horizontal{display:flex;align-items:center}/*!@.icon*/.icon.sc-ic-card-horizontal{display:flex;align-items:center;padding-right:var(--ic-space-xs)}/*!@.card.disabled ::slotted(svg)*/.card.disabled .sc-ic-card-horizontal-s>svg{fill:var(--ic-color-tertiary-text)}/*!@.card.clickable .card-title*/.card.clickable.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal{color:var(--ic-hyperlink);text-decoration:underline;text-decoration-thickness:var(--ic-space-1px)}/*!@.card.clickable:hover .card-title,\n.card.clickable:focus .card-title,\n.card.clickable.focussed .card-title*/.card.clickable.sc-ic-card-horizontal:hover .card-title.sc-ic-card-horizontal,.card.clickable.sc-ic-card-horizontal:focus .card-title.sc-ic-card-horizontal,.card.clickable.focussed.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal{display:inline-block;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}/*!@.card.clickable:active .card-title*/.card.clickable.sc-ic-card-horizontal:active .card-title.sc-ic-card-horizontal{text-decoration:none}/*!@.card.disabled .card-title*/.card.disabled.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal{text-decoration:underline;text-decoration-thickness:var(--ic-space-1px);text-decoration-color:var(--ic-color-tertiary-text);color:var(--ic-color-tertiary-text)}/*!@.card-message*/.card-message.sc-ic-card-horizontal{margin-top:var(--ic-space-xxxs);align-items:left}/*!@.card.disabled .card-message*/.card.disabled.sc-ic-card-horizontal .card-message.sc-ic-card-horizontal{color:var(--ic-color-tertiary-text)}/*!@.image*/.image.sc-ic-card-horizontal{display:flex;height:var(--image-size);width:var(--image-size);border-radius:var(--ic-border-radius)}/*!@.card-content*/.card-content.sc-ic-card-horizontal{display:flex;flex-direction:column;padding:var(--ic-space-md)}/*!@.card .card-title ::slotted([slot=\"heading\"]),\n.card .card-title ic-typography p*/.card .card-title .sc-ic-card-horizontal-s>[slot=\"heading\"],.card.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal ic-typography.sc-ic-card-horizontal p.sc-ic-card-horizontal{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(var(--card-max-width) - var(--ic-space-xl))}/*!@.card.with-icon .card-title ::slotted([slot=\"heading\"]),\n.card.with-icon .card-title ic-typography p*/.card.with-icon .card-title .sc-ic-card-horizontal-s>[slot=\"heading\"],.card.with-icon.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal ic-typography.sc-ic-card-horizontal p.sc-ic-card-horizontal{max-width:calc(var(--card-max-width) - (2 * var(--ic-space-xl)))}/*!@.card.with-image .card-title ::slotted([slot=\"heading\"]),\n.card.with-image .card-title ic-typography p*/.card.with-image .card-title .sc-ic-card-horizontal-s>[slot=\"heading\"],.card.with-image.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal ic-typography.sc-ic-card-horizontal p.sc-ic-card-horizontal{max-width:calc(\n var(--card-max-width) - var(--image-size) - var(--ic-space-xl)\n )}/*!@.card.with-image.with-icon .card-title ::slotted([slot=\"heading\"]),\n.card.with-image.with-icon .card-title ic-typography p*/.card.with-image.with-icon .card-title .sc-ic-card-horizontal-s>[slot=\"heading\"],.card.with-image.with-icon.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal ic-typography.sc-ic-card-horizontal p.sc-ic-card-horizontal{max-width:calc(\n var(--card-max-width) - var(--image-size) - (2 * var(--ic-space-xl))\n )}/*!@.card .card-message ::slotted([slot=\"message\"]),\n.card .card-message ic-typography*/.card .card-message .sc-ic-card-horizontal-s>[slot=\"message\"],.card.sc-ic-card-horizontal .card-message.sc-ic-card-horizontal ic-typography.sc-ic-card-horizontal{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--message-max-lines, initial);-webkit-line-clamp:var(--message-max-lines, initial);overflow:hidden}@media (forced-colors: active){/*!@.card ::slotted(svg)*/.card .sc-ic-card-horizontal-s>svg{fill:currentcolor}/*!@.card.disabled ::slotted(svg)*/.card.disabled .sc-ic-card-horizontal-s>svg{fill:GrayText !important}/*!@.card.disabled*/.card.disabled.sc-ic-card-horizontal{border-color:GrayText !important}/*!@.card.disabled .card-message,\n .card.disabled .card-title*/.card.disabled.sc-ic-card-horizontal .card-message.sc-ic-card-horizontal,.card.disabled.sc-ic-card-horizontal .card-title.sc-ic-card-horizontal{color:GrayText}}";
|
9693
9958
|
|
9694
|
-
|
9695
|
-
|
9959
|
+
/**
|
9960
|
+
* @slot heading - Content will be placed at the top of the horizontal card to the right of the icon.
|
9961
|
+
* @slot message - Content will be placed in the main body of the horizontal card.
|
9962
|
+
* @slot image - Content will be placed to the left of all other content.
|
9963
|
+
* @slot icon - Content will be placed to the left of the horizontal card heading.
|
9964
|
+
* @slot badge - Badge component overlaying the top right of the horizontal card.
|
9965
|
+
*/
|
9966
|
+
class Card {
|
9696
9967
|
constructor(hostRef) {
|
9697
9968
|
registerInstance(this, hostRef);
|
9698
|
-
this.
|
9969
|
+
this.hostMutationObserver = null;
|
9970
|
+
this.hostMutationCallback = (mutationList) => {
|
9971
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
9972
|
+
? checkSlotInChildMutations(addedNodes, removedNodes, "image")
|
9973
|
+
: false)) ;
|
9974
|
+
};
|
9975
|
+
this.parentFocussed = () => {
|
9976
|
+
this.isFocussed = true;
|
9977
|
+
};
|
9978
|
+
this.parentBlurred = () => {
|
9979
|
+
this.isFocussed = false;
|
9980
|
+
};
|
9981
|
+
this.appearance = "default";
|
9982
|
+
this.isFocussed = false;
|
9983
|
+
this.parentEl = null;
|
9984
|
+
this.parentIsAnchorTag = false;
|
9985
|
+
this.clickable = false;
|
9699
9986
|
this.disabled = false;
|
9700
|
-
this.
|
9701
|
-
this.
|
9702
|
-
this.
|
9703
|
-
this.
|
9704
|
-
this.
|
9705
|
-
this.
|
9706
|
-
this.
|
9707
|
-
this.
|
9708
|
-
this.validationText = "";
|
9709
|
-
}
|
9710
|
-
labelNameHandler(newValue, oldValue, propName) {
|
9711
|
-
Array.from(this.el.querySelectorAll("ic-checkbox")).forEach((checkbox) => {
|
9712
|
-
if (propName === "label")
|
9713
|
-
checkbox.groupLabel = newValue;
|
9714
|
-
else if (checkbox.name === oldValue) {
|
9715
|
-
// If the checkbox name has been set by the parent, then override it
|
9716
|
-
checkbox.name = newValue;
|
9717
|
-
}
|
9718
|
-
});
|
9987
|
+
this.heading = undefined;
|
9988
|
+
this.href = undefined;
|
9989
|
+
this.hreflang = "";
|
9990
|
+
this.message = "";
|
9991
|
+
this.referrerpolicy = undefined;
|
9992
|
+
this.rel = undefined;
|
9993
|
+
this.size = "medium";
|
9994
|
+
this.target = undefined;
|
9719
9995
|
}
|
9720
|
-
|
9721
|
-
|
9722
|
-
|
9723
|
-
|
9724
|
-
|
9996
|
+
disconnectedCallback() {
|
9997
|
+
var _a;
|
9998
|
+
if (this.parentIsAnchorTag) {
|
9999
|
+
this.parentEl.removeEventListener("focus", this.parentFocussed);
|
10000
|
+
this.parentEl.removeEventListener("blur", this.parentBlurred);
|
9725
10001
|
}
|
10002
|
+
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
9726
10003
|
}
|
9727
10004
|
componentWillLoad() {
|
9728
|
-
|
10005
|
+
this.parentEl = this.el.parentElement;
|
10006
|
+
if (this.parentEl.tagName === "A") {
|
10007
|
+
this.clickable = true;
|
10008
|
+
this.parentIsAnchorTag = true;
|
10009
|
+
this.parentEl.classList.add("ic-card-wrapper-link");
|
10010
|
+
this.parentEl.addEventListener("focus", this.parentFocussed);
|
10011
|
+
this.parentEl.addEventListener("blur", this.parentBlurred);
|
10012
|
+
}
|
10013
|
+
removeDisabledFalse(this.disabled, this.el);
|
9729
10014
|
}
|
9730
10015
|
componentDidLoad() {
|
9731
|
-
|
9732
|
-
{ prop: this.
|
9733
|
-
|
9734
|
-
|
9735
|
-
|
9736
|
-
|
9737
|
-
const checkedOptions = Array.from(this.el.querySelectorAll("ic-checkbox")).filter(({ checked, disabled }) => checked && !disabled);
|
9738
|
-
this.icChange.emit({
|
9739
|
-
value: checkedOptions.map(({ value }) => value),
|
9740
|
-
checkedOptions: checkedOptions.map((opt) => {
|
9741
|
-
var _a;
|
9742
|
-
return ({
|
9743
|
-
checkbox: opt,
|
9744
|
-
textFieldValue: (_a = opt.querySelector("ic-text-field")) === null || _a === void 0 ? void 0 : _a.value,
|
9745
|
-
});
|
9746
|
-
}),
|
9747
|
-
selectedOption: target,
|
10016
|
+
!isSlotUsed(this.el, "heading") &&
|
10017
|
+
onComponentRequiredPropUndefined([{ prop: this.heading, propName: "heading" }], "Card");
|
10018
|
+
this.updateTheme();
|
10019
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
10020
|
+
this.hostMutationObserver.observe(this.el, {
|
10021
|
+
childList: true,
|
9748
10022
|
});
|
9749
10023
|
}
|
10024
|
+
handleHostClick(event) {
|
10025
|
+
if (this.disabled) {
|
10026
|
+
event.stopImmediatePropagation();
|
10027
|
+
}
|
10028
|
+
}
|
10029
|
+
themeChangeHandler(ev) {
|
10030
|
+
const theme = ev.detail;
|
10031
|
+
this.updateTheme(theme.mode);
|
10032
|
+
}
|
10033
|
+
/**
|
10034
|
+
* Sets focus on the card.
|
10035
|
+
*/
|
10036
|
+
async setFocus() {
|
10037
|
+
if (this.el.shadowRoot.querySelector("a")) {
|
10038
|
+
this.el.shadowRoot.querySelector("a").focus();
|
10039
|
+
}
|
10040
|
+
else if (this.el.shadowRoot.querySelector("button")) {
|
10041
|
+
this.el.shadowRoot.querySelector("button").focus();
|
10042
|
+
}
|
10043
|
+
}
|
10044
|
+
updateTheme(newTheme = null) {
|
10045
|
+
const foregroundColor = getThemeFromContext(this.el, newTheme || null);
|
10046
|
+
if (foregroundColor !== IcThemeForegroundEnum.Default) {
|
10047
|
+
this.appearance = foregroundColor;
|
10048
|
+
}
|
10049
|
+
}
|
9750
10050
|
render() {
|
9751
|
-
const { disabled,
|
9752
|
-
const
|
9753
|
-
|
9754
|
-
|
9755
|
-
|
10051
|
+
const { clickable, disabled, heading, message, href, hreflang, referrerpolicy, rel, target, parentIsAnchorTag, isFocussed, size, } = this;
|
10052
|
+
const Component = parentIsAnchorTag
|
10053
|
+
? "div"
|
10054
|
+
: clickable
|
10055
|
+
? this.href === undefined
|
10056
|
+
? "button"
|
10057
|
+
: "a"
|
10058
|
+
: "div";
|
10059
|
+
const attrs = Component == "a" && {
|
10060
|
+
href: href,
|
10061
|
+
hrefLang: hreflang,
|
10062
|
+
referrerPolicy: referrerpolicy,
|
10063
|
+
rel: rel,
|
10064
|
+
target: target,
|
10065
|
+
};
|
10066
|
+
return (hAsync(Component, Object.assign({ class: {
|
10067
|
+
["card"]: true,
|
10068
|
+
["clickable"]: clickable && !disabled,
|
10069
|
+
["disabled"]: disabled,
|
10070
|
+
["focussed"]: isFocussed,
|
10071
|
+
["dark"]: this.appearance === IcThemeForegroundEnum.Dark,
|
10072
|
+
[`${size}`]: true,
|
10073
|
+
["with-icon"]: isSlotUsed(this.el, "icon"),
|
10074
|
+
["with-image"]: isSlotUsed(this.el, "image"),
|
10075
|
+
}, tabindex: clickable && !parentIsAnchorTag ? 0 : null, "aria-disabled": disabled ? "true" : null, disabled: disabled ? true : null }, attrs), isSlotUsed(this.el, "image") && (hAsync("div", { class: { ["image"]: true } }, hAsync("slot", { name: "image" }))), hAsync("div", { class: "card-content" }, hAsync("div", { class: "card-header" }, isSlotUsed(this.el, "icon") && (hAsync("div", { class: "icon" }, hAsync("slot", { name: "icon" }))), hAsync("div", { class: "card-title" }, hAsync("slot", { name: "heading" }, hAsync("ic-typography", { variant: "h4" }, hAsync("p", null, heading))))), (message || isSlotUsed(this.el, "message")) && (hAsync("div", { class: {
|
10076
|
+
["card-message"]: true,
|
10077
|
+
} }, message && (hAsync("ic-typography", { variant: "body" }, message)), isSlotUsed(this.el, "message") && hAsync("slot", { name: "message" })))), isSlotUsed(this.el, "badge") && hAsync("slot", { name: "badge" })));
|
9756
10078
|
}
|
9757
10079
|
get el() { return getElement(this); }
|
9758
|
-
static get
|
9759
|
-
"label": ["labelNameHandler"],
|
9760
|
-
"name": ["labelNameHandler"]
|
9761
|
-
}; }
|
9762
|
-
static get style() { return icCheckboxGroupCss; }
|
10080
|
+
static get style() { return icCardHorizontalCss; }
|
9763
10081
|
static get cmpMeta() { return {
|
9764
10082
|
"$flags$": 9,
|
9765
|
-
"$tagName$": "ic-
|
10083
|
+
"$tagName$": "ic-card-horizontal",
|
9766
10084
|
"$members$": {
|
10085
|
+
"clickable": [1028],
|
9767
10086
|
"disabled": [4],
|
9768
|
-
"
|
9769
|
-
"
|
9770
|
-
"
|
9771
|
-
"
|
9772
|
-
"
|
10087
|
+
"heading": [1],
|
10088
|
+
"href": [1],
|
10089
|
+
"hreflang": [1],
|
10090
|
+
"message": [1],
|
10091
|
+
"referrerpolicy": [1],
|
10092
|
+
"rel": [1],
|
9773
10093
|
"size": [1],
|
9774
|
-
"
|
9775
|
-
"
|
9776
|
-
"
|
10094
|
+
"target": [1],
|
10095
|
+
"appearance": [32],
|
10096
|
+
"isFocussed": [32],
|
10097
|
+
"parentEl": [32],
|
10098
|
+
"parentIsAnchorTag": [32],
|
10099
|
+
"setFocus": [64]
|
9777
10100
|
},
|
9778
|
-
"$listeners$": [[
|
10101
|
+
"$listeners$": [[2, "click", "handleHostClick"], [4, "themeChange", "themeChangeHandler"]],
|
9779
10102
|
"$lazyBundleId$": "-",
|
9780
10103
|
"$attrsToReflect$": []
|
9781
10104
|
}; }
|
9782
10105
|
}
|
9783
10106
|
|
9784
|
-
var dismissIcon = `<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
9785
|
-
<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"/>
|
9786
|
-
</svg>
|
9787
|
-
`;
|
9788
|
-
|
9789
|
-
const icChipCss = "/*!@html*/html.sc-ic-chip{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-chip{margin:0}/*!@main*/main.sc-ic-chip{display:block}/*!@h1*/h1.sc-ic-chip{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-chip{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-chip{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-chip{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-chip,strong.sc-ic-chip{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-chip,kbd.sc-ic-chip,samp.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-chip{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-chip,sup.sc-ic-chip{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-chip{bottom:-0.25em}/*!@sup*/sup.sc-ic-chip{top:-0.5em}/*!@img*/img.sc-ic-chip{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-chip,input.sc-ic-chip,optgroup.sc-ic-chip,select.sc-ic-chip,textarea.sc-ic-chip{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-chip,input.sc-ic-chip{overflow:visible}/*!@button,\nselect*/button.sc-ic-chip,select.sc-ic-chip{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-chip,[type=\"button\"].sc-ic-chip,[type=\"reset\"].sc-ic-chip,[type=\"submit\"].sc-ic-chip{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-chip::-moz-focus-inner,[type=\"button\"].sc-ic-chip::-moz-focus-inner,[type=\"reset\"].sc-ic-chip::-moz-focus-inner,[type=\"submit\"].sc-ic-chip::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-chip:-moz-focusring,[type=\"button\"].sc-ic-chip:-moz-focusring,[type=\"reset\"].sc-ic-chip:-moz-focusring,[type=\"submit\"].sc-ic-chip:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-chip{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-chip{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-chip{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-chip{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-chip,[type=\"radio\"].sc-ic-chip{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-chip::-webkit-inner-spin-button,[type=\"number\"].sc-ic-chip::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-chip{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-chip::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-chip::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-chip{display:block}/*!@summary*/summary.sc-ic-chip{display:list-item}/*!@template*/template.sc-ic-chip{display:none}/*!@[hidden]*/[hidden].sc-ic-chip{display:none}/*!@html,\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*/html.sc-ic-chip,body.sc-ic-chip,div.sc-ic-chip,span.sc-ic-chip,applet.sc-ic-chip,object.sc-ic-chip,iframe.sc-ic-chip,h1.sc-ic-chip,h2.sc-ic-chip,h3.sc-ic-chip,h4.sc-ic-chip,h5.sc-ic-chip,h6.sc-ic-chip,p.sc-ic-chip,blockquote.sc-ic-chip,pre.sc-ic-chip,a.sc-ic-chip,abbr.sc-ic-chip,acronym.sc-ic-chip,address.sc-ic-chip,big.sc-ic-chip,cite.sc-ic-chip,code.sc-ic-chip,del.sc-ic-chip,dfn.sc-ic-chip,em.sc-ic-chip,img.sc-ic-chip,ins.sc-ic-chip,kbd.sc-ic-chip,q.sc-ic-chip,s.sc-ic-chip,samp.sc-ic-chip,small.sc-ic-chip,strike.sc-ic-chip,strong.sc-ic-chip,sub.sc-ic-chip,sup.sc-ic-chip,tt.sc-ic-chip,var.sc-ic-chip,b.sc-ic-chip,u.sc-ic-chip,i.sc-ic-chip,center.sc-ic-chip,dl.sc-ic-chip,dt.sc-ic-chip,dd.sc-ic-chip,ol.sc-ic-chip,ul.sc-ic-chip,li.sc-ic-chip,fieldset.sc-ic-chip,form.sc-ic-chip,label.sc-ic-chip,legend.sc-ic-chip,table.sc-ic-chip,caption.sc-ic-chip,tbody.sc-ic-chip,tfoot.sc-ic-chip,thead.sc-ic-chip,tr.sc-ic-chip,th.sc-ic-chip,td.sc-ic-chip,article.sc-ic-chip,aside.sc-ic-chip,canvas.sc-ic-chip,details.sc-ic-chip,embed.sc-ic-chip,figure.sc-ic-chip,figcaption.sc-ic-chip,footer.sc-ic-chip,header.sc-ic-chip,hgroup.sc-ic-chip,menu.sc-ic-chip,nav.sc-ic-chip,output.sc-ic-chip,ruby.sc-ic-chip,section.sc-ic-chip,summary.sc-ic-chip,time.sc-ic-chip,mark.sc-ic-chip,audio.sc-ic-chip,video.sc-ic-chip{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-chip-h{display:inline-block}/*!@.chip*/.chip.sc-ic-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*/.chip.small.sc-ic-chip{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}/*!@.chip.large*/.chip.large.sc-ic-chip{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}/*!@.label*/.label.sc-ic-chip{padding:0 var(--ic-space-xs)}/*!@.chip.hovered:not(:focus-within)*/.chip.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-architectural-300)}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}/*!@.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within)*/.chip.outline.hovered.sc-ic-chip:not(:focus-within),.chip.outlined.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}/*!@ic-tooltip:focus-within*/ic-tooltip.sc-ic-chip:focus-within{z-index:1}/*!@.filled*/.filled.sc-ic-chip{background-color:var(--chip-custom-color, var(--ic-architectural-200));color:var(--chip-custom-foreground-color, black);border:none}/*!@.filled.disabled*/.filled.disabled.sc-ic-chip{background-color:var(--ic-architectural-100)}/*!@.outline,\n.outlined*/.outline.sc-ic-chip,.outlined.sc-ic-chip{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,\n.outlined.small*/.outline.small.sc-ic-chip,.outlined.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.outline.large,\n.outlined.large*/.outline.large.sc-ic-chip,.outlined.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.outline.disabled,\n.outlined.disabled*/.outline.disabled.sc-ic-chip,.outlined.disabled.sc-ic-chip{border:var(--ic-border-disabled);background:none}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-500)}/*!@.filled.disabled ic-typography*/.filled.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-600)}/*!@.dismiss-icon*/.dismiss-icon.sc-ic-chip{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*/.dismiss-icon.sc-ic-chip:focus{outline:var(--ic-hc-focus-outline)}/*!@.dismiss-icon[disabled]*/.dismiss-icon[disabled].sc-ic-chip{pointer-events:none;color:var(--ic-architectural-200)}/*!@.icon*/.icon.sc-ic-chip{padding:var(--ic-space-xxxs);box-sizing:border-box}/*!@.icon,\nic-tooltip*/.icon.sc-ic-chip,ic-tooltip.sc-ic-chip{width:var(--ic-space-lg);height:var(--ic-space-lg)}/*!@.chip.disabled path,\n.chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:var(--ic-architectural-200)}/*!@.chip.white-background*/.chip.white-background.sc-ic-chip{background-color:var(--ic-architectural-white)}/*!@.chip.white-background.hovered:not(:focus-within)*/.chip.white-background.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover-no-alpha) !important}@media (forced-colors: active){/*!@.chip*/.chip.sc-ic-chip{border:var(--ic-hc-border)}/*!@.filled.small*/.filled.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.filled*/.filled.sc-ic-chip{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}/*!@.filled.large*/.filled.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.chip.disabled*/.chip.disabled.sc-ic-chip{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:GrayText}/*!@.chip.disabled path,\n .chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:GrayText}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{outline:none;border-color:Highlight}}";
|
10107
|
+
const icCheckboxCss = "/*!@html*/html.sc-ic-checkbox{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-checkbox{margin:0}/*!@main*/main.sc-ic-checkbox{display:block}/*!@h1*/h1.sc-ic-checkbox{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-checkbox{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-checkbox{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-checkbox{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-checkbox{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-checkbox,strong.sc-ic-checkbox{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-checkbox,kbd.sc-ic-checkbox,samp.sc-ic-checkbox{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-checkbox{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-checkbox,sup.sc-ic-checkbox{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-checkbox{bottom:-0.25em}/*!@sup*/sup.sc-ic-checkbox{top:-0.5em}/*!@img*/img.sc-ic-checkbox{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-checkbox,input.sc-ic-checkbox,optgroup.sc-ic-checkbox,select.sc-ic-checkbox,textarea.sc-ic-checkbox{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-checkbox,input.sc-ic-checkbox{overflow:visible}/*!@button,\nselect*/button.sc-ic-checkbox,select.sc-ic-checkbox{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-checkbox,[type=\"button\"].sc-ic-checkbox,[type=\"reset\"].sc-ic-checkbox,[type=\"submit\"].sc-ic-checkbox{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-checkbox::-moz-focus-inner,[type=\"button\"].sc-ic-checkbox::-moz-focus-inner,[type=\"reset\"].sc-ic-checkbox::-moz-focus-inner,[type=\"submit\"].sc-ic-checkbox::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-checkbox:-moz-focusring,[type=\"button\"].sc-ic-checkbox:-moz-focusring,[type=\"reset\"].sc-ic-checkbox:-moz-focusring,[type=\"submit\"].sc-ic-checkbox:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-checkbox{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-checkbox{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-checkbox{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-checkbox{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-checkbox,[type=\"radio\"].sc-ic-checkbox{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-checkbox::-webkit-inner-spin-button,[type=\"number\"].sc-ic-checkbox::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-checkbox{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-checkbox::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-checkbox::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-checkbox{display:block}/*!@summary*/summary.sc-ic-checkbox{display:list-item}/*!@template*/template.sc-ic-checkbox{display:none}/*!@[hidden]*/[hidden].sc-ic-checkbox{display:none}/*!@html,\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*/html.sc-ic-checkbox,body.sc-ic-checkbox,div.sc-ic-checkbox,span.sc-ic-checkbox,applet.sc-ic-checkbox,object.sc-ic-checkbox,iframe.sc-ic-checkbox,h1.sc-ic-checkbox,h2.sc-ic-checkbox,h3.sc-ic-checkbox,h4.sc-ic-checkbox,h5.sc-ic-checkbox,h6.sc-ic-checkbox,p.sc-ic-checkbox,blockquote.sc-ic-checkbox,pre.sc-ic-checkbox,a.sc-ic-checkbox,abbr.sc-ic-checkbox,acronym.sc-ic-checkbox,address.sc-ic-checkbox,big.sc-ic-checkbox,cite.sc-ic-checkbox,code.sc-ic-checkbox,del.sc-ic-checkbox,dfn.sc-ic-checkbox,em.sc-ic-checkbox,img.sc-ic-checkbox,ins.sc-ic-checkbox,kbd.sc-ic-checkbox,q.sc-ic-checkbox,s.sc-ic-checkbox,samp.sc-ic-checkbox,small.sc-ic-checkbox,strike.sc-ic-checkbox,strong.sc-ic-checkbox,sub.sc-ic-checkbox,sup.sc-ic-checkbox,tt.sc-ic-checkbox,var.sc-ic-checkbox,b.sc-ic-checkbox,u.sc-ic-checkbox,i.sc-ic-checkbox,center.sc-ic-checkbox,dl.sc-ic-checkbox,dt.sc-ic-checkbox,dd.sc-ic-checkbox,ol.sc-ic-checkbox,ul.sc-ic-checkbox,li.sc-ic-checkbox,fieldset.sc-ic-checkbox,form.sc-ic-checkbox,label.sc-ic-checkbox,legend.sc-ic-checkbox,table.sc-ic-checkbox,caption.sc-ic-checkbox,tbody.sc-ic-checkbox,tfoot.sc-ic-checkbox,thead.sc-ic-checkbox,tr.sc-ic-checkbox,th.sc-ic-checkbox,td.sc-ic-checkbox,article.sc-ic-checkbox,aside.sc-ic-checkbox,canvas.sc-ic-checkbox,details.sc-ic-checkbox,embed.sc-ic-checkbox,figure.sc-ic-checkbox,figcaption.sc-ic-checkbox,footer.sc-ic-checkbox,header.sc-ic-checkbox,hgroup.sc-ic-checkbox,menu.sc-ic-checkbox,nav.sc-ic-checkbox,output.sc-ic-checkbox,ruby.sc-ic-checkbox,section.sc-ic-checkbox,summary.sc-ic-checkbox,time.sc-ic-checkbox,mark.sc-ic-checkbox,audio.sc-ic-checkbox,video.sc-ic-checkbox{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host(.disabled)*/.disabled.sc-ic-checkbox-h{color:var(--ic-architectural-200);pointer-events:none}/*!@.container*/.container.sc-ic-checkbox{display:flex;width:-moz-fit-content;width:fit-content;padding:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);margin-bottom:var(--ic-space-xxs);align-items:center}/*!@:host(.small) .container*/.small.sc-ic-checkbox-h .container.sc-ic-checkbox{margin-bottom:var(--ic-space-xxxs)}/*!@.checkbox*/.checkbox.sc-ic-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:var(--ic-architectural-white);border:var(--ic-border-width) solid var(--ic-architectural-400);border-radius:var(--ic-border-radius);outline:none;cursor:pointer;transition:var(--ic-easing-transition-fast);flex-shrink:0}/*!@:host(.small) .checkbox,\n:host(.small) .container svg*/.small.sc-ic-checkbox-h .checkbox.sc-ic-checkbox,.small.sc-ic-checkbox-h .container.sc-ic-checkbox svg.sc-ic-checkbox{width:var(--ic-space-md);height:var(--ic-space-md)}/*!@:host(.large) .checkbox,\n:host(.large) .container svg*/.large.sc-ic-checkbox-h .checkbox.sc-ic-checkbox,.large.sc-ic-checkbox-h .container.sc-ic-checkbox svg.sc-ic-checkbox{width:var(--ic-space-xl);height:var(--ic-space-xl)}/*!@.checkbox:checked*/.checkbox.sc-ic-checkbox:checked{background-color:var(--ic-action-default);border:var(--ic-border-width) solid var(--ic-action-default);transition:var(--ic-easing-transition-slow)}/*!@.checkbox:checked:disabled*/.checkbox.sc-ic-checkbox:checked:disabled{background-color:var(--ic-architectural-200)}/*!@.checkbox:indeterminate,\n.checkbox.indeterminate:checked*/.checkbox.sc-ic-checkbox:indeterminate,.checkbox.indeterminate.sc-ic-checkbox:checked{background-color:var(--ic-architectural-white);border:0.125rem solid var(--ic-action-default)}/*!@.checkbox:checked:hover*/.checkbox.sc-ic-checkbox:checked:hover{background-color:var(--ic-action-default-hover)}/*!@.checkbox:indeterminate:hover,\n.checkbox.indeterminate:checked:hover*/.checkbox.sc-ic-checkbox:indeterminate:hover,.checkbox.indeterminate.sc-ic-checkbox:checked:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);border:0.125rem solid var(--ic-action-default-hover)}/*!@.checkbox:checked:active*/.checkbox.sc-ic-checkbox:checked:active{background-color:var(--ic-action-default-active)}/*!@.checkbox:indeterminate:active,\n.checkbox.indeterminate:checked:active*/.checkbox.sc-ic-checkbox:indeterminate:active,.checkbox.indeterminate.sc-ic-checkbox:checked:active{background-color:var(--ic-action-default-bg-active-no-alpha);border:0.125rem solid var(--ic-action-default-active)}/*!@.checkbox:hover*/.checkbox.sc-ic-checkbox:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-hover);border:var(--ic-border-width) solid var(--ic-action-default-hover)}/*!@.checkbox:active*/.checkbox.sc-ic-checkbox:active{background-color:var(--ic-action-default-bg-active-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active);border:var(--ic-border-width) solid var(--ic-action-default-active)}/*!@.checkbox:focus*/.checkbox.sc-ic-checkbox:focus{box-shadow:var(--ic-border-focus)}/*!@.checkbox:disabled*/.checkbox.sc-ic-checkbox:disabled{border:var(--ic-border-width) dashed var(--ic-architectural-200)}/*!@.checkbox-label*/.checkbox-label.sc-ic-checkbox{padding-left:var(--ic-space-sm)}/*!@.checkbox-label:hover*/.checkbox-label.sc-ic-checkbox:hover{cursor:pointer}/*!@.checkmark*/.checkmark.sc-ic-checkbox{position:relative;right:calc(-1 * var(--ic-space-lg));margin-left:calc(-1 * var(--ic-space-lg));fill:white;z-index:1;background-color:transparent;pointer-events:none;flex-shrink:0}/*!@:host(.small) .checkmark*/.small.sc-ic-checkbox-h .checkmark.sc-ic-checkbox{margin-left:calc(-1 * var(--ic-space-md));right:calc(-1 * var(--ic-space-md))}/*!@:host(.large) .checkmark*/.large.sc-ic-checkbox-h .checkmark.sc-ic-checkbox{margin-left:calc(-1 * var(--ic-space-xl));right:calc(-1 * var(--ic-space-xl))}/*!@.indeterminate-symbol*/.indeterminate-symbol.sc-ic-checkbox{position:relative;width:0.875rem;height:var(--ic-space-xxxs);right:-1.188rem;margin-left:-0.875rem;z-index:1;background-color:var(--ic-action-default);pointer-events:none;flex-shrink:0}/*!@:host(.small) .indeterminate-symbol*/.small.sc-ic-checkbox-h .indeterminate-symbol.sc-ic-checkbox{width:0.6rem;right:-0.8rem;margin-left:-0.6rem}/*!@:host(.large) .indeterminate-symbol*/.large.sc-ic-checkbox-h .indeterminate-symbol.sc-ic-checkbox{width:1.25rem;right:-1.625rem;margin-left:-1.25rem}/*!@.container:hover .indeterminate-symbol*/.container.sc-ic-checkbox:hover .indeterminate-symbol.sc-ic-checkbox{background-color:var(--ic-action-default-hover)}/*!@.container:active .indeterminate-symbol*/.container.sc-ic-checkbox:active .indeterminate-symbol.sc-ic-checkbox{background-color:var(--ic-action-default-active)}/*!@.additional-field-wrapper*/.additional-field-wrapper.sc-ic-checkbox{margin-left:calc(var(--ic-space-md) + var(--ic-space-lg));margin-top:calc(var(--ic-space-sm) / 2)}/*!@.branch-corner*/.branch-corner.sc-ic-checkbox{color:var(--ic-action-default);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-action-default);border-left:0.125rem solid var(--ic-action-default)}/*!@.dynamic-container*/.dynamic-container.sc-ic-checkbox{display:flex;position:relative;margin:var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}/*!@.dynamic-text*/.dynamic-text.sc-ic-checkbox{color:var(--ic-action-default);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){/*!@::slotted(ic-text-field)*/.sc-ic-checkbox-s>ic-text-field{--input-width:100%}}@media (forced-colors: active){/*!@.checkbox*/.checkbox.sc-ic-checkbox{-webkit-appearance:revert;-moz-appearance:revert;appearance:revert;transition:none}/*!@.checkbox:checked*/.checkbox.sc-ic-checkbox:checked{transition:none}/*!@.checkbox:focus-visible*/.checkbox.sc-ic-checkbox:focus-visible{outline:0.125rem solid highlight}/*!@.checkbox:disabled:not(:checked)*/.checkbox.sc-ic-checkbox:disabled:not(:checked){-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}/*!@.checkmark*/.checkmark.sc-ic-checkbox{fill:none}/*!@.indeterminate-symbol*/.indeterminate-symbol.sc-ic-checkbox{display:none}}";
|
9790
10108
|
|
9791
10109
|
/**
|
9792
|
-
* @slot
|
9793
|
-
* @slot badge - Badge component overlaying the top right of the chip.
|
10110
|
+
* @slot additional-field - Content to be displayed alongside a checkbox.
|
9794
10111
|
*/
|
9795
|
-
|
10112
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
10113
|
+
class Checkbox {
|
9796
10114
|
constructor(hostRef) {
|
9797
10115
|
registerInstance(this, hostRef);
|
9798
|
-
this.
|
9799
|
-
this.
|
9800
|
-
this.
|
9801
|
-
this.
|
9802
|
-
this.
|
9803
|
-
|
9804
|
-
|
9805
|
-
this.
|
9806
|
-
|
9807
|
-
this.mouseLeaveHandler = () => {
|
9808
|
-
this.hovered = false;
|
10116
|
+
this.checkboxChecked = createEvent(this, "checkboxChecked", 7);
|
10117
|
+
this.icCheck = createEvent(this, "icCheck", 7);
|
10118
|
+
this.handleClick = () => {
|
10119
|
+
this.checked = !this.checked;
|
10120
|
+
this.displayIndeterminate = this.nativeIndeterminateBehaviour
|
10121
|
+
? false
|
10122
|
+
: this.indeterminate && this.checked;
|
10123
|
+
this.icCheck.emit();
|
10124
|
+
this.checkboxChecked.emit();
|
9809
10125
|
};
|
9810
|
-
this.
|
9811
|
-
|
9812
|
-
if (colorRGBA) {
|
9813
|
-
const { r, g, b, a } = colorRGBA;
|
9814
|
-
const foregroundColour = (r * 299 + g * 587 + b * 114) / 1000 > 133.3505 ? "black" : "white";
|
9815
|
-
this.el.setAttribute("style", `--chip-custom-color: rgba(${r}, ${g}, ${b}, ${a}); --chip-custom-foreground-color: var(--ic-architectural-${foregroundColour})`);
|
9816
|
-
}
|
10126
|
+
this.handleFormReset = () => {
|
10127
|
+
this.checked = this.initiallyChecked;
|
9817
10128
|
};
|
9818
|
-
this.
|
9819
|
-
this.
|
9820
|
-
this.
|
9821
|
-
this.customColor = null;
|
10129
|
+
this.additionalFieldDisplay = "static";
|
10130
|
+
this.checked = false;
|
10131
|
+
this.initiallyChecked = this.checked;
|
9822
10132
|
this.disabled = false;
|
9823
|
-
this.
|
10133
|
+
this.dynamicText = "This selection requires additional answers";
|
10134
|
+
this.form = undefined;
|
10135
|
+
this.formaction = undefined;
|
10136
|
+
this.formenctype = undefined;
|
10137
|
+
this.formmethod = undefined;
|
10138
|
+
this.formnovalidate = undefined;
|
10139
|
+
this.formtarget = undefined;
|
10140
|
+
this.groupLabel = undefined;
|
10141
|
+
this.indeterminate = false;
|
10142
|
+
this.displayIndeterminate = this.indeterminate;
|
9824
10143
|
this.label = undefined;
|
9825
|
-
this.
|
9826
|
-
this.
|
9827
|
-
this.
|
10144
|
+
this.name = undefined;
|
10145
|
+
this.nativeIndeterminateBehaviour = false;
|
10146
|
+
this.size = undefined;
|
10147
|
+
this.small = false;
|
10148
|
+
this.value = undefined;
|
10149
|
+
this.hideLabel = false;
|
9828
10150
|
}
|
9829
|
-
|
9830
|
-
|
9831
|
-
this.
|
9832
|
-
|
10151
|
+
watchIndeterminateHandler() {
|
10152
|
+
this.displayIndeterminate = this.nativeIndeterminateBehaviour
|
10153
|
+
? this.indeterminate
|
10154
|
+
: this.indeterminate && this.checked;
|
9833
10155
|
}
|
9834
10156
|
componentWillLoad() {
|
9835
10157
|
removeDisabledFalse$1(this.disabled, this.el);
|
9836
|
-
|
9837
|
-
|
10158
|
+
addFormResetListener$1(this.el, this.handleFormReset);
|
10159
|
+
const checkboxGroup = this.el.parentElement;
|
10160
|
+
if (checkboxGroup) {
|
10161
|
+
if (!this.name)
|
10162
|
+
this.name = checkboxGroup.name;
|
10163
|
+
this.groupLabel = checkboxGroup.label;
|
9838
10164
|
}
|
9839
|
-
|
9840
|
-
|
10165
|
+
}
|
10166
|
+
componentDidLoad() {
|
10167
|
+
onComponentRequiredPropUndefined$1([
|
10168
|
+
{ prop: this.label, propName: "label" },
|
10169
|
+
{ prop: this.value, propName: "value" },
|
10170
|
+
], "Checkbox");
|
10171
|
+
}
|
10172
|
+
componentDidRender() {
|
10173
|
+
if (this.additionalFieldDisplay === "static") {
|
10174
|
+
const textfield = this.el.querySelector("ic-text-field");
|
10175
|
+
if (!this.checked) {
|
10176
|
+
textfield === null || textfield === void 0 ? void 0 : textfield.setAttribute("disabled", "");
|
10177
|
+
}
|
10178
|
+
else {
|
10179
|
+
textfield === null || textfield === void 0 ? void 0 : textfield.removeAttribute("disabled");
|
10180
|
+
}
|
10181
|
+
}
|
10182
|
+
else if (this.additionalFieldContainer) {
|
10183
|
+
this.additionalFieldContainer.style.display = !this.checked
|
10184
|
+
? "none"
|
10185
|
+
: "flex";
|
9841
10186
|
}
|
9842
10187
|
}
|
9843
|
-
|
9844
|
-
|
9845
|
-
}
|
9846
|
-
handleClick() {
|
9847
|
-
this.visible = !this.visible;
|
10188
|
+
disconnectedCallback() {
|
10189
|
+
removeFormResetListener$1(this.el, this.handleFormReset);
|
9848
10190
|
}
|
9849
10191
|
/**
|
9850
|
-
* Sets focus on the
|
10192
|
+
* Sets focus on the checkbox.
|
9851
10193
|
*/
|
9852
10194
|
async setFocus() {
|
9853
10195
|
var _a;
|
9854
|
-
(_a = this.el.shadowRoot.querySelector("
|
10196
|
+
(_a = this.el.shadowRoot.querySelector(".checkbox")) === null || _a === void 0 ? void 0 : _a.focus();
|
9855
10197
|
}
|
9856
10198
|
render() {
|
9857
|
-
const {
|
9858
|
-
|
9859
|
-
|
9860
|
-
|
9861
|
-
|
9862
|
-
|
10199
|
+
const { additionalFieldDisplay, checked, disabled, dynamicText, el, form, formaction, formenctype, formmethod, formnovalidate, formtarget, displayIndeterminate, groupLabel, label, name, size, small, value, } = this;
|
10200
|
+
const id = `ic-checkbox-${isPropDefined$1(label) || value}-${groupLabel}`.replace(/ /g, "-");
|
10201
|
+
const parentElementSize = el.parentElement
|
10202
|
+
.size;
|
10203
|
+
checked
|
10204
|
+
? renderHiddenInput$1(true, el, name, checked && value, disabled)
|
10205
|
+
: removeHiddenInput(el);
|
10206
|
+
return (hAsync(Host, { class: {
|
9863
10207
|
disabled,
|
9864
|
-
|
9865
|
-
|
9866
|
-
|
9867
|
-
|
10208
|
+
small,
|
10209
|
+
[`${size || parentElementSize}`]: true,
|
10210
|
+
} }, hAsync("div", { class: "container" }, displayIndeterminate && hAsync("div", { class: "indeterminate-symbol" }), !displayIndeterminate && checked && (hAsync("svg", { class: "checkmark", width: "1.5rem", height: "1.5rem", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "fill-rule": "evenodd", "clip-rule": "evenodd" }, hAsync("title", null, "checkmark icon"), hAsync("path", { d: "M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z" }))), hAsync("input", { role: "checkbox", class: {
|
10211
|
+
checkbox: true,
|
10212
|
+
checked,
|
10213
|
+
indeterminate: displayIndeterminate,
|
10214
|
+
}, type: "checkbox", name: name, id: id, value: value, disabled: disabled ? true : null, checked: checked, indeterminate: displayIndeterminate, onClick: this.handleClick, form: form, formaction: formaction, formenctype: formenctype, formmethod: formmethod, formnovalidate: formnovalidate, formtarget: formtarget, "aria-label": this.hideLabel ? this.label : undefined }), !this.hideLabel && (hAsync("ic-typography", { class: "checkbox-label", variant: "body" }, hAsync("label", { htmlFor: id }, label)))), isSlotUsed$1(el, "additional-field") && (hAsync("div", { class: "dynamic-container", ref: (el) => (this.additionalFieldContainer = el) }, additionalFieldDisplay === "dynamic" && (hAsync("div", { class: "branch-corner" })), hAsync("div", null, additionalFieldDisplay === "dynamic" && (hAsync("ic-typography", { variant: "caption" }, hAsync("p", { class: "dynamic-text", "aria-live": "polite" }, dynamicText))), hAsync("div", { class: {
|
10215
|
+
"additional-field-wrapper": additionalFieldDisplay === "static",
|
10216
|
+
} }, hAsync("slot", { name: "additional-field" })))))));
|
9868
10217
|
}
|
9869
10218
|
static get delegatesFocus() { return true; }
|
9870
10219
|
get el() { return getElement(this); }
|
9871
10220
|
static get watchers() { return {
|
9872
|
-
"
|
10221
|
+
"indeterminate": ["watchIndeterminateHandler"]
|
9873
10222
|
}; }
|
9874
|
-
static get style() { return
|
10223
|
+
static get style() { return icCheckboxCss; }
|
9875
10224
|
static get cmpMeta() { return {
|
9876
10225
|
"$flags$": 25,
|
9877
|
-
"$tagName$": "ic-
|
10226
|
+
"$tagName$": "ic-checkbox",
|
9878
10227
|
"$members$": {
|
9879
|
-
"
|
9880
|
-
"
|
10228
|
+
"additionalFieldDisplay": [513, "additional-field-display"],
|
10229
|
+
"checked": [1540],
|
9881
10230
|
"disabled": [4],
|
9882
|
-
"
|
10231
|
+
"dynamicText": [1, "dynamic-text"],
|
10232
|
+
"form": [1],
|
10233
|
+
"formaction": [1],
|
10234
|
+
"formenctype": [1],
|
10235
|
+
"formmethod": [1],
|
10236
|
+
"formnovalidate": [4],
|
10237
|
+
"formtarget": [1],
|
10238
|
+
"groupLabel": [1025, "group-label"],
|
10239
|
+
"indeterminate": [4],
|
9883
10240
|
"label": [1],
|
10241
|
+
"name": [1025],
|
10242
|
+
"nativeIndeterminateBehaviour": [4, "native-indeterminate-behaviour"],
|
9884
10243
|
"size": [1],
|
9885
|
-
"
|
9886
|
-
"
|
9887
|
-
"
|
9888
|
-
"
|
10244
|
+
"small": [4],
|
10245
|
+
"value": [1],
|
10246
|
+
"hideLabel": [4, "hide-label"],
|
10247
|
+
"initiallyChecked": [32],
|
10248
|
+
"displayIndeterminate": [32],
|
9889
10249
|
"setFocus": [64]
|
9890
10250
|
},
|
9891
|
-
"$listeners$": [[2, "icDismiss", "handleClick"]],
|
9892
|
-
"$lazyBundleId$": "-",
|
9893
|
-
"$attrsToReflect$": []
|
9894
|
-
}; }
|
9895
|
-
}
|
9896
|
-
|
9897
|
-
const icClassificationBannerCss = "/*!@html*/html.sc-ic-classification-banner{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-classification-banner{margin:0}/*!@main*/main.sc-ic-classification-banner{display:block}/*!@h1*/h1.sc-ic-classification-banner{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-classification-banner{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-classification-banner{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-classification-banner{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-classification-banner{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-classification-banner,strong.sc-ic-classification-banner{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-classification-banner,kbd.sc-ic-classification-banner,samp.sc-ic-classification-banner{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-classification-banner{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-classification-banner,sup.sc-ic-classification-banner{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-classification-banner{bottom:-0.25em}/*!@sup*/sup.sc-ic-classification-banner{top:-0.5em}/*!@img*/img.sc-ic-classification-banner{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-classification-banner,input.sc-ic-classification-banner,optgroup.sc-ic-classification-banner,select.sc-ic-classification-banner,textarea.sc-ic-classification-banner{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-classification-banner,input.sc-ic-classification-banner{overflow:visible}/*!@button,\nselect*/button.sc-ic-classification-banner,select.sc-ic-classification-banner{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-classification-banner,[type=\"button\"].sc-ic-classification-banner,[type=\"reset\"].sc-ic-classification-banner,[type=\"submit\"].sc-ic-classification-banner{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-classification-banner::-moz-focus-inner,[type=\"button\"].sc-ic-classification-banner::-moz-focus-inner,[type=\"reset\"].sc-ic-classification-banner::-moz-focus-inner,[type=\"submit\"].sc-ic-classification-banner::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-classification-banner:-moz-focusring,[type=\"button\"].sc-ic-classification-banner:-moz-focusring,[type=\"reset\"].sc-ic-classification-banner:-moz-focusring,[type=\"submit\"].sc-ic-classification-banner:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-classification-banner{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-classification-banner{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-classification-banner{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-classification-banner{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-classification-banner,[type=\"radio\"].sc-ic-classification-banner{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-classification-banner::-webkit-inner-spin-button,[type=\"number\"].sc-ic-classification-banner::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-classification-banner{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-classification-banner::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-classification-banner::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-classification-banner{display:block}/*!@summary*/summary.sc-ic-classification-banner{display:list-item}/*!@template*/template.sc-ic-classification-banner{display:none}/*!@[hidden]*/[hidden].sc-ic-classification-banner{display:none}/*!@html,\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*/html.sc-ic-classification-banner,body.sc-ic-classification-banner,div.sc-ic-classification-banner,span.sc-ic-classification-banner,applet.sc-ic-classification-banner,object.sc-ic-classification-banner,iframe.sc-ic-classification-banner,h1.sc-ic-classification-banner,h2.sc-ic-classification-banner,h3.sc-ic-classification-banner,h4.sc-ic-classification-banner,h5.sc-ic-classification-banner,h6.sc-ic-classification-banner,p.sc-ic-classification-banner,blockquote.sc-ic-classification-banner,pre.sc-ic-classification-banner,a.sc-ic-classification-banner,abbr.sc-ic-classification-banner,acronym.sc-ic-classification-banner,address.sc-ic-classification-banner,big.sc-ic-classification-banner,cite.sc-ic-classification-banner,code.sc-ic-classification-banner,del.sc-ic-classification-banner,dfn.sc-ic-classification-banner,em.sc-ic-classification-banner,img.sc-ic-classification-banner,ins.sc-ic-classification-banner,kbd.sc-ic-classification-banner,q.sc-ic-classification-banner,s.sc-ic-classification-banner,samp.sc-ic-classification-banner,small.sc-ic-classification-banner,strike.sc-ic-classification-banner,strong.sc-ic-classification-banner,sub.sc-ic-classification-banner,sup.sc-ic-classification-banner,tt.sc-ic-classification-banner,var.sc-ic-classification-banner,b.sc-ic-classification-banner,u.sc-ic-classification-banner,i.sc-ic-classification-banner,center.sc-ic-classification-banner,dl.sc-ic-classification-banner,dt.sc-ic-classification-banner,dd.sc-ic-classification-banner,ol.sc-ic-classification-banner,ul.sc-ic-classification-banner,li.sc-ic-classification-banner,fieldset.sc-ic-classification-banner,form.sc-ic-classification-banner,label.sc-ic-classification-banner,legend.sc-ic-classification-banner,table.sc-ic-classification-banner,caption.sc-ic-classification-banner,tbody.sc-ic-classification-banner,tfoot.sc-ic-classification-banner,thead.sc-ic-classification-banner,tr.sc-ic-classification-banner,th.sc-ic-classification-banner,td.sc-ic-classification-banner,article.sc-ic-classification-banner,aside.sc-ic-classification-banner,canvas.sc-ic-classification-banner,details.sc-ic-classification-banner,embed.sc-ic-classification-banner,figure.sc-ic-classification-banner,figcaption.sc-ic-classification-banner,footer.sc-ic-classification-banner,header.sc-ic-classification-banner,hgroup.sc-ic-classification-banner,menu.sc-ic-classification-banner,nav.sc-ic-classification-banner,output.sc-ic-classification-banner,ruby.sc-ic-classification-banner,section.sc-ic-classification-banner,summary.sc-ic-classification-banner,time.sc-ic-classification-banner,mark.sc-ic-classification-banner,audio.sc-ic-classification-banner,video.sc-ic-classification-banner{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-classification-banner-h{position:fixed;left:0;bottom:0;width:100%;height:var(--ic-space-lg);z-index:var(--ic-z-index-classification-banner)}/*!@:host(.inline)*/.inline.sc-ic-classification-banner-h{position:static;left:auto;bottom:auto}/*!@.classification-banner*/.classification-banner.sc-ic-classification-banner{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:var(--ic-space-xxxs) var(--ic-space-md)}/*!@.default*/.default.sc-ic-classification-banner{background-color:var(--ic-classification-not-set);color:var(--ic-classification-not-set-foreground)}/*!@.official,\n.official-sensitive*/.official.sc-ic-classification-banner,.official-sensitive.sc-ic-classification-banner{background-color:var(--ic-classification-official);color:var(--ic-classification-official-foreground)}/*!@.secret*/.secret.sc-ic-classification-banner{background-color:var(--ic-classification-secret);color:var(--ic-classification-secret-foreground)}/*!@.top-secret*/.top-secret.sc-ic-classification-banner{background-color:var(--ic-classification-top-secret);color:var(--ic-classification-top-secret-foreground)}/*!@.offscreen*/.offscreen.sc-ic-classification-banner{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}@media (forced-colors: active){/*!@.classification-banner*/.classification-banner.sc-ic-classification-banner{border:var(--ic-hc-border)}}";
|
9898
|
-
|
9899
|
-
const classificationText = {
|
9900
|
-
default: "protective marking not set",
|
9901
|
-
official: "official",
|
9902
|
-
"official-sensitive": "official sensitive",
|
9903
|
-
secret: "secret",
|
9904
|
-
"top-secret": "top secret",
|
9905
|
-
};
|
9906
|
-
class ClassificationBanner {
|
9907
|
-
constructor(hostRef) {
|
9908
|
-
registerInstance(this, hostRef);
|
9909
|
-
this.additionalSelectors = "";
|
9910
|
-
this.classification = "default";
|
9911
|
-
this.country = "uk";
|
9912
|
-
this.inline = false;
|
9913
|
-
this.upTo = false;
|
9914
|
-
}
|
9915
|
-
render() {
|
9916
|
-
const { classification, inline, country, upTo, additionalSelectors } = this;
|
9917
|
-
return (hAsync(Host, { class: { ["inline"]: inline } }, hAsync("banner", { "aria-label": "Protective marking", class: {
|
9918
|
-
["classification-banner"]: true,
|
9919
|
-
[`${classification}`]: classification,
|
9920
|
-
} }, classification !== "default" ? (hAsync("span", { class: "offscreen" }, "The protective marking of this page is:", " ")) : null, hAsync("ic-typography", { variant: "caption-uppercase" }, classification === "default"
|
9921
|
-
? classificationText[classification]
|
9922
|
-
: `${upTo ? "up to" : ""}
|
9923
|
-
${country !== "" ? country : ""}
|
9924
|
-
${classificationText[classification]}
|
9925
|
-
${additionalSelectors !== "" ? additionalSelectors : ""}`))));
|
9926
|
-
}
|
9927
|
-
static get style() { return icClassificationBannerCss; }
|
9928
|
-
static get cmpMeta() { return {
|
9929
|
-
"$flags$": 9,
|
9930
|
-
"$tagName$": "ic-classification-banner",
|
9931
|
-
"$members$": {
|
9932
|
-
"additionalSelectors": [1, "additional-selectors"],
|
9933
|
-
"classification": [1],
|
9934
|
-
"country": [1],
|
9935
|
-
"inline": [4],
|
9936
|
-
"upTo": [4, "up-to"]
|
9937
|
-
},
|
9938
|
-
"$listeners$": undefined,
|
9939
|
-
"$lazyBundleId$": "-",
|
9940
|
-
"$attrsToReflect$": []
|
9941
|
-
}; }
|
9942
|
-
}
|
9943
|
-
|
9944
|
-
const icDataEntityCss = "/*!@html*/html.sc-ic-data-entity{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-data-entity{margin:0}/*!@main*/main.sc-ic-data-entity{display:block}/*!@h1*/h1.sc-ic-data-entity{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-data-entity{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-data-entity{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-data-entity{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-data-entity{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-data-entity,strong.sc-ic-data-entity{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-data-entity,kbd.sc-ic-data-entity,samp.sc-ic-data-entity{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-data-entity{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-data-entity,sup.sc-ic-data-entity{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-data-entity{bottom:-0.25em}/*!@sup*/sup.sc-ic-data-entity{top:-0.5em}/*!@img*/img.sc-ic-data-entity{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-data-entity,input.sc-ic-data-entity,optgroup.sc-ic-data-entity,select.sc-ic-data-entity,textarea.sc-ic-data-entity{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-data-entity,input.sc-ic-data-entity{overflow:visible}/*!@button,\nselect*/button.sc-ic-data-entity,select.sc-ic-data-entity{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-data-entity,[type=\"button\"].sc-ic-data-entity,[type=\"reset\"].sc-ic-data-entity,[type=\"submit\"].sc-ic-data-entity{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-data-entity::-moz-focus-inner,[type=\"button\"].sc-ic-data-entity::-moz-focus-inner,[type=\"reset\"].sc-ic-data-entity::-moz-focus-inner,[type=\"submit\"].sc-ic-data-entity::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-data-entity:-moz-focusring,[type=\"button\"].sc-ic-data-entity:-moz-focusring,[type=\"reset\"].sc-ic-data-entity:-moz-focusring,[type=\"submit\"].sc-ic-data-entity:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-data-entity{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-data-entity{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-data-entity{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-data-entity{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-data-entity,[type=\"radio\"].sc-ic-data-entity{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-data-entity::-webkit-inner-spin-button,[type=\"number\"].sc-ic-data-entity::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-data-entity{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-data-entity::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-data-entity::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-data-entity{display:block}/*!@summary*/summary.sc-ic-data-entity{display:list-item}/*!@template*/template.sc-ic-data-entity{display:none}/*!@[hidden]*/[hidden].sc-ic-data-entity{display:none}/*!@html,\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*/html.sc-ic-data-entity,body.sc-ic-data-entity,div.sc-ic-data-entity,span.sc-ic-data-entity,applet.sc-ic-data-entity,object.sc-ic-data-entity,iframe.sc-ic-data-entity,h1.sc-ic-data-entity,h2.sc-ic-data-entity,h3.sc-ic-data-entity,h4.sc-ic-data-entity,h5.sc-ic-data-entity,h6.sc-ic-data-entity,p.sc-ic-data-entity,blockquote.sc-ic-data-entity,pre.sc-ic-data-entity,a.sc-ic-data-entity,abbr.sc-ic-data-entity,acronym.sc-ic-data-entity,address.sc-ic-data-entity,big.sc-ic-data-entity,cite.sc-ic-data-entity,code.sc-ic-data-entity,del.sc-ic-data-entity,dfn.sc-ic-data-entity,em.sc-ic-data-entity,img.sc-ic-data-entity,ins.sc-ic-data-entity,kbd.sc-ic-data-entity,q.sc-ic-data-entity,s.sc-ic-data-entity,samp.sc-ic-data-entity,small.sc-ic-data-entity,strike.sc-ic-data-entity,strong.sc-ic-data-entity,sub.sc-ic-data-entity,sup.sc-ic-data-entity,tt.sc-ic-data-entity,var.sc-ic-data-entity,b.sc-ic-data-entity,u.sc-ic-data-entity,i.sc-ic-data-entity,center.sc-ic-data-entity,dl.sc-ic-data-entity,dt.sc-ic-data-entity,dd.sc-ic-data-entity,ol.sc-ic-data-entity,ul.sc-ic-data-entity,li.sc-ic-data-entity,fieldset.sc-ic-data-entity,form.sc-ic-data-entity,label.sc-ic-data-entity,legend.sc-ic-data-entity,table.sc-ic-data-entity,caption.sc-ic-data-entity,tbody.sc-ic-data-entity,tfoot.sc-ic-data-entity,thead.sc-ic-data-entity,tr.sc-ic-data-entity,th.sc-ic-data-entity,td.sc-ic-data-entity,article.sc-ic-data-entity,aside.sc-ic-data-entity,canvas.sc-ic-data-entity,details.sc-ic-data-entity,embed.sc-ic-data-entity,figure.sc-ic-data-entity,figcaption.sc-ic-data-entity,footer.sc-ic-data-entity,header.sc-ic-data-entity,hgroup.sc-ic-data-entity,menu.sc-ic-data-entity,nav.sc-ic-data-entity,output.sc-ic-data-entity,ruby.sc-ic-data-entity,section.sc-ic-data-entity,summary.sc-ic-data-entity,time.sc-ic-data-entity,mark.sc-ic-data-entity,audio.sc-ic-data-entity,video.sc-ic-data-entity{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-data-entity-h{display:block}/*!@.rows*/.rows.sc-ic-data-entity{display:flex;flex-direction:column;gap:var(--ic-space-md)}/*!@:host(.small) .rows*/.small.sc-ic-data-entity-h .rows.sc-ic-data-entity{gap:var(--ic-space-xs)}/*!@.divider*/.divider.sc-ic-data-entity{margin-top:var(--ic-space-lg);margin-bottom:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-architectural-300)}/*!@:host(.small) .divider*/.small.sc-ic-data-entity-h .divider.sc-ic-data-entity{margin-top:var(--ic-space-sm);margin-bottom:var(--ic-space-xs)}@media (forced-colors: active){/*!@.divider*/.divider.sc-ic-data-entity{background-color:canvastext}}";
|
9945
|
-
|
9946
|
-
/**
|
9947
|
-
* @slot heading - Content will be placed at the top of the data entity.
|
9948
|
-
*/
|
9949
|
-
class DataEntity {
|
9950
|
-
constructor(hostRef) {
|
9951
|
-
registerInstance(this, hostRef);
|
9952
|
-
this.heading = undefined;
|
9953
|
-
this.size = "default";
|
9954
|
-
this.small = false;
|
9955
|
-
}
|
9956
|
-
render() {
|
9957
|
-
const { el, heading, small, size } = this;
|
9958
|
-
if (small || size === "small") {
|
9959
|
-
Array.from(el.children).forEach((child) => child.setAttribute("size", "small"));
|
9960
|
-
}
|
9961
|
-
return (hAsync(Host, { class: { small: small || size === "small" } }, hAsync("div", { class: "heading", id: "data-entity-heading" }, hAsync("slot", { name: "heading" }, hAsync("ic-typography", { variant: "h3" }, heading))), hAsync("div", { class: "divider" }), hAsync("ul", { "aria-labelledby": "data-entity-heading", class: "rows" }, hAsync("slot", null))));
|
9962
|
-
}
|
9963
|
-
get el() { return getElement(this); }
|
9964
|
-
static get style() { return icDataEntityCss; }
|
9965
|
-
static get cmpMeta() { return {
|
9966
|
-
"$flags$": 9,
|
9967
|
-
"$tagName$": "ic-data-entity",
|
9968
|
-
"$members$": {
|
9969
|
-
"heading": [1],
|
9970
|
-
"size": [1],
|
9971
|
-
"small": [4]
|
9972
|
-
},
|
9973
10251
|
"$listeners$": undefined,
|
9974
10252
|
"$lazyBundleId$": "-",
|
9975
|
-
"$attrsToReflect$": []
|
10253
|
+
"$attrsToReflect$": [["additionalFieldDisplay", "additional-field-display"], ["checked", "checked"]]
|
9976
10254
|
}; }
|
9977
10255
|
}
|
9978
10256
|
|
9979
|
-
const
|
10257
|
+
const icCheckboxGroupCss = "/*!@html*/html.sc-ic-checkbox-group{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-checkbox-group{margin:0}/*!@main*/main.sc-ic-checkbox-group{display:block}/*!@h1*/h1.sc-ic-checkbox-group{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-checkbox-group{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-checkbox-group{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-checkbox-group{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-checkbox-group{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-checkbox-group,strong.sc-ic-checkbox-group{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-checkbox-group,kbd.sc-ic-checkbox-group,samp.sc-ic-checkbox-group{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-checkbox-group{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-checkbox-group,sup.sc-ic-checkbox-group{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-checkbox-group{bottom:-0.25em}/*!@sup*/sup.sc-ic-checkbox-group{top:-0.5em}/*!@img*/img.sc-ic-checkbox-group{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-checkbox-group,input.sc-ic-checkbox-group,optgroup.sc-ic-checkbox-group,select.sc-ic-checkbox-group,textarea.sc-ic-checkbox-group{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-checkbox-group,input.sc-ic-checkbox-group{overflow:visible}/*!@button,\nselect*/button.sc-ic-checkbox-group,select.sc-ic-checkbox-group{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-checkbox-group,[type=\"button\"].sc-ic-checkbox-group,[type=\"reset\"].sc-ic-checkbox-group,[type=\"submit\"].sc-ic-checkbox-group{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-checkbox-group::-moz-focus-inner,[type=\"button\"].sc-ic-checkbox-group::-moz-focus-inner,[type=\"reset\"].sc-ic-checkbox-group::-moz-focus-inner,[type=\"submit\"].sc-ic-checkbox-group::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-checkbox-group:-moz-focusring,[type=\"button\"].sc-ic-checkbox-group:-moz-focusring,[type=\"reset\"].sc-ic-checkbox-group:-moz-focusring,[type=\"submit\"].sc-ic-checkbox-group:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-checkbox-group{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-checkbox-group{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-checkbox-group{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-checkbox-group{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-checkbox-group,[type=\"radio\"].sc-ic-checkbox-group{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-checkbox-group::-webkit-inner-spin-button,[type=\"number\"].sc-ic-checkbox-group::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-checkbox-group{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-checkbox-group::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-checkbox-group::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-checkbox-group{display:block}/*!@summary*/summary.sc-ic-checkbox-group{display:list-item}/*!@template*/template.sc-ic-checkbox-group{display:none}/*!@[hidden]*/[hidden].sc-ic-checkbox-group{display:none}/*!@html,\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*/html.sc-ic-checkbox-group,body.sc-ic-checkbox-group,div.sc-ic-checkbox-group,span.sc-ic-checkbox-group,applet.sc-ic-checkbox-group,object.sc-ic-checkbox-group,iframe.sc-ic-checkbox-group,h1.sc-ic-checkbox-group,h2.sc-ic-checkbox-group,h3.sc-ic-checkbox-group,h4.sc-ic-checkbox-group,h5.sc-ic-checkbox-group,h6.sc-ic-checkbox-group,p.sc-ic-checkbox-group,blockquote.sc-ic-checkbox-group,pre.sc-ic-checkbox-group,a.sc-ic-checkbox-group,abbr.sc-ic-checkbox-group,acronym.sc-ic-checkbox-group,address.sc-ic-checkbox-group,big.sc-ic-checkbox-group,cite.sc-ic-checkbox-group,code.sc-ic-checkbox-group,del.sc-ic-checkbox-group,dfn.sc-ic-checkbox-group,em.sc-ic-checkbox-group,img.sc-ic-checkbox-group,ins.sc-ic-checkbox-group,kbd.sc-ic-checkbox-group,q.sc-ic-checkbox-group,s.sc-ic-checkbox-group,samp.sc-ic-checkbox-group,small.sc-ic-checkbox-group,strike.sc-ic-checkbox-group,strong.sc-ic-checkbox-group,sub.sc-ic-checkbox-group,sup.sc-ic-checkbox-group,tt.sc-ic-checkbox-group,var.sc-ic-checkbox-group,b.sc-ic-checkbox-group,u.sc-ic-checkbox-group,i.sc-ic-checkbox-group,center.sc-ic-checkbox-group,dl.sc-ic-checkbox-group,dt.sc-ic-checkbox-group,dd.sc-ic-checkbox-group,ol.sc-ic-checkbox-group,ul.sc-ic-checkbox-group,li.sc-ic-checkbox-group,fieldset.sc-ic-checkbox-group,form.sc-ic-checkbox-group,label.sc-ic-checkbox-group,legend.sc-ic-checkbox-group,table.sc-ic-checkbox-group,caption.sc-ic-checkbox-group,tbody.sc-ic-checkbox-group,tfoot.sc-ic-checkbox-group,thead.sc-ic-checkbox-group,tr.sc-ic-checkbox-group,th.sc-ic-checkbox-group,td.sc-ic-checkbox-group,article.sc-ic-checkbox-group,aside.sc-ic-checkbox-group,canvas.sc-ic-checkbox-group,details.sc-ic-checkbox-group,embed.sc-ic-checkbox-group,figure.sc-ic-checkbox-group,figcaption.sc-ic-checkbox-group,footer.sc-ic-checkbox-group,header.sc-ic-checkbox-group,hgroup.sc-ic-checkbox-group,menu.sc-ic-checkbox-group,nav.sc-ic-checkbox-group,output.sc-ic-checkbox-group,ruby.sc-ic-checkbox-group,section.sc-ic-checkbox-group,summary.sc-ic-checkbox-group,time.sc-ic-checkbox-group,mark.sc-ic-checkbox-group,audio.sc-ic-checkbox-group,video.sc-ic-checkbox-group{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-checkbox-group-h{display:block}/*!@ic-input-label.error*/ic-input-label.error.sc-ic-checkbox-group{color:var(--ic-status-error)}/*!@ic-input-label ic-typography*/ic-input-label.sc-ic-checkbox-group ic-typography.sc-ic-checkbox-group{margin-bottom:var(--ic-space-sm)}/*!@:host(.small) ic-input-label ic-typography*/.small.sc-ic-checkbox-group-h ic-input-label.sc-ic-checkbox-group ic-typography.sc-ic-checkbox-group{margin-bottom:calc(var(--ic-space-sm) / 2)}/*!@ic-input-validation*/ic-input-validation.sc-ic-checkbox-group{margin-top:var(--ic-space-sm)}/*!@:host(.small) ic-input-validation*/.small.sc-ic-checkbox-group-h ic-input-validation.sc-ic-checkbox-group{margin-top:calc(var(--ic-space-sm) / 2)}/*!@.checkboxes-container*/.checkboxes-container.sc-ic-checkbox-group{margin-bottom:calc(-1 * var(--ic-space-xxs))}/*!@:host(.small) .checkboxes-container*/.small.sc-ic-checkbox-group-h .checkboxes-container.sc-ic-checkbox-group{margin-bottom:calc(-1 * var(--ic-space-xxxs))}/*!@.screen-reader-only-text*/.screen-reader-only-text.sc-ic-checkbox-group{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}";
|
9980
10258
|
|
9981
|
-
|
9982
|
-
|
9983
|
-
* @slot value - Content will be rendered to the right of the label.
|
9984
|
-
* @slot end-component - Content will be displayed in the rightmost cell.
|
9985
|
-
*/
|
9986
|
-
class DataRow {
|
10259
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
10260
|
+
class CheckboxGroup {
|
9987
10261
|
constructor(hostRef) {
|
9988
10262
|
registerInstance(this, hostRef);
|
9989
|
-
this.
|
9990
|
-
this.
|
9991
|
-
this.
|
9992
|
-
|
9993
|
-
this.checkLabelAbove();
|
9994
|
-
});
|
9995
|
-
this.resizeObserver.observe(this.el);
|
9996
|
-
};
|
9997
|
-
this.renderCellContent = (cell) => {
|
9998
|
-
const isValue = cell === "value";
|
9999
|
-
return (hAsync("div", { class: cell }, isSlotUsed$1(this.el, cell) ? (hAsync("slot", { name: cell })) : (hAsync("ic-typography", { variant: isValue
|
10000
|
-
? "body"
|
10001
|
-
: this.entitySize === "xs"
|
10002
|
-
? "label"
|
10003
|
-
: "subtitle-large" }, isValue ? this.value : this.label))));
|
10004
|
-
};
|
10005
|
-
this.deviceSize = DEVICE_SIZES.XL;
|
10006
|
-
this.entitySize = undefined;
|
10263
|
+
this.icChange = createEvent(this, "icChange", 7);
|
10264
|
+
this.disabled = false;
|
10265
|
+
this.helperText = "";
|
10266
|
+
this.hideLabel = false;
|
10007
10267
|
this.label = undefined;
|
10268
|
+
this.name = undefined;
|
10269
|
+
this.required = false;
|
10008
10270
|
this.size = "default";
|
10009
10271
|
this.small = false;
|
10010
|
-
this.
|
10272
|
+
this.validationStatus = "";
|
10273
|
+
this.validationText = "";
|
10011
10274
|
}
|
10012
|
-
|
10013
|
-
|
10014
|
-
|
10275
|
+
labelNameHandler(newValue, oldValue, propName) {
|
10276
|
+
Array.from(this.el.querySelectorAll("ic-checkbox")).forEach((checkbox) => {
|
10277
|
+
if (propName === "label")
|
10278
|
+
checkbox.groupLabel = newValue;
|
10279
|
+
else if (checkbox.name === oldValue) {
|
10280
|
+
// If the checkbox name has been set by the parent, then override it
|
10281
|
+
checkbox.name = newValue;
|
10282
|
+
}
|
10283
|
+
});
|
10284
|
+
}
|
10285
|
+
handleChange(ev) {
|
10286
|
+
//don't pass on the event if it has come from slotted text field
|
10287
|
+
//otherwise any icChange handler bound to the checkbox group will also run
|
10288
|
+
if (ev.target.tagName === "IC-TEXT-FIELD") {
|
10289
|
+
ev.stopImmediatePropagation();
|
10290
|
+
}
|
10015
10291
|
}
|
10016
10292
|
componentWillLoad() {
|
10017
|
-
this.
|
10018
|
-
this.hasEndComponent = slotHasContent(this.el, "end-component");
|
10019
|
-
this.checkLabelAbove();
|
10293
|
+
removeDisabledFalse$1(this.disabled, this.el);
|
10020
10294
|
}
|
10021
10295
|
componentDidLoad() {
|
10022
|
-
|
10023
|
-
|
10024
|
-
this.
|
10025
|
-
|
10026
|
-
checkLabelAbove() {
|
10027
|
-
var _a;
|
10028
|
-
const rowSize = ((_a = this.el.shadowRoot.querySelector(".data")) === null || _a === void 0 ? void 0 : _a.clientWidth) + 46;
|
10029
|
-
if (rowSize) {
|
10030
|
-
this.entitySize =
|
10031
|
-
rowSize < DEVICE_SIZES.S ? "xs" : rowSize < DEVICE_SIZES.M ? "m" : "xl";
|
10032
|
-
}
|
10296
|
+
onComponentRequiredPropUndefined$1([
|
10297
|
+
{ prop: this.label, propName: "label" },
|
10298
|
+
{ prop: this.name, propName: "name" },
|
10299
|
+
], "Checkbox Group");
|
10033
10300
|
}
|
10034
|
-
|
10035
|
-
this.el.
|
10036
|
-
|
10037
|
-
.
|
10301
|
+
selectHandler({ target }) {
|
10302
|
+
const checkedOptions = Array.from(this.el.querySelectorAll("ic-checkbox")).filter(({ checked, disabled }) => checked && !disabled);
|
10303
|
+
this.icChange.emit({
|
10304
|
+
value: checkedOptions.map(({ value }) => value),
|
10305
|
+
checkedOptions: checkedOptions.map((opt) => {
|
10306
|
+
var _a;
|
10307
|
+
return ({
|
10308
|
+
checkbox: opt,
|
10309
|
+
textFieldValue: (_a = opt.querySelector("ic-text-field")) === null || _a === void 0 ? void 0 : _a.value,
|
10310
|
+
});
|
10311
|
+
}),
|
10312
|
+
selectedOption: target,
|
10313
|
+
});
|
10038
10314
|
}
|
10039
10315
|
render() {
|
10040
|
-
const {
|
10041
|
-
|
10042
|
-
|
10043
|
-
|
10044
|
-
|
10045
|
-
}, role: "listitem" }, hAsync("div", { class: "data" }, hAsync("div", { class: "text-cells" }, (isSlotUsed$1(el, "label") || label) && renderCellContent("label"), (isSlotUsed$1(el, "value") || value) && renderCellContent("value")), hasEndComponent && (hAsync("div", { class: "end-component" }, hAsync("slot", { name: "end-component" })))), hAsync("div", { class: "divider" })));
|
10316
|
+
const { disabled, helperText, hideLabel, label, name, required, size, small, validationStatus, validationText, } = this;
|
10317
|
+
const describedBy = getInputDescribedByText$1(name, helperText !== "", validationStatus !== "");
|
10318
|
+
return (hAsync(Host, { class: { ["small"]: small, [`${size}`]: true } }, (validationStatus === "error" || required || hideLabel) && (hAsync("span", { id: "screenReaderOnlyText", class: "screen-reader-only-text", "aria-hidden": "true" }, label, " ", validationStatus === "error" ? "invalid data " : null, " ", required ? "required" : null)), hAsync("fieldset", { id: name, "aria-labelledby": `${validationStatus === "error" || required || hideLabel
|
10319
|
+
? "screenReaderOnlyText"
|
10320
|
+
: ""} ${describedBy}`.trim(), disabled: disabled }, !hideLabel && (hAsync("legend", null, hAsync("ic-input-label", { class: { [`${validationStatus}`]: true }, label: label, helperText: helperText, required: required, disabled: disabled, for: name }))), hAsync("div", { class: "checkboxes-container" }, hAsync("slot", null))), hasValidationStatus$1(validationStatus, disabled) && (hAsync("ic-input-validation", { for: name, ariaLiveMode: "polite", status: validationStatus, message: validationText }))));
|
10046
10321
|
}
|
10047
10322
|
get el() { return getElement(this); }
|
10048
|
-
static get
|
10323
|
+
static get watchers() { return {
|
10324
|
+
"label": ["labelNameHandler"],
|
10325
|
+
"name": ["labelNameHandler"]
|
10326
|
+
}; }
|
10327
|
+
static get style() { return icCheckboxGroupCss; }
|
10049
10328
|
static get cmpMeta() { return {
|
10050
10329
|
"$flags$": 9,
|
10051
|
-
"$tagName$": "ic-
|
10330
|
+
"$tagName$": "ic-checkbox-group",
|
10052
10331
|
"$members$": {
|
10332
|
+
"disabled": [4],
|
10333
|
+
"helperText": [1, "helper-text"],
|
10334
|
+
"hideLabel": [4, "hide-label"],
|
10053
10335
|
"label": [1],
|
10336
|
+
"name": [1],
|
10337
|
+
"required": [4],
|
10054
10338
|
"size": [1],
|
10055
10339
|
"small": [4],
|
10056
|
-
"
|
10057
|
-
"
|
10058
|
-
"entitySize": [32]
|
10340
|
+
"validationStatus": [1, "validation-status"],
|
10341
|
+
"validationText": [1, "validation-text"]
|
10059
10342
|
},
|
10060
|
-
"$listeners$":
|
10343
|
+
"$listeners$": [[0, "icChange", "handleChange"], [0, "icCheck", "selectHandler"]],
|
10061
10344
|
"$lazyBundleId$": "-",
|
10062
10345
|
"$attrsToReflect$": []
|
10063
10346
|
}; }
|
10064
10347
|
}
|
10065
10348
|
|
10066
|
-
var
|
10067
|
-
|
10068
|
-
</svg
|
10069
|
-
|
10070
|
-
var ascendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(-90deg);">
|
10071
|
-
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
10072
|
-
</svg>`;
|
10073
|
-
|
10074
|
-
var descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(90deg)">
|
10075
|
-
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
10076
|
-
</svg>`;
|
10077
|
-
|
10078
|
-
// Global ARIA attributes
|
10079
|
-
const IC_INHERITED_ARIA = [
|
10080
|
-
"aria-atomic",
|
10081
|
-
"aria-autocomplete",
|
10082
|
-
"aria-busy",
|
10083
|
-
"aria-controls",
|
10084
|
-
"aria-current",
|
10085
|
-
"aria-describedby",
|
10086
|
-
"aria-description",
|
10087
|
-
"aria-details",
|
10088
|
-
"aria-disabled",
|
10089
|
-
"aria-dropeffect",
|
10090
|
-
"aria-errormessage",
|
10091
|
-
"aria-expanded",
|
10092
|
-
"aria-flowto",
|
10093
|
-
"aria-grabbed",
|
10094
|
-
"aria-haspopup",
|
10095
|
-
"aria-hidden",
|
10096
|
-
"aria-invalid",
|
10097
|
-
"aria-keyshortcuts",
|
10098
|
-
"aria-label",
|
10099
|
-
"aria-labelledby",
|
10100
|
-
"aria-live",
|
10101
|
-
"aria-owns",
|
10102
|
-
"aria-relevant",
|
10103
|
-
"aria-roledescription",
|
10104
|
-
];
|
10349
|
+
var dismissIcon = `<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
10350
|
+
<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"/>
|
10351
|
+
</svg>
|
10352
|
+
`;
|
10105
10353
|
|
10106
|
-
var
|
10107
|
-
(function (IcInformationStatus) {
|
10108
|
-
IcInformationStatus["Warning"] = "warning";
|
10109
|
-
IcInformationStatus["Error"] = "error";
|
10110
|
-
IcInformationStatus["Success"] = "success";
|
10111
|
-
})(IcInformationStatus || (IcInformationStatus = {}));
|
10112
|
-
var IcThemeForegroundEnum;
|
10113
|
-
(function (IcThemeForegroundEnum) {
|
10114
|
-
IcThemeForegroundEnum["Default"] = "default";
|
10115
|
-
IcThemeForegroundEnum["Dark"] = "dark";
|
10116
|
-
IcThemeForegroundEnum["Light"] = "light";
|
10117
|
-
})(IcThemeForegroundEnum || (IcThemeForegroundEnum = {}));
|
10118
|
-
var IcDateInputMonths;
|
10119
|
-
(function (IcDateInputMonths) {
|
10120
|
-
IcDateInputMonths[IcDateInputMonths["January"] = 0] = "January";
|
10121
|
-
IcDateInputMonths[IcDateInputMonths["February"] = 1] = "February";
|
10122
|
-
IcDateInputMonths[IcDateInputMonths["March"] = 2] = "March";
|
10123
|
-
IcDateInputMonths[IcDateInputMonths["April"] = 3] = "April";
|
10124
|
-
IcDateInputMonths[IcDateInputMonths["May"] = 4] = "May";
|
10125
|
-
IcDateInputMonths[IcDateInputMonths["June"] = 5] = "June";
|
10126
|
-
IcDateInputMonths[IcDateInputMonths["July"] = 6] = "July";
|
10127
|
-
IcDateInputMonths[IcDateInputMonths["August"] = 7] = "August";
|
10128
|
-
IcDateInputMonths[IcDateInputMonths["September"] = 8] = "September";
|
10129
|
-
IcDateInputMonths[IcDateInputMonths["October"] = 9] = "October";
|
10130
|
-
IcDateInputMonths[IcDateInputMonths["November"] = 10] = "November";
|
10131
|
-
IcDateInputMonths[IcDateInputMonths["December"] = 11] = "December";
|
10132
|
-
})(IcDateInputMonths || (IcDateInputMonths = {}));
|
10133
|
-
var IcShortDayNames;
|
10134
|
-
(function (IcShortDayNames) {
|
10135
|
-
IcShortDayNames[IcShortDayNames["Sun"] = 0] = "Sun";
|
10136
|
-
IcShortDayNames[IcShortDayNames["Mon"] = 1] = "Mon";
|
10137
|
-
IcShortDayNames[IcShortDayNames["Tue"] = 2] = "Tue";
|
10138
|
-
IcShortDayNames[IcShortDayNames["Wed"] = 3] = "Wed";
|
10139
|
-
IcShortDayNames[IcShortDayNames["Thu"] = 4] = "Thu";
|
10140
|
-
IcShortDayNames[IcShortDayNames["Fri"] = 5] = "Fri";
|
10141
|
-
IcShortDayNames[IcShortDayNames["Sat"] = 6] = "Sat";
|
10142
|
-
})(IcShortDayNames || (IcShortDayNames = {}));
|
10143
|
-
var IcDayNames;
|
10144
|
-
(function (IcDayNames) {
|
10145
|
-
IcDayNames[IcDayNames["Sunday"] = 0] = "Sunday";
|
10146
|
-
IcDayNames[IcDayNames["Monday"] = 1] = "Monday";
|
10147
|
-
IcDayNames[IcDayNames["Tuesday"] = 2] = "Tuesday";
|
10148
|
-
IcDayNames[IcDayNames["Wednesday"] = 3] = "Wednesday";
|
10149
|
-
IcDayNames[IcDayNames["Thursday"] = 4] = "Thursday";
|
10150
|
-
IcDayNames[IcDayNames["Friday"] = 5] = "Friday";
|
10151
|
-
IcDayNames[IcDayNames["Saturday"] = 6] = "Saturday";
|
10152
|
-
})(IcDayNames || (IcDayNames = {}));
|
10153
|
-
var IcWeekDays;
|
10154
|
-
(function (IcWeekDays) {
|
10155
|
-
IcWeekDays[IcWeekDays["Sunday"] = 0] = "Sunday";
|
10156
|
-
IcWeekDays[IcWeekDays["Monday"] = 1] = "Monday";
|
10157
|
-
IcWeekDays[IcWeekDays["Tuesday"] = 2] = "Tuesday";
|
10158
|
-
IcWeekDays[IcWeekDays["Wednesday"] = 3] = "Wednesday";
|
10159
|
-
IcWeekDays[IcWeekDays["Thursday"] = 4] = "Thursday";
|
10160
|
-
IcWeekDays[IcWeekDays["Friday"] = 5] = "Friday";
|
10161
|
-
IcWeekDays[IcWeekDays["Saturday"] = 6] = "Saturday";
|
10162
|
-
})(IcWeekDays || (IcWeekDays = {}));
|
10354
|
+
const icChipCss = "/*!@html*/html.sc-ic-chip{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-chip{margin:0}/*!@main*/main.sc-ic-chip{display:block}/*!@h1*/h1.sc-ic-chip{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-chip{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-chip{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-chip{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-chip,strong.sc-ic-chip{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-chip,kbd.sc-ic-chip,samp.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-chip{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-chip,sup.sc-ic-chip{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-chip{bottom:-0.25em}/*!@sup*/sup.sc-ic-chip{top:-0.5em}/*!@img*/img.sc-ic-chip{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-chip,input.sc-ic-chip,optgroup.sc-ic-chip,select.sc-ic-chip,textarea.sc-ic-chip{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-chip,input.sc-ic-chip{overflow:visible}/*!@button,\nselect*/button.sc-ic-chip,select.sc-ic-chip{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-chip,[type=\"button\"].sc-ic-chip,[type=\"reset\"].sc-ic-chip,[type=\"submit\"].sc-ic-chip{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-chip::-moz-focus-inner,[type=\"button\"].sc-ic-chip::-moz-focus-inner,[type=\"reset\"].sc-ic-chip::-moz-focus-inner,[type=\"submit\"].sc-ic-chip::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-chip:-moz-focusring,[type=\"button\"].sc-ic-chip:-moz-focusring,[type=\"reset\"].sc-ic-chip:-moz-focusring,[type=\"submit\"].sc-ic-chip:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-chip{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-chip{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-chip{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-chip{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-chip,[type=\"radio\"].sc-ic-chip{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-chip::-webkit-inner-spin-button,[type=\"number\"].sc-ic-chip::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-chip{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-chip::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-chip::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-chip{display:block}/*!@summary*/summary.sc-ic-chip{display:list-item}/*!@template*/template.sc-ic-chip{display:none}/*!@[hidden]*/[hidden].sc-ic-chip{display:none}/*!@html,\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*/html.sc-ic-chip,body.sc-ic-chip,div.sc-ic-chip,span.sc-ic-chip,applet.sc-ic-chip,object.sc-ic-chip,iframe.sc-ic-chip,h1.sc-ic-chip,h2.sc-ic-chip,h3.sc-ic-chip,h4.sc-ic-chip,h5.sc-ic-chip,h6.sc-ic-chip,p.sc-ic-chip,blockquote.sc-ic-chip,pre.sc-ic-chip,a.sc-ic-chip,abbr.sc-ic-chip,acronym.sc-ic-chip,address.sc-ic-chip,big.sc-ic-chip,cite.sc-ic-chip,code.sc-ic-chip,del.sc-ic-chip,dfn.sc-ic-chip,em.sc-ic-chip,img.sc-ic-chip,ins.sc-ic-chip,kbd.sc-ic-chip,q.sc-ic-chip,s.sc-ic-chip,samp.sc-ic-chip,small.sc-ic-chip,strike.sc-ic-chip,strong.sc-ic-chip,sub.sc-ic-chip,sup.sc-ic-chip,tt.sc-ic-chip,var.sc-ic-chip,b.sc-ic-chip,u.sc-ic-chip,i.sc-ic-chip,center.sc-ic-chip,dl.sc-ic-chip,dt.sc-ic-chip,dd.sc-ic-chip,ol.sc-ic-chip,ul.sc-ic-chip,li.sc-ic-chip,fieldset.sc-ic-chip,form.sc-ic-chip,label.sc-ic-chip,legend.sc-ic-chip,table.sc-ic-chip,caption.sc-ic-chip,tbody.sc-ic-chip,tfoot.sc-ic-chip,thead.sc-ic-chip,tr.sc-ic-chip,th.sc-ic-chip,td.sc-ic-chip,article.sc-ic-chip,aside.sc-ic-chip,canvas.sc-ic-chip,details.sc-ic-chip,embed.sc-ic-chip,figure.sc-ic-chip,figcaption.sc-ic-chip,footer.sc-ic-chip,header.sc-ic-chip,hgroup.sc-ic-chip,menu.sc-ic-chip,nav.sc-ic-chip,output.sc-ic-chip,ruby.sc-ic-chip,section.sc-ic-chip,summary.sc-ic-chip,time.sc-ic-chip,mark.sc-ic-chip,audio.sc-ic-chip,video.sc-ic-chip{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-chip-h{display:inline-block;max-width:100%}/*!@.chip*/.chip.sc-ic-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*/.chip.small.sc-ic-chip{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}/*!@.chip.large*/.chip.large.sc-ic-chip{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}/*!@.label*/.label.sc-ic-chip{padding:0 var(--ic-space-xs)}/*!@.chip.hovered:not(:focus-within)*/.chip.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-architectural-300)}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}/*!@.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within)*/.chip.outline.hovered.sc-ic-chip:not(:focus-within),.chip.outlined.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}/*!@ic-tooltip:focus-within*/ic-tooltip.sc-ic-chip:focus-within{z-index:1}/*!@.filled*/.filled.sc-ic-chip{background-color:var(--chip-custom-color, var(--ic-architectural-200));color:var(--chip-custom-foreground-color, black);border:none}/*!@.filled.disabled*/.filled.disabled.sc-ic-chip{background-color:var(--ic-architectural-100)}/*!@.outline,\n.outlined*/.outline.sc-ic-chip,.outlined.sc-ic-chip{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,\n.outlined.small*/.outline.small.sc-ic-chip,.outlined.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.outline.large,\n.outlined.large*/.outline.large.sc-ic-chip,.outlined.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.outline.disabled,\n.outlined.disabled*/.outline.disabled.sc-ic-chip,.outlined.disabled.sc-ic-chip{border:var(--ic-border-disabled);background:none}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-500)}/*!@.filled.disabled ic-typography*/.filled.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-600)}/*!@.dismiss-icon*/.dismiss-icon.sc-ic-chip{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*/.dismiss-icon.sc-ic-chip:focus{outline:var(--ic-hc-focus-outline)}/*!@.dismiss-icon[disabled]*/.dismiss-icon[disabled].sc-ic-chip{pointer-events:none;color:var(--ic-architectural-200)}/*!@.icon*/.icon.sc-ic-chip{padding:var(--ic-space-xxxs);box-sizing:border-box}/*!@.icon,\nic-tooltip*/.icon.sc-ic-chip,ic-tooltip.sc-ic-chip{width:var(--ic-space-lg);height:var(--ic-space-lg)}/*!@.chip.disabled path,\n.chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:var(--ic-architectural-200)}/*!@.chip.white-background*/.chip.white-background.sc-ic-chip{background-color:var(--ic-architectural-white)}/*!@.chip.white-background.hovered:not(:focus-within)*/.chip.white-background.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover-no-alpha) !important}@media (forced-colors: active){/*!@.chip*/.chip.sc-ic-chip{border:var(--ic-hc-border)}/*!@.filled.small*/.filled.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.filled*/.filled.sc-ic-chip{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}/*!@.filled.large*/.filled.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.chip.disabled*/.chip.disabled.sc-ic-chip{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:GrayText}/*!@.chip.disabled path,\n .chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:GrayText}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{outline:none;border-color:Highlight}}";
|
10163
10355
|
|
10164
10356
|
/**
|
10165
|
-
*
|
10166
|
-
|
10167
|
-
const stringEnumToArray = (theEnum) => {
|
10168
|
-
const arr = [];
|
10169
|
-
Object.values(theEnum).forEach((val) => {
|
10170
|
-
if (isNaN(Number(val))) {
|
10171
|
-
const str = val;
|
10172
|
-
arr.push(str);
|
10173
|
-
}
|
10174
|
-
});
|
10175
|
-
return arr;
|
10176
|
-
};
|
10177
|
-
/**
|
10178
|
-
* Used to inherit global attributes set on the host. Called in componentWillLoad and assigned
|
10179
|
-
* to a variable that is later used in the render function.
|
10180
|
-
*
|
10181
|
-
* This does not need to be reactive as changing attributes on the host element
|
10182
|
-
* does not trigger a re-render.
|
10357
|
+
* @slot icon - Content will be rendered at the start of the chip.
|
10358
|
+
* @slot badge - Badge component overlaying the top right of the chip.
|
10183
10359
|
*/
|
10184
|
-
|
10185
|
-
|
10186
|
-
|
10187
|
-
|
10188
|
-
|
10189
|
-
|
10190
|
-
|
10360
|
+
class Chip {
|
10361
|
+
constructor(hostRef) {
|
10362
|
+
registerInstance(this, hostRef);
|
10363
|
+
this.dismiss = createEvent(this, "dismiss", 7);
|
10364
|
+
this.icDismiss = createEvent(this, "icDismiss", 7);
|
10365
|
+
this.inAGGrid = false;
|
10366
|
+
this.dismissAction = () => {
|
10367
|
+
this.dismiss.emit();
|
10368
|
+
this.icDismiss.emit();
|
10369
|
+
};
|
10370
|
+
this.mouseEnterHandler = () => {
|
10371
|
+
this.hovered = true;
|
10372
|
+
};
|
10373
|
+
this.mouseLeaveHandler = () => {
|
10374
|
+
this.hovered = false;
|
10375
|
+
};
|
10376
|
+
this.setChipColour = () => {
|
10377
|
+
const colorRGBA = convertToRGBA(this.customColor);
|
10378
|
+
if (colorRGBA) {
|
10379
|
+
const { r, g, b, a } = colorRGBA;
|
10380
|
+
const foregroundColour = (r * 299 + g * 587 + b * 114) / 1000 > 133.3505 ? "black" : "white";
|
10381
|
+
this.el.setAttribute("style", `--chip-custom-color: rgba(${r}, ${g}, ${b}, ${a}); --chip-custom-foreground-color: var(--ic-architectural-${foregroundColour})`);
|
10191
10382
|
}
|
10192
|
-
|
10383
|
+
};
|
10384
|
+
this.hovered = false;
|
10385
|
+
this.visible = true;
|
10386
|
+
this.appearance = undefined;
|
10387
|
+
this.customColor = null;
|
10388
|
+
this.disabled = false;
|
10389
|
+
this.dismissible = false;
|
10390
|
+
this.label = undefined;
|
10391
|
+
this.size = "default";
|
10392
|
+
this.transparentBackground = true;
|
10393
|
+
this.variant = "filled";
|
10394
|
+
}
|
10395
|
+
customColorHandler() {
|
10396
|
+
if (!this.dismissible) {
|
10397
|
+
this.setChipColour();
|
10193
10398
|
}
|
10194
|
-
}
|
10195
|
-
|
10196
|
-
|
10197
|
-
|
10198
|
-
|
10199
|
-
* a Shadow DOM. It does not add the input inside of the Shadow root which
|
10200
|
-
* allows it to be picked up inside of forms. It should contain the same
|
10201
|
-
* values as the host element.
|
10202
|
-
*
|
10203
|
-
* @param always Add a hidden input even if the container does not use Shadow
|
10204
|
-
* @param container The element where the input will be added
|
10205
|
-
* @param name The name of the input
|
10206
|
-
* @param value The value of the input
|
10207
|
-
* @param disabled If true, the input is disabled
|
10208
|
-
*/
|
10209
|
-
const renderHiddenInput = (always, container, name, value, disabled) => {
|
10210
|
-
if (name !== undefined && (always || hasShadowDom(container))) {
|
10211
|
-
const inputs = container.querySelectorAll("input.ic-input");
|
10212
|
-
const inputEls = Array.from(inputs);
|
10213
|
-
const filtered = inputEls.filter((el) => container === el.parentElement);
|
10214
|
-
let input = filtered[0];
|
10215
|
-
if (input === null || input === undefined) {
|
10216
|
-
input = container.ownerDocument.createElement("input");
|
10217
|
-
input.type = "hidden";
|
10218
|
-
input.classList.add("ic-input");
|
10219
|
-
container.appendChild(input);
|
10399
|
+
}
|
10400
|
+
componentWillLoad() {
|
10401
|
+
removeDisabledFalse$1(this.disabled, this.el);
|
10402
|
+
if (!this.dismissible) {
|
10403
|
+
this.setChipColour();
|
10220
10404
|
}
|
10221
|
-
|
10222
|
-
|
10223
|
-
if (value instanceof Date) {
|
10224
|
-
input.value = value ? value.toISOString() : null;
|
10405
|
+
if (this.appearance === "outline") {
|
10406
|
+
this.variant = "outlined";
|
10225
10407
|
}
|
10226
|
-
|
10227
|
-
|
10408
|
+
}
|
10409
|
+
componentWillRender() {
|
10410
|
+
if (isElInAGGrid(this.el)) {
|
10411
|
+
this.inAGGrid = true;
|
10228
10412
|
}
|
10229
10413
|
}
|
10230
|
-
|
10231
|
-
|
10232
|
-
const getCssProperty = (cssVar) => getComputedStyle(document.documentElement).getPropertyValue(cssVar);
|
10233
|
-
const getSlot = (element, name) => {
|
10234
|
-
if (element && element.querySelector) {
|
10235
|
-
return element.querySelector(`[slot="${name}"]`);
|
10414
|
+
componentDidLoad() {
|
10415
|
+
onComponentRequiredPropUndefined$1([{ prop: this.label, propName: "label" }], "Chip");
|
10236
10416
|
}
|
10237
|
-
|
10238
|
-
|
10239
|
-
|
10240
|
-
|
10241
|
-
|
10242
|
-
|
10417
|
+
handleClick() {
|
10418
|
+
this.visible = !this.visible;
|
10419
|
+
}
|
10420
|
+
/**
|
10421
|
+
* Sets focus on the chip.
|
10422
|
+
*/
|
10423
|
+
async setFocus() {
|
10424
|
+
var _a;
|
10425
|
+
(_a = this.el.shadowRoot.querySelector("button")) === null || _a === void 0 ? void 0 : _a.focus();
|
10426
|
+
}
|
10427
|
+
render() {
|
10428
|
+
const { label, appearance, variant, size, dismissible, visible, disabled, hovered, } = this;
|
10429
|
+
return (visible && (hAsync("div", { class: {
|
10430
|
+
chip: true,
|
10431
|
+
[`${appearance}`]: appearance !== undefined,
|
10432
|
+
[`${variant}`]: true,
|
10433
|
+
[`${size}`]: true,
|
10434
|
+
disabled,
|
10435
|
+
dismissible,
|
10436
|
+
hovered,
|
10437
|
+
"white-background": this.variant === "outlined" && !this.transparentBackground,
|
10438
|
+
} }, isSlotUsed$1(this.el, "icon") && (hAsync("div", { class: "icon" }, hAsync("slot", { name: "icon" }))), hAsync("ic-typography", { variant: "label", "apply-vertical-margins": false, class: { label: true, "in-ag-grid": this.inAGGrid } }, hAsync("span", null, label)), dismissible && (hAsync("ic-tooltip", { label: "Dismiss", target: "dismiss-icon", class: { "tooltip-disabled": disabled } }, hAsync("button", { id: "dismiss-icon", class: "dismiss-icon", "aria-label": `Dismiss ${label} chip`, disabled: disabled, tabindex: disabled ? -1 : 0, onClick: this.dismissAction, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, innerHTML: dismissIcon }))), isSlotUsed$1(this.el, "badge") && hAsync("slot", { name: "badge" }))));
|
10243
10439
|
}
|
10244
|
-
return
|
10440
|
+
static get delegatesFocus() { return true; }
|
10441
|
+
get el() { return getElement(this); }
|
10442
|
+
static get watchers() { return {
|
10443
|
+
"customColor": ["customColorHandler"]
|
10444
|
+
}; }
|
10445
|
+
static get style() { return icChipCss; }
|
10446
|
+
static get cmpMeta() { return {
|
10447
|
+
"$flags$": 25,
|
10448
|
+
"$tagName$": "ic-chip",
|
10449
|
+
"$members$": {
|
10450
|
+
"appearance": [1],
|
10451
|
+
"customColor": [1, "custom-color"],
|
10452
|
+
"disabled": [4],
|
10453
|
+
"dismissible": [4],
|
10454
|
+
"label": [1],
|
10455
|
+
"size": [1],
|
10456
|
+
"transparentBackground": [4, "transparent-background"],
|
10457
|
+
"variant": [1],
|
10458
|
+
"hovered": [32],
|
10459
|
+
"visible": [32],
|
10460
|
+
"setFocus": [64]
|
10461
|
+
},
|
10462
|
+
"$listeners$": [[2, "icDismiss", "handleClick"]],
|
10463
|
+
"$lazyBundleId$": "-",
|
10464
|
+
"$attrsToReflect$": []
|
10465
|
+
}; }
|
10466
|
+
}
|
10467
|
+
|
10468
|
+
const icClassificationBannerCss = "/*!@html*/html.sc-ic-classification-banner{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-classification-banner{margin:0}/*!@main*/main.sc-ic-classification-banner{display:block}/*!@h1*/h1.sc-ic-classification-banner{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-classification-banner{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-classification-banner{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-classification-banner{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-classification-banner{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-classification-banner,strong.sc-ic-classification-banner{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-classification-banner,kbd.sc-ic-classification-banner,samp.sc-ic-classification-banner{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-classification-banner{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-classification-banner,sup.sc-ic-classification-banner{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-classification-banner{bottom:-0.25em}/*!@sup*/sup.sc-ic-classification-banner{top:-0.5em}/*!@img*/img.sc-ic-classification-banner{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-classification-banner,input.sc-ic-classification-banner,optgroup.sc-ic-classification-banner,select.sc-ic-classification-banner,textarea.sc-ic-classification-banner{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-classification-banner,input.sc-ic-classification-banner{overflow:visible}/*!@button,\nselect*/button.sc-ic-classification-banner,select.sc-ic-classification-banner{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-classification-banner,[type=\"button\"].sc-ic-classification-banner,[type=\"reset\"].sc-ic-classification-banner,[type=\"submit\"].sc-ic-classification-banner{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-classification-banner::-moz-focus-inner,[type=\"button\"].sc-ic-classification-banner::-moz-focus-inner,[type=\"reset\"].sc-ic-classification-banner::-moz-focus-inner,[type=\"submit\"].sc-ic-classification-banner::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-classification-banner:-moz-focusring,[type=\"button\"].sc-ic-classification-banner:-moz-focusring,[type=\"reset\"].sc-ic-classification-banner:-moz-focusring,[type=\"submit\"].sc-ic-classification-banner:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-classification-banner{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-classification-banner{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-classification-banner{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-classification-banner{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-classification-banner,[type=\"radio\"].sc-ic-classification-banner{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-classification-banner::-webkit-inner-spin-button,[type=\"number\"].sc-ic-classification-banner::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-classification-banner{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-classification-banner::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-classification-banner::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-classification-banner{display:block}/*!@summary*/summary.sc-ic-classification-banner{display:list-item}/*!@template*/template.sc-ic-classification-banner{display:none}/*!@[hidden]*/[hidden].sc-ic-classification-banner{display:none}/*!@html,\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*/html.sc-ic-classification-banner,body.sc-ic-classification-banner,div.sc-ic-classification-banner,span.sc-ic-classification-banner,applet.sc-ic-classification-banner,object.sc-ic-classification-banner,iframe.sc-ic-classification-banner,h1.sc-ic-classification-banner,h2.sc-ic-classification-banner,h3.sc-ic-classification-banner,h4.sc-ic-classification-banner,h5.sc-ic-classification-banner,h6.sc-ic-classification-banner,p.sc-ic-classification-banner,blockquote.sc-ic-classification-banner,pre.sc-ic-classification-banner,a.sc-ic-classification-banner,abbr.sc-ic-classification-banner,acronym.sc-ic-classification-banner,address.sc-ic-classification-banner,big.sc-ic-classification-banner,cite.sc-ic-classification-banner,code.sc-ic-classification-banner,del.sc-ic-classification-banner,dfn.sc-ic-classification-banner,em.sc-ic-classification-banner,img.sc-ic-classification-banner,ins.sc-ic-classification-banner,kbd.sc-ic-classification-banner,q.sc-ic-classification-banner,s.sc-ic-classification-banner,samp.sc-ic-classification-banner,small.sc-ic-classification-banner,strike.sc-ic-classification-banner,strong.sc-ic-classification-banner,sub.sc-ic-classification-banner,sup.sc-ic-classification-banner,tt.sc-ic-classification-banner,var.sc-ic-classification-banner,b.sc-ic-classification-banner,u.sc-ic-classification-banner,i.sc-ic-classification-banner,center.sc-ic-classification-banner,dl.sc-ic-classification-banner,dt.sc-ic-classification-banner,dd.sc-ic-classification-banner,ol.sc-ic-classification-banner,ul.sc-ic-classification-banner,li.sc-ic-classification-banner,fieldset.sc-ic-classification-banner,form.sc-ic-classification-banner,label.sc-ic-classification-banner,legend.sc-ic-classification-banner,table.sc-ic-classification-banner,caption.sc-ic-classification-banner,tbody.sc-ic-classification-banner,tfoot.sc-ic-classification-banner,thead.sc-ic-classification-banner,tr.sc-ic-classification-banner,th.sc-ic-classification-banner,td.sc-ic-classification-banner,article.sc-ic-classification-banner,aside.sc-ic-classification-banner,canvas.sc-ic-classification-banner,details.sc-ic-classification-banner,embed.sc-ic-classification-banner,figure.sc-ic-classification-banner,figcaption.sc-ic-classification-banner,footer.sc-ic-classification-banner,header.sc-ic-classification-banner,hgroup.sc-ic-classification-banner,menu.sc-ic-classification-banner,nav.sc-ic-classification-banner,output.sc-ic-classification-banner,ruby.sc-ic-classification-banner,section.sc-ic-classification-banner,summary.sc-ic-classification-banner,time.sc-ic-classification-banner,mark.sc-ic-classification-banner,audio.sc-ic-classification-banner,video.sc-ic-classification-banner{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-classification-banner-h{position:fixed;left:0;bottom:0;width:100%;height:var(--ic-space-lg);z-index:var(--ic-z-index-classification-banner)}/*!@:host(.inline)*/.inline.sc-ic-classification-banner-h{position:static;left:auto;bottom:auto}/*!@.classification-banner*/.classification-banner.sc-ic-classification-banner{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:var(--ic-space-xxxs) var(--ic-space-md)}/*!@.default*/.default.sc-ic-classification-banner{background-color:var(--ic-classification-not-set);color:var(--ic-classification-not-set-foreground)}/*!@.official,\n.official-sensitive*/.official.sc-ic-classification-banner,.official-sensitive.sc-ic-classification-banner{background-color:var(--ic-classification-official);color:var(--ic-classification-official-foreground)}/*!@.secret*/.secret.sc-ic-classification-banner{background-color:var(--ic-classification-secret);color:var(--ic-classification-secret-foreground)}/*!@.top-secret*/.top-secret.sc-ic-classification-banner{background-color:var(--ic-classification-top-secret);color:var(--ic-classification-top-secret-foreground)}/*!@.offscreen*/.offscreen.sc-ic-classification-banner{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}@media (forced-colors: active){/*!@.classification-banner*/.classification-banner.sc-ic-classification-banner{border:var(--ic-hc-border)}}";
|
10469
|
+
|
10470
|
+
const classificationText = {
|
10471
|
+
default: "protective marking not set",
|
10472
|
+
official: "official",
|
10473
|
+
"official-sensitive": "official sensitive",
|
10474
|
+
secret: "secret",
|
10475
|
+
"top-secret": "top secret",
|
10245
10476
|
};
|
10246
|
-
|
10247
|
-
|
10248
|
-
|
10249
|
-
|
10250
|
-
|
10251
|
-
|
10252
|
-
|
10477
|
+
class ClassificationBanner {
|
10478
|
+
constructor(hostRef) {
|
10479
|
+
registerInstance(this, hostRef);
|
10480
|
+
this.additionalSelectors = "";
|
10481
|
+
this.classification = "default";
|
10482
|
+
this.country = "uk";
|
10483
|
+
this.inline = false;
|
10484
|
+
this.upTo = false;
|
10253
10485
|
}
|
10254
|
-
|
10255
|
-
|
10256
|
-
|
10486
|
+
render() {
|
10487
|
+
const { inline, upTo } = this;
|
10488
|
+
// In case of unrecognized props, fallback to default
|
10489
|
+
let { country, additionalSelectors, classification } = this;
|
10490
|
+
if (!country)
|
10491
|
+
country = "";
|
10492
|
+
if (!additionalSelectors)
|
10493
|
+
additionalSelectors = "";
|
10494
|
+
if (!classification ||
|
10495
|
+
(classification && !classificationText[classification]))
|
10496
|
+
classification = "default";
|
10497
|
+
return (hAsync(Host, { class: { ["inline"]: inline } }, hAsync("banner", { "aria-label": "Protective marking", class: {
|
10498
|
+
["classification-banner"]: true,
|
10499
|
+
[`${classification}`]: classification,
|
10500
|
+
} }, classification !== "default" ? (hAsync("span", { class: "offscreen" }, "The protective marking of this page is:", " ")) : null, hAsync("ic-typography", { variant: "caption-uppercase" }, classification === "default"
|
10501
|
+
? classificationText[classification]
|
10502
|
+
: `${upTo ? "up to" : ""}
|
10503
|
+
${country}
|
10504
|
+
${classificationText[classification]}
|
10505
|
+
${additionalSelectors}`))));
|
10257
10506
|
}
|
10258
|
-
}
|
10259
|
-
({
|
10260
|
-
|
10261
|
-
|
10262
|
-
|
10263
|
-
|
10264
|
-
|
10265
|
-
|
10266
|
-
|
10267
|
-
|
10268
|
-
|
10269
|
-
|
10270
|
-
|
10271
|
-
|
10272
|
-
|
10507
|
+
static get style() { return icClassificationBannerCss; }
|
10508
|
+
static get cmpMeta() { return {
|
10509
|
+
"$flags$": 9,
|
10510
|
+
"$tagName$": "ic-classification-banner",
|
10511
|
+
"$members$": {
|
10512
|
+
"additionalSelectors": [1, "additional-selectors"],
|
10513
|
+
"classification": [1],
|
10514
|
+
"country": [1],
|
10515
|
+
"inline": [4],
|
10516
|
+
"upTo": [4, "up-to"]
|
10517
|
+
},
|
10518
|
+
"$listeners$": undefined,
|
10519
|
+
"$lazyBundleId$": "-",
|
10520
|
+
"$attrsToReflect$": []
|
10521
|
+
}; }
|
10522
|
+
}
|
10523
|
+
|
10524
|
+
const icDataEntityCss = "/*!@html*/html.sc-ic-data-entity{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-data-entity{margin:0}/*!@main*/main.sc-ic-data-entity{display:block}/*!@h1*/h1.sc-ic-data-entity{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-data-entity{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-data-entity{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-data-entity{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-data-entity{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-data-entity,strong.sc-ic-data-entity{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-data-entity,kbd.sc-ic-data-entity,samp.sc-ic-data-entity{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-data-entity{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-data-entity,sup.sc-ic-data-entity{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-data-entity{bottom:-0.25em}/*!@sup*/sup.sc-ic-data-entity{top:-0.5em}/*!@img*/img.sc-ic-data-entity{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-data-entity,input.sc-ic-data-entity,optgroup.sc-ic-data-entity,select.sc-ic-data-entity,textarea.sc-ic-data-entity{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-data-entity,input.sc-ic-data-entity{overflow:visible}/*!@button,\nselect*/button.sc-ic-data-entity,select.sc-ic-data-entity{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-data-entity,[type=\"button\"].sc-ic-data-entity,[type=\"reset\"].sc-ic-data-entity,[type=\"submit\"].sc-ic-data-entity{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-data-entity::-moz-focus-inner,[type=\"button\"].sc-ic-data-entity::-moz-focus-inner,[type=\"reset\"].sc-ic-data-entity::-moz-focus-inner,[type=\"submit\"].sc-ic-data-entity::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-data-entity:-moz-focusring,[type=\"button\"].sc-ic-data-entity:-moz-focusring,[type=\"reset\"].sc-ic-data-entity:-moz-focusring,[type=\"submit\"].sc-ic-data-entity:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-data-entity{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-data-entity{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-data-entity{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-data-entity{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-data-entity,[type=\"radio\"].sc-ic-data-entity{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-data-entity::-webkit-inner-spin-button,[type=\"number\"].sc-ic-data-entity::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-data-entity{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-data-entity::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-data-entity::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-data-entity{display:block}/*!@summary*/summary.sc-ic-data-entity{display:list-item}/*!@template*/template.sc-ic-data-entity{display:none}/*!@[hidden]*/[hidden].sc-ic-data-entity{display:none}/*!@html,\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*/html.sc-ic-data-entity,body.sc-ic-data-entity,div.sc-ic-data-entity,span.sc-ic-data-entity,applet.sc-ic-data-entity,object.sc-ic-data-entity,iframe.sc-ic-data-entity,h1.sc-ic-data-entity,h2.sc-ic-data-entity,h3.sc-ic-data-entity,h4.sc-ic-data-entity,h5.sc-ic-data-entity,h6.sc-ic-data-entity,p.sc-ic-data-entity,blockquote.sc-ic-data-entity,pre.sc-ic-data-entity,a.sc-ic-data-entity,abbr.sc-ic-data-entity,acronym.sc-ic-data-entity,address.sc-ic-data-entity,big.sc-ic-data-entity,cite.sc-ic-data-entity,code.sc-ic-data-entity,del.sc-ic-data-entity,dfn.sc-ic-data-entity,em.sc-ic-data-entity,img.sc-ic-data-entity,ins.sc-ic-data-entity,kbd.sc-ic-data-entity,q.sc-ic-data-entity,s.sc-ic-data-entity,samp.sc-ic-data-entity,small.sc-ic-data-entity,strike.sc-ic-data-entity,strong.sc-ic-data-entity,sub.sc-ic-data-entity,sup.sc-ic-data-entity,tt.sc-ic-data-entity,var.sc-ic-data-entity,b.sc-ic-data-entity,u.sc-ic-data-entity,i.sc-ic-data-entity,center.sc-ic-data-entity,dl.sc-ic-data-entity,dt.sc-ic-data-entity,dd.sc-ic-data-entity,ol.sc-ic-data-entity,ul.sc-ic-data-entity,li.sc-ic-data-entity,fieldset.sc-ic-data-entity,form.sc-ic-data-entity,label.sc-ic-data-entity,legend.sc-ic-data-entity,table.sc-ic-data-entity,caption.sc-ic-data-entity,tbody.sc-ic-data-entity,tfoot.sc-ic-data-entity,thead.sc-ic-data-entity,tr.sc-ic-data-entity,th.sc-ic-data-entity,td.sc-ic-data-entity,article.sc-ic-data-entity,aside.sc-ic-data-entity,canvas.sc-ic-data-entity,details.sc-ic-data-entity,embed.sc-ic-data-entity,figure.sc-ic-data-entity,figcaption.sc-ic-data-entity,footer.sc-ic-data-entity,header.sc-ic-data-entity,hgroup.sc-ic-data-entity,menu.sc-ic-data-entity,nav.sc-ic-data-entity,output.sc-ic-data-entity,ruby.sc-ic-data-entity,section.sc-ic-data-entity,summary.sc-ic-data-entity,time.sc-ic-data-entity,mark.sc-ic-data-entity,audio.sc-ic-data-entity,video.sc-ic-data-entity{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-data-entity-h{display:block}/*!@.rows*/.rows.sc-ic-data-entity{display:flex;flex-direction:column;gap:var(--ic-space-md)}/*!@:host(.small) .rows*/.small.sc-ic-data-entity-h .rows.sc-ic-data-entity{gap:var(--ic-space-xs)}/*!@.divider*/.divider.sc-ic-data-entity{margin-top:var(--ic-space-lg);margin-bottom:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-architectural-300)}/*!@:host(.small) .divider*/.small.sc-ic-data-entity-h .divider.sc-ic-data-entity{margin-top:var(--ic-space-sm);margin-bottom:var(--ic-space-xs)}@media (forced-colors: active){/*!@.divider*/.divider.sc-ic-data-entity{background-color:canvastext}}";
|
10525
|
+
|
10273
10526
|
/**
|
10274
|
-
*
|
10275
|
-
* @param value - value from object
|
10276
|
-
* @param options - list of menu items
|
10277
|
-
* @returns - label corresponding to value
|
10527
|
+
* @slot heading - Content will be placed at the top of the data entity.
|
10278
10528
|
*/
|
10279
|
-
|
10280
|
-
|
10281
|
-
|
10282
|
-
|
10283
|
-
|
10284
|
-
|
10285
|
-
}
|
10286
|
-
else {
|
10287
|
-
ungroupedOptions.push(option);
|
10288
|
-
}
|
10289
|
-
});
|
10290
|
-
const matchingValue = ungroupedOptions.find((option) => option[valueField] === value);
|
10291
|
-
if (matchingValue !== undefined)
|
10292
|
-
return matchingValue[labelField];
|
10529
|
+
class DataEntity {
|
10530
|
+
constructor(hostRef) {
|
10531
|
+
registerInstance(this, hostRef);
|
10532
|
+
this.heading = undefined;
|
10533
|
+
this.size = "default";
|
10534
|
+
this.small = false;
|
10293
10535
|
}
|
10294
|
-
|
10295
|
-
};
|
10296
|
-
|
10297
|
-
|
10298
|
-
|
10299
|
-
|
10300
|
-
|
10301
|
-
|
10302
|
-
|
10303
|
-
|
10304
|
-
|
10305
|
-
|
10306
|
-
|
10307
|
-
|
10308
|
-
|
10309
|
-
|
10310
|
-
|
10311
|
-
|
10312
|
-
|
10313
|
-
|
10314
|
-
|
10315
|
-
|
10316
|
-
|
10317
|
-
|
10318
|
-
|
10536
|
+
render() {
|
10537
|
+
const { el, heading, small, size } = this;
|
10538
|
+
if (small || size === "small") {
|
10539
|
+
Array.from(el.children).forEach((child) => child.setAttribute("size", "small"));
|
10540
|
+
}
|
10541
|
+
return (hAsync(Host, { class: { small: small || size === "small" } }, hAsync("div", { class: "heading", id: "data-entity-heading" }, hAsync("slot", { name: "heading" }, hAsync("ic-typography", { variant: "h3" }, heading))), hAsync("div", { class: "divider" }), hAsync("ul", { "aria-labelledby": "data-entity-heading", class: "rows" }, hAsync("slot", null))));
|
10542
|
+
}
|
10543
|
+
get el() { return getElement(this); }
|
10544
|
+
static get style() { return icDataEntityCss; }
|
10545
|
+
static get cmpMeta() { return {
|
10546
|
+
"$flags$": 9,
|
10547
|
+
"$tagName$": "ic-data-entity",
|
10548
|
+
"$members$": {
|
10549
|
+
"heading": [1],
|
10550
|
+
"size": [1],
|
10551
|
+
"small": [4]
|
10552
|
+
},
|
10553
|
+
"$listeners$": undefined,
|
10554
|
+
"$lazyBundleId$": "-",
|
10555
|
+
"$attrsToReflect$": []
|
10556
|
+
}; }
|
10557
|
+
}
|
10558
|
+
|
10559
|
+
const icDataRowCss = "/*!@html*/html.sc-ic-data-row{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-data-row{margin:0}/*!@main*/main.sc-ic-data-row{display:block}/*!@h1*/h1.sc-ic-data-row{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-data-row{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-data-row{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-data-row{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-data-row{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-data-row,strong.sc-ic-data-row{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-data-row,kbd.sc-ic-data-row,samp.sc-ic-data-row{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-data-row{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-data-row,sup.sc-ic-data-row{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-data-row{bottom:-0.25em}/*!@sup*/sup.sc-ic-data-row{top:-0.5em}/*!@img*/img.sc-ic-data-row{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-data-row,input.sc-ic-data-row,optgroup.sc-ic-data-row,select.sc-ic-data-row,textarea.sc-ic-data-row{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-data-row,input.sc-ic-data-row{overflow:visible}/*!@button,\nselect*/button.sc-ic-data-row,select.sc-ic-data-row{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-data-row,[type=\"button\"].sc-ic-data-row,[type=\"reset\"].sc-ic-data-row,[type=\"submit\"].sc-ic-data-row{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-data-row::-moz-focus-inner,[type=\"button\"].sc-ic-data-row::-moz-focus-inner,[type=\"reset\"].sc-ic-data-row::-moz-focus-inner,[type=\"submit\"].sc-ic-data-row::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-data-row:-moz-focusring,[type=\"button\"].sc-ic-data-row:-moz-focusring,[type=\"reset\"].sc-ic-data-row:-moz-focusring,[type=\"submit\"].sc-ic-data-row:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-data-row{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-data-row{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-data-row{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-data-row{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-data-row,[type=\"radio\"].sc-ic-data-row{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-data-row::-webkit-inner-spin-button,[type=\"number\"].sc-ic-data-row::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-data-row{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-data-row::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-data-row::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-data-row{display:block}/*!@summary*/summary.sc-ic-data-row{display:list-item}/*!@template*/template.sc-ic-data-row{display:none}/*!@[hidden]*/[hidden].sc-ic-data-row{display:none}/*!@html,\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*/html.sc-ic-data-row,body.sc-ic-data-row,div.sc-ic-data-row,span.sc-ic-data-row,applet.sc-ic-data-row,object.sc-ic-data-row,iframe.sc-ic-data-row,h1.sc-ic-data-row,h2.sc-ic-data-row,h3.sc-ic-data-row,h4.sc-ic-data-row,h5.sc-ic-data-row,h6.sc-ic-data-row,p.sc-ic-data-row,blockquote.sc-ic-data-row,pre.sc-ic-data-row,a.sc-ic-data-row,abbr.sc-ic-data-row,acronym.sc-ic-data-row,address.sc-ic-data-row,big.sc-ic-data-row,cite.sc-ic-data-row,code.sc-ic-data-row,del.sc-ic-data-row,dfn.sc-ic-data-row,em.sc-ic-data-row,img.sc-ic-data-row,ins.sc-ic-data-row,kbd.sc-ic-data-row,q.sc-ic-data-row,s.sc-ic-data-row,samp.sc-ic-data-row,small.sc-ic-data-row,strike.sc-ic-data-row,strong.sc-ic-data-row,sub.sc-ic-data-row,sup.sc-ic-data-row,tt.sc-ic-data-row,var.sc-ic-data-row,b.sc-ic-data-row,u.sc-ic-data-row,i.sc-ic-data-row,center.sc-ic-data-row,dl.sc-ic-data-row,dt.sc-ic-data-row,dd.sc-ic-data-row,ol.sc-ic-data-row,ul.sc-ic-data-row,li.sc-ic-data-row,fieldset.sc-ic-data-row,form.sc-ic-data-row,label.sc-ic-data-row,legend.sc-ic-data-row,table.sc-ic-data-row,caption.sc-ic-data-row,tbody.sc-ic-data-row,tfoot.sc-ic-data-row,thead.sc-ic-data-row,tr.sc-ic-data-row,th.sc-ic-data-row,td.sc-ic-data-row,article.sc-ic-data-row,aside.sc-ic-data-row,canvas.sc-ic-data-row,details.sc-ic-data-row,embed.sc-ic-data-row,figure.sc-ic-data-row,figcaption.sc-ic-data-row,footer.sc-ic-data-row,header.sc-ic-data-row,hgroup.sc-ic-data-row,menu.sc-ic-data-row,nav.sc-ic-data-row,output.sc-ic-data-row,ruby.sc-ic-data-row,section.sc-ic-data-row,summary.sc-ic-data-row,time.sc-ic-data-row,mark.sc-ic-data-row,audio.sc-ic-data-row,video.sc-ic-data-row{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-data-row-h{position:relative;display:block}/*!@.data*/.data.sc-ic-data-row{display:flex;align-items:center}/*!@.text-cells*/.text-cells.sc-ic-data-row{display:flex;flex-grow:1;min-width:0}/*!@.label*/.label.sc-ic-data-row{width:12.5rem;min-width:12.5rem;margin-right:var(--ic-space-md);color:var(--ic-color-tertiary-text)}/*!@.value*/.value.sc-ic-data-row{flex-grow:1}/*!@slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label])*/slot[name=\"value\"].sc-ic-data-row-s>ic-text-field[readonly][hide-label]{margin-top:calc(var(--ic-space-xs) * -1)}/*!@slot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label])*/slot[name=\"value\"].sc-ic-data-row-s>ic-text-field[small][readonly][hide-label]{margin-top:calc(var(--ic-space-xxs) * -1)}/*!@slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows])*/slot[name=\"value\"].sc-ic-data-row-s>ic-text-field[readonly][hide-label][rows]{margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}/*!@.end-component*/.end-component.sc-ic-data-row{width:-moz-fit-content;width:fit-content;margin-left:3.5rem}/*!@.divider*/.divider.sc-ic-data-row{margin-top:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-architectural-300)}/*!@:host(.small) .divider*/.small.sc-ic-data-row-h .divider.sc-ic-data-row{margin-top:var(--ic-space-xs)}/*!@:host(.breakpoint-medium) .label*/.breakpoint-medium.sc-ic-data-row-h .label.sc-ic-data-row{width:10rem;min-width:10rem}/*!@:host(.breakpoint-xs) .text-cells*/.breakpoint-xs.sc-ic-data-row-h .text-cells.sc-ic-data-row{flex-direction:column}/*!@:host(.breakpoint-xs) .label*/.breakpoint-xs.sc-ic-data-row-h .label.sc-ic-data-row{width:8rem;margin-bottom:var(--ic-space-xs)}/*!@:host(.breakpoint-xs) .value*/.breakpoint-xs.sc-ic-data-row-h .value.sc-ic-data-row{max-width:95%}/*!@:host(.breakpoint-xs) .end-component*/.breakpoint-xs.sc-ic-data-row-h .end-component.sc-ic-data-row{margin-left:0}@media (forced-colors: active){/*!@.divider*/.divider.sc-ic-data-row{background-color:canvastext}}";
|
10560
|
+
|
10319
10561
|
/**
|
10320
|
-
*
|
10321
|
-
*
|
10322
|
-
* @
|
10323
|
-
* @returns number of options not including group titles
|
10562
|
+
* @slot label - Content will be rendered in the leftmost cell.
|
10563
|
+
* @slot value - Content will be rendered to the right of the label.
|
10564
|
+
* @slot end-component - Content will be displayed in the rightmost cell.
|
10324
10565
|
*/
|
10325
|
-
|
10326
|
-
|
10327
|
-
|
10328
|
-
|
10329
|
-
|
10330
|
-
|
10331
|
-
|
10332
|
-
|
10333
|
-
|
10334
|
-
|
10335
|
-
}
|
10336
|
-
|
10337
|
-
|
10338
|
-
}
|
10339
|
-
|
10340
|
-
|
10341
|
-
|
10342
|
-
|
10343
|
-
|
10344
|
-
|
10345
|
-
|
10346
|
-
|
10347
|
-
|
10348
|
-
|
10349
|
-
|
10350
|
-
}
|
10566
|
+
class DataRow {
|
10567
|
+
constructor(hostRef) {
|
10568
|
+
registerInstance(this, hostRef);
|
10569
|
+
this.hasEndComponent = false;
|
10570
|
+
this.resizeObserver = null;
|
10571
|
+
this.runResizeObserver = () => {
|
10572
|
+
this.resizeObserver = new ResizeObserver(() => {
|
10573
|
+
this.checkLabelAbove();
|
10574
|
+
});
|
10575
|
+
this.resizeObserver.observe(this.el);
|
10576
|
+
};
|
10577
|
+
this.renderCellContent = (cell) => {
|
10578
|
+
const isValue = cell === "value";
|
10579
|
+
return (hAsync("div", { class: cell }, isSlotUsed$1(this.el, cell) ? (hAsync("slot", { name: cell })) : (hAsync("ic-typography", { variant: isValue
|
10580
|
+
? "body"
|
10581
|
+
: this.entitySize === "xs"
|
10582
|
+
? "label"
|
10583
|
+
: "subtitle-large" }, isValue ? this.value : this.label))));
|
10584
|
+
};
|
10585
|
+
this.deviceSize = DEVICE_SIZES.XL;
|
10586
|
+
this.entitySize = undefined;
|
10587
|
+
this.label = undefined;
|
10588
|
+
this.size = "default";
|
10589
|
+
this.small = false;
|
10590
|
+
this.value = undefined;
|
10351
10591
|
}
|
10352
|
-
|
10353
|
-
|
10354
|
-
|
10355
|
-
const individualWords = kebabCase.split("-");
|
10356
|
-
let camelCase = individualWords[0];
|
10357
|
-
for (let i = 1; i < individualWords.length; i++) {
|
10358
|
-
camelCase +=
|
10359
|
-
individualWords[i].substring(0, 1).toUpperCase() +
|
10360
|
-
individualWords[i].substring(1);
|
10592
|
+
disconnectedCallback() {
|
10593
|
+
var _a;
|
10594
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
10361
10595
|
}
|
10362
|
-
|
10363
|
-
|
10364
|
-
|
10365
|
-
|
10366
|
-
typeof window.ResizeObserver !== "undefined") {
|
10367
|
-
callbackFn();
|
10596
|
+
componentWillLoad() {
|
10597
|
+
this.deviceSize = getCurrentDeviceSize();
|
10598
|
+
this.hasEndComponent = slotHasContent(this.el, "end-component");
|
10599
|
+
this.checkLabelAbove();
|
10368
10600
|
}
|
10369
|
-
|
10370
|
-
|
10371
|
-
|
10372
|
-
|
10373
|
-
if (form !== null) {
|
10374
|
-
form.addEventListener("reset", callbackFn);
|
10601
|
+
componentDidLoad() {
|
10602
|
+
checkResizeObserver$1(this.runResizeObserver);
|
10603
|
+
if (this.hasEndComponent)
|
10604
|
+
this.labelEndComponent();
|
10375
10605
|
}
|
10376
|
-
|
10377
|
-
|
10378
|
-
|
10379
|
-
|
10380
|
-
|
10606
|
+
checkLabelAbove() {
|
10607
|
+
var _a;
|
10608
|
+
const rowSize = ((_a = this.el.shadowRoot.querySelector(".data")) === null || _a === void 0 ? void 0 : _a.clientWidth) + 46;
|
10609
|
+
if (rowSize) {
|
10610
|
+
this.entitySize =
|
10611
|
+
rowSize < DEVICE_SIZES.S ? "xs" : rowSize < DEVICE_SIZES.M ? "m" : "xl";
|
10612
|
+
}
|
10381
10613
|
}
|
10382
|
-
|
10383
|
-
|
10384
|
-
|
10385
|
-
|
10614
|
+
labelEndComponent() {
|
10615
|
+
this.el.shadowRoot
|
10616
|
+
.querySelectorAll("slot[name=end-component]")
|
10617
|
+
.forEach((child) => child.setAttribute("aria-label", `for ${this.label} row`));
|
10386
10618
|
}
|
10387
|
-
|
10388
|
-
const
|
10389
|
-
|
10390
|
-
|
10391
|
-
|
10392
|
-
|
10393
|
-
};
|
10619
|
+
render() {
|
10620
|
+
const { el, entitySize, hasEndComponent, label, renderCellContent, size, small, value, } = this;
|
10621
|
+
return (hAsync(Host, { class: {
|
10622
|
+
["small"]: small || size === "small",
|
10623
|
+
["breakpoint-medium"]: entitySize === "m",
|
10624
|
+
["breakpoint-xs"]: entitySize === "xs",
|
10625
|
+
}, role: "listitem" }, hAsync("div", { class: "data" }, hAsync("div", { class: "text-cells" }, (isSlotUsed$1(el, "label") || label) && renderCellContent("label"), (isSlotUsed$1(el, "value") || value) && renderCellContent("value")), hasEndComponent && (hAsync("div", { class: "end-component" }, hAsync("slot", { name: "end-component" })))), hAsync("div", { class: "divider" })));
|
10626
|
+
}
|
10627
|
+
get el() { return getElement(this); }
|
10628
|
+
static get style() { return icDataRowCss; }
|
10629
|
+
static get cmpMeta() { return {
|
10630
|
+
"$flags$": 9,
|
10631
|
+
"$tagName$": "ic-data-row",
|
10632
|
+
"$members$": {
|
10633
|
+
"label": [1],
|
10634
|
+
"size": [1],
|
10635
|
+
"small": [4],
|
10636
|
+
"value": [1],
|
10637
|
+
"deviceSize": [32],
|
10638
|
+
"entitySize": [32]
|
10639
|
+
},
|
10640
|
+
"$listeners$": undefined,
|
10641
|
+
"$lazyBundleId$": "-",
|
10642
|
+
"$attrsToReflect$": []
|
10643
|
+
}; }
|
10644
|
+
}
|
10645
|
+
|
10646
|
+
var unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
|
10647
|
+
<path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
|
10648
|
+
</svg>`;
|
10394
10649
|
|
10395
|
-
|
10650
|
+
var ascendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(-90deg);">
|
10651
|
+
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
10652
|
+
</svg>`;
|
10653
|
+
|
10654
|
+
var descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(90deg)">
|
10655
|
+
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
10656
|
+
</svg>`;
|
10657
|
+
|
10658
|
+
const icDataTableCss = "/*!@:host*/.sc-ic-data-table-h{position:relative;display:block;height:100%;max-height:100%}/*!@tbody*/tbody.sc-ic-data-table{vertical-align:top}/*!@.table-container*/.table-container.sc-ic-data-table{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column}/*!@.cell-container*/.cell-container.sc-ic-data-table{display:flex;min-height:1.5rem;overflow-y:hidden}/*!@.truncation-show-hide*/.truncation-show-hide.sc-ic-data-table{overflow:visible;display:block}/*!@.cell-icon.truncation-show-hide*/.cell-icon.truncation-show-hide.sc-ic-data-table{display:flex}/*!@.cell-container:not(.data-type-element, .truncation-show-hide)*/.cell-container.sc-ic-data-table:not(.data-type-element,.truncation-show-hide).sc-ic-data-table{overflow-x:hidden}/*!@ic-loading-indicator*/ic-loading-indicator.sc-ic-data-table{position:sticky;top:20px}/*!@.table-row-container*/.table-row-container.sc-ic-data-table{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}/*!@:host([show-pagination=\"true\"]) .table-row-container*/[show-pagination=\"true\"].sc-ic-data-table-h .table-row-container.sc-ic-data-table{height:calc(100% - 3.5625rem)}/*!@table*/table.sc-ic-data-table{table-layout:fixed;border-spacing:0;width:100%}/*!@.table-row-container:focus*/.table-row-container.sc-ic-data-table:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}/*!@:host([embedded=\"true\"]) .table-row-container*/[embedded=\"true\"].sc-ic-data-table-h .table-row-container.sc-ic-data-table{border:var(--ic-border-light)}/*!@.column-header-sticky*/.column-header-sticky.sc-ic-data-table{position:sticky;top:0;z-index:1}/*!@.column-header-overlay*/.column-header-overlay.sc-ic-data-table{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}/*!@.row-header-sticky*/.row-header-sticky.sc-ic-data-table{position:sticky;left:0}/*!@.column-header,\n.table-row*/.column-header.sc-ic-data-table,.table-row.sc-ic-data-table{box-sizing:border-box}/*!@.table-row-selected*/.table-row-selected.sc-ic-data-table{background-color:var(--ic-table-row-selected) !important}/*!@.sort-button*/.sort-button.sc-ic-data-table{margin-left:auto}/*!@.sort-button:hover*/.sort-button.sc-ic-data-table:hover{background-color:var(--ic-action-dark-bg-hover)}/*!@.sort-button:active*/.sort-button.sc-ic-data-table:active{background-color:var(--ic-action-dark-bg-active)}/*!@.sort-button svg*/.sort-button.sc-ic-data-table svg.sc-ic-data-table{color:var(--ic-architectural-black)}/*!@.sort-button-unsorted svg*/.sort-button-unsorted.sc-ic-data-table svg.sc-ic-data-table{color:var(--ic-color-tertiary-text)}/*!@.table-density-dense*/.table-density-dense.sc-ic-data-table{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}/*!@.text-dense*/.text-dense.sc-ic-data-table{font-size:var(--ic-font-size-label)}/*!@.table-density-spacious*/.table-density-spacious.sc-ic-data-table{padding:0.625rem var(--ic-space-xs) !important}/*!@.text-spacious*/.text-spacious.sc-ic-data-table{font-size:1.125rem}/*!@.column-header-text*/.column-header-text.sc-ic-data-table{font-weight:var(--ic-font-weight-bold)}/*!@.column-header,\n.row-header*/.column-header.sc-ic-data-table,.row-header.sc-ic-data-table{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-architectural-40);border-right:var(--ic-border-light);border-bottom:var(--ic-border-light)}/*!@.column-header:last-child*/.column-header.sc-ic-data-table:last-child{border-right:none}/*!@.scrollable .column-header:last-child*/.scrollable.sc-ic-data-table .column-header.sc-ic-data-table:last-child{border-right:var(--ic-border-light) !important}/*!@:host([embedded=\"true\"]) tr:last-child .table-cell,\n:host([embedded=\"true\"]) tr:last-child .row-header*/[embedded=\"true\"].sc-ic-data-table-h tr.sc-ic-data-table:last-child .table-cell.sc-ic-data-table,[embedded=\"true\"].sc-ic-data-table-h tr.sc-ic-data-table:last-child .row-header.sc-ic-data-table{border-bottom:none}/*!@.column-header-alignment-left,\n.row-header-alignment-left,\n.cell-alignment-left*/.column-header-alignment-left.sc-ic-data-table,.row-header-alignment-left.sc-ic-data-table,.cell-alignment-left.sc-ic-data-table{text-align:left !important;justify-content:start !important}/*!@.column-header-alignment-right,\n.row-header-alignment-right,\n.cell-alignment-right*/.column-header-alignment-right.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table,.cell-alignment-right.sc-ic-data-table{text-align:right !important;justify-content:end !important}/*!@.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography*/.cell-alignment-right.truncation-tooltip.sc-ic-data-table ic-tooltip.sc-ic-data-table ic-typography.sc-ic-data-table{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}/*!@.cell-alignment-right.truncation-show-hide ic-typography*/.cell-alignment-right.truncation-show-hide.sc-ic-data-table ic-typography.sc-ic-data-table{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}/*!@.column-header-alignment-center,\n.row-header-alignment-center,\n.cell-alignment-center*/.column-header-alignment-center.sc-ic-data-table,.row-header-alignment-center.sc-ic-data-table,.cell-alignment-center.sc-ic-data-table{text-align:center !important;justify-content:center !important}/*!@.table-row:nth-child(even)*/.table-row.sc-ic-data-table:nth-child(even){background-color:var(--ic-architectural-20)}/*!@.table-cell*/.table-cell.sc-ic-data-table{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px);overflow:hidden}/*!@.data-type-string,\n.data-type-address*/.data-type-string.sc-ic-data-table,.data-type-address.sc-ic-data-table{text-align:left;vertical-align:top}/*!@.data-type-number,\n.data-type-date*/.data-type-number.sc-ic-data-table,.data-type-date.sc-ic-data-table{text-align:right;justify-content:end;vertical-align:top}/*!@.cell-alignment-top*/.cell-alignment-top.sc-ic-data-table{vertical-align:top;align-items:flex-start}/*!@.cell-alignment-middle*/.cell-alignment-middle.sc-ic-data-table{vertical-align:middle;align-items:center}/*!@.cell-alignment-bottom*/.cell-alignment-bottom.sc-ic-data-table{vertical-align:bottom;align-items:flex-end}/*!@.cell-emphasis-low*/.cell-emphasis-low.sc-ic-data-table{color:var(--ic-color-secondary-text)}/*!@.cell-emphasis-high*/.cell-emphasis-high.sc-ic-data-table{font-weight:var(--ic-font-weight-bold)}/*!@.pagination-container*/.pagination-container.sc-ic-data-table{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}/*!@.screen-reader-sort-text,\n.table-caption*/.screen-reader-sort-text.sc-ic-data-table,.table-caption.sc-ic-data-table{position:absolute;left:-100rem}/*!@.table-cell,\n.column-header,\n.row-header*/.table-cell.sc-ic-data-table,.column-header.sc-ic-data-table,.row-header.sc-ic-data-table{word-wrap:break-word;white-space:pre-wrap}/*!@.loading-empty*/.loading-empty.sc-ic-data-table{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}/*!@.updating-state*/.updating-state.sc-ic-data-table{padding:0;border-bottom:var(--ic-border-light)}/*!@.updating-state-headers*/.updating-state-headers.sc-ic-data-table{border-bottom:none}/*!@.loading*/.loading.sc-ic-data-table{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}/*!@.loading.show-background*/.loading.show-background.sc-ic-data-table{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}/*!@.loading.show*/.loading.show.sc-ic-data-table{opacity:1}/*!@.icon,\n::slotted(svg)*/.icon.sc-ic-data-table,.sc-ic-data-table-s>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}/*!@.column-header-alignment-right > .icon,\n.row-header-alignment-right > .icon,\n.cell-alignment-right > .icon,\n.column-header-alignment-right > ::slotted(svg),\n.row-header-alignment-right > ::slotted(svg),\n.cell-alignment-right > ::slotted(svg)*/.column-header-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.cell-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.column-header-alignment-right>.sc-ic-data-table-s>svg,.row-header-alignment-right>.sc-ic-data-table-s>svg,.cell-alignment-right>.sc-ic-data-table-s>svg{margin-right:auto}/*!@.column-header-alignment-center > ic-typography,\n.row-header-alignment-right > ic-typography,\n.cell-alignment-center > ic-typography*/.column-header-alignment-center.sc-ic-data-table>ic-typography.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table>ic-typography.sc-ic-data-table,.cell-alignment-center.sc-ic-data-table>ic-typography.sc-ic-data-table{flex:1}/*!@.icon > svg*/.icon.sc-ic-data-table>svg.sc-ic-data-table{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}/*!@.truncation-tooltip ic-typography*/.truncation-tooltip.sc-ic-data-table ic-typography.sc-ic-data-table{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}/*!@.truncation-tooltip ic-typography,\n.truncation-show-hide ic-typography*/.truncation-tooltip.sc-ic-data-table ic-typography.sc-ic-data-table,.truncation-show-hide.sc-ic-data-table ic-typography.sc-ic-data-table{white-space:normal}/*!@.ic-tooltip-overflow*/.ic-tooltip-overflow.sc-ic-data-table{overflow:hidden}@media screen and (min-width: 576px){/*!@.column-header-inner-container*/.column-header-inner-container.sc-ic-data-table{display:flex;align-items:center}}";
|
10396
10659
|
|
10397
|
-
const DENSITY_HEIGHT_MULTIPLIER = {
|
10398
|
-
dense: 0.8,
|
10399
|
-
default: 1,
|
10400
|
-
spacious: 1.2,
|
10401
|
-
};
|
10402
|
-
const SORT_ICONS = {
|
10403
|
-
unsorted: unsortedIcon,
|
10404
|
-
ascending: ascendingIcon,
|
10405
|
-
descending: descendingIcon,
|
10406
|
-
};
|
10407
10660
|
/**
|
10408
10661
|
* @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
|
10409
10662
|
* @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
|
@@ -10415,7 +10668,155 @@ class DataTable {
|
|
10415
10668
|
constructor(hostRef) {
|
10416
10669
|
registerInstance(this, hostRef);
|
10417
10670
|
this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
|
10671
|
+
this.DENSITY_HEIGHT_MULTIPLIER = {
|
10672
|
+
dense: 0.8,
|
10673
|
+
default: 1,
|
10674
|
+
spacious: 1.2,
|
10675
|
+
};
|
10676
|
+
this.DENSITY_PADDING_HEIGHT_DIFF = {
|
10677
|
+
dense: 8,
|
10678
|
+
default: 16,
|
10679
|
+
spacious: 20,
|
10680
|
+
};
|
10681
|
+
this.SORT_ICONS = {
|
10682
|
+
unsorted: unsortedIcon,
|
10683
|
+
ascending: ascendingIcon,
|
10684
|
+
descending: descendingIcon,
|
10685
|
+
};
|
10418
10686
|
this.hasLoadedForOneSecond = true;
|
10687
|
+
this.resizeObserver = null;
|
10688
|
+
this.SHOW_HIDE_STRING = "show-hide";
|
10689
|
+
this.SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;
|
10690
|
+
this.TOOLTIP_STRING = "tooltip";
|
10691
|
+
this.TOOLTIP = `ic-${this.TOOLTIP_STRING}`;
|
10692
|
+
this.TEXT_WRAP_STRING = "text-wrap";
|
10693
|
+
this.TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;
|
10694
|
+
this.dataUpdated = false;
|
10695
|
+
this.rowHeightSet = false;
|
10696
|
+
this.initialLoad = false;
|
10697
|
+
this.icPageChangeEvent = false;
|
10698
|
+
this.itemsPerPageChange = false;
|
10699
|
+
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
10700
|
+
this.DEFAULT_LINE_HEIGHT = 24;
|
10701
|
+
this.densityUpdate = false;
|
10702
|
+
this.updateSetRowHeight = (typographyEl) => {
|
10703
|
+
const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
|
10704
|
+
if (typographyEl) {
|
10705
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
10706
|
+
const rowHeight = fontSize *
|
10707
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
10708
|
+
if (typographyEl.scrollHeight > rowHeight) {
|
10709
|
+
cellContainer.style.removeProperty("height");
|
10710
|
+
}
|
10711
|
+
}
|
10712
|
+
else {
|
10713
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
10714
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
10715
|
+
const rowHeight = fontSize *
|
10716
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
10717
|
+
if (typographyEl.scrollHeight > rowHeight) {
|
10718
|
+
cellContainer.style.removeProperty("height");
|
10719
|
+
}
|
10720
|
+
});
|
10721
|
+
}
|
10722
|
+
};
|
10723
|
+
this.debounceDataTruncation = () => {
|
10724
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
10725
|
+
if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
|
10726
|
+
this.resizeObserver = new ResizeObserver(
|
10727
|
+
// This gets triggered twice due to updated data and see more/see less button
|
10728
|
+
debounce$2(() => {
|
10729
|
+
// console.log("resizeObserver triggered");
|
10730
|
+
this.dataTruncation(typographyEl);
|
10731
|
+
}, 200));
|
10732
|
+
this.resizeObserver.observe(typographyEl);
|
10733
|
+
}
|
10734
|
+
});
|
10735
|
+
};
|
10736
|
+
this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
|
10737
|
+
this.truncate = (typographyEl, cellContainer, tooltip) => {
|
10738
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
10739
|
+
//24 is the height of a single line
|
10740
|
+
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
10741
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
10742
|
+
this.addTooltipTruncation(typographyEl, cellContainer, tooltip);
|
10743
|
+
}
|
10744
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
10745
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
10746
|
+
}
|
10747
|
+
}
|
10748
|
+
}
|
10749
|
+
else {
|
10750
|
+
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
10751
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
|
10752
|
+
cellContainer.appendChild(typographyEl);
|
10753
|
+
tooltip.remove();
|
10754
|
+
}
|
10755
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
10756
|
+
!isEmptyString(typographyEl.getAttribute("max-lines"))) {
|
10757
|
+
this.resetShowHideTruncation(typographyEl);
|
10758
|
+
}
|
10759
|
+
}
|
10760
|
+
};
|
10761
|
+
this.dataTruncation = (typographyEl) => {
|
10762
|
+
// Tooltip truncation mentioned in AC. Will need revisiting
|
10763
|
+
const tooltip = this.getTooltip(typographyEl);
|
10764
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
10765
|
+
if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
|
10766
|
+
this.dataUpdated) {
|
10767
|
+
return;
|
10768
|
+
}
|
10769
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
10770
|
+
typographyEl.shadowRoot.querySelector("button")) {
|
10771
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
10772
|
+
// If the see more/see less is present and the max lines is equal to the cell container
|
10773
|
+
// remove the see more/see less button
|
10774
|
+
if (showHideBtn) {
|
10775
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
10776
|
+
if (this.getLines(truncWrapper.scrollHeight) ===
|
10777
|
+
+typographyEl.getAttribute("max-lines")) {
|
10778
|
+
this.resetShowHideTruncation(typographyEl);
|
10779
|
+
}
|
10780
|
+
}
|
10781
|
+
}
|
10782
|
+
// Deals with setting and resetting row height and re-truncating data
|
10783
|
+
if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {
|
10784
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
10785
|
+
// cellContainer.clientHeight - 24 removes the extra line by see more/see less
|
10786
|
+
if (truncWrapper &&
|
10787
|
+
cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
|
10788
|
+
truncWrapper.scrollHeight) {
|
10789
|
+
this.resetShowHideTruncation(typographyEl);
|
10790
|
+
return;
|
10791
|
+
}
|
10792
|
+
if (typographyEl.scrollHeight > cellContainer.clientHeight) {
|
10793
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
10794
|
+
return;
|
10795
|
+
}
|
10796
|
+
}
|
10797
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > 0 &&
|
10798
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > 0 &&
|
10799
|
+
(typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) === (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
10800
|
+
if (tooltip) {
|
10801
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
10802
|
+
}
|
10803
|
+
return;
|
10804
|
+
}
|
10805
|
+
this.truncate(typographyEl, cellContainer, tooltip);
|
10806
|
+
};
|
10807
|
+
this.removeTextWrap = () => {
|
10808
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
10809
|
+
const tableCell = typographyEl.closest("td");
|
10810
|
+
if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
|
10811
|
+
tableCell.classList.remove(this.TEXT_WRAP_STRING);
|
10812
|
+
}
|
10813
|
+
});
|
10814
|
+
};
|
10815
|
+
this.getCellContainer = (typographyEl) => {
|
10816
|
+
return typographyEl.closest(".cell-container");
|
10817
|
+
};
|
10818
|
+
this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
|
10819
|
+
array.forEach((val) => val.textWrap && delete val.textWrap);
|
10419
10820
|
this.startLoadingTimer = () => {
|
10420
10821
|
this.hasLoadedForOneSecond = false;
|
10421
10822
|
this.timerStarted = Date.now();
|
@@ -10441,13 +10842,31 @@ class DataTable {
|
|
10441
10842
|
return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
|
10442
10843
|
}
|
10443
10844
|
};
|
10845
|
+
this.getCellOptions = (cell, key) => {
|
10846
|
+
if (!(this.isObject(cell) && Object.keys(cell).includes(key)))
|
10847
|
+
return;
|
10848
|
+
return this.getObjectValue(cell, key);
|
10849
|
+
};
|
10444
10850
|
this.createUpdatingIndicator = () => {
|
10445
10851
|
const { appearance, description, max, min, progress } = this.updatingOptions || {};
|
10446
10852
|
return (hAsync("th", { colSpan: this.columns.length, class: "updating-state" }, hAsync("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
|
10447
10853
|
};
|
10854
|
+
this.setRowHeight = (height) => {
|
10855
|
+
return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
|
10856
|
+
this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
|
10857
|
+
};
|
10858
|
+
this.setTruncationClass = () => {
|
10859
|
+
if (this.truncationPattern) {
|
10860
|
+
return { [`truncation-${this.truncationPattern}`]: true };
|
10861
|
+
}
|
10862
|
+
return {};
|
10863
|
+
};
|
10448
10864
|
this.createCells = (row, rowIndex) => {
|
10865
|
+
var _a;
|
10449
10866
|
const rowValues = Object.values(row);
|
10450
10867
|
const rowKeys = Object.keys(row);
|
10868
|
+
const index = rowIndex;
|
10869
|
+
const rowOptions = this.getRowOptions(rowKeys, rowValues);
|
10451
10870
|
let rowAlignment;
|
10452
10871
|
let rowEmphasis;
|
10453
10872
|
const headerIndex = rowKeys.indexOf("header");
|
@@ -10455,42 +10874,63 @@ class DataTable {
|
|
10455
10874
|
rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
|
10456
10875
|
rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
|
10457
10876
|
}
|
10877
|
+
const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
|
10878
|
+
const currentRowHeight = variableRowHeightVal
|
10879
|
+
? variableRowHeightVal !== "auto" && variableRowHeightVal
|
10880
|
+
: this.globalRowHeight !== "auto" && this.globalRowHeight;
|
10458
10881
|
return rowValues.map((cell, index) => {
|
10459
|
-
var _a, _b, _c, _d, _e;
|
10882
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
10460
10883
|
const columnProps = this.columns[index];
|
10461
10884
|
const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
|
10462
10885
|
const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
|
10463
10886
|
const cellValue = (key) => this.getObjectValue(cell, key);
|
10464
|
-
|
10465
|
-
|
10466
|
-
|
10467
|
-
|
10468
|
-
|
10469
|
-
|
10470
|
-
|
10471
|
-
|
10472
|
-
|
10473
|
-
|
10474
|
-
this.
|
10475
|
-
|
10476
|
-
|
10477
|
-
|
10478
|
-
|
10479
|
-
|
10480
|
-
|
10481
|
-
|
10482
|
-
|
10483
|
-
|
10484
|
-
|
10485
|
-
|
10486
|
-
|
10487
|
-
|
10488
|
-
|
10489
|
-
|
10490
|
-
|
10491
|
-
|
10492
|
-
|
10493
|
-
|
10887
|
+
if (rowKeys[index] === "header") {
|
10888
|
+
return (hAsync("th", { scope: "row", colSpan: cellValue("colspan"), class: {
|
10889
|
+
["row-header"]: true,
|
10890
|
+
[`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
|
10891
|
+
["row-header-sticky"]: this.stickyRowHeaders,
|
10892
|
+
} }, cellValue("title")));
|
10893
|
+
}
|
10894
|
+
if (rowKeys[index] !== "rowOptions") {
|
10895
|
+
return (hAsync("td", { class: {
|
10896
|
+
["table-cell"]: true,
|
10897
|
+
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
10898
|
+
} }, hAsync("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
10899
|
+
!isSlotUsed(this.el, cellSlotName)
|
10900
|
+
? cell
|
10901
|
+
: null, class: Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
10902
|
+
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
10903
|
+
rowAlignment ||
|
10904
|
+
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
10905
|
+
!!((_d = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _d === void 0 ? void 0 : _d.vertical) ||
|
10906
|
+
!!rowAlignment ||
|
10907
|
+
!!this.getCellAlignment(cell, "vertical"), [`cell-alignment-${((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _e === void 0 ? void 0 : _e.horizontal) ||
|
10908
|
+
((_f = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _f === void 0 ? void 0 : _f.horizontal) ||
|
10909
|
+
this.getCellAlignment(cell, "horizontal")}`]: !!((_g = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _g === void 0 ? void 0 : _g.horizontal) ||
|
10910
|
+
!!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
|
10911
|
+
!!this.getCellAlignment(cell, "horizontal"), [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true, [this.TEXT_WRAP_STRING]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) ||
|
10912
|
+
(rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
|
10913
|
+
!!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), style: {
|
10914
|
+
height: (this.truncationPattern || currentRowHeight) &&
|
10915
|
+
!columnProps.textWrap &&
|
10916
|
+
!rowOptions.textWrap &&
|
10917
|
+
!this.getCellOptions(cell, "textWrap") &&
|
10918
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element"
|
10919
|
+
? this.setRowHeight(currentRowHeight)
|
10920
|
+
: null,
|
10921
|
+
}, "data-row-height": this.truncationPattern || currentRowHeight
|
10922
|
+
? this.setRowHeight(currentRowHeight)
|
10923
|
+
: null }, isSlotUsed(this.el, cellSlotName) ? (hAsync("slot", { name: cellSlotName })) : (hAsync(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (hAsync("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) && (hAsync("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
|
10924
|
+
!isSlotUsed(this.el, cellSlotName) && (hAsync("ic-typography", { variant: "body", class: {
|
10925
|
+
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
10926
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
10927
|
+
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
10928
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
10929
|
+
!!rowEmphasis,
|
10930
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
10931
|
+
} }, this.isObject(cell) &&
|
10932
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (hAsync("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType)))))))));
|
10933
|
+
}
|
10494
10934
|
});
|
10495
10935
|
};
|
10496
10936
|
this.createColumnHeaders = () => {
|
@@ -10507,7 +10947,7 @@ class DataTable {
|
|
10507
10947
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
10508
10948
|
} }, title), this.sortable && (hAsync("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
10509
10949
|
// eslint-disable-next-line react/jsx-no-bind
|
10510
|
-
onClick: () => this.sortRows(key), innerHTML: SORT_ICONS[this.sortedColumn === key
|
10950
|
+
onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
|
10511
10951
|
? this.sortedColumnOrder
|
10512
10952
|
: "unsorted"], class: {
|
10513
10953
|
["sort-button"]: true,
|
@@ -10515,6 +10955,10 @@ class DataTable {
|
|
10515
10955
|
this.sortedColumnOrder === "unsorted",
|
10516
10956
|
} }))))));
|
10517
10957
|
};
|
10958
|
+
this.onRowClick = (row) => {
|
10959
|
+
this.selectedRow =
|
10960
|
+
this.selectedRow !== row && !this.loading && !this.updating && row;
|
10961
|
+
};
|
10518
10962
|
this.createRows = () => {
|
10519
10963
|
const data = this.showPagination
|
10520
10964
|
? this.data.slice(this.fromRow, this.toRow)
|
@@ -10534,24 +10978,11 @@ class DataTable {
|
|
10534
10978
|
return data
|
10535
10979
|
.sort(!this.sortable ? undefined : this.getSortFunction())
|
10536
10980
|
.map((row, index) => {
|
10537
|
-
var _a;
|
10538
|
-
const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
|
10539
|
-
const findRowHeight = variableRowHeightVal
|
10540
|
-
? variableRowHeightVal !== "auto" && variableRowHeightVal
|
10541
|
-
: this.globalRowHeight !== "auto" && this.globalRowHeight;
|
10542
10981
|
return (hAsync("tr", {
|
10543
10982
|
// eslint-disable-next-line react/jsx-no-bind
|
10544
|
-
onClick: () =>
|
10545
|
-
this.selectedRow !== row &&
|
10546
|
-
!this.loading &&
|
10547
|
-
!this.updating &&
|
10548
|
-
row), class: {
|
10983
|
+
onClick: () => this.onRowClick(row), class: {
|
10549
10984
|
["table-row"]: true,
|
10550
10985
|
["table-row-selected"]: this.selectedRow === row,
|
10551
|
-
}, style: {
|
10552
|
-
height: findRowHeight
|
10553
|
-
? `${findRowHeight * DENSITY_HEIGHT_MULTIPLIER[this.density]}px`
|
10554
|
-
: null,
|
10555
10986
|
}
|
10556
10987
|
}, this.createCells(row, index)));
|
10557
10988
|
});
|
@@ -10614,6 +11045,25 @@ class DataTable {
|
|
10614
11045
|
}
|
10615
11046
|
this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
|
10616
11047
|
sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
|
11048
|
+
this.tableSorted = true;
|
11049
|
+
};
|
11050
|
+
this.getTypographyElements = () => {
|
11051
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));
|
11052
|
+
};
|
11053
|
+
this.getTooltip = (typographyEl) => {
|
11054
|
+
return typographyEl.closest(this.TOOLTIP);
|
11055
|
+
};
|
11056
|
+
this.updateTruncationTooltip = (removeTooltipOnly = false) => {
|
11057
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11058
|
+
const tooltip = this.getTooltip(typographyEl);
|
11059
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11060
|
+
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
11061
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
11062
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
|
11063
|
+
return;
|
11064
|
+
}
|
11065
|
+
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
11066
|
+
});
|
10617
11067
|
};
|
10618
11068
|
this.updateScrollOffset = () => {
|
10619
11069
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
@@ -10627,12 +11077,13 @@ class DataTable {
|
|
10627
11077
|
this.sortedColumn = undefined;
|
10628
11078
|
this.sortedColumnOrder = undefined;
|
10629
11079
|
this.toRow = undefined;
|
11080
|
+
this.currentRowHeight = undefined;
|
10630
11081
|
this.caption = undefined;
|
10631
11082
|
this.columns = undefined;
|
10632
11083
|
this.data = undefined;
|
10633
11084
|
this.density = "default";
|
10634
11085
|
this.embedded = false;
|
10635
|
-
this.globalRowHeight =
|
11086
|
+
this.globalRowHeight = "auto";
|
10636
11087
|
this.hideColumnHeaders = false;
|
10637
11088
|
this.loading = false;
|
10638
11089
|
this.loadingOptions = undefined;
|
@@ -10661,10 +11112,15 @@ class DataTable {
|
|
10661
11112
|
};
|
10662
11113
|
this.stickyColumnHeaders = false;
|
10663
11114
|
this.stickyRowHeaders = false;
|
11115
|
+
this.truncationPattern = undefined;
|
10664
11116
|
this.updating = false;
|
10665
11117
|
this.updatingOptions = undefined;
|
10666
11118
|
this.variableRowHeight = undefined;
|
10667
11119
|
}
|
11120
|
+
disconnectedCallback() {
|
11121
|
+
var _a;
|
11122
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
11123
|
+
}
|
10668
11124
|
componentWillLoad() {
|
10669
11125
|
var _a;
|
10670
11126
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
@@ -10673,10 +11129,15 @@ class DataTable {
|
|
10673
11129
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
10674
11130
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
10675
11131
|
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
11132
|
+
this.initialLoad = true;
|
11133
|
+
this.previousItemsPerPage = this.rowsPerPage;
|
10676
11134
|
}
|
10677
11135
|
componentDidLoad() {
|
10678
11136
|
const tableElement = this.el.shadowRoot.querySelector("table");
|
10679
11137
|
const tableContainer = this.el.shadowRoot.querySelector(".table-container");
|
11138
|
+
if (this.dataUpdated) {
|
11139
|
+
this.dataUpdated = false;
|
11140
|
+
}
|
10680
11141
|
if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
|
10681
11142
|
(tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
|
10682
11143
|
this.scrollable = true;
|
@@ -10685,11 +11146,144 @@ class DataTable {
|
|
10685
11146
|
this.startLoadingTimer();
|
10686
11147
|
this.showLoadingIndicator();
|
10687
11148
|
}
|
11149
|
+
if (this.truncationPattern) {
|
11150
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11151
|
+
if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
|
11152
|
+
this.dataTruncation(typographyEl);
|
11153
|
+
}
|
11154
|
+
});
|
11155
|
+
this.debounceDataTruncation();
|
11156
|
+
}
|
11157
|
+
if (this.globalRowHeight !== "auto") {
|
11158
|
+
this.updateSetRowHeight();
|
11159
|
+
}
|
10688
11160
|
}
|
10689
|
-
|
10690
|
-
|
10691
|
-
|
10692
|
-
|
11161
|
+
componentDidUpdate() {
|
11162
|
+
this.truncateUpdatedData();
|
11163
|
+
}
|
11164
|
+
truncateUpdatedData() {
|
11165
|
+
if (this.dataUpdated) {
|
11166
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
11167
|
+
this.resetShowHideTruncation();
|
11168
|
+
}
|
11169
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
11170
|
+
this.updateTruncationTooltip();
|
11171
|
+
}
|
11172
|
+
this.dataUpdated = false;
|
11173
|
+
}
|
11174
|
+
if (this.tableSorted) {
|
11175
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
11176
|
+
this.updateTruncationTooltip();
|
11177
|
+
}
|
11178
|
+
this.tableSorted = false;
|
11179
|
+
}
|
11180
|
+
// This function recalculates the tooltip truncation when the rowHeight has been set.
|
11181
|
+
// This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
|
11182
|
+
if (this.rowHeightSet) {
|
11183
|
+
const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
|
11184
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11185
|
+
var _a;
|
11186
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11187
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
11188
|
+
const rowHeight = fontSize *
|
11189
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11190
|
+
// If the set row height is bigger than the cell container even
|
11191
|
+
// with textWrap, set the row height
|
11192
|
+
if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
11193
|
+
rowHeight > cellContainer.clientHeight) {
|
11194
|
+
cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11195
|
+
}
|
11196
|
+
if (this.truncationPattern) {
|
11197
|
+
// If the set row height is bigger than the typography truncation wrapper
|
11198
|
+
// scroll height, remove see more / see less button
|
11199
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
11200
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
11201
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
11202
|
+
if (showHideBtn &&
|
11203
|
+
(truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
|
11204
|
+
this.resetShowHideTruncation(typographyEl);
|
11205
|
+
return;
|
11206
|
+
}
|
11207
|
+
}
|
11208
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
11209
|
+
}
|
11210
|
+
else {
|
11211
|
+
this.updateSetRowHeight(typographyEl);
|
11212
|
+
}
|
11213
|
+
});
|
11214
|
+
this.rowHeightSet = false;
|
11215
|
+
}
|
11216
|
+
// Only run truncation on the new rows
|
11217
|
+
// when the number of items per page has increased
|
11218
|
+
if (this.itemsPerPageChange) {
|
11219
|
+
const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
|
11220
|
+
if (this.rowsPerPage > this.previousItemsPerPage) {
|
11221
|
+
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
11222
|
+
newRows.forEach((row) => {
|
11223
|
+
row
|
11224
|
+
.querySelectorAll("ic-typography")
|
11225
|
+
.forEach((typographyEl) => {
|
11226
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11227
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
11228
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
11229
|
+
});
|
11230
|
+
});
|
11231
|
+
}
|
11232
|
+
this.previousItemsPerPage = this.rowsPerPage;
|
11233
|
+
this.itemsPerPageChange = false;
|
11234
|
+
}
|
11235
|
+
if (!this.initialLoad && this.icPageChangeEvent) {
|
11236
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
11237
|
+
this.updateTruncationTooltip();
|
11238
|
+
}
|
11239
|
+
// set truncation to see more if opened and next/previous page is pressed
|
11240
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
11241
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11242
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11243
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
11244
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
|
11245
|
+
!showHideBtn) {
|
11246
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
11247
|
+
}
|
11248
|
+
});
|
11249
|
+
}
|
11250
|
+
this.icPageChangeEvent = false;
|
11251
|
+
}
|
11252
|
+
if (this.densityUpdate) {
|
11253
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11254
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11255
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
11256
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
11257
|
+
});
|
11258
|
+
this.densityUpdate = false;
|
11259
|
+
}
|
11260
|
+
}
|
11261
|
+
createShowHideTruncation(typographyEl, cellContainer) {
|
11262
|
+
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
11263
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
11264
|
+
typographyEl.setShowHideExpanded(false);
|
11265
|
+
cellContainer.style.height = null;
|
11266
|
+
}
|
11267
|
+
addTooltipTruncation(typographyEl, cellContainer, tooltip) {
|
11268
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
11269
|
+
if (!tooltip) {
|
11270
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
11271
|
+
}
|
11272
|
+
}
|
11273
|
+
addShowHideTruncation(cellContainer, typographyEl) {
|
11274
|
+
cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
|
11275
|
+
this.createShowHideTruncation(typographyEl, cellContainer);
|
11276
|
+
}
|
11277
|
+
getTruncWrapper(typographyEl) {
|
11278
|
+
return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
|
11279
|
+
}
|
11280
|
+
// Set the height to initial if row height is set and the show / hide truncation
|
11281
|
+
// is clicked
|
11282
|
+
handleTypographyTruncationExpandToggle({ detail, }) {
|
11283
|
+
const { expanded, typographyEl } = detail;
|
11284
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11285
|
+
if (cellContainer.style.height && expanded) {
|
11286
|
+
cellContainer.style.height = "inherit";
|
10693
11287
|
}
|
10694
11288
|
}
|
10695
11289
|
handlePageChange({ detail, target }) {
|
@@ -10708,6 +11302,19 @@ class DataTable {
|
|
10708
11302
|
this.previousRowsPerPage = this.rowsPerPage;
|
10709
11303
|
}
|
10710
11304
|
}
|
11305
|
+
if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
|
11306
|
+
// This is to prevent icPageChange from triggering truncation on first load
|
11307
|
+
this.icPageChangeEvent = true;
|
11308
|
+
}
|
11309
|
+
this.previousPaginationPage = detail.value;
|
11310
|
+
this.initialLoad = false;
|
11311
|
+
}
|
11312
|
+
handleItemsPerPageChange({ detail, target, }) {
|
11313
|
+
if (target.parentElement !== this.el) {
|
11314
|
+
this.previousRowsPerPage = this.rowsPerPage;
|
11315
|
+
this.rowsPerPage = detail.value;
|
11316
|
+
}
|
11317
|
+
this.itemsPerPageChange = true;
|
10711
11318
|
}
|
10712
11319
|
handleDensityChange(ev) {
|
10713
11320
|
this.density = ev.detail.value;
|
@@ -10725,7 +11332,23 @@ class DataTable {
|
|
10725
11332
|
}, 500);
|
10726
11333
|
}
|
10727
11334
|
}
|
10728
|
-
|
11335
|
+
truncationPatternHandler(newValue) {
|
11336
|
+
if (newValue === this.SHOW_HIDE_STRING) {
|
11337
|
+
this.updateTruncationTooltip(true);
|
11338
|
+
// Not using debounceDataTruncation here due to resizeObserver not being triggered
|
11339
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11340
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11341
|
+
const tooltip = this.getTooltip(typographyEl);
|
11342
|
+
this.truncate(typographyEl, cellContainer, tooltip);
|
11343
|
+
});
|
11344
|
+
}
|
11345
|
+
if (newValue === this.TOOLTIP_STRING) {
|
11346
|
+
// ResizeObserver is trigger here due to the see more/see less links being removed.
|
11347
|
+
// The resizeObserver will also apply the tooltip where relevant
|
11348
|
+
this.resetShowHideTruncation();
|
11349
|
+
}
|
11350
|
+
}
|
11351
|
+
async dataHandler(newData) {
|
10729
11352
|
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
|
10730
11353
|
if (this.loading) {
|
10731
11354
|
!this.hasLoadedForOneSecond
|
@@ -10735,31 +11358,124 @@ class DataTable {
|
|
10735
11358
|
}
|
10736
11359
|
if (this.updating)
|
10737
11360
|
this.updating = false;
|
11361
|
+
this.dataUpdated = true;
|
11362
|
+
}
|
11363
|
+
async densityHandler() {
|
11364
|
+
this.densityUpdate = true;
|
11365
|
+
}
|
11366
|
+
resetShowHideTruncation(typographyEl) {
|
11367
|
+
if (typographyEl) {
|
11368
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
11369
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11370
|
+
if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
11371
|
+
!isEmptyString(typographyEl.getAttribute("max-lines")) &&
|
11372
|
+
Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
|
11373
|
+
+typographyEl.getAttribute("max-lines")) {
|
11374
|
+
typographyEl.checkMaxLines(truncWrapper.scrollHeight);
|
11375
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
11376
|
+
typographyEl.setShowHideExpanded(false);
|
11377
|
+
cellContainer.style.height = null;
|
11378
|
+
}
|
11379
|
+
else {
|
11380
|
+
typographyEl.resetTruncation().then(() => {
|
11381
|
+
cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11382
|
+
});
|
11383
|
+
}
|
11384
|
+
}
|
11385
|
+
else {
|
11386
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11387
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11388
|
+
typographyEl.resetTruncation().then(() => {
|
11389
|
+
cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11390
|
+
});
|
11391
|
+
});
|
11392
|
+
}
|
10738
11393
|
}
|
10739
|
-
rowHeightChangeHandler() {
|
10740
|
-
|
11394
|
+
rowHeightChangeHandler(newValue, oldValue) {
|
11395
|
+
if (+newValue !== +oldValue) {
|
11396
|
+
this.deleteTextWrapDataKey(this.data);
|
11397
|
+
this.deleteTextWrapDataKey(this.columns);
|
11398
|
+
this.removeTextWrap();
|
11399
|
+
this.icRowHeightChange.emit();
|
11400
|
+
this.rowHeightSet = true;
|
11401
|
+
}
|
10741
11402
|
}
|
10742
11403
|
/**
|
10743
|
-
* Resets the `globalRowHeight` prop to
|
11404
|
+
* Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.
|
10744
11405
|
*/
|
10745
|
-
async resetRowHeights() {
|
10746
|
-
this.globalRowHeight =
|
11406
|
+
async resetRowHeights(rowHeight) {
|
11407
|
+
this.globalRowHeight = rowHeight || "auto";
|
10747
11408
|
this.variableRowHeight = null;
|
10748
11409
|
}
|
10749
11410
|
showLoadingIndicator() {
|
10750
11411
|
this.loadingIndicator.classList.add("show");
|
10751
11412
|
}
|
11413
|
+
getRowOptions(rowKeys, rowValues) {
|
11414
|
+
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
11415
|
+
return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];
|
11416
|
+
}
|
11417
|
+
regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly) {
|
11418
|
+
// When sorting the table, instead of regenerating the tooltip,
|
11419
|
+
// the tooltip details are updated
|
11420
|
+
if (tooltip) {
|
11421
|
+
if (this.tableSorted) {
|
11422
|
+
tooltip.setAttribute("target", typographyEl.id);
|
11423
|
+
tooltip.setAttribute("label", typographyEl.textContent);
|
11424
|
+
}
|
11425
|
+
else {
|
11426
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
11427
|
+
}
|
11428
|
+
if (removeTooltipOnly) {
|
11429
|
+
return;
|
11430
|
+
}
|
11431
|
+
}
|
11432
|
+
// This add line clamp to data only when
|
11433
|
+
// the data object has been updated
|
11434
|
+
if (!typographyEl.getAttribute("style") && this.dataUpdated) {
|
11435
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
11436
|
+
}
|
11437
|
+
// Adding the tableSorted boolean prevents the tooltip
|
11438
|
+
// being regenerated and flashing
|
11439
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
11440
|
+
!this.tableSorted) {
|
11441
|
+
if (!typographyEl.getAttribute("style")) {
|
11442
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
11443
|
+
}
|
11444
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
11445
|
+
}
|
11446
|
+
}
|
11447
|
+
removeTooltip(cellContainer, typographyEl, tooltip) {
|
11448
|
+
cellContainer.appendChild(typographyEl);
|
11449
|
+
if (tooltip) {
|
11450
|
+
tooltip.remove();
|
11451
|
+
}
|
11452
|
+
}
|
11453
|
+
addLineClampCSS(typographyEl, cellContainer) {
|
11454
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
11455
|
+
}
|
11456
|
+
createTruncationTooltip(typographyEl, cellContainer) {
|
11457
|
+
const tooltipEl = document.createElement("ic-tooltip");
|
11458
|
+
tooltipEl.setAttribute("target", typographyEl.id);
|
11459
|
+
tooltipEl.setAttribute("label", typographyEl.textContent);
|
11460
|
+
tooltipEl.classList.add("ic-tooltip-overflow");
|
11461
|
+
tooltipEl.setExternalPopperProps({
|
11462
|
+
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
11463
|
+
strategy: "fixed",
|
11464
|
+
});
|
11465
|
+
cellContainer.appendChild(tooltipEl);
|
11466
|
+
tooltipEl.appendChild(typographyEl);
|
11467
|
+
}
|
10752
11468
|
render() {
|
10753
11469
|
const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
10754
11470
|
return (hAsync("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && hAsync("slot", { name: "title-bar" }), hAsync("div", { class: {
|
10755
11471
|
["table-row-container"]: true,
|
10756
11472
|
scrollable,
|
10757
|
-
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, hAsync("table", null, hAsync("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (hAsync("thead", { class: {
|
11473
|
+
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && hAsync("slot", { name: "title-bar" }), hAsync("table", null, hAsync("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (hAsync("thead", { class: {
|
10758
11474
|
["column-header-sticky"]: stickyColumnHeaders,
|
10759
11475
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
10760
11476
|
} }, hAsync("tr", null, createColumnHeaders()))), updating &&
|
10761
11477
|
!loading &&
|
10762
|
-
(hideColumnHeaders ? (hAsync("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && hAsync("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
|
11478
|
+
(hideColumnHeaders ? (hAsync("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && !loading && hAsync("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
|
10763
11479
|
!loading &&
|
10764
11480
|
(isSlotUsed(this.el, "empty-state") ? (hAsync("slot", { name: "empty-state" })) : (hAsync("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (hAsync("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
10765
11481
|
"loading-empty": loading,
|
@@ -10772,7 +11488,9 @@ class DataTable {
|
|
10772
11488
|
get el() { return getElement(this); }
|
10773
11489
|
static get watchers() { return {
|
10774
11490
|
"loading": ["loadingHandler"],
|
11491
|
+
"truncationPattern": ["truncationPatternHandler"],
|
10775
11492
|
"data": ["dataHandler"],
|
11493
|
+
"density": ["densityHandler"],
|
10776
11494
|
"globalRowHeight": ["rowHeightChangeHandler"],
|
10777
11495
|
"variableRowHeight": ["rowHeightChangeHandler"]
|
10778
11496
|
}; }
|
@@ -10797,6 +11515,7 @@ class DataTable {
|
|
10797
11515
|
"sortOptions": [16],
|
10798
11516
|
"stickyColumnHeaders": [4, "sticky-column-headers"],
|
10799
11517
|
"stickyRowHeaders": [4, "sticky-row-headers"],
|
11518
|
+
"truncationPattern": [1, "truncation-pattern"],
|
10800
11519
|
"updating": [4],
|
10801
11520
|
"updatingOptions": [16],
|
10802
11521
|
"variableRowHeight": [1040],
|
@@ -10809,9 +11528,10 @@ class DataTable {
|
|
10809
11528
|
"sortedColumn": [32],
|
10810
11529
|
"sortedColumnOrder": [32],
|
10811
11530
|
"toRow": [32],
|
11531
|
+
"currentRowHeight": [32],
|
10812
11532
|
"resetRowHeights": [64]
|
10813
11533
|
},
|
10814
|
-
"$listeners$": [[0, "
|
11534
|
+
"$listeners$": [[0, "typographyTruncationExpandToggle", "handleTypographyTruncationExpandToggle"], [0, "icPageChange", "handlePageChange"], [0, "icItemsPerPageChange", "handleItemsPerPageChange"], [0, "icTableDensityUpdate", "handleDensityChange"], [8, "click", "clickListener"]],
|
10815
11535
|
"$lazyBundleId$": "-",
|
10816
11536
|
"$attrsToReflect$": []
|
10817
11537
|
}; }
|
@@ -11837,6 +12557,7 @@ class DateInput {
|
|
11837
12557
|
this.disablePast = false;
|
11838
12558
|
this.disablePastMessage = "Dates in the past are not allowed. Please select a date in the future.";
|
11839
12559
|
this.helperText = undefined;
|
12560
|
+
this.hideHelperText = false;
|
11840
12561
|
this.inputId = `ic-date-input-${inputIds$5++}`;
|
11841
12562
|
this.label = undefined;
|
11842
12563
|
this.max = "";
|
@@ -12080,7 +12801,7 @@ class DateInput {
|
|
12080
12801
|
}
|
12081
12802
|
}
|
12082
12803
|
render() {
|
12083
|
-
const { inputId, label, disabled, helperText, showClearButton, showCalendarButton, size, } = this;
|
12804
|
+
const { inputId, label, disabled, helperText, hideHelperText, showClearButton, showCalendarButton, size, } = this;
|
12084
12805
|
const hasCustomValidation = !isEmptyString(this.validationStatus) &&
|
12085
12806
|
!isEmptyString(this.validationText);
|
12086
12807
|
const validationStatus = hasCustomValidation
|
@@ -12090,7 +12811,7 @@ class DateInput {
|
|
12090
12811
|
: "";
|
12091
12812
|
const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;
|
12092
12813
|
renderHiddenInput(true, this.el, this.name, this.convertToDate(this.year, this.month, this.day), this.disabled);
|
12093
|
-
return (hAsync(Host, { onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, hAsync("ic-input-container", { disabled: disabled }, hAsync("ic-input-label", { for: inputId, label: label, helperText: helperText, disabled: disabled }), hAsync("span", { id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), `${this.defaultHelperText}.`), hAsync("span", { id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), hAsync("span", { id: "live-region", "aria-live": "assertive", class: "sr-only" }), hAsync("ic-input-component-container", { id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group" }, hAsync("div", { class: "input-container" }, hAsync("div", { class: "date-inputs" }, this.getInputsInOrder()[0], "/", this.getInputsInOrder()[1], "/", this.getInputsInOrder()[2]), hAsync("div", { class: "action-buttons" }, showClearButton && (hAsync("ic-button", { id: "clear-button", "aria-label": "Clear input", class: {
|
12814
|
+
return (hAsync(Host, { onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, hAsync("ic-input-container", { disabled: disabled }, hAsync("ic-input-label", { for: inputId, label: label, helperText: !hideHelperText ? helperText : null, disabled: disabled }), hAsync("span", { id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), hideHelperText && `${helperText}\n`, `${this.defaultHelperText}.`), hAsync("span", { id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), hAsync("span", { id: "live-region", "aria-live": "assertive", class: "sr-only" }), hAsync("ic-input-component-container", { id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group" }, hAsync("div", { class: "input-container" }, hAsync("div", { class: "date-inputs" }, this.getInputsInOrder()[0], "/", this.getInputsInOrder()[1], "/", this.getInputsInOrder()[2]), hAsync("div", { class: "action-buttons" }, showClearButton && (hAsync("ic-button", { id: "clear-button", "aria-label": "Clear input", class: {
|
12094
12815
|
["clear-button"]: true,
|
12095
12816
|
["hidden"]: isEmptyString(this.day) &&
|
12096
12817
|
isEmptyString(this.month) &&
|
@@ -12124,6 +12845,7 @@ class DateInput {
|
|
12124
12845
|
"disablePast": [4, "disable-past"],
|
12125
12846
|
"disablePastMessage": [1, "disable-past-message"],
|
12126
12847
|
"helperText": [1025, "helper-text"],
|
12848
|
+
"hideHelperText": [4, "hide-helper-text"],
|
12127
12849
|
"inputId": [1, "input-id"],
|
12128
12850
|
"label": [1],
|
12129
12851
|
"max": [1],
|
@@ -12939,6 +13661,9 @@ class DatePicker {
|
|
12939
13661
|
if (this.helperText !== undefined) {
|
12940
13662
|
inputProps.helperText = this.helperText;
|
12941
13663
|
}
|
13664
|
+
if (this.hideHelperText !== false) {
|
13665
|
+
inputProps.hideHelperText = this.hideHelperText;
|
13666
|
+
}
|
12942
13667
|
if (this.inputId !== undefined) {
|
12943
13668
|
inputProps.inputId = this.inputId;
|
12944
13669
|
}
|
@@ -12989,6 +13714,7 @@ class DatePicker {
|
|
12989
13714
|
this.disablePast = false;
|
12990
13715
|
this.disablePastMessage = "Dates in the past are not allowed. Please select a date in the future.";
|
12991
13716
|
this.helperText = undefined;
|
13717
|
+
this.hideHelperText = false;
|
12992
13718
|
this.inputId = undefined;
|
12993
13719
|
this.label = undefined;
|
12994
13720
|
this.max = "";
|
@@ -13027,6 +13753,14 @@ class DatePicker {
|
|
13027
13753
|
this.minDate = createDate(this.min, this.dateFormat);
|
13028
13754
|
}
|
13029
13755
|
}
|
13756
|
+
watchStartOfWeekHandler() {
|
13757
|
+
this.orderedDaysOfWeek = this.daysOfWeek
|
13758
|
+
.slice(this.startOfWeek)
|
13759
|
+
.concat(this.daysOfWeek.slice(0, this.startOfWeek));
|
13760
|
+
if (this.calendarOpen) {
|
13761
|
+
this.updateMonthInView();
|
13762
|
+
}
|
13763
|
+
}
|
13030
13764
|
watchOpenHandler() {
|
13031
13765
|
if (this.calendarOpen) {
|
13032
13766
|
if (this.inputEl) {
|
@@ -13106,9 +13840,7 @@ class DatePicker {
|
|
13106
13840
|
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Date Picker");
|
13107
13841
|
this.monthNames = stringEnumToArray(IcDateInputMonths);
|
13108
13842
|
this.daysOfWeek = stringEnumToArray(IcShortDayNames);
|
13109
|
-
this.
|
13110
|
-
.splice(this.startOfWeek, this.daysOfWeek.length)
|
13111
|
-
.concat(this.daysOfWeek.splice(0, this.startOfWeek));
|
13843
|
+
this.watchStartOfWeekHandler();
|
13112
13844
|
this.watchMaxHandler();
|
13113
13845
|
this.watchMinHandler();
|
13114
13846
|
}
|
@@ -13190,6 +13922,7 @@ class DatePicker {
|
|
13190
13922
|
"disablePast": ["watchDisablePastHandler"],
|
13191
13923
|
"max": ["watchMaxHandler"],
|
13192
13924
|
"min": ["watchMinHandler"],
|
13925
|
+
"startOfWeek": ["watchStartOfWeekHandler"],
|
13193
13926
|
"calendarOpen": ["watchOpenHandler"],
|
13194
13927
|
"focussedDate": ["watchFocussedDateHandler"],
|
13195
13928
|
"monthInView": ["watchMonthInViewHandler"],
|
@@ -13212,6 +13945,7 @@ class DatePicker {
|
|
13212
13945
|
"disablePast": [4, "disable-past"],
|
13213
13946
|
"disablePastMessage": [1, "disable-past-message"],
|
13214
13947
|
"helperText": [1, "helper-text"],
|
13948
|
+
"hideHelperText": [4, "hide-helper-text"],
|
13215
13949
|
"inputId": [1, "input-id"],
|
13216
13950
|
"label": [1],
|
13217
13951
|
"max": [1],
|
@@ -13361,7 +14095,7 @@ class Dialog {
|
|
13361
14095
|
}
|
13362
14096
|
};
|
13363
14097
|
this.setAlertVariant = () => {
|
13364
|
-
if (isPropDefined(this.status) && this.status !== null) {
|
14098
|
+
if (isPropDefined$1(this.status) && this.status !== null) {
|
13365
14099
|
const alert = this.el.shadowRoot.querySelector("ic-alert");
|
13366
14100
|
alert.setAttribute("variant", this.status);
|
13367
14101
|
}
|
@@ -13706,6 +14440,15 @@ const icEmptyStateCss = "/*!@:host*/.sc-ic-empty-state-h{gap:var(--ic-space-xs);
|
|
13706
14440
|
class EmptyState {
|
13707
14441
|
constructor(hostRef) {
|
13708
14442
|
registerInstance(this, hostRef);
|
14443
|
+
this.hostMutationObserver = null;
|
14444
|
+
this.hostMutationCallback = (mutationList) => {
|
14445
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
14446
|
+
? checkSlotInChildMutations$1(addedNodes, removedNodes, [
|
14447
|
+
"image",
|
14448
|
+
"actions",
|
14449
|
+
])
|
14450
|
+
: false)) ;
|
14451
|
+
};
|
13709
14452
|
this.aligned = "left";
|
13710
14453
|
this.body = undefined;
|
13711
14454
|
this.bodyMaxLines = undefined;
|
@@ -13713,9 +14456,17 @@ class EmptyState {
|
|
13713
14456
|
this.imageSize = "default";
|
13714
14457
|
this.subheading = undefined;
|
13715
14458
|
}
|
14459
|
+
disconnectedCallback() {
|
14460
|
+
var _a;
|
14461
|
+
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
14462
|
+
}
|
13716
14463
|
componentDidLoad() {
|
13717
14464
|
!isSlotUsed$1(this.el, "heading") &&
|
13718
14465
|
onComponentRequiredPropUndefined$1([{ prop: this.heading, propName: "heading" }], "Empty State");
|
14466
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
14467
|
+
this.hostMutationObserver.observe(this.el, {
|
14468
|
+
childList: true,
|
14469
|
+
});
|
13719
14470
|
}
|
13720
14471
|
render() {
|
13721
14472
|
const { aligned, body, bodyMaxLines, heading, imageSize, subheading } = this;
|
@@ -14008,6 +14759,12 @@ const icHeroCss = "/*!@html*/html.sc-ic-hero{line-height:1.15;-webkit-text-size-
|
|
14008
14759
|
class Hero {
|
14009
14760
|
constructor(hostRef) {
|
14010
14761
|
registerInstance(this, hostRef);
|
14762
|
+
this.hostMutationObserver = null;
|
14763
|
+
this.hostMutationCallback = (mutationList) => {
|
14764
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
14765
|
+
? checkSlotInChildMutations$1(addedNodes, removedNodes, "secondary")
|
14766
|
+
: false)) ;
|
14767
|
+
};
|
14011
14768
|
this.foregroundColor = getThemeForegroundColor();
|
14012
14769
|
this.rightContent = false;
|
14013
14770
|
this.leftContentFullWidth = !this.rightContent && this.secondaryHeading === undefined;
|
@@ -14023,12 +14780,20 @@ class Hero {
|
|
14023
14780
|
this.small = false;
|
14024
14781
|
this.subheading = undefined;
|
14025
14782
|
}
|
14783
|
+
disconnectedCallback() {
|
14784
|
+
var _a;
|
14785
|
+
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
14786
|
+
}
|
14026
14787
|
componentWillLoad() {
|
14027
14788
|
this.rightContent = slotHasContent(this.el, "secondary");
|
14028
14789
|
}
|
14029
14790
|
componentDidLoad() {
|
14030
14791
|
!isSlotUsed$1(this.el, "heading") &&
|
14031
14792
|
onComponentRequiredPropUndefined$1([{ prop: this.heading, propName: "heading" }], "Hero");
|
14793
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
14794
|
+
this.hostMutationObserver.observe(this.el, {
|
14795
|
+
childList: true,
|
14796
|
+
});
|
14032
14797
|
}
|
14033
14798
|
componentWillRender() {
|
14034
14799
|
this.rightContent = slotHasContent(this.el, "secondary");
|
@@ -14049,7 +14814,7 @@ class Hero {
|
|
14049
14814
|
render() {
|
14050
14815
|
const { aligned, small, size, heading, subheading, secondaryHeading, secondarySubheading, foregroundColor, backgroundImage, scrollFactor, } = this;
|
14051
14816
|
let style = {};
|
14052
|
-
if (isPropDefined(backgroundImage)) {
|
14817
|
+
if (isPropDefined$1(backgroundImage)) {
|
14053
14818
|
style = {
|
14054
14819
|
"background-image": "url(" + backgroundImage + ")",
|
14055
14820
|
"background-position": scrollFactor,
|
@@ -14065,7 +14830,7 @@ class Hero {
|
|
14065
14830
|
["left-container-full-width"]: this.leftContentFullWidth,
|
14066
14831
|
} }, hAsync("div", { class: "heading" }, hAsync("slot", { name: "heading" }, hAsync("ic-typography", { variant: small || size === "small" ? "h2" : "h1", class: {
|
14067
14832
|
["heading-bottom-spacing"]: !small && size !== "small",
|
14068
|
-
} }, heading))), hAsync("div", { class: "subheading" }, hAsync("slot", { name: "subheading" }, hAsync("ic-typography", { variant: "body" }, subheading))), hAsync("div", { class: "interaction-container" }, hAsync("slot", { name: "interaction" }))), (isPropDefined(secondaryHeading) || this.rightContent) && (hAsync("div", { class: "right-container" }, hAsync("slot", { name: "secondary" }, secondaryHeading && (hAsync("div", { class: "secondary-container" }, hAsync("div", { class: "secondary-heading" }, hAsync("ic-typography", { variant: "h4" }, secondaryHeading)), hAsync("div", { class: "secondary-subheading" }, hAsync("ic-typography", { variant: "subtitle-small" }, secondarySubheading))))))))));
|
14833
|
+
} }, heading))), hAsync("div", { class: "subheading" }, hAsync("slot", { name: "subheading" }, hAsync("ic-typography", { variant: "body" }, subheading))), hAsync("div", { class: "interaction-container" }, hAsync("slot", { name: "interaction" }))), (isPropDefined$1(secondaryHeading) || this.rightContent) && (hAsync("div", { class: "right-container" }, hAsync("slot", { name: "secondary" }, secondaryHeading && (hAsync("div", { class: "secondary-container" }, hAsync("div", { class: "secondary-heading" }, hAsync("ic-typography", { variant: "h4" }, secondaryHeading)), hAsync("div", { class: "secondary-subheading" }, hAsync("ic-typography", { variant: "subtitle-small" }, secondarySubheading))))))))));
|
14069
14834
|
}
|
14070
14835
|
get el() { return getElement(this); }
|
14071
14836
|
static get style() { return icHeroCss; }
|
@@ -14285,7 +15050,7 @@ class InputComponentContainer {
|
|
14285
15050
|
registerInstance(this, hostRef);
|
14286
15051
|
this.hostMutationCallback = (mutationList) => {
|
14287
15052
|
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
14288
|
-
? checkSlotInChildMutations(addedNodes, removedNodes, "left-icon")
|
15053
|
+
? checkSlotInChildMutations$1(addedNodes, removedNodes, "left-icon")
|
14289
15054
|
: false)) ;
|
14290
15055
|
};
|
14291
15056
|
this.appearance = "default";
|
@@ -14541,7 +15306,7 @@ class Link {
|
|
14541
15306
|
(_a = this.el.shadowRoot.querySelector("a")) === null || _a === void 0 ? void 0 : _a.focus();
|
14542
15307
|
}
|
14543
15308
|
updateTheme(newTheme = null) {
|
14544
|
-
const theme = getThemeFromContext(this.el, newTheme);
|
15309
|
+
const theme = getThemeFromContext$1(this.el, newTheme);
|
14545
15310
|
if (theme !== IcThemeForegroundEnum$1.Default) {
|
14546
15311
|
this.appearance = theme;
|
14547
15312
|
}
|
@@ -14663,7 +15428,7 @@ class LoadingIndicator {
|
|
14663
15428
|
return cls;
|
14664
15429
|
};
|
14665
15430
|
this.updateLabel = () => {
|
14666
|
-
if (isPropDefined(this.label)) {
|
15431
|
+
if (isPropDefined$1(this.label)) {
|
14667
15432
|
this.labelList = this.label.split("/");
|
14668
15433
|
const labelIndex = 0;
|
14669
15434
|
this.indicatorLabel = this.labelList[labelIndex];
|
@@ -20048,7 +20813,7 @@ class MenuGroup {
|
|
20048
20813
|
}
|
20049
20814
|
render() {
|
20050
20815
|
const parentMenu = this.el.closest("ic-popover-menu");
|
20051
|
-
return (hAsync(Host, { "aria-label": this.label !== null ? this.label : "" }, isPropDefined(this.label) && (hAsync("ic-typography", { variant: "subtitle-small" }, this.label)), hAsync("ul", { role: "group" }, hAsync("slot", null)), this.el !== (parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.querySelector("ic-menu-group:last-child")) && (hAsync("hr", null))));
|
20816
|
+
return (hAsync(Host, { "aria-label": this.label !== null ? this.label : "" }, isPropDefined$1(this.label) && (hAsync("ic-typography", { variant: "subtitle-small" }, this.label)), hAsync("ul", { role: "group" }, hAsync("slot", null)), this.el !== (parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.querySelector("ic-menu-group:last-child")) && (hAsync("hr", null))));
|
20052
20817
|
}
|
20053
20818
|
get el() { return getElement(this); }
|
20054
20819
|
static get style() { return icMenuGroupCss; }
|
@@ -20076,7 +20841,7 @@ class MenuItem {
|
|
20076
20841
|
this.handleMenuItemClick = createEvent(this, "handleMenuItemClick", 7);
|
20077
20842
|
this.triggerPopoverMenuInstance = createEvent(this, "triggerPopoverMenuInstance", 7);
|
20078
20843
|
this.handleClick = (e) => {
|
20079
|
-
if (isPropDefined(this.submenuTriggerFor)) {
|
20844
|
+
if (isPropDefined$1(this.submenuTriggerFor)) {
|
20080
20845
|
this.triggerPopoverMenuInstance.emit();
|
20081
20846
|
}
|
20082
20847
|
else if (this.variant === "toggle") {
|
@@ -20090,16 +20855,16 @@ class MenuItem {
|
|
20090
20855
|
};
|
20091
20856
|
this.getMenuItemAriaLabel = () => {
|
20092
20857
|
let ariaLabel = this.label;
|
20093
|
-
if (isPropDefined(this.description)) {
|
20858
|
+
if (isPropDefined$1(this.description)) {
|
20094
20859
|
ariaLabel = `${ariaLabel}, ${this.description}`;
|
20095
20860
|
}
|
20096
|
-
if (isPropDefined(this.keyboardShortcut)) {
|
20861
|
+
if (isPropDefined$1(this.keyboardShortcut)) {
|
20097
20862
|
ariaLabel = `${ariaLabel}, ${this.keyboardShortcut}`;
|
20098
20863
|
}
|
20099
20864
|
if (this.variant === "destructive") {
|
20100
20865
|
ariaLabel = `${ariaLabel}, destructive`;
|
20101
20866
|
}
|
20102
|
-
if (isPropDefined(this.submenuTriggerFor)) {
|
20867
|
+
if (isPropDefined$1(this.submenuTriggerFor)) {
|
20103
20868
|
ariaLabel = `${ariaLabel}, triggers submenu`;
|
20104
20869
|
}
|
20105
20870
|
if (this.el.classList.contains("ic-popover-submenu-back-button")) {
|
@@ -20129,7 +20894,7 @@ class MenuItem {
|
|
20129
20894
|
}
|
20130
20895
|
componentWillLoad() {
|
20131
20896
|
// This ensures that trigger menu items are always set to the default variant
|
20132
|
-
if (isPropDefined(this.submenuTriggerFor) && this.variant !== "default") {
|
20897
|
+
if (isPropDefined$1(this.submenuTriggerFor) && this.variant !== "default") {
|
20133
20898
|
this.variant = "default";
|
20134
20899
|
}
|
20135
20900
|
removeDisabledFalse$1(this.disabled, this.el);
|
@@ -20149,17 +20914,17 @@ class MenuItem {
|
|
20149
20914
|
};
|
20150
20915
|
return (hAsync(Host, { class: {
|
20151
20916
|
["disabled"]: this.disabled,
|
20152
|
-
} }, hAsync("li", { role: this.variant === "toggle" ? "menuitemcheckbox" : "menuitem", "aria-disabled": `${this.disabled}`, "aria-checked": this.variant === "toggle" ? this.toggleChecked : undefined }, hAsync("ic-button", { fullWidth: true, variant: "tertiary", onClick: this.handleClick, href: isPropDefined(this.href), hreflang: isPropDefined(this.hreflang), target: isPropDefined(this.target), rel: isPropDefined(this.rel), referrerpolicy: this.referrerpolicy !== undefined ? this.referrerpolicy : null, "aria-disabled": `${this.disabled}`, "aria-label": this.getMenuItemAriaLabel(), ariaControlsId: isPropDefined(this.submenuTriggerFor)
|
20917
|
+
} }, hAsync("li", { role: this.variant === "toggle" ? "menuitemcheckbox" : "menuitem", "aria-disabled": `${this.disabled}`, "aria-checked": this.variant === "toggle" ? this.toggleChecked : undefined }, hAsync("ic-button", { fullWidth: true, variant: "tertiary", onClick: this.handleClick, href: isPropDefined$1(this.href), hreflang: isPropDefined$1(this.hreflang), target: isPropDefined$1(this.target), rel: isPropDefined$1(this.rel), referrerpolicy: this.referrerpolicy !== undefined ? this.referrerpolicy : null, "aria-disabled": `${this.disabled}`, "aria-label": this.getMenuItemAriaLabel(), ariaControlsId: isPropDefined$1(this.submenuTriggerFor)
|
20153
20918
|
? `ic-popover-submenu-${this.submenuTriggerFor}`
|
20154
|
-
: false, "aria-haspopup": isPropDefined(this.submenuTriggerFor) ||
|
20919
|
+
: false, "aria-haspopup": isPropDefined$1(this.submenuTriggerFor) ||
|
20155
20920
|
this.el.classList.contains("ic-popover-submenu-back-button")
|
20156
20921
|
? "menu"
|
20157
|
-
: false, ariaOwnsId: isPropDefined(this.submenuTriggerFor)
|
20922
|
+
: false, ariaOwnsId: isPropDefined$1(this.submenuTriggerFor)
|
20158
20923
|
? `ic-popover-submenu-${this.submenuTriggerFor}`
|
20159
20924
|
: false }, hAsync("div", { class: "focus-border" }, isSlotUsed$1(this.el, "icon") && (hAsync("span", { class: "icon" }, hAsync("slot", { name: "icon" }))), hAsync(MenuItemInformation, null), this.variant === "toggle" && (hAsync("span", { class: {
|
20160
20925
|
["check-icon"]: true,
|
20161
20926
|
["hide"]: !this.toggleChecked,
|
20162
|
-
}, "aria-hidden": "true", innerHTML: checkIcon })), isPropDefined(this.submenuTriggerFor) && (hAsync("span", { class: { ["submenu-icon"]: true }, "aria-hidden": "true", innerHTML: chevronIcon })))))));
|
20927
|
+
}, "aria-hidden": "true", innerHTML: checkIcon })), isPropDefined$1(this.submenuTriggerFor) && (hAsync("span", { class: { ["submenu-icon"]: true }, "aria-hidden": "true", innerHTML: chevronIcon })))))));
|
20163
20928
|
}
|
20164
20929
|
static get delegatesFocus() { return true; }
|
20165
20930
|
get el() { return getElement(this); }
|
@@ -21779,7 +22544,7 @@ class PopoverMenu {
|
|
21779
22544
|
};
|
21780
22545
|
this.getMenuAriaLabel = () => {
|
21781
22546
|
const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);
|
21782
|
-
if (isPropDefined(this.submenuId)) {
|
22547
|
+
if (isPropDefined$1(this.submenuId)) {
|
21783
22548
|
return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;
|
21784
22549
|
}
|
21785
22550
|
else {
|
@@ -21825,7 +22590,7 @@ class PopoverMenu {
|
|
21825
22590
|
!this.popoverMenuEls.some((menuItem) => menuItem.id)) {
|
21826
22591
|
this.popoverMenuEls.unshift(this.backButton);
|
21827
22592
|
}
|
21828
|
-
this.currentFocus = isPropDefined(this.submenuId) ? 1 : 0;
|
22593
|
+
this.currentFocus = isPropDefined$1(this.submenuId) ? 1 : 0;
|
21829
22594
|
// Needed so that anchorEl isn't always focused
|
21830
22595
|
setTimeout(this.setButtonFocus, 50);
|
21831
22596
|
}
|
@@ -21938,9 +22703,9 @@ class PopoverMenu {
|
|
21938
22703
|
}, tabindex: open ? "0" : "-1" }, hAsync("div", { class: {
|
21939
22704
|
"opening-from-parent": this.openingFromParent,
|
21940
22705
|
"opening-from-child": this.openingFromChild,
|
21941
|
-
} }, isPropDefined(this.submenuId) && (hAsync("div", null, hAsync("ic-menu-item", { class: "ic-popover-submenu-back-button", ref: (el) => (this.backButton = el), label: "Back", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, hAsync("svg", { slot: "icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "submenu-back-icon" }, hAsync("path", { d: "M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z", fill: "currentColor" }))), hAsync("ic-typography", { variant: "subtitle-small", class: "parent-label" }, this.parentLabel))), hAsync("ul", { class: "button", "aria-label": this.getMenuAriaLabel(), role: "menu", "aria-owns": isPropDefined(this.submenuId)
|
22706
|
+
} }, isPropDefined$1(this.submenuId) && (hAsync("div", null, hAsync("ic-menu-item", { class: "ic-popover-submenu-back-button", ref: (el) => (this.backButton = el), label: "Back", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, hAsync("svg", { slot: "icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "submenu-back-icon" }, hAsync("path", { d: "M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z", fill: "currentColor" }))), hAsync("ic-typography", { variant: "subtitle-small", class: "parent-label" }, this.parentLabel))), hAsync("ul", { class: "button", "aria-label": this.getMenuAriaLabel(), role: "menu", "aria-owns": isPropDefined$1(this.submenuId)
|
21942
22707
|
? `ic-popover-submenu-back-button-${this.submenuLevel}`
|
21943
|
-
: false, "aria-controls": isPropDefined(this.submenuId)
|
22708
|
+
: false, "aria-controls": isPropDefined$1(this.submenuId)
|
21944
22709
|
? `ic-popover-submenu-back-button-${this.submenuLevel}`
|
21945
22710
|
: false }, hAsync("slot", null))))));
|
21946
22711
|
}
|
@@ -21978,6 +22743,9 @@ class RadioGroup {
|
|
21978
22743
|
registerInstance(this, hostRef);
|
21979
22744
|
this.icChange = createEvent(this, "icChange", 7);
|
21980
22745
|
this.resizeObserver = null;
|
22746
|
+
this.ADDITIONAL_FIELD = "additional-field";
|
22747
|
+
this.RADIO_HORIZONTAL = "horizontal";
|
22748
|
+
this.RADIO_VERTICAL = "vertical";
|
21981
22749
|
this.runResizeObserver = () => {
|
21982
22750
|
this.resizeObserver = new ResizeObserver(() => {
|
21983
22751
|
this.checkOrientation();
|
@@ -22039,14 +22807,14 @@ class RadioGroup {
|
|
22039
22807
|
}
|
22040
22808
|
});
|
22041
22809
|
this.setFirstRadioOptionTabIndex(this.selectedChild > 0 ? -1 : 0);
|
22042
|
-
|
22043
|
-
|
22044
|
-
|
22045
|
-
|
22046
|
-
|
22047
|
-
|
22048
|
-
|
22049
|
-
|
22810
|
+
if (this.initialOrientation === this.RADIO_HORIZONTAL &&
|
22811
|
+
this.radioOptions !== undefined &&
|
22812
|
+
(this.radioOptions.length > 2 ||
|
22813
|
+
(this.radioOptions.length === 2 &&
|
22814
|
+
(isSlotUsed$1(this.radioOptions[0], this.ADDITIONAL_FIELD) ||
|
22815
|
+
isSlotUsed$1(this.radioOptions[1], this.ADDITIONAL_FIELD))))) {
|
22816
|
+
this.currentOrientation = this.RADIO_VERTICAL;
|
22817
|
+
}
|
22050
22818
|
}
|
22051
22819
|
};
|
22052
22820
|
this.checkedValue = "";
|
@@ -22067,6 +22835,7 @@ class RadioGroup {
|
|
22067
22835
|
}
|
22068
22836
|
orientationChangeHandler() {
|
22069
22837
|
this.initialOrientation = this.orientation;
|
22838
|
+
this.checkOrientation();
|
22070
22839
|
}
|
22071
22840
|
disconnectedCallback() {
|
22072
22841
|
var _a, _b;
|
@@ -22116,20 +22885,35 @@ class RadioGroup {
|
|
22116
22885
|
}
|
22117
22886
|
}
|
22118
22887
|
checkOrientation() {
|
22119
|
-
|
22888
|
+
var _a, _b;
|
22889
|
+
if (this.initialOrientation === this.RADIO_HORIZONTAL) {
|
22120
22890
|
let totalWidth = 0;
|
22121
|
-
this.radioOptions
|
22122
|
-
|
22123
|
-
|
22124
|
-
|
22125
|
-
|
22126
|
-
|
22127
|
-
|
22128
|
-
|
22891
|
+
if (Array.isArray(this.radioOptions) && this.radioOptions.length > 0) {
|
22892
|
+
this.radioOptions.forEach(({ clientWidth }, i, arr) => {
|
22893
|
+
totalWidth += clientWidth;
|
22894
|
+
if (i < arr.length - 1)
|
22895
|
+
totalWidth += 40;
|
22896
|
+
});
|
22897
|
+
}
|
22898
|
+
else {
|
22899
|
+
totalWidth = 0;
|
22129
22900
|
}
|
22130
|
-
|
22131
|
-
|
22132
|
-
|
22901
|
+
if (this.initialOrientation == this.RADIO_HORIZONTAL) {
|
22902
|
+
if (this.radioOptions !== undefined &&
|
22903
|
+
(this.radioOptions.length > 2 ||
|
22904
|
+
(this.radioOptions.length === 2 &&
|
22905
|
+
(isSlotUsed$1(this.radioOptions[0], this.ADDITIONAL_FIELD) ||
|
22906
|
+
isSlotUsed$1(this.radioOptions[1], this.ADDITIONAL_FIELD))))) {
|
22907
|
+
this.currentOrientation = this.RADIO_VERTICAL;
|
22908
|
+
}
|
22909
|
+
else {
|
22910
|
+
if (totalWidth >= ((_a = this.radioContainer) === null || _a === void 0 ? void 0 : _a.clientWidth)) {
|
22911
|
+
this.currentOrientation = this.RADIO_VERTICAL;
|
22912
|
+
}
|
22913
|
+
else if (totalWidth < ((_b = this.radioContainer) === null || _b === void 0 ? void 0 : _b.clientWidth)) {
|
22914
|
+
this.currentOrientation = this.RADIO_HORIZONTAL;
|
22915
|
+
}
|
22916
|
+
}
|
22133
22917
|
}
|
22134
22918
|
}
|
22135
22919
|
}
|
@@ -22137,7 +22921,7 @@ class RadioGroup {
|
|
22137
22921
|
renderHiddenInput$1(true, this.el, this.name, this.checkedValue, this.disabled);
|
22138
22922
|
return (hAsync(Host, { onKeyDown: this.handleKeyDown, class: { small: this.small || this.size === "small" } }, hAsync("div", { role: "radiogroup", "aria-label": `${this.label}${this.required ? ", required" : ""}` }, !this.hideLabel && (hAsync("ic-input-label", { class: { [`${this.validationStatus}`]: true }, label: this.label, helperText: this.helperText, required: this.required, disabled: this.disabled })), hAsync("div", { class: {
|
22139
22923
|
"radio-buttons-container": true,
|
22140
|
-
horizontal: this.currentOrientation ===
|
22924
|
+
horizontal: this.currentOrientation === this.RADIO_HORIZONTAL,
|
22141
22925
|
}, ref: (el) => (this.radioContainer = el) }, hAsync("slot", null))), hasValidationStatus$1(this.validationStatus, this.disabled) && (hAsync("ic-input-validation", { ariaLiveMode: "polite", status: this.validationStatus, message: this.validationText }))));
|
22142
22926
|
}
|
22143
22927
|
get el() { return getElement(this); }
|
@@ -22299,7 +23083,7 @@ class RadioOption {
|
|
22299
23083
|
}
|
22300
23084
|
render() {
|
22301
23085
|
const { additionalFieldDisplay, disabled, dynamicText, form, formaction, formenctype, formmethod, formnovalidate, formtarget, groupLabel, handleClick, hasAdditionalField, label, name, selected, swallowClick, value, } = this;
|
22302
|
-
const id = `ic-radio-option-${isPropDefined(label) || value}-${groupLabel}`;
|
23086
|
+
const id = `ic-radio-option-${isPropDefined$1(label) || value}-${groupLabel}`;
|
22303
23087
|
return (hAsync(Host, { onClick: handleClick, class: { disabled } }, hAsync("div", { class: { ["container"]: true, disabled } }, hAsync("div", null, hAsync("input", { role: "radio", tabindex: selected ? "0" : "-1", type: "radio", name: name, id: id, value: value, disabled: disabled ? true : null, checked: selected, ref: (el) => (this.radioElement = el), form: form, formaction: formaction, formenctype: formenctype, formmethod: formmethod, formnovalidate: formnovalidate, formtarget: formtarget }), hAsync("span", { class: "checkmark" })), hAsync("ic-typography", { class: "radio-label", variant: "body" }, hAsync("label", { htmlFor: id }, label))), hasAdditionalField && (hAsync("div", { onClick: swallowClick, class: {
|
22304
23088
|
"dynamic-container": true,
|
22305
23089
|
hidden: additionalFieldDisplay === "dynamic" && !selected,
|
@@ -22969,7 +23753,7 @@ class Select$1 {
|
|
22969
23753
|
this.el.getAttribute(attributeName);
|
22970
23754
|
}
|
22971
23755
|
else if (type === "childList") {
|
22972
|
-
checkSlotInChildMutations(addedNodes, removedNodes, "icon");
|
23756
|
+
checkSlotInChildMutations$1(addedNodes, removedNodes, "icon");
|
22973
23757
|
}
|
22974
23758
|
});
|
22975
23759
|
};
|
@@ -24869,7 +25653,7 @@ class SideNavigation {
|
|
24869
25653
|
});
|
24870
25654
|
};
|
24871
25655
|
this.renderTopBar = ({ isSDevice, foregroundColor, menuOpen, href, isAppNameSubtitleVariant, }) => {
|
24872
|
-
const hasTitle = this.appTitle !== "" && isPropDefined(this.appTitle);
|
25656
|
+
const hasTitle = this.appTitle !== "" && isPropDefined$1(this.appTitle);
|
24873
25657
|
const Component = isSlotUsed$1(this.el, "app-title") ? "div" : "a";
|
24874
25658
|
const attrs = Component == "a" && {
|
24875
25659
|
href: href,
|
@@ -25136,7 +25920,7 @@ class Step {
|
|
25136
25920
|
}
|
25137
25921
|
// STEP STATUS
|
25138
25922
|
let stepStatus;
|
25139
|
-
if (isPropDefined(this.stepStatus)) {
|
25923
|
+
if (isPropDefined$1(this.stepStatus)) {
|
25140
25924
|
stepStatus = this.stepStatus[0].toUpperCase() + this.stepStatus.slice(1);
|
25141
25925
|
}
|
25142
25926
|
// STEP TYPE
|
@@ -25174,7 +25958,7 @@ class Step {
|
|
25174
25958
|
!!this.compactStepStyling &&
|
25175
25959
|
this.compactStepStyling !== "active") ||
|
25176
25960
|
!!this.stepStatus) && (hAsync("div", { class: "step-status" }, statusIcon !== undefined && statusIcon, (this.stepSubtitle || stepType) && (hAsync("ic-typography", { variant: "caption" }, this.stepSubtitle !== null &&
|
25177
|
-
isPropDefined(this.stepSubtitle)
|
25961
|
+
isPropDefined$1(this.stepSubtitle)
|
25178
25962
|
? this.stepSubtitle
|
25179
25963
|
: this.stepType === "disabled" ||
|
25180
25964
|
(this.variant === "compact" &&
|
@@ -25183,7 +25967,7 @@ class Step {
|
|
25183
25967
|
(this.variant === "compact" &&
|
25184
25968
|
this.compactStepStyling === "completed")
|
25185
25969
|
? stepType
|
25186
|
-
: this.stepStatus && stepStatus))))), this.lastStep ? (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Last step")) : (isPropDefined(this.nextStepTitle) && (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Next", hAsync("span", { class: "visually-hidden" }, " step is"), ":", " ", this.nextStepTitle))))));
|
25970
|
+
: this.stepStatus && stepStatus))))), this.lastStep ? (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Last step")) : (isPropDefined$1(this.nextStepTitle) && (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Next", hAsync("span", { class: "visually-hidden" }, " step is"), ":", " ", this.nextStepTitle))))));
|
25187
25971
|
// ICON FOR DEFAULT STEP
|
25188
25972
|
let icon;
|
25189
25973
|
if (this.stepType !== "completed") {
|
@@ -25203,7 +25987,7 @@ class Step {
|
|
25203
25987
|
const defaultStep = (hAsync("div", { class: {
|
25204
25988
|
["step"]: true,
|
25205
25989
|
[`${this.stepType}`]: true,
|
25206
|
-
} }, hAsync("div", { class: "step-top" }, hAsync("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle || this.stepStatus) && (hAsync("div", { class: "step-title-area" }, this.stepTitle && (hAsync("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepTitle && (this.stepSubtitle || this.stepStatus) && (hAsync("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle !== null && isPropDefined(this.stepSubtitle)
|
25990
|
+
} }, hAsync("div", { class: "step-top" }, hAsync("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle || this.stepStatus) && (hAsync("div", { class: "step-title-area" }, this.stepTitle && (hAsync("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepTitle && (this.stepSubtitle || this.stepStatus) && (hAsync("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle !== null && isPropDefined$1(this.stepSubtitle)
|
25207
25991
|
? this.stepSubtitle
|
25208
25992
|
: stepStatus))))));
|
25209
25993
|
return (hAsync(Host, { role: "listitem", "aria-label": `Step ${this.stepNum}${ariaLabel}`, "aria-current": (this.current || this.stepType === "current") && "step", class: {
|
@@ -25279,7 +26063,7 @@ class Stepper {
|
|
25279
26063
|
lastStep.style.maxWidth = "none";
|
25280
26064
|
if (this.alignedFullWidth) {
|
25281
26065
|
this.stepperWidth = this.el.offsetWidth;
|
25282
|
-
lastStep.style.maxWidth = pxToRem(`${this.stepperWidth / this.steps.length}px`);
|
26066
|
+
lastStep.style.maxWidth = pxToRem$1(`${this.stepperWidth / this.steps.length}px`);
|
25283
26067
|
this.lastStepWidth = lastStep.offsetWidth;
|
25284
26068
|
}
|
25285
26069
|
};
|
@@ -25350,9 +26134,9 @@ class Stepper {
|
|
25350
26134
|
if (this.variant === "default") {
|
25351
26135
|
if (!step.lastStep) {
|
25352
26136
|
if (this.alignedFullWidth) {
|
25353
|
-
step.style.width = pxToRem(`${(this.stepperWidth - this.lastStepWidth) /
|
26137
|
+
step.style.width = pxToRem$1(`${(this.stepperWidth - this.lastStepWidth) /
|
25354
26138
|
(this.steps.length - 1)}px`);
|
25355
|
-
step.style.minWidth = pxToRem("148px");
|
26139
|
+
step.style.minWidth = pxToRem$1("148px");
|
25356
26140
|
}
|
25357
26141
|
}
|
25358
26142
|
else if (step.lastStep) {
|
@@ -25363,21 +26147,21 @@ class Stepper {
|
|
25363
26147
|
else {
|
25364
26148
|
step.style.maxWidth =
|
25365
26149
|
this.connectorWidth > 100
|
25366
|
-
? pxToRem(`${this.connectorWidth + 48}px`)
|
25367
|
-
: pxToRem("148px");
|
26150
|
+
? pxToRem$1(`${this.connectorWidth + 48}px`)
|
26151
|
+
: pxToRem$1("148px");
|
25368
26152
|
}
|
25369
26153
|
}
|
25370
26154
|
if (this.aligned === "left") {
|
25371
26155
|
step.style.width =
|
25372
26156
|
this.connectorWidth > 100
|
25373
|
-
? pxToRem(`${this.connectorWidth + 48}px`)
|
25374
|
-
: pxToRem("148px");
|
26157
|
+
? pxToRem$1(`${this.connectorWidth + 48}px`)
|
26158
|
+
: pxToRem$1("148px");
|
25375
26159
|
const stepConnect = step.shadowRoot.querySelector(".step > .step-top > .step-connect");
|
25376
26160
|
if (stepConnect) {
|
25377
26161
|
stepConnect.style.width =
|
25378
26162
|
this.connectorWidth > 100
|
25379
|
-
? pxToRem(`${this.connectorWidth}px`)
|
25380
|
-
: pxToRem("100px");
|
26163
|
+
? pxToRem$1(`${this.connectorWidth}px`)
|
26164
|
+
: pxToRem$1("100px");
|
25381
26165
|
}
|
25382
26166
|
}
|
25383
26167
|
if (this.hideStepInfo && stepTitleArea !== null) {
|
@@ -26080,7 +26864,7 @@ class TabPanel {
|
|
26080
26864
|
const { panelId, selectedTab, appearance } = this;
|
26081
26865
|
return (hAsync(Host, { class: {
|
26082
26866
|
["ic-tab-panel-light"]: appearance === IcThemeForegroundEnum$1.Light,
|
26083
|
-
}, role: "tabpanel", hidden: isPropDefined(panelId) && isPropDefined(selectedTab)
|
26867
|
+
}, role: "tabpanel", hidden: isPropDefined$1(panelId) && isPropDefined$1(selectedTab)
|
26084
26868
|
? !(panelId === selectedTab)
|
26085
26869
|
: true }, hAsync("div", null, hAsync("slot", null))));
|
26086
26870
|
}
|
@@ -26164,7 +26948,7 @@ class TextField {
|
|
26164
26948
|
this.el.getAttribute(attributeName);
|
26165
26949
|
}
|
26166
26950
|
else if (type === "childList") {
|
26167
|
-
checkSlotInChildMutations(addedNodes, removedNodes, "icon");
|
26951
|
+
checkSlotInChildMutations$1(addedNodes, removedNodes, "icon");
|
26168
26952
|
}
|
26169
26953
|
});
|
26170
26954
|
};
|
@@ -26514,7 +27298,7 @@ class Toast {
|
|
26514
27298
|
(_b = this.neutralIconAriaLabel) !== null && _b !== void 0 ? _b : VARIANT_ICONS[this.variant].ariaLabel;
|
26515
27299
|
}
|
26516
27300
|
if (this.isManual) {
|
26517
|
-
const toastMessage = isPropDefined(this.message)
|
27301
|
+
const toastMessage = isPropDefined$1(this.message)
|
26518
27302
|
? `. ${this.message}`
|
26519
27303
|
: "";
|
26520
27304
|
this.el.setAttribute("aria-label", this.variant
|
@@ -27076,9 +27860,7 @@ class Tooltip {
|
|
27076
27860
|
.getBoundingClientRect();
|
27077
27861
|
this.getTooltipTranslate(dialogEl);
|
27078
27862
|
}
|
27079
|
-
this.popperInstance = createPopper$1(this.el, this.toolTip, {
|
27080
|
-
placement: this.placement,
|
27081
|
-
modifiers: [
|
27863
|
+
this.popperInstance = createPopper$1(this.el, this.toolTip, Object.assign({ placement: this.placement, modifiers: [
|
27082
27864
|
{
|
27083
27865
|
name: "offset",
|
27084
27866
|
options: {
|
@@ -27095,8 +27877,7 @@ class Tooltip {
|
|
27095
27877
|
name: "eventListeners",
|
27096
27878
|
options: { scroll: false, resize: false },
|
27097
27879
|
},
|
27098
|
-
],
|
27099
|
-
});
|
27880
|
+
] }, this.popperProps));
|
27100
27881
|
}
|
27101
27882
|
else {
|
27102
27883
|
console.warn(`Tooltip can't display without prop 'label' set`);
|
@@ -27156,6 +27937,14 @@ class Tooltip {
|
|
27156
27937
|
this.silent = false;
|
27157
27938
|
this.target = undefined;
|
27158
27939
|
this.label = undefined;
|
27940
|
+
this.popperProps = {};
|
27941
|
+
}
|
27942
|
+
/**
|
27943
|
+
* @internal This method allows props to be added to the PopperJS createPopper instance outside of tooltip
|
27944
|
+
* @param props object - createPopper props set externally
|
27945
|
+
*/
|
27946
|
+
async setExternalPopperProps(props) {
|
27947
|
+
this.popperProps = props;
|
27159
27948
|
}
|
27160
27949
|
disconnectedCallback() {
|
27161
27950
|
this.manageEventListeners("remove");
|
@@ -27209,6 +27998,8 @@ class Tooltip {
|
|
27209
27998
|
"silent": [4],
|
27210
27999
|
"target": [513],
|
27211
28000
|
"label": [1],
|
28001
|
+
"popperProps": [32],
|
28002
|
+
"setExternalPopperProps": [64],
|
27212
28003
|
"displayTooltip": [64],
|
27213
28004
|
"isTooltipVisible": [64]
|
27214
28005
|
},
|
@@ -27382,7 +28173,7 @@ class TopNavigation {
|
|
27382
28173
|
const hasVersion = version !== "";
|
27383
28174
|
const hasMenuContent = hasNavigation || hasIconButtons || hasStatus || hasVersion;
|
27384
28175
|
const searchButtonSize = deviceSize <= DEVICE_SIZES.S ? "default" : "large";
|
27385
|
-
const hasTitle = appTitle !== "" && isPropDefined(appTitle);
|
28176
|
+
const hasTitle = appTitle !== "" && isPropDefined$1(appTitle);
|
27386
28177
|
const overMobileBreakpoint = deviceSize <= customMobileBreakpoint;
|
27387
28178
|
const appTitleVariant = overMobileBreakpoint
|
27388
28179
|
? deviceSize <= DEVICE_SIZES.S
|
@@ -27439,27 +28230,492 @@ class TopNavigation {
|
|
27439
28230
|
}; }
|
27440
28231
|
}
|
27441
28232
|
|
27442
|
-
const icTypographyCss = "/*!@html*/html.sc-ic-typography{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-typography{margin:0}/*!@main*/main.sc-ic-typography{display:block}/*!@h1*/h1.sc-ic-typography{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-typography{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-typography{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-typography{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-typography,strong.sc-ic-typography{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-typography,kbd.sc-ic-typography,samp.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-typography{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-typography,sup.sc-ic-typography{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-typography{bottom:-0.25em}/*!@sup*/sup.sc-ic-typography{top:-0.5em}/*!@img*/img.sc-ic-typography{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-typography,input.sc-ic-typography,optgroup.sc-ic-typography,select.sc-ic-typography,textarea.sc-ic-typography{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-typography,input.sc-ic-typography{overflow:visible}/*!@button,\nselect*/button.sc-ic-typography,select.sc-ic-typography{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-typography,[type=\"button\"].sc-ic-typography,[type=\"reset\"].sc-ic-typography,[type=\"submit\"].sc-ic-typography{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-typography::-moz-focus-inner,[type=\"button\"].sc-ic-typography::-moz-focus-inner,[type=\"reset\"].sc-ic-typography::-moz-focus-inner,[type=\"submit\"].sc-ic-typography::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-typography:-moz-focusring,[type=\"button\"].sc-ic-typography:-moz-focusring,[type=\"reset\"].sc-ic-typography:-moz-focusring,[type=\"submit\"].sc-ic-typography:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-typography{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-typography{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-typography{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-typography{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-typography,[type=\"radio\"].sc-ic-typography{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-typography::-webkit-inner-spin-button,[type=\"number\"].sc-ic-typography::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-typography{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-typography::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-typography::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-typography{display:block}/*!@summary*/summary.sc-ic-typography{display:list-item}/*!@template*/template.sc-ic-typography{display:none}/*!@[hidden]*/[hidden].sc-ic-typography{display:none}/*!@html,\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*/html.sc-ic-typography,body.sc-ic-typography,div.sc-ic-typography,span.sc-ic-typography,applet.sc-ic-typography,object.sc-ic-typography,iframe.sc-ic-typography,h1.sc-ic-typography,h2.sc-ic-typography,h3.sc-ic-typography,h4.sc-ic-typography,h5.sc-ic-typography,h6.sc-ic-typography,p.sc-ic-typography,blockquote.sc-ic-typography,pre.sc-ic-typography,a.sc-ic-typography,abbr.sc-ic-typography,acronym.sc-ic-typography,address.sc-ic-typography,big.sc-ic-typography,cite.sc-ic-typography,code.sc-ic-typography,del.sc-ic-typography,dfn.sc-ic-typography,em.sc-ic-typography,img.sc-ic-typography,ins.sc-ic-typography,kbd.sc-ic-typography,q.sc-ic-typography,s.sc-ic-typography,samp.sc-ic-typography,small.sc-ic-typography,strike.sc-ic-typography,strong.sc-ic-typography,sub.sc-ic-typography,sup.sc-ic-typography,tt.sc-ic-typography,var.sc-ic-typography,b.sc-ic-typography,u.sc-ic-typography,i.sc-ic-typography,center.sc-ic-typography,dl.sc-ic-typography,dt.sc-ic-typography,dd.sc-ic-typography,ol.sc-ic-typography,ul.sc-ic-typography,li.sc-ic-typography,fieldset.sc-ic-typography,form.sc-ic-typography,label.sc-ic-typography,legend.sc-ic-typography,table.sc-ic-typography,caption.sc-ic-typography,tbody.sc-ic-typography,tfoot.sc-ic-typography,thead.sc-ic-typography,tr.sc-ic-typography,th.sc-ic-typography,td.sc-ic-typography,article.sc-ic-typography,aside.sc-ic-typography,canvas.sc-ic-typography,details.sc-ic-typography,embed.sc-ic-typography,figure.sc-ic-typography,figcaption.sc-ic-typography,footer.sc-ic-typography,header.sc-ic-typography,hgroup.sc-ic-typography,menu.sc-ic-typography,nav.sc-ic-typography,output.sc-ic-typography,ruby.sc-ic-typography,section.sc-ic-typography,summary.sc-ic-typography,time.sc-ic-typography,mark.sc-ic-typography,audio.sc-ic-typography,video.sc-ic-typography{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-typography-h{display:block;position:relative}/*!@:host(.ic-typography-vertical-margins-h1)*/.ic-typography-vertical-margins-h1.sc-ic-typography-h{margin:0 0 var(--ic-space-xl)}/*!@:host(.ic-typography-vertical-margins-h2)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h{margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}/*!@:host(.ic-typography-vertical-margins-h3)*/.ic-typography-vertical-margins-h3.sc-ic-typography-h{margin:var(--ic-space-xl) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-h4)*/.ic-typography-vertical-margins-h4.sc-ic-typography-h{margin:var(--ic-space-lg) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small)*/.ic-typography-vertical-margins-subtitle-large.sc-ic-typography-h,.ic-typography-vertical-margins-subtitle-small.sc-ic-typography-h,.ic-typography-vertical-margins-body.sc-ic-typography-h,.ic-typography-vertical-margins-code-large.sc-ic-typography-h,.ic-typography-vertical-margins-code-small.sc-ic-typography-h,.ic-typography-vertical-margins-code-extra-small.sc-ic-typography-h{margin:0 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase)*/.ic-typography-vertical-margins-caption.sc-ic-typography-h,.ic-typography-vertical-margins-caption-uppercase.sc-ic-typography-h{margin:0 0 var(--ic-space-xs)}/*!@:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h3.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h4.sc-ic-typography-h:first-child{margin-top:0}/*!@:host(.ic-typography-h1)*/.ic-typography-h1.sc-ic-typography-h{font:var(--ic-font-h1) !important}/*!@:host(.ic-typography-h2)*/.ic-typography-h2.sc-ic-typography-h{font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-h3)*/.ic-typography-h3.sc-ic-typography-h{font:var(--ic-font-h3)}/*!@:host(.ic-typography-h4)*/.ic-typography-h4.sc-ic-typography-h{font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-large)*/.ic-typography-subtitle-large.sc-ic-typography-h{font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-small)*/.ic-typography-subtitle-small.sc-ic-typography-h{font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-body)*/.ic-typography-body.sc-ic-typography-h{font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-caption)*/.ic-typography-caption.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-caption-uppercase)*/.ic-typography-caption-uppercase.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}/*!@:host(.ic-typography-label)*/.ic-typography-label.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-label-uppercase)*/.ic-typography-label-uppercase.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}/*!@:host(.ic-typography-code-large)*/.ic-typography-code-large.sc-ic-typography-h{font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-code-small)*/.ic-typography-code-small.sc-ic-typography-h{font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-code-extra-small)*/.ic-typography-code-extra-small.sc-ic-typography-h{font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-badge)*/.ic-typography-badge.sc-ic-typography-h{font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-badge-small)*/.ic-typography-badge-small.sc-ic-typography-h{font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-no-wrap)*/.ic-typography-no-wrap.sc-ic-typography-h{white-space:nowrap}/*!@:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label)*/.sc-ic-typography-h .sc-ic-typography-s>h1,.sc-ic-typography-h.sc-ic-typography-s>h2,.sc-ic-typography-h .sc-ic-typography-s>h2,.sc-ic-typography-h.sc-ic-typography-s>h3,.sc-ic-typography-h .sc-ic-typography-s>h3,.sc-ic-typography-h.sc-ic-typography-s>h4,.sc-ic-typography-h .sc-ic-typography-s>h4,.sc-ic-typography-h.sc-ic-typography-s>h5,.sc-ic-typography-h .sc-ic-typography-s>h5,.sc-ic-typography-h.sc-ic-typography-s>h6,.sc-ic-typography-h .sc-ic-typography-s>h6,.sc-ic-typography-h.sc-ic-typography-s>p,.sc-ic-typography-h .sc-ic-typography-s>p,.sc-ic-typography-h.sc-ic-typography-s>label,.sc-ic-typography-h .sc-ic-typography-s>label{font:inherit;letter-spacing:inherit}/*!@.trunc-wrapper*/.trunc-wrapper.sc-ic-typography{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden}/*!@.trunc-btn*/.trunc-btn.sc-ic-typography{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}/*!@.trunc-btn:hover,\n.trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}/*!@:host(.strikethrough)*/.strikethrough.sc-ic-typography-h{text-decoration:line-through}/*!@:host(.underline)*/.underline.sc-ic-typography-h{text-decoration:underline}/*!@:host(.underline.strikethrough)*/.underline.strikethrough.sc-ic-typography-h{text-decoration:line-through underline}/*!@:host(.italic)*/.italic.sc-ic-typography-h{font-style:italic !important}/*!@:host(.bold)*/.bold.sc-ic-typography-h{font-weight:var(--ic-font-weight-bold)}@supports (text-underline-offset: 25%){/*!@.trunc-btn:hover,\n .trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
|
28233
|
+
var arrowDropdown = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
28234
|
+
<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>
|
28235
|
+
</svg>`;
|
28236
|
+
|
28237
|
+
const icTreeItemCss = "/*!@:host*/.sc-ic-tree-item-h{display:block;border:none;position:relative}/*!@:host .tree-item-content*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item{display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs));padding:0 var(--ic-space-xs);text-decoration:none;color:var(--ic-primary-text)}/*!@::slotted([slot=\"router-item\"])*/.sc-ic-tree-item-s>[slot=\"router-item\"]{display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs));text-decoration:none;font-family:var(--ic-font-body-family);color:var(--ic-primary-text);padding:0 var(--ic-space-xs) !important}/*!@::slotted([slot=\"router-item\"].ic-tree-item-single)*/.sc-ic-tree-item-s>[slot=\"router-item\"].ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs)) !important}/*!@:host .tree-item-content:focus,\n::slotted([slot=\"router-item\"]:focus)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:focus,.sc-ic-tree-item-s>[slot=\"router-item\"]:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}/*!@:host .tree-item-content:hover,\n::slotted([slot=\"router-item\"]:hover)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:hover,.sc-ic-tree-item-s>[slot=\"router-item\"]:hover{background-color:var(--ic-action-dark-bg-hover) !important;cursor:pointer}/*!@:host .tree-item-content:active,\n::slotted([slot=\"router-item\"]:active)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:active,.sc-ic-tree-item-s>[slot=\"router-item\"]:active{background-color:var(--ic-action-dark-bg-active) !important}/*!@:host(.ic-tree-item-selected) .tree-item-content,\n:host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"])*/.ic-tree-item-selected.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-selected.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-selected .sc-ic-tree-item-s>[slot=\"router-item\"]{background-color:var(--ic-action-default-bg-hover) !important}/*!@:host(.ic-tree-item-small) .tree-item-content,\n:host(.ic-tree-item-small) ::slotted([slot=\"router-item\"])*/.ic-tree-item-small.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-small.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-small .sc-ic-tree-item-s>[slot=\"router-item\"]{height:var(--ic-space-xl)}/*!@:host(.ic-tree-item-large) .tree-item-content,\n:host(.ic-tree-item-large) ::slotted([slot=\"router-item\"])*/.ic-tree-item-large.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-large.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-large .sc-ic-tree-item-s>[slot=\"router-item\"]{height:var(--ic-space-xxl)}/*!@:host(.ic-tree-item-disabled)*/.ic-tree-item-disabled.sc-ic-tree-item-h{pointer-events:none}/*!@:host(.ic-tree-item-disabled) .tree-item-content,\n:host(.ic-tree-item-disabled) .arrow-dropdown,\n:host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n:host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"])*/.ic-tree-item-disabled.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.ic-tree-item-disabled.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"router-item\"]{color:var(--ic-architectural-200) !important;fill:var(--ic-architectural-200);pointer-events:none}/*!@:host(.ic-tree-item-light) .tree-item-content,\n:host(.ic-tree-item-light) .arrow-dropdown,\n:host(.ic-tree-item-light) ::slotted([slot=\"icon\"]),\n:host(.ic-tree-item-light) ::slotted([slot=\"router-item\"])*/.ic-tree-item-light.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.ic-tree-item-light.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-light.sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-light .sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-light.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-light .sc-ic-tree-item-s>[slot=\"router-item\"]{color:var(--ic-architectural-white);fill:var(--ic-architectural-white)}/*!@:host .arrow-dropdown*/.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item{color:var(--ic-action-default);margin-right:var(--ic-space-xs)}/*!@:host(.ic-tree-item-small) .arrow-dropdown*/.ic-tree-item-small.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item{margin-right:var(--ic-space-xxs)}/*!@:host .tree-item-expanded*/.sc-ic-tree-item-h .tree-item-expanded.sc-ic-tree-item{transform:rotate(180deg);margin-top:calc(-1 * var(--ic-space-xxs))}/*!@:host .ic-tree-item-single*/.sc-ic-tree-item-h .ic-tree-item-single.sc-ic-tree-item{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs))}/*!@:host(.ic-tree-item-small) .ic-tree-item-single*/.ic-tree-item-small.sc-ic-tree-item-h .ic-tree-item-single.sc-ic-tree-item{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xxs))}/*!@.icon-container*/.icon-container.sc-ic-tree-item{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}/*!@:host(.ic-tree-item-small) .icon-container*/.ic-tree-item-small.sc-ic-tree-item-h .icon-container.sc-ic-tree-item{margin:0 var(--ic-space-xxs) 0 0}/*!@.ic-text-overflow*/.ic-text-overflow.sc-ic-tree-item{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}/*!@.ic-tooltip-overflow*/.ic-tooltip-overflow.sc-ic-tree-item{overflow:hidden}@media (forced-colors: active){/*!@::slotted([slot=\"icon\"])*/.sc-ic-tree-item-s>[slot=\"icon\"]{fill:currentcolor}/*!@:host(.ic-tree-item-disabled) .tree-item-content,\n :host(.ic-tree-item-disabled) .arrow-dropdown,\n :host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n :host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"])*/.ic-tree-item-disabled.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.ic-tree-item-disabled.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"router-item\"]{color:GrayText !important;fill:GrayText !important}/*!@:host .tree-item-content:focus,\n ::slotted([slot=\"router-item\"]:focus)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:focus,.sc-ic-tree-item-s>[slot=\"router-item\"]:focus{border:var(--ic-hc-border) !important}/*!@:host(.ic-tree-item-selected) .tree-item-content,\n :host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"])*/.ic-tree-item-selected.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-selected.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-selected .sc-ic-tree-item-s>[slot=\"router-item\"]{color:Highlight !important}}";
|
28238
|
+
|
28239
|
+
let treeItemIds = 0;
|
28240
|
+
/**
|
28241
|
+
* @slot label - Content is set as the tree item label.
|
28242
|
+
* @slot icon - Content is placed to the left of the label.
|
28243
|
+
* @slot router-item - Handle routing by nesting your routes in this slot.
|
28244
|
+
*/
|
28245
|
+
class TreeItem {
|
28246
|
+
constructor(hostRef) {
|
28247
|
+
registerInstance(this, hostRef);
|
28248
|
+
this.icTreeItemSelected = createEvent(this, "icTreeItemSelected", 7);
|
28249
|
+
this.treeItemId = `ic-tree-item-${treeItemIds++}`;
|
28250
|
+
this.treeItemTag = "IC-TREE-ITEM";
|
28251
|
+
this.hostMutationObserver = null;
|
28252
|
+
this.TOOLTIP = "ic-tooltip";
|
28253
|
+
this.handleTreeItemClicked = () => {
|
28254
|
+
if (this.isParent) {
|
28255
|
+
this.expanded = !this.expanded;
|
28256
|
+
this.hasParentExpanded = true;
|
28257
|
+
}
|
28258
|
+
this.updateAriaLabel();
|
28259
|
+
this.selected = true;
|
28260
|
+
this.watchSelectedHandler();
|
28261
|
+
};
|
28262
|
+
this.setTreeItemPadding = () => {
|
28263
|
+
let level = 1;
|
28264
|
+
let parentElement = this.el.parentElement;
|
28265
|
+
const treeItemContent = this.el.shadowRoot.querySelector(".tree-item-content");
|
28266
|
+
const isSiblingOfParent = Array.from(parentElement.children)
|
28267
|
+
.map((sibling) => {
|
28268
|
+
if (sibling !== this.el &&
|
28269
|
+
!sibling.querySelector('[slot="router-item"]') &&
|
28270
|
+
!sibling.querySelector('[slot="label"]')) {
|
28271
|
+
return sibling.children.length > 0;
|
28272
|
+
}
|
28273
|
+
else {
|
28274
|
+
return false;
|
28275
|
+
}
|
28276
|
+
})
|
28277
|
+
.includes(true);
|
28278
|
+
const isChild = parentElement.tagName === this.treeItemTag;
|
28279
|
+
const isRouterItem = this.hasRouterSlot();
|
28280
|
+
if ((isSiblingOfParent && !this.el.isParent) ||
|
28281
|
+
(isChild && !this.el.isParent)) {
|
28282
|
+
if (isRouterItem) {
|
28283
|
+
this.routerSlot.classList.add("ic-tree-item-single");
|
28284
|
+
}
|
28285
|
+
else {
|
28286
|
+
treeItemContent.classList.add("ic-tree-item-single");
|
28287
|
+
}
|
28288
|
+
}
|
28289
|
+
while (parentElement) {
|
28290
|
+
if (parentElement.tagName === this.treeItemTag) {
|
28291
|
+
level++;
|
28292
|
+
if (!this.el.isParent && isSiblingOfParent) {
|
28293
|
+
treeItemContent.style.paddingLeft = `calc(var(--ic-space-xl) + ${level * 16}px)`;
|
28294
|
+
}
|
28295
|
+
else if (!this.el.isParent) {
|
28296
|
+
treeItemContent.style.paddingLeft = `calc(var(--ic-space-xs) + ${level * 24}px`;
|
28297
|
+
}
|
28298
|
+
else {
|
28299
|
+
treeItemContent.style.paddingLeft = `${level * 16}px`;
|
28300
|
+
}
|
28301
|
+
}
|
28302
|
+
parentElement = parentElement.parentElement;
|
28303
|
+
}
|
28304
|
+
};
|
28305
|
+
this.truncateTreeItemLabel = (treeItem) => {
|
28306
|
+
const typographyEl = treeItem.shadowRoot.querySelector(".tree-item-label");
|
28307
|
+
const tooltip = typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.closest(this.TOOLTIP);
|
28308
|
+
const treeContent = treeItem.shadowRoot.querySelector(".tree-item-content");
|
28309
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (treeContent === null || treeContent === void 0 ? void 0 : treeContent.clientHeight)) {
|
28310
|
+
typographyEl.classList.add("ic-text-overflow");
|
28311
|
+
if (!tooltip) {
|
28312
|
+
const tooltipEl = document.createElement("ic-tooltip");
|
28313
|
+
tooltipEl.setAttribute("target", this.el.id);
|
28314
|
+
tooltipEl.setAttribute("label", typographyEl.textContent);
|
28315
|
+
tooltipEl.classList.add("ic-tooltip-overflow");
|
28316
|
+
tooltipEl.setAttribute("placement", "right");
|
28317
|
+
treeContent.appendChild(tooltipEl);
|
28318
|
+
tooltipEl.appendChild(typographyEl);
|
28319
|
+
}
|
28320
|
+
}
|
28321
|
+
};
|
28322
|
+
this.hostMutationCallback = (mutationList) => {
|
28323
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
28324
|
+
? checkSlotInChildMutations(addedNodes, removedNodes, "icon")
|
28325
|
+
: false)) ;
|
28326
|
+
};
|
28327
|
+
this.handleDisplayTooltip = (display) => {
|
28328
|
+
const typographyEl = this.el.shadowRoot.querySelector(".tree-item-label");
|
28329
|
+
const tooltip = typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.closest(this.TOOLTIP);
|
28330
|
+
tooltip === null || tooltip === void 0 ? void 0 : tooltip.displayTooltip(display);
|
28331
|
+
};
|
28332
|
+
this.childTreeItems = undefined;
|
28333
|
+
this.appearance = "dark";
|
28334
|
+
this.disabled = false;
|
28335
|
+
this.expanded = false;
|
28336
|
+
this.hasParentExpanded = false;
|
28337
|
+
this.href = undefined;
|
28338
|
+
this.hreflang = "";
|
28339
|
+
this.isParent = false;
|
28340
|
+
this.label = "";
|
28341
|
+
this.referrerpolicy = undefined;
|
28342
|
+
this.rel = undefined;
|
28343
|
+
this.selected = false;
|
28344
|
+
this.size = "default";
|
28345
|
+
this.target = undefined;
|
28346
|
+
}
|
28347
|
+
watchSelectedHandler() {
|
28348
|
+
if (this.selected) {
|
28349
|
+
this.icTreeItemSelected.emit({ id: this.el.id });
|
28350
|
+
}
|
28351
|
+
this.updateAriaLabel();
|
28352
|
+
}
|
28353
|
+
disconnectedCallback() {
|
28354
|
+
var _a;
|
28355
|
+
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
28356
|
+
}
|
28357
|
+
componentDidLoad() {
|
28358
|
+
this.childTreeItems = Array.from(this.el.children).filter((child) => child.tagName === this.treeItemTag);
|
28359
|
+
if (this.childTreeItems.length > 0) {
|
28360
|
+
this.isParent = true;
|
28361
|
+
}
|
28362
|
+
this.setTreeItemPadding();
|
28363
|
+
this.updateAriaLabel();
|
28364
|
+
this.truncateTreeItemLabel(this.el);
|
28365
|
+
!isSlotUsed(this.el, "label") &&
|
28366
|
+
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Tree item");
|
28367
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
28368
|
+
this.hostMutationObserver.observe(this.el, {
|
28369
|
+
childList: true,
|
28370
|
+
});
|
28371
|
+
}
|
28372
|
+
componentDidUpdate() {
|
28373
|
+
if (this.hasParentExpanded) {
|
28374
|
+
this.childTreeItems.forEach((child) => {
|
28375
|
+
this.truncateTreeItemLabel(child);
|
28376
|
+
});
|
28377
|
+
this.hasParentExpanded = false;
|
28378
|
+
}
|
28379
|
+
}
|
28380
|
+
handleKeyDown(ev) {
|
28381
|
+
if (ev.key === "Enter" || ev.key === " ") {
|
28382
|
+
ev.stopImmediatePropagation();
|
28383
|
+
this.handleTreeItemClicked();
|
28384
|
+
}
|
28385
|
+
}
|
28386
|
+
/**
|
28387
|
+
* Sets focus on the native `input`.
|
28388
|
+
*/
|
28389
|
+
async setFocus() {
|
28390
|
+
var _a, _b;
|
28391
|
+
if (this.hasRouterSlot()) {
|
28392
|
+
(_a = this.routerSlot) === null || _a === void 0 ? void 0 : _a.focus();
|
28393
|
+
}
|
28394
|
+
else {
|
28395
|
+
(_b = this.treeItemElement) === null || _b === void 0 ? void 0 : _b.focus();
|
28396
|
+
}
|
28397
|
+
}
|
28398
|
+
/**
|
28399
|
+
* @internal Updates the aria-label of the tree item.
|
28400
|
+
*/
|
28401
|
+
async updateAriaLabel() {
|
28402
|
+
let ariaLabel;
|
28403
|
+
if (this.hasRouterSlot()) {
|
28404
|
+
ariaLabel = this.routerSlot.textContent;
|
28405
|
+
}
|
28406
|
+
else if (isSlotUsed(this.el, "label")) {
|
28407
|
+
ariaLabel = this.el.querySelector('[slot="label"]').textContent;
|
28408
|
+
}
|
28409
|
+
else {
|
28410
|
+
ariaLabel = this.label;
|
28411
|
+
}
|
28412
|
+
if (this.isParent) {
|
28413
|
+
ariaLabel = `${ariaLabel}, triggers submenu, ${this.expanded ? "expanded" : "collapsed"}`;
|
28414
|
+
}
|
28415
|
+
if (this.el.parentElement) {
|
28416
|
+
const treeItems = Array.from(this.el.parentElement.children).filter((child) => child.tagName === this.treeItemTag);
|
28417
|
+
const index = treeItems.indexOf(this.el) + 1;
|
28418
|
+
const parentChildren = treeItems.length;
|
28419
|
+
ariaLabel = `${ariaLabel}, ${index} of ${parentChildren}`;
|
28420
|
+
}
|
28421
|
+
if (this.selected) {
|
28422
|
+
ariaLabel = `${ariaLabel}, active`;
|
28423
|
+
}
|
28424
|
+
if (this.disabled) {
|
28425
|
+
ariaLabel = `${ariaLabel}, dimmed`;
|
28426
|
+
}
|
28427
|
+
if (this.hasRouterSlot()) {
|
28428
|
+
this.routerSlot.ariaLabel = ariaLabel;
|
28429
|
+
}
|
28430
|
+
else {
|
28431
|
+
this.treeItemElement.ariaLabel = ariaLabel;
|
28432
|
+
}
|
28433
|
+
}
|
28434
|
+
hasRouterSlot() {
|
28435
|
+
this.routerSlot = this.el.querySelector('[slot="router-item"]');
|
28436
|
+
return !!this.routerSlot;
|
28437
|
+
}
|
28438
|
+
render() {
|
28439
|
+
const { appearance, disabled, label, selected, size, expanded } = this;
|
28440
|
+
const Component = this.href && !this.disabled ? "a" : "div";
|
28441
|
+
const attrs = Component == "a" && {
|
28442
|
+
href: this.href,
|
28443
|
+
hrefLang: this.hreflang,
|
28444
|
+
referrerPolicy: this.referrerpolicy,
|
28445
|
+
rel: this.rel,
|
28446
|
+
target: this.target,
|
28447
|
+
};
|
28448
|
+
return (hAsync(Host, { class: {
|
28449
|
+
[`ic-tree-item-${appearance}`]: true,
|
28450
|
+
"ic-tree-item-disabled": disabled,
|
28451
|
+
"ic-tree-item-selected": !disabled && selected,
|
28452
|
+
[`ic-tree-item-${size}`]: size !== "default",
|
28453
|
+
}, id: this.treeItemId }, this.hasRouterSlot() ? (hAsync("slot", { name: "router-item" })) : (hAsync(Component, Object.assign({ class: {
|
28454
|
+
"tree-item-content": true,
|
28455
|
+
}, tabIndex: disabled ? -1 : 0, onClick: this.handleTreeItemClicked, ref: (el) => (this.treeItemElement = el), "aria-disabled": disabled ? "true" : "false", "aria-live": "polite" }, attrs, { onFocus: () => this.handleDisplayTooltip(true), onBlur: () => this.handleDisplayTooltip(false) }), this.isParent && (hAsync("span", { class: {
|
28456
|
+
["arrow-dropdown"]: true,
|
28457
|
+
["tree-item-expanded"]: expanded,
|
28458
|
+
}, "aria-hidden": "true", innerHTML: arrowDropdown })), isSlotUsed(this.el, "icon") && (hAsync("div", { class: "icon-container" }, hAsync("slot", { name: "icon" }))), hAsync("ic-typography", { class: "tree-item-label" }, isSlotUsed(this.el, "label") ? hAsync("slot", { name: "label" }) : label))), expanded && (hAsync("div", { "aria-hidden": `${!expanded}` }, hAsync("slot", null)))));
|
28459
|
+
}
|
28460
|
+
get el() { return getElement(this); }
|
28461
|
+
static get watchers() { return {
|
28462
|
+
"selected": ["watchSelectedHandler"]
|
28463
|
+
}; }
|
28464
|
+
static get style() { return icTreeItemCss; }
|
28465
|
+
static get cmpMeta() { return {
|
28466
|
+
"$flags$": 9,
|
28467
|
+
"$tagName$": "ic-tree-item",
|
28468
|
+
"$members$": {
|
28469
|
+
"appearance": [1],
|
28470
|
+
"disabled": [4],
|
28471
|
+
"expanded": [1028],
|
28472
|
+
"hasParentExpanded": [1028, "has-parent-expanded"],
|
28473
|
+
"href": [1],
|
28474
|
+
"hreflang": [1],
|
28475
|
+
"isParent": [1028, "is-parent"],
|
28476
|
+
"label": [1],
|
28477
|
+
"referrerpolicy": [1],
|
28478
|
+
"rel": [1],
|
28479
|
+
"selected": [1028],
|
28480
|
+
"size": [1],
|
28481
|
+
"target": [1],
|
28482
|
+
"childTreeItems": [32],
|
28483
|
+
"setFocus": [64],
|
28484
|
+
"updateAriaLabel": [64]
|
28485
|
+
},
|
28486
|
+
"$listeners$": [[0, "keydown", "handleKeyDown"]],
|
28487
|
+
"$lazyBundleId$": "-",
|
28488
|
+
"$attrsToReflect$": []
|
28489
|
+
}; }
|
28490
|
+
}
|
28491
|
+
|
28492
|
+
const icTreeViewCss = "/*!@:host*/.sc-ic-tree-view-h{display:block;width:var(--tree-view-width, 100%)}/*!@:host .heading-area-container*/.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{border-bottom:var(--ic-border-default);display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px));padding:0 var(--ic-space-xs)}/*!@:host(.ic-tree-view-small) .heading-area-container*/.ic-tree-view-small.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{height:calc(var(--ic-space-xl) - var(--ic-space-1px))}/*!@:host(.ic-tree-view-large) .heading-area-container*/.ic-tree-view-large.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{height:calc(var(--ic-space-xxl) - var(--ic-space-1px))}/*!@:host(.ic-tree-view-light) .heading-area-container*/.ic-tree-view-light.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{color:var(--ic-architectural-white);fill:var(--ic-architectural-white)}/*!@.icon-container*/.icon-container.sc-ic-tree-view{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}/*!@:host(.ic-tree-view-small) .icon-container*/.ic-tree-view-small.sc-ic-tree-view-h .icon-container.sc-ic-tree-view{margin:0 var(--ic-space-xxs) 0 0}/*!@.ic-text-overflow*/.ic-text-overflow.sc-ic-tree-view{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}/*!@.ic-tooltip-overflow*/.ic-tooltip-overflow.sc-ic-tree-view{overflow:hidden}@media (forced-colors: active){/*!@::slotted([slot=\"icon\"])*/.sc-ic-tree-view-s>[slot=\"icon\"]{fill:currentcolor}}";
|
28493
|
+
|
28494
|
+
let treeViewIds = 0;
|
28495
|
+
/**
|
28496
|
+
* @slot heading - Content is set as the tree view heading.
|
28497
|
+
* @slot icon - Content is placed to the left of the heading.
|
28498
|
+
*/
|
28499
|
+
class TreeView {
|
28500
|
+
constructor(hostRef) {
|
28501
|
+
registerInstance(this, hostRef);
|
28502
|
+
this.treeViewId = `ic-tree-view-${treeViewIds++}`;
|
28503
|
+
this.treeItemTag = "IC-TREE-ITEM";
|
28504
|
+
this.hostMutationObserver = null;
|
28505
|
+
this.handleKeyDown = (event) => {
|
28506
|
+
var _a;
|
28507
|
+
const focussedChild = this.treeItems.indexOf(this.treeItems.filter((el) => el === document.activeElement)[0]);
|
28508
|
+
const expanded = (_a = this.treeItems[focussedChild]) === null || _a === void 0 ? void 0 : _a.expanded;
|
28509
|
+
switch (event.key) {
|
28510
|
+
case "ArrowDown":
|
28511
|
+
this.treeItems[this.getNextItemToSelect(focussedChild, true)].setFocus();
|
28512
|
+
if (focussedChild !== this.treeItems.length - 1) {
|
28513
|
+
event.preventDefault();
|
28514
|
+
}
|
28515
|
+
break;
|
28516
|
+
case "ArrowUp":
|
28517
|
+
this.treeItems[this.getNextItemToSelect(focussedChild, false)].setFocus();
|
28518
|
+
if (focussedChild !== 0) {
|
28519
|
+
event.preventDefault();
|
28520
|
+
}
|
28521
|
+
break;
|
28522
|
+
case "ArrowRight":
|
28523
|
+
if (this.treeItems[focussedChild].isParent && !expanded) {
|
28524
|
+
this.treeItems[focussedChild].expanded = true;
|
28525
|
+
this.treeItems[focussedChild].hasParentExpanded = true;
|
28526
|
+
this.treeItems[focussedChild].updateAriaLabel();
|
28527
|
+
}
|
28528
|
+
else if (this.treeItems[focussedChild].isParent && expanded) {
|
28529
|
+
this.treeItems[focussedChild].children[0].setFocus();
|
28530
|
+
}
|
28531
|
+
event.preventDefault();
|
28532
|
+
break;
|
28533
|
+
case "ArrowLeft":
|
28534
|
+
if (this.treeItems[focussedChild].isParent && expanded) {
|
28535
|
+
this.treeItems[focussedChild].expanded = false;
|
28536
|
+
this.treeItems[focussedChild].hasParentExpanded = false;
|
28537
|
+
this.treeItems[focussedChild].updateAriaLabel();
|
28538
|
+
}
|
28539
|
+
else if (this.treeItems[focussedChild].parentElement.tagName ===
|
28540
|
+
this.treeItemTag) {
|
28541
|
+
this.treeItems[focussedChild].parentElement.setFocus();
|
28542
|
+
}
|
28543
|
+
event.preventDefault();
|
28544
|
+
break;
|
28545
|
+
}
|
28546
|
+
};
|
28547
|
+
this.getNextItemToSelect = (currentItem, movingDown) => {
|
28548
|
+
const numItems = this.treeItems.length - 1;
|
28549
|
+
if (currentItem < 1) {
|
28550
|
+
currentItem = 0;
|
28551
|
+
}
|
28552
|
+
let nextItem = movingDown ? currentItem + 1 : currentItem - 1;
|
28553
|
+
if (nextItem < 0) {
|
28554
|
+
nextItem = 0;
|
28555
|
+
}
|
28556
|
+
else if (nextItem > numItems) {
|
28557
|
+
nextItem = numItems;
|
28558
|
+
}
|
28559
|
+
const maxAttempts = numItems + 1;
|
28560
|
+
let attempts = 0;
|
28561
|
+
while (attempts < maxAttempts) {
|
28562
|
+
if (nextItem < 0 || nextItem > numItems) {
|
28563
|
+
return currentItem;
|
28564
|
+
}
|
28565
|
+
if (!this.treeItems[nextItem].disabled &&
|
28566
|
+
(this.treeItems[nextItem].parentElement.tagName !== this.treeItemTag ||
|
28567
|
+
this.treeItems[nextItem].parentElement
|
28568
|
+
.expanded)) {
|
28569
|
+
return nextItem;
|
28570
|
+
}
|
28571
|
+
if (nextItem === numItems && this.treeItems[nextItem].disabled) {
|
28572
|
+
return currentItem;
|
28573
|
+
}
|
28574
|
+
nextItem = movingDown ? nextItem + 1 : nextItem - 1;
|
28575
|
+
attempts++;
|
28576
|
+
}
|
28577
|
+
return currentItem;
|
28578
|
+
};
|
28579
|
+
this.linkTreeItems = () => {
|
28580
|
+
this.treeItems.forEach((treeItem) => {
|
28581
|
+
treeItem.setAttribute("context-id", this.treeViewId);
|
28582
|
+
});
|
28583
|
+
};
|
28584
|
+
this.setTreeItems = () => {
|
28585
|
+
this.treeItems = this.getAllTreeItems(this.el);
|
28586
|
+
this.linkTreeItems();
|
28587
|
+
};
|
28588
|
+
this.addSlotChangeListener = () => {
|
28589
|
+
this.el.addEventListener("slotchange", this.setTreeItems);
|
28590
|
+
};
|
28591
|
+
this.truncateTreeViewHeading = () => {
|
28592
|
+
const typographyEl = this.el.shadowRoot.querySelector(".tree-view-header");
|
28593
|
+
const tooltip = typographyEl.closest("ic-tooltip");
|
28594
|
+
const headingContainer = this.el.shadowRoot.querySelector(".heading-area-container");
|
28595
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (headingContainer === null || headingContainer === void 0 ? void 0 : headingContainer.clientHeight)) {
|
28596
|
+
typographyEl.classList.add("ic-text-overflow");
|
28597
|
+
if (!tooltip) {
|
28598
|
+
const tooltipEl = document.createElement("ic-tooltip");
|
28599
|
+
tooltipEl.setAttribute("target", this.el.id);
|
28600
|
+
tooltipEl.setAttribute("label", typographyEl.textContent);
|
28601
|
+
tooltipEl.classList.add("ic-tooltip-overflow");
|
28602
|
+
tooltipEl.setAttribute("placement", "right");
|
28603
|
+
headingContainer.appendChild(tooltipEl);
|
28604
|
+
tooltipEl.appendChild(typographyEl);
|
28605
|
+
}
|
28606
|
+
}
|
28607
|
+
};
|
28608
|
+
this.hostMutationCallback = (mutationList) => {
|
28609
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
28610
|
+
? checkSlotInChildMutations(addedNodes, removedNodes, "icon")
|
28611
|
+
: false)) ;
|
28612
|
+
};
|
28613
|
+
this.isHeadingDefined = () => isPropDefined(this.heading) && this.heading !== null;
|
28614
|
+
this.hasHeadingAreaContent = () => {
|
28615
|
+
return (isSlotUsed(this.el, "heading") ||
|
28616
|
+
this.isHeadingDefined() ||
|
28617
|
+
isSlotUsed(this.el, "icon"));
|
28618
|
+
};
|
28619
|
+
this.treeItems = undefined;
|
28620
|
+
this.appearance = "dark";
|
28621
|
+
this.heading = "";
|
28622
|
+
this.size = "default";
|
28623
|
+
}
|
28624
|
+
watchAppearanceHandler() {
|
28625
|
+
this.treeItems.forEach((treeItem) => {
|
28626
|
+
treeItem.appearance = this.appearance;
|
28627
|
+
});
|
28628
|
+
}
|
28629
|
+
watchSizeHandler() {
|
28630
|
+
this.treeItems.forEach((treeItem) => {
|
28631
|
+
treeItem.size = this.size;
|
28632
|
+
});
|
28633
|
+
}
|
28634
|
+
disconnectedCallback() {
|
28635
|
+
var _a, _b;
|
28636
|
+
(_a = this.el) === null || _a === void 0 ? void 0 : _a.removeEventListener("slotchange", this.setTreeItems);
|
28637
|
+
(_b = this.hostMutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
28638
|
+
}
|
28639
|
+
componentDidLoad() {
|
28640
|
+
this.setTreeItems();
|
28641
|
+
this.watchAppearanceHandler();
|
28642
|
+
this.watchSizeHandler();
|
28643
|
+
setTimeout(() => {
|
28644
|
+
this.truncateTreeViewHeading();
|
28645
|
+
}, 100);
|
28646
|
+
this.addSlotChangeListener();
|
28647
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
28648
|
+
this.hostMutationObserver.observe(this.el, {
|
28649
|
+
childList: true,
|
28650
|
+
});
|
28651
|
+
}
|
28652
|
+
handleTreeItemSelected(event) {
|
28653
|
+
this.treeItems.forEach((treeItem) => {
|
28654
|
+
if (treeItem.selected && treeItem.id !== event.detail.id) {
|
28655
|
+
treeItem.selected = false;
|
28656
|
+
}
|
28657
|
+
});
|
28658
|
+
}
|
28659
|
+
getAllTreeItems(element) {
|
28660
|
+
const treeItems = [];
|
28661
|
+
const collectTreeItems = (el) => {
|
28662
|
+
Array.from(el.children).forEach((child) => {
|
28663
|
+
if (child.tagName === this.treeItemTag) {
|
28664
|
+
treeItems.push(child);
|
28665
|
+
}
|
28666
|
+
collectTreeItems(child);
|
28667
|
+
});
|
28668
|
+
};
|
28669
|
+
collectTreeItems(element);
|
28670
|
+
return treeItems;
|
28671
|
+
}
|
28672
|
+
render() {
|
28673
|
+
const { appearance, heading, size } = this;
|
28674
|
+
return (hAsync(Host, { "context-id": this.treeViewId, class: {
|
28675
|
+
[`ic-tree-view-${appearance}`]: true,
|
28676
|
+
[`ic-tree-view-${size}`]: size !== "default",
|
28677
|
+
}, onKeyDown: this.handleKeyDown, "aria-label": this.isHeadingDefined() ? heading : null }, this.hasHeadingAreaContent() && (hAsync("div", { class: "heading-area-container" }, isSlotUsed(this.el, "icon") && (hAsync("div", { class: "icon-container" }, hAsync("slot", { name: "icon" }))), hAsync("ic-typography", { variant: "subtitle-large", class: "tree-view-header" }, isSlotUsed(this.el, "heading") ? (hAsync("slot", { name: "heading" })) : (heading)))), hAsync("slot", null)));
|
28678
|
+
}
|
28679
|
+
get el() { return getElement(this); }
|
28680
|
+
static get watchers() { return {
|
28681
|
+
"appearance": ["watchAppearanceHandler"],
|
28682
|
+
"size": ["watchSizeHandler"]
|
28683
|
+
}; }
|
28684
|
+
static get style() { return icTreeViewCss; }
|
28685
|
+
static get cmpMeta() { return {
|
28686
|
+
"$flags$": 9,
|
28687
|
+
"$tagName$": "ic-tree-view",
|
28688
|
+
"$members$": {
|
28689
|
+
"appearance": [1],
|
28690
|
+
"heading": [1],
|
28691
|
+
"size": [1],
|
28692
|
+
"treeItems": [32]
|
28693
|
+
},
|
28694
|
+
"$listeners$": [[0, "icTreeItemSelected", "handleTreeItemSelected"]],
|
28695
|
+
"$lazyBundleId$": "-",
|
28696
|
+
"$attrsToReflect$": []
|
28697
|
+
}; }
|
28698
|
+
}
|
28699
|
+
|
28700
|
+
const icTypographyCss = "/*!@html*/html.sc-ic-typography{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-typography{margin:0}/*!@main*/main.sc-ic-typography{display:block}/*!@h1*/h1.sc-ic-typography{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-typography{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-typography{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-typography{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-typography,strong.sc-ic-typography{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-typography,kbd.sc-ic-typography,samp.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-typography{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-typography,sup.sc-ic-typography{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-typography{bottom:-0.25em}/*!@sup*/sup.sc-ic-typography{top:-0.5em}/*!@img*/img.sc-ic-typography{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-typography,input.sc-ic-typography,optgroup.sc-ic-typography,select.sc-ic-typography,textarea.sc-ic-typography{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-typography,input.sc-ic-typography{overflow:visible}/*!@button,\nselect*/button.sc-ic-typography,select.sc-ic-typography{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-typography,[type=\"button\"].sc-ic-typography,[type=\"reset\"].sc-ic-typography,[type=\"submit\"].sc-ic-typography{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-typography::-moz-focus-inner,[type=\"button\"].sc-ic-typography::-moz-focus-inner,[type=\"reset\"].sc-ic-typography::-moz-focus-inner,[type=\"submit\"].sc-ic-typography::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-typography:-moz-focusring,[type=\"button\"].sc-ic-typography:-moz-focusring,[type=\"reset\"].sc-ic-typography:-moz-focusring,[type=\"submit\"].sc-ic-typography:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-typography{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-typography{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-typography{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-typography{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-typography,[type=\"radio\"].sc-ic-typography{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-typography::-webkit-inner-spin-button,[type=\"number\"].sc-ic-typography::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-typography{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-typography::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-typography::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-typography{display:block}/*!@summary*/summary.sc-ic-typography{display:list-item}/*!@template*/template.sc-ic-typography{display:none}/*!@[hidden]*/[hidden].sc-ic-typography{display:none}/*!@html,\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*/html.sc-ic-typography,body.sc-ic-typography,div.sc-ic-typography,span.sc-ic-typography,applet.sc-ic-typography,object.sc-ic-typography,iframe.sc-ic-typography,h1.sc-ic-typography,h2.sc-ic-typography,h3.sc-ic-typography,h4.sc-ic-typography,h5.sc-ic-typography,h6.sc-ic-typography,p.sc-ic-typography,blockquote.sc-ic-typography,pre.sc-ic-typography,a.sc-ic-typography,abbr.sc-ic-typography,acronym.sc-ic-typography,address.sc-ic-typography,big.sc-ic-typography,cite.sc-ic-typography,code.sc-ic-typography,del.sc-ic-typography,dfn.sc-ic-typography,em.sc-ic-typography,img.sc-ic-typography,ins.sc-ic-typography,kbd.sc-ic-typography,q.sc-ic-typography,s.sc-ic-typography,samp.sc-ic-typography,small.sc-ic-typography,strike.sc-ic-typography,strong.sc-ic-typography,sub.sc-ic-typography,sup.sc-ic-typography,tt.sc-ic-typography,var.sc-ic-typography,b.sc-ic-typography,u.sc-ic-typography,i.sc-ic-typography,center.sc-ic-typography,dl.sc-ic-typography,dt.sc-ic-typography,dd.sc-ic-typography,ol.sc-ic-typography,ul.sc-ic-typography,li.sc-ic-typography,fieldset.sc-ic-typography,form.sc-ic-typography,label.sc-ic-typography,legend.sc-ic-typography,table.sc-ic-typography,caption.sc-ic-typography,tbody.sc-ic-typography,tfoot.sc-ic-typography,thead.sc-ic-typography,tr.sc-ic-typography,th.sc-ic-typography,td.sc-ic-typography,article.sc-ic-typography,aside.sc-ic-typography,canvas.sc-ic-typography,details.sc-ic-typography,embed.sc-ic-typography,figure.sc-ic-typography,figcaption.sc-ic-typography,footer.sc-ic-typography,header.sc-ic-typography,hgroup.sc-ic-typography,menu.sc-ic-typography,nav.sc-ic-typography,output.sc-ic-typography,ruby.sc-ic-typography,section.sc-ic-typography,summary.sc-ic-typography,time.sc-ic-typography,mark.sc-ic-typography,audio.sc-ic-typography,video.sc-ic-typography{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-typography-h{display:block;position:relative}/*!@:host(.ic-typography-vertical-margins-h1)*/.ic-typography-vertical-margins-h1.sc-ic-typography-h{margin:0 0 var(--ic-space-xl)}/*!@:host(.ic-typography-vertical-margins-h2)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h{margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}/*!@:host(.ic-typography-vertical-margins-h3)*/.ic-typography-vertical-margins-h3.sc-ic-typography-h{margin:var(--ic-space-xl) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-h4)*/.ic-typography-vertical-margins-h4.sc-ic-typography-h{margin:var(--ic-space-lg) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small)*/.ic-typography-vertical-margins-subtitle-large.sc-ic-typography-h,.ic-typography-vertical-margins-subtitle-small.sc-ic-typography-h,.ic-typography-vertical-margins-body.sc-ic-typography-h,.ic-typography-vertical-margins-code-large.sc-ic-typography-h,.ic-typography-vertical-margins-code-small.sc-ic-typography-h,.ic-typography-vertical-margins-code-extra-small.sc-ic-typography-h{margin:0 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase)*/.ic-typography-vertical-margins-caption.sc-ic-typography-h,.ic-typography-vertical-margins-caption-uppercase.sc-ic-typography-h{margin:0 0 var(--ic-space-xs)}/*!@:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h3.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h4.sc-ic-typography-h:first-child{margin-top:0}/*!@:host(.ic-typography-h1)*/.ic-typography-h1.sc-ic-typography-h{font:var(--ic-font-h1) !important}/*!@:host(.ic-typography-h2)*/.ic-typography-h2.sc-ic-typography-h{font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-h3)*/.ic-typography-h3.sc-ic-typography-h{font:var(--ic-font-h3)}/*!@:host(.ic-typography-h4)*/.ic-typography-h4.sc-ic-typography-h{font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-large)*/.ic-typography-subtitle-large.sc-ic-typography-h{font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-small)*/.ic-typography-subtitle-small.sc-ic-typography-h{font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-body)*/.ic-typography-body.sc-ic-typography-h{font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-caption)*/.ic-typography-caption.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-caption-uppercase)*/.ic-typography-caption-uppercase.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}/*!@:host(.ic-typography-label)*/.ic-typography-label.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-label-uppercase)*/.ic-typography-label-uppercase.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}/*!@:host(.ic-typography-code-large)*/.ic-typography-code-large.sc-ic-typography-h{font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-code-small)*/.ic-typography-code-small.sc-ic-typography-h{font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-code-extra-small)*/.ic-typography-code-extra-small.sc-ic-typography-h{font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-badge)*/.ic-typography-badge.sc-ic-typography-h{font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-badge-small)*/.ic-typography-badge-small.sc-ic-typography-h{font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-no-wrap)*/.ic-typography-no-wrap.sc-ic-typography-h{white-space:nowrap}/*!@:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label)*/.sc-ic-typography-h .sc-ic-typography-s>h1,.sc-ic-typography-h.sc-ic-typography-s>h2,.sc-ic-typography-h .sc-ic-typography-s>h2,.sc-ic-typography-h.sc-ic-typography-s>h3,.sc-ic-typography-h .sc-ic-typography-s>h3,.sc-ic-typography-h.sc-ic-typography-s>h4,.sc-ic-typography-h .sc-ic-typography-s>h4,.sc-ic-typography-h.sc-ic-typography-s>h5,.sc-ic-typography-h .sc-ic-typography-s>h5,.sc-ic-typography-h.sc-ic-typography-s>h6,.sc-ic-typography-h .sc-ic-typography-s>h6,.sc-ic-typography-h.sc-ic-typography-s>p,.sc-ic-typography-h .sc-ic-typography-s>p,.sc-ic-typography-h.sc-ic-typography-s>label,.sc-ic-typography-h .sc-ic-typography-s>label{font:inherit;letter-spacing:inherit}/*!@.trunc-wrapper*/.trunc-wrapper.sc-ic-typography{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden;padding-right:var(--ellipsis-padding-right, 0)}/*!@.trunc-btn*/.trunc-btn.sc-ic-typography{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}/*!@.trunc-btn:hover,\n.trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}/*!@:host(.strikethrough)*/.strikethrough.sc-ic-typography-h{text-decoration:line-through}/*!@:host(.underline)*/.underline.sc-ic-typography-h{text-decoration:underline}/*!@:host(.underline.strikethrough)*/.underline.strikethrough.sc-ic-typography-h{text-decoration:line-through underline}/*!@:host(.italic)*/.italic.sc-ic-typography-h{font-style:italic !important}/*!@:host(.bold)*/.bold.sc-ic-typography-h{font-weight:var(--ic-font-weight-bold)}/*!@:host(.in-ag-grid),\n:host(.in-ag-grid) ::slotted(*)*/.in-ag-grid.sc-ic-typography-h,.sc-ic-typography-h.in-ag-grid.sc-ic-typography-s>*,.sc-ic-typography-h.in-ag-grid .sc-ic-typography-s>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@supports (text-underline-offset: 25%){/*!@.trunc-btn:hover,\n .trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
|
27443
28701
|
|
27444
28702
|
class Typography {
|
27445
28703
|
constructor(hostRef) {
|
27446
28704
|
registerInstance(this, hostRef);
|
28705
|
+
this.typographyTruncationExpandToggle = createEvent(this, "typographyTruncationExpandToggle", 7);
|
27447
28706
|
this.focusBtnFromKeyboard = true;
|
28707
|
+
this.inAGGrid = false;
|
27448
28708
|
this.lastMarkerTop = 0;
|
27449
28709
|
this.lastWidth = 0;
|
27450
28710
|
this.resizeObserver = null;
|
27451
28711
|
this.truncatedHeight = 0;
|
27452
|
-
this.toggleExpanded = () => {
|
28712
|
+
this.toggleExpanded = (ev) => {
|
28713
|
+
ev.stopPropagation();
|
27453
28714
|
this.expanded = !this.expanded;
|
27454
|
-
|
27455
|
-
|
27456
|
-
|
27457
|
-
|
27458
|
-
if (numLines > this.maxLines) {
|
27459
|
-
this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
|
27460
|
-
this.truncatedHeight = this.el.clientHeight;
|
27461
|
-
this.truncated = true;
|
27462
|
-
}
|
28715
|
+
this.typographyTruncationExpandToggle.emit({
|
28716
|
+
expanded: this.expanded,
|
28717
|
+
typographyEl: this.el,
|
28718
|
+
});
|
27463
28719
|
};
|
27464
28720
|
this.checkMarkerPosition = (elTop, markerTop) => {
|
27465
28721
|
if (markerTop - elTop < this.truncatedHeight) {
|
@@ -27527,6 +28783,18 @@ class Typography {
|
|
27527
28783
|
this.resizeObserver.disconnect();
|
27528
28784
|
}
|
27529
28785
|
}
|
28786
|
+
/**
|
28787
|
+
* @internal This is used by data table to remove all truncation in certain events
|
28788
|
+
*/
|
28789
|
+
async resetTruncation() {
|
28790
|
+
if (this.truncated) {
|
28791
|
+
this.truncated = false;
|
28792
|
+
this.maxLines = 0;
|
28793
|
+
this.el.removeAttribute("max-lines");
|
28794
|
+
this.expanded = false;
|
28795
|
+
this.el.removeAttribute("style");
|
28796
|
+
}
|
28797
|
+
}
|
27530
28798
|
componentDidLoad() {
|
27531
28799
|
var _a, _b;
|
27532
28800
|
if ((this.variant === "body" ||
|
@@ -27542,6 +28810,30 @@ class Typography {
|
|
27542
28810
|
checkResizeObserver$1(this.runResizeObserver);
|
27543
28811
|
}
|
27544
28812
|
}
|
28813
|
+
componentWillRender() {
|
28814
|
+
if (isElInAGGrid(this.el)) {
|
28815
|
+
this.inAGGrid = true;
|
28816
|
+
}
|
28817
|
+
}
|
28818
|
+
/**
|
28819
|
+
* @internal This checks if the number of lines of text exceeds the maxLines prop. If so, set the line clamp CSS to the max lines
|
28820
|
+
* @param height - text container height
|
28821
|
+
*/
|
28822
|
+
async checkMaxLines(height) {
|
28823
|
+
//24 is the height of a single line
|
28824
|
+
const numLines = Math.floor(height / 24);
|
28825
|
+
if (numLines > this.maxLines) {
|
28826
|
+
this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
|
28827
|
+
this.truncatedHeight = this.el.clientHeight;
|
28828
|
+
this.truncated = true;
|
28829
|
+
}
|
28830
|
+
}
|
28831
|
+
/**
|
28832
|
+
* @internal This method makes it possible to set the expanded status of truncated text outside of ic-typography component
|
28833
|
+
*/
|
28834
|
+
async setShowHideExpanded(expanded) {
|
28835
|
+
this.expanded = expanded;
|
28836
|
+
}
|
27545
28837
|
render() {
|
27546
28838
|
var _a, _b;
|
27547
28839
|
const { variant, applyVerticalMargins, maxLines, truncated, expanded, strikethrough, underline, italic, bold, } = this;
|
@@ -27552,6 +28844,7 @@ class Typography {
|
|
27552
28844
|
["italic"]: italic,
|
27553
28845
|
["strikethrough"]: strikethrough,
|
27554
28846
|
["underline"]: underline,
|
28847
|
+
["in-ag-grid"]: this.inAGGrid,
|
27555
28848
|
} }, (variant === "body" ||
|
27556
28849
|
((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===
|
27557
28850
|
"IC-TOOLTIP") &&
|
@@ -27569,13 +28862,16 @@ class Typography {
|
|
27569
28862
|
"applyVerticalMargins": [4, "apply-vertical-margins"],
|
27570
28863
|
"bold": [4],
|
27571
28864
|
"italic": [4],
|
27572
|
-
"maxLines": [
|
28865
|
+
"maxLines": [1026, "max-lines"],
|
27573
28866
|
"strikethrough": [4],
|
27574
28867
|
"underline": [4],
|
27575
28868
|
"variant": [1],
|
27576
28869
|
"truncated": [32],
|
27577
28870
|
"truncButtonFocussed": [32],
|
27578
|
-
"expanded": [32]
|
28871
|
+
"expanded": [32],
|
28872
|
+
"resetTruncation": [64],
|
28873
|
+
"checkMaxLines": [64],
|
28874
|
+
"setShowHideExpanded": [64]
|
27579
28875
|
},
|
27580
28876
|
"$listeners$": undefined,
|
27581
28877
|
"$lazyBundleId$": "-",
|
@@ -27592,6 +28888,7 @@ registerComponents([
|
|
27592
28888
|
Breadcrumb,
|
27593
28889
|
BreadcrumbGroup,
|
27594
28890
|
Button,
|
28891
|
+
Card$1,
|
27595
28892
|
Card,
|
27596
28893
|
Checkbox,
|
27597
28894
|
CheckboxGroup,
|
@@ -27654,6 +28951,8 @@ registerComponents([
|
|
27654
28951
|
ToggleButtonGroup,
|
27655
28952
|
Tooltip,
|
27656
28953
|
TopNavigation,
|
28954
|
+
TreeItem,
|
28955
|
+
TreeView,
|
27657
28956
|
Typography,
|
27658
28957
|
]);
|
27659
28958
|
|