@duetds/components 6.0.3 → 6.0.4
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 +46 -38
- package/lib/cjs/duet-action-button.cjs.entry.js +3 -3
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
- package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
- 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_3.cjs.entry.js +17 -14
- 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 +1 -1
- package/lib/cjs/duet-grid_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +3 -3
- package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.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 +2 -2
- package/lib/cjs/duet-scrollable_3.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-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 +2 -2
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +1 -1
- package/lib/cjs/{focus-utils-15207057.js → focus-utils-8a615003.js} +1 -1
- package/lib/cjs/{index-28a9133b.js → index-d106d801.js} +1 -1
- package/lib/cjs/loader.cjs.js +1 -1
- package/lib/cjs/{token-utils-fef5b4eb.js → token-utils-f6e2f4ef.js} +1 -1
- package/lib/cjs/{tokens-29450bcb.js → tokens-4c69b122.js} +18 -15
- package/lib/cjs/{tokens.module-ef598645.js → tokens.module-1bb2d45e.js} +12 -10
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +1 -1
- package/lib/collection/components/duet-upload/duet-upload.js +18 -15
- package/lib/dist-custom-elements/duet-action-button.d.ts +11 -0
- package/lib/dist-custom-elements/duet-action-button.js +9 -0
- package/lib/dist-custom-elements/duet-alert.d.ts +11 -0
- package/lib/dist-custom-elements/duet-alert.js +9 -0
- package/lib/dist-custom-elements/duet-badge.d.ts +11 -0
- package/lib/dist-custom-elements/duet-badge.js +9 -0
- package/lib/dist-custom-elements/duet-breadcrumb.d.ts +11 -0
- package/lib/dist-custom-elements/duet-breadcrumb.js +73 -0
- package/lib/dist-custom-elements/duet-breadcrumbs.d.ts +11 -0
- package/lib/dist-custom-elements/duet-breadcrumbs.js +90 -0
- package/lib/dist-custom-elements/duet-button.d.ts +11 -0
- package/lib/dist-custom-elements/duet-button.js +9 -0
- package/lib/dist-custom-elements/duet-caption.d.ts +11 -0
- package/lib/dist-custom-elements/duet-caption.js +9 -0
- package/lib/dist-custom-elements/duet-card.d.ts +11 -0
- package/lib/dist-custom-elements/duet-card.js +190 -0
- package/lib/dist-custom-elements/duet-checkbox.d.ts +11 -0
- package/lib/dist-custom-elements/duet-checkbox.js +163 -0
- package/lib/dist-custom-elements/duet-choice-group.d.ts +11 -0
- package/lib/dist-custom-elements/duet-choice-group.js +226 -0
- package/lib/dist-custom-elements/duet-choice.d.ts +11 -0
- package/lib/dist-custom-elements/duet-choice.js +390 -0
- package/lib/dist-custom-elements/duet-collapsible.d.ts +11 -0
- package/lib/dist-custom-elements/duet-collapsible.js +170 -0
- package/lib/dist-custom-elements/duet-combobox.d.ts +11 -0
- package/lib/dist-custom-elements/duet-combobox.js +432 -0
- package/lib/dist-custom-elements/duet-cookie-consent.d.ts +11 -0
- package/lib/dist-custom-elements/duet-cookie-consent.js +94 -0
- package/lib/dist-custom-elements/duet-date-picker.d.ts +11 -0
- package/lib/dist-custom-elements/duet-date-picker.js +906 -0
- package/lib/dist-custom-elements/duet-divider.d.ts +11 -0
- package/lib/dist-custom-elements/duet-divider.js +9 -0
- package/lib/dist-custom-elements/duet-editable-table.d.ts +11 -0
- package/lib/dist-custom-elements/duet-editable-table.js +9 -0
- package/lib/dist-custom-elements/duet-empty-state.d.ts +11 -0
- package/lib/dist-custom-elements/duet-empty-state.js +9 -0
- package/lib/dist-custom-elements/duet-fieldset.d.ts +11 -0
- package/lib/dist-custom-elements/duet-fieldset.js +9 -0
- package/lib/dist-custom-elements/duet-footer.d.ts +11 -0
- package/lib/dist-custom-elements/duet-footer.js +199 -0
- package/lib/dist-custom-elements/duet-grid-item.d.ts +11 -0
- package/lib/dist-custom-elements/duet-grid-item.js +9 -0
- package/lib/dist-custom-elements/duet-grid.d.ts +11 -0
- package/lib/dist-custom-elements/duet-grid.js +9 -0
- package/lib/dist-custom-elements/duet-header.d.ts +11 -0
- package/lib/dist-custom-elements/duet-header.js +764 -0
- package/lib/dist-custom-elements/duet-heading.d.ts +11 -0
- package/lib/dist-custom-elements/duet-heading.js +9 -0
- package/lib/dist-custom-elements/duet-hero.d.ts +11 -0
- package/lib/dist-custom-elements/duet-hero.js +314 -0
- package/lib/dist-custom-elements/duet-icon.d.ts +11 -0
- package/lib/dist-custom-elements/duet-icon.js +9 -0
- package/lib/dist-custom-elements/duet-input.d.ts +11 -0
- package/lib/dist-custom-elements/duet-input.js +9 -0
- package/lib/dist-custom-elements/duet-label.d.ts +11 -0
- package/lib/dist-custom-elements/duet-label.js +9 -0
- package/lib/dist-custom-elements/duet-layout.d.ts +11 -0
- package/lib/dist-custom-elements/duet-layout.js +107 -0
- package/lib/dist-custom-elements/duet-link.d.ts +11 -0
- package/lib/dist-custom-elements/duet-link.js +9 -0
- package/lib/dist-custom-elements/duet-list-item.d.ts +11 -0
- package/lib/dist-custom-elements/duet-list-item.js +9 -0
- package/lib/dist-custom-elements/duet-list.d.ts +11 -0
- package/lib/dist-custom-elements/duet-list.js +9 -0
- package/lib/dist-custom-elements/duet-logo.d.ts +11 -0
- package/lib/dist-custom-elements/duet-logo.js +9 -0
- package/lib/dist-custom-elements/duet-modal.d.ts +11 -0
- package/lib/dist-custom-elements/duet-modal.js +331 -0
- package/lib/dist-custom-elements/duet-notification-drawer.d.ts +11 -0
- package/lib/dist-custom-elements/duet-notification-drawer.js +194 -0
- package/lib/dist-custom-elements/duet-notification.d.ts +11 -0
- package/lib/dist-custom-elements/duet-notification.js +114 -0
- package/lib/dist-custom-elements/duet-number-input.d.ts +11 -0
- package/lib/dist-custom-elements/duet-number-input.js +516 -0
- package/lib/dist-custom-elements/duet-pagination.d.ts +11 -0
- package/lib/dist-custom-elements/duet-pagination.js +396 -0
- package/lib/dist-custom-elements/duet-paragraph.d.ts +11 -0
- package/lib/dist-custom-elements/duet-paragraph.js +9 -0
- package/lib/dist-custom-elements/duet-progress.d.ts +11 -0
- package/lib/dist-custom-elements/duet-progress.js +9 -0
- package/lib/dist-custom-elements/duet-radio-group.d.ts +11 -0
- package/lib/dist-custom-elements/duet-radio-group.js +216 -0
- package/lib/dist-custom-elements/duet-radio.d.ts +11 -0
- package/lib/dist-custom-elements/duet-radio.js +167 -0
- package/lib/dist-custom-elements/duet-range-slider.d.ts +11 -0
- package/lib/dist-custom-elements/duet-range-slider.js +209 -0
- package/lib/dist-custom-elements/duet-range-stepper.d.ts +11 -0
- package/lib/dist-custom-elements/duet-range-stepper.js +225 -0
- package/lib/dist-custom-elements/duet-scrollable.d.ts +11 -0
- package/lib/dist-custom-elements/duet-scrollable.js +9 -0
- package/lib/dist-custom-elements/duet-select.d.ts +11 -0
- package/lib/dist-custom-elements/duet-select.js +9 -0
- package/lib/dist-custom-elements/duet-spacer.d.ts +11 -0
- package/lib/dist-custom-elements/duet-spacer.js +9 -0
- package/lib/dist-custom-elements/duet-spinner.d.ts +11 -0
- package/lib/dist-custom-elements/duet-spinner.js +9 -0
- package/lib/dist-custom-elements/duet-step.d.ts +11 -0
- package/lib/dist-custom-elements/duet-step.js +150 -0
- package/lib/dist-custom-elements/duet-stepper.d.ts +11 -0
- package/lib/dist-custom-elements/duet-stepper.js +164 -0
- package/lib/dist-custom-elements/duet-tab-group.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tab-group.js +301 -0
- package/lib/dist-custom-elements/duet-tab.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tab.js +59 -0
- package/lib/dist-custom-elements/duet-table.d.ts +11 -0
- package/lib/dist-custom-elements/duet-table.js +9 -0
- package/lib/dist-custom-elements/duet-textarea.d.ts +11 -0
- package/lib/dist-custom-elements/duet-textarea.js +297 -0
- package/lib/dist-custom-elements/duet-toggle.d.ts +11 -0
- package/lib/dist-custom-elements/duet-toggle.js +150 -0
- package/lib/dist-custom-elements/duet-tooltip.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tooltip.js +9 -0
- package/lib/dist-custom-elements/duet-tray.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tray.js +175 -0
- package/lib/dist-custom-elements/duet-upload-aria-status.d.ts +11 -0
- package/lib/dist-custom-elements/duet-upload-aria-status.js +9 -0
- package/lib/dist-custom-elements/duet-upload.d.ts +11 -0
- package/lib/dist-custom-elements/duet-upload.js +1514 -0
- package/lib/dist-custom-elements/duet-visually-hidden.d.ts +11 -0
- package/lib/dist-custom-elements/duet-visually-hidden.js +9 -0
- package/lib/dist-custom-elements/index.d.ts +26 -0
- package/lib/dist-custom-elements/index.js +37 -0
- package/lib/dist-custom-elements/p-01de0640.js +37 -0
- package/lib/{esm/tokens-8ff8c570.js → dist-custom-elements/p-02305a1e.js} +18 -15
- package/lib/dist-custom-elements/p-08cfe544.js +125 -0
- package/lib/dist-custom-elements/p-09ed1ffa.js +160 -0
- package/lib/dist-custom-elements/p-0a928609.js +241 -0
- package/lib/dist-custom-elements/p-0b3f675e.js +47 -0
- package/lib/{esm/focus-utils-559691b3.js → dist-custom-elements/p-0b8f16f1.js} +1 -1
- package/lib/dist-custom-elements/p-115c79b6.js +6 -0
- package/lib/dist-custom-elements/p-12721178.js +57 -0
- package/lib/dist-custom-elements/p-14dcd82b.js +133 -0
- package/lib/dist-custom-elements/p-16d518fd.js +66 -0
- package/lib/dist-custom-elements/p-213ef84c.js +87 -0
- package/lib/dist-custom-elements/p-266411cf.js +307 -0
- package/lib/dist-custom-elements/p-3d987b87.js +75 -0
- package/lib/dist-custom-elements/p-3fc2d124.js +1666 -0
- package/lib/dist-custom-elements/p-4717744e.js +110 -0
- package/lib/dist-custom-elements/p-4ebf1618.js +13 -0
- package/lib/dist-custom-elements/p-56118313.js +53 -0
- package/lib/dist-custom-elements/p-565779f5.js +199 -0
- package/lib/dist-custom-elements/p-5a9d75e1.js +55 -0
- package/lib/dist-custom-elements/p-65d3ead5.js +428 -0
- package/lib/dist-custom-elements/p-6886544b.js +129 -0
- package/lib/dist-custom-elements/p-6e74e660.js +275 -0
- package/lib/dist-custom-elements/p-704245ef.js +9 -0
- package/lib/dist-custom-elements/p-76f00bd5.js +10 -0
- package/lib/dist-custom-elements/p-7739604d.js +214 -0
- package/lib/dist-custom-elements/p-81c9b244.js +65 -0
- package/lib/{esm/token-utils-df78f4d8.js → dist-custom-elements/p-86faf728.js} +1 -1
- package/lib/dist-custom-elements/p-88511d7a.js +275 -0
- package/lib/dist-custom-elements/p-9c732bb9.js +193 -0
- package/lib/dist-custom-elements/p-acdba2db.js +114 -0
- package/lib/dist-custom-elements/p-b08e57cf.js +37 -0
- package/lib/dist-custom-elements/p-b9058029.js +138 -0
- package/lib/dist-custom-elements/p-bd4b92c4.js +86 -0
- package/lib/dist-custom-elements/p-bd779757.js +184 -0
- package/lib/dist-custom-elements/p-c1325e35.js +11 -0
- package/lib/dist-custom-elements/p-c70f3ccb.js +70 -0
- package/lib/dist-custom-elements/p-d004da5f.js +6 -0
- package/lib/dist-custom-elements/p-d4c234ed.js +390 -0
- package/lib/dist-custom-elements/p-d8549efe.js +20 -0
- package/lib/dist-custom-elements/p-d96debb6.js +287 -0
- package/lib/dist-custom-elements/p-da03a443.js +154 -0
- package/lib/dist-custom-elements/p-e294c0fb.js +341 -0
- package/lib/dist-custom-elements/p-e4d5fbc0.js +87 -0
- package/lib/dist-custom-elements/p-e5c8a58f.js +71 -0
- package/lib/dist-custom-elements/p-ede854e1.js +92 -0
- package/lib/dist-custom-elements/p-ef8eff22.js +64 -0
- package/lib/dist-custom-elements/p-f11208c3.js +6 -0
- package/lib/dist-custom-elements/p-f7db7c40.js +98 -0
- package/lib/dist-custom-elements/p-fc5362e7.js +61 -0
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-6c875cfa.system.entry.js → p-01c551f1.system.entry.js} +1 -1
- package/lib/duet/p-02305a1e.js +4 -0
- package/lib/duet/{p-1010fb94.entry.js → p-033bfa67.entry.js} +1 -1
- package/lib/duet/{p-946aa901.system.entry.js → p-07a850a5.system.entry.js} +1 -1
- package/lib/duet/{p-9e54127f.system.entry.js → p-09e2ff96.system.entry.js} +1 -1
- package/lib/duet/{p-d0cee171.entry.js → p-0b74af40.entry.js} +1 -1
- package/lib/duet/{p-2bd79d6b.entry.js → p-0c2a51ac.entry.js} +1 -1
- package/lib/duet/{p-eb54474f.system.entry.js → p-0c9f0b8a.system.entry.js} +1 -1
- package/lib/duet/{p-104bf1b5.entry.js → p-0d96924d.entry.js} +1 -1
- package/lib/duet/{p-d444107c.system.entry.js → p-0e48bca9.system.entry.js} +1 -1
- package/lib/duet/{p-de815460.system.entry.js → p-0e98f667.system.entry.js} +1 -1
- package/lib/duet/{p-cfa50753.system.js → p-1999f503.system.js} +1 -1
- package/lib/duet/{p-4034b322.system.entry.js → p-1a41550e.system.entry.js} +1 -1
- package/lib/duet/{p-bec24271.system.entry.js → p-1bd57792.system.entry.js} +1 -1
- package/lib/duet/{p-dab594cf.system.entry.js → p-1e0d7680.system.entry.js} +1 -1
- package/lib/duet/{p-6841adb8.system.entry.js → p-1ebd7945.system.entry.js} +1 -1
- package/lib/duet/p-1fc60a60.system.js +4 -0
- package/lib/duet/{p-47ed8218.entry.js → p-21662682.entry.js} +1 -1
- package/lib/duet/{p-b008fe25.entry.js → p-23943f39.entry.js} +1 -1
- package/lib/duet/{p-92d95bde.system.entry.js → p-23a8fa64.system.entry.js} +1 -1
- package/lib/duet/{p-72443e94.system.entry.js → p-264a0e0c.system.entry.js} +1 -1
- package/lib/duet/{p-5d967d15.entry.js → p-27f72e70.entry.js} +1 -1
- package/lib/duet/{p-09364233.entry.js → p-2a3b1a2e.entry.js} +1 -1
- package/lib/duet/{p-df11c241.system.entry.js → p-2b320481.system.entry.js} +1 -1
- package/lib/duet/p-32f7178a.system.js +4 -0
- package/lib/duet/{p-e3983bfe.entry.js → p-3620ded5.entry.js} +1 -1
- package/lib/duet/{p-b01e2523.entry.js → p-3904232a.entry.js} +1 -1
- package/lib/duet/{p-2bba6489.entry.js → p-3b173cbd.entry.js} +1 -1
- package/lib/duet/{p-087d72dd.system.entry.js → p-430acad4.system.entry.js} +1 -1
- package/lib/duet/{p-23ba48a5.system.entry.js → p-4463946b.system.entry.js} +1 -1
- package/lib/duet/{p-8157e5bb.system.entry.js → p-44e9b1c8.system.entry.js} +1 -1
- package/lib/duet/p-49ce11a1.entry.js +4 -0
- package/lib/duet/{p-06ab2787.system.entry.js → p-4d6feeb5.system.entry.js} +1 -1
- package/lib/duet/{p-f7ac05dd.system.entry.js → p-4d767c61.system.entry.js} +1 -1
- package/lib/duet/{p-e0f6ebf4.system.entry.js → p-4f1fe415.system.entry.js} +1 -1
- package/lib/duet/{p-de3c0f4d.js → p-532e9db7.js} +1 -1
- package/lib/duet/{p-9f8a51b4.system.entry.js → p-55fd512b.system.entry.js} +1 -1
- package/lib/duet/{p-398a79a0.js → p-588be556.js} +1 -1
- package/lib/duet/{p-074bfd45.entry.js → p-5af6d9e2.entry.js} +1 -1
- package/lib/duet/{p-9308c1e6.entry.js → p-5e1d64d8.entry.js} +1 -1
- package/lib/duet/{p-4c93a18e.system.entry.js → p-5f6452ce.system.entry.js} +1 -1
- package/lib/duet/{p-de986d77.system.entry.js → p-60e29f52.system.entry.js} +1 -1
- package/lib/duet/{p-e1654a8b.system.entry.js → p-613c4099.system.entry.js} +1 -1
- package/lib/duet/{p-94c07a46.system.entry.js → p-61444a3d.system.entry.js} +1 -1
- package/lib/duet/{p-d0f72f22.js → p-6aca8584.js} +1 -1
- package/lib/duet/{p-db15d420.system.entry.js → p-6e5f2016.system.entry.js} +1 -1
- package/lib/duet/{p-63dbd5af.system.entry.js → p-6f93638a.system.entry.js} +1 -1
- package/lib/duet/{p-c8d9da51.entry.js → p-71105750.entry.js} +1 -1
- package/lib/duet/{p-db115036.entry.js → p-73c6e5fb.entry.js} +1 -1
- package/lib/duet/{p-b3dc55a6.system.entry.js → p-751f6957.system.entry.js} +1 -1
- package/lib/duet/{p-1931d33f.system.js → p-77600ed7.system.js} +1 -1
- package/lib/duet/{p-571440c7.system.entry.js → p-77ca874f.system.entry.js} +1 -1
- package/lib/duet/{p-c2e37fb4.entry.js → p-787f9eba.entry.js} +1 -1
- package/lib/duet/{p-674e546f.system.entry.js → p-7ad2cb10.system.entry.js} +1 -1
- package/lib/duet/{p-b066a6b7.entry.js → p-7de4d97d.entry.js} +1 -1
- package/lib/duet/{p-3d029dce.system.entry.js → p-8107aeb5.system.entry.js} +1 -1
- package/lib/duet/{p-31004a7b.system.entry.js → p-86cb85b9.system.entry.js} +1 -1
- package/lib/duet/{p-f2eaad1e.js → p-875ae637.js} +1 -1
- package/lib/duet/{p-de146ffa.system.entry.js → p-8aafa8e7.system.entry.js} +1 -1
- package/lib/duet/{p-064dd5fd.entry.js → p-8b09a46f.entry.js} +1 -1
- package/lib/duet/{p-16521f2d.entry.js → p-8c08e7ba.entry.js} +1 -1
- package/lib/duet/{p-0626271f.entry.js → p-8e8f8b29.entry.js} +1 -1
- package/lib/duet/{p-300147ad.entry.js → p-9094fcf8.entry.js} +1 -1
- package/lib/duet/{p-5beb69ac.entry.js → p-988a781d.entry.js} +1 -1
- package/lib/duet/{p-cca9c605.system.entry.js → p-a395d4bc.system.entry.js} +1 -1
- package/lib/duet/{p-97a369d6.entry.js → p-a585113b.entry.js} +1 -1
- package/lib/duet/{p-ef4b4f35.entry.js → p-aa8973fc.entry.js} +1 -1
- package/lib/duet/{p-23ad5f8a.entry.js → p-ab7f4070.entry.js} +1 -1
- package/lib/duet/{p-49db53a1.system.entry.js → p-ab89d948.system.entry.js} +1 -1
- package/lib/duet/{p-20271117.entry.js → p-aef02083.entry.js} +1 -1
- package/lib/duet/{p-c5499bc3.entry.js → p-afdc57da.entry.js} +1 -1
- package/lib/duet/{p-9f18afd6.entry.js → p-b2abaa9e.entry.js} +1 -1
- package/lib/duet/{p-744ce6ce.entry.js → p-b55e55b5.entry.js} +1 -1
- package/lib/duet/{p-3cc55c8a.system.entry.js → p-bbc91480.system.entry.js} +1 -1
- package/lib/duet/{p-1aca544d.entry.js → p-bbe1a2cd.entry.js} +1 -1
- package/lib/duet/{p-8c409ffe.system.entry.js → p-bd3c926c.system.entry.js} +1 -1
- package/lib/duet/{p-e2ac0727.system.entry.js → p-bec16aea.system.entry.js} +1 -1
- package/lib/duet/p-bf59e11d.entry.js +4 -0
- package/lib/duet/{p-ab2f08b3.system.entry.js → p-c4217626.system.entry.js} +1 -1
- package/lib/duet/{p-5658ac20.system.entry.js → p-c5f6ea62.system.entry.js} +1 -1
- package/lib/duet/{p-41cb95cb.entry.js → p-c6d05091.entry.js} +1 -1
- package/lib/duet/{p-0f7f7e7d.system.entry.js → p-c73a591d.system.entry.js} +1 -1
- package/lib/duet/{p-6b0a4b3b.entry.js → p-c863a0d1.entry.js} +1 -1
- package/lib/duet/{p-c41b07d7.entry.js → p-c986532d.entry.js} +1 -1
- package/lib/duet/{p-ae515c54.entry.js → p-caa49454.entry.js} +1 -1
- package/lib/duet/{p-9fcac068.system.entry.js → p-ccb0de84.system.entry.js} +1 -1
- package/lib/duet/{p-18cc5627.system.js → p-d209191d.system.js} +1 -1
- package/lib/duet/{p-bb9624c3.entry.js → p-defba7cd.entry.js} +1 -1
- package/lib/duet/{p-339e5901.system.js → p-df785776.system.js} +1 -1
- package/lib/duet/{p-691f609b.entry.js → p-e9862947.entry.js} +1 -1
- package/lib/duet/{p-5d1787cb.entry.js → p-eb74c96e.entry.js} +1 -1
- package/lib/duet/{p-0ae59d7c.entry.js → p-ece47184.entry.js} +1 -1
- package/lib/duet/{p-89048c6f.entry.js → p-f09f968c.entry.js} +1 -1
- package/lib/duet/{p-68c3b19f.entry.js → p-f97776be.entry.js} +1 -1
- package/lib/duet/{p-6eecfced.system.entry.js → p-fe8fc877.system.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +3 -3
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +3 -3
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +3 -3
- package/lib/esm/duet-collapsible.entry.js +2 -2
- package/lib/esm/duet-combobox.entry.js +1 -1
- 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_3.entry.js +17 -14
- 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 +1 -1
- package/lib/esm/duet-grid_2.entry.js +2 -2
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +3 -3
- package/lib/esm/duet-input_2.entry.js +1 -1
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-pagination_2.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 +2 -2
- package/lib/esm/duet-scrollable_3.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-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 +2 -2
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +1 -1
- package/lib/esm/focus-utils-236f580e.js +18 -0
- package/lib/esm/{index-f600b8dc.js → index-b601aac1.js} +1 -1
- package/lib/esm/loader.js +1 -1
- package/lib/esm/token-utils-ebf797ab.js +92 -0
- package/lib/esm/tokens-b9d87fda.js +459 -0
- package/lib/esm/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +12 -10
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- 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-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.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-combobox.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_3.entry.js +1 -1
- 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 +1 -1
- 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 +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-pagination_2.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-scrollable_3.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-textarea.entry.js +2 -2
- 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 +1 -1
- 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-559691b3.js → focus-utils-236f580e.js} +1 -1
- package/lib/esm-es5/{index-f600b8dc.js → index-b601aac1.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{token-utils-df78f4d8.js → token-utils-ebf797ab.js} +1 -1
- package/lib/esm-es5/tokens-b9d87fda.js +4 -0
- package/lib/esm-es5/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +8 -8
- package/lib/types/components.d.ts +4 -4
- package/package.json +5 -5
- package/lib/custom-elements-bundle/index.d.ts +0 -399
- package/lib/custom-elements-bundle/index.js +0 -14110
- package/lib/duet/p-6002f3d2.system.js +0 -4
- package/lib/duet/p-7c198c75.entry.js +0 -4
- package/lib/duet/p-a93a04b9.system.js +0 -4
- package/lib/duet/p-d1746325.js +0 -4
- package/lib/duet/p-f2ab3e5c.entry.js +0 -4
- package/lib/esm-es5/tokens-8ff8c570.js +0 -4
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, c as createEvent, h as h$1, b as Host } from './p-3fc2d124.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
import { f as fieldSorter } from './p-0b3f675e.js';
|
|
7
|
+
import { i as isKeyboardClick } from './p-d8549efe.js';
|
|
8
|
+
import { g as getLocaleString } from './p-ede854e1.js';
|
|
9
|
+
import { h } from './p-b9058029.js';
|
|
10
|
+
import { d as defineCustomElement$6 } from './p-0a928609.js';
|
|
11
|
+
import { d as defineCustomElement$5 } from './p-e294c0fb.js';
|
|
12
|
+
import { d as defineCustomElement$4 } from './p-7739604d.js';
|
|
13
|
+
import { d as defineCustomElement$3 } from './p-3d987b87.js';
|
|
14
|
+
import { d as defineCustomElement$2 } from './p-da03a443.js';
|
|
15
|
+
import { d as defineCustomElement$1 } from './p-b08e57cf.js';
|
|
16
|
+
|
|
17
|
+
//simple functional component that renders the data in the table
|
|
18
|
+
const TableData = ({ data, groupId, alignment }, _children) => {
|
|
19
|
+
const classNames = `duet-editable-table duet-editable-table-content-${groupId}`;
|
|
20
|
+
if (typeof data === "string") {
|
|
21
|
+
return h("td", { innerHTML: data, class: classNames, part: `${groupId}content`, style: { verticalAlign: alignment } });
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return (h("td", { class: classNames, part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const duetEditableTableCss = ".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";
|
|
29
|
+
|
|
30
|
+
const DuetEditableTable = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.__registerHost();
|
|
34
|
+
this.duetTableToggle = createEvent(this, "duetTableToggle", 7);
|
|
35
|
+
this.duetMenuClick = createEvent(this, "duetMenuClick", 7);
|
|
36
|
+
/**
|
|
37
|
+
* Duet-table: margin of the component.
|
|
38
|
+
*/
|
|
39
|
+
this.margin = "auto";
|
|
40
|
+
/**
|
|
41
|
+
* Duet-table: Style variation of the table.
|
|
42
|
+
*/
|
|
43
|
+
this.variation = "striped";
|
|
44
|
+
/**
|
|
45
|
+
* Duet-table: Controls whether the table has a sticky header.
|
|
46
|
+
* Sticky headers are not compatible with breakpoint="none-scrollable".
|
|
47
|
+
*/
|
|
48
|
+
this.sticky = false;
|
|
49
|
+
/**
|
|
50
|
+
* Duet-table: Adjust the distance from top of the viewport (in pixels) when the
|
|
51
|
+
* table header becomes sticky.
|
|
52
|
+
*/
|
|
53
|
+
this.stickyDistance = "with-links";
|
|
54
|
+
/**
|
|
55
|
+
* Duet-table: By default the table is responsive - it will be flattened at narrow viewport widths.
|
|
56
|
+
* This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
|
|
57
|
+
* Set to "none" to disable the responsive functionality.
|
|
58
|
+
* Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
|
|
59
|
+
* this is useful for comparison tables where it's important to maintain column and row layout.
|
|
60
|
+
*/
|
|
61
|
+
this.breakpoint = "small";
|
|
62
|
+
/**
|
|
63
|
+
* Define actions for all items in a table
|
|
64
|
+
* An alternative to inline HTML table.
|
|
65
|
+
* required for Sortable tables
|
|
66
|
+
* @default undefined
|
|
67
|
+
*/
|
|
68
|
+
this.actions = undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Define columns for a table
|
|
71
|
+
* An alternative to inline HTML table.
|
|
72
|
+
* required for Sortable tables
|
|
73
|
+
* @default undefined
|
|
74
|
+
*/
|
|
75
|
+
this.columns = undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Define rows for a table
|
|
78
|
+
* An alternative to inline HTML table.
|
|
79
|
+
* required for Sortable tables
|
|
80
|
+
* @default undefined
|
|
81
|
+
*/
|
|
82
|
+
this.rows = undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Controls whether the table is sortable by headers
|
|
85
|
+
*/
|
|
86
|
+
this.sortable = false;
|
|
87
|
+
/**
|
|
88
|
+
* Optional id that get passed to the table and used to setup ::parts
|
|
89
|
+
*/
|
|
90
|
+
this.groupId = "";
|
|
91
|
+
/**
|
|
92
|
+
* Theme of the table.
|
|
93
|
+
*/
|
|
94
|
+
this.theme = "";
|
|
95
|
+
/**
|
|
96
|
+
* Exposes the aria role for optimizing accessibility.
|
|
97
|
+
*/
|
|
98
|
+
this.accessibleRole = undefined;
|
|
99
|
+
this.sortableDefaultLabel = {
|
|
100
|
+
fi: "Järjestä",
|
|
101
|
+
en: "Click to sort",
|
|
102
|
+
sv: "Klicka för att sortera",
|
|
103
|
+
};
|
|
104
|
+
this.actionColumnLabel = {
|
|
105
|
+
en: "Actions for rows",
|
|
106
|
+
fi: "Toiminnot rivillä",
|
|
107
|
+
sv: "Åtgärder för rader",
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Private methods.
|
|
111
|
+
*/
|
|
112
|
+
this.toggleColumn = (column, e) => {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
const { sort_order, direction, index, key } = column;
|
|
115
|
+
this.duetTableToggle.emit({
|
|
116
|
+
sort_order,
|
|
117
|
+
index,
|
|
118
|
+
direction,
|
|
119
|
+
key,
|
|
120
|
+
component: "duet-editable-table",
|
|
121
|
+
originalEvent: e,
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
this.handleKeyDown = (column, e) => {
|
|
125
|
+
if (isKeyboardClick(e)) {
|
|
126
|
+
this.toggleColumn(column, e);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Component lifecycle events.
|
|
132
|
+
*/
|
|
133
|
+
componentWillLoad() {
|
|
134
|
+
inheritGlobalTheme(this);
|
|
135
|
+
}
|
|
136
|
+
createLabel(column) {
|
|
137
|
+
const { sort_order, direction, index, label } = column;
|
|
138
|
+
const i18nLabel = getLocaleString(label);
|
|
139
|
+
if (!this.sortable) {
|
|
140
|
+
return i18nLabel;
|
|
141
|
+
}
|
|
142
|
+
const getButtonIcon = () => {
|
|
143
|
+
// "action-subtract-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-subtract-small.svg
|
|
144
|
+
// "action-arrow-down-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-down-small.svg
|
|
145
|
+
// "action-arrow-up-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-up-small.svg
|
|
146
|
+
if (!!sort_order && direction === 1) {
|
|
147
|
+
return "action-arrow-down-small";
|
|
148
|
+
}
|
|
149
|
+
else if (!!sort_order && direction === -1) {
|
|
150
|
+
return "action-arrow-up-small";
|
|
151
|
+
}
|
|
152
|
+
return "action-subtract-small";
|
|
153
|
+
};
|
|
154
|
+
return (h$1("span", { class: "duet-table-label", "data-index": index }, h$1("duet-button", { size: "small", icon: getButtonIcon(), "icon-size": "medium-small", "accessible-label": getLocaleString(this.sortableDefaultLabel), variation: "plain", margin: "none", "icon-right": true, onClick: event => this.toggleColumn(column, event), onKeyDown: event => this.handleKeyDown(column, event) }, i18nLabel)));
|
|
155
|
+
}
|
|
156
|
+
getSortedColumns() {
|
|
157
|
+
//create a new array from sort instead of mutating original
|
|
158
|
+
return [...this.columns].sort(fieldSorter(["index"]));
|
|
159
|
+
}
|
|
160
|
+
getRowSortOrder() {
|
|
161
|
+
//create a new array from sort instead of mutating original
|
|
162
|
+
const fields = [...this.columns].sort(fieldSorter(["sort_order"]));
|
|
163
|
+
//return only key from objects that have sort_order
|
|
164
|
+
return fields
|
|
165
|
+
.filter(column => column.sort_order)
|
|
166
|
+
.map(column => {
|
|
167
|
+
// add - in-front of descending direction (required by field-sorter)
|
|
168
|
+
return column.direction === -1 ? `-${column.key}` : column.key;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
renderTableHeader() {
|
|
172
|
+
if (!this.columns) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const sortedColumns = this.getSortedColumns();
|
|
176
|
+
return (h$1("tr", { class: {
|
|
177
|
+
"duet-table-action-header": !!this.actions,
|
|
178
|
+
} }, sortedColumns.map(column => {
|
|
179
|
+
if (column.display !== false) {
|
|
180
|
+
return h$1("th", { scope: "col" }, this.createLabel(column));
|
|
181
|
+
}
|
|
182
|
+
}), this.actions && (h$1("th", { scope: "col", class: "duet-table-action-header-heading" }, this.actions && h$1("duet-visually-hidden", null, getLocaleString(this.actionColumnLabel))))));
|
|
183
|
+
}
|
|
184
|
+
renderActions(rowItem, index) {
|
|
185
|
+
// escape early
|
|
186
|
+
if (!this.actions) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
// iterate through actions and add them in the sidebar
|
|
190
|
+
return (h$1("td", { class: "duet-text-right" }, this.actions.map(actionItem => {
|
|
191
|
+
return (h$1("duet-action-button", { actionMeta: Object.assign({}, (rowItem === null || rowItem === void 0 ? void 0 : rowItem.meta) || {}, { index }), actionId: (rowItem === null || rowItem === void 0 ? void 0 : rowItem.uid) || (rowItem === null || rowItem === void 0 ? void 0 : rowItem.id) || null, actionName: actionItem.name, theme: this.theme, iconName: actionItem.icon, iconColor: actionItem.color, iconSize: actionItem.size, background: actionItem.background }));
|
|
192
|
+
})));
|
|
193
|
+
}
|
|
194
|
+
renderTableBody() {
|
|
195
|
+
const columns = this.getSortedColumns();
|
|
196
|
+
const rowSortOrder = this.getRowSortOrder();
|
|
197
|
+
const sortedRows = [...this.rows].sort(fieldSorter(rowSortOrder));
|
|
198
|
+
// return a tbody with rows for each item in sortedRows
|
|
199
|
+
return sortedRows.map((row, index) => (h$1("tr", { class: {
|
|
200
|
+
"duet-table-action-row": !!this.actions,
|
|
201
|
+
"duet-editable-table-row": true,
|
|
202
|
+
[`duet-editable-table-row-${this.groupId}`]: true,
|
|
203
|
+
}, "data-meta": JSON.stringify(row.meta) }, columns.map(column => {
|
|
204
|
+
//if we don't have any data for this column, try getting an item instead (for backwards compatibility
|
|
205
|
+
const value = row[column.key] ? row[column.key] : row.item;
|
|
206
|
+
if (column.display !== false) {
|
|
207
|
+
return h$1(TableData, { data: value, groupId: this.groupId });
|
|
208
|
+
}
|
|
209
|
+
}), this.actions && this.renderActions(row, index))));
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Render Methods
|
|
213
|
+
*/
|
|
214
|
+
render() {
|
|
215
|
+
return (h$1(Host, { class: {
|
|
216
|
+
[`duet-editable-table-${this.variation}`]: true,
|
|
217
|
+
"duet-editable-table": true,
|
|
218
|
+
[`duet-editable-table-${this.theme}`]: true,
|
|
219
|
+
// sticky only valid when in regular table layout
|
|
220
|
+
"duet-editable-table-scrollable": this.breakpoint === "none-scrollable",
|
|
221
|
+
"duet-editable-table-sortable": this.sortable,
|
|
222
|
+
"duet-editable-table-actions": !!this.actions,
|
|
223
|
+
"duet-m-0": this.margin === "none",
|
|
224
|
+
"duet-theme-turva": this.theme === "turva",
|
|
225
|
+
} }, h$1("duet-table", { class: "duet-editable-table-table", sticky: this.sticky, stickyDistance: this.stickyDistance, margin: this.margin, theme: this.theme, variation: this.variation, breakpoint: this.breakpoint }, h$1("table", { role: this.accessibleRole }, h$1("caption", null, h$1("slot", { name: "tcaption" })), h$1("thead", null, h$1("tr", null, h$1("td", { class: "duet-editable-table-actions-menu", colSpan: 99 }, h$1("slot", { name: "thead-first" }))), this.renderTableHeader(), h$1("tr", null, h$1("td", { class: "duet-editable-table-actions-menu", colSpan: 99 }, h$1("slot", { name: "thead-last" })))), h$1("tbody", null, this.renderTableBody()), h$1("tfoot", null, h$1("tr", null, h$1("th", { class: "duet-editable-table-footer-menu", colSpan: 99 }, h$1("slot", { name: "tfoot" }))))))));
|
|
226
|
+
}
|
|
227
|
+
get element() { return this; }
|
|
228
|
+
static get style() { return duetEditableTableCss; }
|
|
229
|
+
}, [6, "duet-editable-table", {
|
|
230
|
+
"margin": [1],
|
|
231
|
+
"variation": [1],
|
|
232
|
+
"sticky": [4],
|
|
233
|
+
"stickyDistance": [1, "sticky-distance"],
|
|
234
|
+
"breakpoint": [1],
|
|
235
|
+
"actions": [1040],
|
|
236
|
+
"columns": [1040],
|
|
237
|
+
"rows": [1040],
|
|
238
|
+
"sortable": [4],
|
|
239
|
+
"groupId": [1, "group-id"],
|
|
240
|
+
"theme": [1025],
|
|
241
|
+
"accessibleRole": [1, "accessible-role"]
|
|
242
|
+
}]);
|
|
243
|
+
function defineCustomElement() {
|
|
244
|
+
if (typeof customElements === "undefined") {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const components = ["duet-editable-table", "duet-action-button", "duet-button", "duet-icon", "duet-spinner", "duet-table", "duet-visually-hidden"];
|
|
248
|
+
components.forEach(tagName => { switch (tagName) {
|
|
249
|
+
case "duet-editable-table":
|
|
250
|
+
if (!customElements.get(tagName)) {
|
|
251
|
+
customElements.define(tagName, DuetEditableTable);
|
|
252
|
+
}
|
|
253
|
+
break;
|
|
254
|
+
case "duet-action-button":
|
|
255
|
+
if (!customElements.get(tagName)) {
|
|
256
|
+
defineCustomElement$6();
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
case "duet-button":
|
|
260
|
+
if (!customElements.get(tagName)) {
|
|
261
|
+
defineCustomElement$5();
|
|
262
|
+
}
|
|
263
|
+
break;
|
|
264
|
+
case "duet-icon":
|
|
265
|
+
if (!customElements.get(tagName)) {
|
|
266
|
+
defineCustomElement$4();
|
|
267
|
+
}
|
|
268
|
+
break;
|
|
269
|
+
case "duet-spinner":
|
|
270
|
+
if (!customElements.get(tagName)) {
|
|
271
|
+
defineCustomElement$3();
|
|
272
|
+
}
|
|
273
|
+
break;
|
|
274
|
+
case "duet-table":
|
|
275
|
+
if (!customElements.get(tagName)) {
|
|
276
|
+
defineCustomElement$2();
|
|
277
|
+
}
|
|
278
|
+
break;
|
|
279
|
+
case "duet-visually-hidden":
|
|
280
|
+
if (!customElements.get(tagName)) {
|
|
281
|
+
defineCustomElement$1();
|
|
282
|
+
}
|
|
283
|
+
break;
|
|
284
|
+
} });
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export { DuetEditableTable as D, defineCustomElement as d };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-3fc2d124.js';
|
|
5
|
+
import { m as mediaQueryMedium, a as mediaQueryLarge, b as mediaQueryXLarge, c as mediaQueryXxLarge, d as mediaQueryXxxLarge, e as mediaQuerySmall, s as sizeNavigation, f as sizeHeader } from './p-266411cf.js';
|
|
6
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
7
|
+
import { d as debounce } from './p-0b3f675e.js';
|
|
8
|
+
|
|
9
|
+
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 .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.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-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.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-fixed tbody:first-of-type th,.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-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.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-fixed tfoot td,.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-fixed tbody:not(:only-of-type) tr:first-child,.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-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.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)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:\"\"}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}";
|
|
10
|
+
|
|
11
|
+
// remove wrapping speech marks.
|
|
12
|
+
// media query tokens are wrapped in speech marks,
|
|
13
|
+
// which need to be removed before use with matchMedia.
|
|
14
|
+
const unwrap = (str) => str.substring(1, str.length - 1);
|
|
15
|
+
const breakpointToToken = {
|
|
16
|
+
none: "all",
|
|
17
|
+
"none-scrollable": "all",
|
|
18
|
+
small: unwrap(mediaQuerySmall),
|
|
19
|
+
medium: unwrap(mediaQueryMedium),
|
|
20
|
+
large: unwrap(mediaQueryLarge),
|
|
21
|
+
"x-large": unwrap(mediaQueryXLarge),
|
|
22
|
+
"xx-large": unwrap(mediaQueryXxLarge),
|
|
23
|
+
"xxx-large": unwrap(mediaQueryXxxLarge),
|
|
24
|
+
};
|
|
25
|
+
const stickyTopValues = {
|
|
26
|
+
none: 0,
|
|
27
|
+
"with-links": parseFloat(sizeNavigation) * 16,
|
|
28
|
+
"without-links": parseFloat(sizeHeader) * 16,
|
|
29
|
+
};
|
|
30
|
+
const DuetTable = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.__registerHost();
|
|
34
|
+
/**
|
|
35
|
+
* 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.
|
|
36
|
+
*/
|
|
37
|
+
this.matchesBreakpoint = true;
|
|
38
|
+
/**
|
|
39
|
+
* Controls the margin of the component.
|
|
40
|
+
*/
|
|
41
|
+
this.margin = "auto";
|
|
42
|
+
/**
|
|
43
|
+
* Style variation of the table.
|
|
44
|
+
*/
|
|
45
|
+
this.variation = "striped";
|
|
46
|
+
/**
|
|
47
|
+
* Controls whether the table has a sticky header.
|
|
48
|
+
* Sticky headers are not compatible with breakpoint="none-scrollable".
|
|
49
|
+
*/
|
|
50
|
+
this.sticky = false;
|
|
51
|
+
/**
|
|
52
|
+
* Adjust the distance from top of the viewport (in pixels) when the
|
|
53
|
+
* table header becomes sticky.
|
|
54
|
+
*/
|
|
55
|
+
this.stickyDistance = "with-links";
|
|
56
|
+
/**
|
|
57
|
+
* By default the table is responsive - it will be flattened at narrow viewport widths.
|
|
58
|
+
* This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
|
|
59
|
+
* Set to "none" to disable the responsive functionality.
|
|
60
|
+
* Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
|
|
61
|
+
* this is useful for comparison tables where it's important to maintain column and row layout.
|
|
62
|
+
*/
|
|
63
|
+
this.breakpoint = "small";
|
|
64
|
+
this.handleMediaQueryChange = (mq) => {
|
|
65
|
+
this.matchesBreakpoint = mq.matches;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
connectedCallback() {
|
|
69
|
+
this.mq = matchMedia(breakpointToToken[this.breakpoint]);
|
|
70
|
+
this.mq.addEventListener("change", debounce(this.handleMediaQueryChange, 50));
|
|
71
|
+
this.handleMediaQueryChange(this.mq);
|
|
72
|
+
this.observer = new MutationObserver(() => debounce(this.copyHeadingsToCells(), 50));
|
|
73
|
+
this.observer.observe(this.element, {
|
|
74
|
+
childList: true,
|
|
75
|
+
subtree: true,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
componentWillLoad() {
|
|
79
|
+
inheritGlobalTheme(this);
|
|
80
|
+
this.copyHeadingsToCells();
|
|
81
|
+
if (this.sticky && this.breakpoint === "none-scrollable") {
|
|
82
|
+
console.warn(`[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence`);
|
|
83
|
+
}
|
|
84
|
+
if (this.sticky) {
|
|
85
|
+
const stickyTop = stickyTopValues[this.stickyDistance];
|
|
86
|
+
const headingElements = this.element.querySelectorAll("thead th");
|
|
87
|
+
headingElements.forEach(th => (th.style.top = `${stickyTop}px`));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
componentDidLoad() {
|
|
91
|
+
// this clears all pending mutations,
|
|
92
|
+
// that way we avoid dealing with any initial changes
|
|
93
|
+
// and only get genuine mutations as rows are added/removed
|
|
94
|
+
this.observer ? this.observer.takeRecords() : null;
|
|
95
|
+
}
|
|
96
|
+
disconnectedCallback() {
|
|
97
|
+
this.observer.disconnect();
|
|
98
|
+
this.observer = null;
|
|
99
|
+
this.mq.removeListener(this.handleMediaQueryChange);
|
|
100
|
+
this.mq = null;
|
|
101
|
+
this.matchesBreakpoint = true;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Local methods.
|
|
105
|
+
*/
|
|
106
|
+
copyHeadingsToCells() {
|
|
107
|
+
const headingElements = this.element.querySelectorAll("thead th");
|
|
108
|
+
const rowElements = this.element.querySelectorAll("tbody tr");
|
|
109
|
+
const headings = Array.from(headingElements).map(th => th.textContent.trim());
|
|
110
|
+
rowElements.forEach(tr => {
|
|
111
|
+
tr.querySelectorAll("td").forEach((td, i) => {
|
|
112
|
+
if (headings[i]) {
|
|
113
|
+
td.dataset.heading = headings[i];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
render() {
|
|
119
|
+
return (h(Host, { class: {
|
|
120
|
+
[`duet-table-${this.variation}`]: true,
|
|
121
|
+
"duet-table-flattened": !this.matchesBreakpoint,
|
|
122
|
+
// sticky only valid when in regular table layout
|
|
123
|
+
"duet-table-sticky": this.matchesBreakpoint && this.sticky,
|
|
124
|
+
"duet-table-scrollable": this.breakpoint === "none-scrollable",
|
|
125
|
+
"duet-m-0": this.margin === "none",
|
|
126
|
+
"duet-theme-turva": this.theme === "turva",
|
|
127
|
+
} }, h("slot", null)));
|
|
128
|
+
}
|
|
129
|
+
get element() { return this; }
|
|
130
|
+
static get style() { return duetTableCss; }
|
|
131
|
+
}, [4, "duet-table", {
|
|
132
|
+
"theme": [1025],
|
|
133
|
+
"margin": [1],
|
|
134
|
+
"variation": [1],
|
|
135
|
+
"sticky": [4],
|
|
136
|
+
"stickyDistance": [1, "sticky-distance"],
|
|
137
|
+
"breakpoint": [1],
|
|
138
|
+
"matchesBreakpoint": [32]
|
|
139
|
+
}]);
|
|
140
|
+
function defineCustomElement() {
|
|
141
|
+
if (typeof customElements === "undefined") {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const components = ["duet-table"];
|
|
145
|
+
components.forEach(tagName => { switch (tagName) {
|
|
146
|
+
case "duet-table":
|
|
147
|
+
if (!customElements.get(tagName)) {
|
|
148
|
+
customElements.define(tagName, DuetTable);
|
|
149
|
+
}
|
|
150
|
+
break;
|
|
151
|
+
} });
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export { DuetTable as D, defineCustomElement as d };
|