@ukic/canary-web-components 2.0.0-canary.14 → 2.0.0-canary.15
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-6d736902.js → helpers-191dca49.js} +54 -98
- package/dist/cjs/helpers-191dca49.js.map +1 -0
- package/dist/cjs/{helpers-f75cf7cf.js → helpers-765a5118.js} +30 -1
- package/dist/cjs/helpers-765a5118.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +3 -1
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +15 -9
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +55 -77
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +3 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +23 -16
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +32 -30
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +21 -31
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-data-table.cjs.entry.js +154 -31
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +322 -0
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +176 -35
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +3 -3
- package/dist/cjs/ic-menu.cjs.entry.js.map +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 +10 -6
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +3 -2
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +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 +13 -15
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-4cf27b16.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ic-data-table/ic-data-table.css +76 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +368 -43
- 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 +258 -0
- 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 +320 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +91 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
- package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
- package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
- package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js +176 -35
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +180 -3
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +145 -116
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +47 -10
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +53 -96
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +28 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion-group.js +2 -1
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-back-to-top.js +22 -9
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +59 -77
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +2 -0
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +26 -16
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +32 -30
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +21 -31
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-table-title-bar.d.ts +11 -0
- package/dist/components/ic-data-table-title-bar.js +136 -0
- package/dist/components/ic-data-table-title-bar.js.map +1 -0
- package/dist/components/ic-data-table.js +179 -37
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +1 -1
- package/dist/components/ic-date-picker.js +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state.js +1 -57
- package/dist/components/ic-empty-state.js.map +1 -1
- package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +38 -11
- package/dist/components/ic-empty-state2.js.map +1 -0
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +2 -2
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +2 -2
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +177 -36
- package/dist/components/ic-menu3.js.map +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-pagination-bar2.js +126 -99
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +3 -2
- package/dist/components/ic-popover-menu.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 -1
- package/dist/components/ic-select2.js +8 -4
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-theme.js +13 -15
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-tooltip2.js +1 -1
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-typography2.js +1 -1
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-a8c15117.entry.js → p-005e83b0.entry.js} +2 -2
- package/dist/core/{p-c621d6b0.entry.js → p-05df3901.entry.js} +2 -2
- package/dist/core/{p-a2dc10d8.entry.js → p-0646ef0c.entry.js} +2 -2
- package/dist/core/p-0ec09955.entry.js +2 -0
- package/dist/core/p-0ec09955.entry.js.map +1 -0
- package/dist/core/{p-3dcc61cc.entry.js → p-114bea92.entry.js} +2 -2
- package/dist/core/{p-3dcc61cc.entry.js.map → p-114bea92.entry.js.map} +1 -1
- package/dist/core/p-11bbb09c.js +2 -0
- package/dist/core/p-11bbb09c.js.map +1 -0
- package/dist/core/p-11e736a3.entry.js +2 -0
- package/dist/core/p-11e736a3.entry.js.map +1 -0
- package/dist/core/{p-6dce8e88.entry.js → p-16c82b13.entry.js} +2 -2
- package/dist/core/p-1b35b6af.entry.js +2 -0
- package/dist/core/{p-dc5e1f8f.entry.js.map → p-1b35b6af.entry.js.map} +1 -1
- package/dist/core/p-1cf8a04e.entry.js +2 -0
- package/dist/core/p-1cf8a04e.entry.js.map +1 -0
- package/dist/core/{p-849f43c3.entry.js → p-2170f59e.entry.js} +2 -2
- package/dist/core/{p-00c5639e.entry.js → p-2e167ebb.entry.js} +2 -2
- package/dist/core/p-2e167ebb.entry.js.map +1 -0
- package/dist/core/p-3f20608d.entry.js +2 -0
- package/dist/core/p-3f20608d.entry.js.map +1 -0
- package/dist/core/p-41606de1.entry.js +2 -0
- package/dist/core/p-41606de1.entry.js.map +1 -0
- package/dist/core/{p-d2d63a61.entry.js → p-4415c93f.entry.js} +2 -2
- package/dist/core/{p-730f058b.entry.js → p-457dd939.entry.js} +2 -2
- package/dist/core/p-457dd939.entry.js.map +1 -0
- package/dist/core/{p-e1963c78.entry.js → p-4737844f.entry.js} +2 -2
- package/dist/core/{p-9d8883d7.entry.js → p-53374a27.entry.js} +2 -2
- package/dist/core/p-53e45d51.entry.js +2 -0
- package/dist/core/{p-3e9a8977.entry.js.map → p-53e45d51.entry.js.map} +1 -1
- package/dist/core/{p-1a91e842.entry.js → p-593f0318.entry.js} +2 -2
- package/dist/core/{p-aabab75f.entry.js → p-5d5979fa.entry.js} +2 -2
- package/dist/core/{p-db3a35fb.entry.js → p-66af5958.entry.js} +2 -2
- package/dist/core/p-67b0faac.entry.js +2 -0
- package/dist/core/p-67b0faac.entry.js.map +1 -0
- package/dist/core/{p-7f53d1be.entry.js → p-6b277e09.entry.js} +2 -2
- package/dist/core/{p-7f53d1be.entry.js.map → p-6b277e09.entry.js.map} +1 -1
- package/dist/core/{p-9567c117.entry.js → p-72cea8fd.entry.js} +2 -2
- package/dist/core/p-73dad5cf.entry.js +2 -0
- package/dist/core/{p-06c27edb.entry.js.map → p-73dad5cf.entry.js.map} +1 -1
- package/dist/core/{p-e16f73ba.entry.js → p-85e2a9af.entry.js} +2 -2
- package/dist/core/p-85e2a9af.entry.js.map +1 -0
- package/dist/core/{p-957de939.entry.js → p-872c3555.entry.js} +2 -2
- package/dist/core/p-87743c4a.entry.js +2 -0
- package/dist/core/{p-e8151d13.entry.js.map → p-87743c4a.entry.js.map} +1 -1
- package/dist/core/p-8cfc74da.entry.js +2 -0
- package/dist/core/{p-162f3e36.entry.js.map → p-8cfc74da.entry.js.map} +1 -1
- package/dist/core/{p-7fda2f94.entry.js → p-9729086f.entry.js} +2 -2
- package/dist/core/{p-8b1f9648.entry.js → p-9cc19e91.entry.js} +2 -2
- package/dist/core/{p-9528b29e.entry.js → p-9de20265.entry.js} +2 -2
- package/dist/core/{p-843bdaae.entry.js → p-a088373e.entry.js} +2 -2
- package/dist/core/p-a088373e.entry.js.map +1 -0
- package/dist/core/{p-00bd7919.entry.js → p-a0e42564.entry.js} +2 -2
- package/dist/core/p-a8110c27.entry.js +2 -0
- package/dist/core/p-a8110c27.entry.js.map +1 -0
- package/dist/core/{p-946625a3.entry.js → p-a9d07792.entry.js} +2 -2
- package/dist/core/p-a9d07792.entry.js.map +1 -0
- package/dist/core/{p-a05755b1.entry.js → p-b08f4371.entry.js} +2 -2
- package/dist/core/{p-0af27517.entry.js → p-b79c0631.entry.js} +2 -2
- package/dist/core/{p-4bd13376.entry.js → p-b8247636.entry.js} +2 -2
- package/dist/core/{p-fca46bd9.entry.js → p-badfdf2a.entry.js} +2 -2
- package/dist/core/{p-99bf38e3.entry.js → p-be56fa17.entry.js} +2 -2
- package/dist/core/{p-ff6f1e3a.entry.js → p-bebf535f.entry.js} +2 -2
- package/dist/core/p-c07cef0e.js +2 -0
- package/dist/core/p-c07cef0e.js.map +1 -0
- package/dist/core/{p-494c3cbe.entry.js → p-c0d88af8.entry.js} +2 -2
- package/dist/core/{p-4ad3012a.entry.js → p-c3af5dab.entry.js} +2 -2
- package/dist/core/{p-4fd58768.entry.js → p-c3dabce4.entry.js} +2 -2
- package/dist/core/{p-6eb58b0a.entry.js → p-c7e932b5.entry.js} +2 -2
- package/dist/core/{p-c14a897d.entry.js → p-d09aaa5b.entry.js} +2 -2
- package/dist/core/{p-41b682dc.entry.js → p-d59a72a9.entry.js} +2 -2
- package/dist/core/p-d59a72a9.entry.js.map +1 -0
- package/dist/core/{p-8b820365.entry.js → p-d71e9cb5.entry.js} +2 -2
- package/dist/core/{p-cca482e2.entry.js → p-ecd6d123.entry.js} +2 -2
- package/dist/core/p-ecd6d123.entry.js.map +1 -0
- package/dist/core/p-ee52a11a.entry.js +2 -0
- package/dist/core/p-ee52a11a.entry.js.map +1 -0
- package/dist/core/p-f11597df.entry.js +2 -0
- package/dist/core/p-f11597df.entry.js.map +1 -0
- package/dist/core/p-f1f3acd2.entry.js +2 -0
- package/dist/core/p-f1f3acd2.entry.js.map +1 -0
- package/dist/core/{p-19c1e271.entry.js → p-f659e5eb.entry.js} +2 -2
- package/dist/core/{p-f8f36680.entry.js → p-fc2551c0.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-f328a7b6.js → helpers-8df79303.js} +29 -2
- package/dist/esm/helpers-8df79303.js.map +1 -0
- package/dist/esm/{helpers-c34e4042.js → helpers-da05c476.js} +54 -97
- package/dist/esm/helpers-da05c476.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +3 -1
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +15 -9
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +55 -77
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +3 -1
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +2 -2
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +23 -16
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +32 -30
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +21 -31
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
- package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
- package/dist/esm/ic-data-table.entry.js +155 -32
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +317 -0
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +2 -2
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +176 -35
- package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
- package/dist/esm/ic-menu.entry.js +3 -3
- package/dist/esm/ic-menu.entry.js.map +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 +10 -6
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +3 -2
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +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 +13 -15
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-93509377.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +79 -3
- 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 +59 -0
- package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
- package/dist/types/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +10 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +24 -14
- package/dist/types/components.d.ts +207 -28
- package/dist/types/utils/types.d.ts +5 -5
- package/hydrate/index.js +1253 -909
- package/package.json +3 -3
- package/dist/cjs/helpers-6d736902.js.map +0 -1
- package/dist/cjs/helpers-f75cf7cf.js.map +0 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
- package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -269
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
- package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
- package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
- package/dist/core/p-00c5639e.entry.js.map +0 -1
- package/dist/core/p-06c27edb.entry.js +0 -2
- package/dist/core/p-162f3e36.entry.js +0 -2
- package/dist/core/p-1c3bd46d.entry.js +0 -2
- package/dist/core/p-1c3bd46d.entry.js.map +0 -1
- package/dist/core/p-2c9d6334.entry.js +0 -2
- package/dist/core/p-2c9d6334.entry.js.map +0 -1
- package/dist/core/p-3e9a8977.entry.js +0 -2
- package/dist/core/p-41b682dc.entry.js.map +0 -1
- package/dist/core/p-730f058b.entry.js.map +0 -1
- package/dist/core/p-843bdaae.entry.js.map +0 -1
- package/dist/core/p-946625a3.entry.js.map +0 -1
- package/dist/core/p-9e3178e8.entry.js +0 -2
- package/dist/core/p-9e3178e8.entry.js.map +0 -1
- package/dist/core/p-a1556d97.entry.js +0 -2
- package/dist/core/p-a1556d97.entry.js.map +0 -1
- package/dist/core/p-c7590421.entry.js +0 -2
- package/dist/core/p-c7590421.entry.js.map +0 -1
- package/dist/core/p-c953edb9.entry.js +0 -2
- package/dist/core/p-c953edb9.entry.js.map +0 -1
- package/dist/core/p-cca482e2.entry.js.map +0 -1
- package/dist/core/p-cd799087.js +0 -2
- package/dist/core/p-cd799087.js.map +0 -1
- package/dist/core/p-d32d331b.entry.js +0 -2
- package/dist/core/p-d32d331b.entry.js.map +0 -1
- package/dist/core/p-dc5e1f8f.entry.js +0 -2
- package/dist/core/p-e16f73ba.entry.js.map +0 -1
- package/dist/core/p-e189f1d0.entry.js +0 -2
- package/dist/core/p-e189f1d0.entry.js.map +0 -1
- package/dist/core/p-e8151d13.entry.js +0 -2
- package/dist/core/p-ee765ad5.js +0 -2
- package/dist/core/p-ee765ad5.js.map +0 -1
- package/dist/core/p-f2147136.entry.js +0 -2
- package/dist/core/p-f2147136.entry.js.map +0 -1
- package/dist/core/p-ff3a01f3.entry.js +0 -2
- package/dist/core/p-ff3a01f3.entry.js.map +0 -1
- package/dist/esm/helpers-c34e4042.js.map +0 -1
- package/dist/esm/helpers-f328a7b6.js.map +0 -1
- package/dist/esm/ic-empty-state.entry.js.map +0 -1
- package/dist/esm/ic-pagination-bar.entry.js +0 -265
- package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
- package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
- /package/dist/core/{p-a8c15117.entry.js.map → p-005e83b0.entry.js.map} +0 -0
- /package/dist/core/{p-c621d6b0.entry.js.map → p-05df3901.entry.js.map} +0 -0
- /package/dist/core/{p-a2dc10d8.entry.js.map → p-0646ef0c.entry.js.map} +0 -0
- /package/dist/core/{p-6dce8e88.entry.js.map → p-16c82b13.entry.js.map} +0 -0
- /package/dist/core/{p-849f43c3.entry.js.map → p-2170f59e.entry.js.map} +0 -0
- /package/dist/core/{p-d2d63a61.entry.js.map → p-4415c93f.entry.js.map} +0 -0
- /package/dist/core/{p-e1963c78.entry.js.map → p-4737844f.entry.js.map} +0 -0
- /package/dist/core/{p-9d8883d7.entry.js.map → p-53374a27.entry.js.map} +0 -0
- /package/dist/core/{p-1a91e842.entry.js.map → p-593f0318.entry.js.map} +0 -0
- /package/dist/core/{p-aabab75f.entry.js.map → p-5d5979fa.entry.js.map} +0 -0
- /package/dist/core/{p-db3a35fb.entry.js.map → p-66af5958.entry.js.map} +0 -0
- /package/dist/core/{p-9567c117.entry.js.map → p-72cea8fd.entry.js.map} +0 -0
- /package/dist/core/{p-957de939.entry.js.map → p-872c3555.entry.js.map} +0 -0
- /package/dist/core/{p-7fda2f94.entry.js.map → p-9729086f.entry.js.map} +0 -0
- /package/dist/core/{p-8b1f9648.entry.js.map → p-9cc19e91.entry.js.map} +0 -0
- /package/dist/core/{p-9528b29e.entry.js.map → p-9de20265.entry.js.map} +0 -0
- /package/dist/core/{p-00bd7919.entry.js.map → p-a0e42564.entry.js.map} +0 -0
- /package/dist/core/{p-a05755b1.entry.js.map → p-b08f4371.entry.js.map} +0 -0
- /package/dist/core/{p-0af27517.entry.js.map → p-b79c0631.entry.js.map} +0 -0
- /package/dist/core/{p-4bd13376.entry.js.map → p-b8247636.entry.js.map} +0 -0
- /package/dist/core/{p-fca46bd9.entry.js.map → p-badfdf2a.entry.js.map} +0 -0
- /package/dist/core/{p-99bf38e3.entry.js.map → p-be56fa17.entry.js.map} +0 -0
- /package/dist/core/{p-ff6f1e3a.entry.js.map → p-bebf535f.entry.js.map} +0 -0
- /package/dist/core/{p-494c3cbe.entry.js.map → p-c0d88af8.entry.js.map} +0 -0
- /package/dist/core/{p-4ad3012a.entry.js.map → p-c3af5dab.entry.js.map} +0 -0
- /package/dist/core/{p-4fd58768.entry.js.map → p-c3dabce4.entry.js.map} +0 -0
- /package/dist/core/{p-6eb58b0a.entry.js.map → p-c7e932b5.entry.js.map} +0 -0
- /package/dist/core/{p-c14a897d.entry.js.map → p-d09aaa5b.entry.js.map} +0 -0
- /package/dist/core/{p-8b820365.entry.js.map → p-d71e9cb5.entry.js.map} +0 -0
- /package/dist/core/{p-19c1e271.entry.js.map → p-f659e5eb.entry.js.map} +0 -0
- /package/dist/core/{p-f8f36680.entry.js.map → p-fc2551c0.entry.js.map} +0 -0
@@ -0,0 +1,136 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
+
import { i as isSlotUsed } from './helpers2.js';
|
3
|
+
import { d as defineCustomElement$b } from './ic-button2.js';
|
4
|
+
import { d as defineCustomElement$a } from './ic-input-component-container2.js';
|
5
|
+
import { d as defineCustomElement$9 } from './ic-input-container2.js';
|
6
|
+
import { d as defineCustomElement$8 } from './ic-input-label2.js';
|
7
|
+
import { d as defineCustomElement$7 } from './ic-input-validation2.js';
|
8
|
+
import { d as defineCustomElement$6 } from './ic-loading-indicator2.js';
|
9
|
+
import { d as defineCustomElement$5 } from './ic-menu2.js';
|
10
|
+
import { d as defineCustomElement$4 } from './ic-select2.js';
|
11
|
+
import { d as defineCustomElement$3 } from './ic-tooltip2.js';
|
12
|
+
import { d as defineCustomElement$2 } from './ic-typography2.js';
|
13
|
+
|
14
|
+
const icDataTableTitleBarCss = ".title-bar-wrapper,.header-container,.description-actions,.action-area,.custom-actions-wrapper{display:flex}.title-bar-wrapper,.action-area,.custom-actions-wrapper{gap:var(--ic-space-xs)}.title-bar-wrapper{flex-direction:column;padding:var(--ic-space-sm) var(--ic-space-xs);border-bottom:var(--ic-space-1px) solid var(--ic-architectural-300)}.full-width{padding:var(--ic-space-sm) 0;border-bottom:none}ic-typography.heading h3{margin:0}ic-typography.ic-typography-subtitle-small{color:var(--ic-color-tertiary-text)}ic-typography.ic-typography-h3,::slotted([slot=\"header\"]){max-width:50rem}ic-typography.ic-typography-body,::slotted([slot=\"description\"]){color:var(--ic-color-secondary-text)}ic-typography.ic-typography-body,ic-typography.ic-typography-subtitle-small,::slotted([slot=\"description\"]){max-width:40rem}.density-input{--input-width:7.625rem}@media screen and (max-width: 1200px){.header-container{flex-direction:column}}@media screen and (min-width: 1201px){.header-container{gap:var(--ic-space-xs);align-items:baseline}}@media screen and (min-width: 769px){.description-actions{justify-content:space-between}}@media screen and (max-width: 768px){.description-actions{flex-direction:column;align-items:flex-start;gap:var(--ic-space-xs)}}@media screen and (min-width: 577px){.action-area{align-items:center}}@media screen and (max-width: 576px){.action-area{flex-direction:column}}";
|
15
|
+
|
16
|
+
const DEFAULT_TITLE_BAR_HEADING = "Title Bar";
|
17
|
+
const DataTableTitleBar = /*@__PURE__*/ proxyCustomElement(class DataTableTitleBar extends HTMLElement {
|
18
|
+
constructor() {
|
19
|
+
super();
|
20
|
+
this.__registerHost();
|
21
|
+
this.__attachShadow();
|
22
|
+
this.icTableDensityUpdate = createEvent(this, "icTableDensityUpdate", 7);
|
23
|
+
this.initialDensitySelectOption = "default";
|
24
|
+
this.isEmbedded = false;
|
25
|
+
this.changeDensity = (ev) => {
|
26
|
+
this.icTableDensityUpdate.emit({ value: ev.detail.value });
|
27
|
+
};
|
28
|
+
this.description = undefined;
|
29
|
+
this.heading = DEFAULT_TITLE_BAR_HEADING;
|
30
|
+
this.hideDensitySelect = false;
|
31
|
+
this.metadata = undefined;
|
32
|
+
}
|
33
|
+
componentWillLoad() {
|
34
|
+
const parentEl = this.el.parentElement;
|
35
|
+
if (parentEl.tagName === "IC-DATA-TABLE") {
|
36
|
+
const dataTable = parentEl;
|
37
|
+
this.initialDensitySelectOption = dataTable.density;
|
38
|
+
this.isEmbedded = dataTable.embedded;
|
39
|
+
if (this.heading === DEFAULT_TITLE_BAR_HEADING) {
|
40
|
+
this.heading = dataTable.caption;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
render() {
|
45
|
+
const { changeDensity, description, el, heading, hideDensitySelect, initialDensitySelectOption, isEmbedded, metadata, } = this;
|
46
|
+
const showActionArea = isSlotUsed(el, "primary-action") ||
|
47
|
+
isSlotUsed(el, "custom-actions") ||
|
48
|
+
!hideDensitySelect;
|
49
|
+
const hasDescription = isSlotUsed(el, "description") || description;
|
50
|
+
return (h("div", { class: {
|
51
|
+
"title-bar-wrapper": true,
|
52
|
+
"full-width": isEmbedded,
|
53
|
+
} }, h("div", { class: "header-container" }, h("slot", { name: "heading" }, h("ic-typography", { variant: "h3", className: "heading" }, h("h3", null, heading))), metadata && (h("ic-typography", { variant: "subtitle-small" }, metadata))), (showActionArea || hasDescription) && (h("div", { class: "description-actions" }, h("slot", { name: "description" }, description && (h("ic-typography", { variant: "body" }, description))), showActionArea && (h("div", { class: "action-area" }, isSlotUsed(el, "custom-actions") && (h("div", { class: "custom-actions-wrapper" }, h("slot", { name: "custom-actions" }))), !hideDensitySelect && (h("ic-select", { small: true, label: "Change density", class: "density-input", hideLabel: true, options: [
|
54
|
+
{ label: "Default", value: "default" },
|
55
|
+
{ label: "Dense", value: "dense" },
|
56
|
+
{ label: "Spacious", value: "spacious" },
|
57
|
+
], value: initialDensitySelectOption, onIcChange: changeDensity })), isSlotUsed(el, "primary-action") && (h("slot", { name: "primary-action" }))))))));
|
58
|
+
}
|
59
|
+
get el() { return this; }
|
60
|
+
static get style() { return icDataTableTitleBarCss; }
|
61
|
+
}, [1, "ic-data-table-title-bar", {
|
62
|
+
"description": [1],
|
63
|
+
"heading": [1],
|
64
|
+
"hideDensitySelect": [4, "hide-density-select"],
|
65
|
+
"metadata": [1]
|
66
|
+
}]);
|
67
|
+
function defineCustomElement$1() {
|
68
|
+
if (typeof customElements === "undefined") {
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
const components = ["ic-data-table-title-bar", "ic-button", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-loading-indicator", "ic-menu", "ic-select", "ic-tooltip", "ic-typography"];
|
72
|
+
components.forEach(tagName => { switch (tagName) {
|
73
|
+
case "ic-data-table-title-bar":
|
74
|
+
if (!customElements.get(tagName)) {
|
75
|
+
customElements.define(tagName, DataTableTitleBar);
|
76
|
+
}
|
77
|
+
break;
|
78
|
+
case "ic-button":
|
79
|
+
if (!customElements.get(tagName)) {
|
80
|
+
defineCustomElement$b();
|
81
|
+
}
|
82
|
+
break;
|
83
|
+
case "ic-input-component-container":
|
84
|
+
if (!customElements.get(tagName)) {
|
85
|
+
defineCustomElement$a();
|
86
|
+
}
|
87
|
+
break;
|
88
|
+
case "ic-input-container":
|
89
|
+
if (!customElements.get(tagName)) {
|
90
|
+
defineCustomElement$9();
|
91
|
+
}
|
92
|
+
break;
|
93
|
+
case "ic-input-label":
|
94
|
+
if (!customElements.get(tagName)) {
|
95
|
+
defineCustomElement$8();
|
96
|
+
}
|
97
|
+
break;
|
98
|
+
case "ic-input-validation":
|
99
|
+
if (!customElements.get(tagName)) {
|
100
|
+
defineCustomElement$7();
|
101
|
+
}
|
102
|
+
break;
|
103
|
+
case "ic-loading-indicator":
|
104
|
+
if (!customElements.get(tagName)) {
|
105
|
+
defineCustomElement$6();
|
106
|
+
}
|
107
|
+
break;
|
108
|
+
case "ic-menu":
|
109
|
+
if (!customElements.get(tagName)) {
|
110
|
+
defineCustomElement$5();
|
111
|
+
}
|
112
|
+
break;
|
113
|
+
case "ic-select":
|
114
|
+
if (!customElements.get(tagName)) {
|
115
|
+
defineCustomElement$4();
|
116
|
+
}
|
117
|
+
break;
|
118
|
+
case "ic-tooltip":
|
119
|
+
if (!customElements.get(tagName)) {
|
120
|
+
defineCustomElement$3();
|
121
|
+
}
|
122
|
+
break;
|
123
|
+
case "ic-typography":
|
124
|
+
if (!customElements.get(tagName)) {
|
125
|
+
defineCustomElement$2();
|
126
|
+
}
|
127
|
+
break;
|
128
|
+
} });
|
129
|
+
}
|
130
|
+
|
131
|
+
const IcDataTableTitleBar = DataTableTitleBar;
|
132
|
+
const defineCustomElement = defineCustomElement$1;
|
133
|
+
|
134
|
+
export { IcDataTableTitleBar, defineCustomElement };
|
135
|
+
|
136
|
+
//# sourceMappingURL=ic-data-table-title-bar.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"ic-data-table-title-bar.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,w3CAAw3C;;ACev5C,MAAM,yBAAyB,GAAG,WAAW,CAAC;MAajC,iBAAiB;;;;;;QACpB,+BAA0B,GAA8B,SAAS,CAAC;QAClE,eAAU,GAAY,KAAK,CAAC;QAyC5B,kBAAa,GAAG,CACtB,EAAmD;YAEnD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;SAC5D,CAAC;;uBAjCyB,yBAAyB;iCAKd,KAAK;;;IAY3C,iBAAiB;QACf,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QACvC,IAAI,QAAQ,CAAC,OAAO,KAAK,eAAe,EAAE;YACxC,MAAM,SAAS,GAAG,QAAkC,CAAC;YACrD,IAAI,CAAC,0BAA0B,GAAG,SAAS,CAAC,OAAO,CAAC;YACpD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC;YACrC,IAAI,IAAI,CAAC,OAAO,KAAK,yBAAyB,EAAE;gBAC9C,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;aAClC;SACF;KACF;IAQD,MAAM;QACJ,MAAM,EACJ,aAAa,EACb,WAAW,EACX,EAAE,EACF,OAAO,EACP,iBAAiB,EACjB,0BAA0B,EAC1B,UAAU,EACV,QAAQ,GACT,GAAG,IAAI,CAAC;QACT,MAAM,cAAc,GAClB,UAAU,CAAC,EAAE,EAAE,gBAAgB,CAAC;YAChC,UAAU,CAAC,EAAE,EAAE,gBAAgB,CAAC;YAChC,CAAC,iBAAiB,CAAC;QAErB,MAAM,cAAc,GAAG,UAAU,CAAC,EAAE,EAAE,aAAa,CAAC,IAAI,WAAW,CAAC;QACpE,QACE,WACE,KAAK,EAAE;gBACL,mBAAmB,EAAE,IAAI;gBACzB,YAAY,EAAE,UAAU;aACzB,IAED,WAAK,KAAK,EAAC,kBAAkB,IAC3B,YAAM,IAAI,EAAC,SAAS,IAClB,qBAAe,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,SAAS,IAC7C,cAAK,OAAO,CAAM,CACJ,CACX,EACN,QAAQ,KACP,qBAAe,OAAO,EAAC,gBAAgB,IAAE,QAAQ,CAAiB,CACnE,CACG,EACL,CAAC,cAAc,IAAI,cAAc,MAChC,WAAK,KAAK,EAAC,qBAAqB,IAC9B,YAAM,IAAI,EAAC,aAAa,IACrB,WAAW,KACV,qBAAe,OAAO,EAAC,MAAM,IAAE,WAAW,CAAiB,CAC5D,CACI,EACN,cAAc,KACb,WAAK,KAAK,EAAC,aAAa,IACrB,UAAU,CAAC,EAAE,EAAE,gBAAgB,CAAC,KAC/B,WAAK,KAAK,EAAC,wBAAwB,IACjC,YAAM,IAAI,EAAC,gBAAgB,GAAG,CAC1B,CACP,EACA,CAAC,iBAAiB,KACjB,iBACE,KAAK,QACL,KAAK,EAAC,gBAAgB,EACtB,KAAK,EAAC,eAAe,EACrB,SAAS,QACT,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;gBACtC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;gBAClC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;aACzC,EACD,KAAK,EAAE,0BAA0B,EACjC,UAAU,EAAE,aAAa,GACd,CACd,EACA,UAAU,CAAC,EAAE,EAAE,gBAAgB,CAAC,KAC/B,YAAM,IAAI,EAAC,gBAAgB,GAAG,CAC/B,CACG,CACP,CACG,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-data-table-title-bar/ic-data-table-title-bar.css?tag=ic-data-table-title-bar&encapsulation=shadow","src/components/ic-data-table-title-bar/ic-data-table-title-bar.tsx"],"sourcesContent":[".title-bar-wrapper,\n.header-container,\n.description-actions,\n.action-area,\n.custom-actions-wrapper {\n display: flex;\n}\n\n.title-bar-wrapper,\n.action-area,\n.custom-actions-wrapper {\n gap: var(--ic-space-xs);\n}\n\n.title-bar-wrapper {\n flex-direction: column;\n padding: var(--ic-space-sm) var(--ic-space-xs);\n border-bottom: var(--ic-space-1px) solid var(--ic-architectural-300);\n}\n\n.full-width {\n padding: var(--ic-space-sm) 0;\n border-bottom: none;\n}\n\nic-typography.heading h3 {\n margin: 0;\n}\n\nic-typography.ic-typography-subtitle-small {\n color: var(--ic-color-tertiary-text);\n}\n\nic-typography.ic-typography-h3,\n::slotted([slot=\"header\"]) {\n max-width: 50rem;\n}\n\nic-typography.ic-typography-body,\n::slotted([slot=\"description\"]) {\n color: var(--ic-color-secondary-text);\n}\n\nic-typography.ic-typography-body,\nic-typography.ic-typography-subtitle-small,\n::slotted([slot=\"description\"]) {\n max-width: 40rem;\n}\n\n.density-input {\n --input-width: 7.625rem;\n}\n\n@media screen and (max-width: 1200px) {\n .header-container {\n flex-direction: column;\n }\n}\n\n@media screen and (min-width: 1201px) {\n .header-container {\n gap: var(--ic-space-xs);\n align-items: baseline;\n }\n}\n\n@media screen and (min-width: 769px) {\n .description-actions {\n justify-content: space-between;\n }\n}\n\n@media screen and (max-width: 768px) {\n .description-actions {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--ic-space-xs);\n }\n}\n\n@media screen and (min-width: 577px) {\n .action-area {\n align-items: center;\n }\n}\n\n@media screen and (max-width: 576px) {\n .action-area {\n flex-direction: column;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Prop,\n h,\n} from \"@stencil/core\";\nimport { IcSelectCustomEvent } from \"@ukic/web-components/dist/types/interface\";\nimport {\n IcDataTableDensityOptions,\n IcDensityUpdateEventDetail,\n} from \"../ic-data-table/ic-data-table.types\";\nimport { isSlotUsed } from \"../../utils/helpers\";\n\nconst DEFAULT_TITLE_BAR_HEADING = \"Title Bar\";\n\n/**\n * @slot primary-action - Render an interactive element that will perform a primary action. Renders to the right of the density select.\n * @slot custom-actions - Render additional custom actions to the left of the density select.\n * @slot heading - The heading to render on the data table title bar.\n * @slot description - Render an alternative description in the description section.\n */\n@Component({\n tag: \"ic-data-table-title-bar\",\n styleUrl: \"ic-data-table-title-bar.css\",\n shadow: true,\n})\nexport class DataTableTitleBar {\n private initialDensitySelectOption: IcDataTableDensityOptions = \"default\";\n private isEmbedded: boolean = false;\n\n @Element() el: HTMLIcDataTableTitleBarElement;\n\n /**\n * The description that is displayed below the `heading` and `metadata`. Can be overridden with the `description` slot.\n */\n @Prop() description?: string;\n\n /**\n * The heading of the title bar. Can be overridden with the `heading` slot. If used with an `ic-data-table` it will default to the table's `caption` unless overridden.\n */\n @Prop() heading?: string = DEFAULT_TITLE_BAR_HEADING;\n\n /**\n * When `true`, the density select will not be rendered.\n */\n @Prop() hideDensitySelect?: boolean = false;\n\n /**\n * The metadata displayed next to the `heading`.\n */\n @Prop() metadata?: string;\n\n /**\n * Emitted when the table density select value is changed.\n */\n @Event() icTableDensityUpdate: EventEmitter<IcDensityUpdateEventDetail>;\n\n componentWillLoad(): void {\n const parentEl = this.el.parentElement;\n if (parentEl.tagName === \"IC-DATA-TABLE\") {\n const dataTable = parentEl as HTMLIcDataTableElement;\n this.initialDensitySelectOption = dataTable.density;\n this.isEmbedded = dataTable.embedded;\n if (this.heading === DEFAULT_TITLE_BAR_HEADING) {\n this.heading = dataTable.caption;\n }\n }\n }\n\n private changeDensity = (\n ev: IcSelectCustomEvent<IcDensityUpdateEventDetail>\n ) => {\n this.icTableDensityUpdate.emit({ value: ev.detail.value });\n };\n\n render() {\n const {\n changeDensity,\n description,\n el,\n heading,\n hideDensitySelect,\n initialDensitySelectOption,\n isEmbedded,\n metadata,\n } = this;\n const showActionArea =\n isSlotUsed(el, \"primary-action\") ||\n isSlotUsed(el, \"custom-actions\") ||\n !hideDensitySelect;\n\n const hasDescription = isSlotUsed(el, \"description\") || description;\n return (\n <div\n class={{\n \"title-bar-wrapper\": true,\n \"full-width\": isEmbedded,\n }}\n >\n <div class=\"header-container\">\n <slot name=\"heading\">\n <ic-typography variant=\"h3\" className=\"heading\">\n <h3>{heading}</h3>\n </ic-typography>\n </slot>\n {metadata && (\n <ic-typography variant=\"subtitle-small\">{metadata}</ic-typography>\n )}\n </div>\n {(showActionArea || hasDescription) && (\n <div class=\"description-actions\">\n <slot name=\"description\">\n {description && (\n <ic-typography variant=\"body\">{description}</ic-typography>\n )}\n </slot>\n {showActionArea && (\n <div class=\"action-area\">\n {isSlotUsed(el, \"custom-actions\") && (\n <div class=\"custom-actions-wrapper\">\n <slot name=\"custom-actions\" />\n </div>\n )}\n {!hideDensitySelect && (\n <ic-select\n small\n label=\"Change density\"\n class=\"density-input\"\n hideLabel\n options={[\n { label: \"Default\", value: \"default\" },\n { label: \"Dense\", value: \"dense\" },\n { label: \"Spacious\", value: \"spacious\" },\n ]}\n value={initialDensitySelectOption}\n onIcChange={changeDensity}\n ></ic-select>\n )}\n {isSlotUsed(el, \"primary-action\") && (\n <slot name=\"primary-action\" />\n )}\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -1,5 +1,7 @@
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
2
|
-
import {
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
2
|
+
import { i as isSlotUsed, g as getSlotContent } from './helpers2.js';
|
3
|
+
import { d as defineCustomElement$h } from './ic-button2.js';
|
4
|
+
import { d as defineCustomElement$g } from './ic-empty-state2.js';
|
3
5
|
import { d as defineCustomElement$f } from './ic-input-component-container2.js';
|
4
6
|
import { d as defineCustomElement$e } from './ic-input-container2.js';
|
5
7
|
import { d as defineCustomElement$d } from './ic-input-label2.js';
|
@@ -27,18 +29,33 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
|
|
27
29
|
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
28
30
|
</svg>`;
|
29
31
|
|
30
|
-
const icDataTableCss = ":host{position:relative;display:block;height:100%;max-height:100%}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs))}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:fixed;border-spacing:0;width:100%}.table-row-container: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-container{border:var(--ic-border-light)}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{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{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.column-header,.row-header{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{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-border-light) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important}.table-row:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px)}.data-type-string{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;vertical-align:top}.cell-alignment-top{vertical-align:top}.cell-alignment-middle{vertical-align:middle}.cell-alignment-bottom{vertical-align:bottom}.cell-emphasis-low{color:var(--ic-color-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}}";
|
32
|
+
const icDataTableCss = ":host{position:relative;display:block;height:100%;max-height:100%}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs))}ic-loading-indicator{position:sticky;top:20px}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:fixed;border-spacing:0;width:100%}.table-row-container: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{border:var(--ic-border-light)}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{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{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.column-header,.row-header{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{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-border-light) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content:center !important}.table-row:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px)}.data-type-string{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;justify-content:end;vertical-align:top}.cell-alignment-top{vertical-align:top}.cell-alignment-middle{vertical-align:middle}.cell-alignment-bottom{vertical-align:bottom}.cell-emphasis-low{color:var(--ic-color-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-border-light)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading.show-background{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.row-header-alignment-right>ic-typography,.cell-alignment-center>ic-typography{flex:1}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}.cell-container{display:flex}}";
|
31
33
|
|
32
34
|
const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLElement {
|
33
35
|
constructor() {
|
34
36
|
super();
|
35
37
|
this.__registerHost();
|
36
38
|
this.__attachShadow();
|
39
|
+
this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
|
40
|
+
this.DENSITY_HEIGHT_MULTIPLIER = {
|
41
|
+
dense: 0.8,
|
42
|
+
default: 1,
|
43
|
+
spacious: 1.2,
|
44
|
+
};
|
37
45
|
this.SORT_ICONS = {
|
38
46
|
unsorted: unsortedIcon,
|
39
47
|
ascending: ascendingIcon,
|
40
48
|
descending: descendingIcon,
|
41
49
|
};
|
50
|
+
this.hasLoadedForOneSecond = true;
|
51
|
+
this.startLoadingTimer = () => {
|
52
|
+
this.hasLoadedForOneSecond = false;
|
53
|
+
this.timerStarted = Date.now();
|
54
|
+
setTimeout(() => {
|
55
|
+
this.hasLoadedForOneSecond = true;
|
56
|
+
this.timerStarted = null;
|
57
|
+
}, this.minimumLoadingDisplayDuration);
|
58
|
+
};
|
42
59
|
this.isObject = (value) => typeof value === "object";
|
43
60
|
this.notDefaultDensity = () => this.density !== "default";
|
44
61
|
this.getCellContent = (cell, dataType) => {
|
@@ -56,7 +73,11 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
56
73
|
return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
|
57
74
|
}
|
58
75
|
};
|
59
|
-
this.
|
76
|
+
this.createUpdatingIndicator = () => {
|
77
|
+
const { appearance, description, max, min, progress } = this.updatingOptions || {};
|
78
|
+
return (h("th", { colSpan: this.columns.length, class: "updating-state" }, h("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
|
79
|
+
};
|
80
|
+
this.createCells = (row, rowIndex) => {
|
60
81
|
const rowValues = Object.values(row);
|
61
82
|
const rowKeys = Object.keys(row);
|
62
83
|
let rowAlignment;
|
@@ -67,43 +88,56 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
67
88
|
rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
|
68
89
|
}
|
69
90
|
return rowValues.map((cell, index) => {
|
70
|
-
|
91
|
+
var _a, _b, _c, _d, _e;
|
92
|
+
const columnProps = this.columns[index];
|
93
|
+
const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
|
94
|
+
const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
|
71
95
|
const cellValue = (key) => this.getObjectValue(cell, key);
|
72
96
|
return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
|
73
97
|
["row-header"]: true,
|
74
98
|
[`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
|
75
99
|
["row-header-sticky"]: this.stickyRowHeaders,
|
76
|
-
} }, cellValue("title"))) : (h("td", {
|
100
|
+
} }, cellValue("title"))) : (h("td", { class: {
|
77
101
|
["table-cell"]: true,
|
78
102
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
79
|
-
[`data-type-${dataType}`]: true,
|
80
|
-
[`cell-alignment-${(
|
81
|
-
this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
|
82
|
-
!!this.getCellAlignment(cell, "horizontal"),
|
83
|
-
[`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
|
103
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
104
|
+
[`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
84
105
|
rowAlignment ||
|
85
|
-
this.getCellAlignment(cell, "vertical")}`]: !!(
|
106
|
+
this.getCellAlignment(cell, "vertical")}`]: !!((_b = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
86
107
|
!!rowAlignment ||
|
87
108
|
!!this.getCellAlignment(cell, "vertical"),
|
88
|
-
} }, h("
|
109
|
+
} }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
110
|
+
!isSlotUsed(this.el, cellSlotName)
|
111
|
+
? cell
|
112
|
+
: null, class: {
|
113
|
+
"cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element",
|
114
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
115
|
+
[`cell-alignment-${((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.horizontal) ||
|
116
|
+
this.getCellAlignment(cell, "horizontal")}`]: !!((_d = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _d === void 0 ? void 0 : _d.horizontal) ||
|
117
|
+
!!this.getCellAlignment(cell, "horizontal"),
|
118
|
+
} }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _e === void 0 ? void 0 : _e.onAllCells)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), h("ic-typography", { variant: "body", class: {
|
89
119
|
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
90
|
-
emphasis ||
|
120
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
91
121
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
92
|
-
!!emphasis ||
|
122
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
93
123
|
!!rowEmphasis,
|
94
124
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
95
|
-
} }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType)))));
|
125
|
+
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType))))))));
|
96
126
|
});
|
97
127
|
};
|
98
128
|
this.createColumnHeaders = () => {
|
99
|
-
return this.columns.map(({ cellAlignment, colspan, key, title }) => (h("th", { scope: "col", class: {
|
129
|
+
return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (h("th", { scope: "col", class: {
|
100
130
|
["column-header"]: true,
|
101
|
-
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
102
131
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
103
|
-
|
132
|
+
["updating-state-headers"]: this.updating && !this.loading,
|
133
|
+
}, colSpan: colspan }, h("div", { class: {
|
134
|
+
"column-header-inner-container": true,
|
135
|
+
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
136
|
+
} }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
|
137
|
+
!icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), h("ic-typography", { variant: "body", class: {
|
104
138
|
["column-header-text"]: true,
|
105
139
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
106
|
-
} }, title), h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
140
|
+
} }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
107
141
|
// eslint-disable-next-line react/jsx-no-bind
|
108
142
|
onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
|
109
143
|
? this.sortedColumnOrder
|
@@ -111,21 +145,48 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
111
145
|
["sort-button"]: true,
|
112
146
|
["sort-button-unsorted"]: this.sortedColumn !== key ||
|
113
147
|
this.sortedColumnOrder === "unsorted",
|
114
|
-
} })))
|
115
|
-
["column-header-text"]: true,
|
116
|
-
[`text-${this.density}`]: this.notDefaultDensity(),
|
117
|
-
} }, title)))));
|
148
|
+
} }))))));
|
118
149
|
};
|
119
150
|
this.createRows = () => {
|
120
151
|
const data = this.showPagination
|
121
152
|
? this.data.slice(this.fromRow, this.toRow)
|
122
153
|
: this.data.slice();
|
154
|
+
/**
|
155
|
+
* Ensures that createCells has a value in data to map over to actually render the slot.
|
156
|
+
* Removes the need for the user to add it multiple times.
|
157
|
+
*/
|
158
|
+
this.columns.forEach(({ key }) => {
|
159
|
+
data.forEach((row, rowIndex) => {
|
160
|
+
const cellSlotName = `${key}-${rowIndex}`;
|
161
|
+
if (isSlotUsed(this.el, cellSlotName)) {
|
162
|
+
row[key] = getSlotContent(this.el, cellSlotName);
|
163
|
+
}
|
164
|
+
});
|
165
|
+
});
|
123
166
|
return data
|
124
167
|
.sort(!this.sortable ? undefined : this.getSortFunction())
|
125
|
-
.map((row
|
126
|
-
|
127
|
-
|
128
|
-
|
168
|
+
.map((row, index) => {
|
169
|
+
var _a;
|
170
|
+
const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
|
171
|
+
const findRowHeight = variableRowHeightVal
|
172
|
+
? variableRowHeightVal !== "auto" && variableRowHeightVal
|
173
|
+
: this.globalRowHeight !== "auto" && this.globalRowHeight;
|
174
|
+
return (h("tr", {
|
175
|
+
// eslint-disable-next-line react/jsx-no-bind
|
176
|
+
onClick: () => (this.selectedRow =
|
177
|
+
this.selectedRow !== row &&
|
178
|
+
!this.loading &&
|
179
|
+
!this.updating &&
|
180
|
+
row), class: {
|
181
|
+
["table-row"]: true,
|
182
|
+
["table-row-selected"]: this.selectedRow === row,
|
183
|
+
}, style: {
|
184
|
+
height: findRowHeight
|
185
|
+
? `${findRowHeight * this.DENSITY_HEIGHT_MULTIPLIER[this.density]}px`
|
186
|
+
: null,
|
187
|
+
}
|
188
|
+
}, this.createCells(row, index)));
|
189
|
+
});
|
129
190
|
};
|
130
191
|
this.getObjectValue = (cell, key) => {
|
131
192
|
return Object.values(cell)[Object.keys(cell).indexOf(key)];
|
@@ -203,15 +264,19 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
203
264
|
this.data = undefined;
|
204
265
|
this.density = "default";
|
205
266
|
this.embedded = false;
|
267
|
+
this.globalRowHeight = 40;
|
206
268
|
this.hideColumnHeaders = false;
|
269
|
+
this.loading = false;
|
270
|
+
this.loadingOptions = undefined;
|
271
|
+
this.minimumLoadingDisplayDuration = 1000;
|
207
272
|
this.paginationOptions = {
|
208
273
|
itemsPerPage: [
|
209
274
|
{ label: "10", value: "10" },
|
210
275
|
{ label: "25", value: "25" },
|
211
276
|
{ label: "50", value: "50" },
|
212
277
|
],
|
213
|
-
|
214
|
-
|
278
|
+
rangeLabelType: "page",
|
279
|
+
type: "simple",
|
215
280
|
itemsPerPageControl: true,
|
216
281
|
goToPageControl: true,
|
217
282
|
alignment: "right",
|
@@ -224,13 +289,18 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
224
289
|
};
|
225
290
|
this.stickyColumnHeaders = false;
|
226
291
|
this.stickyRowHeaders = false;
|
292
|
+
this.updating = false;
|
293
|
+
this.updatingOptions = undefined;
|
294
|
+
this.variableRowHeight = undefined;
|
227
295
|
}
|
228
296
|
componentWillLoad() {
|
297
|
+
var _a;
|
229
298
|
this.rowsPerPage = Number(this.paginationOptions.itemsPerPage[0].value);
|
230
299
|
this.previousRowsPerPage = this.rowsPerPage;
|
231
300
|
this.toRow = this.rowsPerPage;
|
232
301
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
233
302
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
303
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
234
304
|
}
|
235
305
|
componentDidLoad() {
|
236
306
|
const tableElement = this.el.shadowRoot.querySelector("table");
|
@@ -239,6 +309,10 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
239
309
|
(tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
|
240
310
|
this.scrollable = true;
|
241
311
|
}
|
312
|
+
if (this.loading) {
|
313
|
+
this.startLoadingTimer();
|
314
|
+
this.showLoadingIndicator();
|
315
|
+
}
|
242
316
|
}
|
243
317
|
handleItemsPerPageChange(ev) {
|
244
318
|
this.previousRowsPerPage = this.rowsPerPage;
|
@@ -259,37 +333,94 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
259
333
|
this.previousRowsPerPage = this.rowsPerPage;
|
260
334
|
}
|
261
335
|
}
|
336
|
+
handleDensityChange(ev) {
|
337
|
+
this.density = ev.detail.value;
|
338
|
+
}
|
262
339
|
clickListener(ev) {
|
263
340
|
if (ev.target !== this.el)
|
264
341
|
this.selectedRow = undefined;
|
265
342
|
}
|
343
|
+
loadingHandler(newValue) {
|
344
|
+
if (newValue)
|
345
|
+
this.startLoadingTimer();
|
346
|
+
if (this.loading) {
|
347
|
+
setTimeout(() => {
|
348
|
+
this.showLoadingIndicator();
|
349
|
+
}, 500);
|
350
|
+
}
|
351
|
+
}
|
352
|
+
dataHandler(newData) {
|
353
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
|
354
|
+
if (this.loading) {
|
355
|
+
!this.hasLoadedForOneSecond
|
356
|
+
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
357
|
+
(Date.now() - this.timerStarted))
|
358
|
+
: (this.loading = false);
|
359
|
+
}
|
360
|
+
if (this.updating)
|
361
|
+
this.updating = false;
|
362
|
+
}
|
363
|
+
rowHeightChangeHandler() {
|
364
|
+
this.icRowHeightChange.emit();
|
365
|
+
}
|
366
|
+
/**
|
367
|
+
* Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.
|
368
|
+
*/
|
369
|
+
async resetRowHeights() {
|
370
|
+
this.globalRowHeight = 40;
|
371
|
+
this.variableRowHeight = null;
|
372
|
+
}
|
373
|
+
showLoadingIndicator() {
|
374
|
+
this.loadingIndicator.classList.add("show");
|
375
|
+
}
|
266
376
|
render() {
|
267
|
-
const { caption, createColumnHeaders, createRows, data, hideColumnHeaders, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, } = this;
|
268
|
-
return (h("div", { class: "table-container" }, h("div", { class: {
|
377
|
+
const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
378
|
+
return (h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
|
269
379
|
["table-row-container"]: true,
|
270
380
|
scrollable,
|
271
381
|
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
|
272
382
|
["column-header-sticky"]: stickyColumnHeaders,
|
273
383
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
274
|
-
} }, h("tr", null, createColumnHeaders()))),
|
384
|
+
} }, h("tr", null, createColumnHeaders()))), updating &&
|
385
|
+
!loading &&
|
386
|
+
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
|
387
|
+
!loading &&
|
388
|
+
(isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
389
|
+
"loading-empty": loading,
|
390
|
+
loading: true,
|
391
|
+
"show-background": loadingOptions.showBackground,
|
392
|
+
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), showPagination && (h("div", { class: "pagination-container" }, h("ic-pagination-bar", { totalItems: data.length, type: paginationOptions.type, rangeLabelType: paginationOptions.rangeLabelType, showItemsPerPageControl: paginationOptions.itemsPerPageControl, showGoToPageControl: paginationOptions.goToPageControl, itemsPerPageOptions: paginationOptions.itemsPerPage, alignment: paginationOptions.alignment }))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
|
275
393
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
276
394
|
: "table unsorted"))));
|
277
395
|
}
|
278
396
|
get el() { return this; }
|
397
|
+
static get watchers() { return {
|
398
|
+
"loading": ["loadingHandler"],
|
399
|
+
"data": ["dataHandler"],
|
400
|
+
"globalRowHeight": ["rowHeightChangeHandler"],
|
401
|
+
"variableRowHeight": ["rowHeightChangeHandler"]
|
402
|
+
}; }
|
279
403
|
static get style() { return icDataTableCss; }
|
280
404
|
}, [1, "ic-data-table", {
|
281
405
|
"caption": [1],
|
282
406
|
"columns": [16],
|
283
407
|
"data": [16],
|
284
|
-
"density": [
|
408
|
+
"density": [1025],
|
285
409
|
"embedded": [4],
|
410
|
+
"globalRowHeight": [1032, "global-row-height"],
|
286
411
|
"hideColumnHeaders": [4, "hide-column-headers"],
|
412
|
+
"loading": [1028],
|
413
|
+
"loadingOptions": [16],
|
414
|
+
"minimumLoadingDisplayDuration": [2, "minimum-loading-display-duration"],
|
287
415
|
"paginationOptions": [16],
|
288
416
|
"showPagination": [4, "show-pagination"],
|
289
417
|
"sortable": [4],
|
290
418
|
"sortOptions": [16],
|
291
419
|
"stickyColumnHeaders": [4, "sticky-column-headers"],
|
292
420
|
"stickyRowHeaders": [4, "sticky-row-headers"],
|
421
|
+
"updating": [4],
|
422
|
+
"updatingOptions": [16],
|
423
|
+
"variableRowHeight": [1040],
|
293
424
|
"fromRow": [32],
|
294
425
|
"previousRowsPerPage": [32],
|
295
426
|
"rowsPerPage": [32],
|
@@ -298,13 +429,19 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
298
429
|
"selectedRow": [32],
|
299
430
|
"sortedColumn": [32],
|
300
431
|
"sortedColumnOrder": [32],
|
301
|
-
"toRow": [32]
|
302
|
-
|
432
|
+
"toRow": [32],
|
433
|
+
"resetRowHeights": [64]
|
434
|
+
}, [[0, "icItemsPerPageChange", "handleItemsPerPageChange"], [0, "icPageChange", "handlePageChange"], [0, "icTableDensityUpdate", "handleDensityChange"], [8, "click", "clickListener"]], {
|
435
|
+
"loading": ["loadingHandler"],
|
436
|
+
"data": ["dataHandler"],
|
437
|
+
"globalRowHeight": ["rowHeightChangeHandler"],
|
438
|
+
"variableRowHeight": ["rowHeightChangeHandler"]
|
439
|
+
}]);
|
303
440
|
function defineCustomElement$1() {
|
304
441
|
if (typeof customElements === "undefined") {
|
305
442
|
return;
|
306
443
|
}
|
307
|
-
const components = ["ic-data-table", "ic-button", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-link", "ic-loading-indicator", "ic-menu", "ic-pagination", "ic-pagination-bar", "ic-pagination-item", "ic-select", "ic-text-field", "ic-tooltip", "ic-typography"];
|
444
|
+
const components = ["ic-data-table", "ic-button", "ic-empty-state", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-link", "ic-loading-indicator", "ic-menu", "ic-pagination", "ic-pagination-bar", "ic-pagination-item", "ic-select", "ic-text-field", "ic-tooltip", "ic-typography"];
|
308
445
|
components.forEach(tagName => { switch (tagName) {
|
309
446
|
case "ic-data-table":
|
310
447
|
if (!customElements.get(tagName)) {
|
@@ -312,6 +449,11 @@ function defineCustomElement$1() {
|
|
312
449
|
}
|
313
450
|
break;
|
314
451
|
case "ic-button":
|
452
|
+
if (!customElements.get(tagName)) {
|
453
|
+
defineCustomElement$h();
|
454
|
+
}
|
455
|
+
break;
|
456
|
+
case "ic-empty-state":
|
315
457
|
if (!customElements.get(tagName)) {
|
316
458
|
defineCustomElement$g();
|
317
459
|
}
|