@duetds/components 4.35.4 → 5.0.0
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 +1708 -1055
- package/lib/cjs/duet-action-button.cjs.entry.js +163 -0
- 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 +14 -5
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +4 -4
- 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 +4 -4
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +4 -4
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/{duet-editable-table_4.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +382 -346
- 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 +4 -4
- 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 +3 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
- package/lib/cjs/duet-pagination_2.cjs.entry.js +458 -0
- 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 +3 -3
- package/lib/cjs/duet-select.cjs.entry.js +16 -4
- package/lib/cjs/duet-step_2.cjs.entry.js +2 -2
- 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 +2 -2
- package/lib/cjs/{focus-utils-eb8c5b20.js → focus-utils-7a11c463.js} +1 -1
- package/lib/cjs/{index-6ae8090f.js → index-da5d5aaf.js} +4 -1
- package/lib/cjs/js-utils-be1d29ae.js +39 -0
- package/lib/cjs/{keyboard-utils-b4e3d1d3.js → keyboard-utils-898cfe14.js} +8 -0
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{token-utils-05bd23b4.js → token-utils-ac8432d1.js} +10 -7
- package/lib/cjs/{tokens-8596cece.js → tokens-72efc7fd.js} +0 -0
- package/lib/cjs/{tokens.module-6b2df1c2.js → tokens.module-6afcc9c1.js} +0 -0
- package/lib/collection/collection-manifest.json +22 -11
- package/lib/collection/components/duet-action-button/duet-action-button.css +87 -0
- package/lib/collection/components/duet-action-button/duet-action-button.js +489 -0
- package/lib/collection/components/duet-button/duet-button.css +3 -0
- package/lib/collection/components/duet-button/duet-button.js +50 -1
- package/lib/collection/components/duet-card/duet-card.js +1 -1
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +2 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +2 -57
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +2 -6
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +3 -2
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +20 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +331 -205
- package/lib/collection/components/duet-pagination/duet-pagination-utils.js +9 -0
- package/lib/collection/components/duet-pagination/duet-pagination.css +61 -0
- package/lib/collection/components/duet-pagination/duet-pagination.js +541 -0
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.css +49 -0
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +340 -0
- package/lib/collection/components/duet-select/duet-select.css +26 -0
- package/lib/collection/components/duet-select/duet-select.js +39 -4
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +5 -1
- package/lib/collection/components/duet-table/duet-table.css +42 -8
- package/lib/collection/components/duet-table/duet-table.js +11 -2
- package/lib/collection/components/duet-upload/duet-upload.css +25 -0
- package/lib/collection/components/duet-upload/duet-upload.js +270 -166
- package/lib/collection/components/duet-upload/upload-validators.js +1 -1
- package/lib/collection/utils/fixture-utils.js +3 -5
- package/lib/collection/utils/js-utils.js +36 -1
- package/lib/collection/utils/keyboard-utils.js +4 -0
- package/lib/collection/utils/test-utils.js +2 -1
- package/lib/collection/utils/token-utils.js +33 -6
- package/lib/custom-elements-bundle/index.d.ts +18 -12
- package/lib/custom-elements-bundle/index.js +1653 -1046
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-503f1286.entry.js → p-00209700.entry.js} +1 -1
- package/lib/duet/{p-76fa8882.entry.js → p-01144f93.entry.js} +1 -1
- package/lib/duet/{p-ec2aea5f.system.entry.js → p-021bf3a2.system.entry.js} +1 -1
- package/lib/duet/{p-0169d57e.entry.js → p-04c6e557.entry.js} +1 -1
- package/lib/duet/{p-03a5fe42.system.entry.js → p-06fd151e.system.entry.js} +1 -1
- package/lib/duet/p-0988f548.entry.js +4 -0
- package/lib/duet/{p-d5a4b17f.system.entry.js → p-0e1130a0.system.entry.js} +1 -1
- package/lib/duet/{p-e4e99da0.entry.js → p-0fedc1c6.entry.js} +1 -1
- package/lib/duet/{p-2c85e001.system.entry.js → p-111b70c5.system.entry.js} +1 -1
- package/lib/duet/p-12825e2c.entry.js +4 -0
- package/lib/duet/p-166c09ce.system.entry.js +4 -0
- package/lib/duet/{p-8367a2d1.entry.js → p-1be45fc6.entry.js} +1 -1
- package/lib/duet/{p-253fd12a.system.entry.js → p-1da57e19.system.entry.js} +1 -1
- package/lib/duet/{p-b72ed5ef.system.entry.js → p-21c9efa8.system.entry.js} +1 -1
- package/lib/duet/{p-01679b51.entry.js → p-2245c56b.entry.js} +1 -1
- package/lib/duet/p-2273fc88.js +4 -0
- package/lib/duet/{p-5630828a.system.entry.js → p-232762b3.system.entry.js} +1 -1
- package/lib/duet/{p-3025a411.system.js → p-251dc733.system.js} +1 -1
- package/lib/duet/{p-ddb6344c.system.js → p-268c0abb.system.js} +0 -0
- package/lib/duet/{p-9077cd24.system.entry.js → p-2b6dac5c.system.entry.js} +1 -1
- package/lib/duet/{p-bba528b5.entry.js → p-35cdec32.entry.js} +1 -1
- package/lib/duet/{p-ee598605.entry.js → p-37bdfcc6.entry.js} +1 -1
- package/lib/duet/{p-c3d552d5.entry.js → p-3c7d81b0.entry.js} +1 -1
- package/lib/duet/{p-824d2360.system.entry.js → p-3f77090f.system.entry.js} +1 -1
- package/lib/duet/{p-7b451394.system.js → p-3fafe82f.system.js} +1 -1
- package/lib/duet/{p-2395f96e.system.entry.js → p-4b221aa3.system.entry.js} +1 -1
- package/lib/duet/{p-4ea864dd.system.entry.js → p-4b7b1d2a.system.entry.js} +1 -1
- package/lib/duet/p-4c282c1a.entry.js +4 -0
- package/lib/duet/p-51a7c020.entry.js +4 -0
- package/lib/duet/{p-e8ce8394.entry.js → p-5298f6fb.entry.js} +1 -1
- package/lib/duet/p-5746d88c.js +4 -0
- package/lib/duet/{p-dfd96467.entry.js → p-589c2f28.entry.js} +1 -1
- package/lib/duet/{p-f98fca13.system.entry.js → p-592315ca.system.entry.js} +1 -1
- package/lib/duet/{p-6cff80cb.system.entry.js → p-59a0ec33.system.entry.js} +1 -1
- package/lib/duet/p-5e1f64cb.entry.js +4 -0
- package/lib/duet/{p-73b5248d.entry.js → p-608645ed.entry.js} +1 -1
- package/lib/duet/{p-8ea92cc5.entry.js → p-683f1962.entry.js} +1 -1
- package/lib/duet/{p-55fff1fe.entry.js → p-6932c6d8.entry.js} +1 -1
- package/lib/duet/{p-731444f6.entry.js → p-6934cb1b.entry.js} +1 -1
- package/lib/duet/{p-caab828f.system.entry.js → p-6d209c01.system.entry.js} +1 -1
- package/lib/duet/{p-61198eee.system.entry.js → p-70e5c803.system.entry.js} +1 -1
- package/lib/duet/p-74780bca.system.js +4 -0
- package/lib/duet/p-74d267d3.system.entry.js +4 -0
- package/lib/duet/{p-2bfe8b50.system.entry.js → p-766daacb.system.entry.js} +1 -1
- package/lib/duet/p-77acbfe4.system.js +4 -0
- package/lib/duet/p-7953cff9.system.entry.js +4 -0
- package/lib/duet/{p-01f3fbd4.system.entry.js → p-7e939e57.system.entry.js} +1 -1
- package/lib/duet/{p-fa99eaa4.system.js → p-812b0905.system.js} +0 -0
- package/lib/duet/{p-c122428f.entry.js → p-814ed07c.entry.js} +1 -1
- package/lib/duet/{p-04304e51.entry.js → p-82a0e535.entry.js} +1 -1
- package/lib/duet/{p-4a60b131.system.entry.js → p-8338702d.system.entry.js} +1 -1
- package/lib/duet/{p-e682d701.system.entry.js → p-85b4b5c0.system.entry.js} +2 -2
- package/lib/duet/{p-e3229d0d.entry.js → p-86538787.entry.js} +1 -1
- package/lib/duet/p-898f30a5.js +4 -0
- package/lib/duet/{p-40a76f20.entry.js → p-8f01f647.entry.js} +1 -1
- package/lib/duet/{p-a39a0a45.entry.js → p-8f6def3f.entry.js} +1 -1
- package/lib/duet/{p-753098ec.entry.js → p-90464434.entry.js} +1 -1
- package/lib/duet/p-92639d0b.system.js +4 -0
- package/lib/duet/{p-873e4c51.system.entry.js → p-97f95c02.system.entry.js} +2 -2
- package/lib/duet/{p-ea30becb.system.entry.js → p-982deb44.system.entry.js} +1 -1
- package/lib/duet/{p-7fd62541.entry.js → p-9dc88c43.entry.js} +1 -1
- package/lib/duet/{p-412f58cf.entry.js → p-a37e57d8.entry.js} +1 -1
- package/lib/duet/{p-da1f6193.system.entry.js → p-a71510b8.system.entry.js} +1 -1
- package/lib/duet/p-a8eec12e.system.entry.js +4 -0
- package/lib/duet/{p-4d8cd455.system.entry.js → p-abcfbb23.system.entry.js} +1 -1
- package/lib/duet/{p-99262d61.entry.js → p-ac2b38e6.entry.js} +1 -1
- package/lib/duet/{p-24b4eefb.system.entry.js → p-ace2cd17.system.entry.js} +1 -1
- package/lib/duet/{p-94a2da86.system.entry.js → p-ad278903.system.entry.js} +1 -1
- package/lib/duet/{p-a0deb526.entry.js → p-aea907ad.entry.js} +1 -1
- package/lib/duet/{p-9690681b.system.entry.js → p-b432d318.system.entry.js} +1 -1
- package/lib/duet/{p-44fe8367.system.entry.js → p-b4e75f80.system.entry.js} +1 -1
- package/lib/duet/{p-c1b34a78.system.entry.js → p-b8c8105c.system.entry.js} +1 -1
- package/lib/duet/{p-efd978ee.entry.js → p-ba7480e9.entry.js} +1 -1
- package/lib/duet/p-bc7dba26.entry.js +4 -0
- package/lib/duet/{p-a926b44b.entry.js → p-bf06f635.entry.js} +1 -1
- package/lib/duet/p-c6ccf366.system.entry.js +4 -0
- package/lib/duet/{p-7cdb8bfa.entry.js → p-cd1a767f.entry.js} +1 -1
- package/lib/duet/p-d6d9b0c6.system.entry.js +4 -0
- package/lib/duet/{p-8143f3de.js → p-d7bc0102.js} +0 -0
- package/lib/duet/{p-fb98ac5a.entry.js → p-d9e329c0.entry.js} +1 -1
- package/lib/duet/p-dbb4a588.js +4 -0
- package/lib/duet/{p-f51f8554.entry.js → p-dc67d989.entry.js} +1 -1
- package/lib/duet/{p-a69667c7.entry.js → p-de9ff67c.entry.js} +1 -1
- package/lib/duet/{p-0f185a8a.system.entry.js → p-deb8ac4d.system.entry.js} +1 -1
- package/lib/duet/p-e2e0bc49.system.js +4 -0
- package/lib/duet/{p-6b24111b.system.entry.js → p-e624799f.system.entry.js} +1 -1
- package/lib/duet/{p-8973aa31.system.entry.js → p-e887d6db.system.entry.js} +1 -1
- package/lib/duet/p-e9c3053b.js +4 -0
- package/lib/duet/{p-a212f672.system.entry.js → p-ebed7c5e.system.entry.js} +1 -1
- package/lib/duet/{p-ad07f399.js → p-ed75c8b3.js} +0 -0
- package/lib/duet/{p-4a931c6c.system.entry.js → p-f020852e.system.entry.js} +1 -1
- package/lib/duet/p-f2abd301.entry.js +4 -0
- package/lib/duet/{p-fc35b926.system.entry.js → p-f54d1487.system.entry.js} +1 -1
- package/lib/duet/{p-17f85b90.entry.js → p-fc44a819.entry.js} +1 -1
- package/lib/duet/{p-bc6794bc.system.entry.js → p-fcdd24f8.system.entry.js} +1 -1
- package/lib/duet/{p-5e895b06.entry.js → p-fed35d92.entry.js} +1 -1
- package/lib/duet/{p-de5c3a36.entry.js → p-ff308f4c.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +159 -0
- 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 +14 -5
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +4 -4
- 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 +4 -4
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +4 -4
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/{duet-editable-table_4.entry.js → duet-editable-table_3.entry.js} +384 -347
- 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 +4 -4
- 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 +3 -3
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +2 -2
- package/lib/esm/duet-pagination_2.entry.js +453 -0
- 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 +3 -3
- package/lib/esm/duet-select.entry.js +16 -4
- package/lib/esm/duet-step_2.entry.js +2 -2
- 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 +2 -2
- package/lib/esm/{focus-utils-6db957a7.js → focus-utils-b0b3361f.js} +1 -1
- package/lib/esm/{index-828dfb4e.js → index-16f4da7f.js} +4 -1
- package/lib/esm/js-utils-52e0944c.js +36 -0
- package/lib/esm/{keyboard-utils-584cedd7.js → keyboard-utils-6eb55cd5.js} +5 -1
- package/lib/esm/loader.js +2 -2
- package/lib/esm/{token-utils-75f78ca4.js → token-utils-e9a0cb88.js} +10 -7
- package/lib/esm/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
- package/lib/esm/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
- package/lib/esm-es5/duet-action-button.entry.js +4 -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-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 +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +2 -2
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.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 +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 +4 -0
- 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 +2 -2
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +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-b0b3361f.js +4 -0
- package/lib/esm-es5/{index-828dfb4e.js → index-16f4da7f.js} +1 -1
- package/lib/esm-es5/js-utils-52e0944c.js +4 -0
- package/lib/esm-es5/keyboard-utils-6eb55cd5.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/token-utils-e9a0cb88.js +4 -0
- package/lib/esm-es5/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
- package/lib/esm-es5/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
- package/lib/html.html-data.json +5266 -0
- package/lib/types/components/duet-action-button/duet-action-button.d.ts +112 -0
- package/lib/types/components/duet-button/duet-button.d.ts +9 -0
- package/lib/types/components/duet-card/duet-card.d.ts +1 -1
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +1 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +2 -2
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +106 -48
- package/lib/types/components/duet-pagination/duet-pagination-utils.d.ts +1 -0
- package/lib/types/components/duet-pagination/duet-pagination.d.ts +105 -0
- package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +70 -0
- package/lib/types/components/duet-select/duet-select.d.ts +5 -0
- package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +4 -0
- package/lib/types/components/duet-table/duet-table.d.ts +16 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +68 -58
- package/lib/types/components.d.ts +402 -140
- package/lib/types/utils/js-utils.d.ts +2 -0
- package/lib/types/utils/keyboard-utils.d.ts +4 -0
- package/lib/types/utils/token-utils.d.ts +2 -0
- package/package.json +5 -6
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +0 -96
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +0 -32
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +0 -225
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +0 -36
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +0 -225
- package/lib/duet/p-0427e1a5.entry.js +0 -4
- package/lib/duet/p-04f9f1bf.js +0 -4
- package/lib/duet/p-0f91d386.system.entry.js +0 -4
- package/lib/duet/p-227e5196.js +0 -4
- package/lib/duet/p-2545734a.entry.js +0 -4
- package/lib/duet/p-2b8316ee.system.entry.js +0 -4
- package/lib/duet/p-477c2e5c.entry.js +0 -4
- package/lib/duet/p-50b4fb2c.js +0 -4
- package/lib/duet/p-66bf27b9.system.entry.js +0 -4
- package/lib/duet/p-68ecdc4f.system.entry.js +0 -4
- package/lib/duet/p-853cd059.js +0 -4
- package/lib/duet/p-a16a58c1.system.js +0 -4
- package/lib/duet/p-b0c16ee5.entry.js +0 -4
- package/lib/duet/p-b3a2a1e8.entry.js +0 -4
- package/lib/duet/p-bb12b972.system.js +0 -4
- package/lib/duet/p-c63e49e2.system.entry.js +0 -4
- package/lib/duet/p-e6349dd2.entry.js +0 -4
- package/lib/duet/p-ef3fc3f3.system.js +0 -4
- package/lib/esm/duet-editable-table-button.entry.js +0 -92
- package/lib/esm-es5/duet-editable-table-button.entry.js +0 -4
- package/lib/esm-es5/duet-editable-table_4.entry.js +0 -4
- package/lib/esm-es5/focus-utils-6db957a7.js +0 -4
- package/lib/esm-es5/keyboard-utils-584cedd7.js +0 -4
- package/lib/esm-es5/token-utils-75f78ca4.js +0 -4
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +0 -73
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +0 -76
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Prop, Watch } from "@stencil/core";
|
|
5
|
+
import { createID } from "../../utils/create-id";
|
|
6
|
+
import { isArrowDownKey, isArrowKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isMinusKey, isPlusKey, } from "../../utils/keyboard-utils";
|
|
7
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
8
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
|
+
export class DuetRangeStepper {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.leftBn = createID("duetRangeStepper-left");
|
|
12
|
+
this.rightBn = createID("duetRangeStepper-right");
|
|
13
|
+
/**
|
|
14
|
+
* Theme of the component.
|
|
15
|
+
*/
|
|
16
|
+
this.theme = "";
|
|
17
|
+
/**
|
|
18
|
+
* Start value
|
|
19
|
+
* @default 1
|
|
20
|
+
*/
|
|
21
|
+
this.stepIndex = 1;
|
|
22
|
+
/**
|
|
23
|
+
* How big is the step
|
|
24
|
+
* @default 99
|
|
25
|
+
*/
|
|
26
|
+
this.stepSize = 50;
|
|
27
|
+
/**
|
|
28
|
+
* Total of
|
|
29
|
+
* @default undefined
|
|
30
|
+
*/
|
|
31
|
+
this.total = 1000;
|
|
32
|
+
/**
|
|
33
|
+
* Default range stepper labels
|
|
34
|
+
*/
|
|
35
|
+
this.ariaLabelsDefaults = {
|
|
36
|
+
en: {
|
|
37
|
+
next_increment: "Next range increment",
|
|
38
|
+
previous_increment: "Previous range increment",
|
|
39
|
+
x_of_y: "{0}–{1} of {2}",
|
|
40
|
+
},
|
|
41
|
+
fi: {
|
|
42
|
+
next_increment: "Seuraava välillä",
|
|
43
|
+
previous_increment: "Edellinen välillä",
|
|
44
|
+
x_of_y: "{0}–{1} / {2}",
|
|
45
|
+
},
|
|
46
|
+
sv: {
|
|
47
|
+
next_increment: "Nästa intervall",
|
|
48
|
+
previous_increment: "Föregående intervall",
|
|
49
|
+
x_of_y: "{0}–{1} av {2}",
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Default pagination labels
|
|
54
|
+
*/
|
|
55
|
+
this.ariaLabels = getLocaleString(this.ariaLabelsDefaults);
|
|
56
|
+
/**
|
|
57
|
+
* Used to indicate which dom element with ID this element controls
|
|
58
|
+
*/
|
|
59
|
+
this.ariaControls = "";
|
|
60
|
+
this.handleClick = (e, direction) => {
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
this.increment(direction);
|
|
63
|
+
this.handleStepClick(e);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
watchStateHandler(newValue) {
|
|
67
|
+
if (newValue === 1) {
|
|
68
|
+
this.leftBnRef.setAttribute("disabled", "");
|
|
69
|
+
this.rightBnRef.focus();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.leftBnRef.removeAttribute("disabled");
|
|
73
|
+
}
|
|
74
|
+
if (newValue === this.total / this.stepSize) {
|
|
75
|
+
this.rightBnRef.setAttribute("disabled", "");
|
|
76
|
+
this.leftBnRef.focus();
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.rightBnRef.removeAttribute("disabled");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
handleStepClick(e) {
|
|
83
|
+
this.duetRangeStepUpdate.emit({
|
|
84
|
+
originalEvent: e,
|
|
85
|
+
component: "duet-range-stepper",
|
|
86
|
+
from: this.stepIndex * this.stepSize - this.stepSize,
|
|
87
|
+
to: this.stepIndex * this.stepSize,
|
|
88
|
+
index: this.stepIndex,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
componentWillLoad() {
|
|
92
|
+
inheritGlobalTheme(this);
|
|
93
|
+
}
|
|
94
|
+
componentDidLoad() {
|
|
95
|
+
this.watchStateHandler(this.stepIndex);
|
|
96
|
+
}
|
|
97
|
+
increment(direction) {
|
|
98
|
+
const newIndex = this.stepIndex + direction;
|
|
99
|
+
if (newIndex <= 0) {
|
|
100
|
+
this.stepIndex = 1;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
if (newIndex * this.stepSize <= this.total) {
|
|
104
|
+
this.stepIndex = newIndex;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
generateStepSize() {
|
|
111
|
+
// this function uses this.stepIndex and this.range to generate a range of number like 1-100
|
|
112
|
+
// this is used to generate the step size
|
|
113
|
+
let start = (this.stepIndex - 1) * this.stepSize;
|
|
114
|
+
//easy fix for starting position
|
|
115
|
+
if (start === 0) {
|
|
116
|
+
start = 1;
|
|
117
|
+
}
|
|
118
|
+
const end = this.stepIndex * this.stepSize;
|
|
119
|
+
return this.ariaLabels.x_of_y
|
|
120
|
+
.replace("{0}", String(start))
|
|
121
|
+
.replace("{1}", String(end))
|
|
122
|
+
.replace("{2}", String(this.total));
|
|
123
|
+
}
|
|
124
|
+
//handle a11y keyboard navigation events
|
|
125
|
+
async onKeyboardDown(e) {
|
|
126
|
+
// handle a11y based keyboard navigation for left/right/up/down
|
|
127
|
+
let next = this.stepIndex;
|
|
128
|
+
let dir = 1;
|
|
129
|
+
if (isArrowLeftKey(e) || isArrowUpKey(e) || isMinusKey(e)) {
|
|
130
|
+
next--;
|
|
131
|
+
dir = -1;
|
|
132
|
+
this.leftBnRef.focus();
|
|
133
|
+
}
|
|
134
|
+
if (isArrowRightKey(e) || isArrowDownKey(e) || isPlusKey(e)) {
|
|
135
|
+
next++;
|
|
136
|
+
dir = 1;
|
|
137
|
+
}
|
|
138
|
+
if (isArrowKey(e)) {
|
|
139
|
+
if (next > 0 && next * this.stepSize <= this.total) {
|
|
140
|
+
this.handleClick(e, dir);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
//await this.stepperRef.focus()
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* render() function
|
|
149
|
+
* Always the last one in the class.
|
|
150
|
+
*/
|
|
151
|
+
render() {
|
|
152
|
+
return (h("div", { class: {
|
|
153
|
+
"duet-range-stepper": true,
|
|
154
|
+
"duet-theme-turva": this.theme === "turva",
|
|
155
|
+
}, onKeyDown: e => this.onKeyboardDown(e), "aria-controls": this.ariaControls },
|
|
156
|
+
h("span", { class: "duet-range-step-counter", part: "range-numbers" }, this.generateStepSize()),
|
|
157
|
+
h("duet-action-button", { class: "duet-range-step-button duet-range-step-minus", onClick: e => this.handleClick(e, -1), id: this.leftBn, "aria-label": this.ariaLabels.previous_increment, ref: el => (this.leftBnRef = el), part: "navigation-arrow", iconName: "action-arrow-left-small" }),
|
|
158
|
+
h("duet-action-button", { class: "duet-range-step-button duet-range-step-plus", onClick: e => this.handleClick(e, 1), "aria-label": this.ariaLabels.next_increment, id: this.rightBn, ref: el => (this.rightBnRef = el), part: "navigation-arrow", iconName: "action-arrow-right-small" })));
|
|
159
|
+
}
|
|
160
|
+
static get is() { return "duet-range-stepper"; }
|
|
161
|
+
static get encapsulation() { return "shadow"; }
|
|
162
|
+
static get originalStyleUrls() { return {
|
|
163
|
+
"$": ["duet-range-stepper.scss"]
|
|
164
|
+
}; }
|
|
165
|
+
static get styleUrls() { return {
|
|
166
|
+
"$": ["duet-range-stepper.css"]
|
|
167
|
+
}; }
|
|
168
|
+
static get properties() { return {
|
|
169
|
+
"theme": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"mutable": true,
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "DuetTheme",
|
|
174
|
+
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
175
|
+
"references": {
|
|
176
|
+
"DuetTheme": {
|
|
177
|
+
"location": "import",
|
|
178
|
+
"path": "../../common-types"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": false,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": "Theme of the component."
|
|
187
|
+
},
|
|
188
|
+
"attribute": "theme",
|
|
189
|
+
"reflect": false,
|
|
190
|
+
"defaultValue": "\"\""
|
|
191
|
+
},
|
|
192
|
+
"stepIndex": {
|
|
193
|
+
"type": "number",
|
|
194
|
+
"mutable": true,
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "number",
|
|
197
|
+
"resolved": "number",
|
|
198
|
+
"references": {}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": false,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [{
|
|
204
|
+
"name": "default",
|
|
205
|
+
"text": "1"
|
|
206
|
+
}],
|
|
207
|
+
"text": "Start value"
|
|
208
|
+
},
|
|
209
|
+
"attribute": "step-index",
|
|
210
|
+
"reflect": false,
|
|
211
|
+
"defaultValue": "1"
|
|
212
|
+
},
|
|
213
|
+
"stepSize": {
|
|
214
|
+
"type": "number",
|
|
215
|
+
"mutable": false,
|
|
216
|
+
"complexType": {
|
|
217
|
+
"original": "number",
|
|
218
|
+
"resolved": "number",
|
|
219
|
+
"references": {}
|
|
220
|
+
},
|
|
221
|
+
"required": false,
|
|
222
|
+
"optional": false,
|
|
223
|
+
"docs": {
|
|
224
|
+
"tags": [{
|
|
225
|
+
"name": "default",
|
|
226
|
+
"text": "99"
|
|
227
|
+
}],
|
|
228
|
+
"text": "How big is the step"
|
|
229
|
+
},
|
|
230
|
+
"attribute": "step-size",
|
|
231
|
+
"reflect": false,
|
|
232
|
+
"defaultValue": "50"
|
|
233
|
+
},
|
|
234
|
+
"total": {
|
|
235
|
+
"type": "number",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "number",
|
|
239
|
+
"resolved": "number",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [{
|
|
246
|
+
"name": "default",
|
|
247
|
+
"text": "undefined"
|
|
248
|
+
}],
|
|
249
|
+
"text": "Total of"
|
|
250
|
+
},
|
|
251
|
+
"attribute": "total",
|
|
252
|
+
"reflect": false,
|
|
253
|
+
"defaultValue": "1000"
|
|
254
|
+
},
|
|
255
|
+
"ariaLabelsDefaults": {
|
|
256
|
+
"type": "unknown",
|
|
257
|
+
"mutable": false,
|
|
258
|
+
"complexType": {
|
|
259
|
+
"original": "DuetLangObject",
|
|
260
|
+
"resolved": "DuetLangObject",
|
|
261
|
+
"references": {
|
|
262
|
+
"DuetLangObject": {
|
|
263
|
+
"location": "import",
|
|
264
|
+
"path": "../../utils/language-utils"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Default range stepper labels"
|
|
273
|
+
},
|
|
274
|
+
"defaultValue": "{\n en: {\n next_increment: \"Next range increment\",\n previous_increment: \"Previous range increment\",\n x_of_y: \"{0}\u2013{1} of {2}\",\n },\n fi: {\n next_increment: \"Seuraava v\u00E4lill\u00E4\",\n previous_increment: \"Edellinen v\u00E4lill\u00E4\",\n x_of_y: \"{0}\u2013{1} / {2}\",\n },\n sv: {\n next_increment: \"N\u00E4sta intervall\",\n previous_increment: \"F\u00F6reg\u00E5ende intervall\",\n x_of_y: \"{0}\u2013{1} av {2}\",\n },\n }"
|
|
275
|
+
},
|
|
276
|
+
"ariaLabels": {
|
|
277
|
+
"type": "unknown",
|
|
278
|
+
"mutable": false,
|
|
279
|
+
"complexType": {
|
|
280
|
+
"original": "Record<string, string>",
|
|
281
|
+
"resolved": "{ [x: string]: string; }",
|
|
282
|
+
"references": {
|
|
283
|
+
"Record": {
|
|
284
|
+
"location": "global"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"required": false,
|
|
289
|
+
"optional": false,
|
|
290
|
+
"docs": {
|
|
291
|
+
"tags": [],
|
|
292
|
+
"text": "Default pagination labels"
|
|
293
|
+
},
|
|
294
|
+
"defaultValue": "getLocaleString(\n this.ariaLabelsDefaults\n )"
|
|
295
|
+
},
|
|
296
|
+
"ariaControls": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "string",
|
|
301
|
+
"resolved": "string",
|
|
302
|
+
"references": {}
|
|
303
|
+
},
|
|
304
|
+
"required": false,
|
|
305
|
+
"optional": false,
|
|
306
|
+
"docs": {
|
|
307
|
+
"tags": [],
|
|
308
|
+
"text": "Used to indicate which dom element with ID this element controls"
|
|
309
|
+
},
|
|
310
|
+
"attribute": "accessible-controls",
|
|
311
|
+
"reflect": false,
|
|
312
|
+
"defaultValue": "\"\""
|
|
313
|
+
}
|
|
314
|
+
}; }
|
|
315
|
+
static get events() { return [{
|
|
316
|
+
"method": "duetRangeStepUpdate",
|
|
317
|
+
"name": "duetRangeStepUpdate",
|
|
318
|
+
"bubbles": true,
|
|
319
|
+
"cancelable": true,
|
|
320
|
+
"composed": true,
|
|
321
|
+
"docs": {
|
|
322
|
+
"tags": [],
|
|
323
|
+
"text": "Event emitted when the step heading is clicked."
|
|
324
|
+
},
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "DuetRangeStepperUpdateEvent",
|
|
327
|
+
"resolved": "{ originalEvent: MouseEvent | KeyboardEvent; component: \"duet-range-stepper\"; from: number; to: number; index: number; }",
|
|
328
|
+
"references": {
|
|
329
|
+
"DuetRangeStepperUpdateEvent": {
|
|
330
|
+
"location": "local"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}]; }
|
|
335
|
+
static get elementRef() { return "element"; }
|
|
336
|
+
static get watchers() { return [{
|
|
337
|
+
"propName": "stepIndex",
|
|
338
|
+
"methodName": "watchStateHandler"
|
|
339
|
+
}]; }
|
|
340
|
+
}
|
|
@@ -39,6 +39,13 @@
|
|
|
39
39
|
width: 100% !important;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
:host.duet-select-variation-tiny {
|
|
43
|
+
position: relative;
|
|
44
|
+
top: -2px;
|
|
45
|
+
width: 72px;
|
|
46
|
+
margin: 0 !important;
|
|
47
|
+
vertical-align: baseline;
|
|
48
|
+
}
|
|
42
49
|
|
|
43
50
|
:host(.duet-m-0) {
|
|
44
51
|
margin: 0 !important;
|
|
@@ -76,6 +83,9 @@ duet-tooltip {
|
|
|
76
83
|
position: relative;
|
|
77
84
|
width: 100%;
|
|
78
85
|
}
|
|
86
|
+
.duet-select-container.duet-select-variation-tiny {
|
|
87
|
+
width: 72px;
|
|
88
|
+
}
|
|
79
89
|
|
|
80
90
|
.duet-select-wrapper {
|
|
81
91
|
position: relative;
|
|
@@ -89,6 +99,10 @@ duet-tooltip {
|
|
|
89
99
|
.duet-theme-turva .duet-select-wrapper {
|
|
90
100
|
font-family: "turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
91
101
|
}
|
|
102
|
+
.duet-select-variation-tiny .duet-select-wrapper {
|
|
103
|
+
width: 81px;
|
|
104
|
+
padding: 0 !important;
|
|
105
|
+
}
|
|
92
106
|
.duet-select-wrapper::after {
|
|
93
107
|
content: " ";
|
|
94
108
|
}
|
|
@@ -226,6 +240,18 @@ duet-tooltip {
|
|
|
226
240
|
.duet-theme-turva .duet-select svg {
|
|
227
241
|
color: #171c3a;
|
|
228
242
|
}
|
|
243
|
+
.duet-select-variation-tiny .duet-select {
|
|
244
|
+
width: 72px;
|
|
245
|
+
min-width: inherit;
|
|
246
|
+
padding: 0 !important;
|
|
247
|
+
margin-bottom: -4px;
|
|
248
|
+
overflow: visible;
|
|
249
|
+
font-weight: 600;
|
|
250
|
+
text-align: center;
|
|
251
|
+
}
|
|
252
|
+
.duet-select-variation-tiny .duet-select duet-icon {
|
|
253
|
+
padding-left: 10px;
|
|
254
|
+
}
|
|
229
255
|
|
|
230
256
|
.duet-select-help {
|
|
231
257
|
display: block;
|
|
@@ -34,6 +34,10 @@ export class DuetSelect {
|
|
|
34
34
|
* Inlined decorator, alphabetical order.
|
|
35
35
|
*/
|
|
36
36
|
this.processedItems = null;
|
|
37
|
+
/**
|
|
38
|
+
* Variation of dropdown. -tiny is used for small numbers / tiny option ranges.
|
|
39
|
+
*/
|
|
40
|
+
this.variation = "default";
|
|
37
41
|
/**
|
|
38
42
|
* Controls the margin of the component.
|
|
39
43
|
*/
|
|
@@ -165,11 +169,16 @@ export class DuetSelect {
|
|
|
165
169
|
*/
|
|
166
170
|
render() {
|
|
167
171
|
const identifier = this.identifier || this.selectId;
|
|
168
|
-
return (h(Host, { onClick: this.onClick, class: {
|
|
172
|
+
return (h(Host, { onClick: this.onClick, class: {
|
|
173
|
+
"duet-m-0": this.margin === "none",
|
|
174
|
+
"duet-expand": this.expand,
|
|
175
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
176
|
+
} },
|
|
169
177
|
h("div", { class: {
|
|
170
178
|
"duet-select-container": true,
|
|
171
179
|
"duet-label-hidden": this.labelHidden,
|
|
172
180
|
"duet-theme-turva": this.theme === "turva",
|
|
181
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
173
182
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
174
183
|
"has-error": !!this.error,
|
|
175
184
|
} },
|
|
@@ -183,10 +192,14 @@ export class DuetSelect {
|
|
|
183
192
|
!this.processedItems ? (h("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
|
|
184
193
|
return isOptionGroup(item) ? this.renderOptionGroup(item) : this.renderOption(item);
|
|
185
194
|
}))),
|
|
186
|
-
h("div", { class:
|
|
195
|
+
h("div", { class: {
|
|
196
|
+
"duet-select": true,
|
|
197
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
198
|
+
}, "aria-hidden": "true" },
|
|
187
199
|
h("span", { key: this.value }, this.getSelectedItemLabel()),
|
|
188
|
-
h("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
189
|
-
h("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" })))
|
|
200
|
+
this.variation !== "tiny" && (h("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
201
|
+
h("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" }))),
|
|
202
|
+
this.variation === "tiny" && (h("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xx-small" })))),
|
|
190
203
|
h("span", { class: "duet-select-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h("span", null, this.error)))));
|
|
191
204
|
}
|
|
192
205
|
static get is() { return "duet-select"; }
|
|
@@ -198,6 +211,28 @@ export class DuetSelect {
|
|
|
198
211
|
"$": ["duet-select.css"]
|
|
199
212
|
}; }
|
|
200
213
|
static get properties() { return {
|
|
214
|
+
"variation": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "DuetSelectVariation",
|
|
219
|
+
"resolved": "\"default\" | \"tiny\"",
|
|
220
|
+
"references": {
|
|
221
|
+
"DuetSelectVariation": {
|
|
222
|
+
"location": "local"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": false,
|
|
227
|
+
"optional": false,
|
|
228
|
+
"docs": {
|
|
229
|
+
"tags": [],
|
|
230
|
+
"text": "Variation of dropdown. -tiny is used for small numbers / tiny option ranges."
|
|
231
|
+
},
|
|
232
|
+
"attribute": "variation",
|
|
233
|
+
"reflect": false,
|
|
234
|
+
"defaultValue": "\"default\""
|
|
235
|
+
},
|
|
201
236
|
"accessibleActiveDescendant": {
|
|
202
237
|
"type": "string",
|
|
203
238
|
"mutable": false,
|
|
@@ -6,6 +6,10 @@ import { createID } from "../../utils/create-id";
|
|
|
6
6
|
import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey } from "../../utils/keyboard-utils";
|
|
7
7
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
8
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
|
+
/**
|
|
10
|
+
* @part ${identifier}-button - piercing selector for styling tab buttons
|
|
11
|
+
* @part ${identifier}-button--selected - piercing selector for styling selected tab button
|
|
12
|
+
*/
|
|
9
13
|
export class DuetTabGroup {
|
|
10
14
|
constructor() {
|
|
11
15
|
this.id = createID("DuetTabGroup");
|
|
@@ -88,7 +92,7 @@ export class DuetTabGroup {
|
|
|
88
92
|
};
|
|
89
93
|
this.renderTab = () => {
|
|
90
94
|
const renderedTabs = this.tabs.map((element, index) => {
|
|
91
|
-
return (h("button", { role: "tab", id: this.getButtonId(index), "aria-controls": this.getTabId(index), "aria-selected": element.selected ? "true" : "false", "aria-description": this.getAccessibleDescription(index), part: `${this.identifier}-button`, type: "button", class: {
|
|
95
|
+
return (h("button", { role: "tab", id: this.getButtonId(index), "aria-controls": this.getTabId(index), "aria-selected": element.selected ? "true" : "false", "aria-description": this.getAccessibleDescription(index), part: `${this.identifier}-button ${element.selected ? `${this.identifier}-button--selected` : ""}`, type: "button", class: {
|
|
92
96
|
"duet-p-0": this.padding === "none",
|
|
93
97
|
"duet-tab-button": true,
|
|
94
98
|
selected: element.selected,
|
|
@@ -65,15 +65,21 @@ duet-table tbody th {
|
|
|
65
65
|
duet-table.duet-theme-turva tbody th {
|
|
66
66
|
color: #171c3a;
|
|
67
67
|
}
|
|
68
|
+
duet-table .duet-table-action-row td:last-child {
|
|
69
|
+
justify-self: end;
|
|
70
|
+
padding-right: 20px !important;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
}
|
|
68
73
|
|
|
69
|
-
.duet-table-flattened
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.duet-table-flattened tr {
|
|
76
|
-
|
|
74
|
+
.duet-table-flattened tbody tr {
|
|
75
|
+
display: grid;
|
|
76
|
+
grid-template-columns: repeat(2, 1fr);
|
|
77
|
+
grid-auto-rows: auto;
|
|
78
|
+
gap: 10px;
|
|
79
|
+
}
|
|
80
|
+
.duet-table-flattened tbody tr.duet-table-action-row td:last-child::before {
|
|
81
|
+
padding: 0;
|
|
82
|
+
content: "";
|
|
77
83
|
}
|
|
78
84
|
.duet-table-flattened thead tr {
|
|
79
85
|
position: absolute !important;
|
|
@@ -86,11 +92,20 @@ duet-table.duet-theme-turva tbody th {
|
|
|
86
92
|
border: 0 !important;
|
|
87
93
|
}
|
|
88
94
|
.duet-table-flattened td {
|
|
95
|
+
grid-column: 1/2;
|
|
89
96
|
line-height: 1.25;
|
|
90
97
|
}
|
|
91
98
|
.duet-table-flattened td:not(:last-child) {
|
|
92
99
|
margin-bottom: 16px !important;
|
|
93
100
|
}
|
|
101
|
+
.duet-table-flattened td:first-child {
|
|
102
|
+
grid-row: 1;
|
|
103
|
+
grid-column: 1;
|
|
104
|
+
}
|
|
105
|
+
.duet-table-flattened td:last-child {
|
|
106
|
+
grid-row: 1;
|
|
107
|
+
grid-column: 2;
|
|
108
|
+
}
|
|
94
109
|
.duet-table-flattened tbody td,
|
|
95
110
|
.duet-table-flattened tbody th,
|
|
96
111
|
.duet-table-flattened tfoot td {
|
|
@@ -303,4 +318,23 @@ duet-table.duet-theme-turva tbody th {
|
|
|
303
318
|
}
|
|
304
319
|
.duet-theme-turva .duet-table-selected-column {
|
|
305
320
|
background: rgba(68, 68, 69, 0.08);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.duet-table-sortable tbody tr td:first-child,
|
|
324
|
+
.duet-table-sortable thead tr th:first-child {
|
|
325
|
+
padding: 20px;
|
|
326
|
+
}
|
|
327
|
+
.duet-table-sortable:not(.duet-table-flattened) tfoot {
|
|
328
|
+
border-top: 1px solid #e1e3e6;
|
|
329
|
+
}
|
|
330
|
+
.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot {
|
|
331
|
+
border-top-color: #e4e4e6;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.duet-table-actions table {
|
|
335
|
+
table-layout: auto;
|
|
336
|
+
}
|
|
337
|
+
.duet-table-actions thead th:last-child {
|
|
338
|
+
width: 1px;
|
|
339
|
+
white-space: nowrap;
|
|
306
340
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { mediaQueryLarge, mediaQueryMedium, mediaQuerySmall, mediaQueryXLarge, mediaQueryXxLarge, mediaQueryXxxLarge, sizeHeader, sizeNavigation, } from "@duetds/tokens";
|
|
5
5
|
import { Build, Component, Element, h, Host, Prop, State } from "@stencil/core";
|
|
6
|
+
import { debounce } from "../../utils/js-utils";
|
|
6
7
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
7
8
|
// remove wrapping speech marks.
|
|
8
9
|
// media query tokens are wrapped in speech marks,
|
|
@@ -23,6 +24,11 @@ const stickyTopValues = {
|
|
|
23
24
|
"with-links": parseFloat(sizeNavigation) * 16,
|
|
24
25
|
"without-links": parseFloat(sizeHeader) * 16,
|
|
25
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* @slot dot-menu- If this slot is populated - the content will be displayed together with a ... type menu to the far right in the tsble header
|
|
29
|
+
* @slot header - Header slot for the table
|
|
30
|
+
* @slot footer - Footer slot for the table
|
|
31
|
+
*/
|
|
26
32
|
export class DuetTable {
|
|
27
33
|
constructor() {
|
|
28
34
|
/**
|
|
@@ -64,9 +70,9 @@ export class DuetTable {
|
|
|
64
70
|
return;
|
|
65
71
|
}
|
|
66
72
|
this.mq = matchMedia(breakpointToToken[this.breakpoint]);
|
|
67
|
-
this.mq.addEventListener("change", this.handleMediaQueryChange);
|
|
73
|
+
this.mq.addEventListener("change", debounce(this.handleMediaQueryChange, 50));
|
|
68
74
|
this.handleMediaQueryChange(this.mq);
|
|
69
|
-
this.observer = new MutationObserver(() => this.copyHeadingsToCells());
|
|
75
|
+
this.observer = new MutationObserver(() => debounce(this.copyHeadingsToCells(), 50));
|
|
70
76
|
this.observer.observe(this.element, {
|
|
71
77
|
childList: true,
|
|
72
78
|
subtree: true,
|
|
@@ -103,6 +109,9 @@ export class DuetTable {
|
|
|
103
109
|
this.mq = null;
|
|
104
110
|
this.matchesBreakpoint = true;
|
|
105
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Local methods.
|
|
114
|
+
*/
|
|
106
115
|
copyHeadingsToCells() {
|
|
107
116
|
const headingElements = this.element.querySelectorAll("thead th");
|
|
108
117
|
const rowElements = this.element.querySelectorAll("tbody tr");
|
|
@@ -61,4 +61,29 @@
|
|
|
61
61
|
font-size: 1rem;
|
|
62
62
|
font-weight: 400;
|
|
63
63
|
background-color: #f5f8fa;
|
|
64
|
+
}
|
|
65
|
+
.duet-upload-editable-table-header-hidden {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.duet-upload-editable-table tbody .duet-upload-editable-table-data {
|
|
70
|
+
padding: 0 !important;
|
|
71
|
+
border: 0;
|
|
72
|
+
}
|
|
73
|
+
.duet-upload-editable-table duet-editable-table tfoot,
|
|
74
|
+
.duet-upload-editable-table duet-editable-table thead {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
.duet-upload-editable-table duet-editable-table .duet-editable-table-content {
|
|
78
|
+
padding-right: 0 !important;
|
|
79
|
+
padding-left: 0 !important;
|
|
80
|
+
}
|
|
81
|
+
.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td {
|
|
82
|
+
padding: 0.75rem 0 !important;
|
|
83
|
+
}
|
|
84
|
+
.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child {
|
|
85
|
+
padding-right: 0 !important;
|
|
86
|
+
}
|
|
87
|
+
.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button) {
|
|
88
|
+
border: 0;
|
|
64
89
|
}
|