@duetds/components 4.30.1 → 4.33.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 +1531 -442
- package/lib/cjs/{dom-e89ebf90.js → dom-c850c8d7.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +4 -2
- package/lib/cjs/duet-badge.cjs.entry.js +2 -2
- package/lib/cjs/duet-button_2.cjs.entry.js +6 -5
- package/lib/cjs/duet-caption_4.cjs.entry.js +21 -15
- package/lib/cjs/duet-card.cjs.entry.js +6 -6
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +55 -25
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -2
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +23 -13
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +89 -0
- package/lib/cjs/duet-editable-table_4.cjs.entry.js +1445 -0
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +4 -4
- package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +26 -10
- package/lib/cjs/duet-hero.cjs.entry.js +6 -6
- package/lib/cjs/duet-icon.cjs.entry.js +21 -19
- package/lib/cjs/duet-input_2.cjs.entry.js +7 -7
- 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 +8 -7
- package/lib/cjs/duet-notification_2.cjs.entry.js +6 -5
- package/lib/cjs/duet-number-input.cjs.entry.js +36 -15
- package/lib/cjs/duet-progress.cjs.entry.js +75 -0
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
- package/lib/cjs/duet-select.cjs.entry.js +6 -6
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +12 -6
- package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +21 -10
- package/lib/cjs/duet-tray.cjs.entry.js +21 -10
- 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-7605778f.js → focus-utils-b609a7a5.js} +1 -1
- package/lib/cjs/{index-0c949193.js → index-9a57d969.js} +95 -77
- package/lib/cjs/{language-utils-70d6a9a4.js → language-utils-aa282901.js} +28 -9
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-0c8c175b.js → shadow-css-e3edeed1.js} +9 -10
- package/lib/cjs/{string-utils-a6de43d8.js → string-utils-267e3dbb.js} +7 -0
- package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
- package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
- package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
- package/lib/collection/collection-manifest.json +16 -8
- package/lib/collection/components/duet-alert/duet-alert.js +12 -6
- package/lib/collection/components/duet-badge/duet-badge.css +1 -0
- package/lib/collection/components/duet-button/duet-button.js +17 -15
- package/lib/collection/components/duet-card/duet-card.css +30 -7
- package/lib/collection/components/duet-card/duet-card.js +4 -3
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.css +16 -3
- package/lib/collection/components/duet-choice/duet-choice.js +122 -36
- package/lib/collection/components/duet-choice-group/duet-choice-group.css +1 -0
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +4 -4
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +78 -43
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +218 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +203 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +348 -0
- package/lib/collection/components/duet-footer/duet-footer.js +17 -15
- package/lib/collection/components/duet-grid/duet-grid.js +57 -6
- package/lib/collection/components/duet-grid-item/duet-grid-item.js +4 -4
- package/lib/collection/components/duet-header/duet-header.js +60 -35
- package/lib/collection/components/duet-heading/duet-heading.css +4 -0
- package/lib/collection/components/duet-heading/duet-heading.js +7 -6
- package/lib/collection/components/duet-hero/duet-hero.js +20 -15
- package/lib/collection/components/duet-icon/duet-icon.js +2 -6
- package/lib/collection/components/duet-icon/icon-utils.js +20 -13
- package/lib/collection/components/duet-input/duet-input.css +15 -0
- package/lib/collection/components/duet-input/duet-input.js +4 -4
- package/lib/collection/components/duet-label/duet-label.css +2 -0
- package/lib/collection/components/duet-link/duet-link.js +18 -19
- package/lib/collection/components/duet-logo/duet-logo.js +4 -4
- package/lib/collection/components/duet-modal/duet-modal.js +22 -17
- package/lib/collection/components/duet-notification/duet-notification.js +8 -8
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +20 -15
- package/lib/collection/components/duet-number-input/duet-number-input.js +153 -29
- package/lib/collection/components/duet-paragraph/duet-paragraph.css +6 -0
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
- package/lib/collection/components/duet-progress/duet-progress.css +103 -0
- package/lib/collection/components/duet-progress/duet-progress.js +240 -0
- package/lib/collection/components/duet-radio/duet-radio.js +6 -6
- package/lib/collection/components/duet-select/duet-select.css +15 -0
- package/lib/collection/components/duet-select/duet-select.js +3 -3
- package/lib/collection/components/duet-step/duet-step.js +8 -8
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +43 -12
- package/lib/collection/components/duet-textarea/duet-textarea.css +19 -0
- package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
- package/lib/collection/components/duet-tooltip/duet-tooltip.js +82 -20
- package/lib/collection/components/duet-tray/duet-tray.js +79 -17
- package/lib/collection/components/duet-upload/duet-upload.css +17 -86
- package/lib/collection/components/duet-upload/duet-upload.js +587 -164
- package/lib/collection/components/duet-upload/errorcodes.utils.js +16 -4
- package/lib/collection/components/duet-upload/upload-editable-item-error.js +16 -0
- package/lib/collection/components/duet-upload/upload-editable-item-inprogres.js +8 -0
- package/lib/collection/components/duet-upload/upload-editable-item-success.js +30 -0
- package/lib/collection/components/duet-upload/{duet-upload-validators.js → upload-validators.js} +0 -0
- package/lib/collection/components/duet-upload/xhr.helpers.js +2 -6
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +217 -0
- package/lib/collection/utils/fixture-utils.js +7 -5
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +26 -9
- package/lib/collection/utils/string-utils.js +6 -0
- package/lib/collection/utils/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +30 -0
- package/lib/custom-elements-bundle/index.js +1651 -730
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/p-00210a63.entry.js +4 -0
- package/lib/duet/{p-66dde4d2.entry.js → p-0205162d.entry.js} +1 -1
- package/lib/duet/{p-3dc9d15d.system.entry.js → p-020a2c42.system.entry.js} +1 -1
- package/lib/duet/{p-59a07cf9.entry.js → p-079795e5.entry.js} +1 -1
- package/lib/duet/p-09013a48.system.entry.js +4 -0
- package/lib/duet/p-0a89315d.entry.js +4 -0
- package/lib/duet/p-0d22396e.system.js +16 -0
- package/lib/duet/p-0e90f075.system.entry.js +4 -0
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/p-19d7d9d5.system.entry.js +4 -0
- package/lib/duet/p-1cbc6269.entry.js +4 -0
- package/lib/duet/p-2297d13f.system.entry.js +4 -0
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/p-2a822e91.system.entry.js +4 -0
- package/lib/duet/{p-f81d8534.entry.js → p-2fdcff82.entry.js} +1 -1
- package/lib/duet/p-3013c9bb.system.entry.js +4 -0
- package/lib/duet/p-3212a556.entry.js +4 -0
- package/lib/duet/{p-dee41056.system.entry.js → p-323643af.system.entry.js} +1 -1
- package/lib/duet/p-32b7397d.entry.js +4 -0
- package/lib/duet/{p-bd9a7d8f.js → p-35a3794e.js} +0 -0
- package/lib/duet/p-360086f8.entry.js +4 -0
- package/lib/duet/{p-f71f12ed.entry.js → p-37cda933.entry.js} +1 -1
- package/lib/duet/{p-62806bb6.system.entry.js → p-3ba62cf1.system.entry.js} +1 -1
- package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
- package/lib/duet/p-3fd9190b.system.entry.js +4 -0
- package/lib/duet/p-43847557.entry.js +4 -0
- package/lib/duet/{p-bbc229d8.system.entry.js → p-4b6e8558.system.entry.js} +1 -1
- package/lib/duet/p-4c5eedf8.entry.js +4 -0
- package/lib/duet/p-4c827f0d.entry.js +4 -0
- package/lib/duet/{p-de2be65b.system.js → p-51955fc0.system.js} +1 -1
- package/lib/duet/p-5cfc53f9.entry.js +4 -0
- package/lib/duet/p-5decc259.system.entry.js +4 -0
- package/lib/duet/p-5e0071d6.js +4 -0
- package/lib/duet/p-5e77432e.system.entry.js +4 -0
- package/lib/duet/{p-ce1374a4.system.entry.js → p-6024e484.system.entry.js} +1 -1
- package/lib/duet/p-68008644.entry.js +4 -0
- package/lib/duet/p-69385972.system.entry.js +4 -0
- package/lib/duet/p-6a4d85ed.system.entry.js +4 -0
- package/lib/duet/{p-f82709ba.entry.js → p-6a5ab3eb.entry.js} +1 -1
- package/lib/duet/p-6e363557.system.js +4 -0
- package/lib/duet/p-6e4b1c0d.entry.js +4 -0
- package/lib/duet/p-6f36f647.system.entry.js +4 -0
- package/lib/duet/p-6fa6c4fb.system.entry.js +4 -0
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/p-71a77368.system.entry.js +4 -0
- package/lib/duet/p-73f9db25.system.entry.js +4 -0
- package/lib/duet/p-74f4a0d8.system.entry.js +4 -0
- package/lib/duet/p-7530be48.system.entry.js +4 -0
- package/lib/duet/{p-36007600.entry.js → p-75edcaed.entry.js} +1 -1
- package/lib/duet/{p-d1817efe.system.entry.js → p-7a8597c2.system.entry.js} +1 -1
- package/lib/duet/{p-1cfe38b1.system.entry.js → p-85ad012a.system.entry.js} +1 -1
- package/lib/duet/{p-a321a98c.entry.js → p-85e52be8.entry.js} +1 -1
- package/lib/duet/p-8aaf3383.entry.js +4 -0
- package/lib/duet/p-986779fb.js +4 -0
- package/lib/duet/p-987edcd0.js +15 -0
- package/lib/duet/{p-35e45c19.system.js → p-9a945278.system.js} +1 -1
- package/lib/duet/p-9e79e033.entry.js +4 -0
- package/lib/duet/{p-7e108b7e.entry.js → p-9f35d682.entry.js} +1 -1
- package/lib/duet/{p-f71e337e.system.entry.js → p-a2a00146.system.entry.js} +1 -1
- package/lib/duet/p-a545398c.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/{p-4a7911fd.entry.js → p-af49d4f9.entry.js} +1 -1
- package/lib/duet/{p-1c41525a.entry.js → p-b25edbbe.entry.js} +1 -1
- package/lib/duet/p-b314348c.system.js +4 -0
- package/lib/duet/p-b4111e88.system.entry.js +4 -0
- package/lib/duet/p-b5c7d304.system.entry.js +4 -0
- package/lib/duet/p-b6e9860a.entry.js +4 -0
- package/lib/duet/p-ba18b56e.entry.js +4 -0
- package/lib/duet/p-bf4596bd.system.entry.js +4 -0
- package/lib/duet/{p-4265de16.system.entry.js → p-bf9f6d80.system.entry.js} +1 -1
- package/lib/duet/{p-fd98468a.system.js → p-c18a599e.system.js} +0 -0
- package/lib/duet/p-c1a1ea1b.js +4 -0
- package/lib/duet/p-c742856b.system.entry.js +4 -0
- package/lib/duet/p-cbdb9e98.system.entry.js +4 -0
- package/lib/duet/{p-27d538f7.system.entry.js → p-cf319832.system.entry.js} +1 -1
- package/lib/duet/p-d67fff56.entry.js +4 -0
- package/lib/duet/{p-031c2cd8.system.entry.js → p-dd76db9b.system.entry.js} +1 -1
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/{p-345ea4f2.system.entry.js → p-de5ec54e.system.entry.js} +1 -1
- package/lib/duet/p-df6f39a3.entry.js +4 -0
- package/lib/duet/p-e1dc86b5.system.js +4 -0
- package/lib/duet/p-e2596ea0.entry.js +4 -0
- package/lib/duet/p-e370c18b.entry.js +4 -0
- package/lib/duet/{p-e26116e0.system.entry.js → p-e48f3a32.system.entry.js} +1 -1
- package/lib/duet/p-e5031543.entry.js +4 -0
- package/lib/duet/p-e60ee8b0.entry.js +4 -0
- package/lib/duet/p-e70088d5.entry.js +4 -0
- package/lib/duet/p-e7b90769.system.entry.js +4 -0
- package/lib/duet/{p-a88df408.entry.js → p-e8123a53.entry.js} +1 -1
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/{p-2d2c45f9.entry.js → p-ef7251bf.entry.js} +1 -1
- package/lib/duet/p-f0cfe033.system.entry.js +4 -0
- package/lib/duet/p-f2a087a8.system.entry.js +4 -0
- package/lib/duet/p-f5a55b3c.entry.js +4 -0
- package/lib/duet/p-fd613733.entry.js +4 -0
- package/lib/esm/{dom-21034390.js → dom-58cd15f6.js} +1 -1
- package/lib/esm/duet-alert.entry.js +4 -2
- package/lib/esm/duet-badge.entry.js +2 -2
- package/lib/esm/duet-button_2.entry.js +6 -5
- package/lib/esm/duet-caption_4.entry.js +21 -15
- package/lib/esm/duet-card.entry.js +6 -6
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +56 -26
- package/lib/esm/duet-collapsible.entry.js +5 -2
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +23 -13
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table-button.entry.js +85 -0
- package/lib/esm/duet-editable-table_4.entry.js +1438 -0
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +4 -4
- package/lib/esm/duet-grid_2.entry.js +52 -4
- package/lib/esm/duet-header_2.entry.js +26 -10
- package/lib/esm/duet-hero.entry.js +6 -6
- package/lib/esm/duet-icon.entry.js +21 -19
- package/lib/esm/duet-input_2.entry.js +7 -7
- 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 +8 -7
- package/lib/esm/duet-notification_2.entry.js +6 -5
- package/lib/esm/duet-number-input.entry.js +36 -15
- package/lib/esm/duet-progress.entry.js +71 -0
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +2 -2
- package/lib/esm/duet-select.entry.js +6 -6
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +12 -6
- package/lib/esm/duet-textarea.entry.js +5 -5
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +21 -10
- package/lib/esm/duet-tray.entry.js +21 -10
- 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-0b12f0df.js → focus-utils-aeb6ca93.js} +1 -1
- package/lib/esm/{index-f70ddc7f.js → index-e8c7d36f.js} +94 -78
- package/lib/esm/{language-utils-ab9c3afc.js → language-utils-344d894c.js} +28 -10
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-31e2d504.js → shadow-css-7c726abb.js} +9 -10
- package/lib/esm/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +7 -1
- package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
- package/lib/esm/watch-options-dd55bce8.js +57 -0
- package/lib/esm-es5/{dom-21034390.js → dom-58cd15f6.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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +2 -2
- 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 +2 -2
- package/lib/esm-es5/duet-progress.entry.js +4 -0
- 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 +2 -2
- 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-aeb6ca93.js +4 -0
- package/lib/esm-es5/index-e8c7d36f.js +4 -0
- package/lib/esm-es5/language-utils-344d894c.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
- package/lib/esm-es5/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +1 -1
- package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
- package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
- package/lib/html.html-data.json +4906 -0
- package/lib/types/components/duet-alert/duet-alert.d.ts +2 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-choice/duet-choice.d.ts +24 -5
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +15 -9
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
- package/lib/types/components/duet-footer/duet-footer.d.ts +1 -1
- package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
- package/lib/types/components/duet-header/duet-header.d.ts +21 -5
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-hero/duet-hero.d.ts +3 -3
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-icon/icon-utils.d.ts +1 -1
- package/lib/types/components/duet-link/duet-link.d.ts +2 -3
- package/lib/types/components/duet-modal/duet-modal.d.ts +3 -3
- package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +3 -3
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +21 -0
- package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
- package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
- package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +6 -0
- package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +11 -0
- package/lib/types/components/duet-tray/duet-tray.d.ts +11 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +124 -31
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +1 -0
- package/lib/types/components/duet-upload/upload-editable-item-error.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-inprogres.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-success.d.ts +8 -0
- package/lib/types/components/duet-upload/{duet-upload-validators.d.ts → upload-validators.d.ts} +0 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +7 -1
- package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +49 -0
- package/lib/types/components.d.ts +619 -87
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +8 -3
- package/lib/types/utils/string-utils.d.ts +1 -0
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +20 -15
- package/lib/cjs/duet-table.cjs.entry.js +0 -132
- package/lib/cjs/duet-upload.cjs.entry.js +0 -866
- package/lib/collection/components/duet-upload/duet-upload-file-list.js +0 -49
- package/lib/duet/p-0733c303.system.entry.js +0 -4
- package/lib/duet/p-095060cc.js +0 -4
- package/lib/duet/p-156864a1.system.entry.js +0 -4
- package/lib/duet/p-15c15c6a.js +0 -15
- package/lib/duet/p-1911dfe7.system.entry.js +0 -4
- package/lib/duet/p-2834a302.entry.js +0 -4
- package/lib/duet/p-28a3d38f.system.entry.js +0 -4
- package/lib/duet/p-2a1a9f9f.entry.js +0 -4
- package/lib/duet/p-2a4d7c5b.system.entry.js +0 -4
- package/lib/duet/p-4095dba5.entry.js +0 -4
- package/lib/duet/p-418b2ce7.system.js +0 -4
- package/lib/duet/p-4289b543.entry.js +0 -4
- package/lib/duet/p-43e39d98.system.js +0 -4
- package/lib/duet/p-46a3ae43.system.js +0 -4
- package/lib/duet/p-4a38cf9d.entry.js +0 -4
- package/lib/duet/p-4be8e814.entry.js +0 -4
- package/lib/duet/p-591b2137.entry.js +0 -4
- package/lib/duet/p-5c5bdb06.system.entry.js +0 -4
- package/lib/duet/p-5f70e318.entry.js +0 -4
- package/lib/duet/p-62c294d6.system.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-6c2729da.js +0 -4
- package/lib/duet/p-6f107847.system.entry.js +0 -4
- package/lib/duet/p-77a5fe4c.system.js +0 -4
- package/lib/duet/p-7809e78b.system.entry.js +0 -4
- package/lib/duet/p-7a36d76f.system.entry.js +0 -4
- package/lib/duet/p-7ee52f58.entry.js +0 -4
- package/lib/duet/p-884693f1.entry.js +0 -4
- package/lib/duet/p-8977b722.entry.js +0 -4
- package/lib/duet/p-89db3b94.entry.js +0 -4
- package/lib/duet/p-8cfce39e.system.entry.js +0 -4
- package/lib/duet/p-8ffe1461.system.entry.js +0 -4
- package/lib/duet/p-9381c2d4.entry.js +0 -4
- package/lib/duet/p-9a450c9a.entry.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-9bbfe606.system.entry.js +0 -4
- package/lib/duet/p-a0a066cb.system.entry.js +0 -4
- package/lib/duet/p-a6096b05.system.entry.js +0 -4
- package/lib/duet/p-a89d5d7c.entry.js +0 -4
- package/lib/duet/p-b07055fd.system.entry.js +0 -4
- package/lib/duet/p-b4374f0e.entry.js +0 -4
- package/lib/duet/p-b456d684.system.entry.js +0 -4
- package/lib/duet/p-bd18c93f.js +0 -4
- package/lib/duet/p-bddb1c15.system.entry.js +0 -4
- package/lib/duet/p-c0b95b58.entry.js +0 -4
- package/lib/duet/p-c3688975.entry.js +0 -4
- package/lib/duet/p-c4d183e6.entry.js +0 -4
- package/lib/duet/p-c9303f9a.entry.js +0 -4
- package/lib/duet/p-cd4e8ccf.js +0 -4
- package/lib/duet/p-ceb75b35.system.entry.js +0 -4
- package/lib/duet/p-cf243bcb.system.entry.js +0 -4
- package/lib/duet/p-d37c8a05.system.js +0 -4
- package/lib/duet/p-d989af11.entry.js +0 -4
- package/lib/duet/p-e58ca7af.system.js +0 -16
- package/lib/duet/p-e6128d82.system.entry.js +0 -4
- package/lib/duet/p-e86cdc17.entry.js +0 -4
- package/lib/duet/p-eadb29c7.entry.js +0 -4
- package/lib/duet/p-f30b14d6.system.entry.js +0 -4
- package/lib/duet/p-f79f8da1.entry.js +0 -4
- package/lib/duet/p-fc397e03.system.entry.js +0 -4
- package/lib/esm/duet-table.entry.js +0 -128
- package/lib/esm/duet-upload.entry.js +0 -862
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-table.entry.js +0 -4
- package/lib/esm-es5/duet-upload.entry.js +0 -4
- package/lib/esm-es5/focus-utils-0b12f0df.js +0 -4
- package/lib/esm-es5/index-f70ddc7f.js +0 -4
- package/lib/esm-es5/language-utils-ab9c3afc.js +0 -4
- package/lib/esm-es5/shadow-css-31e2d504.js +0 -15
- package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
- package/lib/esm-es5/watch-options-de55ea78.js +0 -4
- package/lib/types/components/duet-upload/duet-upload-file-list.d.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const debounce: (func: any, timeout?: number) => (...args: any[]) => void;
|
|
@@ -18,6 +18,7 @@ export interface DuetLangObject {
|
|
|
18
18
|
sv: any;
|
|
19
19
|
}
|
|
20
20
|
export declare type DuetMonetaryDefaults = "$" | "€" | "£";
|
|
21
|
+
export declare const getCurrentLanguage: () => string;
|
|
21
22
|
export declare const isOfTypeLanguage: (keyInput: string) => keyInput is DuetLanguage;
|
|
22
23
|
/**
|
|
23
24
|
* Returns the current language as a string representation (taken from html lang attribute)
|
|
@@ -37,13 +38,17 @@ export declare const getLocale: (lang: DuetLanguageWithUs) => {
|
|
|
37
38
|
money: DuetMonetaryDefaults;
|
|
38
39
|
locale: DuetLocale;
|
|
39
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Takes any json object that is passed and/or htmlencoded and converts it to proper json
|
|
43
|
+
*/
|
|
44
|
+
export declare const sanitizeString: (string: any) => Record<string, any> | string;
|
|
40
45
|
/**
|
|
41
46
|
* Returns the current string / object from a given translation object
|
|
42
47
|
* If language is not fi|sv|en it will default to "fi"
|
|
43
48
|
* special case where lang can be ALSO be "us" in addition to other types - if user decides to override local language
|
|
44
|
-
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"}
|
|
49
|
+
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
|
|
45
50
|
* @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
|
|
46
51
|
* @default {object} {locale: "fi-FI", money: "€"}
|
|
47
|
-
* @returns {(string|Object)} given example contains {fi:"something"} and
|
|
52
|
+
* @returns {(string|Object)} given example contains {fi:"something"} and language===fi this will return "something"
|
|
48
53
|
*/
|
|
49
|
-
export declare const getLocaleString: (langObject: DuetLangObject, languageOverride?: string) => any;
|
|
54
|
+
export declare const getLocaleString: (langObject: DuetLangObject | string, languageOverride?: string) => any;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const watchForOptions: <T extends HTMLElement>(containerEl: HTMLElement, tagName: string, onChange: (el: T) => void) => any;
|
|
2
|
+
export declare const watchForElement: <T extends HTMLElement>(containerEl: HTMLElement, tagName: string, onChange: (el: T) => void) => any;
|
|
2
3
|
export declare const findCheckedOption: (el: any, tagName: string) => HTMLElement;
|
|
4
|
+
export declare const findErrorItems: (el: any, tagName: string) => HTMLElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duetds/components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.33.1",
|
|
4
4
|
"description": "This package includes Duet Design System Web Components and related utilities.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "duetdesignsystem@lahitapiola.fi"
|
|
@@ -20,14 +20,16 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"precommit": "stencil test --spec --silent",
|
|
22
22
|
"test": "stencil test --spec --e2e --silent",
|
|
23
|
-
"test:ci": "
|
|
23
|
+
"test:ci": "cross-env-shell CI=true run-p test:scss:ci test:stencil:ci",
|
|
24
24
|
"test:scss": "stylelint **/*.scss --config ../../.stylelintrc.js",
|
|
25
25
|
"test:scss:ci": "npm run test:scss --silent -- --custom-formatter '../../node_modules/stylelint-junit-formatter' > junit-scsscomponents.xml",
|
|
26
|
-
"test:dev": "run-p test:watch
|
|
26
|
+
"test:dev": "run-p test:watch",
|
|
27
27
|
"test:watch": "stencil test --spec --e2e --watchAll",
|
|
28
|
-
"test:fixtures": "run-p test:stencil:fixtures
|
|
29
|
-
"test:
|
|
30
|
-
"test:
|
|
28
|
+
"test:fixtures": "run-p koa:ci test:stencil:fixtures",
|
|
29
|
+
"test:stencil": "stencil test --maxWorkers=50% --e2e --spec --passWithNoTests",
|
|
30
|
+
"test:stencil:ci": "stencil test --spec --passWithNoTests",
|
|
31
|
+
"test:fixtures:watch": "run-p koa:ci test:stencil:fixtures:watch",
|
|
32
|
+
"test:fixtures:ci": "cross-env-shell CI=true run-p koa:ci test:stencil:fixtures:ci",
|
|
31
33
|
"test:stencil:fixtures": "cross-env-shell VIZDIF=true stencil test --maxWorkers=50% --e2e -t vizdif",
|
|
32
34
|
"test:stencil:fixtures:watch": "cross-env-shell VIZDIF=true stencil test --maxWorkers=25% --e2e --watch -t vizdif",
|
|
33
35
|
"test:stencil:fixtures:ci": "cross-env-shell VIZDIF=true stencil test --ci --e2e -t vizdif",
|
|
@@ -39,23 +41,25 @@
|
|
|
39
41
|
"stencil:koa": "stencil build --dev --watch",
|
|
40
42
|
"start": "run-p koa stencil:koa",
|
|
41
43
|
"start:dev": "npm run stencil:dev",
|
|
42
|
-
"koa": "onchange -k -i --await-write-finish 600 \"helpers/*.js\" \"lib/**\" \"src/index.html\" \"../fonts/lib/**\" \"../tokens/lib/**\" \"../css/lib/**\" \"../icons/lib/**\" -- npm run koa:
|
|
43
|
-
"koa:ci": "node helpers/koa-server.js",
|
|
44
|
+
"koa": "onchange -k -i --await-write-finish 600 \"helpers/*.js\" \"lib/**\" \"src/index.html\" \"../fonts/lib/**\" \"../tokens/lib/**\" \"../css/lib/**\" \"../icons/lib/**\" -- npm run koa:dev",
|
|
45
|
+
"koa:ci": "node helpers/koa-server.js &",
|
|
46
|
+
"koa:dev": "node helpers/koa-server.js",
|
|
44
47
|
"duet:build:testsite": "stencil build --serve",
|
|
45
48
|
"copy:vscode": "copyfiles --flat \"./lib/html.html-data.json\" \"../vscode\""
|
|
46
49
|
},
|
|
47
50
|
"dependencies": {
|
|
48
|
-
"body-scroll-lock": "3.1.5"
|
|
51
|
+
"body-scroll-lock": "3.1.5",
|
|
52
|
+
"koa-colorful-logger": "0.0.3"
|
|
49
53
|
},
|
|
50
54
|
"devDependencies": {
|
|
51
|
-
"@duetds/fonts": "1.4.
|
|
52
|
-
"@duetds/icons": "2.2.
|
|
55
|
+
"@duetds/fonts": "1.4.4",
|
|
56
|
+
"@duetds/icons": "2.2.4",
|
|
53
57
|
"@duetds/stencil-angular-output-target": "0.0.2",
|
|
54
58
|
"@duetds/stencil-react-output-target": "0.0.10",
|
|
55
|
-
"@duetds/tokens": "2.4.
|
|
59
|
+
"@duetds/tokens": "2.4.4",
|
|
56
60
|
"@koa/cors": "3.1.0",
|
|
57
61
|
"@rollup/plugin-replace": "3.0.0",
|
|
58
|
-
"@stencil/core": "2.
|
|
62
|
+
"@stencil/core": "2.11.0",
|
|
59
63
|
"@stencil/sass": "1.5.2",
|
|
60
64
|
"@stencil/utils": "0.0.5",
|
|
61
65
|
"@types/jest": "26.0.24",
|
|
@@ -64,7 +68,7 @@
|
|
|
64
68
|
"copyfiles": "2.4.1",
|
|
65
69
|
"cross-env": "7.0.3",
|
|
66
70
|
"dotenv": "10.0.0",
|
|
67
|
-
"
|
|
71
|
+
"find-up": "5.0.0",
|
|
68
72
|
"jest": "26.6.3",
|
|
69
73
|
"jest-cli": "26.6.3",
|
|
70
74
|
"jest-environment-node": "26.6.2",
|
|
@@ -80,6 +84,7 @@
|
|
|
80
84
|
"onchange": "7.1.0",
|
|
81
85
|
"prettier": "2.4.1",
|
|
82
86
|
"puppeteer": "9.1.1",
|
|
87
|
+
"rollup-plugin-node-polyfills": "0.2.1",
|
|
83
88
|
"sass": "1.42.1",
|
|
84
89
|
"stylelint": "13.13.1",
|
|
85
90
|
"stylelint-config-recess-order": "2.5.0",
|
|
@@ -91,5 +96,5 @@
|
|
|
91
96
|
"collection": "lib/collection/collection-manifest.json",
|
|
92
97
|
"es2015": "lib/esm/index.js",
|
|
93
98
|
"es2017": "lib/esm/index.js",
|
|
94
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "43d69ade79c0291bfb0ae22468e186171b49a5d6"
|
|
95
100
|
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
-
|
|
8
|
-
const index = require('./index-0c949193.js');
|
|
9
|
-
const tokens_module = require('./tokens.module-53b3bd92.js');
|
|
10
|
-
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
|
-
|
|
12
|
-
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)}";
|
|
13
|
-
|
|
14
|
-
// remove wrapping speech marks.
|
|
15
|
-
// media query tokens are wrapped in speech marks,
|
|
16
|
-
// which need to be removed before use with matchMedia.
|
|
17
|
-
const unwrap = (str) => str.substring(1, str.length - 1);
|
|
18
|
-
const breakpointToToken = {
|
|
19
|
-
none: "all",
|
|
20
|
-
"none-scrollable": "all",
|
|
21
|
-
small: unwrap(tokens_module.mediaQuerySmall),
|
|
22
|
-
medium: unwrap(tokens_module.mediaQueryMedium),
|
|
23
|
-
large: unwrap(tokens_module.mediaQueryLarge),
|
|
24
|
-
"x-large": unwrap(tokens_module.mediaQueryXLarge),
|
|
25
|
-
"xx-large": unwrap(tokens_module.mediaQueryXxLarge),
|
|
26
|
-
"xxx-large": unwrap(tokens_module.mediaQueryXxxLarge),
|
|
27
|
-
};
|
|
28
|
-
const stickyTopValues = {
|
|
29
|
-
none: 0,
|
|
30
|
-
"with-links": parseFloat(tokens_module.sizeNavigation) * 16,
|
|
31
|
-
"without-links": parseFloat(tokens_module.sizeHeader) * 16,
|
|
32
|
-
};
|
|
33
|
-
let DuetTable = class {
|
|
34
|
-
constructor(hostRef) {
|
|
35
|
-
index.registerInstance(this, hostRef);
|
|
36
|
-
/**
|
|
37
|
-
* 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.
|
|
38
|
-
*/
|
|
39
|
-
this.matchesBreakpoint = true;
|
|
40
|
-
/**
|
|
41
|
-
* Controls the margin of the component.
|
|
42
|
-
*/
|
|
43
|
-
this.margin = "auto";
|
|
44
|
-
/**
|
|
45
|
-
* Style variation of the table.
|
|
46
|
-
*/
|
|
47
|
-
this.variation = "striped";
|
|
48
|
-
/**
|
|
49
|
-
* Controls whether the table has a sticky header.
|
|
50
|
-
* Sticky headers are not compatible with breakpoint="none-scrollable".
|
|
51
|
-
*/
|
|
52
|
-
this.sticky = false;
|
|
53
|
-
/**
|
|
54
|
-
* Adjust the distance from top of the viewport (in pixels) when the
|
|
55
|
-
* table header becomes sticky.
|
|
56
|
-
*/
|
|
57
|
-
this.stickyDistance = "with-links";
|
|
58
|
-
/**
|
|
59
|
-
* By default the table is responsive - it will be flattened at narrow viewport widths.
|
|
60
|
-
* This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
|
|
61
|
-
* Set to "none" to disable the responsive functionality.
|
|
62
|
-
* Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
|
|
63
|
-
* this is useful for comparison tables where it's important to maintain column and row layout.
|
|
64
|
-
*/
|
|
65
|
-
this.breakpoint = "small";
|
|
66
|
-
this.handleMediaQueryChange = (mq) => {
|
|
67
|
-
this.matchesBreakpoint = mq.matches;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
connectedCallback() {
|
|
71
|
-
this.mq = matchMedia(breakpointToToken[this.breakpoint]);
|
|
72
|
-
this.mq.addListener(this.handleMediaQueryChange);
|
|
73
|
-
this.handleMediaQueryChange(this.mq);
|
|
74
|
-
this.observer = new MutationObserver(() => this.copyHeadingsToCells());
|
|
75
|
-
this.observer.observe(this.element, {
|
|
76
|
-
childList: true,
|
|
77
|
-
subtree: true,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
componentWillLoad() {
|
|
81
|
-
themeableComponent.inheritGlobalTheme(this);
|
|
82
|
-
this.copyHeadingsToCells();
|
|
83
|
-
if (this.sticky && this.breakpoint === "none-scrollable") {
|
|
84
|
-
console.warn(`[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence`);
|
|
85
|
-
}
|
|
86
|
-
if (this.sticky) {
|
|
87
|
-
const stickyTop = stickyTopValues[this.stickyDistance];
|
|
88
|
-
const headingElements = this.element.querySelectorAll("thead th");
|
|
89
|
-
headingElements.forEach(th => (th.style.top = `${stickyTop}px`));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
componentDidLoad() {
|
|
93
|
-
// this clears all pending mutations,
|
|
94
|
-
// that way we avoid dealing with any initial changes
|
|
95
|
-
// and only get genuine mutations as rows are added/removed
|
|
96
|
-
this.observer.takeRecords();
|
|
97
|
-
}
|
|
98
|
-
disconnectedCallback() {
|
|
99
|
-
this.observer.disconnect();
|
|
100
|
-
this.observer = null;
|
|
101
|
-
this.mq.removeListener(this.handleMediaQueryChange);
|
|
102
|
-
this.mq = null;
|
|
103
|
-
this.matchesBreakpoint = true;
|
|
104
|
-
}
|
|
105
|
-
copyHeadingsToCells() {
|
|
106
|
-
const headingElements = this.element.querySelectorAll("thead th");
|
|
107
|
-
const rowElements = this.element.querySelectorAll("tbody tr");
|
|
108
|
-
const headings = Array.from(headingElements).map(th => th.textContent.trim());
|
|
109
|
-
rowElements.forEach(tr => {
|
|
110
|
-
tr.querySelectorAll("td").forEach((td, i) => {
|
|
111
|
-
if (headings[i]) {
|
|
112
|
-
td.dataset.heading = headings[i];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
render() {
|
|
118
|
-
return (index.h(index.Host, { class: {
|
|
119
|
-
[`duet-table-${this.variation}`]: true,
|
|
120
|
-
"duet-table-flattened": !this.matchesBreakpoint,
|
|
121
|
-
// sticky only valid when in regular table layout
|
|
122
|
-
"duet-table-sticky": this.matchesBreakpoint && this.sticky,
|
|
123
|
-
"duet-table-scrollable": this.breakpoint === "none-scrollable",
|
|
124
|
-
"duet-m-0": this.margin === "none",
|
|
125
|
-
"duet-theme-turva": this.theme === "turva",
|
|
126
|
-
} }, index.h("slot", null)));
|
|
127
|
-
}
|
|
128
|
-
get element() { return index.getElement(this); }
|
|
129
|
-
};
|
|
130
|
-
DuetTable.style = duetTableCss;
|
|
131
|
-
|
|
132
|
-
exports.duet_table = DuetTable;
|