@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,61 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
background: transparent;
|
|
8
|
+
border: 0;
|
|
9
|
+
-moz-appearance: none;
|
|
10
|
+
-webkit-appearance: none;
|
|
11
|
+
appearance: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
background: transparent;
|
|
19
|
+
border: 0;
|
|
20
|
+
-moz-appearance: none;
|
|
21
|
+
-webkit-appearance: none;
|
|
22
|
+
appearance: none;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
margin: 0 auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.duet-pagination-nav {
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.duet-pagination ::part(button) {
|
|
32
|
+
border: 0;
|
|
33
|
+
}
|
|
34
|
+
.duet-pagination, .duet-pagination li {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
gap: 0.1rem;
|
|
38
|
+
align-items: center;
|
|
39
|
+
}
|
|
40
|
+
.duet-pagination-item-is-active .duet-pagination-page-number {
|
|
41
|
+
border-bottom-color: inherit;
|
|
42
|
+
border-bottom-style: solid;
|
|
43
|
+
border-bottom-width: 2px;
|
|
44
|
+
}
|
|
45
|
+
.duet-pagination duet-button {
|
|
46
|
+
width: 30px;
|
|
47
|
+
min-width: 36px;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
border-left-width: 0;
|
|
51
|
+
}
|
|
52
|
+
.duet-pagination-overlay {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 1rem;
|
|
55
|
+
z-index: 300;
|
|
56
|
+
width: 100%;
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
59
|
+
.duet-pagination.duet-pagination-is-dimmed {
|
|
60
|
+
opacity: 0.5;
|
|
61
|
+
}
|
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, Fragment, h, Host, Prop, State, Watch } from "@stencil/core";
|
|
5
|
+
import { createID } from "../../utils/create-id";
|
|
6
|
+
import { debounce } from "../../utils/js-utils";
|
|
7
|
+
import { isArrowDownKey, isArrowKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isNumber, } from "../../utils/keyboard-utils";
|
|
8
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
9
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
10
|
+
import { shouldDisplayNavigation } from "./duet-pagination-utils";
|
|
11
|
+
export class DuetPagination {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.listId = createID("duet-pagination-list");
|
|
14
|
+
this.numbersStore = "";
|
|
15
|
+
/**
|
|
16
|
+
* State() variables
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
this.totalPages = 10;
|
|
20
|
+
/**
|
|
21
|
+
* State() variables
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
this.internalSectionIndex = 0;
|
|
25
|
+
/**
|
|
26
|
+
* Theme of the pagination.
|
|
27
|
+
*/
|
|
28
|
+
this.theme = "";
|
|
29
|
+
/**
|
|
30
|
+
* Characters to use for the jump buttons.
|
|
31
|
+
*/
|
|
32
|
+
this.jumpString = "...";
|
|
33
|
+
/**
|
|
34
|
+
* Variation of the paginator (compact and default supported)
|
|
35
|
+
*/
|
|
36
|
+
this.variation = "default";
|
|
37
|
+
/**
|
|
38
|
+
* Default pagination labels
|
|
39
|
+
*/
|
|
40
|
+
this.accessibleLabelsDefaults = {
|
|
41
|
+
en: {
|
|
42
|
+
next_page: "Next page",
|
|
43
|
+
previous_page: "Previous page",
|
|
44
|
+
first_page: "First page",
|
|
45
|
+
last_page: "Last page",
|
|
46
|
+
jump_to: "Jump to page",
|
|
47
|
+
go_to: "Go to page",
|
|
48
|
+
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",
|
|
49
|
+
pagination_label: "Pagination, choose a number to jump to a page",
|
|
50
|
+
prev_section: "Show previous {0} page numbers, screen reader user should use arrowkeys to navigate",
|
|
51
|
+
next_section: "Show next {0} page numbers, screen reader user should use arrowkeys to navigate",
|
|
52
|
+
},
|
|
53
|
+
fi: {
|
|
54
|
+
next_page: "Seuraava sivu",
|
|
55
|
+
previous_page: "Edellinen sivu",
|
|
56
|
+
first_page: "Ensimmäinen sivu",
|
|
57
|
+
last_page: "Viimeinen sivu",
|
|
58
|
+
jump_to: "Siirry sivulle",
|
|
59
|
+
go_to: "Siirry sivulle",
|
|
60
|
+
description: "Voit käyttää nuolinäppäimiä sivunumeron valitsemiseen, tai kirjoittaa sivunumeron, jos tämä elementti on aktiivinen, siirtymään sivulle",
|
|
61
|
+
pagination_label: "Sivutus, valitse sivunumero siirtyäksesi sivulle",
|
|
62
|
+
prev_section: "Näytä edelliset {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",
|
|
63
|
+
next_section: "Näytä seuraavat {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",
|
|
64
|
+
},
|
|
65
|
+
sv: {
|
|
66
|
+
next_page: "Nästa sida",
|
|
67
|
+
previous_page: "Föregående sida",
|
|
68
|
+
first_page: "Första sidan",
|
|
69
|
+
last_page: "Sista sidan",
|
|
70
|
+
jump_to: "Hoppa till sida",
|
|
71
|
+
go_to: "Hoppa till sida",
|
|
72
|
+
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",
|
|
73
|
+
pagination_label: "Sidutning, välj en siffra för att hoppa till en sida",
|
|
74
|
+
prev_section: "Visa föregående {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",
|
|
75
|
+
next_section: "Visa nästa {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Default pagination labels
|
|
80
|
+
*/
|
|
81
|
+
this.accessibleLabels = getLocaleString(this.accessibleLabelsDefaults);
|
|
82
|
+
/**
|
|
83
|
+
* The size of the take, when paginating.
|
|
84
|
+
*/
|
|
85
|
+
this.take = 5;
|
|
86
|
+
/**
|
|
87
|
+
* Amount of visible page numbers to show
|
|
88
|
+
*/
|
|
89
|
+
this.visibleItems = 5;
|
|
90
|
+
/**
|
|
91
|
+
* The total size of the paginating data
|
|
92
|
+
*/
|
|
93
|
+
this.total = 1000;
|
|
94
|
+
/**
|
|
95
|
+
* Used to indicate which dom element with ID this element controls
|
|
96
|
+
*/
|
|
97
|
+
this.ariaControls = "";
|
|
98
|
+
/**
|
|
99
|
+
* The current page
|
|
100
|
+
*/
|
|
101
|
+
this.current = 1;
|
|
102
|
+
/**
|
|
103
|
+
* Private methods.
|
|
104
|
+
*/
|
|
105
|
+
// called from the watcher and used to make sure any changed to current also updates the internal section index
|
|
106
|
+
this.actionChain = async (after, before) => {
|
|
107
|
+
if (after === 0) {
|
|
108
|
+
this.current = 1;
|
|
109
|
+
}
|
|
110
|
+
else if (before !== after) {
|
|
111
|
+
const calculatedSectionIndex = Math.ceil(after / this.visibleItems) - 1;
|
|
112
|
+
if (calculatedSectionIndex !== this.internalSectionIndex) {
|
|
113
|
+
this.internalSectionIndex = calculatedSectionIndex;
|
|
114
|
+
await this.setFocus();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
//helper to emit relevant page events
|
|
119
|
+
this.emitPageEvent = debounce((ev, passedPage) => {
|
|
120
|
+
const page = Number(passedPage || this.current);
|
|
121
|
+
this.duetPageChange.emit({
|
|
122
|
+
component: "duet-pagination",
|
|
123
|
+
from: page * this.take,
|
|
124
|
+
to: page * this.take + this.take,
|
|
125
|
+
current: page,
|
|
126
|
+
take: this.take,
|
|
127
|
+
type: "page",
|
|
128
|
+
originalEvent: ev,
|
|
129
|
+
});
|
|
130
|
+
}, 500);
|
|
131
|
+
// this will return the entered number, or the current page if the user presses enter
|
|
132
|
+
this.getEnteredNumber = debounce(ev => {
|
|
133
|
+
this.emitPageEvent(ev, this.numbersStore);
|
|
134
|
+
this.current = Number(this.numbersStore);
|
|
135
|
+
this.numbersStore = "";
|
|
136
|
+
this.duetPageChange.emit({
|
|
137
|
+
component: "duet-pagination",
|
|
138
|
+
from: this.current * this.take,
|
|
139
|
+
to: this.current * this.take + this.take,
|
|
140
|
+
current: this.current,
|
|
141
|
+
take: this.take,
|
|
142
|
+
type: "jump",
|
|
143
|
+
originalEvent: ev,
|
|
144
|
+
});
|
|
145
|
+
}, 500);
|
|
146
|
+
}
|
|
147
|
+
watchStateHandler(newValue, oldValue) {
|
|
148
|
+
this.actionChain(newValue, oldValue);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Component lifecycle events.
|
|
152
|
+
*/
|
|
153
|
+
componentWillLoad() {
|
|
154
|
+
// 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
|
|
155
|
+
this.internalSectionIndex = Math.ceil(this.current / this.visibleItems) - 1;
|
|
156
|
+
this.calculatePageTake();
|
|
157
|
+
inheritGlobalTheme(this);
|
|
158
|
+
}
|
|
159
|
+
componentWillRender() {
|
|
160
|
+
if (this.internalSectionIndex !== 0 && this.internalSectionIndex !== this.totalPages) {
|
|
161
|
+
this.calculatePageTake();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
componentDidRender() {
|
|
165
|
+
this.setFocus();
|
|
166
|
+
}
|
|
167
|
+
//get totalpages from visible and total
|
|
168
|
+
calculatePageTake() {
|
|
169
|
+
this.totalPages = Math.ceil(this.total / this.take);
|
|
170
|
+
}
|
|
171
|
+
//set update current when mouse click on page number
|
|
172
|
+
async onMouseHandler(e, dir) {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
e.stopPropagation();
|
|
175
|
+
this.current = this.current + dir;
|
|
176
|
+
}
|
|
177
|
+
//handle a11y keyboard navigation events
|
|
178
|
+
async onKeyboardDown(e) {
|
|
179
|
+
let next = this.current;
|
|
180
|
+
// handle a11y based keyboard navigation for left/right/up/down
|
|
181
|
+
if (isArrowLeftKey(e) || isArrowUpKey(e)) {
|
|
182
|
+
next--;
|
|
183
|
+
}
|
|
184
|
+
if (isArrowRightKey(e) || isArrowDownKey(e)) {
|
|
185
|
+
next++;
|
|
186
|
+
}
|
|
187
|
+
if (isArrowKey(e)) {
|
|
188
|
+
if (next <= this.totalPages) {
|
|
189
|
+
this.current = next;
|
|
190
|
+
this.emitPageEvent(e);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
//handle the jump feature, where numbers can be entered
|
|
194
|
+
if (isNumber(e) && this.shouldDisplayNavigation()) {
|
|
195
|
+
this.numbersStore = this.numbersStore + e.key;
|
|
196
|
+
if (Number(this.numbersStore) > this.totalPages) {
|
|
197
|
+
this.numbersStore = this.totalPages + "";
|
|
198
|
+
}
|
|
199
|
+
this.getEnteredNumber(e);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// utility to set focus on active button
|
|
203
|
+
async setFocus() {
|
|
204
|
+
const currentDomElement = this.nativeNav.querySelector(`li.duet-pagination-item-is-active duet-button`);
|
|
205
|
+
currentDomElement && (await currentDomElement.setFocus());
|
|
206
|
+
}
|
|
207
|
+
//handles click on page numbers
|
|
208
|
+
pageClickHandler(e) {
|
|
209
|
+
e.preventDefault();
|
|
210
|
+
const clickedId = Number(e.target.getAttribute("data-id"));
|
|
211
|
+
this.current = clickedId;
|
|
212
|
+
this.emitPageEvent({}, clickedId);
|
|
213
|
+
}
|
|
214
|
+
//handles click on the next section buttons
|
|
215
|
+
sectionClickHandler(e, direction) {
|
|
216
|
+
e.preventDefault();
|
|
217
|
+
let next = this.internalSectionIndex + direction;
|
|
218
|
+
if (next >= this.totalPages / this.take) {
|
|
219
|
+
next = this.totalPages / this.take - 1;
|
|
220
|
+
}
|
|
221
|
+
const newSection = next;
|
|
222
|
+
this.internalSectionIndex = newSection >= 0 ? newSection : 0;
|
|
223
|
+
}
|
|
224
|
+
//handles click on the jump (1)button
|
|
225
|
+
jumpToStart(e) {
|
|
226
|
+
e.preventDefault();
|
|
227
|
+
this.internalSectionIndex = 0;
|
|
228
|
+
this.current = 1;
|
|
229
|
+
}
|
|
230
|
+
//handles click on the jump (total) button
|
|
231
|
+
jumpToEnd(e) {
|
|
232
|
+
e.preventDefault();
|
|
233
|
+
this.internalSectionIndex = this.totalPages / this.take - 1;
|
|
234
|
+
this.current = this.totalPages;
|
|
235
|
+
}
|
|
236
|
+
// render the individual page numbers
|
|
237
|
+
renderPageNumbers() {
|
|
238
|
+
const items = [];
|
|
239
|
+
let i = this.internalSectionIndex * this.visibleItems;
|
|
240
|
+
do {
|
|
241
|
+
i++;
|
|
242
|
+
if (i > this.totalPages) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
items.push(h("li", { class: {
|
|
246
|
+
"duet-pagination-item": true,
|
|
247
|
+
"duet-pagination-item-is-active": i === this.current,
|
|
248
|
+
}, role: "menuitem" },
|
|
249
|
+
h("duet-button", { class: {
|
|
250
|
+
"duet-pagination-link": true,
|
|
251
|
+
}, 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) },
|
|
252
|
+
h("div", { class: "duet-pagination-page-number", "aria-hidden": true }, i))));
|
|
253
|
+
} while (i < this.visibleItems + this.internalSectionIndex * this.visibleItems);
|
|
254
|
+
return items;
|
|
255
|
+
}
|
|
256
|
+
shouldDisplayNavigation() {
|
|
257
|
+
if (this.variation !== "compact") {
|
|
258
|
+
return shouldDisplayNavigation(this.visibleItems, this.total, this.take);
|
|
259
|
+
}
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* render() function
|
|
264
|
+
* Always the last one in the class.
|
|
265
|
+
*/
|
|
266
|
+
render() {
|
|
267
|
+
return (h(Host, { onKeyDown: e => this.onKeyboardDown(e) },
|
|
268
|
+
h("nav", { role: "navigation", "aria-labelledby": this.listId, "aria-describedby": this.listId, ref: el => (this.nativeNav = el), "aria-controls": this.ariaControls, class: {
|
|
269
|
+
"duet-pagination-nav": true,
|
|
270
|
+
[`duet-pagination-variation-${this.variation}`]: true,
|
|
271
|
+
} },
|
|
272
|
+
this.numbersStore !== "" && (h("div", { "aria-live": "assertive", "aria-relevant": "text", class: "duet-pagination-overlay", "aria-label": `${this.accessibleLabels.jump_to} ${this.numbersStore}`, part: "navigation-overlay" },
|
|
273
|
+
h("duet-badge", null,
|
|
274
|
+
"jump to page : ",
|
|
275
|
+
this.numbersStore))),
|
|
276
|
+
h("ol", { id: this.listId, class: {
|
|
277
|
+
"duet-pagination": true,
|
|
278
|
+
"duet-pagination-is-dimmed": this.numbersStore !== "",
|
|
279
|
+
}, role: "menubar", "aria-label": this.accessibleLabels.pagination_label, "aria-description": this.accessibleLabels.description },
|
|
280
|
+
h("li", { class: {
|
|
281
|
+
"duet-pagination-page-button": true,
|
|
282
|
+
"duet-pagination-button-first": true,
|
|
283
|
+
}, role: "menuitem", part: "navigation-arrow" },
|
|
284
|
+
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" })),
|
|
285
|
+
this.internalSectionIndex !== 0 && this.shouldDisplayNavigation() && (h(Fragment, null,
|
|
286
|
+
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" },
|
|
287
|
+
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) },
|
|
288
|
+
h("div", { class: "duet-pagination-page-number" }, "1"))),
|
|
289
|
+
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" },
|
|
290
|
+
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) },
|
|
291
|
+
h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))))),
|
|
292
|
+
this.renderPageNumbers(),
|
|
293
|
+
this.internalSectionIndex !== this.totalPages / this.visibleItems - 1 && this.shouldDisplayNavigation() && (h(Fragment, null,
|
|
294
|
+
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" },
|
|
295
|
+
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) },
|
|
296
|
+
h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))),
|
|
297
|
+
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" },
|
|
298
|
+
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) },
|
|
299
|
+
h("div", { class: "duet-pagination-page-number" }, this.totalPages))))),
|
|
300
|
+
h("li", { class: {
|
|
301
|
+
"duet-pagination-page-button": true,
|
|
302
|
+
"duet-pagination-button-last": true,
|
|
303
|
+
}, role: "menuitem", part: "navigation-arrow" },
|
|
304
|
+
h("duet-action-button", { disabled: this.current === this.totalPages &&
|
|
305
|
+
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" }))))));
|
|
306
|
+
}
|
|
307
|
+
static get is() { return "duet-pagination"; }
|
|
308
|
+
static get encapsulation() { return "shadow"; }
|
|
309
|
+
static get originalStyleUrls() { return {
|
|
310
|
+
"$": ["duet-pagination.scss"]
|
|
311
|
+
}; }
|
|
312
|
+
static get styleUrls() { return {
|
|
313
|
+
"$": ["duet-pagination.css"]
|
|
314
|
+
}; }
|
|
315
|
+
static get properties() { return {
|
|
316
|
+
"theme": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"mutable": true,
|
|
319
|
+
"complexType": {
|
|
320
|
+
"original": "DuetTheme",
|
|
321
|
+
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
322
|
+
"references": {
|
|
323
|
+
"DuetTheme": {
|
|
324
|
+
"location": "import",
|
|
325
|
+
"path": "../../common-types"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"required": false,
|
|
330
|
+
"optional": false,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": "Theme of the pagination."
|
|
334
|
+
},
|
|
335
|
+
"attribute": "theme",
|
|
336
|
+
"reflect": false,
|
|
337
|
+
"defaultValue": "\"\""
|
|
338
|
+
},
|
|
339
|
+
"jumpString": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"mutable": false,
|
|
342
|
+
"complexType": {
|
|
343
|
+
"original": "string",
|
|
344
|
+
"resolved": "string",
|
|
345
|
+
"references": {}
|
|
346
|
+
},
|
|
347
|
+
"required": false,
|
|
348
|
+
"optional": false,
|
|
349
|
+
"docs": {
|
|
350
|
+
"tags": [],
|
|
351
|
+
"text": "Characters to use for the jump buttons."
|
|
352
|
+
},
|
|
353
|
+
"attribute": "jump-string",
|
|
354
|
+
"reflect": false,
|
|
355
|
+
"defaultValue": "\"...\""
|
|
356
|
+
},
|
|
357
|
+
"variation": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"mutable": false,
|
|
360
|
+
"complexType": {
|
|
361
|
+
"original": "DuetPaginationVariation",
|
|
362
|
+
"resolved": "\"compact\" | \"default\"",
|
|
363
|
+
"references": {
|
|
364
|
+
"DuetPaginationVariation": {
|
|
365
|
+
"location": "local"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"required": false,
|
|
370
|
+
"optional": false,
|
|
371
|
+
"docs": {
|
|
372
|
+
"tags": [],
|
|
373
|
+
"text": "Variation of the paginator (compact and default supported)"
|
|
374
|
+
},
|
|
375
|
+
"attribute": "variation",
|
|
376
|
+
"reflect": false,
|
|
377
|
+
"defaultValue": "\"default\""
|
|
378
|
+
},
|
|
379
|
+
"accessibleLabelsDefaults": {
|
|
380
|
+
"type": "unknown",
|
|
381
|
+
"mutable": false,
|
|
382
|
+
"complexType": {
|
|
383
|
+
"original": "DuetLangObject",
|
|
384
|
+
"resolved": "DuetLangObject",
|
|
385
|
+
"references": {
|
|
386
|
+
"DuetLangObject": {
|
|
387
|
+
"location": "import",
|
|
388
|
+
"path": "../../utils/language-utils"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"required": false,
|
|
393
|
+
"optional": false,
|
|
394
|
+
"docs": {
|
|
395
|
+
"tags": [],
|
|
396
|
+
"text": "Default pagination labels"
|
|
397
|
+
},
|
|
398
|
+
"defaultValue": "{\n en: {\n next_page: \"Next page\",\n previous_page: \"Previous page\",\n first_page: \"First page\",\n last_page: \"Last page\",\n jump_to: \"Jump to page\",\n go_to: \"Go to page\",\n description:\n \"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\",\n pagination_label: \"Pagination, choose a number to jump to a page\",\n prev_section: \"Show previous {0} page numbers, screen reader user should use arrowkeys to navigate\",\n next_section: \"Show next {0} page numbers, screen reader user should use arrowkeys to navigate\",\n },\n fi: {\n next_page: \"Seuraava sivu\",\n previous_page: \"Edellinen sivu\",\n first_page: \"Ensimm\u00E4inen sivu\",\n last_page: \"Viimeinen sivu\",\n jump_to: \"Siirry sivulle\",\n go_to: \"Siirry sivulle\",\n description:\n \"Voit k\u00E4ytt\u00E4\u00E4 nuolin\u00E4pp\u00E4imi\u00E4 sivunumeron valitsemiseen, tai kirjoittaa sivunumeron, jos t\u00E4m\u00E4 elementti on aktiivinen, siirtym\u00E4\u00E4n sivulle\",\n pagination_label: \"Sivutus, valitse sivunumero siirty\u00E4ksesi sivulle\",\n prev_section: \"N\u00E4yt\u00E4 edelliset {0} sivunumerot, k\u00E4ytt\u00E4j\u00E4n pit\u00E4\u00E4 k\u00E4ytt\u00E4\u00E4 nuolin\u00E4pp\u00E4imi\u00E4 navigoidaksesi\",\n next_section: \"N\u00E4yt\u00E4 seuraavat {0} sivunumerot, k\u00E4ytt\u00E4j\u00E4n pit\u00E4\u00E4 k\u00E4ytt\u00E4\u00E4 nuolin\u00E4pp\u00E4imi\u00E4 navigoidaksesi\",\n },\n sv: {\n next_page: \"N\u00E4sta sida\",\n previous_page: \"F\u00F6reg\u00E5ende sida\",\n first_page: \"F\u00F6rsta sidan\",\n last_page: \"Sista sidan\",\n jump_to: \"Hoppa till sida\",\n go_to: \"Hoppa till sida\",\n description:\n \"Du kan anv\u00E4nda piltangenterna f\u00F6r att v\u00E4lja sida, eller skriva in sida n\u00E4r elementet \u00E4r i fokus f\u00F6r att hoppa till en sida\",\n pagination_label: \"Sidutning, v\u00E4lj en siffra f\u00F6r att hoppa till en sida\",\n prev_section: \"Visa f\u00F6reg\u00E5ende {0} sidnummer, skrivbordsl\u00E4sare ska anv\u00E4nda piltangenterna f\u00F6r att navigera\",\n next_section: \"Visa n\u00E4sta {0} sidnummer, skrivbordsl\u00E4sare ska anv\u00E4nda piltangenterna f\u00F6r att navigera\",\n },\n }"
|
|
399
|
+
},
|
|
400
|
+
"accessibleLabels": {
|
|
401
|
+
"type": "unknown",
|
|
402
|
+
"mutable": false,
|
|
403
|
+
"complexType": {
|
|
404
|
+
"original": "Record<string, string>",
|
|
405
|
+
"resolved": "{ [x: string]: string; }",
|
|
406
|
+
"references": {
|
|
407
|
+
"Record": {
|
|
408
|
+
"location": "global"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"required": false,
|
|
413
|
+
"optional": false,
|
|
414
|
+
"docs": {
|
|
415
|
+
"tags": [],
|
|
416
|
+
"text": "Default pagination labels"
|
|
417
|
+
},
|
|
418
|
+
"defaultValue": "getLocaleString(\n this.accessibleLabelsDefaults\n )"
|
|
419
|
+
},
|
|
420
|
+
"take": {
|
|
421
|
+
"type": "number",
|
|
422
|
+
"mutable": true,
|
|
423
|
+
"complexType": {
|
|
424
|
+
"original": "number",
|
|
425
|
+
"resolved": "number",
|
|
426
|
+
"references": {}
|
|
427
|
+
},
|
|
428
|
+
"required": false,
|
|
429
|
+
"optional": false,
|
|
430
|
+
"docs": {
|
|
431
|
+
"tags": [],
|
|
432
|
+
"text": "The size of the take, when paginating."
|
|
433
|
+
},
|
|
434
|
+
"attribute": "take",
|
|
435
|
+
"reflect": false,
|
|
436
|
+
"defaultValue": "5"
|
|
437
|
+
},
|
|
438
|
+
"visibleItems": {
|
|
439
|
+
"type": "number",
|
|
440
|
+
"mutable": true,
|
|
441
|
+
"complexType": {
|
|
442
|
+
"original": "number",
|
|
443
|
+
"resolved": "number",
|
|
444
|
+
"references": {}
|
|
445
|
+
},
|
|
446
|
+
"required": false,
|
|
447
|
+
"optional": false,
|
|
448
|
+
"docs": {
|
|
449
|
+
"tags": [],
|
|
450
|
+
"text": "Amount of visible page numbers to show"
|
|
451
|
+
},
|
|
452
|
+
"attribute": "visible-items",
|
|
453
|
+
"reflect": false,
|
|
454
|
+
"defaultValue": "5"
|
|
455
|
+
},
|
|
456
|
+
"total": {
|
|
457
|
+
"type": "number",
|
|
458
|
+
"mutable": true,
|
|
459
|
+
"complexType": {
|
|
460
|
+
"original": "number",
|
|
461
|
+
"resolved": "number",
|
|
462
|
+
"references": {}
|
|
463
|
+
},
|
|
464
|
+
"required": false,
|
|
465
|
+
"optional": false,
|
|
466
|
+
"docs": {
|
|
467
|
+
"tags": [],
|
|
468
|
+
"text": "The total size of the paginating data"
|
|
469
|
+
},
|
|
470
|
+
"attribute": "total",
|
|
471
|
+
"reflect": false,
|
|
472
|
+
"defaultValue": "1000"
|
|
473
|
+
},
|
|
474
|
+
"ariaControls": {
|
|
475
|
+
"type": "string",
|
|
476
|
+
"mutable": false,
|
|
477
|
+
"complexType": {
|
|
478
|
+
"original": "string",
|
|
479
|
+
"resolved": "string",
|
|
480
|
+
"references": {}
|
|
481
|
+
},
|
|
482
|
+
"required": false,
|
|
483
|
+
"optional": false,
|
|
484
|
+
"docs": {
|
|
485
|
+
"tags": [],
|
|
486
|
+
"text": "Used to indicate which dom element with ID this element controls"
|
|
487
|
+
},
|
|
488
|
+
"attribute": "accessible-controls",
|
|
489
|
+
"reflect": false,
|
|
490
|
+
"defaultValue": "\"\""
|
|
491
|
+
},
|
|
492
|
+
"current": {
|
|
493
|
+
"type": "number",
|
|
494
|
+
"mutable": true,
|
|
495
|
+
"complexType": {
|
|
496
|
+
"original": "number",
|
|
497
|
+
"resolved": "number",
|
|
498
|
+
"references": {}
|
|
499
|
+
},
|
|
500
|
+
"required": false,
|
|
501
|
+
"optional": false,
|
|
502
|
+
"docs": {
|
|
503
|
+
"tags": [],
|
|
504
|
+
"text": "The current page"
|
|
505
|
+
},
|
|
506
|
+
"attribute": "current",
|
|
507
|
+
"reflect": false,
|
|
508
|
+
"defaultValue": "1"
|
|
509
|
+
}
|
|
510
|
+
}; }
|
|
511
|
+
static get states() { return {
|
|
512
|
+
"numbersStore": {},
|
|
513
|
+
"totalPages": {},
|
|
514
|
+
"internalSectionIndex": {}
|
|
515
|
+
}; }
|
|
516
|
+
static get events() { return [{
|
|
517
|
+
"method": "duetPageChange",
|
|
518
|
+
"name": "duetPageChange",
|
|
519
|
+
"bubbles": false,
|
|
520
|
+
"cancelable": true,
|
|
521
|
+
"composed": true,
|
|
522
|
+
"docs": {
|
|
523
|
+
"tags": [],
|
|
524
|
+
"text": "Emitted a page selection has been made"
|
|
525
|
+
},
|
|
526
|
+
"complexType": {
|
|
527
|
+
"original": "DuetPaginationPageEvent",
|
|
528
|
+
"resolved": "{ originalEvent?: Event; component: \"duet-pagination\"; current: number; take: number; from: number; to: number; type: \"page\" | \"jump\"; }",
|
|
529
|
+
"references": {
|
|
530
|
+
"DuetPaginationPageEvent": {
|
|
531
|
+
"location": "local"
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}]; }
|
|
536
|
+
static get elementRef() { return "element"; }
|
|
537
|
+
static get watchers() { return [{
|
|
538
|
+
"propName": "current",
|
|
539
|
+
"methodName": "watchStateHandler"
|
|
540
|
+
}]; }
|
|
541
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
background: transparent;
|
|
8
|
+
border: 0;
|
|
9
|
+
-moz-appearance: none;
|
|
10
|
+
-webkit-appearance: none;
|
|
11
|
+
appearance: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
background: transparent;
|
|
19
|
+
border: 0;
|
|
20
|
+
-moz-appearance: none;
|
|
21
|
+
-webkit-appearance: none;
|
|
22
|
+
appearance: none;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
margin: 0 auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.duet-range-stepper {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
gap: 0;
|
|
31
|
+
align-items: baseline;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
min-width: 30px;
|
|
34
|
+
min-height: 30px;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
border-left-width: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.duet-range-stepper {
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
}
|
|
43
|
+
.duet-range-stepper .duet-range-step-counter {
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
color: #00294d;
|
|
46
|
+
}
|
|
47
|
+
.duet-range-stepper ::part(button) {
|
|
48
|
+
border: 0;
|
|
49
|
+
}
|