@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
package/hydrate/index.js
CHANGED
|
@@ -4704,7 +4704,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
4704
4704
|
|
|
4705
4705
|
|
|
4706
4706
|
const NAMESPACE = 'duet';
|
|
4707
|
-
const BUILD = /* duet */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender:
|
|
4707
|
+
const BUILD = /* duet */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
4708
4708
|
|
|
4709
4709
|
const TAB_KEY = 9;
|
|
4710
4710
|
var appGlobalScript = () => {
|
|
@@ -5204,7 +5204,8 @@ const callRender = (e, t, o) => {
|
|
|
5204
5204
|
return null;
|
|
5205
5205
|
}, postUpdateComponent = e => {
|
|
5206
5206
|
const t = e.$cmpMeta$.$tagName$, o = e.$hostElement$, n = createTime("postUpdate", t), s = e.$lazyInstance$ , l = e.$ancestorComponent$;
|
|
5207
|
-
|
|
5207
|
+
(safeCall(s, "componentDidRender"),
|
|
5208
|
+
BUILD.isDev ), 64 & e.$flags$ ? ((safeCall(s, "componentDidUpdate"),
|
|
5208
5209
|
BUILD.isDev ), n()) : (e.$flags$ |= 64, addHydratedFlag(o),
|
|
5209
5210
|
(safeCall(s, "componentDidLoad"),
|
|
5210
5211
|
BUILD.isDev ), n(), (e.$onReadyResolve$(o), l || appDidLoad())), e.$onInstanceResolve$(o), (e.$onRenderResolve$ && (e.$onRenderResolve$(),
|
|
@@ -5542,6 +5543,60 @@ const cmpModules = new Map, getModule = e => {
|
|
|
5542
5543
|
isTesting: !1
|
|
5543
5544
|
}, styles = new Map;
|
|
5544
5545
|
|
|
5546
|
+
function chr4() {
|
|
5547
|
+
return Math.random().toString(16).slice(-4);
|
|
5548
|
+
}
|
|
5549
|
+
function createID(prefix) {
|
|
5550
|
+
return `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;
|
|
5551
|
+
}
|
|
5552
|
+
|
|
5553
|
+
const debounce = (func, timeout = 250) => {
|
|
5554
|
+
let timer;
|
|
5555
|
+
return (...args) => {
|
|
5556
|
+
clearTimeout(timer);
|
|
5557
|
+
timer = setTimeout(() => {
|
|
5558
|
+
func.apply(undefined, args);
|
|
5559
|
+
}, timeout);
|
|
5560
|
+
};
|
|
5561
|
+
};
|
|
5562
|
+
function fieldSorter(fields) {
|
|
5563
|
+
return function (a, b) {
|
|
5564
|
+
return fields
|
|
5565
|
+
.map(function (o) {
|
|
5566
|
+
let dir = 1;
|
|
5567
|
+
if (o[0] === "-") {
|
|
5568
|
+
dir = -1;
|
|
5569
|
+
o = o.substring(1);
|
|
5570
|
+
}
|
|
5571
|
+
if (a[o] > b[o]) {
|
|
5572
|
+
return dir;
|
|
5573
|
+
}
|
|
5574
|
+
if (a[o] < b[o]) {
|
|
5575
|
+
return -dir;
|
|
5576
|
+
}
|
|
5577
|
+
return 0;
|
|
5578
|
+
})
|
|
5579
|
+
.reduce(function firstNonZeroValue(p, n) {
|
|
5580
|
+
return p ? p : n;
|
|
5581
|
+
}, 0);
|
|
5582
|
+
};
|
|
5583
|
+
}
|
|
5584
|
+
|
|
5585
|
+
const isArrowLeftKey = (e) => e.keyCode === 37;
|
|
5586
|
+
const isArrowUpKey = (e) => e.keyCode === 38;
|
|
5587
|
+
const isArrowRightKey = (e) => e.keyCode === 39;
|
|
5588
|
+
const isArrowDownKey = (e) => e.keyCode === 40;
|
|
5589
|
+
const isArrowKey = (e) => isArrowDownKey(e) || isArrowRightKey(e) || isArrowUpKey(e) || isArrowLeftKey(e);
|
|
5590
|
+
const isEscapeKey = (e) => e.key === "Escape" || e.key === "Esc" || e.keyCode === 27;
|
|
5591
|
+
const isBackspaceKey = (e) => e.keyCode === 8;
|
|
5592
|
+
const isSpaceKey = (e) => e.key === "Space" || e.keyCode === 32;
|
|
5593
|
+
const isPlusKey = (e) => e.key === "+" || e.keyCode === 43;
|
|
5594
|
+
const isMinusKey = (e) => e.key === "-" || e.keyCode === 45;
|
|
5595
|
+
const isQuestionKey = (e) => e.key === "?";
|
|
5596
|
+
const isEnterKey = (e) => e.key === "Enter" || e.keyCode === 13;
|
|
5597
|
+
const isKeyboardClick = (e) => isEnterKey(e) || isSpaceKey(e);
|
|
5598
|
+
const isNumber = (e) => (e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode >= 96 && e.keyCode <= 105);
|
|
5599
|
+
|
|
5545
5600
|
function isObject(maybeObj) {
|
|
5546
5601
|
return Object.prototype.toString.call(maybeObj) === "[object Object]";
|
|
5547
5602
|
}
|
|
@@ -5679,138 +5734,684 @@ const inheritGlobalTheme = (component) => {
|
|
|
5679
5734
|
}
|
|
5680
5735
|
};
|
|
5681
5736
|
|
|
5682
|
-
const
|
|
5737
|
+
const colorWarning = "rgb(247, 178, 40)";
|
|
5738
|
+
const colorGrayDarker = "rgb(101, 119, 135)";
|
|
5739
|
+
const colorGrayLighter = "rgb(245, 248, 250)";
|
|
5740
|
+
const colorCategoryHome = "rgb(211, 36, 131)";
|
|
5741
|
+
const colorPrimary = "rgb(0, 119, 179)";
|
|
5742
|
+
const colorCategoryVehicle = "rgb(54, 74, 129)";
|
|
5743
|
+
const colorSuccess = "rgb(0, 135, 90)";
|
|
5744
|
+
const colorCategoryFamily = "rgb(11, 114, 136)";
|
|
5745
|
+
const colorPrimaryLightest = "rgb(243, 249, 252)";
|
|
5746
|
+
const colorPrimaryLighter = "rgb(230, 242, 248)";
|
|
5747
|
+
const colorBrandBlue = "rgb(0, 161, 212)";
|
|
5748
|
+
const colorPrimaryDark = "rgb(0, 77, 128)";
|
|
5749
|
+
const colorGrayLightest = "rgb(255, 255, 255)";
|
|
5750
|
+
const colorCategoryFinance = "rgb(122, 1, 196)";
|
|
5751
|
+
const colorGrayDark = "rgb(144, 149, 153)";
|
|
5752
|
+
const colorGrayLight = "rgb(225, 227, 230)";
|
|
5753
|
+
const colorSecondary = "rgb(0, 41, 77)";
|
|
5754
|
+
const colorCategoryPet = "rgb(168, 1, 78)";
|
|
5755
|
+
const colorPrimaryLight = "rgb(205, 229, 241)";
|
|
5756
|
+
const colorCategoryTravel = "rgb(213, 66, 3)";
|
|
5757
|
+
const colorGray = "rgb(207, 210, 212)";
|
|
5758
|
+
const colorDanger = "rgb(222, 35, 98)";
|
|
5759
|
+
const colorGrayDarkerTurva = "rgb(68, 68, 69)";
|
|
5760
|
+
const colorGrayLighterTurva = "rgb(245, 245, 247)";
|
|
5761
|
+
const colorCategoryHomeTurva = "rgb(161, 10, 78)";
|
|
5762
|
+
const colorPrimaryTurva = "rgb(198, 12, 48)";
|
|
5763
|
+
const colorCategoryVehicleTurva = "rgb(23, 28, 58)";
|
|
5764
|
+
const colorSuccessTurva = "rgb(8, 135, 78)";
|
|
5765
|
+
const colorPrimaryLightestTurva = "rgb(252, 243, 244)";
|
|
5766
|
+
const colorCategoryFamilyTurva = "rgb(199, 12, 112)";
|
|
5767
|
+
const colorCategoryUnionTurva = "rgb(169, 69, 124)";
|
|
5768
|
+
const colorPrimaryLighterTurva = "rgb(249, 230, 234)";
|
|
5769
|
+
const colorPrimaryDarkTurva = "rgb(148, 9, 37)";
|
|
5770
|
+
const colorGrayLightestTurva = "rgb(255, 255, 255)";
|
|
5771
|
+
const colorGrayDarkTurva = "rgb(116, 116, 117)";
|
|
5772
|
+
const colorGrayLightTurva = "rgb(228, 228, 230)";
|
|
5773
|
+
const colorBrandGrayTurva = "rgb(178, 180, 179)";
|
|
5774
|
+
const colorSecondaryTurva = "rgb(23, 28, 58)";
|
|
5775
|
+
const colorPrimaryLightTurva = "rgb(244, 207, 214)";
|
|
5776
|
+
const colorCategoryTravelTurva = "rgb(9, 129, 148)";
|
|
5777
|
+
const colorGrayTurva = "rgb(207, 207, 209)";
|
|
5778
|
+
const colorDangerTurva = "rgb(224, 42, 13)";
|
|
5779
|
+
const colorWarningTurva = "rgb(250, 164, 15)";
|
|
5780
|
+
const colorData07 = "rgb(192, 101, 247)";
|
|
5781
|
+
const colorData08 = "rgb(0, 105, 191)";
|
|
5782
|
+
const colorData09 = "rgb(19, 120, 53)";
|
|
5783
|
+
const colorData10 = "rgb(179, 60, 24)";
|
|
5784
|
+
const colorData11 = "rgb(13, 163, 166)";
|
|
5785
|
+
const colorData01 = "rgb(122, 1, 196)";
|
|
5786
|
+
const colorData12 = "rgb(11, 114, 136)";
|
|
5787
|
+
const colorData02 = "rgb(0, 155, 204)";
|
|
5788
|
+
const colorData13 = "rgb(179, 137, 24)";
|
|
5789
|
+
const colorData03 = "rgb(27, 171, 75)";
|
|
5790
|
+
const colorData14 = "rgb(128, 98, 17)";
|
|
5791
|
+
const colorData04 = "rgb(255, 86, 34)";
|
|
5792
|
+
const colorData15 = "rgb(0, 41, 77)";
|
|
5793
|
+
const colorData05 = "rgb(245, 76, 154)";
|
|
5794
|
+
const colorData06 = "rgb(194, 21, 101)";
|
|
5795
|
+
const fontWeightExtraBold = "800";
|
|
5796
|
+
const letterSpacingHeading = "-0.01rem";
|
|
5797
|
+
const fontFamilyHeadingTurva = "'turva-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
5798
|
+
const fontFamilyTextTurva = "'turva-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
5799
|
+
const fontFamilyHeading = "'localtapiola-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
5800
|
+
const fontFamilyText = "'localtapiola-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
5801
|
+
const fontWeightBold = "700";
|
|
5802
|
+
const fontWeightNormal = "400";
|
|
5803
|
+
const fontWeightSemiBold = "600";
|
|
5804
|
+
const fontSizeXxxxLarge = "4.5rem";
|
|
5805
|
+
const fontSizeXxxLarge = "3rem";
|
|
5806
|
+
const fontSizeXxLarge = "2.25rem";
|
|
5807
|
+
const fontSizeXLarge = "1.5rem";
|
|
5808
|
+
const fontSizeLarge = "1.25rem";
|
|
5809
|
+
const fontSizeMedium = "1rem";
|
|
5810
|
+
const fontSizeSmall = "0.875rem";
|
|
5811
|
+
const fontSizeXSmall = "0.75rem";
|
|
5812
|
+
const radiusSharp = "0";
|
|
5813
|
+
const radiusDefault = "4px";
|
|
5814
|
+
const radiusCircle = "50%";
|
|
5815
|
+
const radiusPill = "20rem";
|
|
5816
|
+
const shadowTooltipTurva = "0 2px 10px 0 rgba(117, 117, 117, 0.13)";
|
|
5817
|
+
const shadowDefault = "0 2px 6px 0 rgba(0, 41, 77, 0.07)";
|
|
5818
|
+
const shadowTooltip = "0 2px 10px 0 rgba(0, 41, 77, 0.07)";
|
|
5819
|
+
const shadowCardTurva = "0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)";
|
|
5820
|
+
const shadowModal = "0 2px 20px 0 rgba(0, 0, 0, 0.2)";
|
|
5821
|
+
const shadowCard = "0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)";
|
|
5822
|
+
const shadowHoverTurva = "0 2px 10px 0 rgba(117, 117, 117, 0.15)";
|
|
5823
|
+
const shadowHover = "0 2px 10px 0 rgba(0, 41, 77, 0.1)";
|
|
5824
|
+
const shadowDefaultTurva = "0 2px 6px 0 rgba(117, 117, 117, 0.13)";
|
|
5825
|
+
const spaceXxSmall = "4px";
|
|
5826
|
+
const spaceLarge = "20px";
|
|
5827
|
+
const spaceXSmall = "8px";
|
|
5828
|
+
const spaceXxxSmall = "2px";
|
|
5829
|
+
const spaceSmall = "12px";
|
|
5830
|
+
const spaceMedium = "16px";
|
|
5831
|
+
const spaceXxLarge = "36px";
|
|
5832
|
+
const spaceXxxxLarge = "72px";
|
|
5833
|
+
const spaceXxxxxLarge = "94px";
|
|
5834
|
+
const spaceXxxLarge = "48px";
|
|
5835
|
+
const spaceXLarge = "28px";
|
|
5836
|
+
const sizeIconXxLarge = "48px";
|
|
5837
|
+
const sizeFormBorder = "1px";
|
|
5838
|
+
const sizeStepMedium = "40px";
|
|
5839
|
+
const sizeButtonMinWidth = "8rem";
|
|
5840
|
+
const sizeHeader = "4rem";
|
|
5841
|
+
const sizeIconXxxLarge = "72px";
|
|
5842
|
+
const sizeIconXLarge = "36px";
|
|
5843
|
+
const sizeIconXxSmall = "10px";
|
|
5844
|
+
const sizeStepSmall = "30px";
|
|
5845
|
+
const sizeNavigation = "3rem";
|
|
5846
|
+
const sizeIconLarge = "30px";
|
|
5847
|
+
const sizeLayoutMaxWidth = "1110px";
|
|
5848
|
+
const sizeTappableSquare = "48px";
|
|
5849
|
+
const sizeIconXSmall = "16px";
|
|
5850
|
+
const sizeIconXxxSmall = "7px";
|
|
5851
|
+
const sizeButtonBorder = "2px";
|
|
5852
|
+
const sizeButtonTinyBorder = "1px";
|
|
5853
|
+
const sizeIconMedium = "24px";
|
|
5854
|
+
const sizeIconSmall = "20px";
|
|
5855
|
+
const opacity85 = "0.85";
|
|
5856
|
+
const opacity75 = "0.75";
|
|
5857
|
+
const opacity50 = "0.50";
|
|
5858
|
+
const opacity30 = "0.30";
|
|
5859
|
+
const zIndexDropdown = "600";
|
|
5860
|
+
const zIndexSpinner = "800";
|
|
5861
|
+
const zIndexDefault = "1";
|
|
5862
|
+
const zIndexToast = "500";
|
|
5863
|
+
const zIndexPopup = "950";
|
|
5864
|
+
const zIndexModal = "900";
|
|
5865
|
+
const zIndexSticky = "300";
|
|
5866
|
+
const zIndexMasked = "100";
|
|
5867
|
+
const zIndexDeep = "-999999";
|
|
5868
|
+
const zIndexOverlay = "700";
|
|
5869
|
+
const zIndexMask = "200";
|
|
5870
|
+
const zIndexHeader = "400";
|
|
5871
|
+
const lineHeightMedium = "1.5";
|
|
5872
|
+
const lineHeightSmall = "1.25";
|
|
5873
|
+
const lineHeightXSmall = "1.1";
|
|
5874
|
+
const transitionQuickly = "300ms ease";
|
|
5875
|
+
const transitionSlowly = "600ms ease";
|
|
5876
|
+
const mediaQueryXxSmall = "'(max-width: 22.5em)'";
|
|
5877
|
+
const mediaQueryXSmall = "'(max-width: 35.9375em)'";
|
|
5878
|
+
const mediaQuerySmall = "'(min-width: 36em)'";
|
|
5879
|
+
const mediaQueryMedium = "'(min-width: 48em)'";
|
|
5880
|
+
const mediaQueryLarge = "'(min-width: 62em)'";
|
|
5881
|
+
const mediaQueryXLarge = "'(min-width: 64.0625em)'";
|
|
5882
|
+
const mediaQueryXxLarge = "'(min-width: 76.25em)'";
|
|
5883
|
+
const mediaQueryXxxLarge = "'(min-width: 106.25em)'";
|
|
5683
5884
|
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5885
|
+
var tokens$2 = /*#__PURE__*/Object.freeze({
|
|
5886
|
+
__proto__: null,
|
|
5887
|
+
colorWarning: colorWarning,
|
|
5888
|
+
colorGrayDarker: colorGrayDarker,
|
|
5889
|
+
colorGrayLighter: colorGrayLighter,
|
|
5890
|
+
colorCategoryHome: colorCategoryHome,
|
|
5891
|
+
colorPrimary: colorPrimary,
|
|
5892
|
+
colorCategoryVehicle: colorCategoryVehicle,
|
|
5893
|
+
colorSuccess: colorSuccess,
|
|
5894
|
+
colorCategoryFamily: colorCategoryFamily,
|
|
5895
|
+
colorPrimaryLightest: colorPrimaryLightest,
|
|
5896
|
+
colorPrimaryLighter: colorPrimaryLighter,
|
|
5897
|
+
colorBrandBlue: colorBrandBlue,
|
|
5898
|
+
colorPrimaryDark: colorPrimaryDark,
|
|
5899
|
+
colorGrayLightest: colorGrayLightest,
|
|
5900
|
+
colorCategoryFinance: colorCategoryFinance,
|
|
5901
|
+
colorGrayDark: colorGrayDark,
|
|
5902
|
+
colorGrayLight: colorGrayLight,
|
|
5903
|
+
colorSecondary: colorSecondary,
|
|
5904
|
+
colorCategoryPet: colorCategoryPet,
|
|
5905
|
+
colorPrimaryLight: colorPrimaryLight,
|
|
5906
|
+
colorCategoryTravel: colorCategoryTravel,
|
|
5907
|
+
colorGray: colorGray,
|
|
5908
|
+
colorDanger: colorDanger,
|
|
5909
|
+
colorGrayDarkerTurva: colorGrayDarkerTurva,
|
|
5910
|
+
colorGrayLighterTurva: colorGrayLighterTurva,
|
|
5911
|
+
colorCategoryHomeTurva: colorCategoryHomeTurva,
|
|
5912
|
+
colorPrimaryTurva: colorPrimaryTurva,
|
|
5913
|
+
colorCategoryVehicleTurva: colorCategoryVehicleTurva,
|
|
5914
|
+
colorSuccessTurva: colorSuccessTurva,
|
|
5915
|
+
colorPrimaryLightestTurva: colorPrimaryLightestTurva,
|
|
5916
|
+
colorCategoryFamilyTurva: colorCategoryFamilyTurva,
|
|
5917
|
+
colorCategoryUnionTurva: colorCategoryUnionTurva,
|
|
5918
|
+
colorPrimaryLighterTurva: colorPrimaryLighterTurva,
|
|
5919
|
+
colorPrimaryDarkTurva: colorPrimaryDarkTurva,
|
|
5920
|
+
colorGrayLightestTurva: colorGrayLightestTurva,
|
|
5921
|
+
colorGrayDarkTurva: colorGrayDarkTurva,
|
|
5922
|
+
colorGrayLightTurva: colorGrayLightTurva,
|
|
5923
|
+
colorBrandGrayTurva: colorBrandGrayTurva,
|
|
5924
|
+
colorSecondaryTurva: colorSecondaryTurva,
|
|
5925
|
+
colorPrimaryLightTurva: colorPrimaryLightTurva,
|
|
5926
|
+
colorCategoryTravelTurva: colorCategoryTravelTurva,
|
|
5927
|
+
colorGrayTurva: colorGrayTurva,
|
|
5928
|
+
colorDangerTurva: colorDangerTurva,
|
|
5929
|
+
colorWarningTurva: colorWarningTurva,
|
|
5930
|
+
colorData07: colorData07,
|
|
5931
|
+
colorData08: colorData08,
|
|
5932
|
+
colorData09: colorData09,
|
|
5933
|
+
colorData10: colorData10,
|
|
5934
|
+
colorData11: colorData11,
|
|
5935
|
+
colorData01: colorData01,
|
|
5936
|
+
colorData12: colorData12,
|
|
5937
|
+
colorData02: colorData02,
|
|
5938
|
+
colorData13: colorData13,
|
|
5939
|
+
colorData03: colorData03,
|
|
5940
|
+
colorData14: colorData14,
|
|
5941
|
+
colorData04: colorData04,
|
|
5942
|
+
colorData15: colorData15,
|
|
5943
|
+
colorData05: colorData05,
|
|
5944
|
+
colorData06: colorData06,
|
|
5945
|
+
fontWeightExtraBold: fontWeightExtraBold,
|
|
5946
|
+
letterSpacingHeading: letterSpacingHeading,
|
|
5947
|
+
fontFamilyHeadingTurva: fontFamilyHeadingTurva,
|
|
5948
|
+
fontFamilyTextTurva: fontFamilyTextTurva,
|
|
5949
|
+
fontFamilyHeading: fontFamilyHeading,
|
|
5950
|
+
fontFamilyText: fontFamilyText,
|
|
5951
|
+
fontWeightBold: fontWeightBold,
|
|
5952
|
+
fontWeightNormal: fontWeightNormal,
|
|
5953
|
+
fontWeightSemiBold: fontWeightSemiBold,
|
|
5954
|
+
fontSizeXxxxLarge: fontSizeXxxxLarge,
|
|
5955
|
+
fontSizeXxxLarge: fontSizeXxxLarge,
|
|
5956
|
+
fontSizeXxLarge: fontSizeXxLarge,
|
|
5957
|
+
fontSizeXLarge: fontSizeXLarge,
|
|
5958
|
+
fontSizeLarge: fontSizeLarge,
|
|
5959
|
+
fontSizeMedium: fontSizeMedium,
|
|
5960
|
+
fontSizeSmall: fontSizeSmall,
|
|
5961
|
+
fontSizeXSmall: fontSizeXSmall,
|
|
5962
|
+
radiusSharp: radiusSharp,
|
|
5963
|
+
radiusDefault: radiusDefault,
|
|
5964
|
+
radiusCircle: radiusCircle,
|
|
5965
|
+
radiusPill: radiusPill,
|
|
5966
|
+
shadowTooltipTurva: shadowTooltipTurva,
|
|
5967
|
+
shadowDefault: shadowDefault,
|
|
5968
|
+
shadowTooltip: shadowTooltip,
|
|
5969
|
+
shadowCardTurva: shadowCardTurva,
|
|
5970
|
+
shadowModal: shadowModal,
|
|
5971
|
+
shadowCard: shadowCard,
|
|
5972
|
+
shadowHoverTurva: shadowHoverTurva,
|
|
5973
|
+
shadowHover: shadowHover,
|
|
5974
|
+
shadowDefaultTurva: shadowDefaultTurva,
|
|
5975
|
+
spaceXxSmall: spaceXxSmall,
|
|
5976
|
+
spaceLarge: spaceLarge,
|
|
5977
|
+
spaceXSmall: spaceXSmall,
|
|
5978
|
+
spaceXxxSmall: spaceXxxSmall,
|
|
5979
|
+
spaceSmall: spaceSmall,
|
|
5980
|
+
spaceMedium: spaceMedium,
|
|
5981
|
+
spaceXxLarge: spaceXxLarge,
|
|
5982
|
+
spaceXxxxLarge: spaceXxxxLarge,
|
|
5983
|
+
spaceXxxxxLarge: spaceXxxxxLarge,
|
|
5984
|
+
spaceXxxLarge: spaceXxxLarge,
|
|
5985
|
+
spaceXLarge: spaceXLarge,
|
|
5986
|
+
sizeIconXxLarge: sizeIconXxLarge,
|
|
5987
|
+
sizeFormBorder: sizeFormBorder,
|
|
5988
|
+
sizeStepMedium: sizeStepMedium,
|
|
5989
|
+
sizeButtonMinWidth: sizeButtonMinWidth,
|
|
5990
|
+
sizeHeader: sizeHeader,
|
|
5991
|
+
sizeIconXxxLarge: sizeIconXxxLarge,
|
|
5992
|
+
sizeIconXLarge: sizeIconXLarge,
|
|
5993
|
+
sizeIconXxSmall: sizeIconXxSmall,
|
|
5994
|
+
sizeStepSmall: sizeStepSmall,
|
|
5995
|
+
sizeNavigation: sizeNavigation,
|
|
5996
|
+
sizeIconLarge: sizeIconLarge,
|
|
5997
|
+
sizeLayoutMaxWidth: sizeLayoutMaxWidth,
|
|
5998
|
+
sizeTappableSquare: sizeTappableSquare,
|
|
5999
|
+
sizeIconXSmall: sizeIconXSmall,
|
|
6000
|
+
sizeIconXxxSmall: sizeIconXxxSmall,
|
|
6001
|
+
sizeButtonBorder: sizeButtonBorder,
|
|
6002
|
+
sizeButtonTinyBorder: sizeButtonTinyBorder,
|
|
6003
|
+
sizeIconMedium: sizeIconMedium,
|
|
6004
|
+
sizeIconSmall: sizeIconSmall,
|
|
6005
|
+
opacity85: opacity85,
|
|
6006
|
+
opacity75: opacity75,
|
|
6007
|
+
opacity50: opacity50,
|
|
6008
|
+
opacity30: opacity30,
|
|
6009
|
+
zIndexDropdown: zIndexDropdown,
|
|
6010
|
+
zIndexSpinner: zIndexSpinner,
|
|
6011
|
+
zIndexDefault: zIndexDefault,
|
|
6012
|
+
zIndexToast: zIndexToast,
|
|
6013
|
+
zIndexPopup: zIndexPopup,
|
|
6014
|
+
zIndexModal: zIndexModal,
|
|
6015
|
+
zIndexSticky: zIndexSticky,
|
|
6016
|
+
zIndexMasked: zIndexMasked,
|
|
6017
|
+
zIndexDeep: zIndexDeep,
|
|
6018
|
+
zIndexOverlay: zIndexOverlay,
|
|
6019
|
+
zIndexMask: zIndexMask,
|
|
6020
|
+
zIndexHeader: zIndexHeader,
|
|
6021
|
+
lineHeightMedium: lineHeightMedium,
|
|
6022
|
+
lineHeightSmall: lineHeightSmall,
|
|
6023
|
+
lineHeightXSmall: lineHeightXSmall,
|
|
6024
|
+
transitionQuickly: transitionQuickly,
|
|
6025
|
+
transitionSlowly: transitionSlowly,
|
|
6026
|
+
mediaQueryXxSmall: mediaQueryXxSmall,
|
|
6027
|
+
mediaQueryXSmall: mediaQueryXSmall,
|
|
6028
|
+
mediaQuerySmall: mediaQuerySmall,
|
|
6029
|
+
mediaQueryMedium: mediaQueryMedium,
|
|
6030
|
+
mediaQueryLarge: mediaQueryLarge,
|
|
6031
|
+
mediaQueryXLarge: mediaQueryXLarge,
|
|
6032
|
+
mediaQueryXxLarge: mediaQueryXxLarge,
|
|
6033
|
+
mediaQueryXxxLarge: mediaQueryXxxLarge
|
|
6034
|
+
});
|
|
6035
|
+
|
|
6036
|
+
const allowedThemes = ["turva"];
|
|
6037
|
+
function isDashCase(str) {
|
|
6038
|
+
const dash = str.includes("-");
|
|
6039
|
+
const barredString = str.includes(" ") || str.includes("_");
|
|
6040
|
+
const barredStartingString = str.charAt(0) === "-";
|
|
6041
|
+
return dash && !barredString && !barredStartingString;
|
|
6042
|
+
}
|
|
6043
|
+
function capitalize(str = "") {
|
|
6044
|
+
return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
|
|
6045
|
+
}
|
|
6046
|
+
function lowerCaseFirst(str = "") {
|
|
6047
|
+
return `${str.charAt(0).toLowerCase()}${str.slice(1)}`;
|
|
6048
|
+
}
|
|
6049
|
+
function camelize(str = "") {
|
|
6050
|
+
const arr = str.split("-");
|
|
6051
|
+
//loop through each element of the array and capitalize the first letter.'
|
|
6052
|
+
arr.forEach((string, index) => {
|
|
6053
|
+
arr[index] = capitalize(string);
|
|
6054
|
+
});
|
|
6055
|
+
return arr.join("");
|
|
6056
|
+
}
|
|
6057
|
+
function getTheme(theme = "") {
|
|
6058
|
+
if (allowedThemes.includes(theme.toLowerCase())) {
|
|
6059
|
+
return theme.toLowerCase();
|
|
5759
6060
|
}
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
"duet-p-0": this.padding === "none",
|
|
5772
|
-
"duet-m-0": this.margin === "none",
|
|
5773
|
-
[this.variation]: true,
|
|
5774
|
-
"duet-theme-turva": this.theme === "turva",
|
|
5775
|
-
} }, hAsync("div", { class: "duet-alert-container" }, this.icon && (hAsync("div", { class: "duet-alert-icon" }, hAsync("duet-icon", { size: "auto", name: this.icon, color: "currentColor" }))), hAsync("span", null, hAsync("slot", null))), this.dismissible && (hAsync("div", { class: "duet-alert-dismiss" }, hAsync("duet-button", { variation: "plain", accessibleLabel: this.accessibleLabel, color: closeColor, iconSize: "medium", icon: "navigation-close", iconOnly: true, margin: "none", theme: this.theme, onClick: this.handleDismiss, fixed: true }))))));
|
|
6061
|
+
return "";
|
|
6062
|
+
}
|
|
6063
|
+
function capitalizeFirstLetter(string) {
|
|
6064
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
6065
|
+
}
|
|
6066
|
+
function hasType(t, str = "") {
|
|
6067
|
+
return str.indexOf(capitalizeFirstLetter(t)) === 0 || str.indexOf(t) === 0;
|
|
6068
|
+
}
|
|
6069
|
+
function addPrefix(prefix, str = "") {
|
|
6070
|
+
if (str && !isDashCase(str) && !hasType(prefix, str)) {
|
|
6071
|
+
return `${prefix}${capitalize(str)}`;
|
|
5776
6072
|
}
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
6073
|
+
return str;
|
|
6074
|
+
}
|
|
6075
|
+
function addTheme(str, theme) {
|
|
6076
|
+
const hasTheme = getTheme(theme).length;
|
|
6077
|
+
if (hasTheme && str.indexOf(theme) === -1) {
|
|
6078
|
+
return `${str}${capitalize(theme)}`;
|
|
6079
|
+
}
|
|
6080
|
+
return str;
|
|
6081
|
+
}
|
|
6082
|
+
function getColorByName(name, theme = "") {
|
|
6083
|
+
if (!name) {
|
|
6084
|
+
return undefined;
|
|
6085
|
+
}
|
|
6086
|
+
const defaultColor = convertToColorName(name);
|
|
6087
|
+
const themedColor = convertToColorName(name, theme);
|
|
6088
|
+
// lets just try to get the color first to save some cycles
|
|
6089
|
+
let resolvedToken = tokens$2[themedColor];
|
|
6090
|
+
if (!resolvedToken) {
|
|
6091
|
+
resolvedToken = tokens$2[defaultColor];
|
|
6092
|
+
}
|
|
6093
|
+
return resolvedToken;
|
|
6094
|
+
}
|
|
6095
|
+
function convertToColorName(name = "", theme = "") {
|
|
6096
|
+
let colorResolution = name;
|
|
6097
|
+
const dash = isDashCase(name);
|
|
6098
|
+
if (dash) {
|
|
6099
|
+
colorResolution = camelize(colorResolution);
|
|
6100
|
+
}
|
|
6101
|
+
colorResolution = addPrefix("color", colorResolution);
|
|
6102
|
+
colorResolution = addTheme(colorResolution, theme);
|
|
6103
|
+
// takes care of the case where colorPrimaryDark ends up with ColorPrimaryDark
|
|
6104
|
+
colorResolution = lowerCaseFirst(colorResolution);
|
|
6105
|
+
return colorResolution;
|
|
5799
6106
|
}
|
|
5800
6107
|
|
|
5801
|
-
const
|
|
6108
|
+
const duetActionButtonCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-action-button,*.sc-duet-action-button::after,*.sc-duet-action-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-action-button-h{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}/*!@button.duet-action-button*/button.duet-action-button.sc-duet-action-button{white-space:nowrap}/*!@button.duet-action-button*/button.duet-action-button.sc-duet-action-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}/*!@.duet-theme-turva button.duet-action-button*/.duet-theme-turva.sc-duet-action-button button.duet-action-button.sc-duet-action-button{color:#171c3a;background:#f5f5f7}/*!@button.duet-action-button duet-icon*/button.duet-action-button.sc-duet-action-button duet-icon.sc-duet-action-button{display:block}@media (max-width: 35.9375em){/*!@button.duet-action-button*/button.duet-action-button.sc-duet-action-button{width:32px;height:32px}}/*!@button.duet-action-button:not(:disabled):hover*/button.duet-action-button.sc-duet-action-button:not(:disabled):hover{background:#e9ecee !important}/*!@.duet-theme-turva button.duet-action-button:not(:disabled):hover*/.duet-theme-turva.sc-duet-action-button button.duet-action-button.sc-duet-action-button:not(:disabled):hover{background:#e9e9eb !important}/*!@button.duet-action-button:focus*/button.duet-action-button.sc-duet-action-button:focus{outline:0;box-shadow:0 0 0 2px #0077b3 !important}/*!@.duet-theme-turva button.duet-action-button:focus*/.duet-theme-turva.sc-duet-action-button button.duet-action-button.sc-duet-action-button:focus{box-shadow:0 0 0 2px #171c3a !important}/*!@button.duet-action-button:active:focus*/button.duet-action-button.sc-duet-action-button:active:focus{background:#dddfe1 !important;box-shadow:none}/*!@.duet-theme-turva button.duet-action-button:active:focus*/.duet-theme-turva.sc-duet-action-button button.duet-action-button.sc-duet-action-button:active:focus{background:#ddddde !important}/*!@button.duet-action-button:disabled*/button.duet-action-button.sc-duet-action-button:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}/*!@.duet-theme-turva button.duet-action-button:disabled*/.duet-theme-turva.sc-duet-action-button button.duet-action-button.sc-duet-action-button:disabled{color:#747475;background:#f5f5f7}";
|
|
5802
6109
|
|
|
5803
|
-
|
|
6110
|
+
/**
|
|
6111
|
+
* Slot: default slot inside an invisible element, this can be used to enhance accessibility
|
|
6112
|
+
* Part: button this part enables style overrides for the button
|
|
6113
|
+
* Part: icon this part enables style overrides for the icon
|
|
6114
|
+
*/
|
|
6115
|
+
class DuetActionButton {
|
|
5804
6116
|
constructor(hostRef) {
|
|
5805
6117
|
registerInstance(this, hostRef);
|
|
6118
|
+
this.duetActionEvent = createEvent$2(this, "duetActionEvent", 6);
|
|
6119
|
+
this.numbersStore = "";
|
|
5806
6120
|
/**
|
|
5807
|
-
* Theme of the
|
|
6121
|
+
* Theme of the pagination.
|
|
5808
6122
|
*/
|
|
5809
6123
|
this.theme = "";
|
|
5810
6124
|
/**
|
|
5811
|
-
*
|
|
6125
|
+
* Name of the icon to display
|
|
5812
6126
|
*/
|
|
5813
|
-
this.
|
|
6127
|
+
this.iconName = "action-arrow-left-small";
|
|
6128
|
+
/**
|
|
6129
|
+
* Color of the icon to display
|
|
6130
|
+
*/
|
|
6131
|
+
this.iconColor = "currentColor";
|
|
6132
|
+
/**
|
|
6133
|
+
* Size of the icon
|
|
6134
|
+
*/
|
|
6135
|
+
this.iconSize = "xx-small";
|
|
6136
|
+
/**
|
|
6137
|
+
* Name of action being called
|
|
6138
|
+
*/
|
|
6139
|
+
this.actionName = "default-action";
|
|
6140
|
+
/**
|
|
6141
|
+
* Name of id of action that was called being called
|
|
6142
|
+
*/
|
|
6143
|
+
this.actionId = undefined;
|
|
6144
|
+
/**
|
|
6145
|
+
* Name of id of action that was called being called
|
|
6146
|
+
*/
|
|
6147
|
+
this.actionMeta = undefined;
|
|
6148
|
+
/**
|
|
6149
|
+
* Disables the button
|
|
6150
|
+
*/
|
|
6151
|
+
this.disabled = false;
|
|
6152
|
+
/**
|
|
6153
|
+
* Custom color to be used for the icon, as a design token entered in camelCase
|
|
6154
|
+
* or kebab-case. Example: "color-primary". This property can also be set to
|
|
6155
|
+
* "currentColor" which forces the icon to use the CSS text color of parent
|
|
6156
|
+
* element instead. Useful when you want to control the color in stylesheet
|
|
6157
|
+
* instead.
|
|
6158
|
+
*/
|
|
6159
|
+
this.color = "";
|
|
6160
|
+
/**
|
|
6161
|
+
* Custom color to be used for a background, as a design token entered
|
|
6162
|
+
* in camelCase or kebab-case. Using this option the icon will always be resized
|
|
6163
|
+
* to $size-icon-medium on mobile viewports. Example: "color-primary".
|
|
6164
|
+
*/
|
|
6165
|
+
this.background = "";
|
|
6166
|
+
/**
|
|
6167
|
+
* Described By id
|
|
6168
|
+
*/
|
|
6169
|
+
this.ariaDescribedBy = undefined;
|
|
6170
|
+
/**
|
|
6171
|
+
* Aria description the button
|
|
6172
|
+
*/
|
|
6173
|
+
this.ariaDescription = undefined;
|
|
6174
|
+
/**
|
|
6175
|
+
* Default pagination labels
|
|
6176
|
+
*/
|
|
6177
|
+
this.ariaLabelsDefaults = {
|
|
6178
|
+
en: {
|
|
6179
|
+
label: "Click to activate action",
|
|
6180
|
+
},
|
|
6181
|
+
fi: {
|
|
6182
|
+
label: "Klikkaa toiminnon aktivointiin",
|
|
6183
|
+
},
|
|
6184
|
+
sv: {
|
|
6185
|
+
label: "Klicka för att aktivera åtgärd",
|
|
6186
|
+
},
|
|
6187
|
+
};
|
|
6188
|
+
/**
|
|
6189
|
+
* Default pagination labels
|
|
6190
|
+
*/
|
|
6191
|
+
this.ariaLabels = getLocaleString(this.ariaLabelsDefaults);
|
|
6192
|
+
/**
|
|
6193
|
+
* Used to indicate which dom element with ID this element controls
|
|
6194
|
+
*/
|
|
6195
|
+
this.ariaControls = "";
|
|
6196
|
+
this.listId = createID("duet-action-button");
|
|
6197
|
+
/**
|
|
6198
|
+
* Private methods.
|
|
6199
|
+
*/
|
|
6200
|
+
//helper to emit relevant page events
|
|
6201
|
+
this.emitPageEvent = debounce(e => {
|
|
6202
|
+
this.duetActionEvent.emit({
|
|
6203
|
+
component: "duet-action-button",
|
|
6204
|
+
originalEvent: e,
|
|
6205
|
+
action: this.actionId,
|
|
6206
|
+
name: this.actionName,
|
|
6207
|
+
meta: this.actionMeta,
|
|
6208
|
+
id: this.listId,
|
|
6209
|
+
});
|
|
6210
|
+
});
|
|
6211
|
+
}
|
|
6212
|
+
//handle a11y keyboard navigation events
|
|
6213
|
+
async onKeyboardDown(e) {
|
|
6214
|
+
if (isKeyboardClick(e)) {
|
|
6215
|
+
this.emitPageEvent(e);
|
|
6216
|
+
}
|
|
6217
|
+
}
|
|
6218
|
+
//set update current when mouse click on page number
|
|
6219
|
+
async onMouseHandler(e) {
|
|
6220
|
+
e.preventDefault();
|
|
6221
|
+
this.duetActionEvent.emit({
|
|
6222
|
+
component: "duet-action-button",
|
|
6223
|
+
originalEvent: e,
|
|
6224
|
+
action: this.actionName,
|
|
6225
|
+
id: this.actionId,
|
|
6226
|
+
meta: this.actionMeta,
|
|
6227
|
+
});
|
|
6228
|
+
}
|
|
6229
|
+
/**
|
|
6230
|
+
* Component lifecycle events.
|
|
6231
|
+
*/
|
|
6232
|
+
componentWillLoad() {
|
|
6233
|
+
inheritGlobalTheme(this);
|
|
6234
|
+
}
|
|
6235
|
+
/**
|
|
6236
|
+
* render() function
|
|
6237
|
+
* Always the last one in the class.
|
|
6238
|
+
*/
|
|
6239
|
+
render() {
|
|
6240
|
+
const color = this.color === "currentColor" ? "currentColor" : getColorByName(this.color, this.theme);
|
|
6241
|
+
const styles = {
|
|
6242
|
+
color,
|
|
6243
|
+
background: getColorByName(this.background, this.theme),
|
|
6244
|
+
"border-color": getColorByName(this.iconColor, this.theme),
|
|
6245
|
+
"border-width": "1px",
|
|
6246
|
+
"border-style": "solid",
|
|
6247
|
+
};
|
|
6248
|
+
return (hAsync(Host, { onKeyDown: e => this.onKeyboardDown(e) }, hAsync("button", { part: "button", style: styles, disabled: this.disabled, id: this.listId, class: {
|
|
6249
|
+
"duet-action-button": true,
|
|
6250
|
+
"duet-action-button--disabled": this.disabled,
|
|
6251
|
+
[`duet-action-button--${this.theme}`]: this.theme !== "",
|
|
6252
|
+
}, type: "button", onClick: e => this.onMouseHandler(e), "aria-label": this.ariaLabels.label, "aria-description": this.ariaDescription, "aria-describedby": this.ariaDescribedBy, "aria-controls": this.ariaControls }, hAsync("duet-icon", { part: "icon", name: this.iconName, color: this.iconColor, margin: "none", size: this.iconSize }), hAsync("duet-visually-hidden", null, hAsync("slot", null)))));
|
|
6253
|
+
}
|
|
6254
|
+
get element() { return getElement(this); }
|
|
6255
|
+
static get style() { return duetActionButtonCss; }
|
|
6256
|
+
static get cmpMeta() { return {
|
|
6257
|
+
"$flags$": 9,
|
|
6258
|
+
"$tagName$": "duet-action-button",
|
|
6259
|
+
"$members$": {
|
|
6260
|
+
"theme": [1025],
|
|
6261
|
+
"iconName": [1, "icon-name"],
|
|
6262
|
+
"iconColor": [1, "icon-color"],
|
|
6263
|
+
"iconSize": [1, "icon-size"],
|
|
6264
|
+
"actionName": [1, "action-name"],
|
|
6265
|
+
"actionId": [1, "action-id"],
|
|
6266
|
+
"actionMeta": [1, "action-meta"],
|
|
6267
|
+
"disabled": [4],
|
|
6268
|
+
"color": [513],
|
|
6269
|
+
"background": [1],
|
|
6270
|
+
"ariaDescribedBy": [1, "accessible-described-by"],
|
|
6271
|
+
"ariaDescription": [1, "accessible-description"],
|
|
6272
|
+
"ariaLabelsDefaults": [16],
|
|
6273
|
+
"ariaLabels": [16],
|
|
6274
|
+
"ariaControls": [1, "accessible-controls"],
|
|
6275
|
+
"numbersStore": [32]
|
|
6276
|
+
},
|
|
6277
|
+
"$listeners$": undefined,
|
|
6278
|
+
"$lazyBundleId$": "-",
|
|
6279
|
+
"$attrsToReflect$": [["color", "color"]]
|
|
6280
|
+
}; }
|
|
6281
|
+
}
|
|
6282
|
+
|
|
6283
|
+
const duetAlertCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-alert,*.sc-duet-alert::after,*.sc-duet-alert::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-alert-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;max-height:999px;border-radius:4px;transition:opacity 300ms ease, visibility 300ms ease, transform 300ms ease, max-height 300ms ease}/*!@:host(:focus)*/.sc-duet-alert-h:focus{outline:0}/*!@:host(.user-is-tabbing:focus)*/.user-is-tabbing.sc-duet-alert-h:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@:host(.user-is-tabbing.duet-theme-turva:focus)*/.user-is-tabbing.duet-theme-turva.sc-duet-alert-h:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@:host(.duet-alert-is-dismissed)*/.duet-alert-is-dismissed.sc-duet-alert-h{max-height:0;visibility:hidden;opacity:0;transform:scale(0.98)}/*!@:host(.duet-alert-is-dismissed) .duet-alert*/.duet-alert-is-dismissed.sc-duet-alert-h .duet-alert.sc-duet-alert{margin:0 !important}/*!@.duet-alert*/.duet-alert.sc-duet-alert{margin-bottom:16px !important;position:relative;width:100%;padding:16px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;background:#f2f8fb;border:1px solid #0077b3;border-radius:4px;transition:margin 100ms 300ms ease}/*!@.duet-alert.duet-p-0*/.duet-alert.duet-p-0.sc-duet-alert{padding:0 !important}/*!@.duet-alert.duet-m-0*/.duet-alert.duet-m-0.sc-duet-alert{margin:0 !important}/*!@.duet-alert.duet-theme-turva*/.duet-alert.duet-theme-turva.sc-duet-alert{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;background:#f3f4f5;border-color:#171c3a}/*!@.duet-alert.warning*/.duet-alert.warning.sc-duet-alert{background:#fffbf4;border-color:#f7b228}/*!@.duet-alert.warning.duet-theme-turva*/.duet-alert.warning.duet-theme-turva.sc-duet-alert{background:#fffaf3;border-color:#faa40f}/*!@.duet-alert.danger*/.duet-alert.danger.sc-duet-alert{background:#fdf4f7;border-color:#de2362}/*!@.duet-alert.danger.duet-theme-turva*/.duet-alert.danger.duet-theme-turva.sc-duet-alert{background:#fdf4f3;border-color:#e02a0d}/*!@.duet-alert.success*/.duet-alert.success.sc-duet-alert{background:#f2f9f7;border-color:#00875a}/*!@.duet-alert.success.duet-theme-turva*/.duet-alert.success.duet-theme-turva.sc-duet-alert{background:#f3f9f6;border-color:#08874e}/*!@.duet-alert-dismiss*/.duet-alert-dismiss.sc-duet-alert{position:absolute;top:2px;right:2px}/*!@.duet-alert-container*/.duet-alert-container.sc-duet-alert{display:inline-flex;align-items:center;justify-content:center;width:100%;margin:0 auto !important}/*!@.duet-alert-container span*/.duet-alert-container.sc-duet-alert span.sc-duet-alert{width:100%}/*!@.duet-alert-has-icon .duet-alert-container*/.duet-alert-has-icon.sc-duet-alert .duet-alert-container.sc-duet-alert{margin-top:2px !important}/*!@.duet-alert-icon*/.duet-alert-icon.sc-duet-alert{display:inline-block;align-self:center;width:20px;min-width:20px;height:20px;margin:0 16px 0 0 !important}/*!@.duet-alert-icon duet-icon*/.duet-alert-icon.sc-duet-alert duet-icon.sc-duet-alert{width:20px;height:20px}/*!@.duet-alert-is-dismissible*/.duet-alert-is-dismissible.sc-duet-alert{padding:16px 48px 16px 16px;text-align:left}/*!@.duet-alert-is-dismissible .duet-alert-container*/.duet-alert-is-dismissible.sc-duet-alert .duet-alert-container.sc-duet-alert{text-align:left}";
|
|
6284
|
+
|
|
6285
|
+
class DuetAlert {
|
|
6286
|
+
constructor(hostRef) {
|
|
6287
|
+
registerInstance(this, hostRef);
|
|
6288
|
+
this.duetDismiss = createEvent$2(this, "duetDismiss", 7);
|
|
6289
|
+
/**
|
|
6290
|
+
* Theme of the card.
|
|
6291
|
+
*/
|
|
6292
|
+
this.theme = "";
|
|
6293
|
+
/**
|
|
6294
|
+
* State() variables
|
|
6295
|
+
* Inlined decorator, alphabetical order.
|
|
6296
|
+
*/
|
|
6297
|
+
this.isDismissed = false;
|
|
6298
|
+
/**
|
|
6299
|
+
* Property to change languageDefaults on the component.
|
|
6300
|
+
* normally you would handle these strings on an application level and override @accessibleLabel when needed
|
|
6301
|
+
* @default {fi: "Sulje viesti", sv: "Stäng meddelandet", en: "Close the message"}
|
|
6302
|
+
*/
|
|
6303
|
+
this.accessibleLabelDefaults = {
|
|
6304
|
+
fi: "Sulje viesti",
|
|
6305
|
+
sv: "Stäng meddelandet",
|
|
6306
|
+
en: "Close the message",
|
|
6307
|
+
};
|
|
6308
|
+
/**
|
|
6309
|
+
* Adds accessible label for the dismissible alert close button.
|
|
6310
|
+
* @default {fi: "Sulje viesti", sv: "Stäng meddelandet", en: "Close the message"}
|
|
6311
|
+
*/
|
|
6312
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults);
|
|
6313
|
+
/**
|
|
6314
|
+
* Enable or disabled announcements by assistive technologies.
|
|
6315
|
+
*/
|
|
6316
|
+
this.announcements = true;
|
|
6317
|
+
/**
|
|
6318
|
+
* Icon to display to the left of the content.
|
|
6319
|
+
*/
|
|
6320
|
+
this.icon = "";
|
|
6321
|
+
/**
|
|
6322
|
+
* Controls the margin of the component.
|
|
6323
|
+
*/
|
|
6324
|
+
this.margin = "auto";
|
|
6325
|
+
/**
|
|
6326
|
+
* Controls the padding of the component.
|
|
6327
|
+
*/
|
|
6328
|
+
this.padding = "auto";
|
|
6329
|
+
/**
|
|
6330
|
+
* Style variation of the alert.
|
|
6331
|
+
*/
|
|
6332
|
+
this.variation = "default";
|
|
6333
|
+
/**
|
|
6334
|
+
* Should a button be rendered to dismiss the alert?
|
|
6335
|
+
*/
|
|
6336
|
+
this.dismissible = false;
|
|
6337
|
+
this.handleDismiss = (ev) => {
|
|
6338
|
+
this.isDismissed = true;
|
|
6339
|
+
this.duetDismiss.emit({
|
|
6340
|
+
component: "duet-alert",
|
|
6341
|
+
originalEvent: ev,
|
|
6342
|
+
});
|
|
6343
|
+
};
|
|
6344
|
+
}
|
|
6345
|
+
/**
|
|
6346
|
+
* Component lifecycle events.
|
|
6347
|
+
*/
|
|
6348
|
+
componentWillLoad() {
|
|
6349
|
+
inheritGlobalTheme(this);
|
|
6350
|
+
}
|
|
6351
|
+
componentDidLoad() {
|
|
6352
|
+
if (this.autoDismiss) {
|
|
6353
|
+
this.timeoutID = setTimeout(() => this.handleDismiss(), this.autoDismiss);
|
|
6354
|
+
}
|
|
6355
|
+
}
|
|
6356
|
+
disconnectedCallback() {
|
|
6357
|
+
if (this.timeoutID) {
|
|
6358
|
+
clearTimeout(this.timeoutID);
|
|
6359
|
+
}
|
|
6360
|
+
}
|
|
6361
|
+
/**
|
|
6362
|
+
* render() function
|
|
6363
|
+
* Always the last one in the class.
|
|
6364
|
+
*/
|
|
6365
|
+
render() {
|
|
6366
|
+
const closeColor = this.theme === "turva" ? "secondary-turva" : "secondary";
|
|
6367
|
+
const role = this.variation === "danger" || this.variation === "warning" ? "alert" : "status";
|
|
6368
|
+
return (hAsync(Host, { tabindex: "0", class: { "duet-theme-turva": this.theme === "turva", "duet-alert-is-dismissed": this.isDismissed }, role: this.announcements ? role : undefined }, hAsync("div", { class: {
|
|
6369
|
+
"duet-alert": true,
|
|
6370
|
+
"duet-alert-has-icon": !!this.icon,
|
|
6371
|
+
"duet-alert-is-dismissible": this.dismissible,
|
|
6372
|
+
"duet-p-0": this.padding === "none",
|
|
6373
|
+
"duet-m-0": this.margin === "none",
|
|
6374
|
+
[this.variation]: true,
|
|
6375
|
+
"duet-theme-turva": this.theme === "turva",
|
|
6376
|
+
} }, hAsync("div", { class: "duet-alert-container" }, this.icon && (hAsync("div", { class: "duet-alert-icon" }, hAsync("duet-icon", { size: "auto", name: this.icon, color: "currentColor" }))), hAsync("span", null, hAsync("slot", null))), this.dismissible && (hAsync("div", { class: "duet-alert-dismiss" }, hAsync("duet-button", { variation: "plain", accessibleLabel: this.accessibleLabel, color: closeColor, iconSize: "medium", icon: "navigation-close", iconOnly: true, margin: "none", theme: this.theme, onClick: this.handleDismiss, fixed: true }))))));
|
|
6377
|
+
}
|
|
6378
|
+
static get style() { return duetAlertCss; }
|
|
6379
|
+
static get cmpMeta() { return {
|
|
6380
|
+
"$flags$": 9,
|
|
6381
|
+
"$tagName$": "duet-alert",
|
|
6382
|
+
"$members$": {
|
|
6383
|
+
"theme": [1025],
|
|
6384
|
+
"accessibleLabelDefaults": [1, "accessible-label-default"],
|
|
6385
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
6386
|
+
"announcements": [4],
|
|
6387
|
+
"icon": [1],
|
|
6388
|
+
"autoDismiss": [2, "auto-dismiss"],
|
|
6389
|
+
"margin": [1],
|
|
6390
|
+
"padding": [1],
|
|
6391
|
+
"variation": [1],
|
|
6392
|
+
"dismissible": [4],
|
|
6393
|
+
"isDismissed": [32],
|
|
6394
|
+
"timeoutID": [32]
|
|
6395
|
+
},
|
|
6396
|
+
"$listeners$": undefined,
|
|
6397
|
+
"$lazyBundleId$": "-",
|
|
6398
|
+
"$attrsToReflect$": []
|
|
6399
|
+
}; }
|
|
6400
|
+
}
|
|
6401
|
+
|
|
6402
|
+
const duetBadgeCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-badge,*.sc-duet-badge::after,*.sc-duet-badge::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-badge-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:4px !important;margin-bottom:2px !important;display:inline-block;width:auto;vertical-align:middle}/*!@:host:last-child, :host:last-of-type*/.sc-duet-badge-h:last-child,.sc-duet-badge-h:last-of-type{margin-right:0 !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-badge-h{margin:0 !important}/*!@.duet-badge*/.duet-badge.sc-duet-badge{width:100%;padding:4.4444444444px 12px 5.4444444444px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.75rem;font-style:normal;font-weight:600;line-height:1.25;color:#00294d;text-align:center;word-break:break-word;vertical-align:middle;background:#e6f1f7;border-radius:20rem}/*!@.duet-badge.duet-p-0*/.duet-badge.duet-p-0.sc-duet-badge{padding:0 !important}/*!@.duet-badge.duet-m-0*/.duet-badge.duet-m-0.sc-duet-badge{margin:0 !important}/*!@.duet-badge.duet-theme-turva*/.duet-badge.duet-theme-turva.sc-duet-badge{padding:5.4444444444px 12px 4.4444444444px;font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-weight:700;color:#171c3a;background:#e8e8eb}/*!@.duet-badge.warning*/.duet-badge.warning.sc-duet-badge{background:#fef3df}/*!@.duet-badge.warning.duet-theme-turva*/.duet-badge.warning.duet-theme-turva.sc-duet-badge{background:#fef1db}/*!@.duet-badge.danger*/.duet-badge.danger.sc-duet-badge{background:#fce9ef}/*!@.duet-badge.danger.duet-theme-turva*/.duet-badge.danger.duet-theme-turva.sc-duet-badge{background:#fceae7}/*!@.duet-badge.success*/.duet-badge.success.sc-duet-badge{background:#e6f3ef}/*!@.duet-badge.success.duet-theme-turva*/.duet-badge.success.duet-theme-turva.sc-duet-badge{background:#e6f3ed}";
|
|
6403
|
+
|
|
6404
|
+
class DuetBadge {
|
|
6405
|
+
constructor(hostRef) {
|
|
6406
|
+
registerInstance(this, hostRef);
|
|
6407
|
+
/**
|
|
6408
|
+
* Theme of the badge.
|
|
6409
|
+
*/
|
|
6410
|
+
this.theme = "";
|
|
6411
|
+
/**
|
|
6412
|
+
* Style variation of the alert.
|
|
6413
|
+
*/
|
|
6414
|
+
this.variation = "default";
|
|
5814
6415
|
/**
|
|
5815
6416
|
* Controls the margin of the component.
|
|
5816
6417
|
*/
|
|
@@ -5923,422 +6524,58 @@ class DuetBreadcrumbs {
|
|
|
5923
6524
|
inheritGlobalTheme(this);
|
|
5924
6525
|
this.children = Array.from(this.element.children);
|
|
5925
6526
|
}
|
|
5926
|
-
connectedCallback() {
|
|
5927
|
-
{
|
|
5928
|
-
return;
|
|
5929
|
-
}
|
|
5930
|
-
}
|
|
5931
|
-
disconnectedCallback() {
|
|
5932
|
-
{
|
|
5933
|
-
return;
|
|
5934
|
-
}
|
|
5935
|
-
}
|
|
5936
|
-
/**
|
|
5937
|
-
* render() function
|
|
5938
|
-
* Always the last one in the class.
|
|
5939
|
-
*/
|
|
5940
|
-
render() {
|
|
5941
|
-
return (hAsync(Host, null, hAsync("nav", { "aria-label": this.breadcrumbsAriaLabel, class: {
|
|
5942
|
-
"duet-breadcrumbs": true,
|
|
5943
|
-
"duet-theme-turva": this.theme === "turva",
|
|
5944
|
-
} }, hAsync("ol", null, this.children.map((child, index) => (hAsync(Fragment, null, index > 0 && (hAsync("li", { "aria-hidden": "true" }, hAsync("duet-icon", { class: "duet-breadrumbs-arrow", size: "auto", icon: actionArrowRightSmall.svg, margin: "none", color: "currentColor" }))), hAsync("li", { innerHTML: child.outerHTML }), hAsync("div", { class: "hide" }, hAsync("slot", null)))))))));
|
|
5945
|
-
}
|
|
5946
|
-
get element() { return getElement(this); }
|
|
5947
|
-
static get style() { return duetBreadcrumbsCss; }
|
|
5948
|
-
static get cmpMeta() { return {
|
|
5949
|
-
"$flags$": 9,
|
|
5950
|
-
"$tagName$": "duet-breadcrumbs",
|
|
5951
|
-
"$members$": {
|
|
5952
|
-
"theme": [1025],
|
|
5953
|
-
"children": [32]
|
|
5954
|
-
},
|
|
5955
|
-
"$listeners$": undefined,
|
|
5956
|
-
"$lazyBundleId$": "-",
|
|
5957
|
-
"$attrsToReflect$": []
|
|
5958
|
-
}; }
|
|
5959
|
-
}
|
|
5960
|
-
|
|
5961
|
-
const DuetStringsExternalDefaults = {
|
|
5962
|
-
fi: "Avautuu uuteen ikkunaan",
|
|
5963
|
-
sv: "Öppnas i nytt fönster",
|
|
5964
|
-
en: "Opens in a new window",
|
|
5965
|
-
};
|
|
5966
|
-
|
|
5967
|
-
const colorWarning = "rgb(247, 178, 40)";
|
|
5968
|
-
const colorGrayDarker = "rgb(101, 119, 135)";
|
|
5969
|
-
const colorGrayLighter = "rgb(245, 248, 250)";
|
|
5970
|
-
const colorCategoryHome = "rgb(211, 36, 131)";
|
|
5971
|
-
const colorPrimary = "rgb(0, 119, 179)";
|
|
5972
|
-
const colorCategoryVehicle = "rgb(54, 74, 129)";
|
|
5973
|
-
const colorSuccess = "rgb(0, 135, 90)";
|
|
5974
|
-
const colorCategoryFamily = "rgb(11, 114, 136)";
|
|
5975
|
-
const colorPrimaryLightest = "rgb(243, 249, 252)";
|
|
5976
|
-
const colorPrimaryLighter = "rgb(230, 242, 248)";
|
|
5977
|
-
const colorBrandBlue = "rgb(0, 161, 212)";
|
|
5978
|
-
const colorPrimaryDark = "rgb(0, 77, 128)";
|
|
5979
|
-
const colorGrayLightest = "rgb(255, 255, 255)";
|
|
5980
|
-
const colorCategoryFinance = "rgb(122, 1, 196)";
|
|
5981
|
-
const colorGrayDark = "rgb(144, 149, 153)";
|
|
5982
|
-
const colorGrayLight = "rgb(225, 227, 230)";
|
|
5983
|
-
const colorSecondary = "rgb(0, 41, 77)";
|
|
5984
|
-
const colorCategoryPet = "rgb(168, 1, 78)";
|
|
5985
|
-
const colorPrimaryLight = "rgb(205, 229, 241)";
|
|
5986
|
-
const colorCategoryTravel = "rgb(213, 66, 3)";
|
|
5987
|
-
const colorGray = "rgb(207, 210, 212)";
|
|
5988
|
-
const colorDanger = "rgb(222, 35, 98)";
|
|
5989
|
-
const colorGrayDarkerTurva = "rgb(68, 68, 69)";
|
|
5990
|
-
const colorGrayLighterTurva = "rgb(245, 245, 247)";
|
|
5991
|
-
const colorCategoryHomeTurva = "rgb(161, 10, 78)";
|
|
5992
|
-
const colorPrimaryTurva = "rgb(198, 12, 48)";
|
|
5993
|
-
const colorCategoryVehicleTurva = "rgb(23, 28, 58)";
|
|
5994
|
-
const colorSuccessTurva = "rgb(8, 135, 78)";
|
|
5995
|
-
const colorPrimaryLightestTurva = "rgb(252, 243, 244)";
|
|
5996
|
-
const colorCategoryFamilyTurva = "rgb(199, 12, 112)";
|
|
5997
|
-
const colorCategoryUnionTurva = "rgb(169, 69, 124)";
|
|
5998
|
-
const colorPrimaryLighterTurva = "rgb(249, 230, 234)";
|
|
5999
|
-
const colorPrimaryDarkTurva = "rgb(148, 9, 37)";
|
|
6000
|
-
const colorGrayLightestTurva = "rgb(255, 255, 255)";
|
|
6001
|
-
const colorGrayDarkTurva = "rgb(116, 116, 117)";
|
|
6002
|
-
const colorGrayLightTurva = "rgb(228, 228, 230)";
|
|
6003
|
-
const colorBrandGrayTurva = "rgb(178, 180, 179)";
|
|
6004
|
-
const colorSecondaryTurva = "rgb(23, 28, 58)";
|
|
6005
|
-
const colorPrimaryLightTurva = "rgb(244, 207, 214)";
|
|
6006
|
-
const colorCategoryTravelTurva = "rgb(9, 129, 148)";
|
|
6007
|
-
const colorGrayTurva = "rgb(207, 207, 209)";
|
|
6008
|
-
const colorDangerTurva = "rgb(224, 42, 13)";
|
|
6009
|
-
const colorWarningTurva = "rgb(250, 164, 15)";
|
|
6010
|
-
const colorData07 = "rgb(192, 101, 247)";
|
|
6011
|
-
const colorData08 = "rgb(0, 105, 191)";
|
|
6012
|
-
const colorData09 = "rgb(19, 120, 53)";
|
|
6013
|
-
const colorData10 = "rgb(179, 60, 24)";
|
|
6014
|
-
const colorData11 = "rgb(13, 163, 166)";
|
|
6015
|
-
const colorData01 = "rgb(122, 1, 196)";
|
|
6016
|
-
const colorData12 = "rgb(11, 114, 136)";
|
|
6017
|
-
const colorData02 = "rgb(0, 155, 204)";
|
|
6018
|
-
const colorData13 = "rgb(179, 137, 24)";
|
|
6019
|
-
const colorData03 = "rgb(27, 171, 75)";
|
|
6020
|
-
const colorData14 = "rgb(128, 98, 17)";
|
|
6021
|
-
const colorData04 = "rgb(255, 86, 34)";
|
|
6022
|
-
const colorData15 = "rgb(0, 41, 77)";
|
|
6023
|
-
const colorData05 = "rgb(245, 76, 154)";
|
|
6024
|
-
const colorData06 = "rgb(194, 21, 101)";
|
|
6025
|
-
const fontWeightExtraBold = "800";
|
|
6026
|
-
const letterSpacingHeading = "-0.01rem";
|
|
6027
|
-
const fontFamilyHeadingTurva = "'turva-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
6028
|
-
const fontFamilyTextTurva = "'turva-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
6029
|
-
const fontFamilyHeading = "'localtapiola-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
6030
|
-
const fontFamilyText = "'localtapiola-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
6031
|
-
const fontWeightBold = "700";
|
|
6032
|
-
const fontWeightNormal = "400";
|
|
6033
|
-
const fontWeightSemiBold = "600";
|
|
6034
|
-
const fontSizeXxxxLarge = "4.5rem";
|
|
6035
|
-
const fontSizeXxxLarge = "3rem";
|
|
6036
|
-
const fontSizeXxLarge = "2.25rem";
|
|
6037
|
-
const fontSizeXLarge = "1.5rem";
|
|
6038
|
-
const fontSizeLarge = "1.25rem";
|
|
6039
|
-
const fontSizeMedium = "1rem";
|
|
6040
|
-
const fontSizeSmall = "0.875rem";
|
|
6041
|
-
const fontSizeXSmall = "0.75rem";
|
|
6042
|
-
const radiusSharp = "0";
|
|
6043
|
-
const radiusDefault = "4px";
|
|
6044
|
-
const radiusCircle = "50%";
|
|
6045
|
-
const radiusPill = "20rem";
|
|
6046
|
-
const shadowTooltipTurva = "0 2px 10px 0 rgba(117, 117, 117, 0.13)";
|
|
6047
|
-
const shadowDefault = "0 2px 6px 0 rgba(0, 41, 77, 0.07)";
|
|
6048
|
-
const shadowTooltip = "0 2px 10px 0 rgba(0, 41, 77, 0.07)";
|
|
6049
|
-
const shadowCardTurva = "0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)";
|
|
6050
|
-
const shadowModal = "0 2px 20px 0 rgba(0, 0, 0, 0.2)";
|
|
6051
|
-
const shadowCard = "0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)";
|
|
6052
|
-
const shadowHoverTurva = "0 2px 10px 0 rgba(117, 117, 117, 0.15)";
|
|
6053
|
-
const shadowHover = "0 2px 10px 0 rgba(0, 41, 77, 0.1)";
|
|
6054
|
-
const shadowDefaultTurva = "0 2px 6px 0 rgba(117, 117, 117, 0.13)";
|
|
6055
|
-
const spaceXxSmall = "4px";
|
|
6056
|
-
const spaceLarge = "20px";
|
|
6057
|
-
const spaceXSmall = "8px";
|
|
6058
|
-
const spaceXxxSmall = "2px";
|
|
6059
|
-
const spaceSmall = "12px";
|
|
6060
|
-
const spaceMedium = "16px";
|
|
6061
|
-
const spaceXxLarge = "36px";
|
|
6062
|
-
const spaceXxxxLarge = "72px";
|
|
6063
|
-
const spaceXxxxxLarge = "94px";
|
|
6064
|
-
const spaceXxxLarge = "48px";
|
|
6065
|
-
const spaceXLarge = "28px";
|
|
6066
|
-
const sizeIconXxLarge = "48px";
|
|
6067
|
-
const sizeFormBorder = "1px";
|
|
6068
|
-
const sizeStepMedium = "40px";
|
|
6069
|
-
const sizeButtonMinWidth = "8rem";
|
|
6070
|
-
const sizeHeader = "4rem";
|
|
6071
|
-
const sizeIconXxxLarge = "72px";
|
|
6072
|
-
const sizeIconXLarge = "36px";
|
|
6073
|
-
const sizeIconXxSmall = "10px";
|
|
6074
|
-
const sizeStepSmall = "30px";
|
|
6075
|
-
const sizeNavigation = "3rem";
|
|
6076
|
-
const sizeIconLarge = "30px";
|
|
6077
|
-
const sizeLayoutMaxWidth = "1110px";
|
|
6078
|
-
const sizeTappableSquare = "48px";
|
|
6079
|
-
const sizeIconXSmall = "16px";
|
|
6080
|
-
const sizeIconXxxSmall = "7px";
|
|
6081
|
-
const sizeButtonBorder = "2px";
|
|
6082
|
-
const sizeButtonTinyBorder = "1px";
|
|
6083
|
-
const sizeIconMedium = "24px";
|
|
6084
|
-
const sizeIconSmall = "20px";
|
|
6085
|
-
const opacity85 = "0.85";
|
|
6086
|
-
const opacity75 = "0.75";
|
|
6087
|
-
const opacity50 = "0.50";
|
|
6088
|
-
const opacity30 = "0.30";
|
|
6089
|
-
const zIndexDropdown = "600";
|
|
6090
|
-
const zIndexSpinner = "800";
|
|
6091
|
-
const zIndexDefault = "1";
|
|
6092
|
-
const zIndexToast = "500";
|
|
6093
|
-
const zIndexPopup = "950";
|
|
6094
|
-
const zIndexModal = "900";
|
|
6095
|
-
const zIndexSticky = "300";
|
|
6096
|
-
const zIndexMasked = "100";
|
|
6097
|
-
const zIndexDeep = "-999999";
|
|
6098
|
-
const zIndexOverlay = "700";
|
|
6099
|
-
const zIndexMask = "200";
|
|
6100
|
-
const zIndexHeader = "400";
|
|
6101
|
-
const lineHeightMedium = "1.5";
|
|
6102
|
-
const lineHeightSmall = "1.25";
|
|
6103
|
-
const lineHeightXSmall = "1.1";
|
|
6104
|
-
const transitionQuickly = "300ms ease";
|
|
6105
|
-
const transitionSlowly = "600ms ease";
|
|
6106
|
-
const mediaQueryXxSmall = "'(max-width: 22.5em)'";
|
|
6107
|
-
const mediaQueryXSmall = "'(max-width: 35.9375em)'";
|
|
6108
|
-
const mediaQuerySmall = "'(min-width: 36em)'";
|
|
6109
|
-
const mediaQueryMedium = "'(min-width: 48em)'";
|
|
6110
|
-
const mediaQueryLarge = "'(min-width: 62em)'";
|
|
6111
|
-
const mediaQueryXLarge = "'(min-width: 64.0625em)'";
|
|
6112
|
-
const mediaQueryXxLarge = "'(min-width: 76.25em)'";
|
|
6113
|
-
const mediaQueryXxxLarge = "'(min-width: 106.25em)'";
|
|
6114
|
-
|
|
6115
|
-
var tokens$2 = /*#__PURE__*/Object.freeze({
|
|
6116
|
-
__proto__: null,
|
|
6117
|
-
colorWarning: colorWarning,
|
|
6118
|
-
colorGrayDarker: colorGrayDarker,
|
|
6119
|
-
colorGrayLighter: colorGrayLighter,
|
|
6120
|
-
colorCategoryHome: colorCategoryHome,
|
|
6121
|
-
colorPrimary: colorPrimary,
|
|
6122
|
-
colorCategoryVehicle: colorCategoryVehicle,
|
|
6123
|
-
colorSuccess: colorSuccess,
|
|
6124
|
-
colorCategoryFamily: colorCategoryFamily,
|
|
6125
|
-
colorPrimaryLightest: colorPrimaryLightest,
|
|
6126
|
-
colorPrimaryLighter: colorPrimaryLighter,
|
|
6127
|
-
colorBrandBlue: colorBrandBlue,
|
|
6128
|
-
colorPrimaryDark: colorPrimaryDark,
|
|
6129
|
-
colorGrayLightest: colorGrayLightest,
|
|
6130
|
-
colorCategoryFinance: colorCategoryFinance,
|
|
6131
|
-
colorGrayDark: colorGrayDark,
|
|
6132
|
-
colorGrayLight: colorGrayLight,
|
|
6133
|
-
colorSecondary: colorSecondary,
|
|
6134
|
-
colorCategoryPet: colorCategoryPet,
|
|
6135
|
-
colorPrimaryLight: colorPrimaryLight,
|
|
6136
|
-
colorCategoryTravel: colorCategoryTravel,
|
|
6137
|
-
colorGray: colorGray,
|
|
6138
|
-
colorDanger: colorDanger,
|
|
6139
|
-
colorGrayDarkerTurva: colorGrayDarkerTurva,
|
|
6140
|
-
colorGrayLighterTurva: colorGrayLighterTurva,
|
|
6141
|
-
colorCategoryHomeTurva: colorCategoryHomeTurva,
|
|
6142
|
-
colorPrimaryTurva: colorPrimaryTurva,
|
|
6143
|
-
colorCategoryVehicleTurva: colorCategoryVehicleTurva,
|
|
6144
|
-
colorSuccessTurva: colorSuccessTurva,
|
|
6145
|
-
colorPrimaryLightestTurva: colorPrimaryLightestTurva,
|
|
6146
|
-
colorCategoryFamilyTurva: colorCategoryFamilyTurva,
|
|
6147
|
-
colorCategoryUnionTurva: colorCategoryUnionTurva,
|
|
6148
|
-
colorPrimaryLighterTurva: colorPrimaryLighterTurva,
|
|
6149
|
-
colorPrimaryDarkTurva: colorPrimaryDarkTurva,
|
|
6150
|
-
colorGrayLightestTurva: colorGrayLightestTurva,
|
|
6151
|
-
colorGrayDarkTurva: colorGrayDarkTurva,
|
|
6152
|
-
colorGrayLightTurva: colorGrayLightTurva,
|
|
6153
|
-
colorBrandGrayTurva: colorBrandGrayTurva,
|
|
6154
|
-
colorSecondaryTurva: colorSecondaryTurva,
|
|
6155
|
-
colorPrimaryLightTurva: colorPrimaryLightTurva,
|
|
6156
|
-
colorCategoryTravelTurva: colorCategoryTravelTurva,
|
|
6157
|
-
colorGrayTurva: colorGrayTurva,
|
|
6158
|
-
colorDangerTurva: colorDangerTurva,
|
|
6159
|
-
colorWarningTurva: colorWarningTurva,
|
|
6160
|
-
colorData07: colorData07,
|
|
6161
|
-
colorData08: colorData08,
|
|
6162
|
-
colorData09: colorData09,
|
|
6163
|
-
colorData10: colorData10,
|
|
6164
|
-
colorData11: colorData11,
|
|
6165
|
-
colorData01: colorData01,
|
|
6166
|
-
colorData12: colorData12,
|
|
6167
|
-
colorData02: colorData02,
|
|
6168
|
-
colorData13: colorData13,
|
|
6169
|
-
colorData03: colorData03,
|
|
6170
|
-
colorData14: colorData14,
|
|
6171
|
-
colorData04: colorData04,
|
|
6172
|
-
colorData15: colorData15,
|
|
6173
|
-
colorData05: colorData05,
|
|
6174
|
-
colorData06: colorData06,
|
|
6175
|
-
fontWeightExtraBold: fontWeightExtraBold,
|
|
6176
|
-
letterSpacingHeading: letterSpacingHeading,
|
|
6177
|
-
fontFamilyHeadingTurva: fontFamilyHeadingTurva,
|
|
6178
|
-
fontFamilyTextTurva: fontFamilyTextTurva,
|
|
6179
|
-
fontFamilyHeading: fontFamilyHeading,
|
|
6180
|
-
fontFamilyText: fontFamilyText,
|
|
6181
|
-
fontWeightBold: fontWeightBold,
|
|
6182
|
-
fontWeightNormal: fontWeightNormal,
|
|
6183
|
-
fontWeightSemiBold: fontWeightSemiBold,
|
|
6184
|
-
fontSizeXxxxLarge: fontSizeXxxxLarge,
|
|
6185
|
-
fontSizeXxxLarge: fontSizeXxxLarge,
|
|
6186
|
-
fontSizeXxLarge: fontSizeXxLarge,
|
|
6187
|
-
fontSizeXLarge: fontSizeXLarge,
|
|
6188
|
-
fontSizeLarge: fontSizeLarge,
|
|
6189
|
-
fontSizeMedium: fontSizeMedium,
|
|
6190
|
-
fontSizeSmall: fontSizeSmall,
|
|
6191
|
-
fontSizeXSmall: fontSizeXSmall,
|
|
6192
|
-
radiusSharp: radiusSharp,
|
|
6193
|
-
radiusDefault: radiusDefault,
|
|
6194
|
-
radiusCircle: radiusCircle,
|
|
6195
|
-
radiusPill: radiusPill,
|
|
6196
|
-
shadowTooltipTurva: shadowTooltipTurva,
|
|
6197
|
-
shadowDefault: shadowDefault,
|
|
6198
|
-
shadowTooltip: shadowTooltip,
|
|
6199
|
-
shadowCardTurva: shadowCardTurva,
|
|
6200
|
-
shadowModal: shadowModal,
|
|
6201
|
-
shadowCard: shadowCard,
|
|
6202
|
-
shadowHoverTurva: shadowHoverTurva,
|
|
6203
|
-
shadowHover: shadowHover,
|
|
6204
|
-
shadowDefaultTurva: shadowDefaultTurva,
|
|
6205
|
-
spaceXxSmall: spaceXxSmall,
|
|
6206
|
-
spaceLarge: spaceLarge,
|
|
6207
|
-
spaceXSmall: spaceXSmall,
|
|
6208
|
-
spaceXxxSmall: spaceXxxSmall,
|
|
6209
|
-
spaceSmall: spaceSmall,
|
|
6210
|
-
spaceMedium: spaceMedium,
|
|
6211
|
-
spaceXxLarge: spaceXxLarge,
|
|
6212
|
-
spaceXxxxLarge: spaceXxxxLarge,
|
|
6213
|
-
spaceXxxxxLarge: spaceXxxxxLarge,
|
|
6214
|
-
spaceXxxLarge: spaceXxxLarge,
|
|
6215
|
-
spaceXLarge: spaceXLarge,
|
|
6216
|
-
sizeIconXxLarge: sizeIconXxLarge,
|
|
6217
|
-
sizeFormBorder: sizeFormBorder,
|
|
6218
|
-
sizeStepMedium: sizeStepMedium,
|
|
6219
|
-
sizeButtonMinWidth: sizeButtonMinWidth,
|
|
6220
|
-
sizeHeader: sizeHeader,
|
|
6221
|
-
sizeIconXxxLarge: sizeIconXxxLarge,
|
|
6222
|
-
sizeIconXLarge: sizeIconXLarge,
|
|
6223
|
-
sizeIconXxSmall: sizeIconXxSmall,
|
|
6224
|
-
sizeStepSmall: sizeStepSmall,
|
|
6225
|
-
sizeNavigation: sizeNavigation,
|
|
6226
|
-
sizeIconLarge: sizeIconLarge,
|
|
6227
|
-
sizeLayoutMaxWidth: sizeLayoutMaxWidth,
|
|
6228
|
-
sizeTappableSquare: sizeTappableSquare,
|
|
6229
|
-
sizeIconXSmall: sizeIconXSmall,
|
|
6230
|
-
sizeIconXxxSmall: sizeIconXxxSmall,
|
|
6231
|
-
sizeButtonBorder: sizeButtonBorder,
|
|
6232
|
-
sizeButtonTinyBorder: sizeButtonTinyBorder,
|
|
6233
|
-
sizeIconMedium: sizeIconMedium,
|
|
6234
|
-
sizeIconSmall: sizeIconSmall,
|
|
6235
|
-
opacity85: opacity85,
|
|
6236
|
-
opacity75: opacity75,
|
|
6237
|
-
opacity50: opacity50,
|
|
6238
|
-
opacity30: opacity30,
|
|
6239
|
-
zIndexDropdown: zIndexDropdown,
|
|
6240
|
-
zIndexSpinner: zIndexSpinner,
|
|
6241
|
-
zIndexDefault: zIndexDefault,
|
|
6242
|
-
zIndexToast: zIndexToast,
|
|
6243
|
-
zIndexPopup: zIndexPopup,
|
|
6244
|
-
zIndexModal: zIndexModal,
|
|
6245
|
-
zIndexSticky: zIndexSticky,
|
|
6246
|
-
zIndexMasked: zIndexMasked,
|
|
6247
|
-
zIndexDeep: zIndexDeep,
|
|
6248
|
-
zIndexOverlay: zIndexOverlay,
|
|
6249
|
-
zIndexMask: zIndexMask,
|
|
6250
|
-
zIndexHeader: zIndexHeader,
|
|
6251
|
-
lineHeightMedium: lineHeightMedium,
|
|
6252
|
-
lineHeightSmall: lineHeightSmall,
|
|
6253
|
-
lineHeightXSmall: lineHeightXSmall,
|
|
6254
|
-
transitionQuickly: transitionQuickly,
|
|
6255
|
-
transitionSlowly: transitionSlowly,
|
|
6256
|
-
mediaQueryXxSmall: mediaQueryXxSmall,
|
|
6257
|
-
mediaQueryXSmall: mediaQueryXSmall,
|
|
6258
|
-
mediaQuerySmall: mediaQuerySmall,
|
|
6259
|
-
mediaQueryMedium: mediaQueryMedium,
|
|
6260
|
-
mediaQueryLarge: mediaQueryLarge,
|
|
6261
|
-
mediaQueryXLarge: mediaQueryXLarge,
|
|
6262
|
-
mediaQueryXxLarge: mediaQueryXxLarge,
|
|
6263
|
-
mediaQueryXxxLarge: mediaQueryXxxLarge
|
|
6264
|
-
});
|
|
6265
|
-
|
|
6266
|
-
const allowedThemes = ["turva"];
|
|
6267
|
-
function isDashCase(str) {
|
|
6268
|
-
const dash = str.includes("-");
|
|
6269
|
-
const barredString = str.includes(" ") || str.includes("_");
|
|
6270
|
-
const barredStartingString = str.charAt(0) === "-";
|
|
6271
|
-
return dash && !barredString && !barredStartingString;
|
|
6272
|
-
}
|
|
6273
|
-
function capitalize(str = "") {
|
|
6274
|
-
return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
|
|
6275
|
-
}
|
|
6276
|
-
function lowerCaseFirst(str = "") {
|
|
6277
|
-
return `${str.charAt(0).toLowerCase()}${str.slice(1)}`;
|
|
6278
|
-
}
|
|
6279
|
-
function camelize(str = "") {
|
|
6280
|
-
const arr = str.split("-");
|
|
6281
|
-
//loop through each element of the array and capitalize the first letter.'
|
|
6282
|
-
arr.forEach((string, index) => {
|
|
6283
|
-
arr[index] = capitalize(string);
|
|
6284
|
-
});
|
|
6285
|
-
return arr.join("");
|
|
6286
|
-
}
|
|
6287
|
-
function getTheme(theme = "") {
|
|
6288
|
-
if (allowedThemes.includes(theme.toLowerCase())) {
|
|
6289
|
-
return theme.toLowerCase();
|
|
6290
|
-
}
|
|
6291
|
-
return "";
|
|
6292
|
-
}
|
|
6293
|
-
function hasColor(str = "") {
|
|
6294
|
-
return str.indexOf("Color") === 0 || str.indexOf("color") === 0;
|
|
6295
|
-
}
|
|
6296
|
-
function addColor(str = "") {
|
|
6297
|
-
if (str && !isDashCase(str) && !hasColor(str)) {
|
|
6298
|
-
return `color${capitalize(str)}`;
|
|
6299
|
-
}
|
|
6300
|
-
return str;
|
|
6301
|
-
}
|
|
6302
|
-
function addTheme(str, theme) {
|
|
6303
|
-
const hasTheme = getTheme(theme).length;
|
|
6304
|
-
if (hasTheme && str.indexOf(theme) === -1) {
|
|
6305
|
-
return `${str}${capitalize(theme)}`;
|
|
6306
|
-
}
|
|
6307
|
-
return str;
|
|
6308
|
-
}
|
|
6309
|
-
function getColorByName(name, theme = "") {
|
|
6310
|
-
if (!name) {
|
|
6311
|
-
return undefined;
|
|
6312
|
-
}
|
|
6313
|
-
const defaultColor = convertToColorName(name);
|
|
6314
|
-
const themedColor = convertToColorName(name, theme);
|
|
6315
|
-
// lets just try to get the color first to save some cycles
|
|
6316
|
-
let resolvedToken = tokens$2[themedColor];
|
|
6317
|
-
if (!resolvedToken) {
|
|
6318
|
-
resolvedToken = tokens$2[defaultColor];
|
|
6527
|
+
connectedCallback() {
|
|
6528
|
+
{
|
|
6529
|
+
return;
|
|
6530
|
+
}
|
|
6319
6531
|
}
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
const dash = isDashCase(name);
|
|
6325
|
-
if (dash) {
|
|
6326
|
-
colorResolution = camelize(colorResolution);
|
|
6532
|
+
disconnectedCallback() {
|
|
6533
|
+
{
|
|
6534
|
+
return;
|
|
6535
|
+
}
|
|
6327
6536
|
}
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6537
|
+
/**
|
|
6538
|
+
* render() function
|
|
6539
|
+
* Always the last one in the class.
|
|
6540
|
+
*/
|
|
6541
|
+
render() {
|
|
6542
|
+
return (hAsync(Host, null, hAsync("nav", { "aria-label": this.breadcrumbsAriaLabel, class: {
|
|
6543
|
+
"duet-breadcrumbs": true,
|
|
6544
|
+
"duet-theme-turva": this.theme === "turva",
|
|
6545
|
+
} }, hAsync("ol", null, this.children.map((child, index) => (hAsync(Fragment, null, index > 0 && (hAsync("li", { "aria-hidden": "true" }, hAsync("duet-icon", { class: "duet-breadrumbs-arrow", size: "auto", icon: actionArrowRightSmall.svg, margin: "none", color: "currentColor" }))), hAsync("li", { innerHTML: child.outerHTML }), hAsync("div", { class: "hide" }, hAsync("slot", null)))))))));
|
|
6546
|
+
}
|
|
6547
|
+
get element() { return getElement(this); }
|
|
6548
|
+
static get style() { return duetBreadcrumbsCss; }
|
|
6549
|
+
static get cmpMeta() { return {
|
|
6550
|
+
"$flags$": 9,
|
|
6551
|
+
"$tagName$": "duet-breadcrumbs",
|
|
6552
|
+
"$members$": {
|
|
6553
|
+
"theme": [1025],
|
|
6554
|
+
"children": [32]
|
|
6555
|
+
},
|
|
6556
|
+
"$listeners$": undefined,
|
|
6557
|
+
"$lazyBundleId$": "-",
|
|
6558
|
+
"$attrsToReflect$": []
|
|
6559
|
+
}; }
|
|
6333
6560
|
}
|
|
6334
6561
|
|
|
6335
|
-
const duetButtonCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-button,*.sc-duet-button::after,*.sc-duet-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-button-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;position:relative;z-index:1;display:inline-flex;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}/*!@:host:last-child, :host:last-of-type*/.sc-duet-button-h:last-child,.sc-duet-button-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){/*!@:host*/.sc-duet-button-h{width:100%}}/*!@:host(.duet-small)*/.duet-small.sc-duet-button-h{margin-right:2px !important;margin-bottom:8px !important}/*!@:host(.duet-small):last-child, :host(.duet-small):last-of-type*/.duet-small.sc-duet-button-h:last-child,.duet-small.sc-duet-button-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){/*!@:host(.duet-small)*/.duet-small.sc-duet-button-h{width:auto}}/*!@:host(.duet-expand)*/.duet-expand.sc-duet-button-h{width:100% !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-button-h{margin:0 !important}/*!@:host(.duet-fixed)*/.duet-fixed.sc-duet-button-h{width:auto !important}/*!@:host(:last-child)*/.sc-duet-button-h:last-child{margin-right:0 !important}/*!@.duet-button-container*/.duet-button-container.sc-duet-button{position:relative;width:100%}/*!@.duet-button*/.duet-button.sc-duet-button{padding:14px 27px 15px !important;-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;min-width:8rem;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#0077b3 !important;text-align:center;text-decoration:none;cursor:pointer;background:transparent;border-style:solid;border-width:2px;border-radius:20rem;transition:background-color 300ms ease, color 300ms ease, border 300ms ease, box-shadow 300ms ease}/*!@.duet-button.duet-p-0*/.duet-button.duet-p-0.sc-duet-button{padding:0 !important}/*!@.duet-button.duet-m-0*/.duet-button.duet-m-0.sc-duet-button{margin:0 !important}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only)*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only){padding:9px 19px 10px !important;min-width:5.3333333333rem;font-size:0.875rem}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only).icon{padding-left:48px !important}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}/*!@.duet-theme-turva .duet-button*/.duet-theme-turva.sc-duet-button .duet-button.sc-duet-button{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30 !important}/*!@.duet-button .duet-button-contents*/.duet-button.sc-duet-button .duet-button-contents.sc-duet-button{position:relative;display:inline-block;margin:0 auto;pointer-events:none}/*!@.duet-button.duet-no-wrap*/.duet-button.duet-no-wrap.sc-duet-button{white-space:nowrap}/*!@.duet-button.icon*/.duet-button.icon.sc-duet-button{padding-left:52px !important}/*!@.duet-button.icon-right*/.duet-button.icon-right.sc-duet-button{padding-right:52px !important;padding-left:28px !important}/*!@.duet-button svg*/.duet-button.sc-duet-button svg.sc-duet-button{width:100%;min-width:100%;fill:currentColor}/*!@.duet-button .duet-button-icon*/.duet-button.sc-duet-button .duet-button-icon.sc-duet-button{position:absolute;top:50%;left:-28px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 !important;transform:translateY(-50%)}/*!@.duet-button .duet-button-icon duet-icon*/.duet-button.sc-duet-button .duet-button-icon.sc-duet-button duet-icon.sc-duet-button{width:16px;height:16px}/*!@.duet-button .duet-button-icon.right*/.duet-button.sc-duet-button .duet-button-icon.right.sc-duet-button{right:-28px;left:auto}/*!@.duet-button .duet-button-icon.large*/.duet-button.sc-duet-button .duet-button-icon.large.sc-duet-button{left:-32px;width:20px;height:20px}/*!@.duet-button .duet-button-icon.large duet-icon*/.duet-button.sc-duet-button .duet-button-icon.large.sc-duet-button duet-icon.sc-duet-button{width:20px;height:20px}/*!@.duet-button .duet-button-icon.large.right*/.duet-button.sc-duet-button .duet-button-icon.large.right.sc-duet-button{right:-32px;left:auto}/*!@.duet-button .duet-button-icon.medium-small*/.duet-button.sc-duet-button .duet-button-icon.medium-small.sc-duet-button{left:-16px;width:10px;height:10px;padding-top:1px}/*!@.duet-button .duet-button-icon.medium-small duet-icon*/.duet-button.sc-duet-button .duet-button-icon.medium-small.sc-duet-button duet-icon.sc-duet-button{width:10px;height:10px}/*!@.duet-button .duet-button-icon.medium-small.right*/.duet-button.sc-duet-button .duet-button-icon.medium-small.right.sc-duet-button{right:-16px;left:auto}/*!@.duet-button .duet-button-icon.small*/.duet-button.sc-duet-button .duet-button-icon.small.sc-duet-button{left:-16px;width:7px;height:7px}/*!@.duet-button .duet-button-icon.small duet-icon*/.duet-button.sc-duet-button .duet-button-icon.small.sc-duet-button duet-icon.sc-duet-button{width:7px;height:7px}/*!@.duet-button .duet-button-icon.small.right*/.duet-button.sc-duet-button .duet-button-icon.small.right.sc-duet-button{right:-16px;left:auto}/*!@.duet-button:focus*/.duet-button.sc-duet-button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@.duet-theme-turva .duet-button:focus*/.duet-theme-turva.sc-duet-button .duet-button.sc-duet-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-button:active*/.duet-button.sc-duet-button:active{opacity:0.75;transition:none}/*!@.duet-button.default*/.duet-button.default.sc-duet-button{border-color:#e1e3e6}/*!@.duet-theme-turva .duet-button.default*/.duet-theme-turva.sc-duet-button .duet-button.default.sc-duet-button{color:#c60c30 !important;border-color:#e4e4e6}/*!@.duet-button.default:hover*/.duet-button.default.sc-duet-button:hover{border-color:#0077b3}/*!@.duet-theme-turva .duet-button.default:hover*/.duet-theme-turva.sc-duet-button .duet-button.default.sc-duet-button:hover{border-color:#c60c30}/*!@.duet-button.default.duet-button-negative*/.duet-button.default.duet-button-negative.sc-duet-button{background-color:white}/*!@.duet-theme-turva .duet-button.default.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.default.duet-button-negative.sc-duet-button{background-color:#e4e4e6 !important}/*!@.duet-button.default.duet-button-negative:hover*/.duet-button.default.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.default.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.default.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.primary*/.duet-button.primary.sc-duet-button{color:white !important;background:#0077b3;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.primary*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button{color:white !important;background:#c60c30;border-color:#c60c30}/*!@.duet-button.primary:hover*/.duet-button.primary.sc-duet-button:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}/*!@.duet-theme-turva .duet-button.primary:hover*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button:hover{background:#940925;border-color:#940925}/*!@.duet-button.primary:focus*/.duet-button.primary.sc-duet-button:focus{outline:0;box-shadow:0 0 0 1px white, 0 0 0 4px rgba(0, 119, 179, 0.75)}/*!@.duet-theme-turva .duet-button.primary:focus*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button:focus{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}/*!@.duet-button.secondary*/.duet-button.secondary.sc-duet-button{color:#00294d !important;background:transparent;border-color:#00294d}/*!@.duet-theme-turva .duet-button.secondary*/.duet-theme-turva.sc-duet-button .duet-button.secondary.sc-duet-button{color:#171c3a !important;border-color:#171c3a}/*!@.duet-button.secondary:hover*/.duet-button.secondary.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.secondary:hover*/.duet-theme-turva.sc-duet-button .duet-button.secondary.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.secondary.duet-button-negative*/.duet-button.secondary.duet-button-negative.sc-duet-button{color:#e1e3e6 !important;border-color:white}/*!@.duet-theme-turva .duet-button.secondary.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.secondary.duet-button-negative.sc-duet-button{color:#e4e4e6 !important}/*!@.duet-button.secondary.duet-button-negative:hover*/.duet-button.secondary.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.secondary.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.secondary.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.negative*/.duet-button.negative.sc-duet-button{color:#00294d !important;background:white;border-color:white}/*!@.duet-theme-turva .duet-button.negative*/.duet-theme-turva.sc-duet-button .duet-button.negative.sc-duet-button{color:#171c3a !important}/*!@.duet-button.negative:hover*/.duet-button.negative.sc-duet-button:hover{color:white !important;background:transparent;border-color:white}/*!@.duet-button.negative:focus*/.duet-button.negative.sc-duet-button:focus{outline:0;box-shadow:0 0 0 1px #00294d, 0 0 0 4px rgba(255, 255, 255, 0.7)}/*!@.duet-theme-turva .duet-button.negative:focus*/.duet-theme-turva.sc-duet-button .duet-button.negative.sc-duet-button:focus{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}/*!@.duet-button.destructive-primary*/.duet-button.destructive-primary.sc-duet-button{color:white !important;background:#de2362;border-color:#de2362}/*!@.duet-theme-turva .duet-button.destructive-primary*/.duet-theme-turva.sc-duet-button .duet-button.destructive-primary.sc-duet-button{color:white !important;background:#e02a0d;border-color:#e02a0d}/*!@.duet-button.destructive-primary:hover*/.duet-button.destructive-primary.sc-duet-button:hover{background:#b21c4e;border-color:#b21c4e;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}/*!@.duet-theme-turva .duet-button.destructive-primary:hover*/.duet-theme-turva.sc-duet-button .duet-button.destructive-primary.sc-duet-button:hover{background:#b3220a}/*!@.duet-button.destructive, .duet-button.destructive-secondary*/.duet-button.destructive.sc-duet-button,.duet-button.destructive-secondary.sc-duet-button{color:#de2362 !important;background:white;border-color:#de2362}/*!@.duet-theme-turva .duet-button.destructive, .duet-theme-turva .duet-button.destructive-secondary*/.duet-theme-turva.sc-duet-button .duet-button.destructive.sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button.destructive-secondary.sc-duet-button{color:#e02a0d !important;background:white;border-color:#e02a0d}/*!@.duet-button.destructive:hover, .duet-button.destructive-secondary:hover*/.duet-button.destructive.sc-duet-button:hover,.duet-button.destructive-secondary.sc-duet-button:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}/*!@.duet-theme-turva .duet-button.destructive:hover, .duet-theme-turva .duet-button.destructive-secondary:hover*/.duet-theme-turva.sc-duet-button .duet-button.destructive.sc-duet-button:hover,.duet-theme-turva.sc-duet-button .duet-button.destructive-secondary.sc-duet-button:hover{color:white !important;background:#b3220a;border-color:#b3220a}/*!@.duet-button.plain*/.duet-button.plain.sc-duet-button{min-width:48px;padding-right:0 !important;padding-left:0 !important;line-height:1.5;text-align:left;background:transparent;border:0;border-color:transparent;border-radius:4px}/*!@.duet-theme-turva .duet-button.plain*/.duet-theme-turva.sc-duet-button .duet-button.plain.sc-duet-button{color:#c60c30 !important;background:transparent;border-color:transparent}/*!@.duet-button.plain.icon*/.duet-button.plain.icon.sc-duet-button{padding-left:20px !important}/*!@.duet-button.plain.icon.icon-right*/.duet-button.plain.icon.icon-right.sc-duet-button{padding-right:20px !important;padding-left:0 !important}/*!@.duet-button.plain.icon.medium*/.duet-button.plain.icon.medium.sc-duet-button{padding-left:24px !important}/*!@.duet-button.plain.icon.medium.icon-right*/.duet-button.plain.icon.medium.icon-right.sc-duet-button{padding-right:24px !important;padding-left:0 !important}/*!@.duet-button.plain.icon.large*/.duet-button.plain.icon.large.sc-duet-button{padding-left:30px !important}/*!@.duet-button.plain.icon.large.icon-right*/.duet-button.plain.icon.large.icon-right.sc-duet-button{padding-right:30px !important;padding-left:0 !important}/*!@.duet-button.plain .duet-button-icon.left*/.duet-button.plain.sc-duet-button .duet-button-icon.left.sc-duet-button{left:-16.6666666667px !important}/*!@.duet-button.plain .duet-button-icon.left.medium*/.duet-button.plain.sc-duet-button .duet-button-icon.left.medium.sc-duet-button{left:-24px !important}/*!@.duet-button.plain .duet-button-icon.left.large*/.duet-button.plain.sc-duet-button .duet-button-icon.left.large.sc-duet-button{left:-30px !important}/*!@.duet-button.plain .duet-button-icon.right*/.duet-button.plain.sc-duet-button .duet-button-icon.right.sc-duet-button{right:-16.6666666667px !important}/*!@.duet-button.plain .duet-button-icon.right.medium*/.duet-button.plain.sc-duet-button .duet-button-icon.right.medium.sc-duet-button{right:-24px !important}/*!@.duet-button.plain .duet-button-icon.right.large*/.duet-button.plain.sc-duet-button .duet-button-icon.right.large.sc-duet-button{right:-30px !important}/*!@.duet-button.plain[disabled]*/.duet-button.plain[disabled].sc-duet-button{color:#657787 !important;background:transparent !important;border-color:transparent !important}/*!@.duet-theme-turva .duet-button.plain[disabled]*/.duet-theme-turva.sc-duet-button .duet-button.plain[disabled].sc-duet-button{color:transparent !important;background:transparent !important;border-color:#e4e4e6 !important}/*!@.duet-button.plain:hover*/.duet-button.plain.sc-duet-button:hover{color:#004d80 !important;background:transparent !important}/*!@.duet-theme-turva .duet-button.plain:hover*/.duet-theme-turva.sc-duet-button .duet-button.plain.sc-duet-button:hover{color:#940925 !important}/*!@.duet-button.plain.duet-button-negative*/.duet-button.plain.duet-button-negative.sc-duet-button{color:white !important}/*!@.duet-theme-turva .duet-button.plain.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.plain.duet-button-negative.sc-duet-button{color:#e4e4e6 !important}/*!@.duet-button.plain.duet-button-negative:hover*/.duet-button.plain.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important}/*!@.duet-theme-turva .duet-button.plain.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.plain.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important}/*!@.duet-button.duet-button-icon-only*/.duet-button.duet-button-icon-only.sc-duet-button{min-width:48px;min-height:48px;padding:0 !important}/*!@.duet-button.duet-button-icon-only .duet-button-contents*/.duet-button.duet-button-icon-only.sc-duet-button .duet-button-contents.sc-duet-button{position:static}/*!@.duet-button.duet-button-icon-only .duet-button-icon.left.large,\n.duet-button.duet-button-icon-only .duet-button-icon.left.medium,\n.duet-button.duet-button-icon-only .duet-button-icon.left.small*/.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.large.sc-duet-button,.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.medium.sc-duet-button,.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.small.sc-duet-button{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}/*!@.duet-button[disabled], .duet-button[disabled]:hover, .duet-button.duet-button-negative[disabled], .duet-button.duet-button-negative[disabled]:hover*/.duet-button[disabled].sc-duet-button,.duet-button[disabled].sc-duet-button:hover,.duet-button.duet-button-negative[disabled].sc-duet-button,.duet-button.duet-button-negative[disabled].sc-duet-button:hover{color:#657787 !important;background:#e1e3e6 !important;border-color:#e1e3e6 !important;box-shadow:none !important}/*!@.duet-theme-turva .duet-button[disabled], .duet-theme-turva .duet-button[disabled]:hover, .duet-theme-turva .duet-button.duet-button-negative [disabled], .duet-theme-turva .duet-button.duet-button-negative [disabled]:hover*/.duet-theme-turva.sc-duet-button .duet-button[disabled].sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button[disabled].sc-duet-button:hover,.duet-theme-turva.sc-duet-button .duet-button.duet-button-negative.sc-duet-button [disabled].sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button.duet-button-negative.sc-duet-button [disabled].sc-duet-button:hover{color:#747475 !important;background:#e4e4e6 !important;border-color:#e4e4e6 !important}/*!@.duet-button-is-loading.primary*/.duet-button-is-loading.primary.sc-duet-button{color:white}/*!@.duet-button-is-loading.default*/.duet-button-is-loading.default.sc-duet-button{color:#0077b3}/*!@.duet-button-is-loading.default.duet-theme-turva*/.duet-button-is-loading.default.duet-theme-turva.sc-duet-button{color:#c60c30}/*!@.duet-button-is-loading .duet-button-contents*/.duet-button-is-loading.sc-duet-button .duet-button-contents.sc-duet-button{visibility:hidden;opacity:0}";
|
|
6562
|
+
const DuetStringsExternalDefaults = {
|
|
6563
|
+
fi: "Avautuu uuteen ikkunaan",
|
|
6564
|
+
sv: "Öppnas i nytt fönster",
|
|
6565
|
+
en: "Opens in a new window",
|
|
6566
|
+
};
|
|
6567
|
+
|
|
6568
|
+
const duetButtonCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-button,*.sc-duet-button::after,*.sc-duet-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-button-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;position:relative;z-index:1;display:inline-flex;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}/*!@:host:last-child, :host:last-of-type*/.sc-duet-button-h:last-child,.sc-duet-button-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){/*!@:host*/.sc-duet-button-h{width:100%}}/*!@:host(.duet-small)*/.duet-small.sc-duet-button-h{margin-right:2px !important;margin-bottom:8px !important}/*!@:host(.duet-small):last-child, :host(.duet-small):last-of-type*/.duet-small.sc-duet-button-h:last-child,.duet-small.sc-duet-button-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){/*!@:host(.duet-small)*/.duet-small.sc-duet-button-h{width:auto}}/*!@:host(.duet-expand)*/.duet-expand.sc-duet-button-h{width:100% !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-button-h{margin:0 !important}/*!@:host(.duet-fixed)*/.duet-fixed.sc-duet-button-h{width:auto !important}/*!@:host(:last-child)*/.sc-duet-button-h:last-child{margin-right:0 !important}/*!@.duet-button-container*/.duet-button-container.sc-duet-button{position:relative;width:100%}/*!@.duet-button*/.duet-button.sc-duet-button{padding:14px 27px 15px !important;-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;min-width:8rem;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#0077b3 !important;text-align:center;text-decoration:none;cursor:pointer;background:transparent;border-style:solid;border-width:2px;border-radius:20rem;transition:background-color 300ms ease, color 300ms ease, border 300ms ease, box-shadow 300ms ease}/*!@.duet-button.duet-p-0*/.duet-button.duet-p-0.sc-duet-button{padding:0 !important}/*!@.duet-button.duet-m-0*/.duet-button.duet-m-0.sc-duet-button{margin:0 !important}/*!@.duet-button.duet-button-text-center*/.duet-button.duet-button-text-center.sc-duet-button{text-align:center !important}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only)*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only){padding:9px 19px 10px !important;min-width:5.3333333333rem;font-size:0.875rem}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only).icon{padding-left:48px !important}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}/*!@.duet-theme-turva .duet-button*/.duet-theme-turva.sc-duet-button .duet-button.sc-duet-button{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30 !important}/*!@.duet-button .duet-button-contents*/.duet-button.sc-duet-button .duet-button-contents.sc-duet-button{position:relative;display:inline-block;margin:0 auto;pointer-events:none}/*!@.duet-button.duet-no-wrap*/.duet-button.duet-no-wrap.sc-duet-button{white-space:nowrap}/*!@.duet-button.icon*/.duet-button.icon.sc-duet-button{padding-left:52px !important}/*!@.duet-button.icon-right*/.duet-button.icon-right.sc-duet-button{padding-right:52px !important;padding-left:28px !important}/*!@.duet-button svg*/.duet-button.sc-duet-button svg.sc-duet-button{width:100%;min-width:100%;fill:currentColor}/*!@.duet-button .duet-button-icon*/.duet-button.sc-duet-button .duet-button-icon.sc-duet-button{position:absolute;top:50%;left:-28px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 !important;transform:translateY(-50%)}/*!@.duet-button .duet-button-icon duet-icon*/.duet-button.sc-duet-button .duet-button-icon.sc-duet-button duet-icon.sc-duet-button{width:16px;height:16px}/*!@.duet-button .duet-button-icon.right*/.duet-button.sc-duet-button .duet-button-icon.right.sc-duet-button{right:-28px;left:auto}/*!@.duet-button .duet-button-icon.large*/.duet-button.sc-duet-button .duet-button-icon.large.sc-duet-button{left:-32px;width:20px;height:20px}/*!@.duet-button .duet-button-icon.large duet-icon*/.duet-button.sc-duet-button .duet-button-icon.large.sc-duet-button duet-icon.sc-duet-button{width:20px;height:20px}/*!@.duet-button .duet-button-icon.large.right*/.duet-button.sc-duet-button .duet-button-icon.large.right.sc-duet-button{right:-32px;left:auto}/*!@.duet-button .duet-button-icon.medium-small*/.duet-button.sc-duet-button .duet-button-icon.medium-small.sc-duet-button{left:-16px;width:10px;height:10px;padding-top:1px}/*!@.duet-button .duet-button-icon.medium-small duet-icon*/.duet-button.sc-duet-button .duet-button-icon.medium-small.sc-duet-button duet-icon.sc-duet-button{width:10px;height:10px}/*!@.duet-button .duet-button-icon.medium-small.right*/.duet-button.sc-duet-button .duet-button-icon.medium-small.right.sc-duet-button{right:-16px;left:auto}/*!@.duet-button .duet-button-icon.small*/.duet-button.sc-duet-button .duet-button-icon.small.sc-duet-button{left:-16px;width:7px;height:7px}/*!@.duet-button .duet-button-icon.small duet-icon*/.duet-button.sc-duet-button .duet-button-icon.small.sc-duet-button duet-icon.sc-duet-button{width:7px;height:7px}/*!@.duet-button .duet-button-icon.small.right*/.duet-button.sc-duet-button .duet-button-icon.small.right.sc-duet-button{right:-16px;left:auto}/*!@.duet-button:focus*/.duet-button.sc-duet-button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@.duet-theme-turva .duet-button:focus*/.duet-theme-turva.sc-duet-button .duet-button.sc-duet-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-button:active*/.duet-button.sc-duet-button:active{opacity:0.75;transition:none}/*!@.duet-button.default*/.duet-button.default.sc-duet-button{border-color:#e1e3e6}/*!@.duet-theme-turva .duet-button.default*/.duet-theme-turva.sc-duet-button .duet-button.default.sc-duet-button{color:#c60c30 !important;border-color:#e4e4e6}/*!@.duet-button.default:hover*/.duet-button.default.sc-duet-button:hover{border-color:#0077b3}/*!@.duet-theme-turva .duet-button.default:hover*/.duet-theme-turva.sc-duet-button .duet-button.default.sc-duet-button:hover{border-color:#c60c30}/*!@.duet-button.default.duet-button-negative*/.duet-button.default.duet-button-negative.sc-duet-button{background-color:white}/*!@.duet-theme-turva .duet-button.default.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.default.duet-button-negative.sc-duet-button{background-color:#e4e4e6 !important}/*!@.duet-button.default.duet-button-negative:hover*/.duet-button.default.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.default.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.default.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.primary*/.duet-button.primary.sc-duet-button{color:white !important;background:#0077b3;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.primary*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button{color:white !important;background:#c60c30;border-color:#c60c30}/*!@.duet-button.primary:hover*/.duet-button.primary.sc-duet-button:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}/*!@.duet-theme-turva .duet-button.primary:hover*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button:hover{background:#940925;border-color:#940925}/*!@.duet-button.primary:focus*/.duet-button.primary.sc-duet-button:focus{outline:0;box-shadow:0 0 0 1px white, 0 0 0 4px rgba(0, 119, 179, 0.75)}/*!@.duet-theme-turva .duet-button.primary:focus*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button:focus{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}/*!@.duet-button.secondary*/.duet-button.secondary.sc-duet-button{color:#00294d !important;background:transparent;border-color:#00294d}/*!@.duet-theme-turva .duet-button.secondary*/.duet-theme-turva.sc-duet-button .duet-button.secondary.sc-duet-button{color:#171c3a !important;border-color:#171c3a}/*!@.duet-button.secondary:hover*/.duet-button.secondary.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.secondary:hover*/.duet-theme-turva.sc-duet-button .duet-button.secondary.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.secondary.duet-button-negative*/.duet-button.secondary.duet-button-negative.sc-duet-button{color:#e1e3e6 !important;border-color:white}/*!@.duet-theme-turva .duet-button.secondary.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.secondary.duet-button-negative.sc-duet-button{color:#e4e4e6 !important}/*!@.duet-button.secondary.duet-button-negative:hover*/.duet-button.secondary.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.secondary.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.secondary.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.negative*/.duet-button.negative.sc-duet-button{color:#00294d !important;background:white;border-color:white}/*!@.duet-theme-turva .duet-button.negative*/.duet-theme-turva.sc-duet-button .duet-button.negative.sc-duet-button{color:#171c3a !important}/*!@.duet-button.negative:hover*/.duet-button.negative.sc-duet-button:hover{color:white !important;background:transparent;border-color:white}/*!@.duet-button.negative:focus*/.duet-button.negative.sc-duet-button:focus{outline:0;box-shadow:0 0 0 1px #00294d, 0 0 0 4px rgba(255, 255, 255, 0.7)}/*!@.duet-theme-turva .duet-button.negative:focus*/.duet-theme-turva.sc-duet-button .duet-button.negative.sc-duet-button:focus{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}/*!@.duet-button.destructive-primary*/.duet-button.destructive-primary.sc-duet-button{color:white !important;background:#de2362;border-color:#de2362}/*!@.duet-theme-turva .duet-button.destructive-primary*/.duet-theme-turva.sc-duet-button .duet-button.destructive-primary.sc-duet-button{color:white !important;background:#e02a0d;border-color:#e02a0d}/*!@.duet-button.destructive-primary:hover*/.duet-button.destructive-primary.sc-duet-button:hover{background:#b21c4e;border-color:#b21c4e;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}/*!@.duet-theme-turva .duet-button.destructive-primary:hover*/.duet-theme-turva.sc-duet-button .duet-button.destructive-primary.sc-duet-button:hover{background:#b3220a}/*!@.duet-button.destructive, .duet-button.destructive-secondary*/.duet-button.destructive.sc-duet-button,.duet-button.destructive-secondary.sc-duet-button{color:#de2362 !important;background:white;border-color:#de2362}/*!@.duet-theme-turva .duet-button.destructive, .duet-theme-turva .duet-button.destructive-secondary*/.duet-theme-turva.sc-duet-button .duet-button.destructive.sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button.destructive-secondary.sc-duet-button{color:#e02a0d !important;background:white;border-color:#e02a0d}/*!@.duet-button.destructive:hover, .duet-button.destructive-secondary:hover*/.duet-button.destructive.sc-duet-button:hover,.duet-button.destructive-secondary.sc-duet-button:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}/*!@.duet-theme-turva .duet-button.destructive:hover, .duet-theme-turva .duet-button.destructive-secondary:hover*/.duet-theme-turva.sc-duet-button .duet-button.destructive.sc-duet-button:hover,.duet-theme-turva.sc-duet-button .duet-button.destructive-secondary.sc-duet-button:hover{color:white !important;background:#b3220a;border-color:#b3220a}/*!@.duet-button.plain*/.duet-button.plain.sc-duet-button{min-width:48px;padding-right:0 !important;padding-left:0 !important;line-height:1.5;text-align:left;background:transparent;border:0;border-color:transparent;border-radius:4px}/*!@.duet-theme-turva .duet-button.plain*/.duet-theme-turva.sc-duet-button .duet-button.plain.sc-duet-button{color:#c60c30 !important;background:transparent;border-color:transparent}/*!@.duet-button.plain.icon*/.duet-button.plain.icon.sc-duet-button{padding-left:20px !important}/*!@.duet-button.plain.icon.icon-right*/.duet-button.plain.icon.icon-right.sc-duet-button{padding-right:20px !important;padding-left:0 !important}/*!@.duet-button.plain.icon.medium*/.duet-button.plain.icon.medium.sc-duet-button{padding-left:24px !important}/*!@.duet-button.plain.icon.medium.icon-right*/.duet-button.plain.icon.medium.icon-right.sc-duet-button{padding-right:24px !important;padding-left:0 !important}/*!@.duet-button.plain.icon.large*/.duet-button.plain.icon.large.sc-duet-button{padding-left:30px !important}/*!@.duet-button.plain.icon.large.icon-right*/.duet-button.plain.icon.large.icon-right.sc-duet-button{padding-right:30px !important;padding-left:0 !important}/*!@.duet-button.plain .duet-button-icon.left*/.duet-button.plain.sc-duet-button .duet-button-icon.left.sc-duet-button{left:-16.6666666667px !important}/*!@.duet-button.plain .duet-button-icon.left.medium*/.duet-button.plain.sc-duet-button .duet-button-icon.left.medium.sc-duet-button{left:-24px !important}/*!@.duet-button.plain .duet-button-icon.left.large*/.duet-button.plain.sc-duet-button .duet-button-icon.left.large.sc-duet-button{left:-30px !important}/*!@.duet-button.plain .duet-button-icon.right*/.duet-button.plain.sc-duet-button .duet-button-icon.right.sc-duet-button{right:-16.6666666667px !important}/*!@.duet-button.plain .duet-button-icon.right.medium*/.duet-button.plain.sc-duet-button .duet-button-icon.right.medium.sc-duet-button{right:-24px !important}/*!@.duet-button.plain .duet-button-icon.right.large*/.duet-button.plain.sc-duet-button .duet-button-icon.right.large.sc-duet-button{right:-30px !important}/*!@.duet-button.plain[disabled]*/.duet-button.plain[disabled].sc-duet-button{color:#657787 !important;background:transparent !important;border-color:transparent !important}/*!@.duet-theme-turva .duet-button.plain[disabled]*/.duet-theme-turva.sc-duet-button .duet-button.plain[disabled].sc-duet-button{color:transparent !important;background:transparent !important;border-color:#e4e4e6 !important}/*!@.duet-button.plain:hover*/.duet-button.plain.sc-duet-button:hover{color:#004d80 !important;background:transparent !important}/*!@.duet-theme-turva .duet-button.plain:hover*/.duet-theme-turva.sc-duet-button .duet-button.plain.sc-duet-button:hover{color:#940925 !important}/*!@.duet-button.plain.duet-button-negative*/.duet-button.plain.duet-button-negative.sc-duet-button{color:white !important}/*!@.duet-theme-turva .duet-button.plain.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.plain.duet-button-negative.sc-duet-button{color:#e4e4e6 !important}/*!@.duet-button.plain.duet-button-negative:hover*/.duet-button.plain.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important}/*!@.duet-theme-turva .duet-button.plain.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.plain.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important}/*!@.duet-button.duet-button-icon-only*/.duet-button.duet-button-icon-only.sc-duet-button{min-width:48px;min-height:48px;padding:0 !important}/*!@.duet-button.duet-button-icon-only .duet-button-contents*/.duet-button.duet-button-icon-only.sc-duet-button .duet-button-contents.sc-duet-button{position:static}/*!@.duet-button.duet-button-icon-only .duet-button-icon.left.large,\n.duet-button.duet-button-icon-only .duet-button-icon.left.medium,\n.duet-button.duet-button-icon-only .duet-button-icon.left.small*/.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.large.sc-duet-button,.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.medium.sc-duet-button,.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.small.sc-duet-button{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}/*!@.duet-button[disabled], .duet-button[disabled]:hover, .duet-button.duet-button-negative[disabled], .duet-button.duet-button-negative[disabled]:hover*/.duet-button[disabled].sc-duet-button,.duet-button[disabled].sc-duet-button:hover,.duet-button.duet-button-negative[disabled].sc-duet-button,.duet-button.duet-button-negative[disabled].sc-duet-button:hover{color:#657787 !important;background:#e1e3e6 !important;border-color:#e1e3e6 !important;box-shadow:none !important}/*!@.duet-theme-turva .duet-button[disabled], .duet-theme-turva .duet-button[disabled]:hover, .duet-theme-turva .duet-button.duet-button-negative [disabled], .duet-theme-turva .duet-button.duet-button-negative [disabled]:hover*/.duet-theme-turva.sc-duet-button .duet-button[disabled].sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button[disabled].sc-duet-button:hover,.duet-theme-turva.sc-duet-button .duet-button.duet-button-negative.sc-duet-button [disabled].sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button.duet-button-negative.sc-duet-button [disabled].sc-duet-button:hover{color:#747475 !important;background:#e4e4e6 !important;border-color:#e4e4e6 !important}/*!@.duet-button-is-loading.primary*/.duet-button-is-loading.primary.sc-duet-button{color:white}/*!@.duet-button-is-loading.default*/.duet-button-is-loading.default.sc-duet-button{color:#0077b3}/*!@.duet-button-is-loading.default.duet-theme-turva*/.duet-button-is-loading.default.duet-theme-turva.sc-duet-button{color:#c60c30}/*!@.duet-button-is-loading .duet-button-contents*/.duet-button-is-loading.sc-duet-button .duet-button-contents.sc-duet-button{visibility:hidden;opacity:0}";
|
|
6336
6569
|
|
|
6337
6570
|
class DuetButton {
|
|
6338
6571
|
constructor(hostRef) {
|
|
6339
6572
|
registerInstance(this, hostRef);
|
|
6340
6573
|
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
6341
6574
|
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
6575
|
+
/**
|
|
6576
|
+
* Use this property to add an aria-haspopup attribute to a button, if you are using it as a menu button.
|
|
6577
|
+
*/
|
|
6578
|
+
this.accessiblePopup = "false";
|
|
6342
6579
|
/**
|
|
6343
6580
|
* Loading state of the button
|
|
6344
6581
|
*/
|
|
@@ -6365,6 +6602,10 @@ class DuetButton {
|
|
|
6365
6602
|
* Controls the padding of the component.
|
|
6366
6603
|
*/
|
|
6367
6604
|
this.padding = "auto";
|
|
6605
|
+
/**
|
|
6606
|
+
* Centers the text of a button
|
|
6607
|
+
*/
|
|
6608
|
+
this.centerText = false;
|
|
6368
6609
|
/**
|
|
6369
6610
|
* Controls the text wrapping.
|
|
6370
6611
|
*/
|
|
@@ -6529,6 +6770,7 @@ class DuetButton {
|
|
|
6529
6770
|
"duet-button": true,
|
|
6530
6771
|
"duet-button-is-small": this.size === "small",
|
|
6531
6772
|
"duet-button-icon-only": this.iconOnly,
|
|
6773
|
+
"duet-button-text-center": this.centerText,
|
|
6532
6774
|
"duet-button-negative": this.negative || this.variation === "negative",
|
|
6533
6775
|
[this.variation]: true,
|
|
6534
6776
|
disabled: this.disabled,
|
|
@@ -6554,7 +6796,7 @@ class DuetButton {
|
|
|
6554
6796
|
"duet-theme-turva": this.theme === "turva",
|
|
6555
6797
|
"duet-button-negative": this.negative || this.variation === "negative",
|
|
6556
6798
|
[this.variation]: true,
|
|
6557
|
-
} }, this.url ? (hAsync("a", Object.assign({}, commonProps, { href: this.url, target: this.external ? "_blank" : "_self", rel: this.external ? "noopener" : undefined }), commonChildren, this.external && hAsync("duet-visually-hidden", null, ", ", this.accessibleLabelExternal))) : (hAsync("button", Object.assign({}, commonProps, { type: this.getButtonType(), disabled: this.disabled, name: this.name, value: this.value, "aria-pressed": this.accessiblePressed != null ? this.accessiblePressed.toString() : undefined }), commonChildren)), this.loading && hAsync("duet-spinner", { color: "currentColor" }))));
|
|
6799
|
+
} }, this.url ? (hAsync("a", Object.assign({}, commonProps, { href: this.url, target: this.external ? "_blank" : "_self", rel: this.external ? "noopener" : undefined }), commonChildren, this.external && hAsync("duet-visually-hidden", null, ", ", this.accessibleLabelExternal))) : (hAsync("button", Object.assign({}, commonProps, { type: this.getButtonType(), disabled: this.disabled, name: this.name, value: this.value, "aria-pressed": this.accessiblePressed != null ? this.accessiblePressed.toString() : undefined, "aria-haspopup": this.accessiblePopup != null ? this.accessiblePopup.toString() : undefined }), commonChildren)), this.loading && hAsync("duet-spinner", { color: "currentColor" }))));
|
|
6558
6800
|
}
|
|
6559
6801
|
get element() { return getElement(this); }
|
|
6560
6802
|
static get watchers() { return {
|
|
@@ -6570,6 +6812,7 @@ class DuetButton {
|
|
|
6570
6812
|
"$members$": {
|
|
6571
6813
|
"accessibleLabel": [1, "accessible-label"],
|
|
6572
6814
|
"accessibleControls": [1, "accessible-controls"],
|
|
6815
|
+
"accessiblePopup": [1, "accessible-popup"],
|
|
6573
6816
|
"accessibleActiveDescendant": [1, "accessible-active-descendant"],
|
|
6574
6817
|
"accessibleOwns": [1, "accessible-owns"],
|
|
6575
6818
|
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
@@ -6581,6 +6824,7 @@ class DuetButton {
|
|
|
6581
6824
|
"theme": [1025],
|
|
6582
6825
|
"margin": [1],
|
|
6583
6826
|
"padding": [1],
|
|
6827
|
+
"centerText": [4, "center-text"],
|
|
6584
6828
|
"wrapping": [1],
|
|
6585
6829
|
"expand": [4],
|
|
6586
6830
|
"fixed": [4],
|
|
@@ -6667,29 +6911,11 @@ class DuetCaption {
|
|
|
6667
6911
|
|
|
6668
6912
|
var actionArrowUp={"title":"action-arrow-up","tags":"action arrow up caret","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M.75 17.939a.752.752 0 0 1-.53-1.281L10.94 5.94c.283-.284.659-.44 1.059-.44.401 0 .777.156 1.06.438l10.721 10.72a.752.752 0 0 1-.53 1.281.743.743 0 0 1-.53-.22L12 7 1.28 17.719a.743.743 0 0 1-.53.22z\"/></svg>"};
|
|
6669
6913
|
|
|
6670
|
-
function chr4() {
|
|
6671
|
-
return Math.random().toString(16).slice(-4);
|
|
6672
|
-
}
|
|
6673
|
-
function createID(prefix) {
|
|
6674
|
-
return `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;
|
|
6675
|
-
}
|
|
6676
|
-
|
|
6677
|
-
const isArrowLeftKey = (e) => e.keyCode === 37;
|
|
6678
|
-
const isArrowUpKey = (e) => e.keyCode === 38;
|
|
6679
|
-
const isArrowRightKey = (e) => e.keyCode === 39;
|
|
6680
|
-
const isArrowDownKey = (e) => e.keyCode === 40;
|
|
6681
|
-
const isEscapeKey = (e) => e.key === "Escape" || e.key === "Esc" || e.keyCode === 27;
|
|
6682
|
-
const isBackspaceKey = (e) => e.keyCode === 8;
|
|
6683
|
-
const isSpaceKey = (e) => e.key === "Space" || e.keyCode === 32;
|
|
6684
|
-
const isQuestionKey = (e) => e.key === "?";
|
|
6685
|
-
const isEnterKey = (e) => e.key === "Enter" || e.keyCode === 13;
|
|
6686
|
-
const isKeyboardClick = (e) => isEnterKey(e) || isSpaceKey(e);
|
|
6687
|
-
|
|
6688
6914
|
const duetCardCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-card,*.sc-duet-card::after,*.sc-duet-card::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-card-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}/*!@:host(.duet-card-info)*/.duet-card-info.sc-duet-card-h{margin-bottom:16px !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-card-h{margin:0 !important}/*!@.duet-card*/.duet-card.sc-duet-card{padding:20px !important;position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:#00294d;text-decoration:none;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}/*!@.duet-card.duet-p-0*/.duet-card.duet-p-0.sc-duet-card{padding:0 !important}/*!@.duet-card.duet-m-0*/.duet-card.duet-m-0.sc-duet-card{margin:0 !important}/*!@.duet-card:focus*/.duet-card.sc-duet-card:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@.duet-theme-turva .duet-card:focus, .duet-card:focus.duet-theme-turva*/.duet-theme-turva.sc-duet-card .duet-card.sc-duet-card:focus,.duet-card.sc-duet-card:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 36em){/*!@.duet-card*/.duet-card.sc-duet-card{padding:28px !important}}/*!@.duet-card.duet-theme-turva*/.duet-card.duet-theme-turva.sc-duet-card{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}@media (min-width: 36em){/*!@.duet-card.x-small*/.duet-card.x-small.sc-duet-card{padding:20px !important}}@media (min-width: 36em){/*!@.duet-card.medium*/.duet-card.medium.sc-duet-card{padding:28px !important}}@media (min-width: 48em){/*!@.duet-card.medium*/.duet-card.medium.sc-duet-card{padding:36px !important}}@media (min-width: 36em){/*!@.duet-card.large*/.duet-card.large.sc-duet-card{padding:36px !important}}@media (min-width: 48em){/*!@.duet-card.large*/.duet-card.large.sc-duet-card{padding:48px !important}}@media (min-width: 36em){/*!@.duet-card.x-large*/.duet-card.x-large.sc-duet-card{padding:48px !important}}@media (min-width: 48em){/*!@.duet-card.x-large*/.duet-card.x-large.sc-duet-card{padding:72px !important}}/*!@.duet-card.duet-card-collapsed*/.duet-card.duet-card-collapsed.sc-duet-card{padding-bottom:0 !important}@media (min-width: 36em){/*!@.duet-card.duet-card-collapsed*/.duet-card.duet-card-collapsed.sc-duet-card{padding-bottom:0 !important}}/*!@.duet-card.info*/.duet-card.info.sc-duet-card{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}/*!@.duet-card.info.duet-theme-turva*/.duet-card.info.duet-theme-turva.sc-duet-card{background:rgba(23, 28, 58, 0.035) !important}/*!@.duet-card.plain*/.duet-card.plain.sc-duet-card{box-shadow:none}/*!@.duet-card.plain:not(.duet-card-has-bg)*/.duet-card.plain.sc-duet-card:not(.duet-card-has-bg){background:transparent !important}/*!@.duet-card-heading-grid*/.duet-card-heading-grid.sc-duet-card{display:flex;flex-direction:row}/*!@.duet-card-icon*/.duet-card-icon.sc-duet-card{align-self:center}/*!@.duet-card-heading-text*/.duet-card-heading-text.sc-duet-card{flex:1;word-break:break-word}/*!@.duet-card-secondary-heading*/.duet-card-secondary-heading.sc-duet-card{font-size:1rem;font-weight:600;word-break:break-word}/*!@.duet-card-secondary-heading--inline*/.duet-card-secondary-heading--inline.sc-duet-card{display:block;flex:1;align-self:flex-start;line-height:1.875;text-align:right}@media (max-width: 22.5em){/*!@.duet-card-secondary-heading--inline*/.duet-card-secondary-heading--inline.sc-duet-card{display:none}}/*!@.duet-card-secondary-heading--new-line*/.duet-card-secondary-heading--new-line.sc-duet-card{display:none}@media (max-width: 22.5em){/*!@.duet-card-secondary-heading--new-line*/.duet-card-secondary-heading--new-line.sc-duet-card{display:block}}/*!@.duet-card-heading*/.duet-card-heading.sc-duet-card{position:relative;display:block;padding:16px 20px;margin:-20px -20px 20px;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:800;color:#00294d;border-bottom:1px solid #e1e3e6}@media (min-width: 36em){/*!@.duet-card-heading*/.duet-card-heading.sc-duet-card{padding:15px 28px 16px !important;margin:-28px -28px 20px}}/*!@.duet-card-heading[role=button]*/.duet-card-heading[role=button].sc-duet-card{-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:4px;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;appearance:none}/*!@.duet-card-heading[role=button]:focus*/.duet-card-heading[role=button].sc-duet-card:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-card-heading[role=button]:focus*/.user-is-tabbing.sc-duet-card-h .duet-card-heading[role=button].sc-duet-card:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@:host(.user-is-tabbing) .duet-theme-turva .duet-card-heading[role=button]:focus*/.user-is-tabbing.sc-duet-card-h .duet-theme-turva.sc-duet-card .duet-card-heading[role=button].sc-duet-card:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-card-collapsed .duet-card-heading*/.duet-card-collapsed.sc-duet-card .duet-card-heading.sc-duet-card{margin-bottom:0 !important;border-bottom:0 !important}/*!@.duet-theme-turva .duet-card-heading*/.duet-theme-turva.sc-duet-card .duet-card-heading.sc-duet-card{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6}@media (min-width: 36em){/*!@.x-small .duet-card-heading*/.x-small.sc-duet-card .duet-card-heading.sc-duet-card{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){/*!@.x-small .duet-card-heading*/.x-small.sc-duet-card .duet-card-heading.sc-duet-card{padding:10px 20px 11px !important;margin:-20px -20px 20px}}/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{padding:19px 36px 20px !important;margin:-36px -36px 28px}}/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{padding:26px 48px 27px !important;margin:-48px -48px 36px}}/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{padding:39px 72px 40px !important;margin:-72px -72px 48px}}/*!@.none .duet-card-heading*/.none.sc-duet-card .duet-card-heading.sc-duet-card{padding:0 0 20px !important;margin:0 0 20px}/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:20px;margin:20px -20px -20px;font-size:0.875rem;line-height:1.25;background:#f5f8fa;border-bottom-right-radius:4px;border-bottom-left-radius:4px}/*!@.duet-theme-turva .duet-card-footer*/.duet-theme-turva.sc-duet-card .duet-card-footer.sc-duet-card{background:#f5f5f7}@media (min-width: 36em){/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){/*!@.x-small .duet-card-footer*/.x-small.sc-duet-card .duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){/*!@.medium .duet-card-footer*/.medium.sc-duet-card .duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){/*!@.medium .duet-card-footer*/.medium.sc-duet-card .duet-card-footer.sc-duet-card{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){/*!@.large .duet-card-footer*/.large.sc-duet-card .duet-card-footer.sc-duet-card{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){/*!@.large .duet-card-footer*/.large.sc-duet-card .duet-card-footer.sc-duet-card{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){/*!@.x-large .duet-card-footer*/.x-large.sc-duet-card .duet-card-footer.sc-duet-card{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){/*!@.x-large .duet-card-footer*/.x-large.sc-duet-card .duet-card-footer.sc-duet-card{padding:39px 72px 40px !important;margin:48px -72px -72px}}/*!@.none .duet-card-footer*/.none.sc-duet-card .duet-card-footer.sc-duet-card{padding:12px 0 !important;margin:20px 0 0}/*!@.duet-card-content*/.duet-card-content.sc-duet-card{width:100%}/*!@.duet-card-collapsed .duet-card-content*/.duet-card-collapsed.sc-duet-card .duet-card-content.sc-duet-card{display:none}/*!@.duet-card-caret*/.duet-card-caret.sc-duet-card{position:relative;top:6px;align-self:flex-start;transition:300ms ease}/*!@[aria-expanded=false] .duet-card-caret*/[aria-expanded=false].sc-duet-card .duet-card-caret.sc-duet-card{transform:rotate(-180deg)}/*!@.duet-card-image-mask*/.duet-card-image-mask.sc-duet-card{position:relative;width:calc(100% + 40px);margin:-20px 0 20px -20px;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){/*!@.small .duet-card-image-mask*/.small.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){/*!@.medium .duet-card-image-mask*/.medium.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){/*!@.medium .duet-card-image-mask*/.medium.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){/*!@.large .duet-card-image-mask*/.large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){/*!@.large .duet-card-image-mask*/.large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){/*!@.x-large .duet-card-image-mask*/.x-large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){/*!@.x-large .duet-card-image-mask*/.x-large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 144px);margin:-72px 0 36px -72px}}/*!@.none .duet-card-image-mask*/.none.sc-duet-card .duet-card-image-mask.sc-duet-card{width:100%;margin:0 0 20px}/*!@.duet-card-image*/.duet-card-image.sc-duet-card{display:block;width:102%;min-width:1px;max-width:102%;height:auto;min-height:1px;margin-left:-1%;transition:transform 300ms ease;transform:scale(1.0001)}/*!@a.duet-card*/a.duet-card.sc-duet-card{transition:box-shadow 300ms ease, background-position 300ms ease}/*!@a.duet-card:hover*/a.duet-card.sc-duet-card:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}/*!@a.duet-card:hover .duet-card-image*/a.duet-card.sc-duet-card:hover .duet-card-image.sc-duet-card{transform:scale(1.024)}/*!@.duet-theme-turva a.duet-card:hover*/.duet-theme-turva.sc-duet-card a.duet-card.sc-duet-card:hover{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}/*!@a.duet-card:active*/a.duet-card.sc-duet-card:active{transition:none;transform:translateY(1px)}";
|
|
6689
6915
|
|
|
6690
6916
|
/**
|
|
6691
6917
|
* @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
|
|
6692
|
-
* @slot below-
|
|
6918
|
+
* @slot below-heading - Below heading content.
|
|
6693
6919
|
* @slot footer - Footer content.
|
|
6694
6920
|
*/
|
|
6695
6921
|
class DuetCard {
|
|
@@ -8001,6 +8227,7 @@ const duetCollapsibleCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-collapsible,
|
|
|
8001
8227
|
|
|
8002
8228
|
/**
|
|
8003
8229
|
* @part duet-collapsible-heading-content - piercing selector for styling the heading content
|
|
8230
|
+
* @part duet-collapsible-content - piercing selector for styling the content
|
|
8004
8231
|
*/
|
|
8005
8232
|
class DuetCollapsible {
|
|
8006
8233
|
constructor(hostRef) {
|
|
@@ -8120,7 +8347,7 @@ class DuetCollapsible {
|
|
|
8120
8347
|
"duet-collapsible-heading": true,
|
|
8121
8348
|
"duet-theme-turva": this.theme === "turva",
|
|
8122
8349
|
"duet-collapsible-normal-weight": this.headingWeight === "normal",
|
|
8123
|
-
}, style: { "font-size": this.getFontSizeFromTokens() }, role: "button", tabindex: "0", ref: button => (this.nativeButton = button), "aria-expanded": this.open ? "true" : "false", "aria-controls": this.id, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, hAsync("div", { class: "duet-collapsible-heading-icon" }, hAsync("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: actionArrowDownSmall.svg })), hAsync("div", { class: "duet-collapsible-heading-content", part: "duet-collapsible-heading-content" }, this.heading)), hAsync("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" } }, hAsync("slot", null))));
|
|
8350
|
+
}, style: { "font-size": this.getFontSizeFromTokens() }, role: "button", tabindex: "0", ref: button => (this.nativeButton = button), "aria-expanded": this.open ? "true" : "false", "aria-controls": this.id, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, hAsync("div", { class: "duet-collapsible-heading-icon" }, hAsync("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: actionArrowDownSmall.svg })), hAsync("div", { class: "duet-collapsible-heading-content", part: "duet-collapsible-heading-content" }, this.heading)), hAsync("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" }, part: "duet-collapsible-content" }, hAsync("slot", null))));
|
|
8124
8351
|
}
|
|
8125
8352
|
get element() { return getElement(this); }
|
|
8126
8353
|
static get style() { return duetCollapsibleCss; }
|
|
@@ -8580,7 +8807,7 @@ const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, theme, langu
|
|
|
8580
8807
|
} }))))))))));
|
|
8581
8808
|
};
|
|
8582
8809
|
|
|
8583
|
-
const duetDatePickerCss = "*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{color:#171c3a;background:#f5f5f7}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker duet-icon.sc-duet-date-picker{display:block}@media (max-width: 35.9375em){.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{width:40px;height:40px}}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9ecee !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9e9eb !important}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#dddfe1;box-shadow:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#ddddde}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#747475;background:#f5f5f7}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}";
|
|
8810
|
+
const duetDatePickerCss = "*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker .sc-duet-date-picker::part(button){border:0}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}";
|
|
8584
8811
|
|
|
8585
8812
|
class DuetDatePicker {
|
|
8586
8813
|
constructor(hostRef) {
|
|
@@ -8975,7 +9202,7 @@ class DuetDatePicker {
|
|
|
8975
9202
|
left: this.direction === "left",
|
|
8976
9203
|
error: !!this.error,
|
|
8977
9204
|
active: this.open,
|
|
8978
|
-
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, hAsync(FocusGuard, { moveFocusTo: this.focusedDayNode }), hAsync("div", { class: "duet-date-dialog-wrapper", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, hAsync("duet-visually-hidden", { "aria-live": "polite" }, text.keyboardInstruction), hAsync("div", { class: "duet-date-dialog-mobile-header" }, hAsync("duet-label", { margin: "none" }, this.label), hAsync("button", { class: "duet-date-picker-close", ref: element => (this.closeButtonNode = element), onClick: () => this.hide(), type: "button" }, hAsync("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xx-small" }), hAsync("duet-visually-hidden", null, text.closeLabel))), hAsync("div", { class: "duet-date-dialog-header" }, hAsync("div", { class: "duet-date-dialog-dropdowns" }, hAsync("duet-visually-hidden", null, hAsync("h2", { id: this.dialogLabelId, "aria-live": "polite", "aria-atomic": "true" }, text.monthLabels[focusedMonth], " ", this.focusedDay.getFullYear())), hAsync("duet-visually-hidden", null, hAsync("label", { htmlFor: this.monthSelectId }, text.monthSelectLabel)), hAsync("div", { class: "duet-date-dialog-select" }, hAsync("select", { id: this.monthSelectId, class: "duet-date-month-select", ref: element => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, text.monthLabels.map((month, i) => (hAsync("option", { key: month, value: i, selected: i === focusedMonth, disabled: !inRange(new Date(focusedYear, i, 1), minDate ? startOfMonth(minDate) : null, maxDate ? endOfMonth(maxDate) : null) }, month)))), hAsync("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, hAsync("span", null, text.monthLabelsShort[focusedMonth]), hAsync("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" }))), hAsync("duet-visually-hidden", null, hAsync("label", { htmlFor: this.yearSelectId }, text.yearSelectLabel)), hAsync("div", { class: "duet-date-dialog-select" }, hAsync("select", { id: this.yearSelectId, class: "duet-date-year-select", onChange: this.handleYearSelect }, range(minYear, maxYear).map(year => (hAsync("option", { key: year, selected: year === focusedYear }, year)))), hAsync("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, hAsync("span", null, this.focusedDay.getFullYear()), hAsync("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" })))), hAsync("div", { class: "duet-date-dialog-buttons" }, hAsync("button", { class: "duet-date-dialog-prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled,
|
|
9205
|
+
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, hAsync(FocusGuard, { moveFocusTo: this.focusedDayNode }), hAsync("div", { class: "duet-date-dialog-wrapper", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, hAsync("duet-visually-hidden", { "aria-live": "polite" }, text.keyboardInstruction), hAsync("div", { class: "duet-date-dialog-mobile-header" }, hAsync("duet-label", { margin: "none" }, this.label), hAsync("button", { class: "duet-date-picker-close", ref: element => (this.closeButtonNode = element), onClick: () => this.hide(), type: "button" }, hAsync("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xx-small" }), hAsync("duet-visually-hidden", null, text.closeLabel))), hAsync("div", { class: "duet-date-dialog-header" }, hAsync("div", { class: "duet-date-dialog-dropdowns" }, hAsync("duet-visually-hidden", null, hAsync("h2", { id: this.dialogLabelId, "aria-live": "polite", "aria-atomic": "true" }, text.monthLabels[focusedMonth], " ", this.focusedDay.getFullYear())), hAsync("duet-visually-hidden", null, hAsync("label", { htmlFor: this.monthSelectId }, text.monthSelectLabel)), hAsync("div", { class: "duet-date-dialog-select" }, hAsync("select", { id: this.monthSelectId, class: "duet-date-month-select", ref: element => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, text.monthLabels.map((month, i) => (hAsync("option", { key: month, value: i, selected: i === focusedMonth, disabled: !inRange(new Date(focusedYear, i, 1), minDate ? startOfMonth(minDate) : null, maxDate ? endOfMonth(maxDate) : null) }, month)))), hAsync("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, hAsync("span", null, text.monthLabelsShort[focusedMonth]), hAsync("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" }))), hAsync("duet-visually-hidden", null, hAsync("label", { htmlFor: this.yearSelectId }, text.yearSelectLabel)), hAsync("div", { class: "duet-date-dialog-select" }, hAsync("select", { id: this.yearSelectId, class: "duet-date-year-select", onChange: this.handleYearSelect }, range(minYear, maxYear).map(year => (hAsync("option", { key: year, selected: year === focusedYear }, year)))), hAsync("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, hAsync("span", null, this.focusedDay.getFullYear()), hAsync("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" })))), hAsync("div", { class: "duet-date-dialog-buttons" }, hAsync("duet-action-button", { class: "duet-date-dialog-prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, "icon-name": "action-arrow-left-small" }, text.prevMonthLabel), hAsync("duet-action-button", { class: "duet-date-dialog-next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, "icon-name": "action-arrow-right-small" }, text.nextMonthLabel))), hAsync(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, language: this.language, theme: this.theme, min: minDate, max: maxDate, focusedDayRef: element => (this.focusedDayNode = element), onFocusEnter: this.enableActiveFocus, onFocusExit: this.disableActiveFocus })), hAsync(FocusGuard, { moveFocusTo: this.closeButtonNode }))));
|
|
8979
9206
|
}
|
|
8980
9207
|
get element() { return getElement(this); }
|
|
8981
9208
|
static get watchers() { return {
|
|
@@ -9076,411 +9303,232 @@ class DuetDivider {
|
|
|
9076
9303
|
}; }
|
|
9077
9304
|
}
|
|
9078
9305
|
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9306
|
+
//simple functional component that renders the data in the table
|
|
9307
|
+
const TableData = ({ data, groupId, alignment }, _children) => {
|
|
9308
|
+
const classNames = `duet-editable-table duet-editable-table-content-${groupId}`;
|
|
9309
|
+
if (typeof data === "string") {
|
|
9310
|
+
return hAsync("td", { innerHTML: data, class: classNames, part: `${groupId}content`, style: { verticalAlign: alignment } });
|
|
9311
|
+
}
|
|
9312
|
+
else {
|
|
9313
|
+
return (hAsync("td", { class: classNames, part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
|
|
9314
|
+
}
|
|
9087
9315
|
};
|
|
9088
9316
|
|
|
9089
|
-
|
|
9090
|
-
* Produces a function which uses template strings to do simple interpolation from objects.
|
|
9091
|
-
*
|
|
9092
|
-
* Usage:
|
|
9093
|
-
* var makeMeKing = generateTemplateFn('${name} is now the king of ${country}!');
|
|
9094
|
-
*
|
|
9095
|
-
* console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'}));
|
|
9096
|
-
* // Logs 'Bryan is now the king of Scotland!'
|
|
9097
|
-
*/
|
|
9098
|
-
const generateTemplateFn = (function () {
|
|
9099
|
-
const cache = {};
|
|
9100
|
-
function generateTemplate(template) {
|
|
9101
|
-
if (typeof template !== "string") {
|
|
9102
|
-
template = template.outerHTML;
|
|
9103
|
-
}
|
|
9104
|
-
let fn = cache[template];
|
|
9105
|
-
if (!fn) {
|
|
9106
|
-
// Replace ${expressions} (etc) with ${map.expressions}.
|
|
9107
|
-
const sanitized = template
|
|
9108
|
-
.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g, function (_, match) {
|
|
9109
|
-
return `\$\{map.${match.trim()}\}`;
|
|
9110
|
-
})
|
|
9111
|
-
// Afterwards, replace anything that's not ${map.expressions}' (etc) with a blank string.
|
|
9112
|
-
.replace(/(\$\{(?!map\.)[^}]+\})/g, "");
|
|
9113
|
-
fn = Function("map", `return \`${sanitized}\``);
|
|
9114
|
-
}
|
|
9115
|
-
return fn;
|
|
9116
|
-
}
|
|
9117
|
-
return generateTemplate;
|
|
9118
|
-
})();
|
|
9119
|
-
|
|
9120
|
-
const duetEditableTableCss = "/*!@duet-editable-table*/duet-editable-table.sc-duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-editable-table-header tr .duet-editable-table-header-hidden*/.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";
|
|
9317
|
+
const duetEditableTableCss = ".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";
|
|
9121
9318
|
|
|
9122
9319
|
class DuetEditableTable {
|
|
9123
9320
|
constructor(hostRef) {
|
|
9124
9321
|
registerInstance(this, hostRef);
|
|
9125
|
-
this.
|
|
9126
|
-
|
|
9127
|
-
* State() variables
|
|
9128
|
-
* @internal
|
|
9129
|
-
*/
|
|
9130
|
-
this.tick = Date.now();
|
|
9322
|
+
this.duetTableToggle = createEvent$2(this, "duetTableToggle", 7);
|
|
9323
|
+
this.duetMenuClick = createEvent$2(this, "duetMenuClick", 7);
|
|
9131
9324
|
/**
|
|
9132
|
-
*
|
|
9325
|
+
* Duet-table: margin of the component.
|
|
9133
9326
|
*/
|
|
9134
|
-
this.
|
|
9327
|
+
this.margin = "auto";
|
|
9135
9328
|
/**
|
|
9136
|
-
*
|
|
9329
|
+
* Duet-table: Style variation of the table.
|
|
9137
9330
|
*/
|
|
9138
|
-
this.
|
|
9331
|
+
this.variation = "striped";
|
|
9139
9332
|
/**
|
|
9140
|
-
*
|
|
9333
|
+
* Duet-table: Controls whether the table has a sticky header.
|
|
9334
|
+
* Sticky headers are not compatible with breakpoint="none-scrollable".
|
|
9141
9335
|
*/
|
|
9142
|
-
this.
|
|
9143
|
-
fi: "Kaikki",
|
|
9144
|
-
en: "All items",
|
|
9145
|
-
sv: "Alla objekt",
|
|
9146
|
-
};
|
|
9336
|
+
this.sticky = false;
|
|
9147
9337
|
/**
|
|
9148
|
-
*
|
|
9338
|
+
* Duet-table: Adjust the distance from top of the viewport (in pixels) when the
|
|
9339
|
+
* table header becomes sticky.
|
|
9149
9340
|
*/
|
|
9150
|
-
this.
|
|
9151
|
-
fi: "Toiminnot",
|
|
9152
|
-
en: "Actions",
|
|
9153
|
-
sv: "Handlingar",
|
|
9154
|
-
};
|
|
9341
|
+
this.stickyDistance = "with-links";
|
|
9155
9342
|
/**
|
|
9156
|
-
*
|
|
9157
|
-
*
|
|
9158
|
-
*
|
|
9343
|
+
* Duet-table: By default the table is responsive - it will be flattened at narrow viewport widths.
|
|
9344
|
+
* This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
|
|
9345
|
+
* Set to "none" to disable the responsive functionality.
|
|
9346
|
+
* Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
|
|
9347
|
+
* this is useful for comparison tables where it's important to maintain column and row layout.
|
|
9159
9348
|
*/
|
|
9160
|
-
this.
|
|
9161
|
-
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
9162
|
-
];
|
|
9349
|
+
this.breakpoint = "small";
|
|
9163
9350
|
/**
|
|
9164
|
-
*
|
|
9351
|
+
* Define actions for all items in a table
|
|
9352
|
+
* An alternative to inline HTML table.
|
|
9353
|
+
* required for Sortable tables
|
|
9165
9354
|
* @default undefined
|
|
9166
|
-
* @example [{
|
|
9167
|
-
variation: "default",
|
|
9168
|
-
icon: "action-edit-2",
|
|
9169
|
-
id: "edit",
|
|
9170
|
-
map: ["success"],
|
|
9171
|
-
label: {
|
|
9172
|
-
fi: " Label",
|
|
9173
|
-
en: " Label",
|
|
9174
|
-
sv: " Label",
|
|
9175
|
-
}
|
|
9176
|
-
}]
|
|
9177
|
-
*/
|
|
9178
|
-
this.actions = undefined;
|
|
9179
|
-
/**
|
|
9180
|
-
* Shows or hides the table labels.
|
|
9181
|
-
*/
|
|
9182
|
-
this.hideGroups = false;
|
|
9183
|
-
/**
|
|
9184
|
-
* Exposes the aria role for optimizing accessibility.
|
|
9185
|
-
*/
|
|
9186
|
-
this.accessibleRole = undefined;
|
|
9187
|
-
/**
|
|
9188
|
-
* Theme of the table.
|
|
9189
|
-
*/
|
|
9190
|
-
this.theme = "";
|
|
9191
|
-
/**
|
|
9192
|
-
* Private methods.
|
|
9193
|
-
*/
|
|
9194
|
-
this.kick = debounce(() => {
|
|
9195
|
-
this.tick = Date.now();
|
|
9196
|
-
}, 100); // will trigger re-render
|
|
9197
|
-
/**
|
|
9198
|
-
* If a user defines a template section within editable table, try to read an use it.
|
|
9199
|
-
*/
|
|
9200
|
-
this.getTemplate = () => {
|
|
9201
|
-
const templateDom = this.element.getElementsByTagName("template");
|
|
9202
|
-
if (templateDom === null || templateDom === void 0 ? void 0 : templateDom.length) {
|
|
9203
|
-
const templateString = templateDom[0].content.firstElementChild.outerHTML;
|
|
9204
|
-
return generateTemplateFn(templateString);
|
|
9205
|
-
}
|
|
9206
|
-
else {
|
|
9207
|
-
return false;
|
|
9208
|
-
}
|
|
9209
|
-
};
|
|
9210
|
-
this.getItemData = (data) => {
|
|
9211
|
-
const { item, group, uid } = data;
|
|
9212
|
-
if (this.template) {
|
|
9213
|
-
return {
|
|
9214
|
-
group,
|
|
9215
|
-
uid,
|
|
9216
|
-
item: this.template(item),
|
|
9217
|
-
};
|
|
9218
|
-
}
|
|
9219
|
-
return { item, group, uid };
|
|
9220
|
-
};
|
|
9221
|
-
this.filterMap = needle => {
|
|
9222
|
-
if (needle === "all") {
|
|
9223
|
-
return Array.from(this.items);
|
|
9224
|
-
}
|
|
9225
|
-
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
9226
|
-
};
|
|
9227
|
-
}
|
|
9228
|
-
/**
|
|
9229
|
-
* Component lifecycle events.
|
|
9230
|
-
*/
|
|
9231
|
-
componentWillLoad() {
|
|
9232
|
-
// look for a <template> region in the duet-editable-table
|
|
9233
|
-
this.template = this.getTemplate();
|
|
9234
|
-
// take care of the case where groups and actions are defined as html properties instead of javascript objects
|
|
9235
|
-
if (typeof this.groups === "string") {
|
|
9236
|
-
this.internalGroupArray = sanitizeString(this.groups);
|
|
9237
|
-
}
|
|
9238
|
-
else {
|
|
9239
|
-
this.internalGroupArray = this.groups;
|
|
9240
|
-
}
|
|
9241
|
-
if (typeof this.actions === "string") {
|
|
9242
|
-
this.internalActionsArray = sanitizeString(this.actions);
|
|
9243
|
-
}
|
|
9244
|
-
else {
|
|
9245
|
-
this.internalActionsArray = this.actions;
|
|
9246
|
-
}
|
|
9247
|
-
inheritGlobalTheme(this);
|
|
9248
|
-
}
|
|
9249
|
-
/**
|
|
9250
|
-
* Method to force an update of a tabular data array.
|
|
9251
|
-
* when called the method will rerender the entire tabular structure.
|
|
9252
|
-
*/
|
|
9253
|
-
async updateTable(passedItems = undefined) {
|
|
9254
|
-
this.items = new Map(passedItems || this.items);
|
|
9255
|
-
this.kick();
|
|
9256
|
-
}
|
|
9257
|
-
render() {
|
|
9258
|
-
return (hAsync(Host, { class: {
|
|
9259
|
-
"duet-theme-turva": this.theme === "turva",
|
|
9260
|
-
} }, this.internalGroupArray.map(group => {
|
|
9261
|
-
const currentGroup = this.filterMap(group.id);
|
|
9262
|
-
if (!currentGroup.length) {
|
|
9263
|
-
return;
|
|
9264
|
-
}
|
|
9265
|
-
return (hAsync("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, hAsync("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, hAsync("thead", { class: "duet-editable-table-header" }, hAsync("tr", null, hAsync("th", { class: {
|
|
9266
|
-
"duet-editable-table-header-hidden": this.hideGroups,
|
|
9267
|
-
} }, !this.hideGroups ? (getLocaleString(group.label)) : (hAsync("duet-visually-hidden", null, getLocaleString(group.label)))), hAsync("th", { class: {
|
|
9268
|
-
"duet-editable-table-header-hidden": this.hideGroups,
|
|
9269
|
-
} }, hAsync("duet-visually-hidden", null, group.actionLabel
|
|
9270
|
-
? getLocaleString(group.actionLabel)
|
|
9271
|
-
: getLocaleString(this.actionLabelDefaults))))), hAsync("tbody", null, currentGroup.map(dataAsArray => {
|
|
9272
|
-
const [key, value] = dataAsArray;
|
|
9273
|
-
return (hAsync("duet-editable-table-item", { theme: this.theme, keyName: key, data: this.getItemData(value), groupId: group.id, part: group.id, alignment: this.alignment, actions: this.internalActionsArray }));
|
|
9274
|
-
})))));
|
|
9275
|
-
})));
|
|
9276
|
-
}
|
|
9277
|
-
get element() { return getElement(this); }
|
|
9278
|
-
static get style() { return duetEditableTableCss; }
|
|
9279
|
-
static get cmpMeta() { return {
|
|
9280
|
-
"$flags$": 9,
|
|
9281
|
-
"$tagName$": "duet-editable-table",
|
|
9282
|
-
"$members$": {
|
|
9283
|
-
"items": [1040],
|
|
9284
|
-
"alignment": [1],
|
|
9285
|
-
"groupsLabelDefaults": [16],
|
|
9286
|
-
"actionLabelDefaults": [16],
|
|
9287
|
-
"groups": [1],
|
|
9288
|
-
"actions": [1],
|
|
9289
|
-
"hideGroups": [4, "hide-table-labels"],
|
|
9290
|
-
"accessibleRole": [1, "accessible-role"],
|
|
9291
|
-
"theme": [1025],
|
|
9292
|
-
"tick": [32],
|
|
9293
|
-
"updateTable": [64]
|
|
9294
|
-
},
|
|
9295
|
-
"$listeners$": undefined,
|
|
9296
|
-
"$lazyBundleId$": "-",
|
|
9297
|
-
"$attrsToReflect$": []
|
|
9298
|
-
}; }
|
|
9299
|
-
}
|
|
9300
|
-
|
|
9301
|
-
const duetEditableTableButtonCss = "*.sc-duet-editable-table-button,*.sc-duet-editable-table-button::after,*.sc-duet-editable-table-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button{display:flex;align-content:space-between;justify-content:center;min-width:32px;max-width:32px;height:100%;min-height:32px;max-height:32px;padding:0;margin:0;cursor:pointer !important;background-color:transparent;border:1px solid;border-radius:50%}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button duet-icon.sc-duet-editable-table-button{align-self:center}";
|
|
9302
|
-
|
|
9303
|
-
class DuetEditableTableButton {
|
|
9304
|
-
constructor(hostRef) {
|
|
9305
|
-
registerInstance(this, hostRef);
|
|
9306
|
-
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
9307
|
-
this.isHovering = false;
|
|
9308
|
-
/**
|
|
9309
|
-
* Theme of the empty state component.
|
|
9310
|
-
*/
|
|
9311
|
-
this.theme = undefined;
|
|
9312
|
-
/**
|
|
9313
|
-
* action items passed from host component
|
|
9314
|
-
* @internal
|
|
9315
9355
|
*/
|
|
9316
9356
|
this.actions = undefined;
|
|
9317
9357
|
/**
|
|
9318
|
-
*
|
|
9319
|
-
*
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
/**
|
|
9323
|
-
* group associated with action
|
|
9324
|
-
* @internal
|
|
9325
|
-
*/
|
|
9326
|
-
this.group = "";
|
|
9327
|
-
/**
|
|
9328
|
-
* key of the item in the map
|
|
9329
|
-
* @internal
|
|
9358
|
+
* Define columns for a table
|
|
9359
|
+
* An alternative to inline HTML table.
|
|
9360
|
+
* required for Sortable tables
|
|
9361
|
+
* @default undefined
|
|
9330
9362
|
*/
|
|
9331
|
-
this.
|
|
9332
|
-
this.onMouseEnter = () => {
|
|
9333
|
-
this.isHovering = true;
|
|
9334
|
-
};
|
|
9335
|
-
this.onMouseLeave = () => {
|
|
9336
|
-
this.isHovering = false;
|
|
9337
|
-
};
|
|
9338
|
-
this.getColours = (byName = false) => {
|
|
9339
|
-
let colorHover = this.actions.color_hover;
|
|
9340
|
-
let colorBlur = this.actions.color;
|
|
9341
|
-
if (byName) {
|
|
9342
|
-
colorHover = getColorByName(this.actions.color_hover, this.theme);
|
|
9343
|
-
colorBlur = getColorByName(this.actions.color, this.theme);
|
|
9344
|
-
}
|
|
9345
|
-
return this.isHovering ? colorHover : colorBlur;
|
|
9346
|
-
};
|
|
9347
|
-
}
|
|
9348
|
-
/**
|
|
9349
|
-
/**
|
|
9350
|
-
* Component lifecycle events.
|
|
9351
|
-
*/
|
|
9352
|
-
componentWillLoad() {
|
|
9353
|
-
inheritGlobalTheme(this);
|
|
9354
|
-
}
|
|
9355
|
-
/**
|
|
9356
|
-
/**
|
|
9357
|
-
* private functions
|
|
9358
|
-
*/
|
|
9359
|
-
emitActionEvent(ev) {
|
|
9360
|
-
this.duetEditableItemAction.emit({
|
|
9361
|
-
originalEvent: ev,
|
|
9362
|
-
uid: this.uid,
|
|
9363
|
-
group: this.group,
|
|
9364
|
-
action: this.actions.id,
|
|
9365
|
-
keyName: this.keyName,
|
|
9366
|
-
component: "duet-editable-table-item",
|
|
9367
|
-
});
|
|
9368
|
-
}
|
|
9369
|
-
/**
|
|
9370
|
-
* render() function
|
|
9371
|
-
* Always the last one in the class.
|
|
9372
|
-
*/
|
|
9373
|
-
render() {
|
|
9374
|
-
return (hAsync("button", { style: {
|
|
9375
|
-
"border-color": this.getColours(true),
|
|
9376
|
-
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) }, hAsync("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.getColours(), margin: "none" })));
|
|
9377
|
-
}
|
|
9378
|
-
get el() { return getElement(this); }
|
|
9379
|
-
static get style() { return duetEditableTableButtonCss; }
|
|
9380
|
-
static get cmpMeta() { return {
|
|
9381
|
-
"$flags$": 2,
|
|
9382
|
-
"$tagName$": "duet-editable-table-button",
|
|
9383
|
-
"$members$": {
|
|
9384
|
-
"theme": [1025],
|
|
9385
|
-
"actions": [16],
|
|
9386
|
-
"uid": [1],
|
|
9387
|
-
"group": [1],
|
|
9388
|
-
"keyName": [1, "key-name"],
|
|
9389
|
-
"isHovering": [32]
|
|
9390
|
-
},
|
|
9391
|
-
"$listeners$": undefined,
|
|
9392
|
-
"$lazyBundleId$": "-",
|
|
9393
|
-
"$attrsToReflect$": []
|
|
9394
|
-
}; }
|
|
9395
|
-
}
|
|
9396
|
-
|
|
9397
|
-
//simple functional component that renders the data in the table
|
|
9398
|
-
const TableData = ({ data, groupId, alignment }, _children) => {
|
|
9399
|
-
if (typeof data === "string") {
|
|
9400
|
-
return (hAsync("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }));
|
|
9401
|
-
}
|
|
9402
|
-
else {
|
|
9403
|
-
return (hAsync("td", { class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
|
|
9404
|
-
}
|
|
9405
|
-
};
|
|
9406
|
-
|
|
9407
|
-
const duetEditableTableItemCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-editable-table-item,*.sc-duet-editable-table-item::after,*.sc-duet-editable-table-item::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-editable-table-item-h{display:table-row;height:32px}/*!@.duet-editable-table-content, .duet-editable-table-actions*/.duet-editable-table-content.sc-duet-editable-table-item,.duet-editable-table-actions.sc-duet-editable-table-item{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}/*!@.duet-editable-table-actions-items*/.duet-editable-table-actions-items.sc-duet-editable-table-item{display:flex;justify-content:flex-end}/*!@.duet-editable-table-actions-items duet-editable-table-button*/.duet-editable-table-actions-items.sc-duet-editable-table-item duet-editable-table-button.sc-duet-editable-table-item{padding-left:8px}/*!@.duet-editable-table .editable-item-small*/.duet-editable-table.sc-duet-editable-table-item .editable-item-small.sc-duet-editable-table-item{font-size:0.75rem;font-weight:400}";
|
|
9408
|
-
|
|
9409
|
-
class DuetEditableTableItem {
|
|
9410
|
-
constructor(hostRef) {
|
|
9411
|
-
registerInstance(this, hostRef);
|
|
9412
|
-
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
9413
|
-
this.isHovering = false;
|
|
9363
|
+
this.columns = undefined;
|
|
9414
9364
|
/**
|
|
9415
|
-
*
|
|
9365
|
+
* Define rows for a table
|
|
9366
|
+
* An alternative to inline HTML table.
|
|
9367
|
+
* required for Sortable tables
|
|
9368
|
+
* @default undefined
|
|
9416
9369
|
*/
|
|
9417
|
-
this.
|
|
9370
|
+
this.rows = undefined;
|
|
9418
9371
|
/**
|
|
9419
|
-
*
|
|
9372
|
+
* Controls whether the table is sortable by headers
|
|
9420
9373
|
*/
|
|
9421
|
-
this.
|
|
9374
|
+
this.sortable = false;
|
|
9422
9375
|
/**
|
|
9423
|
-
*
|
|
9424
|
-
* @internal
|
|
9376
|
+
* Optional id that get passed to the table and used to setup ::parts
|
|
9425
9377
|
*/
|
|
9426
9378
|
this.groupId = "";
|
|
9427
9379
|
/**
|
|
9428
|
-
*
|
|
9380
|
+
* Theme of the table.
|
|
9429
9381
|
*/
|
|
9430
|
-
this.
|
|
9382
|
+
this.theme = "";
|
|
9431
9383
|
/**
|
|
9432
|
-
*
|
|
9384
|
+
* Exposes the aria role for optimizing accessibility.
|
|
9433
9385
|
*/
|
|
9434
|
-
this.
|
|
9386
|
+
this.accessibleRole = undefined;
|
|
9387
|
+
this.sortableDefaultLabel = {
|
|
9388
|
+
fi: "Järjestä",
|
|
9389
|
+
en: "Click to sort",
|
|
9390
|
+
sv: "Klicka för att sortera",
|
|
9391
|
+
};
|
|
9392
|
+
this.actionColumnLabel = {
|
|
9393
|
+
en: "Actions for rows",
|
|
9394
|
+
fi: "Toiminnot rivillä",
|
|
9395
|
+
sv: "Åtgärder för rader",
|
|
9396
|
+
};
|
|
9435
9397
|
/**
|
|
9436
|
-
*
|
|
9398
|
+
* Private methods.
|
|
9437
9399
|
*/
|
|
9438
|
-
this.
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9400
|
+
this.toggleColumn = (column, e) => {
|
|
9401
|
+
e.preventDefault();
|
|
9402
|
+
const { sort_order, direction, index, key } = column;
|
|
9403
|
+
this.duetTableToggle.emit({
|
|
9404
|
+
sort_order,
|
|
9405
|
+
index,
|
|
9406
|
+
direction,
|
|
9407
|
+
key,
|
|
9408
|
+
component: "duet-editable-table",
|
|
9409
|
+
originalEvent: e,
|
|
9410
|
+
});
|
|
9411
|
+
};
|
|
9412
|
+
this.handleKeyDown = (column, e) => {
|
|
9413
|
+
if (isKeyboardClick(e)) {
|
|
9414
|
+
this.toggleColumn(column, e);
|
|
9415
|
+
}
|
|
9416
|
+
};
|
|
9442
9417
|
}
|
|
9443
9418
|
/**
|
|
9444
|
-
/**
|
|
9445
9419
|
* Component lifecycle events.
|
|
9446
9420
|
*/
|
|
9447
9421
|
componentWillLoad() {
|
|
9448
9422
|
inheritGlobalTheme(this);
|
|
9449
9423
|
}
|
|
9424
|
+
createLabel(column) {
|
|
9425
|
+
const { sort_order, direction, index, label } = column;
|
|
9426
|
+
const i18nLabel = getLocaleString(label);
|
|
9427
|
+
if (!this.sortable) {
|
|
9428
|
+
return i18nLabel;
|
|
9429
|
+
}
|
|
9430
|
+
const getButtonIcon = () => {
|
|
9431
|
+
// "action-subtract-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-subtract-small.svg
|
|
9432
|
+
// "action-arrow-down-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-down-small.svg
|
|
9433
|
+
// "action-arrow-up-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-up-small.svg
|
|
9434
|
+
if (!!sort_order && direction === 1) {
|
|
9435
|
+
return "action-arrow-down-small";
|
|
9436
|
+
}
|
|
9437
|
+
else if (!!sort_order && direction === -1) {
|
|
9438
|
+
return "action-arrow-up-small";
|
|
9439
|
+
}
|
|
9440
|
+
return "action-subtract-small";
|
|
9441
|
+
};
|
|
9442
|
+
return (hAsync("span", { class: "duet-table-label", "data-index": index }, hAsync("duet-button", { size: "small", icon: getButtonIcon(), "icon-size": "medium-small", "accessible-label": getLocaleString(this.sortableDefaultLabel), variation: "plain", margin: "none", "icon-right": true, onClick: event => this.toggleColumn(column, event), onKeyDown: event => this.handleKeyDown(column, event) }, i18nLabel)));
|
|
9443
|
+
}
|
|
9444
|
+
getSortedColumns() {
|
|
9445
|
+
//create a new array from sort instead of mutating original
|
|
9446
|
+
return [...this.columns].sort(fieldSorter(["index"]));
|
|
9447
|
+
}
|
|
9448
|
+
getRowSortOrder() {
|
|
9449
|
+
//create a new array from sort instead of mutating original
|
|
9450
|
+
const fields = [...this.columns].sort(fieldSorter(["sort_order"]));
|
|
9451
|
+
//return only key from objects that have sort_order
|
|
9452
|
+
return fields
|
|
9453
|
+
.filter(column => column.sort_order)
|
|
9454
|
+
.map(column => {
|
|
9455
|
+
// add - in-front of descending direction (required by field-sorter)
|
|
9456
|
+
return column.direction === -1 ? `-${column.key}` : column.key;
|
|
9457
|
+
});
|
|
9458
|
+
}
|
|
9459
|
+
renderTableHeader() {
|
|
9460
|
+
if (!this.columns) {
|
|
9461
|
+
return;
|
|
9462
|
+
}
|
|
9463
|
+
const sortedColumns = this.getSortedColumns();
|
|
9464
|
+
return (hAsync("tr", { class: {
|
|
9465
|
+
"duet-table-action-header": !!this.actions,
|
|
9466
|
+
} }, sortedColumns.map(column => {
|
|
9467
|
+
if (column.display !== false) {
|
|
9468
|
+
return hAsync("th", { scope: "col" }, this.createLabel(column));
|
|
9469
|
+
}
|
|
9470
|
+
}), this.actions && (hAsync("th", { scope: "col", class: "duet-table-action-header-heading" }, this.actions && hAsync("duet-visually-hidden", null, getLocaleString(this.actionColumnLabel))))));
|
|
9471
|
+
}
|
|
9472
|
+
renderActions(rowItem, index) {
|
|
9473
|
+
// escape early
|
|
9474
|
+
if (!this.actions) {
|
|
9475
|
+
return;
|
|
9476
|
+
}
|
|
9477
|
+
// iterate through actions and add them in the sidebar
|
|
9478
|
+
return (hAsync("td", { class: "duet-text-right" }, this.actions.map(actionItem => {
|
|
9479
|
+
return (hAsync("duet-action-button", { actionMeta: Object.assign({}, (rowItem === null || rowItem === void 0 ? void 0 : rowItem.meta) || {}, { index }), actionId: (rowItem === null || rowItem === void 0 ? void 0 : rowItem.uid) || (rowItem === null || rowItem === void 0 ? void 0 : rowItem.id) || null, actionName: actionItem.name, theme: this.theme, iconName: actionItem.icon, iconColor: actionItem.color, iconSize: actionItem.size, background: actionItem.background }));
|
|
9480
|
+
})));
|
|
9481
|
+
}
|
|
9482
|
+
renderTableBody() {
|
|
9483
|
+
const columns = this.getSortedColumns();
|
|
9484
|
+
const rowSortOrder = this.getRowSortOrder();
|
|
9485
|
+
const sortedRows = [...this.rows].sort(fieldSorter(rowSortOrder));
|
|
9486
|
+
// return a tbody with rows for each item in sortedRows
|
|
9487
|
+
return sortedRows.map((row, index) => (hAsync("tr", { class: {
|
|
9488
|
+
"duet-table-action-row": !!this.actions,
|
|
9489
|
+
"duet-editable-table-row": true,
|
|
9490
|
+
[`duet-editable-table-row-${this.groupId}`]: true,
|
|
9491
|
+
}, "data-meta": JSON.stringify(row.meta) }, columns.map(column => {
|
|
9492
|
+
//if we don't have any data for this column, try getting an item instead (for backwards compatibility
|
|
9493
|
+
const value = row[column.key] ? row[column.key] : row.item;
|
|
9494
|
+
if (column.display !== false) {
|
|
9495
|
+
return hAsync(TableData, { data: value, groupId: this.groupId });
|
|
9496
|
+
}
|
|
9497
|
+
}), this.actions && this.renderActions(row, index))));
|
|
9498
|
+
}
|
|
9450
9499
|
/**
|
|
9451
|
-
|
|
9452
|
-
* private functions
|
|
9453
|
-
*/
|
|
9454
|
-
/**
|
|
9455
|
-
* render() function
|
|
9456
|
-
* Always the last one in the class.
|
|
9500
|
+
* Render Methods
|
|
9457
9501
|
*/
|
|
9458
9502
|
render() {
|
|
9459
|
-
return (hAsync(Host, {
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9503
|
+
return (hAsync(Host, { class: {
|
|
9504
|
+
[`duet-editable-table-${this.variation}`]: true,
|
|
9505
|
+
[`duet-editable-table-${this.theme}`]: true,
|
|
9506
|
+
// sticky only valid when in regular table layout
|
|
9507
|
+
"duet-editable-table-scrollable": this.breakpoint === "none-scrollable",
|
|
9508
|
+
"duet-editable-table-sortable": this.sortable,
|
|
9509
|
+
"duet-editable-table-actions": !!this.actions,
|
|
9510
|
+
"duet-m-0": this.margin === "none",
|
|
9511
|
+
"duet-theme-turva": this.theme === "turva",
|
|
9512
|
+
} }, hAsync("duet-table", { sticky: this.sticky, stickyDistance: this.stickyDistance, margin: this.margin, theme: this.theme, variation: this.variation, breakpoint: this.breakpoint }, hAsync("table", { role: this.accessibleRole }, hAsync("caption", null, hAsync("slot", { name: "tcaption" })), hAsync("thead", null, hAsync("tr", null, hAsync("td", { class: "duet-editable-table-actions-menu", colSpan: 99 }, hAsync("slot", { name: "thead-first" }))), this.renderTableHeader(), hAsync("tr", null, hAsync("td", { class: "duet-editable-table-actions-menu", colSpan: 99 }, hAsync("slot", { name: "thead-last" })))), hAsync("tbody", null, this.renderTableBody()), hAsync("tfoot", null, hAsync("tr", null, hAsync("th", { class: "duet-editable-table-footer-menu", colSpan: 99 }, hAsync("slot", { name: "tfoot" }))))))));
|
|
9467
9513
|
}
|
|
9468
|
-
get
|
|
9469
|
-
static get
|
|
9470
|
-
"data": ["watchPropHandler"]
|
|
9471
|
-
}; }
|
|
9472
|
-
static get style() { return duetEditableTableItemCss; }
|
|
9514
|
+
get element() { return getElement(this); }
|
|
9515
|
+
static get style() { return duetEditableTableCss; }
|
|
9473
9516
|
static get cmpMeta() { return {
|
|
9474
|
-
"$flags$":
|
|
9475
|
-
"$tagName$": "duet-editable-table
|
|
9517
|
+
"$flags$": 6,
|
|
9518
|
+
"$tagName$": "duet-editable-table",
|
|
9476
9519
|
"$members$": {
|
|
9477
|
-
"
|
|
9478
|
-
"
|
|
9520
|
+
"margin": [1],
|
|
9521
|
+
"variation": [1],
|
|
9522
|
+
"sticky": [4],
|
|
9523
|
+
"stickyDistance": [1, "sticky-distance"],
|
|
9524
|
+
"breakpoint": [1],
|
|
9525
|
+
"actions": [1040],
|
|
9526
|
+
"columns": [1040],
|
|
9527
|
+
"rows": [1040],
|
|
9528
|
+
"sortable": [4],
|
|
9479
9529
|
"groupId": [1, "group-id"],
|
|
9480
|
-
"
|
|
9481
|
-
"
|
|
9482
|
-
"data": [1040],
|
|
9483
|
-
"isHovering": [32]
|
|
9530
|
+
"theme": [1025],
|
|
9531
|
+
"accessibleRole": [1, "accessible-role"]
|
|
9484
9532
|
},
|
|
9485
9533
|
"$listeners$": undefined,
|
|
9486
9534
|
"$lazyBundleId$": "-",
|
|
@@ -13013,6 +13061,315 @@ class DuetNumberInput {
|
|
|
13013
13061
|
}; }
|
|
13014
13062
|
}
|
|
13015
13063
|
|
|
13064
|
+
const shouldDisplayNavigation = (visibleItems, total, take) => {
|
|
13065
|
+
if (visibleItems * 2 > total / take) {
|
|
13066
|
+
return false;
|
|
13067
|
+
}
|
|
13068
|
+
return true;
|
|
13069
|
+
};
|
|
13070
|
+
|
|
13071
|
+
const duetPaginationCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-pagination,*.sc-duet-pagination::after,*.sc-duet-pagination::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-pagination-h{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*/.duet-pagination-nav.sc-duet-pagination{position:relative}/*!@.duet-pagination ::part(button)*/.duet-pagination.sc-duet-pagination .sc-duet-pagination::part(button){border:0}/*!@.duet-pagination, .duet-pagination li*/.duet-pagination.sc-duet-pagination,.duet-pagination.sc-duet-pagination li.sc-duet-pagination{display:flex;flex-wrap:wrap;gap:0.1rem;align-items:center}/*!@.duet-pagination-item-is-active .duet-pagination-page-number*/.duet-pagination-item-is-active.sc-duet-pagination .duet-pagination-page-number.sc-duet-pagination{border-bottom-color:inherit;border-bottom-style:solid;border-bottom-width:2px}/*!@.duet-pagination duet-button*/.duet-pagination.sc-duet-pagination duet-button.sc-duet-pagination{width:30px;min-width:36px;font-weight:600;text-decoration:none;border-left-width:0}/*!@.duet-pagination-overlay*/.duet-pagination-overlay.sc-duet-pagination{position:absolute;top:1rem;z-index:300;width:100%;text-align:center}/*!@.duet-pagination.duet-pagination-is-dimmed*/.duet-pagination.duet-pagination-is-dimmed.sc-duet-pagination{opacity:0.5}";
|
|
13072
|
+
|
|
13073
|
+
class DuetPagination {
|
|
13074
|
+
constructor(hostRef) {
|
|
13075
|
+
registerInstance(this, hostRef);
|
|
13076
|
+
this.duetPageChange = createEvent$2(this, "duetPageChange", 3);
|
|
13077
|
+
this.listId = createID("duet-pagination-list");
|
|
13078
|
+
this.numbersStore = "";
|
|
13079
|
+
/**
|
|
13080
|
+
* State() variables
|
|
13081
|
+
* @internal
|
|
13082
|
+
*/
|
|
13083
|
+
this.totalPages = 10;
|
|
13084
|
+
/**
|
|
13085
|
+
* State() variables
|
|
13086
|
+
* @internal
|
|
13087
|
+
*/
|
|
13088
|
+
this.internalSectionIndex = 0;
|
|
13089
|
+
/**
|
|
13090
|
+
* Theme of the pagination.
|
|
13091
|
+
*/
|
|
13092
|
+
this.theme = "";
|
|
13093
|
+
/**
|
|
13094
|
+
* Characters to use for the jump buttons.
|
|
13095
|
+
*/
|
|
13096
|
+
this.jumpString = "...";
|
|
13097
|
+
/**
|
|
13098
|
+
* Variation of the paginator (compact and default supported)
|
|
13099
|
+
*/
|
|
13100
|
+
this.variation = "default";
|
|
13101
|
+
/**
|
|
13102
|
+
* Default pagination labels
|
|
13103
|
+
*/
|
|
13104
|
+
this.accessibleLabelsDefaults = {
|
|
13105
|
+
en: {
|
|
13106
|
+
next_page: "Next page",
|
|
13107
|
+
previous_page: "Previous page",
|
|
13108
|
+
first_page: "First page",
|
|
13109
|
+
last_page: "Last page",
|
|
13110
|
+
jump_to: "Jump to page",
|
|
13111
|
+
go_to: "Go to page",
|
|
13112
|
+
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",
|
|
13113
|
+
pagination_label: "Pagination, choose a number to jump to a page",
|
|
13114
|
+
prev_section: "Show previous {0} page numbers, screen reader user should use arrowkeys to navigate",
|
|
13115
|
+
next_section: "Show next {0} page numbers, screen reader user should use arrowkeys to navigate",
|
|
13116
|
+
},
|
|
13117
|
+
fi: {
|
|
13118
|
+
next_page: "Seuraava sivu",
|
|
13119
|
+
previous_page: "Edellinen sivu",
|
|
13120
|
+
first_page: "Ensimmäinen sivu",
|
|
13121
|
+
last_page: "Viimeinen sivu",
|
|
13122
|
+
jump_to: "Siirry sivulle",
|
|
13123
|
+
go_to: "Siirry sivulle",
|
|
13124
|
+
description: "Voit käyttää nuolinäppäimiä sivunumeron valitsemiseen, tai kirjoittaa sivunumeron, jos tämä elementti on aktiivinen, siirtymään sivulle",
|
|
13125
|
+
pagination_label: "Sivutus, valitse sivunumero siirtyäksesi sivulle",
|
|
13126
|
+
prev_section: "Näytä edelliset {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",
|
|
13127
|
+
next_section: "Näytä seuraavat {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",
|
|
13128
|
+
},
|
|
13129
|
+
sv: {
|
|
13130
|
+
next_page: "Nästa sida",
|
|
13131
|
+
previous_page: "Föregående sida",
|
|
13132
|
+
first_page: "Första sidan",
|
|
13133
|
+
last_page: "Sista sidan",
|
|
13134
|
+
jump_to: "Hoppa till sida",
|
|
13135
|
+
go_to: "Hoppa till sida",
|
|
13136
|
+
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",
|
|
13137
|
+
pagination_label: "Sidutning, välj en siffra för att hoppa till en sida",
|
|
13138
|
+
prev_section: "Visa föregående {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",
|
|
13139
|
+
next_section: "Visa nästa {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",
|
|
13140
|
+
},
|
|
13141
|
+
};
|
|
13142
|
+
/**
|
|
13143
|
+
* Default pagination labels
|
|
13144
|
+
*/
|
|
13145
|
+
this.accessibleLabels = getLocaleString(this.accessibleLabelsDefaults);
|
|
13146
|
+
/**
|
|
13147
|
+
* The size of the take, when paginating.
|
|
13148
|
+
*/
|
|
13149
|
+
this.take = 5;
|
|
13150
|
+
/**
|
|
13151
|
+
* Amount of visible page numbers to show
|
|
13152
|
+
*/
|
|
13153
|
+
this.visibleItems = 5;
|
|
13154
|
+
/**
|
|
13155
|
+
* The total size of the paginating data
|
|
13156
|
+
*/
|
|
13157
|
+
this.total = 1000;
|
|
13158
|
+
/**
|
|
13159
|
+
* Used to indicate which dom element with ID this element controls
|
|
13160
|
+
*/
|
|
13161
|
+
this.ariaControls = "";
|
|
13162
|
+
/**
|
|
13163
|
+
* The current page
|
|
13164
|
+
*/
|
|
13165
|
+
this.current = 1;
|
|
13166
|
+
/**
|
|
13167
|
+
* Private methods.
|
|
13168
|
+
*/
|
|
13169
|
+
// called from the watcher and used to make sure any changed to current also updates the internal section index
|
|
13170
|
+
this.actionChain = async (after, before) => {
|
|
13171
|
+
if (after === 0) {
|
|
13172
|
+
this.current = 1;
|
|
13173
|
+
}
|
|
13174
|
+
else if (before !== after) {
|
|
13175
|
+
const calculatedSectionIndex = Math.ceil(after / this.visibleItems) - 1;
|
|
13176
|
+
if (calculatedSectionIndex !== this.internalSectionIndex) {
|
|
13177
|
+
this.internalSectionIndex = calculatedSectionIndex;
|
|
13178
|
+
await this.setFocus();
|
|
13179
|
+
}
|
|
13180
|
+
}
|
|
13181
|
+
};
|
|
13182
|
+
//helper to emit relevant page events
|
|
13183
|
+
this.emitPageEvent = debounce((ev, passedPage) => {
|
|
13184
|
+
const page = Number(passedPage || this.current);
|
|
13185
|
+
this.duetPageChange.emit({
|
|
13186
|
+
component: "duet-pagination",
|
|
13187
|
+
from: page * this.take,
|
|
13188
|
+
to: page * this.take + this.take,
|
|
13189
|
+
current: page,
|
|
13190
|
+
take: this.take,
|
|
13191
|
+
type: "page",
|
|
13192
|
+
originalEvent: ev,
|
|
13193
|
+
});
|
|
13194
|
+
}, 500);
|
|
13195
|
+
// this will return the entered number, or the current page if the user presses enter
|
|
13196
|
+
this.getEnteredNumber = debounce(ev => {
|
|
13197
|
+
this.emitPageEvent(ev, this.numbersStore);
|
|
13198
|
+
this.current = Number(this.numbersStore);
|
|
13199
|
+
this.numbersStore = "";
|
|
13200
|
+
this.duetPageChange.emit({
|
|
13201
|
+
component: "duet-pagination",
|
|
13202
|
+
from: this.current * this.take,
|
|
13203
|
+
to: this.current * this.take + this.take,
|
|
13204
|
+
current: this.current,
|
|
13205
|
+
take: this.take,
|
|
13206
|
+
type: "jump",
|
|
13207
|
+
originalEvent: ev,
|
|
13208
|
+
});
|
|
13209
|
+
}, 500);
|
|
13210
|
+
}
|
|
13211
|
+
watchStateHandler(newValue, oldValue) {
|
|
13212
|
+
this.actionChain(newValue, oldValue);
|
|
13213
|
+
}
|
|
13214
|
+
/**
|
|
13215
|
+
* Component lifecycle events.
|
|
13216
|
+
*/
|
|
13217
|
+
componentWillLoad() {
|
|
13218
|
+
// 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
|
|
13219
|
+
this.internalSectionIndex = Math.ceil(this.current / this.visibleItems) - 1;
|
|
13220
|
+
this.calculatePageTake();
|
|
13221
|
+
inheritGlobalTheme(this);
|
|
13222
|
+
}
|
|
13223
|
+
componentWillRender() {
|
|
13224
|
+
if (this.internalSectionIndex !== 0 && this.internalSectionIndex !== this.totalPages) {
|
|
13225
|
+
this.calculatePageTake();
|
|
13226
|
+
}
|
|
13227
|
+
}
|
|
13228
|
+
componentDidRender() {
|
|
13229
|
+
this.setFocus();
|
|
13230
|
+
}
|
|
13231
|
+
//get totalpages from visible and total
|
|
13232
|
+
calculatePageTake() {
|
|
13233
|
+
this.totalPages = Math.ceil(this.total / this.take);
|
|
13234
|
+
}
|
|
13235
|
+
//set update current when mouse click on page number
|
|
13236
|
+
async onMouseHandler(e, dir) {
|
|
13237
|
+
e.preventDefault();
|
|
13238
|
+
e.stopPropagation();
|
|
13239
|
+
this.current = this.current + dir;
|
|
13240
|
+
}
|
|
13241
|
+
//handle a11y keyboard navigation events
|
|
13242
|
+
async onKeyboardDown(e) {
|
|
13243
|
+
let next = this.current;
|
|
13244
|
+
// handle a11y based keyboard navigation for left/right/up/down
|
|
13245
|
+
if (isArrowLeftKey(e) || isArrowUpKey(e)) {
|
|
13246
|
+
next--;
|
|
13247
|
+
}
|
|
13248
|
+
if (isArrowRightKey(e) || isArrowDownKey(e)) {
|
|
13249
|
+
next++;
|
|
13250
|
+
}
|
|
13251
|
+
if (isArrowKey(e)) {
|
|
13252
|
+
if (next <= this.totalPages) {
|
|
13253
|
+
this.current = next;
|
|
13254
|
+
this.emitPageEvent(e);
|
|
13255
|
+
}
|
|
13256
|
+
}
|
|
13257
|
+
//handle the jump feature, where numbers can be entered
|
|
13258
|
+
if (isNumber(e) && this.shouldDisplayNavigation()) {
|
|
13259
|
+
this.numbersStore = this.numbersStore + e.key;
|
|
13260
|
+
if (Number(this.numbersStore) > this.totalPages) {
|
|
13261
|
+
this.numbersStore = this.totalPages + "";
|
|
13262
|
+
}
|
|
13263
|
+
this.getEnteredNumber(e);
|
|
13264
|
+
}
|
|
13265
|
+
}
|
|
13266
|
+
// utility to set focus on active button
|
|
13267
|
+
async setFocus() {
|
|
13268
|
+
const currentDomElement = this.nativeNav.querySelector(`li.duet-pagination-item-is-active duet-button`);
|
|
13269
|
+
currentDomElement && (await currentDomElement.setFocus());
|
|
13270
|
+
}
|
|
13271
|
+
//handles click on page numbers
|
|
13272
|
+
pageClickHandler(e) {
|
|
13273
|
+
e.preventDefault();
|
|
13274
|
+
const clickedId = Number(e.target.getAttribute("data-id"));
|
|
13275
|
+
this.current = clickedId;
|
|
13276
|
+
this.emitPageEvent({}, clickedId);
|
|
13277
|
+
}
|
|
13278
|
+
//handles click on the next section buttons
|
|
13279
|
+
sectionClickHandler(e, direction) {
|
|
13280
|
+
e.preventDefault();
|
|
13281
|
+
let next = this.internalSectionIndex + direction;
|
|
13282
|
+
if (next >= this.totalPages / this.take) {
|
|
13283
|
+
next = this.totalPages / this.take - 1;
|
|
13284
|
+
}
|
|
13285
|
+
const newSection = next;
|
|
13286
|
+
this.internalSectionIndex = newSection >= 0 ? newSection : 0;
|
|
13287
|
+
}
|
|
13288
|
+
//handles click on the jump (1)button
|
|
13289
|
+
jumpToStart(e) {
|
|
13290
|
+
e.preventDefault();
|
|
13291
|
+
this.internalSectionIndex = 0;
|
|
13292
|
+
this.current = 1;
|
|
13293
|
+
}
|
|
13294
|
+
//handles click on the jump (total) button
|
|
13295
|
+
jumpToEnd(e) {
|
|
13296
|
+
e.preventDefault();
|
|
13297
|
+
this.internalSectionIndex = this.totalPages / this.take - 1;
|
|
13298
|
+
this.current = this.totalPages;
|
|
13299
|
+
}
|
|
13300
|
+
// render the individual page numbers
|
|
13301
|
+
renderPageNumbers() {
|
|
13302
|
+
const items = [];
|
|
13303
|
+
let i = this.internalSectionIndex * this.visibleItems;
|
|
13304
|
+
do {
|
|
13305
|
+
i++;
|
|
13306
|
+
if (i > this.totalPages) {
|
|
13307
|
+
break;
|
|
13308
|
+
}
|
|
13309
|
+
items.push(hAsync("li", { class: {
|
|
13310
|
+
"duet-pagination-item": true,
|
|
13311
|
+
"duet-pagination-item-is-active": i === this.current,
|
|
13312
|
+
}, role: "menuitem" }, hAsync("duet-button", { class: {
|
|
13313
|
+
"duet-pagination-link": true,
|
|
13314
|
+
}, 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) }, hAsync("div", { class: "duet-pagination-page-number", "aria-hidden": true }, i))));
|
|
13315
|
+
} while (i < this.visibleItems + this.internalSectionIndex * this.visibleItems);
|
|
13316
|
+
return items;
|
|
13317
|
+
}
|
|
13318
|
+
shouldDisplayNavigation() {
|
|
13319
|
+
if (this.variation !== "compact") {
|
|
13320
|
+
return shouldDisplayNavigation(this.visibleItems, this.total, this.take);
|
|
13321
|
+
}
|
|
13322
|
+
return false;
|
|
13323
|
+
}
|
|
13324
|
+
/**
|
|
13325
|
+
* render() function
|
|
13326
|
+
* Always the last one in the class.
|
|
13327
|
+
*/
|
|
13328
|
+
render() {
|
|
13329
|
+
return (hAsync(Host, { onKeyDown: e => this.onKeyboardDown(e) }, hAsync("nav", { role: "navigation", "aria-labelledby": this.listId, "aria-describedby": this.listId, ref: el => (this.nativeNav = el), "aria-controls": this.ariaControls, class: {
|
|
13330
|
+
"duet-pagination-nav": true,
|
|
13331
|
+
[`duet-pagination-variation-${this.variation}`]: true,
|
|
13332
|
+
} }, this.numbersStore !== "" && (hAsync("div", { "aria-live": "assertive", "aria-relevant": "text", class: "duet-pagination-overlay", "aria-label": `${this.accessibleLabels.jump_to} ${this.numbersStore}`, part: "navigation-overlay" }, hAsync("duet-badge", null, "jump to page : ", this.numbersStore))), hAsync("ol", { id: this.listId, class: {
|
|
13333
|
+
"duet-pagination": true,
|
|
13334
|
+
"duet-pagination-is-dimmed": this.numbersStore !== "",
|
|
13335
|
+
}, role: "menubar", "aria-label": this.accessibleLabels.pagination_label, "aria-description": this.accessibleLabels.description }, hAsync("li", { class: {
|
|
13336
|
+
"duet-pagination-page-button": true,
|
|
13337
|
+
"duet-pagination-button-first": true,
|
|
13338
|
+
}, role: "menuitem", part: "navigation-arrow" }, hAsync("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() && (hAsync(Fragment, null, hAsync("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, hAsync("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) }, hAsync("div", { class: "duet-pagination-page-number" }, "1"))), hAsync("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, hAsync("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) }, hAsync("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))))), this.renderPageNumbers(), this.internalSectionIndex !== this.totalPages / this.visibleItems - 1 && this.shouldDisplayNavigation() && (hAsync(Fragment, null, hAsync("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, hAsync("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) }, hAsync("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))), hAsync("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, hAsync("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) }, hAsync("div", { class: "duet-pagination-page-number" }, this.totalPages))))), hAsync("li", { class: {
|
|
13339
|
+
"duet-pagination-page-button": true,
|
|
13340
|
+
"duet-pagination-button-last": true,
|
|
13341
|
+
}, role: "menuitem", part: "navigation-arrow" }, hAsync("duet-action-button", { disabled: this.current === this.totalPages &&
|
|
13342
|
+
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" }))))));
|
|
13343
|
+
}
|
|
13344
|
+
get element() { return getElement(this); }
|
|
13345
|
+
static get watchers() { return {
|
|
13346
|
+
"current": ["watchStateHandler"]
|
|
13347
|
+
}; }
|
|
13348
|
+
static get style() { return duetPaginationCss; }
|
|
13349
|
+
static get cmpMeta() { return {
|
|
13350
|
+
"$flags$": 9,
|
|
13351
|
+
"$tagName$": "duet-pagination",
|
|
13352
|
+
"$members$": {
|
|
13353
|
+
"theme": [1025],
|
|
13354
|
+
"jumpString": [1, "jump-string"],
|
|
13355
|
+
"variation": [1],
|
|
13356
|
+
"accessibleLabelsDefaults": [16],
|
|
13357
|
+
"accessibleLabels": [16],
|
|
13358
|
+
"take": [1026],
|
|
13359
|
+
"visibleItems": [1026, "visible-items"],
|
|
13360
|
+
"total": [1026],
|
|
13361
|
+
"ariaControls": [1, "accessible-controls"],
|
|
13362
|
+
"current": [1026],
|
|
13363
|
+
"numbersStore": [32],
|
|
13364
|
+
"totalPages": [32],
|
|
13365
|
+
"internalSectionIndex": [32]
|
|
13366
|
+
},
|
|
13367
|
+
"$listeners$": undefined,
|
|
13368
|
+
"$lazyBundleId$": "-",
|
|
13369
|
+
"$attrsToReflect$": []
|
|
13370
|
+
}; }
|
|
13371
|
+
}
|
|
13372
|
+
|
|
13016
13373
|
const duetParagraphCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-paragraph,*.sc-duet-paragraph::after,*.sc-duet-paragraph::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-paragraph-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-paragraph*/.duet-paragraph.sc-duet-paragraph{margin-bottom:16px !important;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}/*!@.duet-paragraph.duet-p-0*/.duet-paragraph.duet-p-0.sc-duet-paragraph{padding:0 !important}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.duet-theme-turva*/.duet-paragraph.duet-theme-turva.sc-duet-paragraph{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}/*!@.duet-paragraph.duet-paragraph-small*/.duet-paragraph.duet-paragraph-small.sc-duet-paragraph{font-size:0.875rem}/*!@.duet-paragraph.duet-paragraph-semi-bold*/.duet-paragraph.duet-paragraph-semi-bold.sc-duet-paragraph{font-weight:600}/*!@.duet-paragraph.duet-paragraph-bold*/.duet-paragraph.duet-paragraph-bold.sc-duet-paragraph{font-weight:700}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1rem}}@media (min-width: 46.2962962963rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1.25rem}}/*!@.duet-paragraph.intro.duet-m-0*/.duet-paragraph.intro.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@::slotted(a)*/.sc-duet-paragraph-s>a{font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;transition:300ms ease}/*!@::slotted(a).duet-theme-turva*/.sc-duet-paragraph-s>a.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}/*!@::slotted(a):hover*/.sc-duet-paragraph-s>a:hover{color:#004d80;text-decoration:none}/*!@::slotted(a):hover.duet-theme-turva*/.sc-duet-paragraph-s>a:hover.duet-theme-turva{color:#940925}/*!@::slotted(a):active*/.sc-duet-paragraph-s>a:active{opacity:0.75;transition:none}";
|
|
13017
13374
|
|
|
13018
13375
|
/**
|
|
@@ -13621,36 +13978,206 @@ class DuetRangeSlider {
|
|
|
13621
13978
|
} }, hAsync("duet-label", { theme: theme, margin: "small", for: identifier }, this.label), hAsync("output", { "aria-hidden": "true", htmlFor: identifier, class: "duet-output" }, this.value.toLocaleString(this.locale), this.unit), hAsync("input", { onInput: this.onInput, onChange: this.onChange, ref: input => (this.nativeInput = input), type: "range", min: this.min, max: this.max, step: this.step, value: this.value, style: rangeStyles, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.value, "aria-valuetext": `${this.value} ${this.unit}`, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.accessibleDescribedBy, id: identifier, name: this.name, disabled: this.disabled, required: this.required, class: "duet-range" }))));
|
|
13622
13979
|
}
|
|
13623
13980
|
get element() { return getElement(this); }
|
|
13624
|
-
static get style() { return duetRangeSliderCss; }
|
|
13981
|
+
static get style() { return duetRangeSliderCss; }
|
|
13982
|
+
static get cmpMeta() { return {
|
|
13983
|
+
"$flags$": 2,
|
|
13984
|
+
"$tagName$": "duet-range-slider",
|
|
13985
|
+
"$members$": {
|
|
13986
|
+
"theme": [1025],
|
|
13987
|
+
"margin": [1],
|
|
13988
|
+
"expand": [4],
|
|
13989
|
+
"identifier": [1],
|
|
13990
|
+
"name": [1],
|
|
13991
|
+
"required": [4],
|
|
13992
|
+
"disabled": [516],
|
|
13993
|
+
"accessibleActiveDescendant": [1, "accessible-active-descendant"],
|
|
13994
|
+
"accessibleControls": [1, "accessible-controls"],
|
|
13995
|
+
"accessibleOwns": [1, "accessible-owns"],
|
|
13996
|
+
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
13997
|
+
"min": [2],
|
|
13998
|
+
"label": [1],
|
|
13999
|
+
"labelHidden": [4, "label-hidden"],
|
|
14000
|
+
"unit": [1],
|
|
14001
|
+
"max": [2],
|
|
14002
|
+
"step": [2],
|
|
14003
|
+
"locale": [1],
|
|
14004
|
+
"value": [1026],
|
|
14005
|
+
"debounce": [2],
|
|
14006
|
+
"setFocus": [64]
|
|
14007
|
+
},
|
|
14008
|
+
"$listeners$": undefined,
|
|
14009
|
+
"$lazyBundleId$": "-",
|
|
14010
|
+
"$attrsToReflect$": [["disabled", "disabled"]]
|
|
14011
|
+
}; }
|
|
14012
|
+
}
|
|
14013
|
+
|
|
14014
|
+
const duetRangeStepperCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-range-stepper,*.sc-duet-range-stepper::after,*.sc-duet-range-stepper::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-range-stepper-h{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*/.duet-range-stepper.sc-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*/.duet-range-stepper.sc-duet-range-stepper{white-space:nowrap}/*!@.duet-range-stepper .duet-range-step-counter*/.duet-range-stepper.sc-duet-range-stepper .duet-range-step-counter.sc-duet-range-stepper{font-weight:600;color:#00294d}/*!@.duet-range-stepper ::part(button)*/.duet-range-stepper.sc-duet-range-stepper .sc-duet-range-stepper::part(button){border:0}";
|
|
14015
|
+
|
|
14016
|
+
class DuetRangeStepper {
|
|
14017
|
+
constructor(hostRef) {
|
|
14018
|
+
registerInstance(this, hostRef);
|
|
14019
|
+
this.duetRangeStepUpdate = createEvent$2(this, "duetRangeStepUpdate", 7);
|
|
14020
|
+
this.leftBn = createID("duetRangeStepper-left");
|
|
14021
|
+
this.rightBn = createID("duetRangeStepper-right");
|
|
14022
|
+
/**
|
|
14023
|
+
* Theme of the component.
|
|
14024
|
+
*/
|
|
14025
|
+
this.theme = "";
|
|
14026
|
+
/**
|
|
14027
|
+
* Start value
|
|
14028
|
+
* @default 1
|
|
14029
|
+
*/
|
|
14030
|
+
this.stepIndex = 1;
|
|
14031
|
+
/**
|
|
14032
|
+
* How big is the step
|
|
14033
|
+
* @default 99
|
|
14034
|
+
*/
|
|
14035
|
+
this.stepSize = 50;
|
|
14036
|
+
/**
|
|
14037
|
+
* Total of
|
|
14038
|
+
* @default undefined
|
|
14039
|
+
*/
|
|
14040
|
+
this.total = 1000;
|
|
14041
|
+
/**
|
|
14042
|
+
* Default range stepper labels
|
|
14043
|
+
*/
|
|
14044
|
+
this.ariaLabelsDefaults = {
|
|
14045
|
+
en: {
|
|
14046
|
+
next_increment: "Next range increment",
|
|
14047
|
+
previous_increment: "Previous range increment",
|
|
14048
|
+
x_of_y: "{0}–{1} of {2}",
|
|
14049
|
+
},
|
|
14050
|
+
fi: {
|
|
14051
|
+
next_increment: "Seuraava välillä",
|
|
14052
|
+
previous_increment: "Edellinen välillä",
|
|
14053
|
+
x_of_y: "{0}–{1} / {2}",
|
|
14054
|
+
},
|
|
14055
|
+
sv: {
|
|
14056
|
+
next_increment: "Nästa intervall",
|
|
14057
|
+
previous_increment: "Föregående intervall",
|
|
14058
|
+
x_of_y: "{0}–{1} av {2}",
|
|
14059
|
+
},
|
|
14060
|
+
};
|
|
14061
|
+
/**
|
|
14062
|
+
* Default pagination labels
|
|
14063
|
+
*/
|
|
14064
|
+
this.ariaLabels = getLocaleString(this.ariaLabelsDefaults);
|
|
14065
|
+
/**
|
|
14066
|
+
* Used to indicate which dom element with ID this element controls
|
|
14067
|
+
*/
|
|
14068
|
+
this.ariaControls = "";
|
|
14069
|
+
this.handleClick = (e, direction) => {
|
|
14070
|
+
e.preventDefault();
|
|
14071
|
+
this.increment(direction);
|
|
14072
|
+
this.handleStepClick(e);
|
|
14073
|
+
};
|
|
14074
|
+
}
|
|
14075
|
+
watchStateHandler(newValue) {
|
|
14076
|
+
if (newValue === 1) {
|
|
14077
|
+
this.leftBnRef.setAttribute("disabled", "");
|
|
14078
|
+
this.rightBnRef.focus();
|
|
14079
|
+
}
|
|
14080
|
+
else {
|
|
14081
|
+
this.leftBnRef.removeAttribute("disabled");
|
|
14082
|
+
}
|
|
14083
|
+
if (newValue === this.total / this.stepSize) {
|
|
14084
|
+
this.rightBnRef.setAttribute("disabled", "");
|
|
14085
|
+
this.leftBnRef.focus();
|
|
14086
|
+
}
|
|
14087
|
+
else {
|
|
14088
|
+
this.rightBnRef.removeAttribute("disabled");
|
|
14089
|
+
}
|
|
14090
|
+
}
|
|
14091
|
+
handleStepClick(e) {
|
|
14092
|
+
this.duetRangeStepUpdate.emit({
|
|
14093
|
+
originalEvent: e,
|
|
14094
|
+
component: "duet-range-stepper",
|
|
14095
|
+
from: this.stepIndex * this.stepSize - this.stepSize,
|
|
14096
|
+
to: this.stepIndex * this.stepSize,
|
|
14097
|
+
index: this.stepIndex,
|
|
14098
|
+
});
|
|
14099
|
+
}
|
|
14100
|
+
componentWillLoad() {
|
|
14101
|
+
inheritGlobalTheme(this);
|
|
14102
|
+
}
|
|
14103
|
+
componentDidLoad() {
|
|
14104
|
+
this.watchStateHandler(this.stepIndex);
|
|
14105
|
+
}
|
|
14106
|
+
increment(direction) {
|
|
14107
|
+
const newIndex = this.stepIndex + direction;
|
|
14108
|
+
if (newIndex <= 0) {
|
|
14109
|
+
this.stepIndex = 1;
|
|
14110
|
+
}
|
|
14111
|
+
else {
|
|
14112
|
+
if (newIndex * this.stepSize <= this.total) {
|
|
14113
|
+
this.stepIndex = newIndex;
|
|
14114
|
+
}
|
|
14115
|
+
}
|
|
14116
|
+
}
|
|
14117
|
+
generateStepSize() {
|
|
14118
|
+
// this function uses this.stepIndex and this.range to generate a range of number like 1-100
|
|
14119
|
+
// this is used to generate the step size
|
|
14120
|
+
let start = (this.stepIndex - 1) * this.stepSize;
|
|
14121
|
+
//easy fix for starting position
|
|
14122
|
+
if (start === 0) {
|
|
14123
|
+
start = 1;
|
|
14124
|
+
}
|
|
14125
|
+
const end = this.stepIndex * this.stepSize;
|
|
14126
|
+
return this.ariaLabels.x_of_y
|
|
14127
|
+
.replace("{0}", String(start))
|
|
14128
|
+
.replace("{1}", String(end))
|
|
14129
|
+
.replace("{2}", String(this.total));
|
|
14130
|
+
}
|
|
14131
|
+
//handle a11y keyboard navigation events
|
|
14132
|
+
async onKeyboardDown(e) {
|
|
14133
|
+
// handle a11y based keyboard navigation for left/right/up/down
|
|
14134
|
+
let next = this.stepIndex;
|
|
14135
|
+
let dir = 1;
|
|
14136
|
+
if (isArrowLeftKey(e) || isArrowUpKey(e) || isMinusKey(e)) {
|
|
14137
|
+
next--;
|
|
14138
|
+
dir = -1;
|
|
14139
|
+
this.leftBnRef.focus();
|
|
14140
|
+
}
|
|
14141
|
+
if (isArrowRightKey(e) || isArrowDownKey(e) || isPlusKey(e)) {
|
|
14142
|
+
next++;
|
|
14143
|
+
dir = 1;
|
|
14144
|
+
}
|
|
14145
|
+
if (isArrowKey(e)) {
|
|
14146
|
+
if (next > 0 && next * this.stepSize <= this.total) {
|
|
14147
|
+
this.handleClick(e, dir);
|
|
14148
|
+
}
|
|
14149
|
+
}
|
|
14150
|
+
}
|
|
14151
|
+
/**
|
|
14152
|
+
* render() function
|
|
14153
|
+
* Always the last one in the class.
|
|
14154
|
+
*/
|
|
14155
|
+
render() {
|
|
14156
|
+
return (hAsync("div", { class: {
|
|
14157
|
+
"duet-range-stepper": true,
|
|
14158
|
+
"duet-theme-turva": this.theme === "turva",
|
|
14159
|
+
}, onKeyDown: e => this.onKeyboardDown(e), "aria-controls": this.ariaControls }, hAsync("span", { class: "duet-range-step-counter", part: "range-numbers" }, this.generateStepSize()), hAsync("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" }), hAsync("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" })));
|
|
14160
|
+
}
|
|
14161
|
+
get element() { return getElement(this); }
|
|
14162
|
+
static get watchers() { return {
|
|
14163
|
+
"stepIndex": ["watchStateHandler"]
|
|
14164
|
+
}; }
|
|
14165
|
+
static get style() { return duetRangeStepperCss; }
|
|
13625
14166
|
static get cmpMeta() { return {
|
|
13626
|
-
"$flags$":
|
|
13627
|
-
"$tagName$": "duet-range-
|
|
14167
|
+
"$flags$": 9,
|
|
14168
|
+
"$tagName$": "duet-range-stepper",
|
|
13628
14169
|
"$members$": {
|
|
13629
14170
|
"theme": [1025],
|
|
13630
|
-
"
|
|
13631
|
-
"
|
|
13632
|
-
"
|
|
13633
|
-
"
|
|
13634
|
-
"
|
|
13635
|
-
"
|
|
13636
|
-
"accessibleActiveDescendant": [1, "accessible-active-descendant"],
|
|
13637
|
-
"accessibleControls": [1, "accessible-controls"],
|
|
13638
|
-
"accessibleOwns": [1, "accessible-owns"],
|
|
13639
|
-
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
13640
|
-
"min": [2],
|
|
13641
|
-
"label": [1],
|
|
13642
|
-
"labelHidden": [4, "label-hidden"],
|
|
13643
|
-
"unit": [1],
|
|
13644
|
-
"max": [2],
|
|
13645
|
-
"step": [2],
|
|
13646
|
-
"locale": [1],
|
|
13647
|
-
"value": [1026],
|
|
13648
|
-
"debounce": [2],
|
|
13649
|
-
"setFocus": [64]
|
|
14171
|
+
"stepIndex": [1026, "step-index"],
|
|
14172
|
+
"stepSize": [2, "step-size"],
|
|
14173
|
+
"total": [2],
|
|
14174
|
+
"ariaLabelsDefaults": [16],
|
|
14175
|
+
"ariaLabels": [16],
|
|
14176
|
+
"ariaControls": [1, "accessible-controls"]
|
|
13650
14177
|
},
|
|
13651
14178
|
"$listeners$": undefined,
|
|
13652
14179
|
"$lazyBundleId$": "-",
|
|
13653
|
-
"$attrsToReflect$": [
|
|
14180
|
+
"$attrsToReflect$": []
|
|
13654
14181
|
}; }
|
|
13655
14182
|
}
|
|
13656
14183
|
|
|
@@ -13827,7 +14354,7 @@ class DuetScrollable {
|
|
|
13827
14354
|
}; }
|
|
13828
14355
|
}
|
|
13829
14356
|
|
|
13830
|
-
const duetSelectCss = "@charset \"UTF-8\";*.sc-duet-select,*.sc-duet-select::after,*.sc-duet-select::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-select-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;max-width:100%;vertical-align:bottom}.sc-duet-select-h:last-child,.sc-duet-select-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-select-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-select-h{width:100% !important}}.duet-m-0.sc-duet-select-h{margin:0 !important}duet-tooltip.sc-duet-select{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-select{position:relative;top:4px;right:auto}}.duet-select-placeholder.sc-duet-select{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-select-container.sc-duet-select{position:relative;width:100%}.duet-select-wrapper.sc-duet-select{position:relative;width:100%;padding:15px 14px !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select::after{content:\" \"}.duet-select-wrapper.sc-duet-select select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:200;width:100%;height:100%;padding:0;margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;cursor:pointer;border:0;outline:none;opacity:0}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#909599;box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#747475;box-shadow:0 0 0 1px #747475}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#171c3a}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#0077b3}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select{cursor:default !important}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#00294d !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:block;width:100%;min-width:8rem;padding:12px 14px !important;padding-right:48px !important;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:#00294d;text-align:left;text-overflow:ellipsis;white-space:nowrap;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#de2362 !important}.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#e02a0d !important}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#747475}.duet-select.sc-duet-select svg.sc-duet-select{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select svg.sc-duet-select{color:#171c3a}.duet-select-help.sc-duet-select{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#657787;border-radius:4px}.duet-select-help.sc-duet-select span.sc-duet-select{display:block;margin-top:8px}.duet-theme-turva.sc-duet-select .duet-select-help.sc-duet-select{color:#747475}.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#e02a0d}.duet-label-hidden.sc-duet-select duet-label.sc-duet-select{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
14357
|
+
const duetSelectCss = "@charset \"UTF-8\";*.sc-duet-select,*.sc-duet-select::after,*.sc-duet-select::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-select-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;max-width:100%;vertical-align:bottom}.sc-duet-select-h:last-child,.sc-duet-select-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-select-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-select-h{width:100% !important}}.duet-select-variation-tiny.sc-duet-select-h{position:relative;top:-2px;width:72px;margin:0 !important;vertical-align:baseline}.duet-m-0.sc-duet-select-h{margin:0 !important}duet-tooltip.sc-duet-select{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-select{position:relative;top:4px;right:auto}}.duet-select-placeholder.sc-duet-select{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-select-container.sc-duet-select{position:relative;width:100%}.duet-select-container.duet-select-variation-tiny.sc-duet-select{width:72px}.duet-select-wrapper.sc-duet-select{position:relative;width:100%;padding:15px 14px !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-variation-tiny.sc-duet-select .duet-select-wrapper.sc-duet-select{width:81px;padding:0 !important}.duet-select-wrapper.sc-duet-select::after{content:\" \"}.duet-select-wrapper.sc-duet-select select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:200;width:100%;height:100%;padding:0;margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;cursor:pointer;border:0;outline:none;opacity:0}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#909599;box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#747475;box-shadow:0 0 0 1px #747475}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#171c3a}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#0077b3}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select{cursor:default !important}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#00294d !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:block;width:100%;min-width:8rem;padding:12px 14px !important;padding-right:48px !important;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:#00294d;text-align:left;text-overflow:ellipsis;white-space:nowrap;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#de2362 !important}.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#e02a0d !important}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#747475}.duet-select.sc-duet-select svg.sc-duet-select{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select svg.sc-duet-select{color:#171c3a}.duet-select-variation-tiny.sc-duet-select .duet-select.sc-duet-select{width:72px;min-width:inherit;padding:0 !important;margin-bottom:-4px;overflow:visible;font-weight:600;text-align:center}.duet-select-variation-tiny.sc-duet-select .duet-select.sc-duet-select duet-icon.sc-duet-select{padding-left:10px}.duet-select-help.sc-duet-select{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#657787;border-radius:4px}.duet-select-help.sc-duet-select span.sc-duet-select{display:block;margin-top:8px}.duet-theme-turva.sc-duet-select .duet-select-help.sc-duet-select{color:#747475}.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#e02a0d}.duet-label-hidden.sc-duet-select duet-label.sc-duet-select{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
13831
14358
|
|
|
13832
14359
|
function isOptionGroup(item) {
|
|
13833
14360
|
return "options" in item;
|
|
@@ -13862,6 +14389,10 @@ class DuetSelect {
|
|
|
13862
14389
|
* Inlined decorator, alphabetical order.
|
|
13863
14390
|
*/
|
|
13864
14391
|
this.processedItems = null;
|
|
14392
|
+
/**
|
|
14393
|
+
* Variation of dropdown. -tiny is used for small numbers / tiny option ranges.
|
|
14394
|
+
*/
|
|
14395
|
+
this.variation = "default";
|
|
13865
14396
|
/**
|
|
13866
14397
|
* Controls the margin of the component.
|
|
13867
14398
|
*/
|
|
@@ -13993,15 +14524,23 @@ class DuetSelect {
|
|
|
13993
14524
|
*/
|
|
13994
14525
|
render() {
|
|
13995
14526
|
const identifier = this.identifier || this.selectId;
|
|
13996
|
-
return (hAsync(Host, { onClick: this.onClick, class: {
|
|
14527
|
+
return (hAsync(Host, { onClick: this.onClick, class: {
|
|
14528
|
+
"duet-m-0": this.margin === "none",
|
|
14529
|
+
"duet-expand": this.expand,
|
|
14530
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
14531
|
+
} }, hAsync("div", { class: {
|
|
13997
14532
|
"duet-select-container": true,
|
|
13998
14533
|
"duet-label-hidden": this.labelHidden,
|
|
13999
14534
|
"duet-theme-turva": this.theme === "turva",
|
|
14535
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
14000
14536
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
14001
14537
|
"has-error": !!this.error,
|
|
14002
14538
|
} }, hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), hAsync("div", { class: "duet-select-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-select-placeholder", size: "small" }, this.placeholder)), hAsync("select", { ref: select => (this.nativeSelect = select), disabled: this.disabled, name: this.name, id: identifier, role: this.role, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, required: this.required, "aria-describedby": this.accessibleDescribedBy }, this.placeholder && (hAsync("option", { disabled: true, selected: true, value: "" }, this.placeholder)), !this.processedItems ? (hAsync("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
|
|
14003
14539
|
return isOptionGroup(item) ? this.renderOptionGroup(item) : this.renderOption(item);
|
|
14004
|
-
}))), hAsync("div", { class:
|
|
14540
|
+
}))), hAsync("div", { class: {
|
|
14541
|
+
"duet-select": true,
|
|
14542
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
14543
|
+
}, "aria-hidden": "true" }, hAsync("span", { key: this.value }, this.getSelectedItemLabel()), this.variation !== "tiny" && (hAsync("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" }))), this.variation === "tiny" && (hAsync("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xx-small" })))), hAsync("span", { class: "duet-select-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error)))));
|
|
14005
14544
|
}
|
|
14006
14545
|
get element() { return getElement(this); }
|
|
14007
14546
|
static get watchers() { return {
|
|
@@ -14013,6 +14552,7 @@ class DuetSelect {
|
|
|
14013
14552
|
"$flags$": 2,
|
|
14014
14553
|
"$tagName$": "duet-select",
|
|
14015
14554
|
"$members$": {
|
|
14555
|
+
"variation": [1],
|
|
14016
14556
|
"accessibleActiveDescendant": [1, "accessible-active-descendant"],
|
|
14017
14557
|
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
14018
14558
|
"margin": [1],
|
|
@@ -14448,6 +14988,10 @@ class DuetTab {
|
|
|
14448
14988
|
|
|
14449
14989
|
const duetTabGroupCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-tab-group,*.sc-duet-tab-group::after,*.sc-duet-tab-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-tab-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;display:block;width:100%}/*!@.duet-tab-group-tabs*/.duet-tab-group-tabs.sc-duet-tab-group{margin-bottom:28px !important;display:block;width:100%;max-width:100%;padding-top:2px;list-style:none}/*!@.duet-tab-group-tabs.duet-m-0*/.duet-tab-group-tabs.duet-m-0.sc-duet-tab-group{margin:0 !important}/*!@.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden*/.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden.sc-duet-tab-group{display:none}@media (min-width: 36em){/*!@.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden*/.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden.sc-duet-tab-group{display:block}}/*!@.duet-tab-variation-plain .duet-tab-group-tabs*/.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom:1px solid #e1e3e6}/*!@.duet-theme-turva.duet-tab-variation-plain .duet-tab-group-tabs*/.duet-theme-turva.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom-color:#e4e4e6}@media (min-width: 36em){/*!@duet-select*/duet-select.sc-duet-tab-group{display:none !important}}/*!@.duet-tab-button*/.duet-tab-button.sc-duet-tab-group{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:20px;margin-top:-2px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.1;color:#00294d;text-align:left;text-decoration:none;cursor:pointer;background:white;border:2px solid #e1e3e6;border-radius:0;transition:150ms ease}/*!@.duet-tab-button.duet-p-0*/.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}/*!@.duet-tab-button.duet-m-0*/.duet-tab-button.duet-m-0.sc-duet-tab-group{margin:0 !important}/*!@.duet-theme-turva .duet-tab-button*/.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6}/*!@.duet-tab-button.duet-p-0*/.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}@media (min-width: 36em){/*!@.duet-tab-button*/.duet-tab-button.sc-duet-tab-group{display:inline-block;width:auto;margin-left:-2px;border-right:2px solid #e1e3e6;border-radius:0}}/*!@.duet-tab-button:hover*/.duet-tab-button.sc-duet-tab-group:hover{z-index:200;border-color:#909599}/*!@.duet-theme-turva .duet-tab-button:hover*/.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:hover{border-color:#747475}/*!@.duet-tab-button:active*/.duet-tab-button.sc-duet-tab-group:active{opacity:0.75;transition:none}/*!@.duet-tab-button.selected*/.duet-tab-button.selected.sc-duet-tab-group{z-index:201;color:white;background:#00294d;border-color:#00294d;outline:0;box-shadow:none !important}/*!@.duet-theme-turva .duet-tab-button.selected*/.duet-theme-turva.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:white;background-color:#171c3a;border-color:#171c3a}/*!@.duet-tab-button:focus*/.duet-tab-button.sc-duet-tab-group:focus{z-index:200;outline:0}/*!@:host(.user-is-tabbing) .duet-tab-button:focus*/.user-is-tabbing.sc-duet-tab-group-h .duet-tab-button.sc-duet-tab-group:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}/*!@:host(.user-is-tabbing) .duet-theme-turva .duet-tab-button:focus*/.user-is-tabbing.sc-duet-tab-group-h .duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}/*!@.duet-tab-button:first-child*/.duet-tab-button.sc-duet-tab-group:first-child{border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){/*!@.duet-tab-button:first-child*/.duet-tab-button.sc-duet-tab-group:first-child{border-top-right-radius:0;border-bottom-left-radius:4px}}/*!@.duet-tab-button:last-child*/.duet-tab-button.sc-duet-tab-group:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){/*!@.duet-tab-button:last-child*/.duet-tab-button.sc-duet-tab-group:last-child{border-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}}/*!@.duet-tab-variation-plain .duet-tab-button*/.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group{display:inline-block;width:auto;padding-right:0;padding-left:0;border:0;border-radius:0;transition:none}/*!@.duet-tab-variation-plain .duet-tab-button + .duet-tab-button*/.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group+.duet-tab-button.sc-duet-tab-group{margin-left:36px}/*!@.duet-tab-variation-plain .duet-tab-button.selected*/.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#0077b3;background:white;border-bottom:3px solid #0077b3}/*!@.duet-theme-turva.duet-tab-variation-plain .duet-tab-button.selected*/.duet-theme-turva.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#c60c30;border-bottom-color:#c60c30}/*!@.duet-tab-group-content*/.duet-tab-group-content.sc-duet-tab-group{position:relative;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left}/*!@.duet-theme-turva .duet-tab-group-content*/.duet-theme-turva.sc-duet-tab-group .duet-tab-group-content.sc-duet-tab-group{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
|
|
14450
14990
|
|
|
14991
|
+
/**
|
|
14992
|
+
* @part ${identifier}-button - piercing selector for styling tab buttons
|
|
14993
|
+
* @part ${identifier}-button--selected - piercing selector for styling selected tab button
|
|
14994
|
+
*/
|
|
14451
14995
|
class DuetTabGroup {
|
|
14452
14996
|
constructor(hostRef) {
|
|
14453
14997
|
registerInstance(this, hostRef);
|
|
@@ -14533,7 +15077,7 @@ class DuetTabGroup {
|
|
|
14533
15077
|
};
|
|
14534
15078
|
this.renderTab = () => {
|
|
14535
15079
|
const renderedTabs = this.tabs.map((element, index) => {
|
|
14536
|
-
return (hAsync("button", { role: "tab", id: this.getButtonId(index), "aria-controls": this.getTabId(index), "aria-selected": element.selected ? "true" : "false", "aria-description": this.getAccessibleDescription(index), part: `${this.identifier}-button`, type: "button", class: {
|
|
15080
|
+
return (hAsync("button", { role: "tab", id: this.getButtonId(index), "aria-controls": this.getTabId(index), "aria-selected": element.selected ? "true" : "false", "aria-description": this.getAccessibleDescription(index), part: `${this.identifier}-button ${element.selected ? `${this.identifier}-button--selected` : ""}`, type: "button", class: {
|
|
14537
15081
|
"duet-p-0": this.padding === "none",
|
|
14538
15082
|
"duet-tab-button": true,
|
|
14539
15083
|
selected: element.selected,
|
|
@@ -14680,7 +15224,7 @@ class DuetTabGroup {
|
|
|
14680
15224
|
}; }
|
|
14681
15225
|
}
|
|
14682
15226
|
|
|
14683
|
-
const duetTableCss = "duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}
|
|
15227
|
+
const duetTableCss = "duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.duet-table-flattened tbody tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-table-flattened tbody tr.duet-table-action-row td:last-child::before{padding:0;content:\"\"}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{grid-column:1/2;line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-table-flattened td:last-child{grid-row:1;grid-column:2}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}";
|
|
14684
15228
|
|
|
14685
15229
|
// remove wrapping speech marks.
|
|
14686
15230
|
// media query tokens are wrapped in speech marks,
|
|
@@ -14701,6 +15245,11 @@ const stickyTopValues = {
|
|
|
14701
15245
|
"with-links": parseFloat(sizeNavigation) * 16,
|
|
14702
15246
|
"without-links": parseFloat(sizeHeader) * 16,
|
|
14703
15247
|
};
|
|
15248
|
+
/**
|
|
15249
|
+
* @slot dot-menu- If this slot is populated - the content will be displayed together with a ... type menu to the far right in the tsble header
|
|
15250
|
+
* @slot header - Header slot for the table
|
|
15251
|
+
* @slot footer - Footer slot for the table
|
|
15252
|
+
*/
|
|
14704
15253
|
class DuetTable {
|
|
14705
15254
|
constructor(hostRef) {
|
|
14706
15255
|
registerInstance(this, hostRef);
|
|
@@ -14765,6 +15314,9 @@ class DuetTable {
|
|
|
14765
15314
|
return;
|
|
14766
15315
|
}
|
|
14767
15316
|
}
|
|
15317
|
+
/**
|
|
15318
|
+
* Local methods.
|
|
15319
|
+
*/
|
|
14768
15320
|
copyHeadingsToCells() {
|
|
14769
15321
|
const headingElements = this.element.querySelectorAll("thead th");
|
|
14770
15322
|
const rowElements = this.element.querySelectorAll("tbody tr");
|
|
@@ -15782,7 +16334,7 @@ const validateFile = (item, validators) => {
|
|
|
15782
16334
|
if (item) {
|
|
15783
16335
|
const { name, type, size } = item;
|
|
15784
16336
|
const mime = validateFileMime(type, allowedMimetypes);
|
|
15785
|
-
const ext = validateFileExtension(name, allowedExtensions);
|
|
16337
|
+
const ext = validateFileExtension(name.toLowerCase(), allowedExtensions);
|
|
15786
16338
|
const bytes = validateFileSize(size, maxBytes);
|
|
15787
16339
|
if (!mime) {
|
|
15788
16340
|
errorMessage = getError("duet-upload-101");
|
|
@@ -15862,7 +16414,7 @@ const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress })
|
|
|
15862
16414
|
return xhr;
|
|
15863
16415
|
};
|
|
15864
16416
|
|
|
15865
|
-
const duetUploadCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-upload,*.sc-duet-upload::after,*.sc-duet-upload::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-upload-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@::slotted([slot=header])*/.sc-duet-upload-s>[slot=header]{margin-bottom:16px}/*!@::slotted([slot=fileheader])*/.sc-duet-upload-s>[slot=fileheader]{margin:16px 0 0 0}/*!@::slotted([slot=filefooter])*/.sc-duet-upload-s>[slot=filefooter]{margin-top:16px}/*!@.duet-upload*/.duet-upload.sc-duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-upload-item-size*/.duet-upload-item-size.sc-duet-upload{font-size:0.75rem;font-weight:400}/*!@.duet-upload-filelist*/.duet-upload-filelist.sc-duet-upload{margin-bottom:25px}/*!@.duet-upload-filelist-empty*/.duet-upload-filelist-empty.sc-duet-upload{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";
|
|
16417
|
+
const duetUploadCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-upload,*.sc-duet-upload::after,*.sc-duet-upload::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-upload-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@::slotted([slot=header])*/.sc-duet-upload-s>[slot=header]{margin-bottom:16px}/*!@::slotted([slot=fileheader])*/.sc-duet-upload-s>[slot=fileheader]{margin:16px 0 0 0}/*!@::slotted([slot=filefooter])*/.sc-duet-upload-s>[slot=filefooter]{margin-top:16px}/*!@.duet-upload*/.duet-upload.sc-duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-upload-item-size*/.duet-upload-item-size.sc-duet-upload{font-size:0.75rem;font-weight:400}/*!@.duet-upload-filelist*/.duet-upload-filelist.sc-duet-upload{margin-bottom:25px}/*!@.duet-upload-filelist-empty*/.duet-upload-filelist-empty.sc-duet-upload{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}/*!@.duet-upload-editable-table-header-hidden*/.duet-upload-editable-table-header-hidden.sc-duet-upload{display:none}/*!@.duet-upload-editable-table tbody .duet-upload-editable-table-data*/.duet-upload-editable-table.sc-duet-upload tbody.sc-duet-upload .duet-upload-editable-table-data.sc-duet-upload{padding:0 !important;border:0}/*!@.duet-upload-editable-table duet-editable-table tfoot,\n.duet-upload-editable-table duet-editable-table thead*/.duet-upload-editable-table.sc-duet-upload duet-editable-table.sc-duet-upload tfoot.sc-duet-upload,.duet-upload-editable-table.sc-duet-upload duet-editable-table.sc-duet-upload thead.sc-duet-upload{display:none}/*!@.duet-upload-editable-table duet-editable-table .duet-editable-table-content*/.duet-upload-editable-table.sc-duet-upload duet-editable-table.sc-duet-upload .duet-editable-table-content.sc-duet-upload{padding-right:0 !important;padding-left:0 !important}/*!@.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td*/.duet-upload-editable-table.sc-duet-upload duet-editable-table.sc-duet-upload duet-table.sc-duet-upload .duet-table-action-row.sc-duet-upload td.sc-duet-upload{padding:0.75rem 0 !important}/*!@.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child*/.duet-upload-editable-table.sc-duet-upload duet-editable-table.sc-duet-upload duet-table.sc-duet-upload .duet-table-action-row.sc-duet-upload td.sc-duet-upload:last-child{padding-right:0 !important}/*!@.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button)*/.duet-upload-editable-table.sc-duet-upload duet-editable-table.sc-duet-upload .duet-editable-table-row-inprogress.sc-duet-upload duet-action-button.sc-duet-upload::part(button){border:0}";
|
|
15866
16418
|
|
|
15867
16419
|
/**
|
|
15868
16420
|
* @slot header - named slot - to place content after description / caption
|
|
@@ -15884,25 +16436,6 @@ class DuetUpload {
|
|
|
15884
16436
|
this.duetCancel = createEvent$2(this, "duetCancel", 3);
|
|
15885
16437
|
this.duetProgress = createEvent$2(this, "duetProgress", 3);
|
|
15886
16438
|
this.duetUpload = createEvent$2(this, "duetUpload", 3);
|
|
15887
|
-
/**
|
|
15888
|
-
* Own Properties
|
|
15889
|
-
*/
|
|
15890
|
-
this.buttonId = createID("DuetButton");
|
|
15891
|
-
this.labelId = createID("DuetLabel");
|
|
15892
|
-
this.uploadId = createID("DuetUpload");
|
|
15893
|
-
this.editableTableId = createID("DuetEditableTable");
|
|
15894
|
-
this.filesInProgress = new Map();
|
|
15895
|
-
this.fileMaxReached = false;
|
|
15896
|
-
this.bytesMaxReached = false;
|
|
15897
|
-
this.internalStatusMessageLabel = undefined;
|
|
15898
|
-
/**
|
|
15899
|
-
* Properties
|
|
15900
|
-
*/
|
|
15901
|
-
this.DefaultGroups = {
|
|
15902
|
-
inprogress: "inprogress",
|
|
15903
|
-
success: "success",
|
|
15904
|
-
failure: "failure",
|
|
15905
|
-
};
|
|
15906
16439
|
/**
|
|
15907
16440
|
* State() variables
|
|
15908
16441
|
*/
|
|
@@ -15924,8 +16457,9 @@ class DuetUpload {
|
|
|
15924
16457
|
{
|
|
15925
16458
|
icon: "action-delete",
|
|
15926
16459
|
color: "color-danger",
|
|
15927
|
-
|
|
15928
|
-
|
|
16460
|
+
size: "x-small",
|
|
16461
|
+
background: "gray-lightest",
|
|
16462
|
+
name: "delete",
|
|
15929
16463
|
map: ["success", "failure"],
|
|
15930
16464
|
label: {
|
|
15931
16465
|
fi: "Poista tiedosto",
|
|
@@ -15936,8 +16470,9 @@ class DuetUpload {
|
|
|
15936
16470
|
{
|
|
15937
16471
|
icon: "navigation-close",
|
|
15938
16472
|
color: "primary",
|
|
15939
|
-
|
|
15940
|
-
|
|
16473
|
+
size: "x-small",
|
|
16474
|
+
background: "gray-lightest",
|
|
16475
|
+
name: "cancel",
|
|
15941
16476
|
map: ["inprogress"],
|
|
15942
16477
|
label: {
|
|
15943
16478
|
fi: "Keskeytä lähetys",
|
|
@@ -16007,8 +16542,8 @@ class DuetUpload {
|
|
|
16007
16542
|
inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
16008
16543
|
done: "All {filesTotal} added successfully",
|
|
16009
16544
|
doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
16010
|
-
files: "
|
|
16011
|
-
file: "
|
|
16545
|
+
files: "File",
|
|
16546
|
+
file: "file",
|
|
16012
16547
|
},
|
|
16013
16548
|
};
|
|
16014
16549
|
/**
|
|
@@ -16163,19 +16698,72 @@ class DuetUpload {
|
|
|
16163
16698
|
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
16164
16699
|
*/
|
|
16165
16700
|
this.limitSelection = false;
|
|
16701
|
+
/**
|
|
16702
|
+
* Own Properties
|
|
16703
|
+
*/
|
|
16704
|
+
this.buttonId = createID("DuetButton");
|
|
16705
|
+
this.labelId = createID("DuetLabel");
|
|
16706
|
+
this.uploadId = createID("DuetUpload");
|
|
16707
|
+
this.filesInProgress = new Map();
|
|
16708
|
+
this.fileMaxReached = false;
|
|
16709
|
+
this.bytesMaxReached = false;
|
|
16710
|
+
this.internalStatusMessageLabel = undefined;
|
|
16711
|
+
/**
|
|
16712
|
+
* Properties
|
|
16713
|
+
*/
|
|
16714
|
+
this.DefaultGroups = {
|
|
16715
|
+
inprogress: "inprogress",
|
|
16716
|
+
success: "success",
|
|
16717
|
+
failure: "failure",
|
|
16718
|
+
};
|
|
16719
|
+
/**
|
|
16720
|
+
* Array of group names that you want the editable table to use to display files
|
|
16721
|
+
* @required
|
|
16722
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}]
|
|
16723
|
+
*/
|
|
16724
|
+
this.groups = [
|
|
16725
|
+
{
|
|
16726
|
+
id: this.DefaultGroups.inprogress,
|
|
16727
|
+
label: {
|
|
16728
|
+
fi: "Kesken olevat tiedostot",
|
|
16729
|
+
sv: "Filer inprogress",
|
|
16730
|
+
en: "Files inprogress",
|
|
16731
|
+
},
|
|
16732
|
+
},
|
|
16733
|
+
{
|
|
16734
|
+
id: this.DefaultGroups.success,
|
|
16735
|
+
label: {
|
|
16736
|
+
fi: "Valmiit tiedostot",
|
|
16737
|
+
sv: "Files success",
|
|
16738
|
+
en: "Files success",
|
|
16739
|
+
},
|
|
16740
|
+
},
|
|
16741
|
+
{
|
|
16742
|
+
id: this.DefaultGroups.failure,
|
|
16743
|
+
label: {
|
|
16744
|
+
fi: "Tiedostot, joissa on virheitä",
|
|
16745
|
+
sv: "Filer med fel",
|
|
16746
|
+
en: "Files with errors",
|
|
16747
|
+
},
|
|
16748
|
+
},
|
|
16749
|
+
];
|
|
16750
|
+
this.kick = debounce(() => {
|
|
16751
|
+
this.tick = Date.now();
|
|
16752
|
+
}, 30); // will trigger re-render
|
|
16166
16753
|
/**
|
|
16167
16754
|
* Private functions
|
|
16168
16755
|
*/
|
|
16169
16756
|
this.listenForActionEvents = () => {
|
|
16170
|
-
this.element.addEventListener("
|
|
16757
|
+
this.element.addEventListener("duetActionEvent", (e) => {
|
|
16171
16758
|
const detail = e.detail;
|
|
16172
|
-
const { action,
|
|
16759
|
+
const { action, id, originalEvent } = detail;
|
|
16760
|
+
console.log(e);
|
|
16173
16761
|
switch (action) {
|
|
16174
16762
|
case "delete":
|
|
16175
|
-
this.onDelete(
|
|
16763
|
+
this.onDelete(id, originalEvent);
|
|
16176
16764
|
break;
|
|
16177
16765
|
case "cancel":
|
|
16178
|
-
this.onCancel(
|
|
16766
|
+
this.onCancel(id, originalEvent);
|
|
16179
16767
|
break;
|
|
16180
16768
|
// code block
|
|
16181
16769
|
}
|
|
@@ -16232,24 +16820,6 @@ class DuetUpload {
|
|
|
16232
16820
|
return "none";
|
|
16233
16821
|
}
|
|
16234
16822
|
};
|
|
16235
|
-
this.convertToDuetEditableTableItems = () => {
|
|
16236
|
-
// we're always recreating the map - in order to force an update down stream.
|
|
16237
|
-
const itemData = new Map();
|
|
16238
|
-
//walk the files Map and convert to DuetEditableTableItemData
|
|
16239
|
-
this.files.forEach((data, key, _originalMap) => {
|
|
16240
|
-
const group = this.getGroupFromItemData(data);
|
|
16241
|
-
const item = this.getItemHTMLFromItemData(data, group);
|
|
16242
|
-
itemData.set(key, {
|
|
16243
|
-
uid: data.uid,
|
|
16244
|
-
item,
|
|
16245
|
-
group,
|
|
16246
|
-
});
|
|
16247
|
-
});
|
|
16248
|
-
return itemData;
|
|
16249
|
-
};
|
|
16250
|
-
this.kick = debounce(() => {
|
|
16251
|
-
this.tick = Date.now();
|
|
16252
|
-
}, 30); // will trigger re-render
|
|
16253
16823
|
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
16254
16824
|
this.updateValueInMap = (item, key, value, kick = true) => {
|
|
16255
16825
|
const fileItem = this.files.get(item);
|
|
@@ -16310,7 +16880,6 @@ class DuetUpload {
|
|
|
16310
16880
|
this.nativeInput.value = "";
|
|
16311
16881
|
};
|
|
16312
16882
|
this.startUpload = async (ev, metaData = undefined) => {
|
|
16313
|
-
await this.setFocus();
|
|
16314
16883
|
this.metaData = metaData;
|
|
16315
16884
|
this.nativeInput.click();
|
|
16316
16885
|
this.onUpload(ev, metaData);
|
|
@@ -16373,9 +16942,18 @@ class DuetUpload {
|
|
|
16373
16942
|
fileMaxReached: isTotalFileAmountAboveMax,
|
|
16374
16943
|
};
|
|
16375
16944
|
};
|
|
16945
|
+
this.getItemFromUID = (uid) => {
|
|
16946
|
+
for (const [key, value] of this.files.entries()) {
|
|
16947
|
+
if (value.uid === uid) {
|
|
16948
|
+
return { value, key };
|
|
16949
|
+
}
|
|
16950
|
+
}
|
|
16951
|
+
return null;
|
|
16952
|
+
};
|
|
16376
16953
|
this.onDelete = (key, ev) => {
|
|
16377
|
-
const
|
|
16378
|
-
this.files.
|
|
16954
|
+
const retrievedKey = this.getItemFromUID(key).key;
|
|
16955
|
+
const deletedItem = this.files.get(retrievedKey);
|
|
16956
|
+
this.files.delete(retrievedKey);
|
|
16379
16957
|
this.validateTotals();
|
|
16380
16958
|
this.kick();
|
|
16381
16959
|
this.duetDelete.emit({
|
|
@@ -16389,8 +16967,9 @@ class DuetUpload {
|
|
|
16389
16967
|
this.resetFormFields();
|
|
16390
16968
|
};
|
|
16391
16969
|
this.onCancel = (key, ev) => {
|
|
16392
|
-
const
|
|
16393
|
-
this.files.
|
|
16970
|
+
const retrievedKey = this.getItemFromUID(key).key;
|
|
16971
|
+
const cancelledItem = this.files.get(retrievedKey);
|
|
16972
|
+
this.files.delete(retrievedKey);
|
|
16394
16973
|
if (!this.external) {
|
|
16395
16974
|
const { xhr } = cancelledItem;
|
|
16396
16975
|
xhr.abort();
|
|
@@ -16440,6 +17019,79 @@ class DuetUpload {
|
|
|
16440
17019
|
data: { files: this.files },
|
|
16441
17020
|
});
|
|
16442
17021
|
};
|
|
17022
|
+
/**
|
|
17023
|
+
* @description This functions return sorted map items byg condition which are:
|
|
17024
|
+
*/
|
|
17025
|
+
this.filterMap = () => {
|
|
17026
|
+
const all = [...this.files.values()];
|
|
17027
|
+
const inprogress = [];
|
|
17028
|
+
const failure = [];
|
|
17029
|
+
const success = [];
|
|
17030
|
+
all.forEach(data => {
|
|
17031
|
+
const group = this.getGroupFromItemData(data);
|
|
17032
|
+
const item = this.getItemHTMLFromItemData(data, group);
|
|
17033
|
+
if (group === this.DefaultGroups.success) {
|
|
17034
|
+
success.push({
|
|
17035
|
+
uid: data.uid,
|
|
17036
|
+
item,
|
|
17037
|
+
group,
|
|
17038
|
+
});
|
|
17039
|
+
}
|
|
17040
|
+
else if (group === this.DefaultGroups.inprogress) {
|
|
17041
|
+
inprogress.push({
|
|
17042
|
+
uid: data.uid,
|
|
17043
|
+
item,
|
|
17044
|
+
group,
|
|
17045
|
+
});
|
|
17046
|
+
}
|
|
17047
|
+
else if (group === this.DefaultGroups.failure) {
|
|
17048
|
+
failure.push({
|
|
17049
|
+
uid: data.uid,
|
|
17050
|
+
item,
|
|
17051
|
+
group,
|
|
17052
|
+
});
|
|
17053
|
+
}
|
|
17054
|
+
else if (data.group) {
|
|
17055
|
+
inprogress.push({
|
|
17056
|
+
uid: data.uid,
|
|
17057
|
+
item,
|
|
17058
|
+
group: data.group,
|
|
17059
|
+
});
|
|
17060
|
+
}
|
|
17061
|
+
});
|
|
17062
|
+
return {
|
|
17063
|
+
inprogress,
|
|
17064
|
+
failure,
|
|
17065
|
+
success,
|
|
17066
|
+
};
|
|
17067
|
+
};
|
|
17068
|
+
this.getColumns = (group) => {
|
|
17069
|
+
return [
|
|
17070
|
+
{
|
|
17071
|
+
sort_order: 1,
|
|
17072
|
+
direction: 1,
|
|
17073
|
+
index: 0,
|
|
17074
|
+
key: group.id,
|
|
17075
|
+
label: group.label,
|
|
17076
|
+
},
|
|
17077
|
+
];
|
|
17078
|
+
};
|
|
17079
|
+
this.getActions = (id) => {
|
|
17080
|
+
return this.actions.filter(item => item.map.includes(id));
|
|
17081
|
+
};
|
|
17082
|
+
this.renderEditableTableGroups = () => {
|
|
17083
|
+
const filteredItems = this.filterMap();
|
|
17084
|
+
const EditableTables = this.groups.map(group => {
|
|
17085
|
+
const currentItems = filteredItems[group.id];
|
|
17086
|
+
if (!(currentItems === null || currentItems === void 0 ? void 0 : currentItems.length)) {
|
|
17087
|
+
return;
|
|
17088
|
+
}
|
|
17089
|
+
return (hAsync("duet-table", { variation: "plain", breakpoint: "none", role: "log", margin: this.hideGroups ? "none" : "auto" }, hAsync("table", { class: "duet-upload-editable-table" }, hAsync("thead", { class: "duet-upload-editable-table-header" }, hAsync("tr", null, hAsync("th", { class: {
|
|
17090
|
+
"duet-upload-editable-table-header-hidden": this.hideGroups,
|
|
17091
|
+
} }, !this.hideGroups ? (getLocaleString(group.label)) : (hAsync("duet-visually-hidden", null, getLocaleString(group.label)))))), hAsync("tbody", null, hAsync("tr", null, hAsync("td", { class: "duet-upload-editable-table-data" }, hAsync("duet-editable-table", { breakpoint: "none", variation: "plain", groupId: group.id, columns: this.getColumns(group), actions: this.getActions(group.id), margin: "none", rows: currentItems })))))));
|
|
17092
|
+
});
|
|
17093
|
+
return EditableTables;
|
|
17094
|
+
};
|
|
16443
17095
|
}
|
|
16444
17096
|
watchValidHandler(newValue, oldValue) {
|
|
16445
17097
|
if (newValue !== oldValue) {
|
|
@@ -16463,6 +17115,68 @@ class DuetUpload {
|
|
|
16463
17115
|
// listen to the events from the component
|
|
16464
17116
|
this.verifyValidity();
|
|
16465
17117
|
}
|
|
17118
|
+
/**
|
|
17119
|
+
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
17120
|
+
* `input.focus()`.
|
|
17121
|
+
*/
|
|
17122
|
+
async setFocus(options) {
|
|
17123
|
+
if (this.nativeInput) {
|
|
17124
|
+
this.nativeInput.focus(options);
|
|
17125
|
+
}
|
|
17126
|
+
return;
|
|
17127
|
+
}
|
|
17128
|
+
/**
|
|
17129
|
+
* Method for invoking the upload sequence
|
|
17130
|
+
*/
|
|
17131
|
+
async upload(metaData = undefined) {
|
|
17132
|
+
await this.setFocus();
|
|
17133
|
+
this.metaData = metaData;
|
|
17134
|
+
this.nativeInput.click();
|
|
17135
|
+
return;
|
|
17136
|
+
}
|
|
17137
|
+
/**
|
|
17138
|
+
* Method for forcing a render of the upload list, element.files can be changed externally
|
|
17139
|
+
* But it will only rerender on a new Map or a top Level change - this can be used to update
|
|
17140
|
+
* the tabular data if the automatic re-render is no sufficient
|
|
17141
|
+
*/
|
|
17142
|
+
async refresh() {
|
|
17143
|
+
this.kick();
|
|
17144
|
+
await this.setFocus();
|
|
17145
|
+
}
|
|
17146
|
+
/**
|
|
17147
|
+
* Get list of files, divided in errors and valid sections
|
|
17148
|
+
*/
|
|
17149
|
+
async getFiles() {
|
|
17150
|
+
if (!this.files || this.files.size === 0) {
|
|
17151
|
+
return false;
|
|
17152
|
+
}
|
|
17153
|
+
return this.getFilesAsArray();
|
|
17154
|
+
}
|
|
17155
|
+
/**
|
|
17156
|
+
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
17157
|
+
*/
|
|
17158
|
+
async updateValue(item, key, value) {
|
|
17159
|
+
this.updateValueInMap(item, key, value);
|
|
17160
|
+
}
|
|
17161
|
+
/**
|
|
17162
|
+
* render() function
|
|
17163
|
+
* Always the last one in the class.
|
|
17164
|
+
*/
|
|
17165
|
+
render() {
|
|
17166
|
+
const identifier = this.identifier || this.uploadId;
|
|
17167
|
+
let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
|
|
17168
|
+
caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
|
|
17169
|
+
caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
|
|
17170
|
+
return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("duet-fieldset", { label: this.label, caption: caption }, hAsync("slot", { name: "header" }), !this.files.size && (hAsync("duet-label", { part: this.identifier ? `${this.identifier}-empty-state` : "duet-upload-empty-state", theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
17171
|
+
"duet-upload-filelist-empty": !this.files.size,
|
|
17172
|
+
"duet-upload-filelist": true,
|
|
17173
|
+
"duet-upload-filelist-filled": this.files.size,
|
|
17174
|
+
}, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && hAsync("slot", { name: "fileheader" }), !!this.files.size && (hAsync("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.internalStatusMessageLabel })), !!this.files.size && this.renderEditableTableGroups(), !!this.files.size && hAsync("slot", { name: "filefooter" }), hAsync("duet-spacer", { size: "large" }), !this.hideButton && (hAsync("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle", part: this.identifier ? `${this.identifier}-button-upload` : "duet-upload-button-upload" }, this.buttonLabel)), hAsync("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (hAsync("duet-alert", { part: this.identifier ? `${this.identifier}-error-notification` : "duet-upload-error-notification" }, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), hAsync("duet-spacer", { size: "medium" }), hAsync("duet-visually-hidden", null, hAsync("input", { ref: input => {
|
|
17175
|
+
this.nativeInput = input;
|
|
17176
|
+
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
17177
|
+
"duet-upload": true,
|
|
17178
|
+
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
17179
|
+
}
|
|
16466
17180
|
/**
|
|
16467
17181
|
* XHR request utilities
|
|
16468
17182
|
*/
|
|
@@ -16584,68 +17298,6 @@ class DuetUpload {
|
|
|
16584
17298
|
component: "duet-upload",
|
|
16585
17299
|
});
|
|
16586
17300
|
}
|
|
16587
|
-
/**
|
|
16588
|
-
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
16589
|
-
* `input.focus()`.
|
|
16590
|
-
*/
|
|
16591
|
-
async setFocus(options) {
|
|
16592
|
-
if (this.nativeInput) {
|
|
16593
|
-
this.nativeInput.focus(options);
|
|
16594
|
-
}
|
|
16595
|
-
return;
|
|
16596
|
-
}
|
|
16597
|
-
/**
|
|
16598
|
-
* Method for invoking the upload sequence
|
|
16599
|
-
*/
|
|
16600
|
-
async upload(metaData = undefined) {
|
|
16601
|
-
await this.setFocus();
|
|
16602
|
-
this.metaData = metaData;
|
|
16603
|
-
this.nativeInput.click();
|
|
16604
|
-
return;
|
|
16605
|
-
}
|
|
16606
|
-
/**
|
|
16607
|
-
* Method for forcing a render of the upload list, element.files can be changed externally
|
|
16608
|
-
* But it will only rerender on a new Map or a top Level change - this can be used to update
|
|
16609
|
-
* the tabular data if the automatic re-render is no sufficient
|
|
16610
|
-
*/
|
|
16611
|
-
async refresh() {
|
|
16612
|
-
this.kick();
|
|
16613
|
-
await this.setFocus();
|
|
16614
|
-
}
|
|
16615
|
-
/**
|
|
16616
|
-
* Get list of files, divided in errors and valid sections
|
|
16617
|
-
*/
|
|
16618
|
-
async getFiles() {
|
|
16619
|
-
if (!this.files || this.files.size === 0) {
|
|
16620
|
-
return false;
|
|
16621
|
-
}
|
|
16622
|
-
return this.getFilesAsArray();
|
|
16623
|
-
}
|
|
16624
|
-
/**
|
|
16625
|
-
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
16626
|
-
*/
|
|
16627
|
-
async updateValue(item, key, value) {
|
|
16628
|
-
this.updateValueInMap(item, key, value);
|
|
16629
|
-
}
|
|
16630
|
-
/**
|
|
16631
|
-
* render() function
|
|
16632
|
-
* Always the last one in the class.
|
|
16633
|
-
*/
|
|
16634
|
-
render() {
|
|
16635
|
-
const identifier = this.identifier || this.uploadId;
|
|
16636
|
-
let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
|
|
16637
|
-
caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
|
|
16638
|
-
caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
|
|
16639
|
-
return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("duet-fieldset", { label: this.label, caption: caption }, hAsync("slot", { name: "header" }), !this.files.size && (hAsync("duet-label", { part: this.identifier ? `${this.identifier}-empty-state` : "duet-upload-empty-state", theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
16640
|
-
"duet-upload-filelist-empty": !this.files.size,
|
|
16641
|
-
"duet-upload-filelist": true,
|
|
16642
|
-
"duet-upload-filelist-filled": this.files.size,
|
|
16643
|
-
}, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && hAsync("slot", { name: "fileheader" }), !!this.files.size && (hAsync("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.internalStatusMessageLabel })), !!this.files.size && (hAsync("duet-editable-table", { part: this.identifier ? `${this.identifier}-editable-table` : "duet-upload-editable-table", "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, alignment: this.alignment, items: this.convertToDuetEditableTableItems() })), !!this.files.size && hAsync("slot", { name: "filefooter" }), hAsync("duet-spacer", { size: "large" }), !this.hideButton && (hAsync("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle", part: this.identifier ? `${this.identifier}-button-upload` : "duet-upload-button-upload" }, this.buttonLabel)), hAsync("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (hAsync("duet-alert", { part: this.identifier ? `${this.identifier}-error-notification` : "duet-upload-error-notification" }, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), hAsync("duet-spacer", { size: "medium" }), hAsync("duet-visually-hidden", null, hAsync("input", { ref: input => {
|
|
16644
|
-
this.nativeInput = input;
|
|
16645
|
-
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
16646
|
-
"duet-upload": true,
|
|
16647
|
-
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
16648
|
-
}
|
|
16649
17301
|
get element() { return getElement(this); }
|
|
16650
17302
|
static get watchers() { return {
|
|
16651
17303
|
"valid": ["watchValidHandler"]
|
|
@@ -16661,7 +17313,7 @@ class DuetUpload {
|
|
|
16661
17313
|
"accessibleOwns": [1, "accessible-owns"],
|
|
16662
17314
|
"external": [4],
|
|
16663
17315
|
"hideButton": [4, "hide-upload-button"],
|
|
16664
|
-
"actions": [
|
|
17316
|
+
"actions": [16],
|
|
16665
17317
|
"uri": [1],
|
|
16666
17318
|
"showLinks": [4, "show-links"],
|
|
16667
17319
|
"caption": [1],
|
|
@@ -16675,7 +17327,6 @@ class DuetUpload {
|
|
|
16675
17327
|
"identifier": [1],
|
|
16676
17328
|
"margin": [1],
|
|
16677
17329
|
"required": [4],
|
|
16678
|
-
"groups": [1],
|
|
16679
17330
|
"alignment": [1],
|
|
16680
17331
|
"hideGroups": [4, "hide-table-labels"],
|
|
16681
17332
|
"files": [1040],
|
|
@@ -16696,6 +17347,7 @@ class DuetUpload {
|
|
|
16696
17347
|
"multiple": [4],
|
|
16697
17348
|
"limitSelection": [4, "limit-selection"],
|
|
16698
17349
|
"value": [1025],
|
|
17350
|
+
"groups": [16],
|
|
16699
17351
|
"tick": [32],
|
|
16700
17352
|
"setFocus": [64],
|
|
16701
17353
|
"upload": [64],
|
|
@@ -16840,6 +17492,7 @@ class DuetVisuallyHidden {
|
|
|
16840
17492
|
}
|
|
16841
17493
|
|
|
16842
17494
|
registerComponents([
|
|
17495
|
+
DuetActionButton,
|
|
16843
17496
|
DuetAlert,
|
|
16844
17497
|
DuetBadge,
|
|
16845
17498
|
DuetBreadcrumb,
|
|
@@ -16855,8 +17508,6 @@ registerComponents([
|
|
|
16855
17508
|
DuetDatePicker,
|
|
16856
17509
|
DuetDivider,
|
|
16857
17510
|
DuetEditableTable,
|
|
16858
|
-
DuetEditableTableButton,
|
|
16859
|
-
DuetEditableTableItem,
|
|
16860
17511
|
DuetEmptyState,
|
|
16861
17512
|
DuetFieldset,
|
|
16862
17513
|
DuetFooter,
|
|
@@ -16877,11 +17528,13 @@ registerComponents([
|
|
|
16877
17528
|
DuetNotification,
|
|
16878
17529
|
DuetNotificationDrawer,
|
|
16879
17530
|
DuetNumberInput,
|
|
17531
|
+
DuetPagination,
|
|
16880
17532
|
DuetParagraph,
|
|
16881
17533
|
DuetProgress,
|
|
16882
17534
|
DuetRadio,
|
|
16883
17535
|
DuetRadioGroup,
|
|
16884
17536
|
DuetRangeSlider,
|
|
17537
|
+
DuetRangeStepper,
|
|
16885
17538
|
DuetScrollable,
|
|
16886
17539
|
DuetSelect,
|
|
16887
17540
|
DuetSpacer,
|