@duetds/components 4.33.0 → 4.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hydrate/index.js +487 -198
- package/lib/cjs/{dom-c850c8d7.js → dom-52a4f07a.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -3
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -453
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +96 -0
- package/lib/cjs/{duet-upload.cjs.entry.js → duet-editable-table_4.cjs.entry.js} +463 -32
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +62 -0
- package/lib/cjs/duet-footer.cjs.entry.js +2 -2
- package/lib/cjs/duet-grid_2.cjs.entry.js +26 -3
- package/lib/cjs/duet-header_2.cjs.entry.js +220 -47
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +8 -6
- package/lib/cjs/duet-input_2.cjs.entry.js +3 -4
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +100 -0
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +4 -4
- package/lib/cjs/{focus-utils-a7a1fb8b.js → focus-utils-30f5dc06.js} +1 -1
- package/lib/cjs/form-search-d61b2843.js +8 -0
- package/lib/cjs/{index-b724d698.js → index-1c10bbfb.js} +2 -2
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-e3edeed1.js → shadow-css-e1b62a99.js} +1 -1
- package/lib/cjs/token-utils-05bd23b4.js +77 -0
- package/lib/cjs/tokens-8596cece.js +459 -0
- package/lib/collection/collection-manifest.json +11 -10
- package/lib/collection/components/duet-choice/duet-choice.js +0 -1
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +4 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +13 -6
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +25 -3
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +3 -3
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +58 -2
- package/lib/collection/components/duet-footer/duet-footer.css +1 -0
- package/lib/collection/components/duet-grid/duet-grid.js +25 -2
- package/lib/collection/components/duet-header/duet-header-dropdown.js +27 -0
- package/lib/collection/components/duet-header/duet-header-hamburger.js +9 -0
- package/lib/collection/components/duet-header/duet-header-icon.js +9 -0
- package/lib/collection/components/duet-header/duet-header.css +272 -39
- package/lib/collection/components/duet-header/duet-header.js +316 -122
- package/lib/collection/components/duet-icon/duet-icon.js +11 -5
- package/lib/collection/components/duet-link/duet-link.js +4 -1
- package/lib/collection/components/duet-list-item/duet-list-item.css +1 -1
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.css +4 -3
- package/lib/collection/components/duet-table/duet-table.css +42 -17
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-upload/duet-upload.js +98 -51
- package/lib/collection/components/duet-upload/{duet-upload-editable-item-error.js → upload-editable-item-error.js} +0 -0
- package/lib/collection/components/duet-upload/{duet-upload-editable-item-inprogres.js → upload-editable-item-inprogres.js} +0 -0
- package/lib/collection/components/duet-upload/{duet-upload-editable-item-success.js → upload-editable-item-success.js} +0 -0
- package/lib/collection/components/duet-upload/{duet-upload-validators.js → upload-validators.js} +0 -0
- package/lib/collection/components/{duet-upload → duet-upload-aria-status}/duet-upload-aria-status.js +3 -3
- package/lib/collection/utils/template-utils.js +33 -0
- package/lib/collection/utils/token-utils.js +67 -14
- package/lib/custom-elements-bundle/index.js +468 -121
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-060d79be.entry.js → p-08498e46.entry.js} +1 -1
- package/lib/duet/p-0bb75f62.system.entry.js +4 -0
- package/lib/duet/p-0d546cd6.system.entry.js +4 -0
- package/lib/duet/{p-263bc9cd.system.entry.js → p-1164a119.system.entry.js} +1 -1
- package/lib/duet/{p-a890da72.entry.js → p-13f72df0.entry.js} +1 -1
- package/lib/duet/{p-387823af.system.entry.js → p-15945ba7.system.entry.js} +1 -1
- package/lib/duet/{p-35a3794e.js → p-183726f7.js} +0 -0
- package/lib/duet/{p-7fee0d23.system.entry.js → p-1842a4db.system.entry.js} +1 -1
- package/lib/duet/{p-4607af59.entry.js → p-1a4204b7.entry.js} +1 -1
- package/lib/duet/{p-b4e87f02.system.entry.js → p-1d8d319c.system.entry.js} +1 -1
- package/lib/duet/{p-9dca5c22.system.entry.js → p-2b1707bd.system.entry.js} +1 -1
- package/lib/duet/{p-8b5ca0e7.system.entry.js → p-2c89e016.system.entry.js} +1 -1
- package/lib/duet/p-309f9094.entry.js +4 -0
- package/lib/duet/{p-67d9a9a9.system.entry.js → p-30f15c84.system.entry.js} +1 -1
- package/lib/duet/p-39cd816e.entry.js +4 -0
- package/lib/duet/{p-86daec1c.entry.js → p-3d47d6d4.entry.js} +1 -1
- package/lib/duet/{p-d744d188.system.entry.js → p-3e9fe1c7.system.entry.js} +1 -1
- package/lib/duet/{p-a9859a82.entry.js → p-3ff50cee.entry.js} +1 -1
- package/lib/duet/{p-b42d81c3.system.js → p-41938e76.system.js} +1 -1
- package/lib/duet/p-420c000b.entry.js +4 -0
- package/lib/duet/{p-cdd70b93.entry.js → p-477c6c71.entry.js} +1 -1
- package/lib/duet/p-478d2995.entry.js +4 -0
- package/lib/duet/p-4b400f7d.system.entry.js +4 -0
- package/lib/duet/p-4b480fdc.entry.js +4 -0
- package/lib/duet/p-50b4fb2c.js +4 -0
- package/lib/duet/{p-987edcd0.js → p-52621211.js} +0 -0
- package/lib/duet/{p-94169303.entry.js → p-545dcb04.entry.js} +1 -1
- package/lib/duet/{p-8f826843.system.entry.js → p-571015b8.system.entry.js} +1 -1
- package/lib/duet/{p-9481e312.entry.js → p-580c57ea.entry.js} +1 -1
- package/lib/duet/{p-2bb1460c.entry.js → p-5cf1d847.entry.js} +1 -1
- package/lib/duet/{p-c2e77278.entry.js → p-5d2ddf99.entry.js} +1 -1
- package/lib/duet/{p-af41d894.system.entry.js → p-5db0676e.system.entry.js} +1 -1
- package/lib/duet/p-603a61dc.system.entry.js +4 -0
- package/lib/duet/{p-aba68b7b.entry.js → p-6b1b2655.entry.js} +1 -1
- package/lib/duet/{p-597d99c7.entry.js → p-6bb9a991.entry.js} +1 -1
- package/lib/duet/p-6dc026cf.system.entry.js +4 -0
- package/lib/duet/{p-c18a599e.system.js → p-6e4fd6ba.system.js} +0 -0
- package/lib/duet/p-71261eb7.entry.js +4 -0
- package/lib/duet/{p-751542a0.system.entry.js → p-71a94fb9.system.entry.js} +1 -1
- package/lib/duet/{p-e12f2b8b.system.js → p-76b98e4d.system.js} +1 -1
- package/lib/duet/{p-f8ce39fb.entry.js → p-80d40375.entry.js} +1 -1
- package/lib/duet/{p-548d484e.js → p-80f90fef.js} +1 -1
- package/lib/duet/p-8143f3de.js +4 -0
- package/lib/duet/{p-bf93a991.entry.js → p-87703af9.entry.js} +1 -1
- package/lib/duet/p-8ad673ef.entry.js +4 -0
- package/lib/duet/{p-d4118b6e.system.entry.js → p-8adcc2f9.system.entry.js} +1 -1
- package/lib/duet/{p-4a87e9ab.system.entry.js → p-8e478364.system.entry.js} +1 -1
- package/lib/duet/p-8f477bd6.system.js +4 -0
- package/lib/duet/{p-00735436.entry.js → p-8fcaeb1b.entry.js} +1 -1
- package/lib/duet/p-93a51797.entry.js +4 -0
- package/lib/duet/{p-a5b9c192.system.entry.js → p-95edfcb8.system.entry.js} +1 -1
- package/lib/duet/p-97dc72c2.system.entry.js +4 -0
- package/lib/duet/p-99cd16d8.system.entry.js +4 -0
- package/lib/duet/{p-e964d062.entry.js → p-9c3b48fc.entry.js} +1 -1
- package/lib/duet/{p-5826523b.entry.js → p-9dad09a8.entry.js} +1 -1
- package/lib/duet/{p-8cb7416d.entry.js → p-9db71699.entry.js} +1 -1
- package/lib/duet/{p-b32224fe.system.entry.js → p-a0129887.system.entry.js} +1 -1
- package/lib/duet/p-a16a58c1.system.js +4 -0
- package/lib/duet/{p-2443bdca.system.entry.js → p-a4c0ce83.system.entry.js} +1 -1
- package/lib/duet/{p-48d1eb1f.system.entry.js → p-a9dc4dd9.system.entry.js} +1 -1
- package/lib/duet/p-aa5ba0fd.entry.js +4 -0
- package/lib/duet/{p-d3a3c3c7.system.entry.js → p-af7685aa.system.entry.js} +1 -1
- package/lib/duet/{p-6e6e76db.system.entry.js → p-b061516e.system.entry.js} +1 -1
- package/lib/duet/{p-58750bae.system.entry.js → p-b1401fd8.system.entry.js} +1 -1
- package/lib/duet/{p-b3744481.entry.js → p-b71cbe4b.entry.js} +1 -1
- package/lib/duet/p-c0472744.system.entry.js +4 -0
- package/lib/duet/{p-27d80cef.system.entry.js → p-c04ca724.system.entry.js} +1 -1
- package/lib/duet/{p-e2a44156.js → p-c33d1202.js} +1 -1
- package/lib/duet/{p-374fb7e6.system.entry.js → p-c85583d4.system.entry.js} +1 -1
- package/lib/duet/{p-aef1b720.system.entry.js → p-ca2b3f6a.system.entry.js} +1 -1
- package/lib/duet/{p-3af5d66f.entry.js → p-ca68c8f0.entry.js} +1 -1
- package/lib/duet/{p-acc57c77.entry.js → p-cecdebf3.entry.js} +1 -1
- package/lib/duet/p-d004da5f.js +4 -0
- package/lib/duet/{p-984576c9.entry.js → p-d1d6dc7a.entry.js} +1 -1
- package/lib/duet/{p-794659ac.entry.js → p-d9a93e45.entry.js} +1 -1
- package/lib/duet/{p-d1c19f04.system.entry.js → p-dc27e127.system.entry.js} +1 -1
- package/lib/duet/p-df37c5cd.entry.js +4 -0
- package/lib/duet/{p-6a19b5ec.entry.js → p-e10f1828.entry.js} +1 -1
- package/lib/duet/{p-a207b008.entry.js → p-e5120c30.entry.js} +1 -1
- package/lib/duet/p-e54705b2.system.js +4 -0
- package/lib/duet/{p-0d22396e.system.js → p-e5c1751e.system.js} +0 -0
- package/lib/duet/{p-dfe79666.system.entry.js → p-f1c7f166.system.entry.js} +2 -2
- package/lib/duet/p-f1dbb4ec.entry.js +4 -0
- package/lib/duet/{p-aee24388.system.entry.js → p-f3cd9499.system.entry.js} +1 -1
- package/lib/duet/{p-4b6ebe40.system.entry.js → p-f55ea1cc.system.entry.js} +1 -1
- package/lib/duet/{p-e76b722f.entry.js → p-f7700f25.entry.js} +1 -1
- package/lib/duet/p-fa99eaa4.system.js +4 -0
- package/lib/duet/{p-c36b4da0.entry.js → p-fd009368.entry.js} +1 -1
- package/lib/duet/{p-237e47b4.system.entry.js → p-fe1a2f0d.system.entry.js} +1 -1
- package/lib/duet/p-fe3806e2.system.entry.js +4 -0
- package/lib/duet/{p-4e28da18.system.entry.js → p-ffcfbd7a.system.entry.js} +1 -1
- package/lib/esm/{dom-58cd15f6.js → dom-5d060ace.js} +1 -1
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +2 -2
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +2 -2
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -3
- package/lib/esm/duet-collapsible.entry.js +4 -452
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table-button.entry.js +92 -0
- package/lib/esm/{duet-upload.entry.js → duet-editable-table_4.entry.js} +461 -33
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +58 -0
- package/lib/esm/duet-footer.entry.js +2 -2
- package/lib/esm/duet-grid_2.entry.js +26 -3
- package/lib/esm/duet-header_2.entry.js +220 -47
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +8 -6
- package/lib/esm/duet-input_2.entry.js +2 -3
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +2 -2
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +2 -2
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-progress.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +1 -1
- package/lib/esm/duet-upload-aria-status.entry.js +96 -0
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{focus-utils-1fe0dcd0.js → focus-utils-bf7d1e80.js} +1 -1
- package/lib/esm/form-search-ea8e19ae.js +6 -0
- package/lib/esm/{index-84d97bd1.js → index-f813a624.js} +2 -2
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-7c726abb.js → shadow-css-13d024f4.js} +1 -1
- package/lib/esm/token-utils-75f78ca4.js +75 -0
- package/lib/esm/tokens-e110dc89.js +453 -0
- package/lib/esm-es5/{dom-58cd15f6.js → dom-5d060ace.js} +0 -0
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +2 -2
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table-button.entry.js +4 -0
- package/lib/esm-es5/duet-editable-table_4.entry.js +4 -0
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +4 -0
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +2 -2
- package/lib/esm-es5/duet-header_2.entry.js +2 -2
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-tab_2.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +4 -0
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-1fe0dcd0.js → focus-utils-bf7d1e80.js} +1 -1
- package/lib/esm-es5/form-search-ea8e19ae.js +4 -0
- package/lib/esm-es5/{index-84d97bd1.js → index-f813a624.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{shadow-css-7c726abb.js → shadow-css-13d024f4.js} +0 -0
- package/lib/esm-es5/token-utils-75f78ca4.js +4 -0
- package/lib/esm-es5/tokens-e110dc89.js +4 -0
- package/lib/html.html-data.json +4925 -0
- package/lib/types/common-types.d.ts +0 -1
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +3 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +1 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +5 -1
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +1 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +10 -0
- package/lib/types/components/duet-grid/duet-grid.d.ts +1 -0
- package/lib/types/components/duet-header/duet-header-dropdown.d.ts +16 -0
- package/lib/types/components/duet-header/duet-header-hamburger.d.ts +2 -0
- package/lib/types/components/duet-header/duet-header-icon.d.ts +8 -0
- package/lib/types/components/duet-header/duet-header.d.ts +41 -4
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-link/duet-link.d.ts +3 -0
- package/lib/types/components/duet-table/duet-table.d.ts +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +46 -18
- package/lib/types/components/duet-upload/{duet-upload-editable-item-error.d.ts → upload-editable-item-error.d.ts} +0 -0
- package/lib/types/components/duet-upload/{duet-upload-editable-item-inprogres.d.ts → upload-editable-item-inprogres.d.ts} +0 -0
- package/lib/types/components/duet-upload/{duet-upload-editable-item-success.d.ts → upload-editable-item-success.d.ts} +0 -0
- package/lib/types/components/duet-upload/{duet-upload-validators.d.ts → upload-validators.d.ts} +0 -0
- package/lib/types/components/{duet-upload → duet-upload-aria-status}/duet-upload-aria-status.d.ts +2 -2
- package/lib/types/components.d.ts +71 -35
- package/lib/types/stencil-public-runtime.d.ts +6 -4
- package/lib/types/utils/template-utils.d.ts +13 -0
- package/lib/types/utils/token-utils.d.ts +8 -2
- package/package.json +13 -13
- package/lib/cjs/duet-editable-table-button_3.cjs.entry.js +0 -232
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +0 -336
- package/lib/cjs/js-utils-33a9dbe3.js +0 -16
- package/lib/cjs/token-utils-63a9c8dc.js +0 -30
- package/lib/duet/p-10deead0.system.js +0 -4
- package/lib/duet/p-1208c84f.entry.js +0 -4
- package/lib/duet/p-155ef581.system.entry.js +0 -4
- package/lib/duet/p-16c48c5d.entry.js +0 -4
- package/lib/duet/p-1797df7b.system.entry.js +0 -4
- package/lib/duet/p-1a08fc22.system.entry.js +0 -4
- package/lib/duet/p-28e02c08.entry.js +0 -4
- package/lib/duet/p-33c58756.entry.js +0 -4
- package/lib/duet/p-3c1971d8.js +0 -4
- package/lib/duet/p-5ea0cd19.entry.js +0 -4
- package/lib/duet/p-63d5bf73.system.entry.js +0 -4
- package/lib/duet/p-6cc3be76.system.entry.js +0 -4
- package/lib/duet/p-6e363557.system.js +0 -4
- package/lib/duet/p-7368b14e.system.entry.js +0 -4
- package/lib/duet/p-7e8d5bb9.system.entry.js +0 -4
- package/lib/duet/p-81867417.system.js +0 -4
- package/lib/duet/p-9d73343a.entry.js +0 -4
- package/lib/duet/p-a6a84ec6.entry.js +0 -4
- package/lib/duet/p-b25d3769.js +0 -4
- package/lib/duet/p-c34329f3.entry.js +0 -4
- package/lib/duet/p-de07c7d7.entry.js +0 -4
- package/lib/duet/p-f0a4b68d.system.entry.js +0 -4
- package/lib/duet/p-f364eb96.entry.js +0 -4
- package/lib/esm/duet-editable-table-button_3.entry.js +0 -226
- package/lib/esm/duet-editable-table_3.entry.js +0 -330
- package/lib/esm/js-utils-b69f17df.js +0 -14
- package/lib/esm/token-utils-590d9413.js +0 -28
- package/lib/esm-es5/duet-editable-table-button_3.entry.js +0 -4
- package/lib/esm-es5/duet-editable-table_3.entry.js +0 -4
- package/lib/esm-es5/duet-upload.entry.js +0 -4
- package/lib/esm-es5/js-utils-b69f17df.js +0 -4
- package/lib/esm-es5/token-utils-590d9413.js +0 -4
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-84d97bd1.js';
|
|
5
|
-
import { g as getLocaleString } from './language-utils-344d894c.js';
|
|
6
|
-
import { i as inheritGlobalTheme } from './themeable-component-572685dd.js';
|
|
7
|
-
import { g as getColorByName } from './token-utils-590d9413.js';
|
|
8
|
-
import { c as createID } from './create-id-981107da.js';
|
|
9
|
-
import './string-utils-2f1793b8.js';
|
|
10
|
-
import './tokens.module-49cbf963.js';
|
|
11
|
-
|
|
12
|
-
const duetEditableTableButtonCss = "*.sc-duet-editable-table-button,*.sc-duet-editable-table-button::after,*.sc-duet-editable-table-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button{display:flex;align-content:space-between;justify-content:center;min-width:32px;max-width:32px;height:100%;min-height:32px;max-height:32px;padding:0;margin:0;cursor:pointer !important;background-color:transparent;border:1px solid;border-radius:50%}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button duet-icon.sc-duet-editable-table-button{align-self:center}";
|
|
13
|
-
|
|
14
|
-
let DuetEditableTableButton = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
registerInstance(this, hostRef);
|
|
17
|
-
this.duetEditableItemAction = createEvent(this, "duetEditableItemAction", 7);
|
|
18
|
-
this.isHovering = false;
|
|
19
|
-
/**
|
|
20
|
-
* Theme of the empty state component.
|
|
21
|
-
*/
|
|
22
|
-
this.theme = "";
|
|
23
|
-
/**
|
|
24
|
-
* action items passed from host component
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
this.actions = undefined;
|
|
28
|
-
/**
|
|
29
|
-
* uid that gets passed along when the action is emitted
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
this.uid = "";
|
|
33
|
-
/**
|
|
34
|
-
* group associated with action
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
this.group = "";
|
|
38
|
-
/**
|
|
39
|
-
* key of the item in the map
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
this.keyName = "";
|
|
43
|
-
this.onMouseEnter = () => {
|
|
44
|
-
this.isHovering = true;
|
|
45
|
-
};
|
|
46
|
-
this.onMouseLeave = () => {
|
|
47
|
-
this.isHovering = false;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
/**
|
|
52
|
-
* Component lifecycle events.
|
|
53
|
-
*/
|
|
54
|
-
componentWillLoad() {
|
|
55
|
-
inheritGlobalTheme(this);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
/**
|
|
59
|
-
* private functions
|
|
60
|
-
*/
|
|
61
|
-
emitActionEvent(ev) {
|
|
62
|
-
this.duetEditableItemAction.emit({
|
|
63
|
-
originalEvent: ev,
|
|
64
|
-
uid: this.uid,
|
|
65
|
-
group: this.group,
|
|
66
|
-
action: this.actions.id,
|
|
67
|
-
keyName: this.keyName,
|
|
68
|
-
component: "duet-editable-table-item",
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* render() function
|
|
73
|
-
* Always the last one in the class.
|
|
74
|
-
*/
|
|
75
|
-
render() {
|
|
76
|
-
return (h("button", { style: {
|
|
77
|
-
"border-color": this.isHovering
|
|
78
|
-
? getColorByName(this.actions.color_hover)
|
|
79
|
-
: getColorByName(this.actions.color),
|
|
80
|
-
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) }, h("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.isHovering ? this.actions.color_hover : this.actions.color, margin: "none" })));
|
|
81
|
-
}
|
|
82
|
-
get el() { return getElement(this); }
|
|
83
|
-
};
|
|
84
|
-
DuetEditableTableButton.style = duetEditableTableButtonCss;
|
|
85
|
-
|
|
86
|
-
const duetFieldsetCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{border:0}legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
87
|
-
|
|
88
|
-
let DuetFieldset = class {
|
|
89
|
-
constructor(hostRef) {
|
|
90
|
-
registerInstance(this, hostRef);
|
|
91
|
-
this.errorId = createID("DuetError");
|
|
92
|
-
this.labelId = createID("DuetLabel");
|
|
93
|
-
this.hasTooltip = false;
|
|
94
|
-
/**
|
|
95
|
-
* Theme of the fieldset.
|
|
96
|
-
*/
|
|
97
|
-
this.theme = "";
|
|
98
|
-
/**
|
|
99
|
-
* Controls the margin of the component.
|
|
100
|
-
*/
|
|
101
|
-
this.margin = "auto";
|
|
102
|
-
/**
|
|
103
|
-
* Visually hide the label, but still show it to screen readers.
|
|
104
|
-
*/
|
|
105
|
-
this.labelHidden = false;
|
|
106
|
-
this.checkHasTooltip = () => {
|
|
107
|
-
this.hasTooltip = !!this.element.querySelector("[slot='tooltip']");
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Component lifecycle events.
|
|
112
|
-
*/
|
|
113
|
-
componentWillLoad() {
|
|
114
|
-
inheritGlobalTheme(this);
|
|
115
|
-
this.checkHasTooltip();
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* render() function
|
|
119
|
-
* Always the last one in the class.
|
|
120
|
-
*/
|
|
121
|
-
render() {
|
|
122
|
-
return (h(Host, { class: { "duet-m-0": this.margin === "none" } }, h("fieldset", { "aria-labelledby": `${this.labelId} ${this.errorId}`, class: {
|
|
123
|
-
"duet-fieldset": true,
|
|
124
|
-
"duet-theme-turva": this.theme === "turva",
|
|
125
|
-
} }, h("legend", { id: this.labelId }, h("span", null, this.label), this.caption && h("span", null, this.caption)), h("div", { class: {
|
|
126
|
-
"duet-legend-wrapper": true,
|
|
127
|
-
"duet-legend-has-caption": !!this.caption,
|
|
128
|
-
"duet-legend-has-tooltip": this.hasTooltip,
|
|
129
|
-
"duet-legend-hidden": this.labelHidden,
|
|
130
|
-
} }, h("div", { class: "duet-fieldset-label" }, h("span", { "aria-hidden": "true" }, this.label), h("slot", { onSlotchange: this.checkHasTooltip, name: "tooltip" })), this.caption && (h("div", { class: "duet-fieldset-caption", "aria-hidden": "true" }, h("duet-caption", { margin: "none" }, this.caption)))), h("slot", null), h("span", { class: "duet-fieldset-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h("span", null, this.error)))));
|
|
131
|
-
}
|
|
132
|
-
get element() { return getElement(this); }
|
|
133
|
-
};
|
|
134
|
-
DuetFieldset.style = duetFieldsetCss;
|
|
135
|
-
|
|
136
|
-
let DuetUploadAriaStatus = class {
|
|
137
|
-
constructor(hostRef) {
|
|
138
|
-
registerInstance(this, hostRef);
|
|
139
|
-
/**
|
|
140
|
-
* State() variables
|
|
141
|
-
*/
|
|
142
|
-
this.statusMessage = null;
|
|
143
|
-
/**
|
|
144
|
-
* State() variables
|
|
145
|
-
*/
|
|
146
|
-
this.statusMessageLabel = null;
|
|
147
|
-
/**
|
|
148
|
-
* Adds accessible label that is read aloud
|
|
149
|
-
*/
|
|
150
|
-
this.accessibleAriaLive = "polite";
|
|
151
|
-
/**
|
|
152
|
-
* valid file amount
|
|
153
|
-
*/
|
|
154
|
-
this.valid = undefined;
|
|
155
|
-
/**
|
|
156
|
-
* total files
|
|
157
|
-
*/
|
|
158
|
-
this.total = undefined;
|
|
159
|
-
/**
|
|
160
|
-
* invalid file amount
|
|
161
|
-
*/
|
|
162
|
-
this.invalid = undefined;
|
|
163
|
-
/**
|
|
164
|
-
* valid file amount
|
|
165
|
-
*/
|
|
166
|
-
this.inprogress = undefined;
|
|
167
|
-
/**
|
|
168
|
-
* Component lifecycle events.
|
|
169
|
-
*/
|
|
170
|
-
this.replacePlaceHolders = (statusString) => {
|
|
171
|
-
const addFiles = (amount) => {
|
|
172
|
-
return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
|
|
173
|
-
};
|
|
174
|
-
return statusString
|
|
175
|
-
.replace("{filesUploaded}", addFiles(this.valid))
|
|
176
|
-
.replace("{filesInProgress}", addFiles(this.inprogress))
|
|
177
|
-
.replace("{filesTotal}", addFiles(this.total))
|
|
178
|
-
.replace("{filesWithErrors}", addFiles(this.invalid));
|
|
179
|
-
};
|
|
180
|
-
this.getStatusMessage = () => {
|
|
181
|
-
const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
|
|
182
|
-
const hasErrors = this.invalid > 0;
|
|
183
|
-
const isInProgress = this.inprogress > 0;
|
|
184
|
-
const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
|
|
185
|
-
const isDone = this.valid === this.total && !isInProgress && !hasErrors;
|
|
186
|
-
const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
|
|
187
|
-
if (isDone) {
|
|
188
|
-
this.statusMessage = this.replacePlaceHolders(done);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
else if (isInProgressWithErrors) {
|
|
192
|
-
this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
else if (isInProgress) {
|
|
196
|
-
this.statusMessage = this.replacePlaceHolders(inProgress);
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
else if (isDoneWithErrors) {
|
|
200
|
-
this.statusMessage = this.replacePlaceHolders(doneWithErrors);
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
return;
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
watchHandler(newValue, oldValue) {
|
|
207
|
-
if (newValue !== oldValue) {
|
|
208
|
-
this.getStatusMessage();
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* render() function
|
|
213
|
-
* Always the last one in the class.
|
|
214
|
-
*/
|
|
215
|
-
render() {
|
|
216
|
-
return (h(Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, h("duet-visually-hidden", null, this.statusMessage)));
|
|
217
|
-
}
|
|
218
|
-
static get watchers() { return {
|
|
219
|
-
"valid": ["watchHandler"],
|
|
220
|
-
"invalid": ["watchHandler"],
|
|
221
|
-
"inprogress": ["watchHandler"],
|
|
222
|
-
"total": ["watchHandler"]
|
|
223
|
-
}; }
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export { DuetEditableTableButton as duet_editable_table_button, DuetFieldset as duet_fieldset, DuetUploadAriaStatus as duet_upload_aria_status };
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-84d97bd1.js';
|
|
5
|
-
import { d as debounce } from './js-utils-b69f17df.js';
|
|
6
|
-
import { s as sanitizeString, g as getLocaleString } from './language-utils-344d894c.js';
|
|
7
|
-
import { i as inheritGlobalTheme } from './themeable-component-572685dd.js';
|
|
8
|
-
import { m as mediaQueryMedium, h as mediaQueryLarge, i as mediaQueryXLarge, j as mediaQueryXxLarge, k as mediaQueryXxxLarge, l as mediaQuerySmall, n as sizeNavigation, s as sizeHeader } from './tokens.module-49cbf963.js';
|
|
9
|
-
import './string-utils-2f1793b8.js';
|
|
10
|
-
|
|
11
|
-
const duetEditableTableCss = "duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";
|
|
12
|
-
|
|
13
|
-
let DuetEditableTable = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
registerInstance(this, hostRef);
|
|
16
|
-
/**
|
|
17
|
-
* State() variables
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
this.tick = Date.now();
|
|
21
|
-
/**
|
|
22
|
-
* Map of items that contain list of things.
|
|
23
|
-
*/
|
|
24
|
-
this.items = new Map();
|
|
25
|
-
/**
|
|
26
|
-
* Array of internationalized defaults for the default groups labels.
|
|
27
|
-
*/
|
|
28
|
-
this.groupsLabelDefaults = {
|
|
29
|
-
fi: "Kaikki",
|
|
30
|
-
en: "All items",
|
|
31
|
-
sv: "Alla objekt",
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Array of internationalized defaults for the default action labels.
|
|
35
|
-
*/
|
|
36
|
-
this.actionLabelDefaults = {
|
|
37
|
-
fi: "Toiminnot",
|
|
38
|
-
en: "Actions",
|
|
39
|
-
sv: "Handlingar",
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
|
|
43
|
-
* @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
|
|
44
|
-
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
|
|
45
|
-
*/
|
|
46
|
-
this.groups = [
|
|
47
|
-
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
48
|
-
];
|
|
49
|
-
/**
|
|
50
|
-
* Array of actions that are mapped via the map variable to the various groups defined in group.
|
|
51
|
-
* @default undefined
|
|
52
|
-
* @example [{
|
|
53
|
-
variation: "default",
|
|
54
|
-
icon: "action-edit-2",
|
|
55
|
-
id: "edit",
|
|
56
|
-
map: ["success"],
|
|
57
|
-
label: {
|
|
58
|
-
fi: " Label",
|
|
59
|
-
en: " Label",
|
|
60
|
-
sv: " Label",
|
|
61
|
-
}
|
|
62
|
-
}]
|
|
63
|
-
*/
|
|
64
|
-
this.actions = undefined;
|
|
65
|
-
/**
|
|
66
|
-
* Shows or hides the table labels.
|
|
67
|
-
*/
|
|
68
|
-
this.hideGroups = false;
|
|
69
|
-
/**
|
|
70
|
-
* Exposes the aria role for optimizing accessibility.
|
|
71
|
-
*/
|
|
72
|
-
this.accessibleRole = undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Private methods.
|
|
75
|
-
*/
|
|
76
|
-
this.kick = debounce(() => {
|
|
77
|
-
this.tick = Date.now();
|
|
78
|
-
}, 100); // will trigger re-render
|
|
79
|
-
this.filterMap = needle => {
|
|
80
|
-
if (needle === "all") {
|
|
81
|
-
return Array.from(this.items);
|
|
82
|
-
}
|
|
83
|
-
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Component lifecycle events.
|
|
88
|
-
*/
|
|
89
|
-
componentWillLoad() {
|
|
90
|
-
if (typeof this.groups === "string") {
|
|
91
|
-
this.internalGroupArray = sanitizeString(this.groups);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
this.internalGroupArray = this.groups;
|
|
95
|
-
}
|
|
96
|
-
if (typeof this.actions === "string") {
|
|
97
|
-
this.internalActionsArray = sanitizeString(this.actions);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
this.internalActionsArray = this.actions;
|
|
101
|
-
}
|
|
102
|
-
inheritGlobalTheme(this);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Method to force an update of a tabular data array.
|
|
106
|
-
* when called the method will rerender the entire tabular structure.
|
|
107
|
-
*/
|
|
108
|
-
async updateTable(passedItems = undefined) {
|
|
109
|
-
this.items = new Map(passedItems || this.items);
|
|
110
|
-
this.kick();
|
|
111
|
-
}
|
|
112
|
-
render() {
|
|
113
|
-
return (h(Host, { class: {
|
|
114
|
-
"duet-theme-turva": this.theme === "turva",
|
|
115
|
-
} }, this.internalGroupArray.map(group => {
|
|
116
|
-
const currentGroup = this.filterMap(group.id);
|
|
117
|
-
if (!currentGroup.length) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
return (h("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, h("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, h("thead", { class: "duet-editable-table-header" }, h("tr", null, h("th", { class: {
|
|
121
|
-
"duet-editable-table-header-hidden": this.hideGroups,
|
|
122
|
-
} }, !this.hideGroups ? (getLocaleString(group.label)) : (h("duet-visually-hidden", null, getLocaleString(group.label)))), h("th", { class: {
|
|
123
|
-
"duet-editable-table-header-hidden": this.hideGroups,
|
|
124
|
-
} }, h("duet-visually-hidden", null, group.actionLabel
|
|
125
|
-
? getLocaleString(group.actionLabel)
|
|
126
|
-
: getLocaleString(this.actionLabelDefaults))))), h("tbody", null, currentGroup.map(dataAsArray => {
|
|
127
|
-
const [key, value] = dataAsArray;
|
|
128
|
-
return (h("duet-editable-table-item", { keyName: key, data: Object.assign({}, value), groupId: group.id, part: group.id, actions: this.internalActionsArray }));
|
|
129
|
-
})))));
|
|
130
|
-
})));
|
|
131
|
-
}
|
|
132
|
-
get element() { return getElement(this); }
|
|
133
|
-
};
|
|
134
|
-
DuetEditableTable.style = duetEditableTableCss;
|
|
135
|
-
|
|
136
|
-
//simple functional component that renders the data in the table
|
|
137
|
-
const TableData = ({ data, groupId }, _children) => {
|
|
138
|
-
if (typeof data === "string") {
|
|
139
|
-
return h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content` });
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
return (h("td", { class: "duet-editable-table-content", part: `${groupId}content` }, data));
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
const duetEditableTableItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";
|
|
147
|
-
|
|
148
|
-
let DuetEditableTableItem = class {
|
|
149
|
-
constructor(hostRef) {
|
|
150
|
-
registerInstance(this, hostRef);
|
|
151
|
-
this.duetEditableItemAction = createEvent(this, "duetEditableItemAction", 7);
|
|
152
|
-
this.isHovering = false;
|
|
153
|
-
/**
|
|
154
|
-
* Theme of the empty state component.
|
|
155
|
-
*/
|
|
156
|
-
this.theme = "";
|
|
157
|
-
/**
|
|
158
|
-
* Actions that can be performed on the element
|
|
159
|
-
*/
|
|
160
|
-
this.actions = undefined;
|
|
161
|
-
/**
|
|
162
|
-
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
163
|
-
* @internal
|
|
164
|
-
*/
|
|
165
|
-
this.groupId = "";
|
|
166
|
-
/**
|
|
167
|
-
* Key used to identify item, when running actions
|
|
168
|
-
*/
|
|
169
|
-
this.keyName = "";
|
|
170
|
-
/**
|
|
171
|
-
* Object of data itemsused to render the entire row
|
|
172
|
-
*/
|
|
173
|
-
this.data = undefined;
|
|
174
|
-
}
|
|
175
|
-
watchPropHandler(_newValue, _oldValue) {
|
|
176
|
-
// console.log("The new value of activated is: ", _newValue)
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
/**
|
|
180
|
-
* Component lifecycle events.
|
|
181
|
-
*/
|
|
182
|
-
componentWillLoad() {
|
|
183
|
-
inheritGlobalTheme(this);
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
/**
|
|
187
|
-
* private functions
|
|
188
|
-
*/
|
|
189
|
-
/**
|
|
190
|
-
* render() function
|
|
191
|
-
* Always the last one in the class.
|
|
192
|
-
*/
|
|
193
|
-
render() {
|
|
194
|
-
return (h(Host, { role: "row" }, h(TableData, { data: this.data.item, groupId: this.groupId }), h("td", { class: "duet-editable-table-actions" }, h("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
195
|
-
const { map = undefined } = result;
|
|
196
|
-
// if map has been specified, only show the current action if groupID matches the map array
|
|
197
|
-
if (map && !map.includes(this.groupId)) {
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
return (h("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
201
|
-
})))));
|
|
202
|
-
}
|
|
203
|
-
get el() { return getElement(this); }
|
|
204
|
-
static get watchers() { return {
|
|
205
|
-
"data": ["watchPropHandler"]
|
|
206
|
-
}; }
|
|
207
|
-
};
|
|
208
|
-
DuetEditableTableItem.style = duetEditableTableItemCss;
|
|
209
|
-
|
|
210
|
-
const duetTableCss = "duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}";
|
|
211
|
-
|
|
212
|
-
// remove wrapping speech marks.
|
|
213
|
-
// media query tokens are wrapped in speech marks,
|
|
214
|
-
// which need to be removed before use with matchMedia.
|
|
215
|
-
const unwrap = (str) => str.substring(1, str.length - 1);
|
|
216
|
-
const breakpointToToken = {
|
|
217
|
-
none: "all",
|
|
218
|
-
"none-scrollable": "all",
|
|
219
|
-
small: unwrap(mediaQuerySmall),
|
|
220
|
-
medium: unwrap(mediaQueryMedium),
|
|
221
|
-
large: unwrap(mediaQueryLarge),
|
|
222
|
-
"x-large": unwrap(mediaQueryXLarge),
|
|
223
|
-
"xx-large": unwrap(mediaQueryXxLarge),
|
|
224
|
-
"xxx-large": unwrap(mediaQueryXxxLarge),
|
|
225
|
-
};
|
|
226
|
-
const stickyTopValues = {
|
|
227
|
-
none: 0,
|
|
228
|
-
"with-links": parseFloat(sizeNavigation) * 16,
|
|
229
|
-
"without-links": parseFloat(sizeHeader) * 16,
|
|
230
|
-
};
|
|
231
|
-
let DuetTable = class {
|
|
232
|
-
constructor(hostRef) {
|
|
233
|
-
registerInstance(this, hostRef);
|
|
234
|
-
/**
|
|
235
|
-
* Tracks whether the breakpoint is matched. This is set to true by default so that JavaScript disabled in SSR mode we get accessible table data first.
|
|
236
|
-
*/
|
|
237
|
-
this.matchesBreakpoint = true;
|
|
238
|
-
/**
|
|
239
|
-
* Controls the margin of the component.
|
|
240
|
-
*/
|
|
241
|
-
this.margin = "auto";
|
|
242
|
-
/**
|
|
243
|
-
* Style variation of the table.
|
|
244
|
-
*/
|
|
245
|
-
this.variation = "striped";
|
|
246
|
-
/**
|
|
247
|
-
* Controls whether the table has a sticky header.
|
|
248
|
-
* Sticky headers are not compatible with breakpoint="none-scrollable".
|
|
249
|
-
*/
|
|
250
|
-
this.sticky = false;
|
|
251
|
-
/**
|
|
252
|
-
* Adjust the distance from top of the viewport (in pixels) when the
|
|
253
|
-
* table header becomes sticky.
|
|
254
|
-
*/
|
|
255
|
-
this.stickyDistance = "with-links";
|
|
256
|
-
/**
|
|
257
|
-
* By default the table is responsive - it will be flattened at narrow viewport widths.
|
|
258
|
-
* This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
|
|
259
|
-
* Set to "none" to disable the responsive functionality.
|
|
260
|
-
* Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
|
|
261
|
-
* this is useful for comparison tables where it's important to maintain column and row layout.
|
|
262
|
-
*/
|
|
263
|
-
this.breakpoint = "small";
|
|
264
|
-
this.handleMediaQueryChange = (mq) => {
|
|
265
|
-
this.matchesBreakpoint = mq.matches;
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
connectedCallback() {
|
|
269
|
-
this.mq = matchMedia(breakpointToToken[this.breakpoint]);
|
|
270
|
-
this.mq.addListener(this.handleMediaQueryChange);
|
|
271
|
-
this.handleMediaQueryChange(this.mq);
|
|
272
|
-
this.observer = new MutationObserver(() => this.copyHeadingsToCells());
|
|
273
|
-
this.observer.observe(this.element, {
|
|
274
|
-
childList: true,
|
|
275
|
-
subtree: true,
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
componentWillLoad() {
|
|
279
|
-
inheritGlobalTheme(this);
|
|
280
|
-
this.copyHeadingsToCells();
|
|
281
|
-
if (this.sticky && this.breakpoint === "none-scrollable") {
|
|
282
|
-
console.warn(`[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence`);
|
|
283
|
-
}
|
|
284
|
-
if (this.sticky) {
|
|
285
|
-
const stickyTop = stickyTopValues[this.stickyDistance];
|
|
286
|
-
const headingElements = this.element.querySelectorAll("thead th");
|
|
287
|
-
headingElements.forEach(th => (th.style.top = `${stickyTop}px`));
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
componentDidLoad() {
|
|
291
|
-
// this clears all pending mutations,
|
|
292
|
-
// that way we avoid dealing with any initial changes
|
|
293
|
-
// and only get genuine mutations as rows are added/removed
|
|
294
|
-
this.observer.takeRecords();
|
|
295
|
-
}
|
|
296
|
-
disconnectedCallback() {
|
|
297
|
-
this.observer.disconnect();
|
|
298
|
-
this.observer = null;
|
|
299
|
-
this.mq.removeListener(this.handleMediaQueryChange);
|
|
300
|
-
this.mq = null;
|
|
301
|
-
this.matchesBreakpoint = true;
|
|
302
|
-
}
|
|
303
|
-
copyHeadingsToCells() {
|
|
304
|
-
const headingElements = this.element.querySelectorAll("thead th");
|
|
305
|
-
const rowElements = this.element.querySelectorAll("tbody tr");
|
|
306
|
-
const headings = Array.from(headingElements).map(th => th.textContent.trim());
|
|
307
|
-
rowElements.forEach(tr => {
|
|
308
|
-
tr.querySelectorAll("td").forEach((td, i) => {
|
|
309
|
-
if (headings[i]) {
|
|
310
|
-
td.dataset.heading = headings[i];
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
render() {
|
|
316
|
-
return (h(Host, { class: {
|
|
317
|
-
[`duet-table-${this.variation}`]: true,
|
|
318
|
-
"duet-table-flattened": !this.matchesBreakpoint,
|
|
319
|
-
// sticky only valid when in regular table layout
|
|
320
|
-
"duet-table-sticky": this.matchesBreakpoint && this.sticky,
|
|
321
|
-
"duet-table-scrollable": this.breakpoint === "none-scrollable",
|
|
322
|
-
"duet-m-0": this.margin === "none",
|
|
323
|
-
"duet-theme-turva": this.theme === "turva",
|
|
324
|
-
} }, h("slot", null)));
|
|
325
|
-
}
|
|
326
|
-
get element() { return getElement(this); }
|
|
327
|
-
};
|
|
328
|
-
DuetTable.style = duetTableCss;
|
|
329
|
-
|
|
330
|
-
export { DuetEditableTable as duet_editable_table, DuetEditableTableItem as duet_editable_table_item, DuetTable as duet_table };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
const debounce = (func, timeout = 50) => {
|
|
5
|
-
let timer;
|
|
6
|
-
return (...args) => {
|
|
7
|
-
clearTimeout(timer);
|
|
8
|
-
timer = setTimeout(() => {
|
|
9
|
-
func.apply(undefined, args);
|
|
10
|
-
}, timeout);
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { debounce as d };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import { t as tokens } from './tokens.module-49cbf963.js';
|
|
5
|
-
|
|
6
|
-
const MATCH_DASH_CASE = /-([a-z])/g;
|
|
7
|
-
function replaceDashCase(g) {
|
|
8
|
-
return g[1].toUpperCase();
|
|
9
|
-
}
|
|
10
|
-
function convertToCamelCase(string) {
|
|
11
|
-
return string.replace(MATCH_DASH_CASE, replaceDashCase);
|
|
12
|
-
}
|
|
13
|
-
function convertToColorName(name) {
|
|
14
|
-
if (name.indexOf("color-") === -1 && name.indexOf("-") !== -1) {
|
|
15
|
-
return convertToCamelCase(`color-${name}`);
|
|
16
|
-
}
|
|
17
|
-
if (name.indexOf("color") === -1) {
|
|
18
|
-
return convertToCamelCase(`color${name.charAt(0).toUpperCase()}${name.slice(1)}`);
|
|
19
|
-
}
|
|
20
|
-
return convertToCamelCase(name);
|
|
21
|
-
}
|
|
22
|
-
function getColorByName(name) {
|
|
23
|
-
if (name) {
|
|
24
|
-
return tokens[convertToColorName(name)];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { getColorByName as g };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-84d97bd1.js";import{g as getLocaleString}from"./language-utils-344d894c.js";import{i as inheritGlobalTheme}from"./themeable-component-572685dd.js";import{g as getColorByName}from"./token-utils-590d9413.js";import{c as createID}from"./create-id-981107da.js";import"./string-utils-2f1793b8.js";import"./tokens.module-49cbf963.js";var duetEditableTableButtonCss="*.sc-duet-editable-table-button,*.sc-duet-editable-table-button::after,*.sc-duet-editable-table-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button{display:flex;align-content:space-between;justify-content:center;min-width:32px;max-width:32px;height:100%;min-height:32px;max-height:32px;padding:0;margin:0;cursor:pointer !important;background-color:transparent;border:1px solid;border-radius:50%}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button duet-icon.sc-duet-editable-table-button{align-self:center}";var DuetEditableTableButton=function(){function e(e){var t=this;registerInstance(this,e);this.duetEditableItemAction=createEvent(this,"duetEditableItemAction",7);this.isHovering=false;this.theme="";this.actions=undefined;this.uid="";this.group="";this.keyName="";this.onMouseEnter=function(){t.isHovering=true};this.onMouseLeave=function(){t.isHovering=false}}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.emitActionEvent=function(e){this.duetEditableItemAction.emit({originalEvent:e,uid:this.uid,group:this.group,action:this.actions.id,keyName:this.keyName,component:"duet-editable-table-item"})};e.prototype.render=function(){var e=this;return h("button",{style:{"border-color":this.isHovering?getColorByName(this.actions.color_hover):getColorByName(this.actions.color)},onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,role:"menuitem",class:"duet-editable-table-actions-items-button","aria-label":this.actions.label?getLocaleString(this.actions.label):undefined,onClick:function(t){return e.emitActionEvent(t)}},h("duet-icon",{class:"duet-editable-table-actions-items-icon",size:"x-small",name:this.actions.icon,color:this.isHovering?this.actions.color_hover:this.actions.color,margin:"none"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetEditableTableButton.style=duetEditableTableButtonCss;var duetFieldsetCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{border:0}legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var DuetFieldset=function(){function e(e){var t=this;registerInstance(this,e);this.errorId=createID("DuetError");this.labelId=createID("DuetLabel");this.hasTooltip=false;this.theme="";this.margin="auto";this.labelHidden=false;this.checkHasTooltip=function(){t.hasTooltip=!!t.element.querySelector("[slot='tooltip']")}}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.checkHasTooltip()};e.prototype.render=function(){return h(Host,{class:{"duet-m-0":this.margin==="none"}},h("fieldset",{"aria-labelledby":this.labelId+" "+this.errorId,class:{"duet-fieldset":true,"duet-theme-turva":this.theme==="turva"}},h("legend",{id:this.labelId},h("span",null,this.label),this.caption&&h("span",null,this.caption)),h("div",{class:{"duet-legend-wrapper":true,"duet-legend-has-caption":!!this.caption,"duet-legend-has-tooltip":this.hasTooltip,"duet-legend-hidden":this.labelHidden}},h("div",{class:"duet-fieldset-label"},h("span",{"aria-hidden":"true"},this.label),h("slot",{onSlotchange:this.checkHasTooltip,name:"tooltip"})),this.caption&&h("div",{class:"duet-fieldset-caption","aria-hidden":"true"},h("duet-caption",{margin:"none"},this.caption))),h("slot",null),h("span",{class:"duet-fieldset-help",id:this.errorId,"aria-live":"assertive","aria-relevant":"additions removals"},this.error&&h("span",null,this.error))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetFieldset.style=duetFieldsetCss;var DuetUploadAriaStatus=function(){function e(e){var t=this;registerInstance(this,e);this.statusMessage=null;this.statusMessageLabel=null;this.accessibleAriaLive="polite";this.valid=undefined;this.total=undefined;this.invalid=undefined;this.inprogress=undefined;this.replacePlaceHolders=function(e){var i=function(e){return e>1?e+" "+t.statusMessageLabel.files:e+" "+t.statusMessageLabel.file};return e.replace("{filesUploaded}",i(t.valid)).replace("{filesInProgress}",i(t.inprogress)).replace("{filesTotal}",i(t.total)).replace("{filesWithErrors}",i(t.invalid))};this.getStatusMessage=function(){var e=t.statusMessageLabel,i=e.done,a=e.inProgress,o=e.doneWithErrors,n=e.inProgressWithErrors;var s=t.invalid>0;var r=t.inprogress>0;var l=t.inprogress>0&&s;var d=t.valid===t.total&&!r&&!s;var u=t.valid+t.invalid===t.total&&!r;if(d){t.statusMessage=t.replacePlaceHolders(i);return}else if(l){t.statusMessage=t.replacePlaceHolders(n);return}else if(r){t.statusMessage=t.replacePlaceHolders(a);return}else if(u){t.statusMessage=t.replacePlaceHolders(o);return}return}}e.prototype.watchHandler=function(e,t){if(e!==t){this.getStatusMessage()}};e.prototype.render=function(){return h(Host,{role:"status","aria-live":"assertive","aria-atomic":"true","aria-relevant":"all"},h("duet-visually-hidden",null,this.statusMessage))};Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchHandler"],invalid:["watchHandler"],inprogress:["watchHandler"],total:["watchHandler"]}},enumerable:false,configurable:true});return e}();export{DuetEditableTableButton as duet_editable_table_button,DuetFieldset as duet_fieldset,DuetUploadAriaStatus as duet_upload_aria_status};
|