@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
10
10
|
|
|
11
11
|
const duetEmptyStateCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const actionNewWindowSmall = require('./action-new-window-small-fa51dfb9.js');
|
|
10
10
|
const commonStrings = require('./common-strings-de17f887.js');
|
|
11
11
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const tokens = require('./tokens-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
|
+
const tokens = require('./tokens-72efc7fd.js');
|
|
10
10
|
const watchOptions = require('./watch-options-d88afac0.js');
|
|
11
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
12
12
|
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const formSearch = require('./form-search-d61b2843.js');
|
|
10
|
-
const tokens = require('./tokens-
|
|
10
|
+
const tokens = require('./tokens-72efc7fd.js');
|
|
11
11
|
const bodyScrollLock_es6 = require('./bodyScrollLock.es6-6ef1142a.js');
|
|
12
12
|
const commonStrings = require('./common-strings-de17f887.js');
|
|
13
|
-
const keyboardUtils = require('./keyboard-utils-
|
|
13
|
+
const keyboardUtils = require('./keyboard-utils-898cfe14.js');
|
|
14
14
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
15
15
|
const stringUtils = require('./string-utils-267e3dbb.js');
|
|
16
16
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
17
17
|
const actionArrowDownSmall = require('./action-arrow-down-small-ef77a2d1.js');
|
|
18
|
-
const tokens_module = require('./tokens.module-
|
|
18
|
+
const tokens_module = require('./tokens.module-6afcc9c1.js');
|
|
19
19
|
const createId = require('./create-id-c3b984b1.js');
|
|
20
20
|
|
|
21
21
|
var navigationContactDropdown={"title":"navigation-contact-dropdown","tags":"navigation contact dropdown speech bubbles","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M20.247 24a.743.743 0 0 1-.53-.22l-4.28-4.28h-.439c-3.308 0-6-2.692-6-6s2.692-6 6-6h3c3.309.001 6 2.692 6 6a5.974 5.974 0 0 1-3 5.179v4.571a.75.75 0 0 1-.751.75zm-5.25-15c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5h.75c.198 0 .391.08.53.22l3.22 3.22v-3.213c0-.289.169-.555.429-.678a4.51 4.51 0 0 0 2.571-4.049 4.504 4.504 0 0 0-4.498-4.499h-3.002z\"/><path d=\"M3.747 16.5a.747.747 0 0 1-.75-.75v-4.57a5.967 5.967 0 0 1-2.65-3.171A5.948 5.948 0 0 1 .57 3.431 6.014 6.014 0 0 1 5.985 0h3.012a6.04 6.04 0 0 1 5.752 4.286.751.751 0 0 1-.718.964.755.755 0 0 1-.719-.536A4.531 4.531 0 0 0 8.997 1.5h-3a4.511 4.511 0 0 0-4.071 2.572c-.512 1.084-.571 2.302-.167 3.431s1.224 2.032 2.308 2.545c.261.123.43.39.43.678v3.214l1.72-1.72a.744.744 0 0 1 1.06 0 .752.752 0 0 1 0 1.061l-3 3a.744.744 0 0 1-.53.219z\"/></svg>"};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const actionNewWindowSmall = require('./action-new-window-small-fa51dfb9.js');
|
|
10
10
|
const commonStrings = require('./common-strings-de17f887.js');
|
|
11
11
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
10
|
-
const tokenUtils = require('./token-utils-
|
|
11
|
-
require('./tokens.module-
|
|
10
|
+
const tokenUtils = require('./token-utils-ac8432d1.js');
|
|
11
|
+
require('./tokens.module-6afcc9c1.js');
|
|
12
12
|
|
|
13
13
|
const cleanupSvg = (svgContent) => {
|
|
14
14
|
if (typeof document === "undefined" || !svgContent) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const formSearch = require('./form-search-d61b2843.js');
|
|
10
10
|
const createId = require('./create-id-c3b984b1.js');
|
|
11
11
|
const inputUtils = require('./input-utils-f3e3854c.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const isInternetExplorer = require('./is-internet-explorer-91361c56.js');
|
|
10
10
|
|
|
11
11
|
const duetLayoutCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-layout-has-top{margin-top:0}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout.duet-center{display:flex;align-items:center;justify-content:center;width:100%;max-width:888px}@media (min-width: 36em){.duet-layout.duet-center{padding:0 48px}}@media (min-width: 48em){.duet-layout.duet-center{padding:0 72px}}@media (min-width: 62em){.duet-layout.duet-center{width:100%}}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main,.duet-sidebar,.duet-layout-top,.duet-layout-bottom{display:block;width:100%}.duet-layout-top{position:relative;display:block;width:100%;margin:72px auto 0}.duet-layout-top.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout-top .duet-layout-top-wrapper{padding:0 20px;margin:0 auto}@media (min-width: 36em){.duet-layout-top .duet-layout-top-wrapper{padding:0 28px}}@media (min-width: 62em){.duet-layout-top .duet-layout-top-wrapper{padding:0 56px}}@media (min-width: 76.25em){.duet-layout-top .duet-layout-top-wrapper{max-width:1110px;padding:0}}.duet-center .duet-layout-top-wrapper{max-width:888px}@media (min-width: 36em){.duet-center .duet-layout-top-wrapper{padding:0 48px}}@media (min-width: 48em){.duet-center .duet-layout-top-wrapper{padding:0 72px}}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}@media (min-width: 62em){.duet-sidebar{min-width:256px;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container{width:auto;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container.has-tabs{margin-top:89px}}@media (min-width: 62em){.duet-sidebar-container.sticky{position:sticky}.duet-sidebar-container.sticky.with-links{top:calc(3rem + 20px)}.duet-sidebar-container.sticky.without-links{top:calc(4rem + 20px)}}";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
10
10
|
const watchOptions = require('./watch-options-d88afac0.js');
|
|
11
11
|
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const bodyScrollLock_es6 = require('./bodyScrollLock.es6-6ef1142a.js');
|
|
10
10
|
const createId = require('./create-id-c3b984b1.js');
|
|
11
|
-
const focusUtils = require('./focus-utils-
|
|
12
|
-
const keyboardUtils = require('./keyboard-utils-
|
|
11
|
+
const focusUtils = require('./focus-utils-7a11c463.js');
|
|
12
|
+
const keyboardUtils = require('./keyboard-utils-898cfe14.js');
|
|
13
13
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
14
14
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
15
15
|
require('./string-utils-267e3dbb.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
10
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
11
|
const actionArrowDownSmall = require('./action-arrow-down-small-ef77a2d1.js');
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
|
-
const keyboardUtils = require('./keyboard-utils-
|
|
10
|
+
const keyboardUtils = require('./keyboard-utils-898cfe14.js');
|
|
11
11
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
12
12
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
13
13
|
require('./string-utils-267e3dbb.js');
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
+
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
|
+
const createId = require('./create-id-c3b984b1.js');
|
|
10
|
+
const jsUtils = require('./js-utils-be1d29ae.js');
|
|
11
|
+
const keyboardUtils = require('./keyboard-utils-898cfe14.js');
|
|
12
|
+
const languageUtils = require('./language-utils-aa282901.js');
|
|
13
|
+
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
14
|
+
require('./string-utils-267e3dbb.js');
|
|
15
|
+
|
|
16
|
+
const shouldDisplayNavigation = (visibleItems, total, take) => {
|
|
17
|
+
if (visibleItems * 2 > total / take) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const duetPaginationCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}.duet-pagination-nav{position:relative}.duet-pagination ::part(button){border:0}.duet-pagination,.duet-pagination li{display:flex;flex-wrap:wrap;gap:0.1rem;align-items:center}.duet-pagination-item-is-active .duet-pagination-page-number{border-bottom-color:inherit;border-bottom-style:solid;border-bottom-width:2px}.duet-pagination duet-button{width:30px;min-width:36px;font-weight:600;text-decoration:none;border-left-width:0}.duet-pagination-overlay{position:absolute;top:1rem;z-index:300;width:100%;text-align:center}.duet-pagination.duet-pagination-is-dimmed{opacity:0.5}";
|
|
24
|
+
|
|
25
|
+
let DuetPagination = class {
|
|
26
|
+
constructor(hostRef) {
|
|
27
|
+
index.registerInstance(this, hostRef);
|
|
28
|
+
this.duetPageChange = index.createEvent(this, "duetPageChange", 3);
|
|
29
|
+
this.listId = createId.createID("duet-pagination-list");
|
|
30
|
+
this.numbersStore = "";
|
|
31
|
+
/**
|
|
32
|
+
* State() variables
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
this.totalPages = 10;
|
|
36
|
+
/**
|
|
37
|
+
* State() variables
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
this.internalSectionIndex = 0;
|
|
41
|
+
/**
|
|
42
|
+
* Theme of the pagination.
|
|
43
|
+
*/
|
|
44
|
+
this.theme = "";
|
|
45
|
+
/**
|
|
46
|
+
* Characters to use for the jump buttons.
|
|
47
|
+
*/
|
|
48
|
+
this.jumpString = "...";
|
|
49
|
+
/**
|
|
50
|
+
* Variation of the paginator (compact and default supported)
|
|
51
|
+
*/
|
|
52
|
+
this.variation = "default";
|
|
53
|
+
/**
|
|
54
|
+
* Default pagination labels
|
|
55
|
+
*/
|
|
56
|
+
this.accessibleLabelsDefaults = {
|
|
57
|
+
en: {
|
|
58
|
+
next_page: "Next page",
|
|
59
|
+
previous_page: "Previous page",
|
|
60
|
+
first_page: "First page",
|
|
61
|
+
last_page: "Last page",
|
|
62
|
+
jump_to: "Jump to page",
|
|
63
|
+
go_to: "Go to page",
|
|
64
|
+
description: "You may use arrow keys to select page number, or enter a page number when this element is in focus to jump to a page",
|
|
65
|
+
pagination_label: "Pagination, choose a number to jump to a page",
|
|
66
|
+
prev_section: "Show previous {0} page numbers, screen reader user should use arrowkeys to navigate",
|
|
67
|
+
next_section: "Show next {0} page numbers, screen reader user should use arrowkeys to navigate",
|
|
68
|
+
},
|
|
69
|
+
fi: {
|
|
70
|
+
next_page: "Seuraava sivu",
|
|
71
|
+
previous_page: "Edellinen sivu",
|
|
72
|
+
first_page: "Ensimmäinen sivu",
|
|
73
|
+
last_page: "Viimeinen sivu",
|
|
74
|
+
jump_to: "Siirry sivulle",
|
|
75
|
+
go_to: "Siirry sivulle",
|
|
76
|
+
description: "Voit käyttää nuolinäppäimiä sivunumeron valitsemiseen, tai kirjoittaa sivunumeron, jos tämä elementti on aktiivinen, siirtymään sivulle",
|
|
77
|
+
pagination_label: "Sivutus, valitse sivunumero siirtyäksesi sivulle",
|
|
78
|
+
prev_section: "Näytä edelliset {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",
|
|
79
|
+
next_section: "Näytä seuraavat {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",
|
|
80
|
+
},
|
|
81
|
+
sv: {
|
|
82
|
+
next_page: "Nästa sida",
|
|
83
|
+
previous_page: "Föregående sida",
|
|
84
|
+
first_page: "Första sidan",
|
|
85
|
+
last_page: "Sista sidan",
|
|
86
|
+
jump_to: "Hoppa till sida",
|
|
87
|
+
go_to: "Hoppa till sida",
|
|
88
|
+
description: "Du kan använda piltangenterna för att välja sida, eller skriva in sida när elementet är i fokus för att hoppa till en sida",
|
|
89
|
+
pagination_label: "Sidutning, välj en siffra för att hoppa till en sida",
|
|
90
|
+
prev_section: "Visa föregående {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",
|
|
91
|
+
next_section: "Visa nästa {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Default pagination labels
|
|
96
|
+
*/
|
|
97
|
+
this.accessibleLabels = languageUtils.getLocaleString(this.accessibleLabelsDefaults);
|
|
98
|
+
/**
|
|
99
|
+
* The size of the take, when paginating.
|
|
100
|
+
*/
|
|
101
|
+
this.take = 5;
|
|
102
|
+
/**
|
|
103
|
+
* Amount of visible page numbers to show
|
|
104
|
+
*/
|
|
105
|
+
this.visibleItems = 5;
|
|
106
|
+
/**
|
|
107
|
+
* The total size of the paginating data
|
|
108
|
+
*/
|
|
109
|
+
this.total = 1000;
|
|
110
|
+
/**
|
|
111
|
+
* Used to indicate which dom element with ID this element controls
|
|
112
|
+
*/
|
|
113
|
+
this.ariaControls = "";
|
|
114
|
+
/**
|
|
115
|
+
* The current page
|
|
116
|
+
*/
|
|
117
|
+
this.current = 1;
|
|
118
|
+
/**
|
|
119
|
+
* Private methods.
|
|
120
|
+
*/
|
|
121
|
+
// called from the watcher and used to make sure any changed to current also updates the internal section index
|
|
122
|
+
this.actionChain = async (after, before) => {
|
|
123
|
+
if (after === 0) {
|
|
124
|
+
this.current = 1;
|
|
125
|
+
}
|
|
126
|
+
else if (before !== after) {
|
|
127
|
+
const calculatedSectionIndex = Math.ceil(after / this.visibleItems) - 1;
|
|
128
|
+
if (calculatedSectionIndex !== this.internalSectionIndex) {
|
|
129
|
+
this.internalSectionIndex = calculatedSectionIndex;
|
|
130
|
+
await this.setFocus();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
//helper to emit relevant page events
|
|
135
|
+
this.emitPageEvent = jsUtils.debounce((ev, passedPage) => {
|
|
136
|
+
const page = Number(passedPage || this.current);
|
|
137
|
+
this.duetPageChange.emit({
|
|
138
|
+
component: "duet-pagination",
|
|
139
|
+
from: page * this.take,
|
|
140
|
+
to: page * this.take + this.take,
|
|
141
|
+
current: page,
|
|
142
|
+
take: this.take,
|
|
143
|
+
type: "page",
|
|
144
|
+
originalEvent: ev,
|
|
145
|
+
});
|
|
146
|
+
}, 500);
|
|
147
|
+
// this will return the entered number, or the current page if the user presses enter
|
|
148
|
+
this.getEnteredNumber = jsUtils.debounce(ev => {
|
|
149
|
+
this.emitPageEvent(ev, this.numbersStore);
|
|
150
|
+
this.current = Number(this.numbersStore);
|
|
151
|
+
this.numbersStore = "";
|
|
152
|
+
this.duetPageChange.emit({
|
|
153
|
+
component: "duet-pagination",
|
|
154
|
+
from: this.current * this.take,
|
|
155
|
+
to: this.current * this.take + this.take,
|
|
156
|
+
current: this.current,
|
|
157
|
+
take: this.take,
|
|
158
|
+
type: "jump",
|
|
159
|
+
originalEvent: ev,
|
|
160
|
+
});
|
|
161
|
+
}, 500);
|
|
162
|
+
}
|
|
163
|
+
watchStateHandler(newValue, oldValue) {
|
|
164
|
+
this.actionChain(newValue, oldValue);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Component lifecycle events.
|
|
168
|
+
*/
|
|
169
|
+
componentWillLoad() {
|
|
170
|
+
// we want to keep the internal current index in sync with the current prop, but take advantage of the multiple with 0 for the first iteration
|
|
171
|
+
this.internalSectionIndex = Math.ceil(this.current / this.visibleItems) - 1;
|
|
172
|
+
this.calculatePageTake();
|
|
173
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
174
|
+
}
|
|
175
|
+
componentWillRender() {
|
|
176
|
+
if (this.internalSectionIndex !== 0 && this.internalSectionIndex !== this.totalPages) {
|
|
177
|
+
this.calculatePageTake();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
componentDidRender() {
|
|
181
|
+
this.setFocus();
|
|
182
|
+
}
|
|
183
|
+
//get totalpages from visible and total
|
|
184
|
+
calculatePageTake() {
|
|
185
|
+
this.totalPages = Math.ceil(this.total / this.take);
|
|
186
|
+
}
|
|
187
|
+
//set update current when mouse click on page number
|
|
188
|
+
async onMouseHandler(e, dir) {
|
|
189
|
+
e.preventDefault();
|
|
190
|
+
e.stopPropagation();
|
|
191
|
+
this.current = this.current + dir;
|
|
192
|
+
}
|
|
193
|
+
//handle a11y keyboard navigation events
|
|
194
|
+
async onKeyboardDown(e) {
|
|
195
|
+
let next = this.current;
|
|
196
|
+
// handle a11y based keyboard navigation for left/right/up/down
|
|
197
|
+
if (keyboardUtils.isArrowLeftKey(e) || keyboardUtils.isArrowUpKey(e)) {
|
|
198
|
+
next--;
|
|
199
|
+
}
|
|
200
|
+
if (keyboardUtils.isArrowRightKey(e) || keyboardUtils.isArrowDownKey(e)) {
|
|
201
|
+
next++;
|
|
202
|
+
}
|
|
203
|
+
if (keyboardUtils.isArrowKey(e)) {
|
|
204
|
+
if (next <= this.totalPages) {
|
|
205
|
+
this.current = next;
|
|
206
|
+
this.emitPageEvent(e);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
//handle the jump feature, where numbers can be entered
|
|
210
|
+
if (keyboardUtils.isNumber(e) && this.shouldDisplayNavigation()) {
|
|
211
|
+
this.numbersStore = this.numbersStore + e.key;
|
|
212
|
+
if (Number(this.numbersStore) > this.totalPages) {
|
|
213
|
+
this.numbersStore = this.totalPages + "";
|
|
214
|
+
}
|
|
215
|
+
this.getEnteredNumber(e);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// utility to set focus on active button
|
|
219
|
+
async setFocus() {
|
|
220
|
+
const currentDomElement = this.nativeNav.querySelector(`li.duet-pagination-item-is-active duet-button`);
|
|
221
|
+
currentDomElement && (await currentDomElement.setFocus());
|
|
222
|
+
}
|
|
223
|
+
//handles click on page numbers
|
|
224
|
+
pageClickHandler(e) {
|
|
225
|
+
e.preventDefault();
|
|
226
|
+
const clickedId = Number(e.target.getAttribute("data-id"));
|
|
227
|
+
this.current = clickedId;
|
|
228
|
+
this.emitPageEvent({}, clickedId);
|
|
229
|
+
}
|
|
230
|
+
//handles click on the next section buttons
|
|
231
|
+
sectionClickHandler(e, direction) {
|
|
232
|
+
e.preventDefault();
|
|
233
|
+
let next = this.internalSectionIndex + direction;
|
|
234
|
+
if (next >= this.totalPages / this.take) {
|
|
235
|
+
next = this.totalPages / this.take - 1;
|
|
236
|
+
}
|
|
237
|
+
const newSection = next;
|
|
238
|
+
this.internalSectionIndex = newSection >= 0 ? newSection : 0;
|
|
239
|
+
}
|
|
240
|
+
//handles click on the jump (1)button
|
|
241
|
+
jumpToStart(e) {
|
|
242
|
+
e.preventDefault();
|
|
243
|
+
this.internalSectionIndex = 0;
|
|
244
|
+
this.current = 1;
|
|
245
|
+
}
|
|
246
|
+
//handles click on the jump (total) button
|
|
247
|
+
jumpToEnd(e) {
|
|
248
|
+
e.preventDefault();
|
|
249
|
+
this.internalSectionIndex = this.totalPages / this.take - 1;
|
|
250
|
+
this.current = this.totalPages;
|
|
251
|
+
}
|
|
252
|
+
// render the individual page numbers
|
|
253
|
+
renderPageNumbers() {
|
|
254
|
+
const items = [];
|
|
255
|
+
let i = this.internalSectionIndex * this.visibleItems;
|
|
256
|
+
do {
|
|
257
|
+
i++;
|
|
258
|
+
if (i > this.totalPages) {
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
items.push(index.h("li", { class: {
|
|
262
|
+
"duet-pagination-item": true,
|
|
263
|
+
"duet-pagination-item-is-active": i === this.current,
|
|
264
|
+
}, role: "menuitem" }, index.h("duet-button", { class: {
|
|
265
|
+
"duet-pagination-link": true,
|
|
266
|
+
}, color: i !== this.current ? "secondary" : "primary", "data-id": i, "center-text": true, variation: "plain", margin: "none", accessibleLabel: `${this.accessibleLabels.go_to} ${i}`, onClick: e => this.pageClickHandler(e) }, index.h("div", { class: "duet-pagination-page-number", "aria-hidden": true }, i))));
|
|
267
|
+
} while (i < this.visibleItems + this.internalSectionIndex * this.visibleItems);
|
|
268
|
+
return items;
|
|
269
|
+
}
|
|
270
|
+
shouldDisplayNavigation() {
|
|
271
|
+
if (this.variation !== "compact") {
|
|
272
|
+
return shouldDisplayNavigation(this.visibleItems, this.total, this.take);
|
|
273
|
+
}
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* render() function
|
|
278
|
+
* Always the last one in the class.
|
|
279
|
+
*/
|
|
280
|
+
render() {
|
|
281
|
+
return (index.h(index.Host, { onKeyDown: e => this.onKeyboardDown(e) }, index.h("nav", { role: "navigation", "aria-labelledby": this.listId, "aria-describedby": this.listId, ref: el => (this.nativeNav = el), "aria-controls": this.ariaControls, class: {
|
|
282
|
+
"duet-pagination-nav": true,
|
|
283
|
+
[`duet-pagination-variation-${this.variation}`]: true,
|
|
284
|
+
} }, this.numbersStore !== "" && (index.h("div", { "aria-live": "assertive", "aria-relevant": "text", class: "duet-pagination-overlay", "aria-label": `${this.accessibleLabels.jump_to} ${this.numbersStore}`, part: "navigation-overlay" }, index.h("duet-badge", null, "jump to page : ", this.numbersStore))), index.h("ol", { id: this.listId, class: {
|
|
285
|
+
"duet-pagination": true,
|
|
286
|
+
"duet-pagination-is-dimmed": this.numbersStore !== "",
|
|
287
|
+
}, role: "menubar", "aria-label": this.accessibleLabels.pagination_label, "aria-description": this.accessibleLabels.description }, index.h("li", { class: {
|
|
288
|
+
"duet-pagination-page-button": true,
|
|
289
|
+
"duet-pagination-button-first": true,
|
|
290
|
+
}, role: "menuitem", part: "navigation-arrow" }, index.h("duet-action-button", { disabled: this.internalSectionIndex === 0 && this.current <= 1, "data-direction": "back", onClick: e => this.onMouseHandler(e, -1), "aria-label": this.accessibleLabels.previous_page, "icon-name": "action-arrow-left-small" })), this.internalSectionIndex !== 0 && this.shouldDisplayNavigation() && (index.h(index.Fragment, null, index.h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, index.h("duet-button", { class: "duet-pagination-link", "center-text": "true", variation: "plain", color: "secondary", margin: "none", accessibleLabel: this.accessibleLabels.first_page, onClick: e => this.jumpToStart(e) }, index.h("div", { class: "duet-pagination-page-number" }, "1"))), index.h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, index.h("duet-button", { class: "duet-pagination-link", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.prev_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, -1) }, index.h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))))), this.renderPageNumbers(), this.internalSectionIndex !== this.totalPages / this.visibleItems - 1 && this.shouldDisplayNavigation() && (index.h(index.Fragment, null, index.h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, index.h("duet-button", { class: "duet-pagination-link", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.next_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, 1) }, index.h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))), index.h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, index.h("duet-button", { class: "duet-pagination-link", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.last_page, onClick: e => this.jumpToEnd(e) }, index.h("div", { class: "duet-pagination-page-number" }, this.totalPages))))), index.h("li", { class: {
|
|
291
|
+
"duet-pagination-page-button": true,
|
|
292
|
+
"duet-pagination-button-last": true,
|
|
293
|
+
}, role: "menuitem", part: "navigation-arrow" }, index.h("duet-action-button", { disabled: this.current === this.totalPages &&
|
|
294
|
+
this.internalSectionIndex === Math.ceil(this.totalPages / this.visibleItems) - 1, class: "duet-date-dialog-next", "aria-label": this.accessibleLabels.next_page, onClick: e => this.onMouseHandler(e, 1), "icon-name": "action-arrow-right-small" }))))));
|
|
295
|
+
}
|
|
296
|
+
get element() { return index.getElement(this); }
|
|
297
|
+
static get watchers() { return {
|
|
298
|
+
"current": ["watchStateHandler"]
|
|
299
|
+
}; }
|
|
300
|
+
};
|
|
301
|
+
DuetPagination.style = duetPaginationCss;
|
|
302
|
+
|
|
303
|
+
const duetRangeStepperCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}.duet-range-stepper{display:flex;flex-wrap:wrap;gap:0;align-items:baseline;justify-content:center;min-width:30px;min-height:30px;font-weight:600;text-decoration:none;border-left-width:0}.duet-range-stepper{white-space:nowrap}.duet-range-stepper .duet-range-step-counter{font-weight:600;color:#00294d}.duet-range-stepper ::part(button){border:0}";
|
|
304
|
+
|
|
305
|
+
let DuetRangeStepper = class {
|
|
306
|
+
constructor(hostRef) {
|
|
307
|
+
index.registerInstance(this, hostRef);
|
|
308
|
+
this.duetRangeStepUpdate = index.createEvent(this, "duetRangeStepUpdate", 7);
|
|
309
|
+
this.leftBn = createId.createID("duetRangeStepper-left");
|
|
310
|
+
this.rightBn = createId.createID("duetRangeStepper-right");
|
|
311
|
+
/**
|
|
312
|
+
* Theme of the component.
|
|
313
|
+
*/
|
|
314
|
+
this.theme = "";
|
|
315
|
+
/**
|
|
316
|
+
* Start value
|
|
317
|
+
* @default 1
|
|
318
|
+
*/
|
|
319
|
+
this.stepIndex = 1;
|
|
320
|
+
/**
|
|
321
|
+
* How big is the step
|
|
322
|
+
* @default 99
|
|
323
|
+
*/
|
|
324
|
+
this.stepSize = 50;
|
|
325
|
+
/**
|
|
326
|
+
* Total of
|
|
327
|
+
* @default undefined
|
|
328
|
+
*/
|
|
329
|
+
this.total = 1000;
|
|
330
|
+
/**
|
|
331
|
+
* Default range stepper labels
|
|
332
|
+
*/
|
|
333
|
+
this.ariaLabelsDefaults = {
|
|
334
|
+
en: {
|
|
335
|
+
next_increment: "Next range increment",
|
|
336
|
+
previous_increment: "Previous range increment",
|
|
337
|
+
x_of_y: "{0}–{1} of {2}",
|
|
338
|
+
},
|
|
339
|
+
fi: {
|
|
340
|
+
next_increment: "Seuraava välillä",
|
|
341
|
+
previous_increment: "Edellinen välillä",
|
|
342
|
+
x_of_y: "{0}–{1} / {2}",
|
|
343
|
+
},
|
|
344
|
+
sv: {
|
|
345
|
+
next_increment: "Nästa intervall",
|
|
346
|
+
previous_increment: "Föregående intervall",
|
|
347
|
+
x_of_y: "{0}–{1} av {2}",
|
|
348
|
+
},
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Default pagination labels
|
|
352
|
+
*/
|
|
353
|
+
this.ariaLabels = languageUtils.getLocaleString(this.ariaLabelsDefaults);
|
|
354
|
+
/**
|
|
355
|
+
* Used to indicate which dom element with ID this element controls
|
|
356
|
+
*/
|
|
357
|
+
this.ariaControls = "";
|
|
358
|
+
this.handleClick = (e, direction) => {
|
|
359
|
+
e.preventDefault();
|
|
360
|
+
this.increment(direction);
|
|
361
|
+
this.handleStepClick(e);
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
watchStateHandler(newValue) {
|
|
365
|
+
if (newValue === 1) {
|
|
366
|
+
this.leftBnRef.setAttribute("disabled", "");
|
|
367
|
+
this.rightBnRef.focus();
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
this.leftBnRef.removeAttribute("disabled");
|
|
371
|
+
}
|
|
372
|
+
if (newValue === this.total / this.stepSize) {
|
|
373
|
+
this.rightBnRef.setAttribute("disabled", "");
|
|
374
|
+
this.leftBnRef.focus();
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
this.rightBnRef.removeAttribute("disabled");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
handleStepClick(e) {
|
|
381
|
+
this.duetRangeStepUpdate.emit({
|
|
382
|
+
originalEvent: e,
|
|
383
|
+
component: "duet-range-stepper",
|
|
384
|
+
from: this.stepIndex * this.stepSize - this.stepSize,
|
|
385
|
+
to: this.stepIndex * this.stepSize,
|
|
386
|
+
index: this.stepIndex,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
componentWillLoad() {
|
|
390
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
391
|
+
}
|
|
392
|
+
componentDidLoad() {
|
|
393
|
+
this.watchStateHandler(this.stepIndex);
|
|
394
|
+
}
|
|
395
|
+
increment(direction) {
|
|
396
|
+
const newIndex = this.stepIndex + direction;
|
|
397
|
+
if (newIndex <= 0) {
|
|
398
|
+
this.stepIndex = 1;
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
if (newIndex * this.stepSize <= this.total) {
|
|
402
|
+
this.stepIndex = newIndex;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
generateStepSize() {
|
|
407
|
+
// this function uses this.stepIndex and this.range to generate a range of number like 1-100
|
|
408
|
+
// this is used to generate the step size
|
|
409
|
+
let start = (this.stepIndex - 1) * this.stepSize;
|
|
410
|
+
//easy fix for starting position
|
|
411
|
+
if (start === 0) {
|
|
412
|
+
start = 1;
|
|
413
|
+
}
|
|
414
|
+
const end = this.stepIndex * this.stepSize;
|
|
415
|
+
return this.ariaLabels.x_of_y
|
|
416
|
+
.replace("{0}", String(start))
|
|
417
|
+
.replace("{1}", String(end))
|
|
418
|
+
.replace("{2}", String(this.total));
|
|
419
|
+
}
|
|
420
|
+
//handle a11y keyboard navigation events
|
|
421
|
+
async onKeyboardDown(e) {
|
|
422
|
+
// handle a11y based keyboard navigation for left/right/up/down
|
|
423
|
+
let next = this.stepIndex;
|
|
424
|
+
let dir = 1;
|
|
425
|
+
if (keyboardUtils.isArrowLeftKey(e) || keyboardUtils.isArrowUpKey(e) || keyboardUtils.isMinusKey(e)) {
|
|
426
|
+
next--;
|
|
427
|
+
dir = -1;
|
|
428
|
+
this.leftBnRef.focus();
|
|
429
|
+
}
|
|
430
|
+
if (keyboardUtils.isArrowRightKey(e) || keyboardUtils.isArrowDownKey(e) || keyboardUtils.isPlusKey(e)) {
|
|
431
|
+
next++;
|
|
432
|
+
dir = 1;
|
|
433
|
+
}
|
|
434
|
+
if (keyboardUtils.isArrowKey(e)) {
|
|
435
|
+
if (next > 0 && next * this.stepSize <= this.total) {
|
|
436
|
+
this.handleClick(e, dir);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* render() function
|
|
442
|
+
* Always the last one in the class.
|
|
443
|
+
*/
|
|
444
|
+
render() {
|
|
445
|
+
return (index.h("div", { class: {
|
|
446
|
+
"duet-range-stepper": true,
|
|
447
|
+
"duet-theme-turva": this.theme === "turva",
|
|
448
|
+
}, onKeyDown: e => this.onKeyboardDown(e), "aria-controls": this.ariaControls }, index.h("span", { class: "duet-range-step-counter", part: "range-numbers" }, this.generateStepSize()), index.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" }), index.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" })));
|
|
449
|
+
}
|
|
450
|
+
get element() { return index.getElement(this); }
|
|
451
|
+
static get watchers() { return {
|
|
452
|
+
"stepIndex": ["watchStateHandler"]
|
|
453
|
+
}; }
|
|
454
|
+
};
|
|
455
|
+
DuetRangeStepper.style = duetRangeStepperCss;
|
|
456
|
+
|
|
457
|
+
exports.duet_pagination = DuetPagination;
|
|
458
|
+
exports.duet_range_stepper = DuetRangeStepper;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
11
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
11
|
const watchOptions = require('./watch-options-d88afac0.js');
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const tokens_module = require('./tokens.module-
|
|
8
|
+
const index = require('./index-da5d5aaf.js');
|
|
9
|
+
const tokens_module = require('./tokens.module-6afcc9c1.js');
|
|
10
10
|
const createId = require('./create-id-c3b984b1.js');
|
|
11
11
|
const isInternetExplorer = require('./is-internet-explorer-91361c56.js');
|
|
12
12
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|