@duetds/components 4.32.0 → 4.34.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 +2367 -244
- package/lib/cjs/{dom-a28e5c5f.js → dom-52a4f07a.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +2 -2
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +18 -11
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +39 -18
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -450
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +7 -7
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +96 -0
- package/lib/cjs/duet-editable-table_4.cjs.entry.js +1520 -0
- 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 +3 -3
- package/lib/cjs/duet-grid_2.cjs.entry.js +69 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +216 -49
- package/lib/cjs/duet-hero.cjs.entry.js +2 -2
- package/lib/cjs/duet-icon.cjs.entry.js +8 -6
- package/lib/cjs/duet-input_2.cjs.entry.js +8 -9
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-modal.cjs.entry.js +3 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
- package/lib/cjs/duet-progress.cjs.entry.js +75 -0
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
- package/lib/cjs/duet-select.cjs.entry.js +5 -5
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
- package/lib/cjs/duet-tray.cjs.entry.js +3 -3
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +100 -0
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +4 -4
- package/lib/cjs/{focus-utils-55b5a616.js → focus-utils-480ea4e0.js} +1 -1
- package/lib/cjs/form-search-d61b2843.js +8 -0
- package/lib/cjs/{index-03ed1f55.js → index-6966a494.js} +5 -2
- package/lib/cjs/{language-utils-48b8860b.js → language-utils-aa282901.js} +6 -2
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-6560c90c.js → shadow-css-e1b62a99.js} +9 -10
- package/lib/cjs/token-utils-05bd23b4.js +77 -0
- package/lib/cjs/tokens-8596cece.js +459 -0
- package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
- package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
- package/lib/collection/collection-manifest.json +17 -3
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.js +94 -21
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +4 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +9 -9
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +225 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +225 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +404 -0
- package/lib/collection/components/duet-footer/duet-footer.css +1 -0
- package/lib/collection/components/duet-grid/duet-grid.js +74 -6
- package/lib/collection/components/duet-header/duet-header-dropdown.js +27 -0
- package/lib/collection/components/duet-header/duet-header-hamburger.js +9 -0
- package/lib/collection/components/duet-header/duet-header-icon.js +9 -0
- package/lib/collection/components/duet-header/duet-header.css +272 -39
- package/lib/collection/components/duet-header/duet-header.js +310 -122
- package/lib/collection/components/duet-heading/duet-heading.css +3 -0
- package/lib/collection/components/duet-heading/duet-heading.js +7 -6
- package/lib/collection/components/duet-icon/duet-icon.js +5 -3
- package/lib/collection/components/duet-input/duet-input.css +15 -0
- package/lib/collection/components/duet-input/duet-input.js +4 -4
- package/lib/collection/components/duet-link/duet-link.js +4 -1
- package/lib/collection/components/duet-list-item/duet-list-item.css +1 -1
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.css +4 -3
- package/lib/collection/components/duet-paragraph/duet-paragraph.css +6 -0
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
- package/lib/collection/components/duet-progress/duet-progress.css +103 -0
- package/lib/collection/components/duet-progress/duet-progress.js +240 -0
- package/lib/collection/components/duet-select/duet-select.css +15 -0
- package/lib/collection/components/duet-select/duet-select.js +3 -3
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
- package/lib/collection/components/duet-table/duet-table.css +42 -17
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-textarea/duet-textarea.css +19 -0
- package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
- package/lib/collection/components/duet-upload/duet-upload.css +64 -0
- package/lib/collection/components/duet-upload/duet-upload.js +1885 -0
- package/lib/collection/components/duet-upload/errorcodes.utils.js +32 -0
- package/lib/collection/components/duet-upload/mock.helpers.js +91 -0
- package/lib/collection/components/duet-upload/upload-editable-item-error.js +16 -0
- package/lib/collection/components/duet-upload/upload-editable-item-inprogres.js +8 -0
- package/lib/collection/components/duet-upload/upload-editable-item-success.js +30 -0
- package/lib/collection/components/duet-upload/upload-validators.js +93 -0
- package/lib/collection/components/duet-upload/upload.helpers.js +13 -0
- package/lib/collection/components/duet-upload/xhr.helpers.js +30 -0
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +217 -0
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +6 -3
- package/lib/collection/utils/template-utils.js +33 -0
- package/lib/collection/utils/token-utils.js +67 -14
- package/lib/collection/utils/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +36 -0
- package/lib/custom-elements-bundle/index.js +2309 -334
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-92103298.system.entry.js → p-07f43530.system.entry.js} +1 -1
- package/lib/duet/{p-cc0bd28f.system.entry.js → p-093bca2f.system.entry.js} +1 -1
- package/lib/duet/{p-a678da8c.entry.js → p-0aaf86ba.entry.js} +1 -1
- package/lib/duet/{p-94a5fd74.system.entry.js → p-0b0a05ed.system.entry.js} +1 -1
- package/lib/duet/{p-00eac879.system.entry.js → p-0be1c660.system.entry.js} +1 -1
- package/lib/duet/{p-3b3bac3f.system.entry.js → p-0d66e11b.system.entry.js} +1 -1
- package/lib/duet/{p-7331f2fe.system.entry.js → p-0de430e1.system.entry.js} +1 -1
- package/lib/duet/{p-3618aaee.entry.js → p-0ef8d711.entry.js} +1 -1
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/{p-c19094dd.entry.js → p-12a08d77.entry.js} +1 -1
- package/lib/duet/p-15c9a17c.entry.js +4 -0
- package/lib/duet/{p-9cdd361e.js → p-183726f7.js} +0 -0
- package/lib/duet/{p-b75c5f13.entry.js → p-18c3eb54.entry.js} +1 -1
- package/lib/duet/{p-9542c540.entry.js → p-1b591fa4.entry.js} +1 -1
- package/lib/duet/{p-f364ce8b.system.entry.js → p-1bd0f4eb.system.entry.js} +1 -1
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/p-27bd8744.system.entry.js +4 -0
- package/lib/duet/p-289a31cb.entry.js +4 -0
- package/lib/duet/{p-8c511832.system.entry.js → p-29b352db.system.entry.js} +1 -1
- package/lib/duet/p-2a00f231.system.entry.js +4 -0
- package/lib/duet/p-3215e07e.system.entry.js +4 -0
- package/lib/duet/{p-ed479d09.system.entry.js → p-338b9955.system.entry.js} +1 -1
- package/lib/duet/{p-8740fa38.entry.js → p-33de1029.entry.js} +1 -1
- package/lib/duet/p-34ebff3b.entry.js +4 -0
- package/lib/duet/{p-b6a0caf8.system.entry.js → p-379d416f.system.entry.js} +1 -1
- package/lib/duet/{p-0b9b6393.entry.js → p-39a12eb9.entry.js} +1 -1
- package/lib/duet/{p-8652a7ab.system.entry.js → p-39fd8b43.system.entry.js} +1 -1
- package/lib/duet/{p-ffc2ffff.entry.js → p-3bafdf7c.entry.js} +1 -1
- package/lib/duet/{p-4fcbcecd.system.entry.js → p-3c1ce7e2.system.entry.js} +1 -1
- package/lib/duet/p-3da6b84e.entry.js +4 -0
- package/lib/duet/p-43c49a72.entry.js +4 -0
- package/lib/duet/{p-9f0f5674.entry.js → p-44f4b8ff.entry.js} +1 -1
- package/lib/duet/{p-b0bbbdba.system.entry.js → p-4c5ac0c2.system.entry.js} +1 -1
- package/lib/duet/p-50b4fb2c.js +4 -0
- package/lib/duet/p-51f7ae72.entry.js +4 -0
- package/lib/duet/p-52621211.js +15 -0
- package/lib/duet/{p-2a3411b5.system.entry.js → p-5443c9ca.system.entry.js} +1 -1
- package/lib/duet/{p-abd3bfb4.system.entry.js → p-5610db77.system.entry.js} +1 -1
- package/lib/duet/{p-2c0dd9ba.system.entry.js → p-5b409bfb.system.entry.js} +1 -1
- package/lib/duet/{p-807b2087.entry.js → p-6353407f.entry.js} +1 -1
- package/lib/duet/{p-a89e88a3.js → p-64bf94ee.js} +1 -1
- package/lib/duet/{p-2c679963.entry.js → p-64e915ae.entry.js} +1 -1
- package/lib/duet/{p-432ba72e.system.entry.js → p-6c237f21.system.entry.js} +1 -1
- package/lib/duet/p-6c8521f6.system.entry.js +4 -0
- package/lib/duet/{p-a962c8c1.system.js → p-6e4fd6ba.system.js} +0 -0
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/{p-8002a095.entry.js → p-7347f4ac.entry.js} +1 -1
- package/lib/duet/{p-d13874cb.entry.js → p-781bd6db.entry.js} +1 -1
- package/lib/duet/{p-5a817929.system.entry.js → p-78e8a689.system.entry.js} +1 -1
- package/lib/duet/p-8143f3de.js +4 -0
- package/lib/duet/p-81e855e4.system.js +4 -0
- package/lib/duet/{p-84ece735.entry.js → p-8224d768.entry.js} +1 -1
- package/lib/duet/{p-43dde575.system.entry.js → p-848bb1c2.system.entry.js} +1 -1
- package/lib/duet/{p-1391ec53.entry.js → p-880a4afe.entry.js} +1 -1
- package/lib/duet/p-8c375429.entry.js +4 -0
- package/lib/duet/p-8cb71174.system.entry.js +4 -0
- package/lib/duet/p-8d7b68c4.entry.js +4 -0
- package/lib/duet/p-8f477bd6.system.js +4 -0
- package/lib/duet/p-969c6395.system.entry.js +4 -0
- package/lib/duet/p-9c234242.system.entry.js +4 -0
- package/lib/duet/{p-f13a0883.entry.js → p-9d7b9084.entry.js} +1 -1
- package/lib/duet/p-a0544097.system.entry.js +4 -0
- package/lib/duet/p-a16a58c1.system.js +4 -0
- package/lib/duet/{p-fb898d94.system.entry.js → p-a4a16d03.system.entry.js} +1 -1
- package/lib/duet/p-a4e3b44b.entry.js +4 -0
- package/lib/duet/{p-977f2826.entry.js → p-a91673cf.entry.js} +1 -1
- package/lib/duet/p-a926944f.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/p-b08bce4c.entry.js +4 -0
- package/lib/duet/{p-ec3eef3a.entry.js → p-b48a5f80.entry.js} +1 -1
- package/lib/duet/p-bb3e3777.entry.js +4 -0
- package/lib/duet/{p-fbb7d194.entry.js → p-bbe33d02.entry.js} +1 -1
- package/lib/duet/p-be8e1c48.system.entry.js +4 -0
- package/lib/duet/{p-68d09837.system.entry.js → p-c56c73ee.system.entry.js} +1 -1
- package/lib/duet/p-c63bdc6a.system.entry.js +4 -0
- package/lib/duet/{p-c723d36e.system.js → p-c83685a6.system.js} +1 -1
- package/lib/duet/p-c8dfc958.system.entry.js +4 -0
- package/lib/duet/{p-6cf41bfe.system.entry.js → p-c92f601f.system.entry.js} +1 -1
- package/lib/duet/p-d004da5f.js +4 -0
- package/lib/duet/p-d49416f8.entry.js +4 -0
- package/lib/duet/{p-7a868085.entry.js → p-d581d82d.entry.js} +1 -1
- package/lib/duet/p-d6bb4301.entry.js +4 -0
- package/lib/duet/p-d9aadc15.entry.js +4 -0
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/{p-3040debf.entry.js → p-dde63979.entry.js} +1 -1
- package/lib/duet/p-e15ccddc.system.entry.js +4 -0
- package/lib/duet/{p-0f2a478e.entry.js → p-e1be37a6.entry.js} +1 -1
- package/lib/duet/p-e5c1751e.system.js +16 -0
- package/lib/duet/{p-b9683731.entry.js → p-e9209e9f.entry.js} +1 -1
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/{p-b374d7c2.system.js → p-ee1ba0d4.system.js} +1 -1
- package/lib/duet/{p-57cb58d4.system.entry.js → p-f4a29a8a.system.entry.js} +2 -2
- package/lib/duet/p-f8a0bd32.system.entry.js +4 -0
- package/lib/duet/p-f9599dd9.system.entry.js +4 -0
- package/lib/duet/p-fa99eaa4.system.js +4 -0
- package/lib/duet/p-fd7018e9.js +4 -0
- package/lib/duet/{p-19c28d99.system.entry.js → p-fe0cca67.system.entry.js} +1 -1
- package/lib/esm/{dom-8516b24e.js → dom-5d060ace.js} +1 -1
- package/lib/esm/duet-alert.entry.js +2 -2
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +4 -4
- package/lib/esm/duet-caption_4.entry.js +18 -11
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +40 -19
- package/lib/esm/duet-collapsible.entry.js +4 -449
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +7 -7
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table-button.entry.js +92 -0
- package/lib/esm/duet-editable-table_4.entry.js +1513 -0
- 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 +3 -3
- package/lib/esm/duet-grid_2.entry.js +69 -4
- package/lib/esm/duet-header_2.entry.js +216 -49
- package/lib/esm/duet-hero.entry.js +2 -2
- package/lib/esm/duet-icon.entry.js +8 -6
- package/lib/esm/duet-input_2.entry.js +7 -8
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +3 -3
- package/lib/esm/duet-modal.entry.js +3 -3
- package/lib/esm/duet-notification_2.entry.js +3 -3
- package/lib/esm/duet-number-input.entry.js +2 -2
- package/lib/esm/duet-progress.entry.js +71 -0
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +2 -2
- package/lib/esm/duet-select.entry.js +5 -5
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +3 -3
- package/lib/esm/duet-textarea.entry.js +5 -5
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +3 -3
- package/lib/esm/duet-upload-aria-status.entry.js +96 -0
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{focus-utils-6a282066.js → focus-utils-48837cfa.js} +1 -1
- package/lib/esm/form-search-ea8e19ae.js +6 -0
- package/lib/esm/{index-3a265449.js → index-80be4170.js} +5 -2
- package/lib/esm/{language-utils-d5c38f65.js → language-utils-344d894c.js} +6 -3
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-9178c864.js → shadow-css-13d024f4.js} +9 -10
- package/lib/esm/token-utils-75f78ca4.js +75 -0
- package/lib/esm/tokens-e110dc89.js +453 -0
- package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
- package/lib/esm/watch-options-dd55bce8.js +57 -0
- package/lib/esm-es5/{dom-8516b24e.js → dom-5d060ace.js} +0 -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-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +2 -2
- 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 +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +2 -2
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table-button.entry.js +4 -0
- package/lib/esm-es5/duet-editable-table_4.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 +2 -2
- package/lib/esm-es5/duet-header_2.entry.js +2 -2
- 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-progress.entry.js +4 -0
- 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-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-tab_2.entry.js +2 -2
- 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 +4 -0
- 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-48837cfa.js +4 -0
- package/lib/esm-es5/form-search-ea8e19ae.js +4 -0
- package/lib/esm-es5/index-80be4170.js +4 -0
- package/lib/esm-es5/{language-utils-d5c38f65.js → language-utils-344d894c.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-13d024f4.js +15 -0
- package/lib/esm-es5/token-utils-75f78ca4.js +4 -0
- package/lib/esm-es5/tokens-e110dc89.js +4 -0
- package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
- package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
- package/lib/types/common-types.d.ts +0 -1
- package/lib/types/components/duet-choice/duet-choice.d.ts +20 -1
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +3 -0
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +5 -5
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +73 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +76 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +8 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +94 -0
- package/lib/types/components/duet-grid/duet-grid.d.ts +17 -2
- package/lib/types/components/duet-header/duet-header-dropdown.d.ts +16 -0
- package/lib/types/components/duet-header/duet-header-hamburger.d.ts +2 -0
- package/lib/types/components/duet-header/duet-header-icon.d.ts +8 -0
- package/lib/types/components/duet-header/duet-header.d.ts +41 -4
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-link/duet-link.d.ts +3 -0
- package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
- package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
- package/lib/types/components/duet-table/duet-table.d.ts +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +408 -0
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +8 -0
- package/lib/types/components/duet-upload/mock.helpers.d.ts +2 -0
- package/lib/types/components/duet-upload/upload-editable-item-error.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-inprogres.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-success.d.ts +8 -0
- package/lib/types/components/duet-upload/upload-validators.d.ts +12 -0
- package/lib/types/components/duet-upload/upload.helpers.d.ts +1 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +18 -0
- package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +49 -0
- package/lib/types/components.d.ts +835 -29
- package/lib/types/stencil-public-runtime.d.ts +6 -4
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +5 -1
- package/lib/types/utils/template-utils.d.ts +13 -0
- package/lib/types/utils/token-utils.d.ts +8 -2
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +13 -13
- package/lib/cjs/duet-table.cjs.entry.js +0 -132
- package/lib/cjs/token-utils-13e5d13e.js +0 -30
- package/lib/duet/p-0058512b.js +0 -4
- package/lib/duet/p-08729381.entry.js +0 -4
- package/lib/duet/p-0b00e8d6.system.js +0 -16
- package/lib/duet/p-15922601.system.js +0 -4
- package/lib/duet/p-194e25ce.system.entry.js +0 -4
- package/lib/duet/p-1d87ea02.system.entry.js +0 -4
- package/lib/duet/p-2d1e2b23.system.entry.js +0 -4
- package/lib/duet/p-322d1c38.js +0 -4
- package/lib/duet/p-40d68321.entry.js +0 -4
- package/lib/duet/p-418b2ce7.system.js +0 -4
- package/lib/duet/p-43e39d98.system.js +0 -4
- package/lib/duet/p-4603830b.entry.js +0 -4
- package/lib/duet/p-52d7fbec.entry.js +0 -4
- package/lib/duet/p-60478325.system.entry.js +0 -4
- package/lib/duet/p-64ed7add.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-72fd384a.entry.js +0 -4
- package/lib/duet/p-753b406c.entry.js +0 -4
- package/lib/duet/p-76c00d0c.entry.js +0 -4
- package/lib/duet/p-85fe1132.js +0 -4
- package/lib/duet/p-8c8e82aa.system.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-a11df1b6.js +0 -15
- package/lib/duet/p-a1eccee1.system.entry.js +0 -4
- package/lib/duet/p-ade33230.entry.js +0 -4
- package/lib/duet/p-b04d738f.system.entry.js +0 -4
- package/lib/duet/p-cb827bb7.entry.js +0 -4
- package/lib/duet/p-d85fba2c.system.entry.js +0 -4
- package/lib/duet/p-dfa90f8a.system.entry.js +0 -4
- package/lib/duet/p-e6b9bd1d.entry.js +0 -4
- package/lib/duet/p-ee64d6be.system.entry.js +0 -4
- package/lib/duet/p-f113671b.system.entry.js +0 -4
- package/lib/duet/p-f2f04396.entry.js +0 -4
- package/lib/duet/p-fc6624fe.system.entry.js +0 -4
- package/lib/esm/duet-table.entry.js +0 -128
- package/lib/esm/token-utils-5a35377f.js +0 -28
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-table.entry.js +0 -4
- package/lib/esm-es5/focus-utils-6a282066.js +0 -4
- package/lib/esm-es5/index-3a265449.js +0 -4
- package/lib/esm-es5/shadow-css-9178c864.js +0 -15
- package/lib/esm-es5/token-utils-5a35377f.js +0 -4
- package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
- package/lib/esm-es5/watch-options-de55ea78.js +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
const NAMESPACE = 'duet';
|
|
5
|
-
const Env = /* duet */ {"cdnURILocal":"http://0.0.0.0:3334","cdnURIProd":"https://cdn.duetds.com/api","duetIconVersion":"2.2.
|
|
5
|
+
const Env = /* duet */ {"cdnURILocal":"http://0.0.0.0:3334","cdnURIProd":"https://cdn.duetds.com/api","duetIconVersion":"2.2.6"};
|
|
6
6
|
|
|
7
7
|
let scopeId;
|
|
8
8
|
let contentRef;
|
|
@@ -14,6 +14,8 @@ let isSvgMode = false;
|
|
|
14
14
|
let queuePending = false;
|
|
15
15
|
const win = typeof window !== 'undefined' ? window : {};
|
|
16
16
|
const doc = win.document || { head: {} };
|
|
17
|
+
const H = (win.HTMLElement || class {
|
|
18
|
+
});
|
|
17
19
|
const plt = {
|
|
18
20
|
$flags$: 0,
|
|
19
21
|
$resourcesUrl$: '',
|
|
@@ -1091,6 +1093,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1091
1093
|
promise = safeCall(instance, 'componentWillLoad');
|
|
1092
1094
|
}
|
|
1093
1095
|
}
|
|
1096
|
+
{
|
|
1097
|
+
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
1098
|
+
}
|
|
1094
1099
|
endSchedule();
|
|
1095
1100
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1096
1101
|
};
|
|
@@ -1751,6 +1756,9 @@ const getLocale = (lang) => {
|
|
|
1751
1756
|
}
|
|
1752
1757
|
throw new Error(`Locale for "${lang}" not found`);
|
|
1753
1758
|
};
|
|
1759
|
+
/**
|
|
1760
|
+
* Takes any json object that is passed and/or htmlencoded and converts it to proper json
|
|
1761
|
+
*/
|
|
1754
1762
|
const sanitizeString = (string) => {
|
|
1755
1763
|
const argIsString = typeof string === "string";
|
|
1756
1764
|
if (argIsString) {
|
|
@@ -1758,7 +1766,7 @@ const sanitizeString = (string) => {
|
|
|
1758
1766
|
return JSON.parse(convertHtmlQuotes(string));
|
|
1759
1767
|
}
|
|
1760
1768
|
catch (e) {
|
|
1761
|
-
console.log("
|
|
1769
|
+
console.log("sanitizeString received a string, that didnt parse to json object", string, e);
|
|
1762
1770
|
}
|
|
1763
1771
|
}
|
|
1764
1772
|
return string;
|
|
@@ -1770,7 +1778,7 @@ const sanitizeString = (string) => {
|
|
|
1770
1778
|
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
|
|
1771
1779
|
* @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
|
|
1772
1780
|
* @default {object} {locale: "fi-FI", money: "€"}
|
|
1773
|
-
* @returns {(string|Object)} given example contains {fi:"something"} and
|
|
1781
|
+
* @returns {(string|Object)} given example contains {fi:"something"} and language===fi this will return "something"
|
|
1774
1782
|
*/
|
|
1775
1783
|
const getLocaleString = (langObject, languageOverride) => {
|
|
1776
1784
|
const obj = sanitizeString(langObject);
|
|
@@ -1790,7 +1798,7 @@ const inheritGlobalTheme = (component) => {
|
|
|
1790
1798
|
|
|
1791
1799
|
const duetAlertCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;max-height:999px;border-radius:4px;transition:opacity 300ms ease, visibility 300ms ease, transform 300ms ease, max-height 300ms ease}:host(:focus){outline:0}:host(.user-is-tabbing: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){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}:host(.duet-alert-is-dismissed){max-height:0;visibility:hidden;opacity:0;transform:scale(0.98)}:host(.duet-alert-is-dismissed) .duet-alert{margin:0 !important}.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{padding:0 !important}.duet-alert.duet-m-0{margin:0 !important}.duet-alert.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:#171c3a;background:#f3f4f5;border-color:#171c3a}.duet-alert.warning{background:#fffbf4;border-color:#f7b228}.duet-alert.warning.duet-theme-turva{background:#fffaf3;border-color:#faa40f}.duet-alert.danger{background:#fdf4f7;border-color:#de2362}.duet-alert.danger.duet-theme-turva{background:#fdf4f3;border-color:#e02a0d}.duet-alert.success{background:#f2f9f7;border-color:#00875a}.duet-alert.success.duet-theme-turva{background:#f3f9f6;border-color:#08874e}.duet-alert-dismiss{position:absolute;top:2px;right:2px}.duet-alert-container{display:inline-flex;align-items:center;justify-content:center;width:100%;margin:0 auto !important}.duet-alert-container span{width:100%}.duet-alert-has-icon .duet-alert-container{margin-top:2px !important}.duet-alert-icon{display:inline-block;align-self:center;width:20px;min-width:20px;height:20px;margin:0 16px 0 0 !important}.duet-alert-icon duet-icon{width:20px;height:20px}.duet-alert-is-dismissible{padding:16px 48px 16px 16px;text-align:left}.duet-alert-is-dismissible .duet-alert-container{text-align:left}";
|
|
1792
1800
|
|
|
1793
|
-
let DuetAlert$1 = class extends
|
|
1801
|
+
let DuetAlert$1 = class extends H {
|
|
1794
1802
|
constructor() {
|
|
1795
1803
|
super();
|
|
1796
1804
|
this.__registerHost();
|
|
@@ -1890,7 +1898,7 @@ let DuetAlert$1 = class extends HTMLElement {
|
|
|
1890
1898
|
|
|
1891
1899
|
const duetBadgeCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:4px !important;margin-bottom:2px !important;display:inline-block;width:auto;vertical-align:middle}:host:last-child,:host:last-of-type{margin-right:0 !important}:host(.duet-m-0){margin:0 !important}.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{padding:0 !important}.duet-badge.duet-m-0{margin:0 !important}.duet-badge.duet-theme-turva{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{background:#fef3df}.duet-badge.warning.duet-theme-turva{background:#fef1db}.duet-badge.danger{background:#fce9ef}.duet-badge.danger.duet-theme-turva{background:#fceae7}.duet-badge.success{background:#e6f3ef}.duet-badge.success.duet-theme-turva{background:#e6f3ed}";
|
|
1892
1900
|
|
|
1893
|
-
let DuetBadge$1 = class extends
|
|
1901
|
+
let DuetBadge$1 = class extends H {
|
|
1894
1902
|
constructor() {
|
|
1895
1903
|
super();
|
|
1896
1904
|
this.__registerHost();
|
|
@@ -2049,6 +2057,7 @@ const sizeTappableSquare = "48px";
|
|
|
2049
2057
|
const sizeIconXSmall = "16px";
|
|
2050
2058
|
const sizeIconXxxSmall = "7px";
|
|
2051
2059
|
const sizeButtonBorder = "2px";
|
|
2060
|
+
const sizeButtonTinyBorder = "1px";
|
|
2052
2061
|
const sizeIconMedium = "24px";
|
|
2053
2062
|
const sizeIconSmall = "20px";
|
|
2054
2063
|
const opacity85 = "0.85";
|
|
@@ -2198,6 +2207,7 @@ const tokens$2 = /*#__PURE__*/Object.freeze({
|
|
|
2198
2207
|
sizeIconXSmall: sizeIconXSmall,
|
|
2199
2208
|
sizeIconXxxSmall: sizeIconXxxSmall,
|
|
2200
2209
|
sizeButtonBorder: sizeButtonBorder,
|
|
2210
|
+
sizeButtonTinyBorder: sizeButtonTinyBorder,
|
|
2201
2211
|
sizeIconMedium: sizeIconMedium,
|
|
2202
2212
|
sizeIconSmall: sizeIconSmall,
|
|
2203
2213
|
opacity85: opacity85,
|
|
@@ -2231,31 +2241,78 @@ const tokens$2 = /*#__PURE__*/Object.freeze({
|
|
|
2231
2241
|
mediaQueryXxxLarge: mediaQueryXxxLarge
|
|
2232
2242
|
});
|
|
2233
2243
|
|
|
2234
|
-
const
|
|
2235
|
-
function
|
|
2236
|
-
|
|
2244
|
+
const allowedThemes = ["turva"];
|
|
2245
|
+
function isDashCase(str) {
|
|
2246
|
+
const dash = str.includes("-");
|
|
2247
|
+
const barredString = str.includes(" ") || str.includes("_");
|
|
2248
|
+
const barredStartingString = str.charAt(0) === "-";
|
|
2249
|
+
return dash && !barredString && !barredStartingString;
|
|
2250
|
+
}
|
|
2251
|
+
function capitalize(str = "") {
|
|
2252
|
+
return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
|
|
2253
|
+
}
|
|
2254
|
+
function lowerCaseFirst(str = "") {
|
|
2255
|
+
return `${str.charAt(0).toLowerCase()}${str.slice(1)}`;
|
|
2256
|
+
}
|
|
2257
|
+
function camelize(str = "") {
|
|
2258
|
+
const arr = str.split("-");
|
|
2259
|
+
//loop through each element of the array and capitalize the first letter.'
|
|
2260
|
+
arr.forEach((string, index) => {
|
|
2261
|
+
arr[index] = capitalize(string);
|
|
2262
|
+
});
|
|
2263
|
+
return arr.join("");
|
|
2264
|
+
}
|
|
2265
|
+
function getTheme(theme = "") {
|
|
2266
|
+
if (allowedThemes.includes(theme.toLowerCase())) {
|
|
2267
|
+
return theme.toLowerCase();
|
|
2268
|
+
}
|
|
2269
|
+
return "";
|
|
2237
2270
|
}
|
|
2238
|
-
function
|
|
2239
|
-
return
|
|
2271
|
+
function hasColor(str = "") {
|
|
2272
|
+
return str.indexOf("Color") === 0 || str.indexOf("color") === 0;
|
|
2240
2273
|
}
|
|
2241
|
-
function
|
|
2242
|
-
if (
|
|
2243
|
-
return
|
|
2274
|
+
function addColor(str = "") {
|
|
2275
|
+
if (str && !isDashCase(str) && !hasColor(str)) {
|
|
2276
|
+
return `color${capitalize(str)}`;
|
|
2244
2277
|
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2278
|
+
return str;
|
|
2279
|
+
}
|
|
2280
|
+
function addTheme(str, theme) {
|
|
2281
|
+
const hasTheme = getTheme(theme).length;
|
|
2282
|
+
if (hasTheme && str.indexOf(theme) === -1) {
|
|
2283
|
+
return `${str}${capitalize(theme)}`;
|
|
2247
2284
|
}
|
|
2248
|
-
return
|
|
2285
|
+
return str;
|
|
2249
2286
|
}
|
|
2250
|
-
function getColorByName(name) {
|
|
2251
|
-
if (name) {
|
|
2252
|
-
return
|
|
2287
|
+
function getColorByName(name, theme = "") {
|
|
2288
|
+
if (!name) {
|
|
2289
|
+
return undefined;
|
|
2290
|
+
}
|
|
2291
|
+
const defaultColor = convertToColorName(name);
|
|
2292
|
+
const themedColor = convertToColorName(name, theme);
|
|
2293
|
+
// lets just try to get the color first to save some cycles
|
|
2294
|
+
let resolvedToken = tokens$2[themedColor];
|
|
2295
|
+
if (!resolvedToken) {
|
|
2296
|
+
resolvedToken = tokens$2[defaultColor];
|
|
2253
2297
|
}
|
|
2298
|
+
return resolvedToken;
|
|
2299
|
+
}
|
|
2300
|
+
function convertToColorName(name = "", theme = "") {
|
|
2301
|
+
let colorResolution = name;
|
|
2302
|
+
const dash = isDashCase(name);
|
|
2303
|
+
if (dash) {
|
|
2304
|
+
colorResolution = camelize(colorResolution);
|
|
2305
|
+
}
|
|
2306
|
+
colorResolution = addColor(colorResolution);
|
|
2307
|
+
colorResolution = addTheme(colorResolution, theme);
|
|
2308
|
+
// takes care of the case where colorPrimaryDark ends up with ColorPrimaryDark
|
|
2309
|
+
colorResolution = lowerCaseFirst(colorResolution);
|
|
2310
|
+
return colorResolution;
|
|
2254
2311
|
}
|
|
2255
2312
|
|
|
2256
2313
|
const duetButtonCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;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{margin-right:0 !important}@media (max-width: 35.9375em){:host{width:100%}}:host(.duet-small){margin-right:2px !important;margin-bottom:8px !important}:host(.duet-small):last-child,:host(.duet-small):last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host(.duet-small){width:auto}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}:host(.duet-fixed){width:auto !important}:host(:last-child){margin-right:0 !important}.duet-button-container{position:relative;width:100%}.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{padding:0 !important}.duet-button.duet-m-0{margin:0 !important}.duet-button.duet-button-is-small: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{padding-left:48px !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}.duet-theme-turva .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{position:relative;display:inline-block;margin:0 auto;pointer-events:none}.duet-button.duet-no-wrap{white-space:nowrap}.duet-button.icon{padding-left:52px !important}.duet-button.icon-right{padding-right:52px !important;padding-left:28px !important}.duet-button svg{width:100%;min-width:100%;fill:currentColor}.duet-button .duet-button-icon{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{width:16px;height:16px}.duet-button .duet-button-icon.right{right:-28px;left:auto}.duet-button .duet-button-icon.large{left:-32px;width:20px;height:20px}.duet-button .duet-button-icon.large duet-icon{width:20px;height:20px}.duet-button .duet-button-icon.large.right{right:-32px;left:auto}.duet-button .duet-button-icon.medium-small{left:-16px;width:10px;height:10px;padding-top:1px}.duet-button .duet-button-icon.medium-small duet-icon{width:10px;height:10px}.duet-button .duet-button-icon.medium-small.right{right:-16px;left:auto}.duet-button .duet-button-icon.small{left:-16px;width:7px;height:7px}.duet-button .duet-button-icon.small duet-icon{width:7px;height:7px}.duet-button .duet-button-icon.small.right{right:-16px;left:auto}.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{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-button:active{opacity:0.75;transition:none}.duet-button.default{border-color:#e1e3e6}.duet-theme-turva .duet-button.default{color:#c60c30 !important;border-color:#e4e4e6}.duet-button.default:hover{border-color:#0077b3}.duet-theme-turva .duet-button.default:hover{border-color:#c60c30}.duet-button.default.duet-button-negative{background-color:white}.duet-theme-turva .duet-button.default.duet-button-negative{background-color:#e4e4e6 !important}.duet-button.default.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.default.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.primary{color:white !important;background:#0077b3;border-color:#0077b3}.duet-theme-turva .duet-button.primary{color:white !important;background:#c60c30;border-color:#c60c30}.duet-button.primary:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.primary:hover{background:#940925;border-color:#940925}.duet-button.primary: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{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}.duet-button.secondary{color:#00294d !important;background:transparent;border-color:#00294d}.duet-theme-turva .duet-button.secondary{color:#171c3a !important;border-color:#171c3a}.duet-button.secondary:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.secondary.duet-button-negative{color:#e1e3e6 !important;border-color:white}.duet-theme-turva .duet-button.secondary.duet-button-negative{color:#e4e4e6 !important}.duet-button.secondary.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.negative{color:#00294d !important;background:white;border-color:white}.duet-theme-turva .duet-button.negative{color:#171c3a !important}.duet-button.negative:hover{color:white !important;background:transparent;border-color:white}.duet-button.negative: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{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-button.destructive{color:#de2362 !important;background:white;border-color:#de2362}.duet-theme-turva .duet-button.destructive{color:#e02a0d !important;background:white;border-color:#e02a0d}.duet-button.destructive:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}.duet-theme-turva .duet-button.destructive:hover{color:white !important;background:#b3220a;border-color:#b3220a}.duet-button.plain{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{color:#c60c30 !important;background:transparent;border-color:transparent}.duet-button.plain.icon{padding-left:20px !important}.duet-button.plain.icon.icon-right{padding-right:20px !important;padding-left:0 !important}.duet-button.plain.icon.medium{padding-left:24px !important}.duet-button.plain.icon.medium.icon-right{padding-right:24px !important;padding-left:0 !important}.duet-button.plain.icon.large{padding-left:30px !important}.duet-button.plain.icon.large.icon-right{padding-right:30px !important;padding-left:0 !important}.duet-button.plain .duet-button-icon.left{left:-16.6666666667px !important}.duet-button.plain .duet-button-icon.left.medium{left:-24px !important}.duet-button.plain .duet-button-icon.left.large{left:-30px !important}.duet-button.plain .duet-button-icon.right{right:-16.6666666667px !important}.duet-button.plain .duet-button-icon.right.medium{right:-24px !important}.duet-button.plain .duet-button-icon.right.large{right:-30px !important}.duet-button.plain[disabled]{color:#657787 !important;background:transparent !important;border-color:transparent !important}.duet-theme-turva .duet-button.plain[disabled]{color:transparent !important;background:transparent !important;border-color:#e4e4e6 !important}.duet-button.plain:hover{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-button.plain:hover{color:#940925 !important}.duet-button.plain.duet-button-negative{color:white !important}.duet-theme-turva .duet-button.plain.duet-button-negative{color:#e4e4e6 !important}.duet-button.plain.duet-button-negative:hover{color:#0077b3 !important}.duet-theme-turva .duet-button.plain.duet-button-negative:hover{color:#c60c30 !important}.duet-button.duet-button-icon-only{min-width:48px;min-height:48px;padding:0 !important}.duet-button.duet-button-icon-only .duet-button-contents{position:static}.duet-button.duet-button-icon-only .duet-button-icon.left.large,.duet-button.duet-button-icon-only .duet-button-icon.left.medium,.duet-button.duet-button-icon-only .duet-button-icon.left.small{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{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{color:#747475 !important;background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-button-is-loading.primary{color:white}.duet-button-is-loading.default{color:#0077b3}.duet-button-is-loading.default.duet-theme-turva{color:#c60c30}.duet-button-is-loading .duet-button-contents{visibility:hidden;opacity:0}";
|
|
2257
2314
|
|
|
2258
|
-
let DuetButton$1 = class extends
|
|
2315
|
+
let DuetButton$1 = class extends H {
|
|
2259
2316
|
constructor() {
|
|
2260
2317
|
super();
|
|
2261
2318
|
this.__registerHost();
|
|
@@ -2490,7 +2547,7 @@ let DuetButton$1 = class extends HTMLElement {
|
|
|
2490
2547
|
|
|
2491
2548
|
const duetCaptionCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:flex;flex:0 0 100%;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:#657787;vertical-align:top}:host.duet-p-0{padding:0 !important}:host.duet-m-0{margin:0 !important}:host(.duet-caption-small){font-size:0.875rem;line-height:1.25}:host(.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:#747475}:host(.duet-caption-selected){color:#0077b3}:host(.duet-caption-selected.duet-theme-turva){color:#171c3a}:host(.duet-m-0){margin:0 !important}";
|
|
2492
2549
|
|
|
2493
|
-
let DuetCaption$1 = class extends
|
|
2550
|
+
let DuetCaption$1 = class extends H {
|
|
2494
2551
|
constructor() {
|
|
2495
2552
|
super();
|
|
2496
2553
|
this.__registerHost();
|
|
@@ -2556,7 +2613,7 @@ const isKeyboardClick = (e) => isEnterKey(e) || isSpaceKey(e);
|
|
|
2556
2613
|
|
|
2557
2614
|
const duetCardCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}:host(.duet-card-info){margin-bottom:16px !important}:host(.duet-m-0){margin:0 !important}.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{padding:0 !important}.duet-card.duet-m-0{margin:0 !important}.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{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 36em){.duet-card{padding:28px !important}}.duet-card.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:#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{padding:20px !important}}@media (min-width: 36em){.duet-card.medium{padding:28px !important}}@media (min-width: 48em){.duet-card.medium{padding:36px !important}}@media (min-width: 36em){.duet-card.large{padding:36px !important}}@media (min-width: 48em){.duet-card.large{padding:48px !important}}@media (min-width: 36em){.duet-card.x-large{padding:48px !important}}@media (min-width: 48em){.duet-card.x-large{padding:72px !important}}.duet-card.duet-card-collapsed{padding-bottom:0 !important}@media (min-width: 36em){.duet-card.duet-card-collapsed{padding-bottom:0 !important}}.duet-card.info{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}.duet-card.info.duet-theme-turva{background:rgba(23, 28, 58, 0.035) !important}.duet-card.plain{box-shadow:none}.duet-card.plain:not(.duet-card-has-bg){background:transparent !important}.duet-card-heading-grid{display:flex;flex-direction:row}.duet-card-icon{align-self:center}.duet-card-heading-text{flex:1;word-break:break-word}.duet-card-secondary-heading{font-size:1rem;font-weight:600;word-break:break-word}.duet-card-secondary-heading--inline{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{display:none}}.duet-card-secondary-heading--new-line{display:none}@media (max-width: 22.5em){.duet-card-secondary-heading--new-line{display:block}}.duet-card-heading{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{padding:15px 28px 16px !important;margin:-28px -28px 20px}}.duet-card-heading[role=button]{-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{outline:0}:host(.user-is-tabbing) .duet-card-heading[role=button]: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{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-card-collapsed .duet-card-heading{margin-bottom:0 !important;border-bottom:0 !important}.duet-theme-turva .duet-card-heading{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{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}.medium .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.medium .duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){.medium .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}.large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.large .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){.large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}.x-large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.x-large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){.x-large .duet-card-heading{padding:39px 72px 40px !important;margin:-72px -72px 48px}}.none .duet-card-heading{padding:0 0 20px !important;margin:0 0 20px}.duet-card-footer{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{background:#f5f5f7}@media (min-width: 36em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){.x-small .duet-card-footer{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){.medium .duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.medium .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){.large .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){.large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){.x-large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){.x-large .duet-card-footer{padding:39px 72px 40px !important;margin:48px -72px -72px}}.none .duet-card-footer{padding:12px 0 !important;margin:20px 0 0}.duet-card-content{width:100%}.duet-card-collapsed .duet-card-content{display:none}.duet-card-caret{position:relative;top:6px;align-self:flex-start;transition:300ms ease}[aria-expanded=false] .duet-card-caret{transform:rotate(-180deg)}.duet-card-image-mask{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{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){.medium .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){.medium .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){.large .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){.large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){.x-large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){.x-large .duet-card-image-mask{width:calc(100% + 144px);margin:-72px 0 36px -72px}}.none .duet-card-image-mask{width:100%;margin:0 0 20px}.duet-card-image{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{transition:box-shadow 300ms ease, background-position 300ms ease}a.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{transform:scale(1.024)}.duet-theme-turva a.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{transition:none;transform:translateY(1px)}";
|
|
2558
2615
|
|
|
2559
|
-
let DuetCard$1 = class extends
|
|
2616
|
+
let DuetCard$1 = class extends H {
|
|
2560
2617
|
constructor() {
|
|
2561
2618
|
super();
|
|
2562
2619
|
this.__registerHost();
|
|
@@ -2686,9 +2743,9 @@ let DuetCard$1 = class extends HTMLElement {
|
|
|
2686
2743
|
static get style() { return duetCardCss; }
|
|
2687
2744
|
};
|
|
2688
2745
|
|
|
2689
|
-
const duetCheckboxCss = "*.sc-duet-checkbox,*.sc-duet-checkbox::after,*.sc-duet-checkbox::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-checkbox-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;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-checkbox-h:last-child,.sc-duet-checkbox-h:last-of-type{margin-right:0 !important}.sc-duet-checkbox-h:last-
|
|
2746
|
+
const duetCheckboxCss = "*.sc-duet-checkbox,*.sc-duet-checkbox::after,*.sc-duet-checkbox::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-checkbox-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;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-checkbox-h:last-child,.sc-duet-checkbox-h:last-of-type{margin-right:0 !important}.sc-duet-checkbox-h:last-child:not(:only-child){margin-bottom:0 !important}.duet-m-0.sc-duet-checkbox-h{margin:0 !important}.duet-label.sc-duet-checkbox{position:relative;z-index:100;display:inline;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;vertical-align:top;cursor:pointer;background:transparent;transition:300ms ease}.duet-theme-turva.sc-duet-checkbox .duet-label.sc-duet-checkbox{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-label.sc-duet-checkbox span.sc-duet-checkbox{display:inline-block;width:calc(100% - 32px);font-size:1rem;font-weight:400;vertical-align:top}.duet-checkbox-container.sc-duet-checkbox{position:relative;width:100%;height:100%}.duet-checkbox.sc-duet-checkbox{padding:14px !important;position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;cursor:pointer;opacity:0}.duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox::before{z-index:100;display:inline-block;width:20px;height:20px;margin:2px 10px 1px 1px;vertical-align:top;content:\"\";background:white;border:1px solid #00294d;border-radius:4px}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#171c3a}.duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#00294d;border:1px solid #00294d}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#171c3a;border-color:#171c3a}.duet-checkbox.sc-duet-checkbox:focus+label.sc-duet-checkbox::before{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox:focus+label.sc-duet-checkbox::before{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox{position:static}.duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::after{position:absolute;top:6px;left:5px;z-index:200;width:12px;height:12px;pointer-events:none;content:\"\";background:transparent url(\"data:image/svg+xml,%3Csvg%20fill%3D%27white%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M23.374.287a1.5%2C1.5%2C0%2C0%2C0-2.093.345L7.246%2C20.2%2C2.561%2C15.511A1.5%2C1.5%2C0%2C1%2C0%2C.439%2C17.632l5.935%2C5.934a1.525%2C1.525%2C0%2C0%2C0%2C2.279-.186l15.066-21A1.5%2C1.5%2C0%2C0%2C0%2C23.374.287Z%27%20%2F%3E%3C%2Fsvg%3E\") no-repeat 0 0;background-size:100% auto}.duet-checkbox[disabled].sc-duet-checkbox{cursor:default}.duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox{color:#657787}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox{color:#747475}.duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#cfd2d4}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#cfcfd1}.duet-checkbox[disabled].sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#657787;border:1px solid #657787}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#747475;border-color:#747475}.duet-label-hidden.sc-duet-checkbox .duet-label.sc-duet-checkbox span.sc-duet-checkbox{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
2690
2747
|
|
|
2691
|
-
let DuetCheckbox$1 = class extends
|
|
2748
|
+
let DuetCheckbox$1 = class extends H {
|
|
2692
2749
|
constructor() {
|
|
2693
2750
|
super();
|
|
2694
2751
|
this.__registerHost();
|
|
@@ -2794,17 +2851,165 @@ let DuetCheckbox$1 = class extends HTMLElement {
|
|
|
2794
2851
|
|
|
2795
2852
|
var messagingInfo={"title":"messaging-info","tags":"messaging info information circle","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M13.5 17.25A2.252 2.252 0 0 1 11.25 15v-3.75h-.75a.75.75 0 0 1 0-1.5h.75c.827 0 1.5.673 1.5 1.5V15c0 .414.336.75.75.75h.75a.75.75 0 0 1 0 1.5z\"/><circle cx=\"11.625\" cy=\"7.125\" r=\"1.125\"/><path d=\"M12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22.5C6.21 1.5 1.5 6.21 1.5 12S6.21 22.5 12 22.5 22.5 17.79 22.5 12 17.79 1.5 12 1.5z\"/></svg>"};
|
|
2796
2853
|
|
|
2854
|
+
const isComplexType = (o) => {
|
|
2855
|
+
// https://jsperf.com/typeof-fn-object/5
|
|
2856
|
+
o = typeof o;
|
|
2857
|
+
return o === 'object' || o === 'function';
|
|
2858
|
+
};
|
|
2859
|
+
/**
|
|
2860
|
+
* Production h() function based on Preact by
|
|
2861
|
+
* Jason Miller (@developit)
|
|
2862
|
+
* Licensed under the MIT License
|
|
2863
|
+
* https://github.com/developit/preact/blob/master/LICENSE
|
|
2864
|
+
*
|
|
2865
|
+
* Modified for Stencil's compiler and vdom
|
|
2866
|
+
*/
|
|
2867
|
+
// const stack: any[] = [];
|
|
2868
|
+
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
2869
|
+
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
2870
|
+
const h = (nodeName, vnodeData, ...children) => {
|
|
2871
|
+
let child = null;
|
|
2872
|
+
let key = null;
|
|
2873
|
+
let slotName = null;
|
|
2874
|
+
let simple = false;
|
|
2875
|
+
let lastSimple = false;
|
|
2876
|
+
let vNodeChildren = [];
|
|
2877
|
+
const walk = (c) => {
|
|
2878
|
+
for (let i = 0; i < c.length; i++) {
|
|
2879
|
+
child = c[i];
|
|
2880
|
+
if (Array.isArray(child)) {
|
|
2881
|
+
walk(child);
|
|
2882
|
+
}
|
|
2883
|
+
else if (child != null && typeof child !== 'boolean') {
|
|
2884
|
+
if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
|
|
2885
|
+
child = String(child);
|
|
2886
|
+
}
|
|
2887
|
+
if (simple && lastSimple) {
|
|
2888
|
+
// If the previous child was simple (string), we merge both
|
|
2889
|
+
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
2890
|
+
}
|
|
2891
|
+
else {
|
|
2892
|
+
// Append a new vNode, if it's text, we create a text vNode
|
|
2893
|
+
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
2894
|
+
}
|
|
2895
|
+
lastSimple = simple;
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
};
|
|
2899
|
+
walk(children);
|
|
2900
|
+
if (vnodeData) {
|
|
2901
|
+
// normalize class / classname attributes
|
|
2902
|
+
if (vnodeData.key) {
|
|
2903
|
+
key = vnodeData.key;
|
|
2904
|
+
}
|
|
2905
|
+
if (vnodeData.name) {
|
|
2906
|
+
slotName = vnodeData.name;
|
|
2907
|
+
}
|
|
2908
|
+
{
|
|
2909
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
2910
|
+
if (classData) {
|
|
2911
|
+
vnodeData.class =
|
|
2912
|
+
typeof classData !== 'object'
|
|
2913
|
+
? classData
|
|
2914
|
+
: Object.keys(classData)
|
|
2915
|
+
.filter((k) => classData[k])
|
|
2916
|
+
.join(' ');
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
if (typeof nodeName === 'function') {
|
|
2921
|
+
// nodeName is a functional component
|
|
2922
|
+
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
2923
|
+
}
|
|
2924
|
+
const vnode = newVNode(nodeName, null);
|
|
2925
|
+
vnode.$attrs$ = vnodeData;
|
|
2926
|
+
if (vNodeChildren.length > 0) {
|
|
2927
|
+
vnode.$children$ = vNodeChildren;
|
|
2928
|
+
}
|
|
2929
|
+
{
|
|
2930
|
+
vnode.$key$ = key;
|
|
2931
|
+
}
|
|
2932
|
+
{
|
|
2933
|
+
vnode.$name$ = slotName;
|
|
2934
|
+
}
|
|
2935
|
+
return vnode;
|
|
2936
|
+
};
|
|
2937
|
+
const newVNode = (tag, text) => {
|
|
2938
|
+
const vnode = {
|
|
2939
|
+
$flags$: 0,
|
|
2940
|
+
$tag$: tag,
|
|
2941
|
+
$text$: text,
|
|
2942
|
+
$elm$: null,
|
|
2943
|
+
$children$: null,
|
|
2944
|
+
};
|
|
2945
|
+
{
|
|
2946
|
+
vnode.$attrs$ = null;
|
|
2947
|
+
}
|
|
2948
|
+
{
|
|
2949
|
+
vnode.$key$ = null;
|
|
2950
|
+
}
|
|
2951
|
+
{
|
|
2952
|
+
vnode.$name$ = null;
|
|
2953
|
+
}
|
|
2954
|
+
return vnode;
|
|
2955
|
+
};
|
|
2956
|
+
const vdomFnUtils = {
|
|
2957
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
2958
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
2959
|
+
};
|
|
2960
|
+
const convertToPublic = (node) => ({
|
|
2961
|
+
vattrs: node.$attrs$,
|
|
2962
|
+
vchildren: node.$children$,
|
|
2963
|
+
vkey: node.$key$,
|
|
2964
|
+
vname: node.$name$,
|
|
2965
|
+
vtag: node.$tag$,
|
|
2966
|
+
vtext: node.$text$,
|
|
2967
|
+
});
|
|
2968
|
+
const convertToPrivate = (node) => {
|
|
2969
|
+
if (typeof node.vtag === 'function') {
|
|
2970
|
+
const vnodeData = Object.assign({}, node.vattrs);
|
|
2971
|
+
if (node.vkey) {
|
|
2972
|
+
vnodeData.key = node.vkey;
|
|
2973
|
+
}
|
|
2974
|
+
if (node.vname) {
|
|
2975
|
+
vnodeData.name = node.vname;
|
|
2976
|
+
}
|
|
2977
|
+
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
2978
|
+
}
|
|
2979
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
2980
|
+
vnode.$attrs$ = node.vattrs;
|
|
2981
|
+
vnode.$children$ = node.vchildren;
|
|
2982
|
+
vnode.$key$ = node.vkey;
|
|
2983
|
+
vnode.$name$ = node.vname;
|
|
2984
|
+
return vnode;
|
|
2985
|
+
};
|
|
2986
|
+
|
|
2987
|
+
const focusElement = (element) => {
|
|
2988
|
+
if ("setFocus" in element) {
|
|
2989
|
+
element.setFocus();
|
|
2990
|
+
}
|
|
2991
|
+
else {
|
|
2992
|
+
element.focus();
|
|
2993
|
+
}
|
|
2994
|
+
};
|
|
2995
|
+
const FocusGuard = ({ moveFocusTo }) => {
|
|
2996
|
+
return h("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
|
|
2997
|
+
};
|
|
2998
|
+
|
|
2797
2999
|
const duetChoiceCss = "*.sc-duet-choice,*.sc-duet-choice::after,*.sc-duet-choice::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-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;flex-direction:column;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-choice-h:last-child,.sc-duet-choice-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){.sc-duet-choice-h{width:100%}}.duet-expand.sc-duet-choice-h{width:100% !important}.duet-m-0.sc-duet-choice-h{margin:0 !important}.duet-fixed.sc-duet-choice-h{width:auto !important}.vertical.sc-duet-choice-h{margin-right:0 !important}.horizontal.sc-duet-choice-h{margin-bottom:0 !important}@media (min-width: 48em){.horizontal-responsive.sc-duet-choice-h{margin-bottom:0 !important;margin-right:16px !important}.horizontal-responsive.sc-duet-choice-h:last-child,.horizontal-responsive.sc-duet-choice-h:last-of-type{margin-right:0 !important}}.sc-duet-choice-h:last-child:not(:only-child){margin-right:0 !important}.duet-choice-card.sc-duet-choice{position:relative;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:400;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#00294d !important;text-align:left;background:white;border-width:2px}.duet-choice-card.duet-p-0.sc-duet-choice{padding:0 !important}.duet-choice-card.duet-m-0.sc-duet-choice{margin:0 !important}.duet-theme-turva.sc-duet-choice .duet-choice-card.sc-duet-choice{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 !important}.duet-choice-card-flextainer.sc-duet-choice{display:flex}.duet-choice-label.sc-duet-choice{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:20px 48px 20px 16px;font-size:1rem;font-weight:600;text-decoration:none;cursor:pointer;border:2px solid #e1e3e6;border-radius:4px;transition:background-color 150ms ease}.has-info.sc-duet-choice .duet-choice-label.sc-duet-choice{padding-right:110px;border-top-right-radius:0;border-bottom-right-radius:0}.info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom-right-radius:0;border-bottom-left-radius:0}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#909599}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#909599}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#747475}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-choice-label.sc-duet-choice:active{opacity:0.75;transition:none !important}.has-icon.sc-duet-choice .duet-choice-label.sc-duet-choice{padding-left:48px}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#0077b3 !important;background:#f3f9fc;border-color:#0077b3 !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#0077b3}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#171c3a !important;background:#f5f5f7;border-color:#171c3a !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#c60c30}.checked.collapsible.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom:0 !important;border-bottom-right-radius:0;border-bottom-left-radius:0}input.sc-duet-choice:focus{outline:0}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3)}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2)}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#e1e3e6 !important}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#657787 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#747475 !important;background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#747475 !important}.checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e1e3e6 !important;border-color:#e1e3e6 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-checkmark-container.sc-duet-choice{position:absolute;top:17.7777777778px;right:16px;width:20px;height:20px;border:1px solid #909599;border-radius:4px;transition:border 300ms ease}.duet-theme-turva.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#747475}.checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#0077b3;border-color:#0077b3;transition:none}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#171c3a;border-color:#171c3a !important}.duet-checkmark-container.duet-checkmark-radio.sc-duet-choice{border-radius:50%}[disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfcfd1 !important}.checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfcfd1 !important}.duet-checkmark.sc-duet-choice{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid white;border-right:2px solid white;opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}.duet-choice-card-icon.sc-duet-choice{position:absolute;top:50%;left:16px;transform:translateY(-50%)}.duet-choice-card-icon.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-section-hidden.sc-duet-choice{display:none}.duet-choice-card-info.duet-choice-card-collapsed.sc-duet-choice,.duet-choice-card-collapsed.duet-choice-card-collapsible.sc-duet-choice{position:relative;width:auto;padding:0 !important;background:unset !important;border:0;border-radius:0}.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important;position:relative;z-index:200;width:100%;font-weight:400;color:#00294d;border:2px solid #e1e3e6;border-top:0;border-radius:0 0 4px 4px}.duet-theme-turva.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.duet-theme-turva.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{color:#171c3a;border-color:#171c3a}.checked.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.checked.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{display:block}.duet-choice-card-info-expanded.sc-duet-choice,.duet-choice-card-collapsible-expanded.sc-duet-choice{display:block}.duet-choice-card-collapsible.sc-duet-choice{background:white;border:2px solid #0077b3;border-top:0}.duet-choice-card-collapsible.duet-theme-turva.sc-duet-choice{background:white;border-color:#171c3a}.duet-choice-card-collapsible-disabled.sc-duet-choice{background:#f5f8fa;border-color:#e1e3e6}.duet-choice-card-collapsible-disabled.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-card-info.sc-duet-choice{font-size:0.875rem;line-height:1.5;background:#f5f8fa;transition:150ms ease-out}.duet-choice-card-info.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-info-toggle.sc-duet-choice{display:flex;flex-shrink:0;justify-content:center;width:57.6px;padding-top:18px;cursor:pointer;background:white;border:2px solid #e1e3e6;border-left:0 none;border-top-right-radius:4px;border-bottom-right-radius:4px;-webkit-appearance:none;appearance:none}.duet-choice-info-toggle[aria-expanded=true].sc-duet-choice{background:#f5f8fa;border-bottom:0;border-bottom-right-radius:0}.duet-choice-info-toggle[disabled].sc-duet-choice{pointer-events:none;background:#f5f8fa !important;border-color:#e1e3e6 !important}.duet-choice-info-toggle[disabled].sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#909599 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice{background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#747475 !important}.duet-choice-info-toggle.sc-duet-choice:focus{outline:none}.user-is-tabbing.sc-duet-choice-h .duet-choice-info-toggle.sc-duet-choice:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-choice-info-toggle.sc-duet-choice{border-left-color:#909599}.checked.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice{border-left-color:#0077b3 !important}.duet-choice-info-toggle.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#0077b3}.duet-theme-turva.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#c60c30}.duet-choice-input.sc-duet-choice{position:absolute !important;width:auto;height:auto;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);color:transparent}";
|
|
2798
3000
|
|
|
2799
|
-
let DuetChoice$1 = class extends
|
|
3001
|
+
let DuetChoice$1 = class extends H {
|
|
2800
3002
|
constructor() {
|
|
2801
3003
|
super();
|
|
2802
3004
|
this.__registerHost();
|
|
2803
3005
|
this.duetChange = createEvent$2(this, "duetChange", 7);
|
|
2804
3006
|
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
2805
3007
|
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
3008
|
+
this.hasHeader = false;
|
|
2806
3009
|
this.choiceId = createID("DuetChoice");
|
|
2807
3010
|
this.expandId = createID("DuetChoiceExpand");
|
|
3011
|
+
this.headerId = createID("DuetChoiceHeader");
|
|
3012
|
+
this.infoButtonId = createID("DuetChoiceInfoButton");
|
|
2808
3013
|
/**
|
|
2809
3014
|
* State() variables
|
|
2810
3015
|
* Inlined decorator, alphabetical order.
|
|
@@ -2882,6 +3087,24 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2882
3087
|
* browser from displaying its own validation errors.
|
|
2883
3088
|
*/
|
|
2884
3089
|
this.required = false;
|
|
3090
|
+
/**
|
|
3091
|
+
* Placeholder defaults
|
|
3092
|
+
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
3093
|
+
*/
|
|
3094
|
+
this.infoLabelDefaults = {
|
|
3095
|
+
fi: "Lisätietoja",
|
|
3096
|
+
en: "More information about",
|
|
3097
|
+
sv: "Mera information om",
|
|
3098
|
+
};
|
|
3099
|
+
/**
|
|
3100
|
+
* Hint text to display before the user types into the date picker input.
|
|
3101
|
+
* @default {
|
|
3102
|
+
* fi: "Lisätietoja",
|
|
3103
|
+
* en: "More information about",
|
|
3104
|
+
* sv: "Mera information om",
|
|
3105
|
+
* }
|
|
3106
|
+
*/
|
|
3107
|
+
this.infoLabel = getLocaleString(this.infoLabelDefaults, getLanguage());
|
|
2885
3108
|
this.onMouseEnter = () => {
|
|
2886
3109
|
this.isHovering = true;
|
|
2887
3110
|
};
|
|
@@ -2956,6 +3179,7 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2956
3179
|
componentWillLoad() {
|
|
2957
3180
|
inheritGlobalTheme(this);
|
|
2958
3181
|
this.hasInfo = !!this.element.querySelector("[slot='info']");
|
|
3182
|
+
this.hasHeader = !!this.element.querySelector('[slot="header"]');
|
|
2959
3183
|
this.hasAdditional = !!this.element.querySelector("[slot='additional']");
|
|
2960
3184
|
}
|
|
2961
3185
|
/**
|
|
@@ -2976,8 +3200,11 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2976
3200
|
handleHostKeyDown() {
|
|
2977
3201
|
this.isKeyDown = true;
|
|
2978
3202
|
}
|
|
2979
|
-
handleHostKeyUp() {
|
|
3203
|
+
handleHostKeyUp(ev) {
|
|
2980
3204
|
this.isKeyDown = false;
|
|
3205
|
+
if (isEscapeKey(ev) && this.isInfoOpen) {
|
|
3206
|
+
this.toggleInfo();
|
|
3207
|
+
}
|
|
2981
3208
|
}
|
|
2982
3209
|
/**
|
|
2983
3210
|
* Sets focus on the specified `duet-choice`. Use this method instead of the global
|
|
@@ -2991,7 +3218,12 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2991
3218
|
return this.accessibleDescribedBy;
|
|
2992
3219
|
}
|
|
2993
3220
|
if (this.collapsible || this.hasInfo) {
|
|
2994
|
-
|
|
3221
|
+
if (this.hasHeader) {
|
|
3222
|
+
return this.headerId;
|
|
3223
|
+
}
|
|
3224
|
+
else {
|
|
3225
|
+
return this.expandId;
|
|
3226
|
+
}
|
|
2995
3227
|
}
|
|
2996
3228
|
return null;
|
|
2997
3229
|
}
|
|
@@ -3040,41 +3272,53 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
3040
3272
|
info: this.isInfoOpen,
|
|
3041
3273
|
collapsible: this.collapsible,
|
|
3042
3274
|
"duet-p-0": this.padding === "none",
|
|
3043
|
-
} }, h$1("input", { class: "duet-choice-input", type: this.type, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, disabled: this.disabled || this.groupDisabled, required: this.required, id: identifier, name: this.name, value: this.value, checked: this.checked, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.getAriaDescribedby(), onKeyDown: this.handleKeyDown, ref: input => (this.nativeInput = input) }), h$1("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick }, this.icon && (h$1("div", { class: "duet-choice-card-icon" }, h$1("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), this.label, this.hasInfo
|
|
3044
|
-
// this is an incredibly dirty way of both hiding the expanded / collapsed state text
|
|
3045
|
-
// and an extremely bad way of notifying any screenreaders about state - unfortunately
|
|
3046
|
-
// this is extremely difficult to do consistently across browsers so this hack is the best way todo it
|
|
3047
|
-
(this.collapsible && (h$1("span", { lang: "en", style: { opacity: "0", pointerEvents: "none", fontSize: "0", lineHeight: "0" } }, this.collapsible
|
|
3048
|
-
? this.checked
|
|
3049
|
-
? ", Expanded"
|
|
3050
|
-
: ", Collapsed"
|
|
3051
|
-
: this.isInfoOpen
|
|
3052
|
-
? ", Expanded"
|
|
3053
|
-
: ", Collapsed"))), this.caption && (h$1("div", null, h$1("duet-spacer", { size: "xx-small" }), h$1("duet-caption", { margin: "none", selected: this.checked }, this.caption))), this.hasAdditional && (h$1("div", null, h$1("duet-spacer", { size: "xx-small" }), h$1("slot", { name: "additional" }))), h$1("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && h$1("div", { class: "duet-checkmark" })))), this.hasInfo && !this.collapsible && (h$1("button", { class: {
|
|
3275
|
+
} }, h$1("input", { class: "duet-choice-input", type: this.type, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, disabled: this.disabled || this.groupDisabled, required: this.required, id: identifier, name: this.name, value: this.value, checked: this.checked, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.getAriaDescribedby(), onKeyDown: this.handleKeyDown, ref: input => (this.nativeInput = input) }), h$1("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick }, this.icon && (h$1("div", { class: "duet-choice-card-icon" }, h$1("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), this.label, this.caption && (h$1("div", null, h$1("duet-spacer", { size: "xx-small" }), h$1("duet-caption", { margin: "none", selected: this.checked }, this.caption))), this.hasAdditional && (h$1("div", null, h$1("duet-spacer", { size: "xx-small" }), h$1("slot", { name: "additional" }))), h$1("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && h$1("div", { class: "duet-checkmark" })))), this.hasInfo && !this.collapsible && (h$1("button", { ref: button => (this.infoButtonEl = button), id: this.infoButtonId, class: {
|
|
3054
3276
|
"duet-choice-info-toggle": true,
|
|
3055
3277
|
"duet-theme-turva": this.theme === "turva",
|
|
3056
|
-
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-controls": this.expandId, "aria-flowto": this.expandId, tabindex: this.type === "radio" && !this.checked ? "-1" : "0", type: "button" }, h$1("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton), h$1("div", { class: "duet-choice-info-icon" }, h$1("duet-icon", { icon: messagingInfo.svg, margin: "none", size: "small", color: "currentColor" }))))), this.collapsible || this.hasInfo ? (h$1("div", { class: this.getClassNames(), id: this.expandId }, h$1("span", { class: {
|
|
3278
|
+
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-label": `${this.infoLabel} ${this.label}`, "aria-controls": this.expandId, "aria-flowto": this.expandId, tabindex: this.type === "radio" && !this.checked ? "-1" : "0", type: "button" }, h$1("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton), h$1("div", { class: "duet-choice-info-icon" }, h$1("duet-icon", { icon: messagingInfo.svg, margin: "none", size: "small", color: "currentColor" }))))), this.collapsible || this.hasInfo ? (h$1("div", { class: this.getClassNames(), id: this.expandId }, h$1("span", { class: {
|
|
3057
3279
|
"duet-choice-section-visible": this.collapsible ? this.checked : this.isInfoOpen,
|
|
3058
3280
|
"duet-choice-section-hidden": this.collapsible ? !this.checked : !this.isInfoOpen,
|
|
3059
|
-
} }, this.hasInfo ? (h$1("span", null, h$1("slot", { name: "info" }), h$1("slot", null))) : (h$1("span", null, h$1("slot", null)))))) : null));
|
|
3281
|
+
} }, h$1("span", { id: this.headerId }, h$1("slot", { name: "header" })), this.hasInfo ? (h$1("span", null, h$1("span", { "aria-relevant": "all", "aria-atomic": "true", "aria-live": this.isInfoOpen ? "polite" : "off" }, h$1("slot", { name: "info" })), h$1("slot", null))) : (h$1("span", null, h$1("slot", null)))), this.isInfoOpen && h$1(FocusGuard, { moveFocusTo: this.infoButtonEl }))) : null));
|
|
3060
3282
|
}
|
|
3061
3283
|
get element() { return this; }
|
|
3062
3284
|
static get style() { return duetChoiceCss; }
|
|
3063
3285
|
};
|
|
3064
3286
|
|
|
3065
|
-
const
|
|
3287
|
+
const watchFor = (containerEl, tagName, onChange, changeHandler, options = {
|
|
3288
|
+
childList: true,
|
|
3289
|
+
subtree: true,
|
|
3290
|
+
}) => {
|
|
3066
3291
|
let mutation;
|
|
3067
3292
|
if (typeof MutationObserver !== "undefined") {
|
|
3068
3293
|
mutation = new MutationObserver(mutationList => {
|
|
3069
|
-
onChange(
|
|
3070
|
-
});
|
|
3071
|
-
mutation.observe(containerEl, {
|
|
3072
|
-
childList: true,
|
|
3073
|
-
subtree: true,
|
|
3294
|
+
onChange(changeHandler(mutationList, tagName));
|
|
3074
3295
|
});
|
|
3296
|
+
mutation.observe(containerEl, options);
|
|
3075
3297
|
}
|
|
3076
3298
|
return mutation;
|
|
3077
3299
|
};
|
|
3300
|
+
const watchForOptions = (containerEl, tagName, onChange) => {
|
|
3301
|
+
return watchFor(containerEl, tagName, onChange, getSelectedOption);
|
|
3302
|
+
};
|
|
3303
|
+
const watchForElement = (containerEl, tagName, onChange) => {
|
|
3304
|
+
return watchFor(containerEl, tagName, onChange, getElementItem, {
|
|
3305
|
+
childList: true,
|
|
3306
|
+
subtree: true,
|
|
3307
|
+
});
|
|
3308
|
+
};
|
|
3309
|
+
const getElementItem = (mutationList) => {
|
|
3310
|
+
let addedNode = false;
|
|
3311
|
+
let removedNode = false;
|
|
3312
|
+
mutationList.forEach(mut => {
|
|
3313
|
+
if (mut.addedNodes.length) {
|
|
3314
|
+
addedNode = true;
|
|
3315
|
+
}
|
|
3316
|
+
if (mut.removedNodes.length) {
|
|
3317
|
+
removedNode = true;
|
|
3318
|
+
}
|
|
3319
|
+
});
|
|
3320
|
+
return { addedNode, removedNode, mutationList };
|
|
3321
|
+
};
|
|
3078
3322
|
const getSelectedOption = (mutationList, tagName) => {
|
|
3079
3323
|
let newOption;
|
|
3080
3324
|
mutationList.forEach(mut => {
|
|
@@ -3095,7 +3339,7 @@ const findCheckedOption = (el, tagName) => {
|
|
|
3095
3339
|
|
|
3096
3340
|
const duetChoiceGroupCss = "*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-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%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex;margin-bottom:0}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";
|
|
3097
3341
|
|
|
3098
|
-
let DuetChoiceGroup$1 = class extends
|
|
3342
|
+
let DuetChoiceGroup$1 = class extends H {
|
|
3099
3343
|
constructor() {
|
|
3100
3344
|
super();
|
|
3101
3345
|
this.__registerHost();
|
|
@@ -3361,6 +3605,7 @@ const size_tappable_square = "48px";
|
|
|
3361
3605
|
const size_icon_x_small = "16px";
|
|
3362
3606
|
const size_icon_xxx_small = "7px";
|
|
3363
3607
|
const size_button_border = "2px";
|
|
3608
|
+
const size_button_tiny_border = "1px";
|
|
3364
3609
|
const size_icon_medium = "24px";
|
|
3365
3610
|
const size_icon_small = "20px";
|
|
3366
3611
|
const opacity_85 = "0.85";
|
|
@@ -3508,6 +3753,7 @@ const tokens = {
|
|
|
3508
3753
|
size_icon_x_small: size_icon_x_small,
|
|
3509
3754
|
size_icon_xxx_small: size_icon_xxx_small,
|
|
3510
3755
|
size_button_border: size_button_border,
|
|
3756
|
+
size_button_tiny_border: size_button_tiny_border,
|
|
3511
3757
|
size_icon_medium: size_icon_medium,
|
|
3512
3758
|
size_icon_small: size_icon_small,
|
|
3513
3759
|
opacity_85: opacity_85,
|
|
@@ -3658,6 +3904,7 @@ const tokens$1 = /*#__PURE__*/Object.freeze({
|
|
|
3658
3904
|
size_icon_x_small: size_icon_x_small,
|
|
3659
3905
|
size_icon_xxx_small: size_icon_xxx_small,
|
|
3660
3906
|
size_button_border: size_button_border,
|
|
3907
|
+
size_button_tiny_border: size_button_tiny_border,
|
|
3661
3908
|
size_icon_medium: size_icon_medium,
|
|
3662
3909
|
size_icon_small: size_icon_small,
|
|
3663
3910
|
opacity_85: opacity_85,
|
|
@@ -3694,7 +3941,7 @@ const tokens$1 = /*#__PURE__*/Object.freeze({
|
|
|
3694
3941
|
|
|
3695
3942
|
const duetCollapsibleCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;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:1rem;font-weight:600;line-height:1.5;color:#00294d}:host(.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:#171c3a}:host(.duet-m-0){margin:0 !important}.duet-collapsible-content{display:none;padding-left:18px;margin-top: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:1rem;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content{font-size:0.875rem}}.duet-collapsible-content.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:#171c3a}:host([open]) .duet-collapsible-content{display:block}.duet-collapsible-heading{-webkit-user-select:none;user-select:none;display:flex;align-items:center;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.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight{font-weight:400}.duet-collapsible-heading.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:#171c3a}.duet-collapsible-heading .duet-collapsible-heading-content{flex:1}.duet-collapsible-heading:focus{outline:0}:host(.user-is-tabbing) .duet-collapsible-heading: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-collapsible-heading:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon:last-child,.duet-collapsible-heading-icon:last-of-type{margin-right:0 !important}[aria-expanded=true] .duet-collapsible-heading-icon{transform:rotate(180deg)}";
|
|
3696
3943
|
|
|
3697
|
-
let DuetCollapsible$1 = class extends
|
|
3944
|
+
let DuetCollapsible$1 = class extends H {
|
|
3698
3945
|
constructor() {
|
|
3699
3946
|
super();
|
|
3700
3947
|
this.__registerHost();
|
|
@@ -3814,7 +4061,7 @@ let DuetCollapsible$1 = class extends HTMLElement {
|
|
|
3814
4061
|
"duet-collapsible-heading": true,
|
|
3815
4062
|
"duet-theme-turva": this.theme === "turva",
|
|
3816
4063
|
"duet-collapsible-normal-weight": this.headingWeight === "normal",
|
|
3817
|
-
}, 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 }, h$1("div", { class: "duet-collapsible-heading-icon" }, h$1("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: actionArrowDownSmall.svg })), h$1("div", { class: "duet-collapsible-heading-content" }, this.heading)), h$1("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" } }, h$1("slot", null))));
|
|
4064
|
+
}, 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 }, h$1("div", { class: "duet-collapsible-heading-icon" }, h$1("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: actionArrowDownSmall.svg })), h$1("div", { class: "duet-collapsible-heading-content", part: "duet-collapsible-heading-content" }, this.heading)), h$1("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" } }, h$1("slot", null))));
|
|
3818
4065
|
}
|
|
3819
4066
|
get element() { return this; }
|
|
3820
4067
|
static get style() { return duetCollapsibleCss; }
|
|
@@ -3822,7 +4069,7 @@ let DuetCollapsible$1 = class extends HTMLElement {
|
|
|
3822
4069
|
|
|
3823
4070
|
const duetCookieConsentCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:fixed;right:0;bottom:0;left:0;z-index:950;display:block;width:100%;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 48em){:host{right:28px;bottom:28px;left:auto;width:25rem}}:host(:focus){outline:0}:host(.user-is-tabbing: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){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-cookie-consent{padding:20px;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;color:white !important;background-color:rgba(0, 21, 39, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent{background:rgba(0, 21, 39, 0.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.duet-cookie-consent.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\";background-color:rgba(12, 14, 29, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent.duet-theme-turva{background:rgba(12, 14, 29, 0.8)}}@media (min-width: 48em){.duet-cookie-consent{padding:20px;border-radius:4px}}.duet-cookie-consent-content{display:flex;align-items:center;max-width:1110px;margin:0 auto}.duet-cookie-consent-content .expand{flex:1}::slotted(a){font-weight:600;color:white !important;text-decoration:underline;white-space:nowrap}::slotted(a[target=_blank]){padding-right:16px;background:url(\"data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjUgMmExLjUgMS41IDAgMDEuMTQgM0gzLjc1Yy0uMzggMC0uNy4yOC0uNzQuNjVsLS4wMS4xdjE0LjVjMCAuMzguMjguNy42NS43NGwuMS4wMWgxNC41Yy4zOCAwIC43LS4yOC43NC0uNjVsLjAxLS4xdi02Ljg5YTEuNSAxLjUgMCAwMTMgMHY2Ljg5QTMuNzUgMy43NSAwIDAxMTguMjUgMjRIMy43NUEzLjc1IDMuNzUgMCAwMTAgMjAuMjVWNS43NUEzLjc1IDMuNzUgMCAwMTMuNzUgMnptMTItMmMuNzggMCAxLjQyLjYgMS41IDEuMzZWNy41YTEuNSAxLjUgMCAwMS0zIC4xNFY1LjEybC01LjQ0IDUuNDRhMS41IDEuNSAwIDAxLTIuMjItMmwuMS0uMTJMMTguODggM0gxNi41QTEuNSAxLjUgMCAwMTE1IDEuNjRWMS41YzAtLjc4LjYtMS40MiAxLjM2LTEuNWguMTR6Ii8+PC9zdmc+\") no-repeat right 50%;background-size:12px 10px}::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva ::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}";
|
|
3824
4071
|
|
|
3825
|
-
let DuetCookieConsent$1 = class extends
|
|
4072
|
+
let DuetCookieConsent$1 = class extends H {
|
|
3826
4073
|
constructor() {
|
|
3827
4074
|
super();
|
|
3828
4075
|
this.__registerHost();
|
|
@@ -3858,151 +4105,6 @@ let DuetCookieConsent$1 = class extends HTMLElement {
|
|
|
3858
4105
|
static get style() { return duetCookieConsentCss; }
|
|
3859
4106
|
};
|
|
3860
4107
|
|
|
3861
|
-
const isComplexType = (o) => {
|
|
3862
|
-
// https://jsperf.com/typeof-fn-object/5
|
|
3863
|
-
o = typeof o;
|
|
3864
|
-
return o === 'object' || o === 'function';
|
|
3865
|
-
};
|
|
3866
|
-
/**
|
|
3867
|
-
* Production h() function based on Preact by
|
|
3868
|
-
* Jason Miller (@developit)
|
|
3869
|
-
* Licensed under the MIT License
|
|
3870
|
-
* https://github.com/developit/preact/blob/master/LICENSE
|
|
3871
|
-
*
|
|
3872
|
-
* Modified for Stencil's compiler and vdom
|
|
3873
|
-
*/
|
|
3874
|
-
// const stack: any[] = [];
|
|
3875
|
-
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
3876
|
-
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
3877
|
-
const h = (nodeName, vnodeData, ...children) => {
|
|
3878
|
-
let child = null;
|
|
3879
|
-
let key = null;
|
|
3880
|
-
let slotName = null;
|
|
3881
|
-
let simple = false;
|
|
3882
|
-
let lastSimple = false;
|
|
3883
|
-
let vNodeChildren = [];
|
|
3884
|
-
const walk = (c) => {
|
|
3885
|
-
for (let i = 0; i < c.length; i++) {
|
|
3886
|
-
child = c[i];
|
|
3887
|
-
if (Array.isArray(child)) {
|
|
3888
|
-
walk(child);
|
|
3889
|
-
}
|
|
3890
|
-
else if (child != null && typeof child !== 'boolean') {
|
|
3891
|
-
if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
|
|
3892
|
-
child = String(child);
|
|
3893
|
-
}
|
|
3894
|
-
if (simple && lastSimple) {
|
|
3895
|
-
// If the previous child was simple (string), we merge both
|
|
3896
|
-
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
3897
|
-
}
|
|
3898
|
-
else {
|
|
3899
|
-
// Append a new vNode, if it's text, we create a text vNode
|
|
3900
|
-
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
3901
|
-
}
|
|
3902
|
-
lastSimple = simple;
|
|
3903
|
-
}
|
|
3904
|
-
}
|
|
3905
|
-
};
|
|
3906
|
-
walk(children);
|
|
3907
|
-
if (vnodeData) {
|
|
3908
|
-
// normalize class / classname attributes
|
|
3909
|
-
if (vnodeData.key) {
|
|
3910
|
-
key = vnodeData.key;
|
|
3911
|
-
}
|
|
3912
|
-
if (vnodeData.name) {
|
|
3913
|
-
slotName = vnodeData.name;
|
|
3914
|
-
}
|
|
3915
|
-
{
|
|
3916
|
-
const classData = vnodeData.className || vnodeData.class;
|
|
3917
|
-
if (classData) {
|
|
3918
|
-
vnodeData.class =
|
|
3919
|
-
typeof classData !== 'object'
|
|
3920
|
-
? classData
|
|
3921
|
-
: Object.keys(classData)
|
|
3922
|
-
.filter((k) => classData[k])
|
|
3923
|
-
.join(' ');
|
|
3924
|
-
}
|
|
3925
|
-
}
|
|
3926
|
-
}
|
|
3927
|
-
if (typeof nodeName === 'function') {
|
|
3928
|
-
// nodeName is a functional component
|
|
3929
|
-
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
3930
|
-
}
|
|
3931
|
-
const vnode = newVNode(nodeName, null);
|
|
3932
|
-
vnode.$attrs$ = vnodeData;
|
|
3933
|
-
if (vNodeChildren.length > 0) {
|
|
3934
|
-
vnode.$children$ = vNodeChildren;
|
|
3935
|
-
}
|
|
3936
|
-
{
|
|
3937
|
-
vnode.$key$ = key;
|
|
3938
|
-
}
|
|
3939
|
-
{
|
|
3940
|
-
vnode.$name$ = slotName;
|
|
3941
|
-
}
|
|
3942
|
-
return vnode;
|
|
3943
|
-
};
|
|
3944
|
-
const newVNode = (tag, text) => {
|
|
3945
|
-
const vnode = {
|
|
3946
|
-
$flags$: 0,
|
|
3947
|
-
$tag$: tag,
|
|
3948
|
-
$text$: text,
|
|
3949
|
-
$elm$: null,
|
|
3950
|
-
$children$: null,
|
|
3951
|
-
};
|
|
3952
|
-
{
|
|
3953
|
-
vnode.$attrs$ = null;
|
|
3954
|
-
}
|
|
3955
|
-
{
|
|
3956
|
-
vnode.$key$ = null;
|
|
3957
|
-
}
|
|
3958
|
-
{
|
|
3959
|
-
vnode.$name$ = null;
|
|
3960
|
-
}
|
|
3961
|
-
return vnode;
|
|
3962
|
-
};
|
|
3963
|
-
const vdomFnUtils = {
|
|
3964
|
-
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
3965
|
-
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
3966
|
-
};
|
|
3967
|
-
const convertToPublic = (node) => ({
|
|
3968
|
-
vattrs: node.$attrs$,
|
|
3969
|
-
vchildren: node.$children$,
|
|
3970
|
-
vkey: node.$key$,
|
|
3971
|
-
vname: node.$name$,
|
|
3972
|
-
vtag: node.$tag$,
|
|
3973
|
-
vtext: node.$text$,
|
|
3974
|
-
});
|
|
3975
|
-
const convertToPrivate = (node) => {
|
|
3976
|
-
if (typeof node.vtag === 'function') {
|
|
3977
|
-
const vnodeData = Object.assign({}, node.vattrs);
|
|
3978
|
-
if (node.vkey) {
|
|
3979
|
-
vnodeData.key = node.vkey;
|
|
3980
|
-
}
|
|
3981
|
-
if (node.vname) {
|
|
3982
|
-
vnodeData.name = node.vname;
|
|
3983
|
-
}
|
|
3984
|
-
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
3985
|
-
}
|
|
3986
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
|
3987
|
-
vnode.$attrs$ = node.vattrs;
|
|
3988
|
-
vnode.$children$ = node.vchildren;
|
|
3989
|
-
vnode.$key$ = node.vkey;
|
|
3990
|
-
vnode.$name$ = node.vname;
|
|
3991
|
-
return vnode;
|
|
3992
|
-
};
|
|
3993
|
-
|
|
3994
|
-
const focusElement = (element) => {
|
|
3995
|
-
if ("setFocus" in element) {
|
|
3996
|
-
element.setFocus();
|
|
3997
|
-
}
|
|
3998
|
-
else {
|
|
3999
|
-
element.focus();
|
|
4000
|
-
}
|
|
4001
|
-
};
|
|
4002
|
-
const FocusGuard = ({ moveFocusTo }) => {
|
|
4003
|
-
return h("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
|
|
4004
|
-
};
|
|
4005
|
-
|
|
4006
4108
|
const formatOptionsShort = { day: "numeric", month: "long" };
|
|
4007
4109
|
const formatOptionsLong = { day: "numeric", month: "long", year: "numeric" };
|
|
4008
4110
|
const i18n$2 = {
|
|
@@ -4395,7 +4497,7 @@ const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, theme, langu
|
|
|
4395
4497
|
|
|
4396
4498
|
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}";
|
|
4397
4499
|
|
|
4398
|
-
let DuetDatePicker$1 = class extends
|
|
4500
|
+
let DuetDatePicker$1 = class extends H {
|
|
4399
4501
|
constructor() {
|
|
4400
4502
|
super();
|
|
4401
4503
|
this.__registerHost();
|
|
@@ -4436,14 +4538,14 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4436
4538
|
*/
|
|
4437
4539
|
this.margin = "auto";
|
|
4438
4540
|
/**
|
|
4439
|
-
* The currently active language. This setting changes the month/year/day
|
|
4541
|
+
* The currently active language. This setting changes the month/year/day.
|
|
4440
4542
|
* names and button labels as well as all screen reader labels.
|
|
4441
|
-
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
4543
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing.
|
|
4442
4544
|
* @default "fi"
|
|
4443
4545
|
*/
|
|
4444
4546
|
this.language = getLanguage();
|
|
4445
4547
|
/**
|
|
4446
|
-
* Placeholder defaults
|
|
4548
|
+
* Placeholder defaults.
|
|
4447
4549
|
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
4448
4550
|
*/
|
|
4449
4551
|
this.placeholderDefaults = {
|
|
@@ -4506,7 +4608,7 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4506
4608
|
*/
|
|
4507
4609
|
this.min = "";
|
|
4508
4610
|
/**
|
|
4509
|
-
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD
|
|
4611
|
+
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.
|
|
4510
4612
|
* This setting can be used alone or together with the min property.
|
|
4511
4613
|
*/
|
|
4512
4614
|
this.max = "";
|
|
@@ -4803,7 +4905,7 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4803
4905
|
|
|
4804
4906
|
const duetDividerCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-divider{-webkit-user-select:none;user-select:none;display:block;width:100%;height:1px;margin-top:36px !important;margin-bottom:28px;background:#e1e3e6}.duet-divider.duet-p-0{padding:0 !important}.duet-divider.duet-m-0{margin:0 !important}.duet-divider.duet-m-s{margin-bottom:16px !important;margin-top:0 !important}.duet-divider.duet-theme-turva{background:#e4e4e6}";
|
|
4805
4907
|
|
|
4806
|
-
let DuetDivider$1 = class extends
|
|
4908
|
+
let DuetDivider$1 = class extends H {
|
|
4807
4909
|
constructor() {
|
|
4808
4910
|
super();
|
|
4809
4911
|
this.__registerHost();
|
|
@@ -4839,9 +4941,375 @@ let DuetDivider$1 = class extends HTMLElement {
|
|
|
4839
4941
|
static get style() { return duetDividerCss; }
|
|
4840
4942
|
};
|
|
4841
4943
|
|
|
4944
|
+
const debounce = (func, timeout = 50) => {
|
|
4945
|
+
let timer;
|
|
4946
|
+
return (...args) => {
|
|
4947
|
+
clearTimeout(timer);
|
|
4948
|
+
timer = setTimeout(() => {
|
|
4949
|
+
func.apply(undefined, args);
|
|
4950
|
+
}, timeout);
|
|
4951
|
+
};
|
|
4952
|
+
};
|
|
4953
|
+
|
|
4954
|
+
/**
|
|
4955
|
+
* Produces a function which uses template strings to do simple interpolation from objects.
|
|
4956
|
+
*
|
|
4957
|
+
* Usage:
|
|
4958
|
+
* var makeMeKing = generateTemplateFn('${name} is now the king of ${country}!');
|
|
4959
|
+
*
|
|
4960
|
+
* console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'}));
|
|
4961
|
+
* // Logs 'Bryan is now the king of Scotland!'
|
|
4962
|
+
*/
|
|
4963
|
+
const generateTemplateFn = (function () {
|
|
4964
|
+
const cache = {};
|
|
4965
|
+
function generateTemplate(template) {
|
|
4966
|
+
if (typeof template !== "string") {
|
|
4967
|
+
template = template.outerHTML;
|
|
4968
|
+
}
|
|
4969
|
+
let fn = cache[template];
|
|
4970
|
+
if (!fn) {
|
|
4971
|
+
// Replace ${expressions} (etc) with ${map.expressions}.
|
|
4972
|
+
const sanitized = template
|
|
4973
|
+
.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g, function (_, match) {
|
|
4974
|
+
return `\$\{map.${match.trim()}\}`;
|
|
4975
|
+
})
|
|
4976
|
+
// Afterwards, replace anything that's not ${map.expressions}' (etc) with a blank string.
|
|
4977
|
+
.replace(/(\$\{(?!map\.)[^}]+\})/g, "");
|
|
4978
|
+
fn = Function("map", `return \`${sanitized}\``);
|
|
4979
|
+
}
|
|
4980
|
+
return fn;
|
|
4981
|
+
}
|
|
4982
|
+
return generateTemplate;
|
|
4983
|
+
})();
|
|
4984
|
+
|
|
4985
|
+
const duetEditableTableCss = "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{padding:0 !important;font-size:0;border-bottom:0}";
|
|
4986
|
+
|
|
4987
|
+
let DuetEditableTable$1 = class extends H {
|
|
4988
|
+
constructor() {
|
|
4989
|
+
super();
|
|
4990
|
+
this.__registerHost();
|
|
4991
|
+
this.__attachShadow();
|
|
4992
|
+
this.template = undefined;
|
|
4993
|
+
/**
|
|
4994
|
+
* State() variables
|
|
4995
|
+
* @internal
|
|
4996
|
+
*/
|
|
4997
|
+
this.tick = Date.now();
|
|
4998
|
+
/**
|
|
4999
|
+
* Map of items that contain list of things.
|
|
5000
|
+
*/
|
|
5001
|
+
this.items = new Map();
|
|
5002
|
+
/**
|
|
5003
|
+
* Key used to set vertical alignment of action buttons
|
|
5004
|
+
*/
|
|
5005
|
+
this.alignment = "middle";
|
|
5006
|
+
/**
|
|
5007
|
+
* Array of internationalized defaults for the default groups labels.
|
|
5008
|
+
*/
|
|
5009
|
+
this.groupsLabelDefaults = {
|
|
5010
|
+
fi: "Kaikki",
|
|
5011
|
+
en: "All items",
|
|
5012
|
+
sv: "Alla objekt",
|
|
5013
|
+
};
|
|
5014
|
+
/**
|
|
5015
|
+
* Array of internationalized defaults for the default action labels.
|
|
5016
|
+
*/
|
|
5017
|
+
this.actionLabelDefaults = {
|
|
5018
|
+
fi: "Toiminnot",
|
|
5019
|
+
en: "Actions",
|
|
5020
|
+
sv: "Handlingar",
|
|
5021
|
+
};
|
|
5022
|
+
/**
|
|
5023
|
+
* Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
|
|
5024
|
+
* @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
|
|
5025
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
|
|
5026
|
+
*/
|
|
5027
|
+
this.groups = [
|
|
5028
|
+
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
5029
|
+
];
|
|
5030
|
+
/**
|
|
5031
|
+
* Array of actions that are mapped via the map variable to the various groups defined in group.
|
|
5032
|
+
* @default undefined
|
|
5033
|
+
* @example [{
|
|
5034
|
+
variation: "default",
|
|
5035
|
+
icon: "action-edit-2",
|
|
5036
|
+
id: "edit",
|
|
5037
|
+
map: ["success"],
|
|
5038
|
+
label: {
|
|
5039
|
+
fi: " Label",
|
|
5040
|
+
en: " Label",
|
|
5041
|
+
sv: " Label",
|
|
5042
|
+
}
|
|
5043
|
+
}]
|
|
5044
|
+
*/
|
|
5045
|
+
this.actions = undefined;
|
|
5046
|
+
/**
|
|
5047
|
+
* Shows or hides the table labels.
|
|
5048
|
+
*/
|
|
5049
|
+
this.hideGroups = false;
|
|
5050
|
+
/**
|
|
5051
|
+
* Exposes the aria role for optimizing accessibility.
|
|
5052
|
+
*/
|
|
5053
|
+
this.accessibleRole = undefined;
|
|
5054
|
+
/**
|
|
5055
|
+
* Theme of the table.
|
|
5056
|
+
*/
|
|
5057
|
+
this.theme = "";
|
|
5058
|
+
/**
|
|
5059
|
+
* Private methods.
|
|
5060
|
+
*/
|
|
5061
|
+
this.kick = debounce(() => {
|
|
5062
|
+
this.tick = Date.now();
|
|
5063
|
+
}, 100); // will trigger re-render
|
|
5064
|
+
/**
|
|
5065
|
+
* If a user defines a template section within editable table, try to read an use it.
|
|
5066
|
+
*/
|
|
5067
|
+
this.getTemplate = () => {
|
|
5068
|
+
const templateDom = this.element.getElementsByTagName("template");
|
|
5069
|
+
if (templateDom === null || templateDom === void 0 ? void 0 : templateDom.length) {
|
|
5070
|
+
const templateString = templateDom[0].content.firstElementChild.outerHTML;
|
|
5071
|
+
return generateTemplateFn(templateString);
|
|
5072
|
+
}
|
|
5073
|
+
else {
|
|
5074
|
+
return false;
|
|
5075
|
+
}
|
|
5076
|
+
};
|
|
5077
|
+
this.getItemData = (data) => {
|
|
5078
|
+
const { item, group, uid } = data;
|
|
5079
|
+
if (this.template) {
|
|
5080
|
+
return {
|
|
5081
|
+
group,
|
|
5082
|
+
uid,
|
|
5083
|
+
item: this.template(item),
|
|
5084
|
+
};
|
|
5085
|
+
}
|
|
5086
|
+
return { item, group, uid };
|
|
5087
|
+
};
|
|
5088
|
+
this.filterMap = needle => {
|
|
5089
|
+
if (needle === "all") {
|
|
5090
|
+
return Array.from(this.items);
|
|
5091
|
+
}
|
|
5092
|
+
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
5093
|
+
};
|
|
5094
|
+
}
|
|
5095
|
+
/**
|
|
5096
|
+
* Component lifecycle events.
|
|
5097
|
+
*/
|
|
5098
|
+
componentWillLoad() {
|
|
5099
|
+
// look for a <template> region in the duet-editable-table
|
|
5100
|
+
this.template = this.getTemplate();
|
|
5101
|
+
// take care of the case where groups and actions are defined as html properties instead of javascript objects
|
|
5102
|
+
if (typeof this.groups === "string") {
|
|
5103
|
+
this.internalGroupArray = sanitizeString(this.groups);
|
|
5104
|
+
}
|
|
5105
|
+
else {
|
|
5106
|
+
this.internalGroupArray = this.groups;
|
|
5107
|
+
}
|
|
5108
|
+
if (typeof this.actions === "string") {
|
|
5109
|
+
this.internalActionsArray = sanitizeString(this.actions);
|
|
5110
|
+
}
|
|
5111
|
+
else {
|
|
5112
|
+
this.internalActionsArray = this.actions;
|
|
5113
|
+
}
|
|
5114
|
+
inheritGlobalTheme(this);
|
|
5115
|
+
}
|
|
5116
|
+
/**
|
|
5117
|
+
* Method to force an update of a tabular data array.
|
|
5118
|
+
* when called the method will rerender the entire tabular structure.
|
|
5119
|
+
*/
|
|
5120
|
+
async updateTable(passedItems = undefined) {
|
|
5121
|
+
this.items = new Map(passedItems || this.items);
|
|
5122
|
+
this.kick();
|
|
5123
|
+
}
|
|
5124
|
+
render() {
|
|
5125
|
+
return (h$1(Host, { class: {
|
|
5126
|
+
"duet-theme-turva": this.theme === "turva",
|
|
5127
|
+
} }, this.internalGroupArray.map(group => {
|
|
5128
|
+
const currentGroup = this.filterMap(group.id);
|
|
5129
|
+
if (!currentGroup.length) {
|
|
5130
|
+
return;
|
|
5131
|
+
}
|
|
5132
|
+
return (h$1("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, h$1("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, h$1("thead", { class: "duet-editable-table-header" }, h$1("tr", null, h$1("th", { class: {
|
|
5133
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
5134
|
+
} }, !this.hideGroups ? (getLocaleString(group.label)) : (h$1("duet-visually-hidden", null, getLocaleString(group.label)))), h$1("th", { class: {
|
|
5135
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
5136
|
+
} }, h$1("duet-visually-hidden", null, group.actionLabel
|
|
5137
|
+
? getLocaleString(group.actionLabel)
|
|
5138
|
+
: getLocaleString(this.actionLabelDefaults))))), h$1("tbody", null, currentGroup.map(dataAsArray => {
|
|
5139
|
+
const [key, value] = dataAsArray;
|
|
5140
|
+
return (h$1("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 }));
|
|
5141
|
+
})))));
|
|
5142
|
+
})));
|
|
5143
|
+
}
|
|
5144
|
+
get element() { return this; }
|
|
5145
|
+
static get style() { return duetEditableTableCss; }
|
|
5146
|
+
};
|
|
5147
|
+
|
|
5148
|
+
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}";
|
|
5149
|
+
|
|
5150
|
+
let DuetEditableTableButton$1 = class extends H {
|
|
5151
|
+
constructor() {
|
|
5152
|
+
super();
|
|
5153
|
+
this.__registerHost();
|
|
5154
|
+
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
5155
|
+
this.isHovering = false;
|
|
5156
|
+
/**
|
|
5157
|
+
* Theme of the empty state component.
|
|
5158
|
+
*/
|
|
5159
|
+
this.theme = undefined;
|
|
5160
|
+
/**
|
|
5161
|
+
* action items passed from host component
|
|
5162
|
+
* @internal
|
|
5163
|
+
*/
|
|
5164
|
+
this.actions = undefined;
|
|
5165
|
+
/**
|
|
5166
|
+
* uid that gets passed along when the action is emitted
|
|
5167
|
+
* @internal
|
|
5168
|
+
*/
|
|
5169
|
+
this.uid = "";
|
|
5170
|
+
/**
|
|
5171
|
+
* group associated with action
|
|
5172
|
+
* @internal
|
|
5173
|
+
*/
|
|
5174
|
+
this.group = "";
|
|
5175
|
+
/**
|
|
5176
|
+
* key of the item in the map
|
|
5177
|
+
* @internal
|
|
5178
|
+
*/
|
|
5179
|
+
this.keyName = "";
|
|
5180
|
+
this.onMouseEnter = () => {
|
|
5181
|
+
this.isHovering = true;
|
|
5182
|
+
};
|
|
5183
|
+
this.onMouseLeave = () => {
|
|
5184
|
+
this.isHovering = false;
|
|
5185
|
+
};
|
|
5186
|
+
this.getColours = (byName = false) => {
|
|
5187
|
+
let colorHover = this.actions.color_hover;
|
|
5188
|
+
let colorBlur = this.actions.color;
|
|
5189
|
+
if (byName) {
|
|
5190
|
+
colorHover = getColorByName(this.actions.color_hover, this.theme);
|
|
5191
|
+
colorBlur = getColorByName(this.actions.color, this.theme);
|
|
5192
|
+
}
|
|
5193
|
+
return this.isHovering ? colorHover : colorBlur;
|
|
5194
|
+
};
|
|
5195
|
+
}
|
|
5196
|
+
/**
|
|
5197
|
+
/**
|
|
5198
|
+
* Component lifecycle events.
|
|
5199
|
+
*/
|
|
5200
|
+
componentWillLoad() {
|
|
5201
|
+
inheritGlobalTheme(this);
|
|
5202
|
+
}
|
|
5203
|
+
/**
|
|
5204
|
+
/**
|
|
5205
|
+
* private functions
|
|
5206
|
+
*/
|
|
5207
|
+
emitActionEvent(ev) {
|
|
5208
|
+
this.duetEditableItemAction.emit({
|
|
5209
|
+
originalEvent: ev,
|
|
5210
|
+
uid: this.uid,
|
|
5211
|
+
group: this.group,
|
|
5212
|
+
action: this.actions.id,
|
|
5213
|
+
keyName: this.keyName,
|
|
5214
|
+
component: "duet-editable-table-item",
|
|
5215
|
+
});
|
|
5216
|
+
}
|
|
5217
|
+
/**
|
|
5218
|
+
* render() function
|
|
5219
|
+
* Always the last one in the class.
|
|
5220
|
+
*/
|
|
5221
|
+
render() {
|
|
5222
|
+
return (h$1("button", { style: {
|
|
5223
|
+
"border-color": this.getColours(true),
|
|
5224
|
+
}, 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) }, h$1("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.getColours(), margin: "none" })));
|
|
5225
|
+
}
|
|
5226
|
+
get el() { return this; }
|
|
5227
|
+
static get style() { return duetEditableTableButtonCss; }
|
|
5228
|
+
};
|
|
5229
|
+
|
|
5230
|
+
//simple functional component that renders the data in the table
|
|
5231
|
+
const TableData = ({ data, groupId, alignment }, _children) => {
|
|
5232
|
+
if (typeof data === "string") {
|
|
5233
|
+
return (h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }));
|
|
5234
|
+
}
|
|
5235
|
+
else {
|
|
5236
|
+
return (h("td", { class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
|
|
5237
|
+
}
|
|
5238
|
+
};
|
|
5239
|
+
|
|
5240
|
+
const duetEditableTableItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";
|
|
5241
|
+
|
|
5242
|
+
let DuetEditableTableItem$1 = class extends H {
|
|
5243
|
+
constructor() {
|
|
5244
|
+
super();
|
|
5245
|
+
this.__registerHost();
|
|
5246
|
+
this.__attachShadow();
|
|
5247
|
+
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
5248
|
+
this.isHovering = false;
|
|
5249
|
+
/**
|
|
5250
|
+
* Theme of the empty state component.
|
|
5251
|
+
*/
|
|
5252
|
+
this.theme = "";
|
|
5253
|
+
/**
|
|
5254
|
+
* Actions that can be performed on the element
|
|
5255
|
+
*/
|
|
5256
|
+
this.actions = undefined;
|
|
5257
|
+
/**
|
|
5258
|
+
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
5259
|
+
* @internal
|
|
5260
|
+
*/
|
|
5261
|
+
this.groupId = "";
|
|
5262
|
+
/**
|
|
5263
|
+
* Key used to set vertical alignment of action buttons
|
|
5264
|
+
*/
|
|
5265
|
+
this.alignment = "middle";
|
|
5266
|
+
/**
|
|
5267
|
+
* Key used to identify item, when running actions
|
|
5268
|
+
*/
|
|
5269
|
+
this.keyName = "";
|
|
5270
|
+
/**
|
|
5271
|
+
* Object of data itemsused to render the entire row
|
|
5272
|
+
*/
|
|
5273
|
+
this.data = undefined;
|
|
5274
|
+
}
|
|
5275
|
+
watchPropHandler(_newValue, _oldValue) {
|
|
5276
|
+
// console.log("The new value of activated is: ", _newValue)
|
|
5277
|
+
}
|
|
5278
|
+
/**
|
|
5279
|
+
/**
|
|
5280
|
+
* Component lifecycle events.
|
|
5281
|
+
*/
|
|
5282
|
+
componentWillLoad() {
|
|
5283
|
+
inheritGlobalTheme(this);
|
|
5284
|
+
}
|
|
5285
|
+
/**
|
|
5286
|
+
/**
|
|
5287
|
+
* private functions
|
|
5288
|
+
*/
|
|
5289
|
+
/**
|
|
5290
|
+
* render() function
|
|
5291
|
+
* Always the last one in the class.
|
|
5292
|
+
*/
|
|
5293
|
+
render() {
|
|
5294
|
+
return (h$1(Host, { role: "row" }, h$1(TableData, { data: this.data.item, alignment: this.alignment, groupId: this.groupId }), h$1("td", { class: "duet-editable-table-actions", style: { verticalAlign: this.alignment } }, h$1("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
5295
|
+
const { map = undefined } = result;
|
|
5296
|
+
// if map has been specified, only show the current action if groupID matches the map array
|
|
5297
|
+
if (map && !map.includes(this.groupId)) {
|
|
5298
|
+
return;
|
|
5299
|
+
}
|
|
5300
|
+
return (h$1("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
5301
|
+
})))));
|
|
5302
|
+
}
|
|
5303
|
+
get el() { return this; }
|
|
5304
|
+
static get watchers() { return {
|
|
5305
|
+
"data": ["watchPropHandler"]
|
|
5306
|
+
}; }
|
|
5307
|
+
static get style() { return duetEditableTableItemCss; }
|
|
5308
|
+
};
|
|
5309
|
+
|
|
4842
5310
|
const duetEmptyStateCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";
|
|
4843
5311
|
|
|
4844
|
-
let DuetEmptyState$1 = class extends
|
|
5312
|
+
let DuetEmptyState$1 = class extends H {
|
|
4845
5313
|
constructor() {
|
|
4846
5314
|
super();
|
|
4847
5315
|
this.__registerHost();
|
|
@@ -4881,7 +5349,7 @@ let DuetEmptyState$1 = class extends HTMLElement {
|
|
|
4881
5349
|
|
|
4882
5350
|
const duetFieldsetCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{border:0}legend{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-legend-wrapper{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-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{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-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{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:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
4883
5351
|
|
|
4884
|
-
let DuetFieldset$1 = class extends
|
|
5352
|
+
let DuetFieldset$1 = class extends H {
|
|
4885
5353
|
constructor() {
|
|
4886
5354
|
super();
|
|
4887
5355
|
this.__registerHost();
|
|
@@ -4937,7 +5405,7 @@ var actionNewWindow={"title":"action-new-window","tags":"arrow open new window t
|
|
|
4937
5405
|
|
|
4938
5406
|
var actionNewWindowSmall={"title":"action-new-window-small","tags":"arrow open new window tab external linksquare box rectangle action small","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M10.5 2a1.5 1.5 0 0 1 .14 3H3.75c-.38 0-.7.28-.74.65l-.01.1v14.5c0 .38.28.7.65.74l.1.01h14.5c.38 0 .7-.28.74-.65l.01-.1v-6.89a1.5 1.5 0 0 1 3 0v6.89A3.75 3.75 0 0 1 18.25 24H3.75A3.75 3.75 0 0 1 0 20.25V5.75A3.75 3.75 0 0 1 3.75 2zm12-2c.78 0 1.42.6 1.5 1.36V7.5a1.5 1.5 0 0 1-3 .14V5.12l-5.44 5.44a1.5 1.5 0 0 1-2.22-2l.1-.12L18.88 3H16.5A1.5 1.5 0 0 1 15 1.64V1.5c0-.78.6-1.42 1.36-1.5h.14z\"/></svg>"};
|
|
4939
5407
|
|
|
4940
|
-
const duetFooterCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}.duet-footer{display:block;width:100%;padding-top:20px;padding-bottom:16px;margin-top:48px;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:white;text-align:left;background:#00294d}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 36em){.duet-footer{padding-top:36px}}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.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\";background:#c60c30}.duet-footer a{color:white;text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center;justify-content:space-between}}duet-logo{margin-left:16px !important}@media (min-width: 36em){duet-logo{margin-left:28px !important}}@media (min-width: 62em){duet-logo{margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-icon{display:flex;align-items:center;justify-content:center;padding:12px;margin-right:16px;background:#0077b3;border-radius:50%;transition:300ms ease}.duet-theme-turva .duet-footer-icon{background:transparent;box-shadow:0 0 0 1px white}a:hover .duet-footer-icon{background:#006ba1}.duet-theme-turva a:hover .duet-footer-icon{background:transparent}.duet-footer-arrow{display:flex;align-items:center;justify-content:center;width:20px;min-width:20px;max-width:20px;height:20px;max-height:20px;margin-left:auto;color:white;transition:transform 300ms ease}@media (min-width: 62em){.duet-footer-arrow{width:10px;min-width:10px;margin-top:3px;margin-left:8px}}@media (min-width: 62em){.duet-footer-arrow{margin-right:0}}a:hover .duet-footer-arrow{transform:translateX(4px)}.duet-footer-arrow duet-icon{width:20px;height:20px}@media (min-width: 62em){.duet-footer-arrow duet-icon{width:10px;height:10px}}.duet-footer-menu{padding:20px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-left:8px !important}}.duet-footer-menu a{text-decoration:none}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{color:white}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:#00294d;background:transparent !important;border-top:1px solid #e1e3e6}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:#00294d}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple.duet-theme-turva{color:#171c3a;border-color:#e4e4e6}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:#171c3a}.duet-footer-external{display:inline-block;margin-left:4px;color:#0077b3}.duet-theme-turva .duet-footer-external{color:white}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:#c60c30}";
|
|
5408
|
+
const duetFooterCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}.duet-footer{display:block;width:100%;padding-top:20px;padding-bottom:16px;margin-top:48px;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:white;text-align:left;background:#00294d}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 36em){.duet-footer{padding-top:36px}}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.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\";background:#c60c30}.duet-footer a{color:white;text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center;justify-content:space-between}}duet-logo{margin-left:16px !important}@media (min-width: 36em){duet-logo{margin-left:28px !important}}@media (min-width: 62em){duet-logo{margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-icon{display:flex;align-items:center;justify-content:center;padding:12px;margin-right:16px;background:#0077b3;border-radius:50%;transition:300ms ease}.duet-theme-turva .duet-footer-icon{background:transparent;box-shadow:0 0 0 1px white}a:hover .duet-footer-icon{background:#006ba1}.duet-theme-turva a:hover .duet-footer-icon{background:transparent}.duet-footer-arrow{display:flex;align-items:center;justify-content:center;width:20px;min-width:20px;max-width:20px;height:20px;max-height:20px;margin-left:auto;color:white;transition:transform 300ms ease}@media (min-width: 62em){.duet-footer-arrow{width:10px;min-width:10px;margin-top:3px;margin-left:8px}}@media (min-width: 62em){.duet-footer-arrow{margin-right:0}}a:hover .duet-footer-arrow{transform:translateX(4px)}.duet-footer-arrow duet-icon{width:20px;height:20px}@media (min-width: 62em){.duet-footer-arrow duet-icon{width:10px;height:10px}}.duet-footer-menu{padding:20px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-left:8px !important}}.duet-footer-menu a{text-decoration:none;white-space:nowrap}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{color:white}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:#00294d;background:transparent !important;border-top:1px solid #e1e3e6}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:#00294d}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple.duet-theme-turva{color:#171c3a;border-color:#e4e4e6}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:#171c3a}.duet-footer-external{display:inline-block;margin-left:4px;color:#0077b3}.duet-theme-turva .duet-footer-external{color:white}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:#c60c30}";
|
|
4941
5409
|
|
|
4942
5410
|
const i18n$1 = {
|
|
4943
5411
|
fi: { lahi: "© LähiTapiola", turva: "© Turva" },
|
|
@@ -4949,7 +5417,7 @@ const createEvent$1 = (ev, data) => ({
|
|
|
4949
5417
|
data,
|
|
4950
5418
|
originalEvent: ev,
|
|
4951
5419
|
});
|
|
4952
|
-
let DuetFooter$1 = class extends
|
|
5420
|
+
let DuetFooter$1 = class extends H {
|
|
4953
5421
|
constructor() {
|
|
4954
5422
|
super();
|
|
4955
5423
|
this.__registerHost();
|
|
@@ -5070,10 +5538,16 @@ const duetGridCss = ".sc-duet-grid-h{box-sizing:border-box;padding:0;margin:0;ba
|
|
|
5070
5538
|
function isGridItem(element) {
|
|
5071
5539
|
return element.tagName.toLowerCase() === "duet-grid-item";
|
|
5072
5540
|
}
|
|
5073
|
-
let DuetGrid$1 = class extends
|
|
5541
|
+
let DuetGrid$1 = class extends H {
|
|
5074
5542
|
constructor() {
|
|
5075
5543
|
super();
|
|
5076
5544
|
this.__registerHost();
|
|
5545
|
+
this.mql = [
|
|
5546
|
+
window.matchMedia(media_query_large.replace(/'/g, "")),
|
|
5547
|
+
window.matchMedia(media_query_medium.replace(/'/g, "")),
|
|
5548
|
+
window.matchMedia(media_query_small.replace(/'/g, "")),
|
|
5549
|
+
];
|
|
5550
|
+
this.distributeFormElement = false;
|
|
5077
5551
|
/**
|
|
5078
5552
|
* Enable or disable the automatic responsive behaviour of the grid component.
|
|
5079
5553
|
* Setting this option to "true" makes sure that contents are stacked vertically
|
|
@@ -5090,7 +5564,9 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5090
5564
|
*/
|
|
5091
5565
|
this.direction = "horizontal";
|
|
5092
5566
|
/**
|
|
5093
|
-
* Adjusts the vertical alignment of the grid items
|
|
5567
|
+
* Adjusts the vertical alignment of the grid items, if set to "form_distribute"
|
|
5568
|
+
* the grid will try to calculate correct paddings for any duet-input fields inside duet-grid-items,
|
|
5569
|
+
* so that they align even when displaying errors.
|
|
5094
5570
|
*/
|
|
5095
5571
|
this.alignment = "top";
|
|
5096
5572
|
/**
|
|
@@ -5102,21 +5578,54 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5102
5578
|
*/
|
|
5103
5579
|
this.mobile = "";
|
|
5104
5580
|
}
|
|
5581
|
+
/**
|
|
5582
|
+
* Private functions
|
|
5583
|
+
*/
|
|
5584
|
+
/**
|
|
5585
|
+
* Returns the element height including margins
|
|
5586
|
+
* @param element - element
|
|
5587
|
+
* @returns {number}
|
|
5588
|
+
*/
|
|
5589
|
+
outerHeight(element) {
|
|
5590
|
+
const height = element.offsetHeight, style = window.getComputedStyle(element);
|
|
5591
|
+
return ["top", "bottom"]
|
|
5592
|
+
.map(side => parseInt(style[`margin-${side}`]))
|
|
5593
|
+
.reduce((total, side) => total + side, height);
|
|
5594
|
+
}
|
|
5105
5595
|
/**
|
|
5106
5596
|
* Component lifecycle events.
|
|
5107
5597
|
*/
|
|
5108
5598
|
async connectedCallback() {
|
|
5109
5599
|
const el = this.element;
|
|
5600
|
+
this.distributeFormElement = this.alignment === "form_distribute";
|
|
5110
5601
|
this.mutationO = watchForOptions(el, "duet-grid-item", () => {
|
|
5111
5602
|
this.updateGridItems();
|
|
5112
5603
|
});
|
|
5113
|
-
|
|
5114
|
-
|
|
5604
|
+
// the next two functions are used to watch for changes in the grid items, and are process intensive - so only run when needed
|
|
5605
|
+
if (this.distributeFormElement) {
|
|
5606
|
+
this.mutation1 = watchForElement(el, "duet-input", () => {
|
|
5607
|
+
this.updateGridItemsWithInputFields();
|
|
5608
|
+
});
|
|
5609
|
+
// listen for potential mediaquery changes and reset layout
|
|
5610
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
5611
|
+
this.mql[i].addEventListener("change", this.updateGridItemsWithInputFields.bind(this));
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5614
|
+
this.updateGridItems();
|
|
5615
|
+
}
|
|
5115
5616
|
disconnectedCallback() {
|
|
5116
5617
|
if (this.mutationO) {
|
|
5117
5618
|
this.mutationO.disconnect();
|
|
5118
5619
|
this.mutationO = undefined;
|
|
5119
5620
|
}
|
|
5621
|
+
if (this.mutation1) {
|
|
5622
|
+
this.mutation1.disconnect();
|
|
5623
|
+
this.mutation1 = undefined;
|
|
5624
|
+
}
|
|
5625
|
+
// listen for potential mediaquery changes and reset layout
|
|
5626
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
5627
|
+
this.mql[i].removeEventListener("change", this.updateGridItemsWithInputFields.bind(this));
|
|
5628
|
+
}
|
|
5120
5629
|
}
|
|
5121
5630
|
/**
|
|
5122
5631
|
* Local methods
|
|
@@ -5128,6 +5637,29 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5128
5637
|
item.breakpoint = this.breakpoint;
|
|
5129
5638
|
});
|
|
5130
5639
|
}
|
|
5640
|
+
async updateGridItemsWithInputFields() {
|
|
5641
|
+
const items = Array.from(this.element.children).filter(isGridItem);
|
|
5642
|
+
// if layout changes to columns instead of row, remove all padding
|
|
5643
|
+
const hasColumnLayout = window ? window.getComputedStyle(this.element).flexDirection === "column" : false;
|
|
5644
|
+
let maxHeight = 0;
|
|
5645
|
+
const sizes = [];
|
|
5646
|
+
items.forEach(item => {
|
|
5647
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
5648
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
5649
|
+
sizes.push(height);
|
|
5650
|
+
});
|
|
5651
|
+
maxHeight = Math.max(...sizes);
|
|
5652
|
+
items.forEach(item => {
|
|
5653
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
5654
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
5655
|
+
if (height < maxHeight && !hasColumnLayout) {
|
|
5656
|
+
item.setAttribute("style", `padding-bottom: ${maxHeight - height}px;`);
|
|
5657
|
+
}
|
|
5658
|
+
else if (height === maxHeight || hasColumnLayout) {
|
|
5659
|
+
item.setAttribute("style", `padding-bottom: 0px;`);
|
|
5660
|
+
}
|
|
5661
|
+
});
|
|
5662
|
+
}
|
|
5131
5663
|
/**
|
|
5132
5664
|
* render() function
|
|
5133
5665
|
* Always the last one in the class.
|
|
@@ -5137,7 +5669,7 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5137
5669
|
"duet-grid": true,
|
|
5138
5670
|
"duet-no-stacking": !this.responsive,
|
|
5139
5671
|
"duet-grid-align-top": this.alignment === "top",
|
|
5140
|
-
"duet-grid-align-bottom": this.alignment === "bottom",
|
|
5672
|
+
"duet-grid-align-bottom": this.alignment === "bottom" || this.alignment === "form_distribute",
|
|
5141
5673
|
"duet-grid-align-center": this.alignment === "center",
|
|
5142
5674
|
"duet-grid-align-stretch": this.alignment === "stretch",
|
|
5143
5675
|
"duet-grid-align-baseline": this.alignment === "baseline",
|
|
@@ -5167,7 +5699,7 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5167
5699
|
|
|
5168
5700
|
const duetGridItemCss = ".sc-duet-grid-item-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left: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:1rem;font-style:normal;font-weight:400;line-height:1.5;color:#00294d}.sc-duet-grid-item-h:first-child,.sc-duet-grid-item-h:first-of-type{padding-left:0}.sc-duet-grid-item-h:last-child,.sc-duet-grid-item-h:last-of-type{padding-right:0}@media (max-width: 35.9375em){.duet-grid-item-responsive.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){.duet-grid-item-br-medium.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){.duet-grid-item-responsive.duet-grid-item-br-medium.sc-duet-grid-item-h{padding-right:0;padding-left:0}}@media screen and (max-width: 64em){.duet-grid-item-br-x-large.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){.duet-grid-item-responsive.duet-grid-item-br-x-large.sc-duet-grid-item-h{padding-right:0;padding-left:0}}.duet-grid-item-fill.sc-duet-grid-item-h{flex:1 1 auto;width:100%}.duet-theme-turva.sc-duet-grid-item-h{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-m-0.sc-duet-grid-item-h{padding:0 !important;margin:0 !important}";
|
|
5169
5701
|
|
|
5170
|
-
let DuetGridItem$1 = class extends
|
|
5702
|
+
let DuetGridItem$1 = class extends H {
|
|
5171
5703
|
constructor() {
|
|
5172
5704
|
super();
|
|
5173
5705
|
this.__registerHost();
|
|
@@ -5223,6 +5755,8 @@ let DuetGridItem$1 = class extends HTMLElement {
|
|
|
5223
5755
|
static get style() { return duetGridItemCss; }
|
|
5224
5756
|
};
|
|
5225
5757
|
|
|
5758
|
+
var formSearch={"title":"form-search","tags":"form search magnifying glass","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M23.245 23.996a.743.743 0 0 1-.53-.22L16.2 17.26a9.824 9.824 0 0 1-2.553 1.579 9.766 9.766 0 0 1-7.51.069 9.745 9.745 0 0 1-5.359-5.262c-1.025-2.412-1.05-5.08-.069-7.51S3.558 1.802 5.97.777a9.744 9.744 0 0 1 7.51-.069c2.431.981 4.334 2.849 5.359 5.262s1.05 5.08.069 7.51a9.807 9.807 0 0 1-1.649 2.718l6.517 6.518a.75.75 0 0 1-.531 1.28zM9.807 1.49a8.259 8.259 0 0 0-3.25.667c-2.044.869-3.627 2.481-4.458 4.54s-.81 4.318.058 6.362a8.26 8.26 0 0 0 4.54 4.458 8.259 8.259 0 0 0 6.362-.059 8.285 8.285 0 0 0 2.594-1.736.365.365 0 0 1 .077-.076 8.245 8.245 0 0 0 1.786-2.728 8.255 8.255 0 0 0-.059-6.362 8.257 8.257 0 0 0-4.54-4.458 8.28 8.28 0 0 0-3.11-.608z\"/></svg>"};
|
|
5759
|
+
|
|
5226
5760
|
var navigationContactDropdown={"title":"navigation-contact-dropdown","tags":"navigation contact dropdown speech bubbles","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M20.247 24a.743.743 0 0 1-.53-.22l-4.28-4.28h-.439c-3.308 0-6-2.692-6-6s2.692-6 6-6h3c3.309.001 6 2.692 6 6a5.974 5.974 0 0 1-3 5.179v4.571a.75.75 0 0 1-.751.75zm-5.25-15c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5h.75c.198 0 .391.08.53.22l3.22 3.22v-3.213c0-.289.169-.555.429-.678a4.51 4.51 0 0 0 2.571-4.049 4.504 4.504 0 0 0-4.498-4.499h-3.002z\"/><path d=\"M3.747 16.5a.747.747 0 0 1-.75-.75v-4.57a5.967 5.967 0 0 1-2.65-3.171A5.948 5.948 0 0 1 .57 3.431 6.014 6.014 0 0 1 5.985 0h3.012a6.04 6.04 0 0 1 5.752 4.286.751.751 0 0 1-.718.964.755.755 0 0 1-.719-.536A4.531 4.531 0 0 0 8.997 1.5h-3a4.511 4.511 0 0 0-4.071 2.572c-.512 1.084-.571 2.302-.167 3.431s1.224 2.032 2.308 2.545c.261.123.43.39.43.678v3.214l1.72-1.72a.744.744 0 0 1 1.06 0 .752.752 0 0 1 0 1.061l-3 3a.744.744 0 0 1-.53.219z\"/></svg>"};
|
|
5227
5761
|
|
|
5228
5762
|
var navigationLanguage={"title":"navigation-language","tags":"navigation language earth world map","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M11.996 24c-2.732 0-5.309-.901-7.453-2.605l-.017-.012-.031-.025a12.68 12.68 0 0 1-.238-.196c-.071-.06-.142-.122-.213-.184l-.143-.126c-.13-.118-.257-.24-.381-.363l-.018-.018a11.904 11.904 0 0 1-3.445-9.695l.001-.007c.018-.174.041-.348.067-.523l.019-.125c.028-.174.058-.348.093-.521l.003-.013C1.379 4.031 6.321 0 11.996 0c6.617 0 12 5.383 12 12 0 1.083-.148 2.164-.44 3.214l-.009.032a12.172 12.172 0 0 1-.671 1.809s-.072.155-.1.212a11.896 11.896 0 0 1-.189.368A11.987 11.987 0 0 1 11.996 24zm-6.181-3.519a10.388 10.388 0 0 0 6.181 2.019c3.471 0 6.642-1.669 8.611-4.497h-.59a2.244 2.244 0 0 1-2.22-1.879L17.111 12h-.944a2.252 2.252 0 0 1-2.182-2.796l.75-3A2.245 2.245 0 0 1 16.917 4.5h2.416A10.49 10.49 0 0 0 1.934 9h4.391c1.034 0 1.932.701 2.183 1.704l.75 3a2.235 2.235 0 0 1-.592 2.137c-.425.425-.99.659-1.591.659h-.464zm-4.248-9.687-.015.116a9.092 9.092 0 0 0-.053.96l-.002.17c.001.145.005.29.011.435l.006.127c.009.154.02.308.035.461l.005.041c.071.68.209 1.354.411 2.003l.009.028a10.457 10.457 0 0 0 2.537 4.222l.75-3.751A.75.75 0 0 1 5.996 15h1.079a.75.75 0 0 0 .728-.932l-.75-3a.751.751 0 0 0-.729-.568H1.606l-.039.294zM16.917 6a.75.75 0 0 0-.728.568l-.75 3a.752.752 0 0 0 .728.932h1.579c.368 0 .679.264.74.627l.791 4.75a.748.748 0 0 0 .74.626h1.461c.171-.358.321-.727.449-1.1l.021-.062A10.486 10.486 0 0 0 20.598 6z\"/></svg>"};
|
|
@@ -5413,20 +5947,55 @@ const enableBodyScroll = targetElement => {
|
|
|
5413
5947
|
}
|
|
5414
5948
|
};
|
|
5415
5949
|
|
|
5416
|
-
const duetHeaderCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}@supports (position: -webkit-sticky){:host{position:-webkit-sticky;top:-4rem;z-index:400}}@supports (position: sticky){:host{position:sticky;top:-4rem;z-index:400}}.duet-header-reserved-space{height:4rem}@media (min-width: 62em){.duet-header-reserved-space.duet-with-links{height:7rem}}.duet-header{-webkit-user-select:none;user-select:none;position:fixed;top:0;left:0;z-index:400;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:0.875rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left}.duet-header.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:#171c3a}@media (min-width: 62em){.duet-header.duet-theme-turva{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13)}}@media (min-width: 62em){.duet-header{position:absolute;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07)}.duet-header.duet-header-inactive{position:fixed}}.duet-header *{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.duet-header-top{position:relative;z-index:200;display:flex;flex-direction:row;align-items:center;width:100%;height:4rem;padding:0 16px;background:white;border-bottom:1px solid #e1e3e6;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07)}@media (min-width: 62em){.duet-header-top{z-index:100;padding:0 28px;box-shadow:none}.duet-header-top duet-logo{padding-right:4px}}@media (min-width: 106.25em){.duet-header-top{padding:0 48px}}.duet-theme-turva .duet-header-top{border-color:#e4e4e6;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13)}@media (min-width: 62em){.duet-theme-turva .duet-header-top{box-shadow:none}}.duet-theme-turva .duet-header-top duet-logo{left:-80px !important;margin-top:-8px !important}.duet-header-top .duet-header-region{max-width:200px;padding-left:16px;margin-top:1px;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-left:1px solid #cfd2d4}.duet-theme-turva .duet-header-top .duet-header-region{border-color:#cfcfd1}@media (max-width: 35.9375em){.duet-header-top .duet-header-region{display:none}}@media (min-width: 62em){.duet-header-top .duet-header-region{padding-left:19px}}.duet-header-bottom{position:fixed;top:4rem;bottom:0;left:0;z-index:100;display:flex;flex-direction:column;width:100%;overflow-y:auto;visibility:hidden;background:#f5f8fa;opacity:0;-webkit-overflow-scrolling:touch}.duet-theme-turva .duet-header-bottom{background:#f5f5f7}@media (min-width: 62em){.duet-header-bottom{position:relative;top:auto;bottom:auto;z-index:200;flex-direction:row;overflow:visible;visibility:visible;background:white;opacity:1}.duet-header-bottom.duet-header-inactive{position:relative}}.duet-header-bottom.active{visibility:visible;opacity:1;transition:opacity 300ms ease, visibility 300ms ease}@media (min-width: 62em){.duet-header-bottom{position:relative;transition:none !important}}.duet-header-items,.duet-header-bottom-utils,.duet-header-utils{opacity:0;transition:transform 600ms ease, opacity 600ms ease;transform:translateY(-28px)}@media (min-width: 62em){.duet-header-items,.duet-header-bottom-utils,.duet-header-utils{opacity:1;transition:none !important;transform:none}}.active .duet-header-items,.active .duet-header-bottom-utils,.active .duet-header-utils{opacity:1;transform:translateY(0)}.duet-header-items{position:relative;z-index:300;display:block;width:100%;font-size:1rem;font-weight:400;line-height:1.5;background:white}@media (min-width: 62em){.duet-header-items{z-index:100;display:flex;flex-direction:row;padding:0 21.5384615385px}}@media (min-width: 106.25em){.duet-header-items{padding-left:43.6363636364px}}.duet-header-items a{position:relative;display:block;width:100%;height:48px;padding:0 20px;overflow:hidden;font-size:1rem;font-weight:600;line-height:48px;color:#00294d;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #e1e3e6;border-radius:0}@media (min-width: 62em){.duet-header-items a{border-radius:4px}}.duet-theme-turva .duet-header-items a{font-weight:600;color:#171c3a;border-color:#e1e3e6}.duet-header-items a:hover{color:#004d80}.duet-theme-turva .duet-header-items a:hover{color:#444445}.duet-header-items a:focus{outline:0}:host(.user-is-tabbing) .duet-header-items a:focus{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-header-items a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 62em){.duet-header-items a{width:auto;max-width:300px;padding:0 12px;overflow:hidden;font-size:0.875rem;text-overflow:ellipsis;border:0}}.duet-header-items a.active{color:#0077b3;-moz-osx-font-smoothing:auto;-webkit-font-smoothing:subpixel-antialiased}.duet-theme-turva .duet-header-items a.active{color:#c60c30}.duet-header-items a.active:hover{color:#0077b3}.duet-theme-turva .duet-header-items a.active:hover{color:#c60c30}.duet-header-items a.active::after{position:absolute;top:0;bottom:0;left:0;width:4px;content:\"\";background:#0077b3}.duet-theme-turva .duet-header-items a.active::after{background:#c60c30}@media (min-width: 62em){.duet-header-items a.active::after{top:auto;left:12px;width:calc(100% - 24px);height:3px}}.duet-header-toggle{display:flex;align-items:center;justify-content:center;width:48px;height:48px;margin-right:-8px;margin-left:auto;cursor:pointer;border-radius:4px;-webkit-appearance:none;appearance:none}.duet-header-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-header-toggle:focus{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-header-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 62em){.duet-header-toggle{display:none}}.duet-header-hamburger{position:relative;width:24px;height:24px;margin-top:5px !important;pointer-events:none;transition:0.4s ease-in-out;backface-visibility:hidden}.duet-header-hamburger .duet-header-bar{position:absolute;left:0;display:block;width:100%;height:2px;background:#00294d;border-radius:20rem;opacity:1;transition:0.25s ease-in-out;transform:rotate(0deg) scale(0.98)}.duet-theme-turva .duet-header-hamburger .duet-header-bar{background:#171c3a}.duet-header-hamburger .duet-header-bar:nth-child(1){top:0}.duet-header-hamburger .duet-header-bar:nth-child(2),.duet-header-hamburger .duet-header-bar:nth-child(3){top:7px}.duet-header-hamburger .duet-header-bar:nth-child(4){top:14px}button.active .duet-header-hamburger .duet-header-bar:nth-child(1){top:7px;left:50%;width:0%}button.active .duet-header-hamburger .duet-header-bar:nth-child(2){transform:rotate(45deg)}button.active .duet-header-hamburger .duet-header-bar:nth-child(3){transform:rotate(-45deg)}button.active .duet-header-hamburger .duet-header-bar:nth-child(4){top:7px;left:50%;width:0%}.duet-header-utils{display:flex;flex-direction:column;width:100%}@media (min-width: 62em){.duet-header-utils{position:absolute;top:-4rem;right:0;z-index:999999999;flex-direction:row;align-items:center;justify-content:space-between;width:auto;margin-right:20px}}@media (min-width: 106.25em){.duet-header-utils{margin-right:36px}}@media (min-width: 62em){.duet-header-bottom-utils{position:absolute;top:0;right:0;z-index:999999999;margin-right:20px}}@media (min-width: 106.25em){.duet-header-bottom-utils{margin-right:36px}}button{font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-theme-turva button{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-header-button{position:relative;display:flex;align-items:center;width:100%;height:48px;padding:0 20px;overflow:hidden;font-size:1rem;font-weight:400;line-height:48px;color:#00294d;text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-bottom:1px solid #e1e3e6;border-radius:4px;-webkit-appearance:none;appearance:none}.duet-theme-turva .duet-header-button{color:#171c3a;border-color:#e4e4e6}.duet-header-button:hover{color:#004d80}.duet-theme-turva .duet-header-button:hover{color:#444445}.duet-header-button:focus{outline:0}:host(.user-is-tabbing) .duet-header-button:focus{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-header-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-header-button:active{opacity:0.75}@media (min-width: 62em){.duet-header-button{width:auto;max-width:200px;height:4rem;padding:0 16px;font-size:0.875rem;line-height:4rem;border:0}.duet-header-button::before{position:absolute;top:50%;right:0;width:1px;height:20px;content:\"\";background:#cfd2d4;transform:translateY(-50%)}.duet-theme-turva .duet-header-button::before{background:#cfcfd1}}.duet-header-button.active{color:#0077b3;border-radius:0}.duet-theme-turva .duet-header-button.active{color:#c60c30}.duet-header-button.active:hover{color:#0077b3}.duet-theme-turva .duet-header-button.active:hover{color:#c60c30}.duet-header-button.active::after{position:absolute;top:0;bottom:0;left:0;width:3px;content:\"\";background:#0077b3}.duet-theme-turva .duet-header-button.active::after{color:#c60c30}.duet-header-no-action{pointer-events:none}.duet-header-user-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 62em){.duet-header-utils>*:last-child::before,.duet-header-utils>*:last-child button::before{display:none}}@media (min-width: 62em){.duet-header-utils>*:last-child .duet-header-dropdown-content{right:0;left:auto}}.duet-header-language{text-transform:uppercase}.duet-header-icon{display:inline-flex;min-width:12px;margin-right:12px;font-size:0;line-height:normal;vertical-align:baseline}@media (min-width: 62em){.duet-header-icon{margin-right:8px}}.duet-header-caret{position:absolute;top:50%;right:20px;display:flex;width:10px;height:10px;margin-left:8px;line-height:normal;pointer-events:none;transition:300ms ease;transform:translateY(-50%);transform-origin:50% 50%}@media (min-width: 62em){.duet-header-caret{width:7px;height:7px}}.duet-header-caret duet-icon{width:10px}.duet-header-dropdown-toggle.active .duet-header-caret{transform:translateY(-50%) rotate(180deg)}.duet-header-dropdown-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-header-dropdown-toggle:focus{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-header-dropdown-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-header-dropdown-toggle:active{outline:none}.duet-header-badge{display:inline-block;width:6px;height:6px;margin-top:16px;margin-left:5px;vertical-align:top;background:#f7b228;border-radius:50%;box-shadow:0 0 0 1px #c18b1f}.duet-theme-turva .duet-header-badge{background:#faa40f}.duet-header-dropdown{position:relative}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-toggle{z-index:200;padding-right:36px;overflow:hidden;transition:border 300ms ease}}.duet-header-dropdown .duet-header-dropdown-toggle::after{display:none !important}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-toggle::after{position:absolute;top:auto;bottom:0;left:0;display:block !important;width:100%;height:3px;content:\"\";background:#0077b3;transition:300ms ease;transform:translateY(3px)}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-toggle::after{background:#c60c30}}.duet-header-dropdown .duet-header-dropdown-toggle.active,.duet-header-dropdown .duet-header-dropdown-toggle.active:hover{color:#004d80;border-bottom:1px solid #f5f8fa}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-toggle.active,.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-toggle.active:hover{color:#444445;border-color:#f5f5f7}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-toggle.active,.duet-header-dropdown .duet-header-dropdown-toggle.active:hover{border:0}.duet-header-dropdown .duet-header-dropdown-toggle.active::after,.duet-header-dropdown .duet-header-dropdown-toggle.active:hover::after{position:absolute;top:auto;bottom:0;left:0;width:100%;height:3px;transform:translateY(0)}}.duet-header-dropdown .duet-header-dropdown-content{display:none;padding-bottom:16px;background:#f5f8fa;border-bottom:1px solid #e1e3e6}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content{background:#f5f5f7;border-color:#e1e3e6}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content{position:absolute;top:100%;left:0;z-index:600;display:block;min-width:170px;padding-top:16px;padding-left:0;visibility:hidden;border:0;border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:300ms ease;transform:scale(0.85) translateZ(0) translateY(-20px)}}.duet-header-dropdown .duet-header-dropdown-content.active{display:block}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content.active{visibility:visible;opacity:1;transform:translateZ(0) translateY(0)}}.duet-header-dropdown .duet-header-dropdown-content a{padding:3px 8px 4px !important;position:relative;display:block;width:100%;padding-right:16px;padding-left:48px !important;overflow:hidden;font-size:0.875rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left;text-decoration:none;white-space:nowrap;cursor:pointer;transition:300ms ease}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a{color:#171c3a}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content a{padding-left:20px !important}}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content a:hover{background:#e6f2f8}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a:hover{background:#f9e6ea}}.duet-header-dropdown .duet-header-dropdown-content a:focus{outline:0}:host(.user-is-tabbing) .duet-header-dropdown .duet-header-dropdown-content a:focus{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-header-dropdown .duet-header-dropdown-content a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-header-dropdown .duet-header-dropdown-content a.active{padding-right:36px;font-weight:600;vertical-align:baseline;pointer-events:none}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a.active{font-weight:700}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content a.active{color:white;background:#0077b3}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a.active{background:#c60c30}}.duet-header-dropdown .duet-header-dropdown-content .duet-header-link-external{margin-left:4px}.duet-header-back .duet-header-top{flex-direction:row;align-items:center;justify-content:center}.duet-header-back duet-button{position:absolute;top:50%;left:36px;transform:translateY(-50%)}@media (max-width: 35.9375em){.duet-header-back duet-button{left:20px;max-width:40px;padding:0 12px;overflow:hidden}}.duet-header-back .duet-header-toggle{display:none !important}.duet-header-skip{padding:8px 16px 9px !important;position:absolute;top:-100%;left:-100%;z-index:200;width:1px;min-width:160px;height:1px;overflow:hidden;font-weight:600;color:#0077b3;text-align:center;text-decoration:none;background:white;border-radius:4px;opacity:0}.duet-header-skip:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-header-skip:focus,.duet-header-skip:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-theme-turva .duet-header-skip{min-width:120px;color:#171c3a}@media (min-width: 106.25em){.duet-header-skip{margin-left:20px}}.duet-header-skip:focus{top:12px;left:20px;width:auto;height:auto;outline:0;opacity:1}";
|
|
5950
|
+
const DuetHeaderIcon = (props, _children) => {
|
|
5951
|
+
const iconSize = props.iconSize ? props.iconSize : "x-small";
|
|
5952
|
+
return (h("span", { class: "duet-header-icon" },
|
|
5953
|
+
h("duet-icon", { margin: "none", size: iconSize, icon: props.icon, color: "currentColor" })));
|
|
5954
|
+
};
|
|
5955
|
+
|
|
5956
|
+
const DuetHeaderDropdown = (props, _children) => {
|
|
5957
|
+
const accessibleLabel = props.accessibleText ? props.accessibleText : props.label;
|
|
5958
|
+
return (h("div", { class: { ["duet-header-dropdown"]: true, [props.className]: !!props.className } },
|
|
5959
|
+
h("button", { ref: props.toggleRef, "aria-haspopup": "listbox", "aria-controls": props.id, "aria-expanded": props.isOpen ? "true" : "false", "aria-labelledby": `${props.id}-accessible-label`, id: `${props.id}-button`, type: "button", class: {
|
|
5960
|
+
[props.id]: true,
|
|
5961
|
+
"duet-header-dropdown-toggle": true,
|
|
5962
|
+
"duet-header-button": true,
|
|
5963
|
+
active: props.active,
|
|
5964
|
+
}, onClick: props.onToggle },
|
|
5965
|
+
props.icon && h(DuetHeaderIcon, { icon: props.icon }),
|
|
5966
|
+
h("span", { "aria-hidden": "true", id: `${props.id}-label`, class: "duet-header-dropdown-label" }, props.label),
|
|
5967
|
+
props.badge && h("div", { class: "duet-header-badge" }),
|
|
5968
|
+
h("div", { class: "duet-header-caret", "aria-hidden": "true" },
|
|
5969
|
+
h("duet-icon", { margin: "none", size: "auto", icon: actionArrowDownSmall.svg, color: "currentColor" })),
|
|
5970
|
+
h("duet-visually-hidden", { id: `${props.id}-accessible-label` }, accessibleLabel)),
|
|
5971
|
+
h("div", { ref: props.itemsRef, tabindex: "-1", role: "menu", id: props.id, "aria-labelledby": `${props.id}-button`, class: {
|
|
5972
|
+
"duet-header-dropdown-content": true,
|
|
5973
|
+
[`${props.id}-items`]: true,
|
|
5974
|
+
active: props.isOpen,
|
|
5975
|
+
} }, _children)));
|
|
5976
|
+
};
|
|
5977
|
+
|
|
5978
|
+
const DuetHeaderHamburger = () => (h("div", { class: "duet-header-hamburger" },
|
|
5979
|
+
h("span", { class: "duet-header-bar" }),
|
|
5980
|
+
h("span", { class: "duet-header-bar" }),
|
|
5981
|
+
h("span", { class: "duet-header-bar" }),
|
|
5982
|
+
h("span", { class: "duet-header-bar" })));
|
|
5983
|
+
|
|
5984
|
+
const duetHeaderCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}@supports (position: -webkit-sticky){:host{position:-webkit-sticky;top:-4rem;z-index:400}}@supports (position: sticky){:host{position:sticky;top:-4rem;z-index:400}}@supports (position: -webkit-sticky){:host(.duet-header-multi-level-desktop-variation){top:0}}@supports (position: sticky){:host(.duet-header-multi-level-desktop-variation){top:0}}.duet-header-reserved-space{height:4rem}@media (min-width: 62em){.duet-header-reserved-space.duet-with-links{height:7rem}}.duet-header{-webkit-user-select:none;user-select:none;position:fixed;top:0;left:0;z-index:400;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:0.875rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left}.duet-header.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:#171c3a}@media (min-width: 62em){.duet-header.duet-theme-turva{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13)}}@media (min-width: 62em){.duet-header{position:absolute;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07)}.duet-header.duet-header-inactive{position:fixed}}.duet-header *{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.duet-header-top{position:relative;z-index:200;display:flex;flex-direction:row;align-items:center;width:100%;height:4rem;padding:0 16px;background:white;border-bottom:1px solid #e1e3e6;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07)}@media (min-width: 62em){.duet-header-top{z-index:100;padding:0 28px;box-shadow:none}.duet-header-top duet-logo{padding-right:4px}}@media (min-width: 106.25em){.duet-header-top{padding:0 48px}}.duet-theme-turva .duet-header-top{border-color:#e4e4e6;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13)}@media (min-width: 62em){.duet-theme-turva .duet-header-top{box-shadow:none}}.duet-theme-turva .duet-header-top duet-logo{left:-80px !important;margin-top:-8px !important}.duet-header-top .duet-header-region{max-width:200px;padding-left:16px;margin-top:1px;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-left:1px solid #cfd2d4}.duet-theme-turva .duet-header-top .duet-header-region{border-color:#cfcfd1}@media (max-width: 35.9375em){.duet-header-top .duet-header-region{display:none}}@media (min-width: 62em){.duet-header-top .duet-header-region{padding-left:19px}}.duet-header-bottom{position:fixed;top:4rem;bottom:0;left:0;z-index:100;display:flex;flex-direction:column;width:100%;overflow-y:auto;visibility:hidden;background:#f3f9fc;opacity:0;-webkit-overflow-scrolling:touch}.duet-theme-turva .duet-header-bottom{background:#f5f5f7}@media (min-width: 62em){.duet-header-bottom{position:relative;top:auto;bottom:auto;z-index:200;flex-direction:row;overflow:visible;visibility:visible;background:white;opacity:1}.duet-header-bottom.duet-header-inactive{position:relative}}.duet-header-bottom.active{visibility:visible;opacity:1;transition:opacity 300ms ease, visibility 300ms ease}@media (min-width: 62em){.duet-header-bottom{position:relative;transition:none !important}}.duet-header-items,.duet-header-bottom-utils,.duet-header-utils{opacity:0;transition:transform 600ms ease, opacity 600ms ease;transform:translateY(-28px)}@media (min-width: 62em){.duet-header-items,.duet-header-bottom-utils,.duet-header-utils{opacity:1;transition:none !important;transform:none}}.active .duet-header-items,.active .duet-header-bottom-utils,.active .duet-header-utils{opacity:1;transform:translateY(0)}.duet-header-items{position:relative;z-index:300;display:block;width:100%;font-size:1rem;font-weight:400;line-height:1.5;background:white}@media (min-width: 62em){.duet-header-items{z-index:100;display:flex;flex-direction:row;padding:0 21.5384615385px}}@media (min-width: 106.25em){.duet-header-items{padding-left:43.6363636364px}}.duet-header-items .duet-header-item-container{border-bottom:1px solid #e1e3e6;border-radius:0}@media (min-width: 62em){.duet-header-items .duet-header-item-container{border:0}}.duet-header-items .duet-header-second-level .duet-header-item{padding:0 40px;border:0}.duet-header-items .duet-header-second-level .duet-header-button{border:0}.duet-header-items .duet-header-second-level .duet-header-dropdown-content{padding:0;border:0}.duet-header-items .duet-header-third-level .duet-header-item{padding:0 75px}.duet-header-items .duet-header-item{position:relative;display:flex;align-items:center;width:100%;padding:0 20px;overflow:hidden;font-size:1rem;line-height:48px;color:#00294d;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 62em){.duet-header-items .duet-header-item{border-radius:4px}}.duet-theme-turva .duet-header-items .duet-header-item{font-weight:600;color:#171c3a;border-color:#e1e3e6}.duet-header-items .duet-header-item:hover{color:#004d80}.duet-theme-turva .duet-header-items .duet-header-item:hover{color:#444445}.duet-header-items .duet-header-item:focus{outline:0}:host(.user-is-tabbing) .duet-header-items .duet-header-item:focus{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-header-items .duet-header-item:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 62em){.duet-header-items .duet-header-item{width:auto;max-width:300px;padding:0 12px;overflow:hidden;font-size:0.875rem;text-overflow:ellipsis;border:0}}.duet-header-items .duet-header-item.active{color:#0077b3;-moz-osx-font-smoothing:auto;-webkit-font-smoothing:subpixel-antialiased}.duet-theme-turva .duet-header-items .duet-header-item.active{color:#c60c30}.duet-header-items .duet-header-item.active:hover{color:#0077b3}.duet-theme-turva .duet-header-items .duet-header-item.active:hover{color:#c60c30}.duet-header-items .duet-header-item.active::after{position:absolute;top:0;bottom:0;left:0;width:4px;content:\"\";background:#0077b3}.duet-theme-turva .duet-header-items .duet-header-item.active::after{background:#c60c30}@media (min-width: 62em){.duet-header-items .duet-header-item.active::after{top:auto;left:12px;width:calc(100% - 24px);height:3px}}.duet-header-third-level-active .duet-header-items .duet-header-first-level.active{color:#00294d}.duet-header-third-level-active .duet-header-items .duet-header-first-level.active::after{display:none}.duet-header-third-level-active .duet-header-items .duet-header-second-level button{color:#00294d}.duet-header-toggle{display:flex;align-items:center;justify-content:center;width:48px;height:48px;margin-right:-8px;margin-left:auto;cursor:pointer;border-radius:4px;-webkit-appearance:none;appearance:none}.duet-header-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-header-toggle:focus{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-header-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 62em){.duet-header-toggle{display:none}}.duet-header-hamburger{position:relative;width:24px;height:24px;margin-top:5px !important;pointer-events:none;transition:0.4s ease-in-out;backface-visibility:hidden}.duet-header-hamburger .duet-header-bar{position:absolute;left:0;display:block;width:100%;height:2px;background:#00294d;border-radius:20rem;opacity:1;transition:0.25s ease-in-out;transform:rotate(0deg) scale(0.98)}.duet-theme-turva .duet-header-hamburger .duet-header-bar{background:#171c3a}.duet-header-hamburger .duet-header-bar:nth-child(1){top:0}.duet-header-hamburger .duet-header-bar:nth-child(2),.duet-header-hamburger .duet-header-bar:nth-child(3){top:7px}.duet-header-hamburger .duet-header-bar:nth-child(4){top:14px}button.active .duet-header-hamburger .duet-header-bar:nth-child(1){top:7px;left:50%;width:0%}button.active .duet-header-hamburger .duet-header-bar:nth-child(2){transform:rotate(45deg)}button.active .duet-header-hamburger .duet-header-bar:nth-child(3){transform:rotate(-45deg)}button.active .duet-header-hamburger .duet-header-bar:nth-child(4){top:7px;left:50%;width:0%}.duet-header-utils{display:flex;flex-direction:column;width:100%}@media (min-width: 62em){.duet-header-utils{position:absolute;top:-4rem;right:0;z-index:999999999;flex-direction:row;align-items:center;justify-content:space-between;width:auto;margin-right:20px}}@media (min-width: 106.25em){.duet-header-utils{margin-right:36px}}@media (min-width: 62em){.duet-header-bottom-utils{position:absolute;top:0;right:0;z-index:999999999;margin-right:20px}}@media (min-width: 106.25em){.duet-header-bottom-utils{margin-right:36px}}button{font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-theme-turva button{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-header-button{position:relative;display:flex;align-items:center;width:100%;height:48px;padding:0 20px;overflow:hidden;font-size:1rem;font-weight:400;line-height:48px;color:#00294d;text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-bottom:1px solid #e1e3e6;border-radius:4px;-webkit-appearance:none;appearance:none}.duet-theme-turva .duet-header-button{color:#171c3a;border-color:#e4e4e6}.duet-header-button:hover{color:#004d80}.duet-theme-turva .duet-header-button:hover{color:#444445}.duet-header-button:focus{outline:0}:host(.user-is-tabbing) .duet-header-button:focus{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-header-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-header-button:active{opacity:0.75}@media (min-width: 62em){.duet-header-button{width:auto;max-width:200px;height:4rem;padding:0 16px;font-size:0.875rem;line-height:4rem;border:0}.duet-header-button::before{position:absolute;top:50%;right:0;width:1px;height:20px;content:\"\";background:#cfd2d4;transform:translateY(-50%)}.duet-theme-turva .duet-header-button::before{background:#cfcfd1}}.duet-header-button.active{color:#0077b3;border-radius:0}.duet-theme-turva .duet-header-button.active{color:#c60c30}.duet-header-button.active:hover{color:#0077b3}.duet-theme-turva .duet-header-button.active:hover{color:#c60c30}.duet-header-button.active::after{position:absolute;top:0;bottom:0;left:0;width:3px;content:\"\";background:#0077b3}.duet-theme-turva .duet-header-button.active::after{color:#c60c30}.duet-header-utils .duet-header-button.duet-header-logout{align-self:center;justify-content:center;width:auto;height:2.5rem;margin:2.25rem 0;font-weight:600;border:2px solid #00294d;border-radius:20rem}.duet-theme-turva .duet-header-utils .duet-header-button.duet-header-logout{border-color:#171c3a}.duet-header-utils .duet-header-button.duet-header-logout .duet-header-icon{margin-right:0.5rem}.duet-header-utils .duet-header-button.duet-header-logout .duet-header-button-label{font-size:0.875rem}@media (min-width: 62em){.duet-header-utils .duet-header-button.duet-header-logout{height:4rem;margin:0;font-weight:400;border:0}.duet-header-utils .duet-header-button.duet-header-logout .duet-header-icon{margin-right:0.75rem}}.duet-header-no-action{pointer-events:none}.duet-header-user-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 62em){.duet-header-utils>*:last-child::before,.duet-header-utils>*:last-child button::before{display:none}}@media (min-width: 62em){.duet-header-utils>*:last-child .duet-header-dropdown-content{right:0;left:auto}}.duet-header-language{text-transform:uppercase}.duet-header-icon{display:inline-flex;min-width:12px;margin-right:12px;font-size:0;line-height:normal;vertical-align:baseline}@media (min-width: 62em){.duet-header-icon{margin-right:8px}}.duet-header-caret{position:absolute;top:50%;right:20px;display:flex;width:10px;height:10px;margin-left:8px;line-height:normal;pointer-events:none;transition:300ms ease;transform:translateY(-50%);transform-origin:50% 50%}@media (min-width: 62em){.duet-header-caret{width:7px;height:7px}}.duet-header-caret duet-icon{width:10px}.duet-header-dropdown-toggle.active .duet-header-caret{transform:translateY(-50%) rotate(180deg)}.duet-header-dropdown-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-header-dropdown-toggle:focus{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-header-dropdown-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-header-dropdown-toggle:active{outline:none}.duet-header-badge{display:inline-block;width:6px;height:6px;margin-top:-1rem;margin-left:5px;vertical-align:top;background:#f7b228;border-radius:50%;box-shadow:0 0 0 1px #c18b1f}.duet-theme-turva .duet-header-badge{background:#faa40f}.duet-header-dropdown{position:relative}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-toggle{z-index:200;padding-right:36px;overflow:hidden;transition:border 300ms ease}}.duet-header-dropdown .duet-header-dropdown-toggle::after{display:none !important}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-toggle::after{position:absolute;top:auto;bottom:0;left:0;display:block !important;width:100%;height:3px;content:\"\";background:#0077b3;transition:300ms ease;transform:translateY(3px)}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-toggle::after{background:#c60c30}}.duet-header-dropdown .duet-header-dropdown-toggle.active,.duet-header-dropdown .duet-header-dropdown-toggle.active:hover{color:#004d80;border-bottom:1px solid #f5f8fa}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-toggle.active,.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-toggle.active:hover{color:#444445;border-color:#f5f5f7}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-toggle.active,.duet-header-dropdown .duet-header-dropdown-toggle.active:hover{border:0}.duet-header-dropdown .duet-header-dropdown-toggle.active::after,.duet-header-dropdown .duet-header-dropdown-toggle.active:hover::after{position:absolute;top:auto;bottom:0;left:0;width:100%;height:3px;transform:translateY(0)}}.duet-header-dropdown .duet-header-dropdown-content{display:none;padding-bottom:16px;background:#f3f9fc;border-bottom:1px solid #e1e3e6}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content{background:#f5f5f7;border-color:#e1e3e6}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content{position:absolute;top:100%;left:0;z-index:600;display:block;min-width:150px;padding-top:16px;padding-left:0;visibility:hidden;border:0;border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:300ms ease;transform:scale(0.85) translateZ(0) translateY(-20px)}}@media (min-width: 64.0625em){.duet-header-dropdown .duet-header-dropdown-content{min-width:170px}}.duet-header-dropdown .duet-header-dropdown-content.active{display:block}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content.active{visibility:visible;opacity:1;transform:translateZ(0) translateY(0)}}.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item){padding:3px 8px 4px !important;position:relative;display:block;width:100%;padding-right:16px;padding-left:48px !important;overflow:hidden;font-size:0.875rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left;text-decoration:none;white-space:nowrap;cursor:pointer;transition:300ms ease}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item){color:#171c3a}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item){padding-right:20px !important;padding-left:20px !important}}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):hover{background:#e6f2f8}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):hover{background:#f9e6ea}}.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):focus{outline:0}:host(.user-is-tabbing) .duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):focus{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-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item).active{padding-right:36px;font-weight:600;vertical-align:baseline;pointer-events:none}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item).active{font-weight:700}@media (min-width: 62em){.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item).active{color:white;background:#0077b3}.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item).active{background:#c60c30}}.duet-header-dropdown .duet-header-dropdown-content .duet-header-link-external{margin-left:4px}.duet-header-back .duet-header-top{flex-direction:row;align-items:center;justify-content:center}.duet-header-back duet-button{position:absolute;top:50%;left:36px;transform:translateY(-50%)}@media (max-width: 35.9375em){.duet-header-back duet-button{left:20px;max-width:40px;padding:0 12px;overflow:hidden}}.duet-header-back .duet-header-toggle{display:none !important}.duet-header-skip{padding:15px 28px 16px !important;position:absolute;top:-100%;left:-100%;z-index:200;width:1px;min-width:190px;height:1px;overflow:hidden;font-weight:600;color:#0077b3;text-align:center;text-decoration:none;background:white;border-radius:4px;opacity:0}.duet-header-skip:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-header-skip:focus,.duet-header-skip:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-theme-turva .duet-header-skip{min-width:120px;color:#171c3a}@media (min-width: 106.25em){.duet-header-skip{margin-left:20px}}.duet-header-skip:focus{top:12px;left:20px;width:auto;height:auto;outline:0;opacity:1}.duet-header-multi-level-desktop{height:6rem}.duet-header-multi-level-desktop .duet-header-top{justify-content:space-between;height:6rem}.duet-header-multi-level-desktop .duet-header-button{height:6rem}.duet-header-multi-level-desktop .logo-and-segment{display:flex;flex-basis:0;flex-direction:column;flex-grow:1;padding-top:1rem}.duet-header-multi-level-desktop .logo-and-segment .duet-header-dropdown{z-index:400;margin-left:2rem}.duet-header-multi-level-desktop .logo-and-segment .duet-header-dropdown .duet-header-dropdown-content{background:#f3f9fc}.duet-header-multi-level-desktop .logo-and-segment button{align-items:flex-start;height:2rem;font-weight:600;line-height:1rem}.duet-header-multi-level-desktop .logo-and-segment button::before{display:none}.duet-header-multi-level-desktop .logo-and-segment .duet-header-caret{top:25%}.duet-header-multi-level-desktop-nav{display:flex}.duet-header-multi-level-desktop-nav .duet-header-dropdown{position:static}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-toggle{z-index:400;padding-right:1rem;font-size:1rem;font-weight:600}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-toggle.active{color:#0077b3}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content{z-index:399;display:flex;justify-content:center;width:100%;height:4.5rem;padding:0;background:#f3f9fc;border-top:1px solid #e1e3e6;border-bottom:1px solid #e1e3e6;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07);transition:none}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:auto;min-width:6rem;height:100%;padding:0 1rem !important;font-weight:600}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a::after{position:absolute;top:auto;bottom:0;left:0;display:block !important;width:100%;height:3px;content:\"\";background:#0077b3;transition:300ms ease;transform:translateY(3px)}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a.active{font-weight:600;color:#0077b3;background:none}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a.active::after{transform:translateY(0)}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a .duet-header-icon{margin:0}.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content .duet-header-badge{position:absolute;margin-top:-2rem;margin-right:-2.25rem}.duet-header-multi-level-desktop-nav button::before{display:none}.duet-header-multi-level-desktop-nav .duet-header-caret{display:none}.duet-header-multi-level-desktop-utils{display:flex;flex-basis:0;flex-grow:1;justify-content:flex-end}.duet-header-multi-level-desktop-utils>:last-child::before{display:none}.duet-header-multi-level-desktop-utils .duet-header-dropdown{z-index:400}.duet-header-multi-level-desktop-utils .duet-header-dropdown .duet-header-dropdown-content{background:#f3f9fc}.duet-header-multi-level-desktop-utils .duet-header-button-label,.duet-header-multi-level-desktop-utils .duet-header-dropdown-label{display:none}@media (min-width: 64.0625em){.duet-header-multi-level-desktop-utils .duet-header-button-label,.duet-header-multi-level-desktop-utils .duet-header-dropdown-label{display:initial}}.duet-header-multi-level-desktop .duet-theme-turva .logo-and-segment .duet-header-dropdown .duet-header-dropdown-content{background:#fcf3f4}.duet-header-multi-level-desktop .duet-theme-turva .duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-toggle.active{color:#c60c30}.duet-header-multi-level-desktop .duet-theme-turva .duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content{background:#fcf3f4;border-color:#e4e4e6}.duet-header-multi-level-desktop .duet-theme-turva .duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a::after{background:#c60c30}.duet-header-multi-level-desktop .duet-theme-turva .duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a.active{color:#c60c30;background:none}.duet-header-multi-level-desktop .duet-theme-turva .duet-header-multi-level-desktop-utils .duet-header-dropdown .duet-header-dropdown-content{background:#fcf3f4}";
|
|
5417
5985
|
|
|
5418
5986
|
const createEvent = (ev, data) => ({
|
|
5419
5987
|
component: "duet-header",
|
|
5420
5988
|
data,
|
|
5421
5989
|
originalEvent: ev,
|
|
5422
5990
|
});
|
|
5423
|
-
let DuetHeader$1 = class extends
|
|
5991
|
+
let DuetHeader$1 = class extends H {
|
|
5424
5992
|
constructor() {
|
|
5425
5993
|
super();
|
|
5426
5994
|
this.__registerHost();
|
|
5427
5995
|
this.__attachShadow();
|
|
5428
5996
|
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
5429
5997
|
this.duetSessionClick = createEvent$2(this, "duetSessionClick", 7);
|
|
5998
|
+
this.duetSearchClick = createEvent$2(this, "duetSearchClick", 7);
|
|
5430
5999
|
this.duetUserClick = createEvent$2(this, "duetUserClick", 7);
|
|
5431
6000
|
this.duetLanguageSelect = createEvent$2(this, "duetLanguageSelect", 7);
|
|
5432
6001
|
this.duetLogoClick = createEvent$2(this, "duetLogoClick", 7);
|
|
@@ -5435,7 +6004,15 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5435
6004
|
this.duetItemClick = createEvent$2(this, "duetItemClick", 7);
|
|
5436
6005
|
this.duetSkipClick = createEvent$2(this, "duetSkipClick", 7);
|
|
5437
6006
|
this.duetAnalytics = createEvent$2(this, "duetAnalytics", 7);
|
|
6007
|
+
var _a;
|
|
6008
|
+
/**
|
|
6009
|
+
* Own Properties
|
|
6010
|
+
*/
|
|
6011
|
+
this.subMenuItemRefs = {};
|
|
6012
|
+
this.subMenuButtonRefs = {};
|
|
5438
6013
|
this.hasLanguageChanged = false;
|
|
6014
|
+
this.mql = [window.matchMedia(media_query_large.replace(/'/g, ""))];
|
|
6015
|
+
this.boundMqlFunctions = [];
|
|
5439
6016
|
/**
|
|
5440
6017
|
* State() variables
|
|
5441
6018
|
* Inlined decorator, alphabetical order.
|
|
@@ -5443,12 +6020,17 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5443
6020
|
this.isContactOpen = false;
|
|
5444
6021
|
this.isLanguageOpen = false;
|
|
5445
6022
|
this.isSlideOutOpen = false;
|
|
6023
|
+
this.isSegmentOpen = false;
|
|
6024
|
+
this.openMenu = null;
|
|
6025
|
+
this.closedActives = null;
|
|
5446
6026
|
this.processedItems = null;
|
|
5447
6027
|
this.processedLanguageItems = null;
|
|
5448
6028
|
this.processedContactItems = null;
|
|
5449
6029
|
this.processedSession = null;
|
|
6030
|
+
this.processedSearch = null;
|
|
5450
6031
|
this.processedUser = null;
|
|
5451
6032
|
this.processedBack = null;
|
|
6033
|
+
this.renderDesktopNav = (_a = this.mql[0]) === null || _a === void 0 ? void 0 : _a.matches;
|
|
5452
6034
|
/**
|
|
5453
6035
|
* Theme of the header.
|
|
5454
6036
|
*/
|
|
@@ -5554,6 +6136,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5554
6136
|
this.logoHref = "/";
|
|
5555
6137
|
/**
|
|
5556
6138
|
* The href of the current page item that is shown as “active”.
|
|
6139
|
+
* Note: not available in multilevel headers.
|
|
5557
6140
|
*/
|
|
5558
6141
|
this.currentHref = "/";
|
|
5559
6142
|
/**
|
|
@@ -5563,10 +6146,12 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5563
6146
|
this.skipToId = "";
|
|
5564
6147
|
/**
|
|
5565
6148
|
* Region that is shown next to the logo. If empty, region will be hidden.
|
|
6149
|
+
* Note: not available in desktop multilevel header.
|
|
5566
6150
|
*/
|
|
5567
6151
|
this.region = "";
|
|
5568
6152
|
/**
|
|
5569
6153
|
* Label of the contact menu. If empty, contact menu will be hidden.
|
|
6154
|
+
* Note: not available in multilevel headers.
|
|
5570
6155
|
*/
|
|
5571
6156
|
this.contact = "";
|
|
5572
6157
|
this.handleClick = (event) => {
|
|
@@ -5585,6 +6170,11 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5585
6170
|
this.handleClick(e);
|
|
5586
6171
|
this.duetSessionClick.emit(e);
|
|
5587
6172
|
};
|
|
6173
|
+
this.handleSearchClick = (ev) => {
|
|
6174
|
+
const e = createEvent(ev, this.processedSearch);
|
|
6175
|
+
this.handleClick(e);
|
|
6176
|
+
this.duetSearchClick.emit(e);
|
|
6177
|
+
};
|
|
5588
6178
|
this.handleUserClick = (ev) => {
|
|
5589
6179
|
const e = createEvent(ev, this.processedUser);
|
|
5590
6180
|
this.handleClick(e);
|
|
@@ -5607,40 +6197,55 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5607
6197
|
this.duetLogoClick.emit(e);
|
|
5608
6198
|
};
|
|
5609
6199
|
this.handleArrowKeys = ev => {
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
button.focus();
|
|
5621
|
-
}
|
|
6200
|
+
let button;
|
|
6201
|
+
if (isArrowLeftKey(ev) || isArrowUpKey(ev)) {
|
|
6202
|
+
button = ev.target.previousElementSibling;
|
|
6203
|
+
}
|
|
6204
|
+
else if (isArrowRightKey(ev) || isArrowDownKey(ev)) {
|
|
6205
|
+
button = ev.target.nextElementSibling;
|
|
6206
|
+
}
|
|
6207
|
+
if (button) {
|
|
6208
|
+
ev.preventDefault();
|
|
6209
|
+
button.focus();
|
|
5622
6210
|
}
|
|
5623
6211
|
};
|
|
5624
|
-
this.toggleMenu = (ev, type) => {
|
|
6212
|
+
this.toggleMenu = (ev, type, id, active) => {
|
|
5625
6213
|
let el;
|
|
5626
6214
|
ev.preventDefault();
|
|
5627
6215
|
ev.stopPropagation();
|
|
6216
|
+
if (active === true && !this.openMenu) {
|
|
6217
|
+
const closedActives = this.closedActives ? [...this.closedActives] : [];
|
|
6218
|
+
const index = closedActives.findIndex(i => i === id);
|
|
6219
|
+
if (index > -1) {
|
|
6220
|
+
closedActives.splice(index, 1);
|
|
6221
|
+
this.closedActives = [...closedActives];
|
|
6222
|
+
}
|
|
6223
|
+
else {
|
|
6224
|
+
this.closedActives = [...closedActives, id];
|
|
6225
|
+
}
|
|
6226
|
+
}
|
|
6227
|
+
else {
|
|
6228
|
+
this.openMenu = this.openMenu === id ? null : id;
|
|
6229
|
+
}
|
|
5628
6230
|
// For language menu
|
|
5629
6231
|
if (type === "language") {
|
|
5630
6232
|
this.isContactOpen = false;
|
|
5631
6233
|
this.isLanguageOpen = !this.isLanguageOpen;
|
|
6234
|
+
this.isSegmentOpen = false;
|
|
5632
6235
|
el = this.languageItemsEl;
|
|
5633
6236
|
}
|
|
5634
6237
|
// For contact menu
|
|
5635
6238
|
else if (type === "contact") {
|
|
5636
6239
|
this.isLanguageOpen = false;
|
|
5637
6240
|
this.isContactOpen = !this.isContactOpen;
|
|
6241
|
+
this.isSegmentOpen = false;
|
|
5638
6242
|
el = this.contactItemsEl;
|
|
5639
6243
|
}
|
|
5640
6244
|
// For mobile menu
|
|
5641
6245
|
else if (type === "mobile") {
|
|
5642
6246
|
this.isContactOpen = false;
|
|
5643
6247
|
this.isLanguageOpen = false;
|
|
6248
|
+
this.isSegmentOpen = false;
|
|
5644
6249
|
el = this.navigationEl;
|
|
5645
6250
|
this.isSlideOutOpen = !this.isSlideOutOpen;
|
|
5646
6251
|
if (this.isSlideOutOpen) {
|
|
@@ -5650,7 +6255,19 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5650
6255
|
enableBodyScroll(this.navigationEl);
|
|
5651
6256
|
}
|
|
5652
6257
|
}
|
|
5653
|
-
if (
|
|
6258
|
+
else if (type === "sub") {
|
|
6259
|
+
this.isContactOpen = false;
|
|
6260
|
+
this.isLanguageOpen = false;
|
|
6261
|
+
this.isSegmentOpen = false;
|
|
6262
|
+
el = this.subMenuItemRefs[id];
|
|
6263
|
+
}
|
|
6264
|
+
else if (type === "segment") {
|
|
6265
|
+
this.isContactOpen = false;
|
|
6266
|
+
this.isLanguageOpen = false;
|
|
6267
|
+
this.isSegmentOpen = !this.isSegmentOpen;
|
|
6268
|
+
el = this.segmentItemsEl;
|
|
6269
|
+
}
|
|
6270
|
+
if (this.isSlideOutOpen || this.isLanguageOpen || this.isContactOpen || this.isSegmentOpen || this.openMenu) {
|
|
5654
6271
|
const drawer = this.element.querySelector("duet-notification-drawer");
|
|
5655
6272
|
if (drawer) {
|
|
5656
6273
|
drawer.close(false);
|
|
@@ -5669,10 +6286,21 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5669
6286
|
inheritGlobalTheme(this);
|
|
5670
6287
|
this.refresh();
|
|
5671
6288
|
}
|
|
6289
|
+
connectedCallback() {
|
|
6290
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
6291
|
+
const bound = this.refresh.bind(this);
|
|
6292
|
+
this.mql[i].addEventListener("change", bound);
|
|
6293
|
+
this.boundMqlFunctions[i] = bound;
|
|
6294
|
+
}
|
|
6295
|
+
}
|
|
5672
6296
|
disconnectedCallback() {
|
|
5673
6297
|
if (this.navigationEl) {
|
|
5674
6298
|
enableBodyScroll(this.navigationEl);
|
|
5675
6299
|
}
|
|
6300
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
6301
|
+
this.mql[i].removeEventListener("change", this.boundMqlFunctions[i]);
|
|
6302
|
+
}
|
|
6303
|
+
this.boundMqlFunctions = [];
|
|
5676
6304
|
}
|
|
5677
6305
|
/**
|
|
5678
6306
|
* Component event handling.
|
|
@@ -5685,7 +6313,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5685
6313
|
}
|
|
5686
6314
|
}
|
|
5687
6315
|
handleKeyDown(ev) {
|
|
5688
|
-
if (this.isContactOpen || this.isLanguageOpen) {
|
|
6316
|
+
if (this.isContactOpen || this.isLanguageOpen || this.isSegmentOpen) {
|
|
5689
6317
|
const activeElement = this.element.shadowRoot.activeElement;
|
|
5690
6318
|
// When Space is pressed
|
|
5691
6319
|
if (isSpaceKey(ev) && activeElement) {
|
|
@@ -5697,6 +6325,12 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5697
6325
|
else if (this.isLanguageOpen) {
|
|
5698
6326
|
this.closeMenus(true);
|
|
5699
6327
|
}
|
|
6328
|
+
else if (this.isSegmentOpen) {
|
|
6329
|
+
this.closeMenus();
|
|
6330
|
+
}
|
|
6331
|
+
else if (this.openMenu) {
|
|
6332
|
+
this.closeMenus();
|
|
6333
|
+
}
|
|
5700
6334
|
activeElement.click();
|
|
5701
6335
|
}
|
|
5702
6336
|
}
|
|
@@ -5726,10 +6360,15 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5726
6360
|
* Local methods.
|
|
5727
6361
|
*/
|
|
5728
6362
|
async refresh() {
|
|
6363
|
+
if (this.renderDesktopNav !== this.mql[0].matches) {
|
|
6364
|
+
this.renderDesktopNav = this.mql[0].matches;
|
|
6365
|
+
this.openMenu = null;
|
|
6366
|
+
}
|
|
5729
6367
|
this.processedItems = parsePossibleJSON(this.items);
|
|
5730
6368
|
this.processedLanguageItems = parsePossibleJSON(this.languageItems);
|
|
5731
6369
|
this.processedContactItems = parsePossibleJSON(this.contactItems);
|
|
5732
6370
|
this.processedSession = parsePossibleJSON(this.session);
|
|
6371
|
+
this.processedSearch = parsePossibleJSON(this.search);
|
|
5733
6372
|
this.processedUser = parsePossibleJSON(this.user);
|
|
5734
6373
|
this.processedBack = parsePossibleJSON(this.back);
|
|
5735
6374
|
}
|
|
@@ -5746,7 +6385,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5746
6385
|
* Closes all dropdown menus in header when called.
|
|
5747
6386
|
*/
|
|
5748
6387
|
async closeMenus(moveFocusToButton = false) {
|
|
5749
|
-
if (this.isContactOpen || this.isLanguageOpen) {
|
|
6388
|
+
if (this.isContactOpen || this.isLanguageOpen || this.isSegmentOpen || this.openMenu) {
|
|
5750
6389
|
if (this.isContactOpen && moveFocusToButton) {
|
|
5751
6390
|
this.contactItemsButtonEl.focus({
|
|
5752
6391
|
preventScroll: true,
|
|
@@ -5757,8 +6396,20 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5757
6396
|
preventScroll: true,
|
|
5758
6397
|
});
|
|
5759
6398
|
}
|
|
6399
|
+
if (this.isSegmentOpen && moveFocusToButton) {
|
|
6400
|
+
this.segmentItemsButtonEl.focus({
|
|
6401
|
+
preventScroll: true,
|
|
6402
|
+
});
|
|
6403
|
+
}
|
|
6404
|
+
if (this.openMenu && moveFocusToButton) {
|
|
6405
|
+
this.subMenuButtonRefs[this.openMenu].focus({
|
|
6406
|
+
preventScroll: true,
|
|
6407
|
+
});
|
|
6408
|
+
}
|
|
5760
6409
|
this.isContactOpen = false;
|
|
5761
6410
|
this.isLanguageOpen = false;
|
|
6411
|
+
this.isSegmentOpen = false;
|
|
6412
|
+
this.openMenu = null;
|
|
5762
6413
|
}
|
|
5763
6414
|
}
|
|
5764
6415
|
/**
|
|
@@ -5774,45 +6425,93 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5774
6425
|
*/
|
|
5775
6426
|
render() {
|
|
5776
6427
|
const { skipLabel, changeLanguage, activeLanguage } = this.accessibleI18nLabels;
|
|
5777
|
-
|
|
6428
|
+
const skipToLabel = this.skipToId ? (h$1("a", { href: this.skipToId, class: "duet-header-skip", onClick: this.handleSkipClick }, skipLabel)) : null;
|
|
6429
|
+
const logo = (h$1("duet-logo", { href: this.logoHref, size: "medium", ref: el => (this.logoEl = el), language: this.language, theme: this.theme, onClick: this.handleLogoClick }));
|
|
6430
|
+
const largeLogo = (h$1("duet-logo", { href: this.logoHref, size: "large", ref: el => (this.logoEl = el), language: this.language, theme: this.theme, onClick: this.handleLogoClick }));
|
|
6431
|
+
const contactDropdown = this.contact && this.processedContactItems ? (h$1(DuetHeaderDropdown, { id: "duet-header-contact", label: this.contact, icon: navigationContactDropdown.svg, active: this.isContactOpen, isOpen: this.isContactOpen, badge: false, toggleRef: el => (this.contactItemsButtonEl = el), itemsRef: el => (this.contactItemsEl = el), onToggle: event => this.toggleMenu(event, "contact") }, this.processedContactItems.map(item => (h$1("a", { role: "menuitem", href: item.href || "#", id: item.id, onClick: event => this.handleContactClick(event, item), onKeyDown: ev => this.handleArrowKeys(ev), target: item.external ? "_blank" : "_self" }, item.label, item.external && (h$1(Fragment, null, h$1("duet-visually-hidden", null, ", ", this.accessibleLabelExternal), h$1("span", { class: "duet-header-link-external" }, h$1("duet-icon", { name: "action-new-window-small", size: "xx-small", margin: "none", color: this.theme === "turva" ? "primary-turva" : "primary" }))))))))) : null;
|
|
6432
|
+
const languageDropdown = this.language && this.processedLanguageItems ? (h$1(DuetHeaderDropdown, { id: "duet-header-language", label: this.language, icon: navigationLanguage.svg, accessibleText: `${changeLanguage}${this.hasLanguageChanged ? `, ${activeLanguage}` : ""}`, active: this.isLanguageOpen, isOpen: this.isLanguageOpen, badge: false, toggleRef: el => (this.languageItemsButtonEl = el), itemsRef: el => (this.languageItemsEl = el), onToggle: event => this.toggleMenu(event, "language") }, this.processedLanguageItems.map(item => (h$1("a", { class: { active: this.language === item.country }, "aria-selected": this.language === item.country, role: "menuitem", id: item.id, lang: item.country, href: item.href || "#", onClick: event => this.handleLanguageClick(event, item), onKeyDown: this.handleArrowKeys }, item.label))))) : null;
|
|
6433
|
+
const processedUserWithLink = this.processedUser && this.processedUser.href ? (h$1("a", { href: this.processedUser.href || "#", id: this.processedUser.id, class: "duet-header-user duet-header-button", onClick: this.handleUserClick }, h$1(DuetHeaderIcon, { icon: navigationUser.svg }), h$1("span", { class: "duet-header-user-label" }, this.processedUser.label))) : null;
|
|
6434
|
+
const processedUserWithoutLink = this.processedUser && !this.processedUser.href ? (h$1("span", { id: this.processedUser.id, class: "duet-header-user duet-header-button duet-header-no-action" }, h$1(DuetHeaderIcon, { icon: navigationUser.svg }), h$1("span", { class: "duet-header-user-label" }, this.processedUser.label))) : null;
|
|
6435
|
+
const processedSessionIconSize = this.renderDesktopNav ? "x-small" : "small";
|
|
6436
|
+
const processedSession = this.processedSession ? (h$1("a", { href: this.processedSession.href || "#", id: this.processedSession.id, class: "duet-header-logout duet-header-button", onClick: this.handleSessionClick }, h$1(DuetHeaderIcon, { icon: this.processedSession.type === "logout" ? navigationLogout.svg : navigationLogin.svg, iconSize: processedSessionIconSize }), h$1("span", { class: "duet-header-button-label" }, this.processedSession.label))) : null;
|
|
6437
|
+
const processedSearch = this.processedSearch ? (h$1("a", { href: this.processedSearch.href || "#", id: this.processedSearch.id, class: "duet-header-search duet-header-button", onClick: this.handleSearchClick }, h$1(DuetHeaderIcon, { icon: formSearch.svg }), h$1("span", { class: "duet-header-button-label" }, this.processedSearch.label))) : null;
|
|
6438
|
+
// Back variation
|
|
6439
|
+
if (this.processedBack) {
|
|
6440
|
+
return (h$1(Host, { class: "duet-header-back-variation" }, h$1("div", { class: "duet-header-reserved-space" }, h$1("header", { class: {
|
|
6441
|
+
"duet-header": true,
|
|
6442
|
+
"duet-theme-turva": this.theme === "turva",
|
|
6443
|
+
"duet-header-back": true,
|
|
6444
|
+
"duet-header-inactive": true,
|
|
6445
|
+
} }, h$1("div", { class: "duet-header-top" }, skipToLabel, h$1("duet-button", { url: this.processedBack.href, id: this.processedBack.id, theme: this.theme, variation: "plain", color: this.theme === "turva" ? "secondary-turva" : "secondary", icon: "navigation-arrow-left", iconSize: "large", onClick: this.handleBackClick }, this.processedBack.label), logo, h$1("slot", { name: "logo-utility" }))))));
|
|
6446
|
+
}
|
|
6447
|
+
// multi level desktop variation
|
|
6448
|
+
const itemsHaveSubItems = this.processedItems && this.processedItems.some(item => item.items && item.items.length > 0);
|
|
6449
|
+
if (this.renderDesktopNav && itemsHaveSubItems) {
|
|
6450
|
+
const activeSegment = this.processedItems.find(item => item.active);
|
|
6451
|
+
const isThirdLevelActive = this.processedItems &&
|
|
6452
|
+
this.processedItems.some(item => item.items &&
|
|
6453
|
+
item.items.some(secondLevelItem => secondLevelItem.items && secondLevelItem.items.some(thirdLevelItem => thirdLevelItem.active === true)));
|
|
6454
|
+
const segmentId = "duet-header-segment";
|
|
6455
|
+
return (h$1(Host, { class: "duet-header-multi-level-desktop-variation" }, h$1("div", { class: {
|
|
6456
|
+
"duet-header-multi-level-desktop": true,
|
|
6457
|
+
"duet-header-multi-level-desktop-third-level-is-open": isThirdLevelActive,
|
|
6458
|
+
} }, h$1("header", { class: {
|
|
6459
|
+
"duet-header": true,
|
|
6460
|
+
"duet-theme-turva": this.theme === "turva",
|
|
6461
|
+
"duet-header-inactive": !this.processedItems,
|
|
6462
|
+
} }, h$1("div", { class: "duet-header-top" }, skipToLabel, h$1("div", { class: "logo-and-segment" }, largeLogo, this.processedItems && (h$1(DuetHeaderDropdown, { id: segmentId, label: activeSegment.label, active: this.isSegmentOpen, isOpen: this.isSegmentOpen, badge: false, toggleRef: el => (this.segmentItemsButtonEl = el), itemsRef: el => (this.segmentItemsEl = el), onToggle: event => this.toggleMenu(event, "segment") }, this.processedItems.map(item => (h$1("a", { class: { active: activeSegment === item }, role: "menuitem", href: item.href || "#", id: item.id, onClick: event => this.handleItemClick(event, item), onKeyDown: ev => this.handleArrowKeys(ev), target: item.external ? "_blank" : "_self" }, item.icon && (h$1("div", { class: "duet-header-icon" }, h$1("duet-icon", { margin: "none", size: "x-small", name: item.icon, color: "currentColor" }))), h$1("span", null, item.label), item.badge && h$1("div", { class: "duet-header-badge" }))))))), h$1("nav", { class: "duet-header-multi-level-desktop-nav" }, activeSegment.items &&
|
|
6463
|
+
activeSegment.items
|
|
6464
|
+
.filter(secondLevelItem => secondLevelItem.items && secondLevelItem.items.length > 0)
|
|
6465
|
+
.map((secondLevelItem, secondLevelItemIndex) => {
|
|
6466
|
+
const id = secondLevelItem.id || `segment-item-${secondLevelItemIndex}`;
|
|
6467
|
+
return (h$1(DuetHeaderDropdown, { id: id, label: secondLevelItem.label, active: (!this.openMenu && secondLevelItem.active === true) || this.openMenu === id, isOpen: this.openMenu === id, badge: secondLevelItem.badge, toggleRef: el => (this.subMenuButtonRefs[id] = el), itemsRef: el => (this.subMenuItemRefs[id] = el), onToggle: event => this.toggleMenu(event, "sub", id) }, secondLevelItem.items &&
|
|
6468
|
+
secondLevelItem.items.map(thirdLevelItem => (h$1("a", { class: { active: thirdLevelItem.active }, role: "menuitem", href: thirdLevelItem.href || "#", id: thirdLevelItem.id, onClick: event => this.handleItemClick(event, thirdLevelItem), onKeyDown: ev => this.handleArrowKeys(ev), target: thirdLevelItem.external ? "_blank" : "_self" }, thirdLevelItem.icon && (h$1("div", { class: "duet-header-icon" }, h$1("duet-icon", { margin: "none", size: "medium", name: thirdLevelItem.icon, color: "currentColor" }))), h$1("span", null, thirdLevelItem.label), thirdLevelItem.badge && h$1("div", { class: "duet-header-badge" }))))));
|
|
6469
|
+
})), h$1("div", { class: "duet-header-multi-level-desktop-utils" }, processedSearch, languageDropdown, processedSession), h$1("slot", { name: "utility" }))))));
|
|
6470
|
+
}
|
|
6471
|
+
// Default variation
|
|
6472
|
+
const isThirdLevelActive = this.processedItems &&
|
|
6473
|
+
this.processedItems.some(item => item.items &&
|
|
6474
|
+
item.items.some(secondLevelItem => secondLevelItem.items && secondLevelItem.items.some(thirdLevelItem => thirdLevelItem.active === true)));
|
|
6475
|
+
return (h$1(Host, { class: {
|
|
6476
|
+
"duet-header-default-variation": true,
|
|
6477
|
+
} }, h$1("div", { class: {
|
|
5778
6478
|
"duet-header-reserved-space": true,
|
|
5779
6479
|
"duet-with-links": !!this.processedItems,
|
|
5780
|
-
"duet-
|
|
6480
|
+
"duet-header-third-level-active": isThirdLevelActive,
|
|
5781
6481
|
} }, h$1("header", { class: {
|
|
5782
6482
|
"duet-header": true,
|
|
5783
6483
|
"duet-theme-turva": this.theme === "turva",
|
|
5784
|
-
"duet-header-back": !!this.processedBack,
|
|
5785
6484
|
"duet-header-inactive": !this.processedItems,
|
|
5786
|
-
} }, h$1("div", { class: "duet-header-top" },
|
|
5787
|
-
|
|
5788
|
-
|
|
6485
|
+
} }, h$1("div", { class: "duet-header-top" }, skipToLabel, logo, h$1("slot", { name: "logo-utility" }, this.region && h$1("div", { class: "duet-header-region" }, this.region)), (this.processedItems ||
|
|
6486
|
+
languageDropdown ||
|
|
6487
|
+
contactDropdown ||
|
|
5789
6488
|
this.processedSession ||
|
|
5790
|
-
this.processedUser) && (h$1("button", { class: { "duet-header-toggle": true, active: this.isSlideOutOpen }, onClick: event => this.toggleMenu(event, "mobile"), type: "button" }, h$1("duet-visually-hidden", null, this.accessibleLabel), h$1(
|
|
6489
|
+
this.processedUser) && (h$1("button", { class: { "duet-header-toggle": true, active: this.isSlideOutOpen }, onClick: event => this.toggleMenu(event, "mobile"), type: "button" }, h$1("duet-visually-hidden", null, this.accessibleLabel), h$1(DuetHeaderHamburger, null)))), h$1("div", { ref: el => (this.navigationEl = el), class: {
|
|
5791
6490
|
"duet-header-bottom": true,
|
|
5792
6491
|
active: this.isSlideOutOpen,
|
|
5793
6492
|
inactive: !this.processedItems,
|
|
5794
6493
|
} }, h$1("nav", { class: "duet-header-items", role: "navigation" }, this.processedItems &&
|
|
5795
|
-
this.processedItems.map(
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
6494
|
+
this.processedItems.map((item, itemIndex) => (h$1("div", { class: "duet-header-item-container" }, h$1("a", { class: {
|
|
6495
|
+
"duet-header-first-level": true,
|
|
6496
|
+
"duet-header-item": true,
|
|
6497
|
+
active: (!itemsHaveSubItems && this.currentHref === item.href) || item.active === true,
|
|
6498
|
+
}, href: item.href || "#", id: item.id || `header-item-${itemIndex}`, onClick: event => this.handleItemClick(event, item) }, item.label, item.badge && h$1("div", { class: "duet-header-badge" })), item.items &&
|
|
6499
|
+
item.items
|
|
6500
|
+
.filter(secondLevelitem => secondLevelitem.items && secondLevelitem.items.length > 0)
|
|
6501
|
+
.map((secondLevelItem, secondLevelItemIndex) => {
|
|
6502
|
+
const id = secondLevelItem.id || `header-item-${itemIndex}-${secondLevelItemIndex}`;
|
|
6503
|
+
return (h$1(DuetHeaderDropdown, { id: id, className: "duet-header-second-level", label: secondLevelItem.label, icon: `${secondLevelItem.icon}.svg`, active: (!this.openMenu &&
|
|
6504
|
+
secondLevelItem.active === true &&
|
|
6505
|
+
!(this.closedActives && !!this.closedActives.find(i => i === id))) ||
|
|
6506
|
+
this.openMenu === id, isOpen: (!this.openMenu &&
|
|
6507
|
+
secondLevelItem.active === true &&
|
|
6508
|
+
!(this.closedActives && !!this.closedActives.find(i => i === id))) ||
|
|
6509
|
+
this.openMenu === id, badge: secondLevelItem.badge, toggleRef: el => (this.subMenuButtonRefs[id] = el), itemsRef: el => (this.subMenuItemRefs[id] = el), onToggle: event => this.toggleMenu(event, "sub", id, secondLevelItem.active === true) }, h$1("div", { class: "duet-header-third-level" }, secondLevelItem.items &&
|
|
6510
|
+
secondLevelItem.items.map(thirdLevelItem => (h$1("a", { class: {
|
|
6511
|
+
"duet-header-item": true,
|
|
6512
|
+
active: thirdLevelItem.active === true,
|
|
6513
|
+
}, role: "menuitem", href: thirdLevelItem.href || "#", id: thirdLevelItem.id, onClick: event => this.handleItemClick(event, item), onKeyDown: ev => this.handleArrowKeys(ev), target: thirdLevelItem.external ? "_blank" : "_self" }, thirdLevelItem.icon && (h$1("div", { class: "duet-header-icon" }, h$1("duet-icon", { margin: "none", size: "medium", name: thirdLevelItem.icon, color: "currentColor" }))), h$1("span", null, thirdLevelItem.label), thirdLevelItem.badge && h$1("div", { class: "duet-header-badge" })))))));
|
|
6514
|
+
}))))), h$1("div", { class: "duet-header-bottom-utils" }, h$1("slot", { name: "utility" })), h$1("div", { class: "duet-header-utils" }, !itemsHaveSubItems && contactDropdown, languageDropdown, !itemsHaveSubItems && (h$1(Fragment, null, processedUserWithLink, processedUserWithoutLink)), processedSearch, processedSession))))));
|
|
5816
6515
|
}
|
|
5817
6516
|
get element() { return this; }
|
|
5818
6517
|
static get watchers() { return {
|
|
@@ -5826,9 +6525,9 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5826
6525
|
static get style() { return duetHeaderCss; }
|
|
5827
6526
|
};
|
|
5828
6527
|
|
|
5829
|
-
const duetHeadingCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.duet-heading{margin-bottom:16px !important;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-style:normal;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;letter-spacing:-0.01rem;word-break:break-word}@media (min-width: 36em){.duet-heading{margin-bottom:20px !important}}.duet-heading.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\";font-style:italic;font-weight:700;color:#171c3a}.duet-heading.duet-heading-border{padding-bottom:20px;border-bottom:1px solid #e1e3e6}.duet-heading.duet-heading-hyphenate{-webkit-hyphens:auto;hyphens:auto}.duet-heading.h0{font-size:9.4vw}.duet-heading.h0.duet-p-0{padding:0 !important}.duet-heading.h0.duet-m-0{margin:0 !important}@media (max-width: 31.914893617rem){.duet-heading.h0{font-size:3rem}}@media (min-width: 47.8723404255rem){.duet-heading.h0{font-size:4.5rem}}@media (max-width: 22.5em){.duet-heading.h0{font-size:2.25rem}}.duet-heading.h1{font-size:7vw}.duet-heading.h1.duet-p-0{padding:0 !important}.duet-heading.h1.duet-m-0{margin:0 !important}@media (max-width: 32.1428571429rem){.duet-heading.h1{font-size:2.25rem}}@media (min-width: 42.8571428571rem){.duet-heading.h1{font-size:3rem}}@media (max-width: 22.5em){.duet-heading.h1{font-size:1.5rem}}.duet-heading.h2{font-size:5.8vw}.duet-heading.h2.duet-p-0{padding:0 !important}.duet-heading.h2.duet-m-0{margin:0 !important}@media (max-width: 25.8620689655rem){.duet-heading.h2{font-size:1.5rem}}@media (min-width: 38.7931034483rem){.duet-heading.h2{font-size:2.25rem}}@media (max-width: 22.5em){.duet-heading.h2{font-size:1.375rem}}.duet-heading.h3{margin-bottom:12px !important;font-size:4.2vw}.duet-heading.h3.duet-p-0{padding:0 !important}.duet-heading.h3.duet-m-0{margin:0 !important}@media (max-width: 29.7619047619rem){.duet-heading.h3{font-size:1.25rem}}@media (min-width: 35.7142857143rem){.duet-heading.h3{font-size:1.5rem}}.duet-heading.h3.duet-theme-turva{font-style:normal}.duet-heading.h3.duet-heading-border{padding-bottom:20px}.duet-heading.h4{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}.duet-heading.h4.duet-p-0{padding:0 !important}.duet-heading.h4.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h4{font-size:1.1rem}}@media (min-width: 31.25rem){.duet-heading.h4{font-size:1.25rem}}.duet-heading.h4.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h4.duet-heading-border{padding-bottom:20px}.duet-heading.h5{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}.duet-heading.h5.duet-p-0{padding:0 !important}.duet-heading.h5.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h5{font-size:1.1rem}}@media (min-width: 28.4090909091rem){.duet-heading.h5{font-size:1.1363636364rem}}.duet-heading.h5.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h5.duet-heading-border{padding-bottom:16px}.duet-heading.h6{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}.duet-heading.h6.duet-p-0{padding:0 !important}.duet-heading.h6.duet-m-0{margin:0 !important}.duet-heading.h6.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h6.duet-heading-border{padding-bottom:16px}.duet-heading.duet-semibold,.duet-heading.duet-theme-turva.duet-semibold{font-style:normal !important;font-weight:600 !important}";
|
|
6528
|
+
const duetHeadingCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.duet-heading{margin-bottom:16px !important;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-style:normal;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;letter-spacing:-0.01rem;word-break:break-word}@media (min-width: 36em){.duet-heading{margin-bottom:20px !important}}.duet-heading.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\";font-style:italic;font-weight:700;color:#171c3a}.duet-heading.duet-heading-border{padding-bottom:20px;border-bottom:1px solid #e1e3e6}.duet-heading.duet-heading-border.duet-heading-border-solid{border-bottom-color:#657787}.duet-heading.duet-heading-hyphenate{-webkit-hyphens:auto;hyphens:auto}.duet-heading.h0{font-size:9.4vw}.duet-heading.h0.duet-p-0{padding:0 !important}.duet-heading.h0.duet-m-0{margin:0 !important}@media (max-width: 31.914893617rem){.duet-heading.h0{font-size:3rem}}@media (min-width: 47.8723404255rem){.duet-heading.h0{font-size:4.5rem}}@media (max-width: 22.5em){.duet-heading.h0{font-size:2.25rem}}.duet-heading.h1{font-size:7vw}.duet-heading.h1.duet-p-0{padding:0 !important}.duet-heading.h1.duet-m-0{margin:0 !important}@media (max-width: 32.1428571429rem){.duet-heading.h1{font-size:2.25rem}}@media (min-width: 42.8571428571rem){.duet-heading.h1{font-size:3rem}}@media (max-width: 22.5em){.duet-heading.h1{font-size:1.5rem}}.duet-heading.h2{font-size:5.8vw}.duet-heading.h2.duet-p-0{padding:0 !important}.duet-heading.h2.duet-m-0{margin:0 !important}@media (max-width: 25.8620689655rem){.duet-heading.h2{font-size:1.5rem}}@media (min-width: 38.7931034483rem){.duet-heading.h2{font-size:2.25rem}}@media (max-width: 22.5em){.duet-heading.h2{font-size:1.375rem}}.duet-heading.h3{margin-bottom:12px !important;font-size:4.2vw}.duet-heading.h3.duet-p-0{padding:0 !important}.duet-heading.h3.duet-m-0{margin:0 !important}@media (max-width: 29.7619047619rem){.duet-heading.h3{font-size:1.25rem}}@media (min-width: 35.7142857143rem){.duet-heading.h3{font-size:1.5rem}}.duet-heading.h3.duet-theme-turva{font-style:normal}.duet-heading.h3.duet-heading-border{padding-bottom:20px}.duet-heading.h4{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}.duet-heading.h4.duet-p-0{padding:0 !important}.duet-heading.h4.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h4{font-size:1.1rem}}@media (min-width: 31.25rem){.duet-heading.h4{font-size:1.25rem}}.duet-heading.h4.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h4.duet-heading-border{padding-bottom:20px}.duet-heading.h5{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}.duet-heading.h5.duet-p-0{padding:0 !important}.duet-heading.h5.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h5{font-size:1.1rem}}@media (min-width: 28.4090909091rem){.duet-heading.h5{font-size:1.1363636364rem}}.duet-heading.h5.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h5.duet-heading-border{padding-bottom:16px}.duet-heading.h6{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}.duet-heading.h6.duet-p-0{padding:0 !important}.duet-heading.h6.duet-m-0{margin:0 !important}.duet-heading.h6.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h6.duet-heading-border{padding-bottom:16px}.duet-heading.duet-semibold,.duet-heading.duet-theme-turva.duet-semibold{font-style:normal !important;font-weight:600 !important}";
|
|
5830
6529
|
|
|
5831
|
-
let DuetHeading$1 = class extends
|
|
6530
|
+
let DuetHeading$1 = class extends H {
|
|
5832
6531
|
constructor() {
|
|
5833
6532
|
super();
|
|
5834
6533
|
this.__registerHost();
|
|
@@ -5842,7 +6541,7 @@ let DuetHeading$1 = class extends HTMLElement {
|
|
|
5842
6541
|
*/
|
|
5843
6542
|
this.margin = "auto";
|
|
5844
6543
|
/**
|
|
5845
|
-
* Enable or disable the border underneath the heading
|
|
6544
|
+
* Enable or disable the border underneath the heading, solid will darken the border
|
|
5846
6545
|
*/
|
|
5847
6546
|
this.border = false;
|
|
5848
6547
|
/**
|
|
@@ -5879,7 +6578,8 @@ let DuetHeading$1 = class extends HTMLElement {
|
|
|
5879
6578
|
const color = getColorByName(this.color);
|
|
5880
6579
|
return (h$1(TagName, { class: {
|
|
5881
6580
|
"duet-heading": true,
|
|
5882
|
-
"duet-heading-border": this.border,
|
|
6581
|
+
"duet-heading-border": this.border !== false,
|
|
6582
|
+
"duet-heading-border-solid": this.border === "solid",
|
|
5883
6583
|
"duet-semibold": this.weight === "semibold",
|
|
5884
6584
|
"duet-heading-hyphenate": this.hyphenate,
|
|
5885
6585
|
"duet-m-0": this.margin === "none",
|
|
@@ -5893,7 +6593,7 @@ let DuetHeading$1 = class extends HTMLElement {
|
|
|
5893
6593
|
|
|
5894
6594
|
const duetHeroCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-hero{position:relative;display:block;width:100%;padding:48px 28px;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;text-decoration:none;text-shadow:none;text-transform:none;background:#00294d}.duet-hero.duet-p-0{padding:0 !important}.duet-hero.duet-m-0{margin:0 !important}.duet-hero.duet-hero-text-center{text-align:center !important}.duet-hero.duet-hero-light{padding-bottom:0 !important}@media (min-width: 62em){.duet-hero.duet-hero-light{padding-bottom:28px !important}}.duet-hero.duet-hero-with-image{padding-bottom:20px !important;margin-bottom:-36px}@media (min-width: 48em){.duet-hero.duet-hero-with-image{padding-bottom:28px !important}}@media (min-width: 62em){.duet-hero.duet-hero-with-image{padding-bottom:36px !important;margin-bottom:-20px}}.duet-hero.duet-hero-light,.duet-hero.duet-hero-with-image{color:#00294d;background-color:white;background-image:linear-gradient(#f3f9fc, #f9fcfe)}.duet-hero.duet-hero-light::before,.duet-hero.duet-hero-with-image::before{position:absolute;top:100%;left:0;z-index:-1;width:100%;height:400px;content:\"\";background-image:linear-gradient(#f9fcfe, white)}.duet-hero.duet-hero-light.duet-theme-turva,.duet-hero.duet-hero-with-image.duet-theme-turva{color:#171c3a;background-image:linear-gradient(#f5f5f7, #fafafb)}.duet-hero.duet-hero-light.duet-theme-turva::before,.duet-hero.duet-hero-with-image.duet-theme-turva::before{background-image:linear-gradient(#fafafb, white)}.duet-hero.duet-hero-gray{color:#00294d;background:#f5f8fa}.duet-hero.duet-hero-gray.duet-theme-turva{background:#f5f5f7}@media (min-width: 62em){.duet-hero.duet-hero-gray .duet-hero-text{display:inline-block;vertical-align:top}.duet-hero.duet-hero-gray .duet-hero-icon+.duet-hero-text{margin-left:28px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-actions{padding-bottom:65.4545454545px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-back{padding-top:72px}}.duet-hero.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\";background:#c60c30}@media (min-width: 62em){.duet-hero{min-height:290px;padding:111.6px 56px;overflow:visible}}.duet-hero-icon{display:inline-block;vertical-align:top}@media (min-width: 62em){.duet-hero-icon{margin-top:-8px}}@media (min-width: 62em){.duet-hero-heading{margin-top:12px}}@media (min-width: 62em){.duet-hero-heading-has-pre{margin-top:0}}.duet-hero-wrapper{position:relative;width:100%;max-width:1110px;margin:0 auto;text-align:center}.duet-hero-left-align .duet-hero-wrapper{text-align:left}.duet-hero-with-image .duet-hero-wrapper{position:static}@media (min-width: 62em){.duet-hero-wrapper{text-align:left}}.duet-hero-text{max-width:50rem;margin:0 auto}.duet-hero-text-center .duet-hero-text{text-align:center !important}@media (min-width: 48em){.duet-hero-text{width:80%}.duet-hero-left-align .duet-hero-text{margin:0}}@media (min-width: 62em){.duet-hero-text{width:52%;max-width:none;margin-top:-10px;margin-left:0}.duet-hero-text-center .duet-hero-text{margin-left:auto}}.duet-hero:not(.duet-hero-with-image) .duet-hero-image{width:100%;max-width:400px;height:0;padding-bottom:50%;margin:28px auto 0;background-repeat:no-repeat;background-position:50% 50%;background-size:contain}@media (min-width: 36em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{padding-bottom:40%}}@media (min-width: 48em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:420px;padding-bottom:34%}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:540px}}@media (min-width: 62em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{position:absolute;top:50%;right:0;padding-bottom:30%;margin:0;transform:translateY(-50%)}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-60px;padding-bottom:26%}.duet-hero-gray .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}@media (min-width: 62em){.duet-hero-gray:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}.duet-hero-image-wrapper{position:relative;width:80%;height:0;padding-bottom:80%;margin:-30px auto 36px;overflow:hidden;border-radius:28%;box-shadow:0 0 20px rgba(255, 255, 255, 0.5);transform:rotate(10deg)}.duet-theme-turva .duet-hero-image-wrapper{padding-bottom:68%;border-radius:44% 47% 38% 54%;transform:none}@media screen and (min-width: 440px){.duet-hero-image-wrapper{width:300px;padding-bottom:300px}.duet-theme-turva .duet-hero-image-wrapper{width:80%;padding-bottom:68%}}@media (min-width: 62em){.duet-hero-image-wrapper{position:absolute;top:-60px;right:-50px;width:470px;padding-bottom:470px;margin:0}.duet-theme-turva .duet-hero-image-wrapper{top:-40px;right:-80px;width:536px;padding-bottom:470px}}@media (min-width: 76.25em){.duet-hero-image-wrapper{top:-70px;right:-60px;width:600px;padding-bottom:600px}.duet-theme-turva .duet-hero-image-wrapper{top:-70px;right:-60px;width:650px;padding-bottom:600px}}@media screen and (min-width: 1450px){.duet-hero-image-wrapper{top:-70px;right:25px}.duet-theme-turva .duet-hero-image-wrapper{right:0}}.duet-hero-image-wrapper .duet-hero-image{position:absolute;top:-5%;left:-5%;width:110%;height:110%;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;transform:rotate(-10deg)}.duet-theme-turva .duet-hero-image-wrapper .duet-hero-image{top:0;left:0;width:100%;height:100%;transform:none}.duet-hero-image-mask{position:relative;margin:-48px auto 0;overflow:hidden}@media (min-width: 62em){.duet-hero-image-mask{position:absolute;top:0;right:0;width:470px;height:460px;margin:0}}@media (min-width: 76.25em){.duet-hero-image-mask{width:650px;height:580px}}@media screen and (min-width: 1450px){.duet-hero-image-mask{right:50%;transform:translateX(110%)}.duet-theme-turva .duet-hero-image-mask{transform:translateX(108%)}}duet-heading+duet-button{margin-top:12px !important}.duet-hero-links{width:calc(100% + 56px);margin-top:48px;margin-left:-28px}.duet-hero-minimal .duet-hero-links{margin-top:28px}@media (min-width: 36em){.duet-hero-links{margin-top:72px}.duet-hero-minimal .duet-hero-links{margin-top:28px}}@media (min-width: 62em){.duet-hero-links{width:auto;margin:36px 0 0}.duet-hero-minimal .duet-hero-links{margin-top:28px}}.duet-hero-link{display:flex;align-items:center;width:100%;padding:16px 16px 8px;font-weight:600;-webkit-hyphens:auto;hyphens:auto;line-height:1.25;color:#0077b3;text-align:left;text-decoration:none;border-bottom:1px solid #e1e3e6;transition:background-color 300ms ease}.duet-hero-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-hero-link:focus,.duet-hero-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-hero-link:hover,.duet-hero-link:hover .duet-hero-action-arrow{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-hero-link:hover,.duet-theme-turva .duet-hero-link:hover .duet-hero-action-arrow{color:#940925 !important}.duet-theme-turva .duet-hero-link{color:#c60c30}@media (min-width: 36em){.duet-hero-link{padding:16px 16px 16px 28px}}@media (min-width: 62em){.duet-hero-link{display:inline-flex;width:auto;max-width:350px;padding:0;margin:0 28px 16px 0;border:0;border-radius:4px}}.duet-hero-link:hover{background:rgba(0, 0, 0, 0.02)}@media (min-width: 62em){.duet-hero-link:hover{background:transparent}}.duet-hero-link:first-of-type{border-top:1px solid #e1e3e6}@media (min-width: 62em){.duet-hero-link:first-of-type{margin-top:0;border:0}}.duet-hero-link:last-of-type{margin-bottom:-48px}@media (min-width: 62em){.duet-hero-link:last-of-type{margin-right:0;margin-bottom:0}}.duet-hero-link span{margin-top:-8px}@media (min-width: 36em){.duet-hero-link span{margin:0}}.duet-hero-action-icon{margin-right:8px}@media (min-width: 36em){.duet-hero-action-icon{margin-right:12px}}.duet-hero-action-arrow{margin:0 0 0 8px;color:#0077b3}@media (max-width: 35.9375em){.duet-hero-action-arrow{margin-top:-9px}}.duet-theme-turva .duet-hero-action-arrow{color:#c60c30}.duet-hero-back{margin-bottom:28px !important;display:flex;align-items:center;justify-content:center}.duet-hero-left-align .duet-hero-back{align-items:self-start;justify-content:flex-start}@media (min-width: 36em){.duet-hero-back{margin-bottom:36px !important}.duet-hero-minimal .duet-hero-back{margin-bottom:28px !important}}@media (min-width: 62em){.duet-hero-back{display:block}}.duet-hero-pre{display:inline-block;width:auto;margin-right:8px}.duet-hero-pre+duet-heading{margin-top:0 !important}";
|
|
5895
6595
|
|
|
5896
|
-
let DuetHero$1 = class extends
|
|
6596
|
+
let DuetHero$1 = class extends H {
|
|
5897
6597
|
constructor() {
|
|
5898
6598
|
super();
|
|
5899
6599
|
this.__registerHost();
|
|
@@ -6172,7 +6872,7 @@ function fetchIconByUrl(url) {
|
|
|
6172
6872
|
|
|
6173
6873
|
const duetIconCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:inline-block;width:auto;max-width:100%;color:inherit;-webkit-tap-highlight-color:transparent}@media (max-width: 35.9375em){:host(.duet-icon-has-outline){margin-bottom:0 !important}}@media (max-width: 35.9375em){:host(.duet-icon-has-background){margin-bottom:0 !important}}:host(.duet-m-0){margin:0 !important}@media (max-width: 35.9375em){:host(.duet-m-0){margin:0 !important}}.duet-icon{-webkit-user-select:none;user-select:none;width:100%;height:100%;transform-origin:top center}.duet-icon.duet-icon-has-outline{padding:12px;border-style:solid;border-width:1px;border-radius:50%}@media (max-width: 35.9375em){.duet-icon.duet-icon-has-outline{outline:1px solid transparent;transform:scale(0.8)}}.duet-icon.duet-icon-has-background{padding:16px;color:white;border-radius:50%}@media (max-width: 35.9375em){.duet-icon.duet-icon-has-background{outline:1px solid transparent;transform:scale(0.8)}}.duet-icon.duet-icon-has-background.duet-theme-turva,.duet-icon.duet-icon-has-background.duet-theme-default{color:white}.duet-icon.duet-icon-has-background.xxx-small .duet-icon-svg,.duet-icon.duet-icon-has-outline.xxx-small .duet-icon-svg{width:10px;height:10px}.duet-icon.duet-icon-has-background.xx-small .duet-icon-svg,.duet-icon.duet-icon-has-outline.xx-small .duet-icon-svg{width:16px;height:16px}@media (max-width: 35.9375em){.duet-icon.duet-icon-not-responsive{transform:scale(1) !important}}.duet-icon.duet-theme-default{color:#0077b3}.duet-icon.duet-theme-turva{color:#c60c30}.duet-icon.auto .duet-icon-svg{width:100%;height:100%}.duet-icon.xxx-small .duet-icon-svg{width:7px;height:7px}.duet-icon.duet-icon-has-background.xxx-small{padding:6px}.duet-icon.duet-icon-has-outline.xxx-small{padding:4px}.duet-icon.xx-small .duet-icon-svg{width:10px;height:10px}.duet-icon.duet-icon-has-background.xx-small{padding:8px}.duet-icon.duet-icon-has-outline.xx-small{padding:7px}.duet-icon.x-small .duet-icon-svg{width:16px;height:16px}.duet-icon.duet-icon-has-outline.x-small{padding:10px}.duet-icon.duet-icon-has-background.x-small{padding:12px}.duet-icon.small .duet-icon-svg{width:20px;height:20px}.duet-icon.duet-icon-has-background.small{padding:14px}.duet-icon.large .duet-icon-svg{width:30px;height:30px}.duet-icon.x-large .duet-icon-svg{width:36px;height:36px}.duet-icon.xx-large .duet-icon-svg{width:48px;height:48px}.duet-icon.xxx-large .duet-icon-svg{width:48px;height:48px}@media (min-width: 48em){.duet-icon.xxx-large .duet-icon-svg{width:72px;height:72px}}.duet-icon .duet-icon-svg{display:block;width:24px;min-width:100%;height:24px;font-size:0}.duet-icon svg{width:100%;min-width:100%;fill:currentColor}";
|
|
6174
6874
|
|
|
6175
|
-
let DuetIcon$1 = class extends
|
|
6875
|
+
let DuetIcon$1 = class extends H {
|
|
6176
6876
|
constructor() {
|
|
6177
6877
|
super();
|
|
6178
6878
|
this.__registerHost();
|
|
@@ -6250,11 +6950,13 @@ let DuetIcon$1 = class extends HTMLElement {
|
|
|
6250
6950
|
* Always the last one in the class.
|
|
6251
6951
|
*/
|
|
6252
6952
|
render() {
|
|
6253
|
-
const color = this.color === "currentColor"
|
|
6953
|
+
const color = this.color === "currentColor"
|
|
6954
|
+
? "currentColor"
|
|
6955
|
+
: getColorByName(this.color, this.theme) || getColorByName(this.outline, this.theme);
|
|
6254
6956
|
const styles = {
|
|
6255
6957
|
color,
|
|
6256
|
-
background: getColorByName(this.background),
|
|
6257
|
-
"border-color": getColorByName(this.outline),
|
|
6958
|
+
background: getColorByName(this.background, this.theme),
|
|
6959
|
+
"border-color": getColorByName(this.outline, this.theme),
|
|
6258
6960
|
};
|
|
6259
6961
|
return (h$1(Host, { class: {
|
|
6260
6962
|
"duet-m-0": this.margin === "none",
|
|
@@ -6281,8 +6983,6 @@ let DuetIcon$1 = class extends HTMLElement {
|
|
|
6281
6983
|
|
|
6282
6984
|
var formEmail={"title":"form-email","tags":"form email","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M12 23.999c-3.205 0-6.218-1.248-8.484-3.514S.001 15.206.001 12.001s1.248-6.218 3.514-8.485C5.782 1.25 8.795.001 12 .001s6.218 1.248 8.485 3.514A11.92 11.92 0 0 1 24 12v2.25A3.754 3.754 0 0 1 20.25 18a3.77 3.77 0 0 1-3.48-2.365A6.009 6.009 0 0 1 12 18c-3.308 0-6-2.692-6-6s2.692-6 6-6 6 2.692 6 6v2.25c0 1.241 1.009 2.25 2.25 2.25s2.25-1.009 2.25-2.25V12c0-2.804-1.092-5.441-3.075-7.424A10.433 10.433 0 0 0 12 1.501c-2.804 0-5.441 1.092-7.424 3.075S1.501 9.196 1.501 12c0 2.805 1.092 5.441 3.075 7.424s4.619 3.074 7.423 3.074c2.257 0 4.494-.746 6.299-2.1a.749.749 0 1 1 .9 1.199A12.049 12.049 0 0 1 12 23.999zM12 7.5c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5 4.5-2.019 4.5-4.5-2.019-4.5-4.5-4.5z\"/></svg>"};
|
|
6283
6985
|
|
|
6284
|
-
var formSearch={"title":"form-search","tags":"form search magnifying glass","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M23.245 23.996a.743.743 0 0 1-.53-.22L16.2 17.26a9.824 9.824 0 0 1-2.553 1.579 9.766 9.766 0 0 1-7.51.069 9.745 9.745 0 0 1-5.359-5.262c-1.025-2.412-1.05-5.08-.069-7.51S3.558 1.802 5.97.777a9.744 9.744 0 0 1 7.51-.069c2.431.981 4.334 2.849 5.359 5.262s1.05 5.08.069 7.51a9.807 9.807 0 0 1-1.649 2.718l6.517 6.518a.75.75 0 0 1-.531 1.28zM9.807 1.49a8.259 8.259 0 0 0-3.25.667c-2.044.869-3.627 2.481-4.458 4.54s-.81 4.318.058 6.362a8.26 8.26 0 0 0 4.54 4.458 8.259 8.259 0 0 0 6.362-.059 8.285 8.285 0 0 0 2.594-1.736.365.365 0 0 1 .077-.076 8.245 8.245 0 0 0 1.786-2.728 8.255 8.255 0 0 0-.059-6.362 8.257 8.257 0 0 0-4.54-4.458 8.28 8.28 0 0 0-3.11-.608z\"/></svg>"};
|
|
6285
|
-
|
|
6286
6986
|
/**
|
|
6287
6987
|
* This function restores cursor position after changing input
|
|
6288
6988
|
*
|
|
@@ -6332,13 +7032,13 @@ function cleanValue(input, regex) {
|
|
|
6332
7032
|
return newValue;
|
|
6333
7033
|
}
|
|
6334
7034
|
|
|
6335
|
-
const duetInputCss = "*.sc-duet-input,*.sc-duet-input::after,*.sc-duet-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-input-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%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-input-h:last-child,.sc-duet-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-input-h{width:100% !important}.duet-m-0.sc-duet-input-h{margin:0 !important}duet-tooltip.sc-duet-input{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-input{position:relative;top:4px;right:auto}}duet-caption.sc-duet-input:not(:last-of-type){margin-bottom:0}.duet-input-icon.sc-duet-input{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;font-size:0;line-height:normal;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-input .duet-input-icon.sc-duet-input{color:#171c3a}.duet-input-container.sc-duet-input{position:relative;width:100%;height:100%}.duet-input.sc-duet-input{position:relative;z-index:100;display:block !important;width:100% !important;min-width:8rem;max-width:initial !important;height:auto !important;padding:12px 14px !important;margin:initial !important;margin-bottom:initial !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 !important;font-variant-numeric:tabular-nums;line-height:1.5 !important;color:#00294d !important;cursor:initial !important;background:white !important;background-clip:initial !important;border:1px solid #909599 !important;border-radius:4px !important;box-shadow:initial !important;transition:box-shadow 150ms ease, border 150ms ease !important}.duet-input.is-number.sc-duet-input{padding-right:112px !important}.duet-input.is-date.sc-duet-input{padding-right:64px !important}.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#de2362 !important}.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#e02a0d !important}.has-icon.sc-duet-input .duet-input.sc-duet-input{padding-right:48px !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input{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 !important;border-color:#747475 !important}.duet-input.sc-duet-input::-ms-clear{display:none}.duet-input.sc-duet-input::-webkit-contacts-auto-fill-button{display:none !important}.duet-input.sc-duet-input::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-webkit-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-input.sc-duet-input::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-moz-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfcfd1}.duet-input.sc-duet-input:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:-ms-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfcfd1}.duet-input[disabled].sc-duet-input{color:#00294d !important;cursor:text !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-input .duet-input[disabled].sc-duet-input{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #909599 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #747475 !important}.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus{border-color:#0077b3 !important;outline:0;box-shadow:0 0 0 1px #0077b3 !important;transition:none}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus{border-color:#171c3a !important;box-shadow:0 0 0 1px #171c3a !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#171c3a}.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#0077b3}.duet-input[type=search].sc-duet-input:not(:placeholder-shown):focus+.duet-input-icon.sc-duet-input{display:none}.duet-input.sc-duet-input:not(:focus):not(:hover):invalid{box-shadow:none !important}.duet-input[type=number].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=number].sc-duet-input::-webkit-outer-spin-button,.duet-input[type=time].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=time].sc-duet-input::-webkit-outer-spin-button{display:none;margin:0;-webkit-appearance:none}.duet-input.sc-duet-input::-webkit-search-cancel-button{margin-right:-28px}.duet-input-help.sc-duet-input{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-input-help.sc-duet-input span.sc-duet-input{display:block;margin-top:8px}.duet-theme-turva.sc-duet-input .duet-input-help.sc-duet-input{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#747475}.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#e02a0d}.duet-label-hidden.sc-duet-input duet-label.sc-duet-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-input-relative.sc-duet-input{position:relative;width:100%}";
|
|
7035
|
+
const duetInputCss = "*.sc-duet-input,*.sc-duet-input::after,*.sc-duet-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-input-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%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-input-h:last-child,.sc-duet-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-input-h{width:100% !important}.duet-m-0.sc-duet-input-h{margin:0 !important}duet-tooltip.sc-duet-input{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-input{position:relative;top:4px;right:auto}}duet-caption.sc-duet-input:not(:last-of-type){margin-bottom:0}.duet-input-placeholder.sc-duet-input{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-input-icon.sc-duet-input{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;font-size:0;line-height:normal;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-input .duet-input-icon.sc-duet-input{color:#171c3a}.duet-input-container.sc-duet-input{position:relative;width:100%;height:100%}.duet-input.sc-duet-input{position:relative;z-index:100;display:block !important;width:100% !important;min-width:8rem;max-width:initial !important;height:auto !important;padding:12px 14px !important;margin:initial !important;margin-bottom:initial !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 !important;font-variant-numeric:tabular-nums;line-height:1.5 !important;color:#00294d !important;cursor:initial !important;background:white !important;background-clip:initial !important;border:1px solid #909599 !important;border-radius:4px !important;box-shadow:initial !important;transition:box-shadow 150ms ease, border 150ms ease !important}.duet-input.is-number.sc-duet-input{padding-right:112px !important}.duet-input.is-date.sc-duet-input{padding-right:64px !important}.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#de2362 !important}.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#e02a0d !important}.has-icon.sc-duet-input .duet-input.sc-duet-input{padding-right:48px !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input{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 !important;border-color:#747475 !important}.duet-input.sc-duet-input::-ms-clear{display:none}.duet-input.sc-duet-input::-webkit-contacts-auto-fill-button{display:none !important}.duet-input.sc-duet-input::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-webkit-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-input.sc-duet-input::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-moz-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfcfd1}.duet-input.sc-duet-input:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:-ms-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfcfd1}.duet-input[disabled].sc-duet-input{color:#00294d !important;cursor:text !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-input .duet-input[disabled].sc-duet-input{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #909599 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #747475 !important}.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus{border-color:#0077b3 !important;outline:0;box-shadow:0 0 0 1px #0077b3 !important;transition:none}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus{border-color:#171c3a !important;box-shadow:0 0 0 1px #171c3a !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#171c3a}.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#0077b3}.duet-input[type=search].sc-duet-input:not(:placeholder-shown):focus+.duet-input-icon.sc-duet-input{display:none}.duet-input.sc-duet-input:not(:focus):not(:hover):invalid{box-shadow:none !important}.duet-input[type=number].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=number].sc-duet-input::-webkit-outer-spin-button,.duet-input[type=time].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=time].sc-duet-input::-webkit-outer-spin-button{display:none;margin:0;-webkit-appearance:none}.duet-input.sc-duet-input::-webkit-search-cancel-button{margin-right:-28px}.duet-input-help.sc-duet-input{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-input-help.sc-duet-input span.sc-duet-input{display:block;margin-top:8px}.duet-theme-turva.sc-duet-input .duet-input-help.sc-duet-input{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#747475}.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#e02a0d}.duet-label-hidden.sc-duet-input duet-label.sc-duet-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-input-relative.sc-duet-input{position:relative;width:100%}";
|
|
6336
7036
|
|
|
6337
7037
|
const icons = {
|
|
6338
7038
|
search: formSearch,
|
|
6339
7039
|
email: formEmail,
|
|
6340
7040
|
};
|
|
6341
|
-
let DuetInput$1 = class extends
|
|
7041
|
+
let DuetInput$1 = class extends H {
|
|
6342
7042
|
constructor() {
|
|
6343
7043
|
super();
|
|
6344
7044
|
this.__registerHost();
|
|
@@ -6473,7 +7173,7 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6473
7173
|
// (in webkit based browsers settings value trigger cursor position and will set it to EndOfText)
|
|
6474
7174
|
restoreCursor();
|
|
6475
7175
|
}
|
|
6476
|
-
this.isCaptionVisible = !!
|
|
7176
|
+
this.isCaptionVisible = !!this.caption;
|
|
6477
7177
|
const emitEvent = () => this.duetChange.emit({
|
|
6478
7178
|
value: this.value,
|
|
6479
7179
|
component: "duet-input",
|
|
@@ -6492,7 +7192,7 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6492
7192
|
componentWillLoad() {
|
|
6493
7193
|
inheritGlobalTheme(this);
|
|
6494
7194
|
this.disallowedPatternChange();
|
|
6495
|
-
this.isCaptionVisible = !!
|
|
7195
|
+
this.isCaptionVisible = !!this.caption;
|
|
6496
7196
|
}
|
|
6497
7197
|
/**
|
|
6498
7198
|
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
@@ -6527,12 +7227,12 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6527
7227
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
6528
7228
|
"has-icon": !!this.icon || (this.type !== "text" && this.type !== "tel" && this.type !== "password"),
|
|
6529
7229
|
"has-error": !!this.error,
|
|
6530
|
-
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId,
|
|
7230
|
+
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h$1("div", { class: "duet-input-relative" }, this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-input-placeholder", margin: "none", size: "small" }, this.placeholder)), h$1("input", Object.assign({ ref: input => (this.nativeInput = input), onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, type: this.type, class: {
|
|
6531
7231
|
"duet-input": true,
|
|
6532
7232
|
disabled: this.disabled,
|
|
6533
7233
|
"is-number": this.component === "number",
|
|
6534
7234
|
"is-date": this.component === "date",
|
|
6535
|
-
}, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.autoComplete, required: this.required, role: this.role, name: this.name, id: identifier }, inputProps)), !this.icon && this.type !== "text" && this.type !== "tel" && this.type !== "password" && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), h$1("slot", null)), h$1("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span",
|
|
7235
|
+
}, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.autoComplete, required: this.required, role: this.role, name: this.name, id: identifier }, inputProps)), !this.icon && this.type !== "text" && this.type !== "tel" && this.type !== "password" && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), h$1("slot", null)), h$1("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", { class: "duet-input-error" }, this.error)))));
|
|
6536
7236
|
}
|
|
6537
7237
|
get element() { return this; }
|
|
6538
7238
|
static get watchers() { return {
|
|
@@ -6544,7 +7244,7 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6544
7244
|
|
|
6545
7245
|
const duetLabelCss = "*.sc-duet-label,*.sc-duet-label::after,*.sc-duet-label::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-label-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;line-height:1.25;cursor:default}.duet-p-0.sc-duet-label-h{padding:0 !important}.duet-m-0.sc-duet-label-h{margin:0 !important}.duet-m-0.sc-duet-label-h{margin-bottom:0 !important}.duet-small-margin.sc-duet-label-h{margin-top:8px !important;margin-bottom:4px !important}.duet-has-tooltip.sc-duet-label-h{padding-right:48px}@media (min-width: 48em){.duet-has-tooltip.sc-duet-label-h{padding-right:0}}label.sc-duet-label{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;font-weight:600 !important;line-height:1.25;color:#00294d;text-align:left;word-break:break-word}label.sc-duet-label span.sc-duet-label{font-size:1rem;font-weight:600 !important;word-break:break-word}.duet-label-small.sc-duet-label-h label.sc-duet-label{font-size:0.875rem}.duet-label-small.sc-duet-label-h label.sc-duet-label span.sc-duet-label{font-size:0.875rem}.duet-theme-turva.sc-duet-label-h label.sc-duet-label{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}";
|
|
6546
7246
|
|
|
6547
|
-
let DuetLabel$1 = class extends
|
|
7247
|
+
let DuetLabel$1 = class extends H {
|
|
6548
7248
|
constructor() {
|
|
6549
7249
|
super();
|
|
6550
7250
|
this.__registerHost();
|
|
@@ -6590,7 +7290,7 @@ function isInternetExplorer() {
|
|
|
6590
7290
|
|
|
6591
7291
|
const duetLayoutCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-layout-has-top{margin-top:0}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout.duet-center{display:flex;align-items:center;justify-content:center;width:100%;max-width:888px}@media (min-width: 36em){.duet-layout.duet-center{padding:0 48px}}@media (min-width: 48em){.duet-layout.duet-center{padding:0 72px}}@media (min-width: 62em){.duet-layout.duet-center{width:100%}}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main,.duet-sidebar,.duet-layout-top,.duet-layout-bottom{display:block;width:100%}.duet-layout-top{position:relative;display:block;width:100%;margin:72px auto 0}.duet-layout-top.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout-top .duet-layout-top-wrapper{padding:0 20px;margin:0 auto}@media (min-width: 36em){.duet-layout-top .duet-layout-top-wrapper{padding:0 28px}}@media (min-width: 62em){.duet-layout-top .duet-layout-top-wrapper{padding:0 56px}}@media (min-width: 76.25em){.duet-layout-top .duet-layout-top-wrapper{max-width:1110px;padding:0}}.duet-center .duet-layout-top-wrapper{max-width:888px}@media (min-width: 36em){.duet-center .duet-layout-top-wrapper{padding:0 48px}}@media (min-width: 48em){.duet-center .duet-layout-top-wrapper{padding:0 72px}}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}@media (min-width: 62em){.duet-sidebar{min-width:256px;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container{width:auto;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container.has-tabs{margin-top:89px}}@media (min-width: 62em){.duet-sidebar-container.sticky{position:sticky}.duet-sidebar-container.sticky.with-links{top:calc(3rem + 20px)}.duet-sidebar-container.sticky.without-links{top:calc(4rem + 20px)}}";
|
|
6592
7292
|
|
|
6593
|
-
let DuetLayout$1 = class extends
|
|
7293
|
+
let DuetLayout$1 = class extends H {
|
|
6594
7294
|
constructor() {
|
|
6595
7295
|
super();
|
|
6596
7296
|
this.__registerHost();
|
|
@@ -6667,7 +7367,7 @@ let DuetLayout$1 = class extends HTMLElement {
|
|
|
6667
7367
|
|
|
6668
7368
|
const duetLinkCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline}.duet-link{display:inline;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;border-radius:4px;transition:300ms ease}.duet-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-link:focus,.duet-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-link.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}.duet-link:hover{color:#004d80;text-decoration:none}.duet-link:hover.duet-theme-turva{color:#940925}.duet-link:active{opacity:0.75;transition:none}.duet-link-external{margin-left:4px}";
|
|
6669
7369
|
|
|
6670
|
-
let DuetLink$1 = class extends
|
|
7370
|
+
let DuetLink$1 = class extends H {
|
|
6671
7371
|
constructor() {
|
|
6672
7372
|
super();
|
|
6673
7373
|
this.__registerHost();
|
|
@@ -6724,7 +7424,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6724
7424
|
"duet-link": true,
|
|
6725
7425
|
"duet-link-is-external": this.external,
|
|
6726
7426
|
"duet-theme-turva": this.theme === "turva",
|
|
6727
|
-
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el) }, h$1("slot", null), this.external && (h$1(Fragment, null, h$1("duet-visually-hidden", null, this.accessibleLabelExternal), h$1("span", { class: "duet-link-external" }, h$1("duet-icon", { icon: actionNewWindowSmall.svg, size: "xx-small", margin: "none", color: "currentColor" })))))));
|
|
7427
|
+
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el), part: "duet-link" }, h$1("slot", null), this.external && (h$1(Fragment, null, h$1("duet-visually-hidden", null, this.accessibleLabelExternal), h$1("span", { class: "duet-link-external" }, h$1("duet-icon", { icon: actionNewWindowSmall.svg, size: "xx-small", margin: "none", color: "currentColor" })))))));
|
|
6728
7428
|
}
|
|
6729
7429
|
static get delegatesFocus() { return true; }
|
|
6730
7430
|
static get style() { return duetLinkCss; }
|
|
@@ -6732,7 +7432,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6732
7432
|
|
|
6733
7433
|
const duetListCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-list-component{margin-bottom:16px !important;width:100%}.duet-list-component.duet-p-0{padding:0 !important}.duet-list-component.duet-m-0{margin:0 !important}";
|
|
6734
7434
|
|
|
6735
|
-
let DuetList$1 = class extends
|
|
7435
|
+
let DuetList$1 = class extends H {
|
|
6736
7436
|
constructor() {
|
|
6737
7437
|
super();
|
|
6738
7438
|
this.__registerHost();
|
|
@@ -6834,9 +7534,9 @@ let DuetList$1 = class extends HTMLElement {
|
|
|
6834
7534
|
static get style() { return duetListCss; }
|
|
6835
7535
|
};
|
|
6836
7536
|
|
|
6837
|
-
const duetListItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex;flex-flow:row;width:100%;overflow:visible;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;line-height:1.25;color:#00294d}@media (max-width: 35.9375em){:host{flex-wrap:wrap}}:host dt,:host dd{-webkit-hyphens:auto;hyphens:auto;text-align:left;word-break:break-all;word-break:break-word
|
|
7537
|
+
const duetListItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex;flex-flow:row;width:100%;overflow:visible;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;line-height:1.25;color:#00294d}@media (max-width: 35.9375em){:host{flex-wrap:wrap}}:host dt,:host dd{margin-inline-start:0;-webkit-hyphens:auto;hyphens:auto;text-align:left;word-break:break-all;word-break:break-word}@media (max-width: 35.9375em){:host dt,:host dd{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}}:host dt{padding:16px !important;font-weight:600}@media (max-width: 35.9375em){:host dt{padding-bottom:4px !important}}.duet-theme-turva :host dt{font-weight:700}:host dd{padding:16px !important;margin-left:auto;text-align:left}@media (max-width: 35.9375em){:host dd{padding-top:0 !important}}:host(:not(.duet-list-striped)) dt{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){:host(:not(.duet-list-striped)) dt{padding-bottom:4px !important}}:host(:not(.duet-list-striped)) dd{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){:host(:not(.duet-list-striped)) dd{padding-top:0 !important}}:host(.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:#171c3a}:host(.duet-list-striped:nth-child(odd)) dt,:host(.duet-list-striped:nth-child(odd)) dd{background:#f5f8fa}:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dt,:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dd{background:#f5f5f7}:host(.duet-list-width-30) dt{flex-basis:33%}:host(.duet-list-width-30) dd{flex-basis:67%}:host(.duet-list-width-50) dt{flex-basis:47%}:host(.duet-list-width-50) dd{flex-basis:53%}:host(.duet-list-width-70) dt{flex-basis:65%}:host(.duet-list-width-70) dd{flex-basis:35%}:host(.duet-p-0) dt,:host(.duet-p-0) dd{padding-top:0 !important;padding-bottom:4px !important}@media (max-width: 35.9375em){:host(.duet-list-mobile-center) dt,:host(.duet-list-mobile-center) dd{text-align:center}}@media (max-width: 61.9375em){:host(.duet-list-breakpoint-large){flex-wrap:wrap}:host(.duet-list-breakpoint-large) dt,:host(.duet-list-breakpoint-large) dd{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}:host(.duet-list-breakpoint-large) dd{padding-top:0 !important}}:host(.duet-list-breakpoint-large.duet-list-striped) dd{padding-bottom:16px !important}@media (max-width: 61.9375em){:host(.duet-list-breakpoint-large.duet-list-mobile-center) dt,:host(.duet-list-breakpoint-large.duet-list-mobile-center) dd{text-align:center !important}}";
|
|
6838
7538
|
|
|
6839
|
-
let DuetListItem$1 = class extends
|
|
7539
|
+
let DuetListItem$1 = class extends H {
|
|
6840
7540
|
constructor() {
|
|
6841
7541
|
super();
|
|
6842
7542
|
this.__registerHost();
|
|
@@ -6881,7 +7581,7 @@ const DefaultLogo = ({ inverse, logoId, language }) => {
|
|
|
6881
7581
|
const { title, path, viewBox } = i18n[language];
|
|
6882
7582
|
return (h$1("svg", { role: "img", xmlns: "http://www.w3.org/2000/svg", fill: logoColor, "aria-labelledby": logoId, viewBox: viewBox }, h$1("title", { id: logoId }, title), h$1("path", { d: path })));
|
|
6883
7583
|
};
|
|
6884
|
-
let DuetLogo$1 = class extends
|
|
7584
|
+
let DuetLogo$1 = class extends H {
|
|
6885
7585
|
constructor() {
|
|
6886
7586
|
super();
|
|
6887
7587
|
this.__registerHost();
|
|
@@ -6956,7 +7656,7 @@ const duetModalCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margi
|
|
|
6956
7656
|
// iOS has otherwise problems moving the focus from modal back to the original element.
|
|
6957
7657
|
// This issue is similar to what we’ve seen in Duet Date Picker + iOS VoiceOver.
|
|
6958
7658
|
const TRANSITION_MS = 600;
|
|
6959
|
-
let DuetModal$1 = class extends
|
|
7659
|
+
let DuetModal$1 = class extends H {
|
|
6960
7660
|
constructor() {
|
|
6961
7661
|
super();
|
|
6962
7662
|
this.__registerHost();
|
|
@@ -7179,7 +7879,7 @@ let DuetModal$1 = class extends HTMLElement {
|
|
|
7179
7879
|
|
|
7180
7880
|
const duetNotificationCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-notification{display:block;padding:16px;color:#00294d;cursor:pointer;border-bottom:1px solid #e1e3e6;transition:300ms ease}:host(:last-of-type) .duet-notification{border-bottom:0}.duet-notification.duet-theme-turva{color:#171c3a;border-bottom-color:#e4e4e6}.duet-notification.duet-notification-highlight{font-weight:600;background:#f3f9fc}.duet-notification.duet-notification-highlight.duet-theme-turva{background:#fcf3f4}@media (min-width: 62em){.duet-notification:hover{background:#f3f9fc}.duet-notification:hover.duet-theme-turva{background:#fcf3f4}}.duet-notification a{text-decoration:none}.duet-notification a:focus{outline:0}:host(.user-is-tabbing) .duet-notification:focus-within{z-index:1;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-notification:focus-within.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-notification-container{position:relative;display:flex}.duet-notification-badge-container{position:relative;width:16px}.duet-notification-badge{position:absolute;top:6px;left:-2px;width:8px;height:8px;background:#0077b3;border-radius:50%}.duet-theme-turva .duet-notification-badge{background:#c60c30}.duet-notification-content{flex:1}.duet-notification-date{position:absolute;top:2px;right:0;width:96px;font-size:0.75rem;font-weight:600;line-height:1.25;color:#657787;text-align:right;text-transform:uppercase}@media (max-width: 35.9375em){.duet-notification-date{width:auto}}.duet-theme-turva .duet-notification-date{color:#444445}::slotted(duet-heading){padding-right:80px !important}::slotted(duet-paragraph){margin-bottom:2px !important}";
|
|
7181
7881
|
|
|
7182
|
-
let DuetNotification$1 = class extends
|
|
7882
|
+
let DuetNotification$1 = class extends H {
|
|
7183
7883
|
constructor() {
|
|
7184
7884
|
super();
|
|
7185
7885
|
this.__registerHost();
|
|
@@ -7251,10 +7951,10 @@ let DuetNotification$1 = class extends HTMLElement {
|
|
|
7251
7951
|
static get style() { return duetNotificationCss; }
|
|
7252
7952
|
};
|
|
7253
7953
|
|
|
7254
|
-
const duetNotificationDrawerCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-drawer{position:relative}@media (min-width: 62em){.duet-drawer{display:inline-block}}.duet-drawer-toggle{position:relative;display:flex;align-items:center;width:100%;height:48px;padding:0 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:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:48px;color:#00294d;text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-bottom:1px solid #e1e3e6;border-radius:0;-webkit-appearance:none;appearance:none}@media (min-width: 62em){.duet-drawer-toggle{z-index:200;width:auto;max-width:200px;padding:0 30px 0 12px;overflow:hidden;font-size:0.875rem;line-height:4rem;
|
|
7954
|
+
const duetNotificationDrawerCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-drawer{position:relative}@media (min-width: 62em){.duet-drawer{display:inline-block}}.duet-drawer-toggle{position:relative;display:flex;align-items:center;width:100%;height:48px;padding:0 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:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:48px;color:#00294d;text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background-color:white;border-bottom:1px solid #e1e3e6;border-radius:0;-webkit-appearance:none;appearance:none}@media (min-width: 62em){.duet-drawer-toggle{z-index:200;width:auto;max-width:200px;padding:0 30px 0 12px;overflow:hidden;font-size:0.875rem;line-height:4rem;border:0;border-radius:4px;transition:border 300ms ease}}.duet-theme-turva .duet-drawer-toggle{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-color:white;border-color:#e4e4e6}.duet-drawer-toggle:active{opacity:0.75}.duet-drawer-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-drawer-toggle:focus{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-drawer-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-drawer-toggle:hover{color:#004d80}.duet-theme-turva .duet-drawer-toggle:hover{color:#444445}.duet-drawer-toggle::after{display:none !important}@media (min-width: 62em){.duet-drawer-toggle::after{position:absolute;top:auto;bottom:0;left:0;display:block !important;width:100%;height:3px;content:\"\";background:#0077b3;transition:300ms ease;transform:translateY(3px)}.duet-theme-turva .duet-drawer-toggle::after{background:#c60c30}}.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{color:#004d80;border-bottom:1px solid #f5f8fa;border-radius:0}.duet-theme-turva .duet-drawer-toggle[aria-expanded=true],.duet-theme-turva .duet-drawer-toggle[aria-expanded=true]:hover{color:#444445;border-color:#f5f5f7}@media (min-width: 62em){.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{border:0}.duet-drawer-toggle[aria-expanded=true]::after,.duet-drawer-toggle[aria-expanded=true]:hover::after{left:0;width:100%;transform:translateY(0)}}.duet-drawer-icon{position:relative;display:inline-flex;min-width:12px;margin-right:12px;font-size:0;line-height:normal;vertical-align:baseline}@media (min-width: 62em){.duet-drawer-icon{margin-right:8px}}.duet-drawer-label{line-height:1}.duet-drawer-caret{position:absolute;top:50%;right:20px;display:flex;width:10px;height:10px;margin-left:8px;line-height:normal;pointer-events:none;transition:300ms ease;transform:translateY(-50%);transform-origin:50% 50%}@media (min-width: 62em){.duet-drawer-caret{right:16px;width:7px;height:7px}}.duet-drawer-caret duet-icon{width:10px}.duet-drawer-toggle[aria-expanded=true] .duet-drawer-caret{transform:translateY(-50%) rotate(180deg)}.duet-drawer-badge{position:absolute;top:0;right:0;display:inline-block;width:6px;height:6px;background:#f7b228;border-radius:50%;box-shadow:0 0 0 1px #c18b1f}.duet-theme-turva .duet-drawer-badge{background:#faa40f}.duet-drawer-content{display:none;background-color:white;border-bottom:1px solid #e1e3e6}.duet-drawer-content:focus{outline:0}.duet-theme-turva .duet-drawer-content{background-color:white;border-color:#e1e3e6}@media (min-width: 62em){.duet-drawer-content{position:absolute;top:100%;z-index:600;display:block;width:450px;max-height:420px;padding-left:0;overflow-y:auto;visibility:hidden;background-color:white;border:1px solid #e1e3e6;border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:300ms ease;transform:scale(0.95) translateZ(0) translateY(-10px);transform-origin:50% 0;scrollbar-width:none}.duet-drawer-content::-webkit-scrollbar{display:none}.duet-theme-turva .duet-drawer-content{background-color:white}.duet-drawer-content.duet-drawer-left{right:0}.duet-drawer-content.duet-drawer-right{left:0}}.duet-drawer-content.duet-drawer-open{display:block}@media (min-width: 62em){.duet-drawer-content.duet-drawer-open{visibility:visible;opacity:1;transform:scale(1) translateZ(0) translateY(0)}}";
|
|
7255
7955
|
|
|
7256
7956
|
const ESC_KEY = 27;
|
|
7257
|
-
let DuetNotificationDrawer$1 = class extends
|
|
7957
|
+
let DuetNotificationDrawer$1 = class extends H {
|
|
7258
7958
|
constructor() {
|
|
7259
7959
|
super();
|
|
7260
7960
|
this.__registerHost();
|
|
@@ -7418,7 +8118,7 @@ const clamp = (val, min, max) => Math.min(Math.max(val, min), max);
|
|
|
7418
8118
|
|
|
7419
8119
|
const duetNumberInputCss = "*.sc-duet-number-input,*.sc-duet-number-input::after,*.sc-duet-number-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-number-input-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%;min-width:calc(33.333% - 8px);max-width:100%;line-height:1.25;text-align:left;vertical-align:bottom}.sc-duet-number-input-h:last-child,.sc-duet-number-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-number-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-number-input-h{width:100% !important}.duet-m-0.sc-duet-number-input-h{margin:0 !important}.duet-number-container.sc-duet-number-input{position:relative;width:100%}.duet-number-buttons.sc-duet-number-input{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;width:96px;height:calc(100% - 2px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50%;height:100%;text-align:center;cursor:pointer;background:transparent;-webkit-appearance:none;appearance:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled{pointer-events:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input duet-icon.sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled duet-icon.sc-duet-number-input{opacity:0.4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:active duet-icon.sc-duet-number-input{transform:translateY(1px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{outline:0}.user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{z-index:2;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{box-shadow:0 0 0 2px #171c3a}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type{border-left:1px solid #cfd2d4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::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-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{position:absolute;top:20%;left:0;width:1px;height:60%;content:\"\";background:#e1e3e6}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{background:linear-gradient(to left, rgba(207, 207, 209, 0.2) 0%, rgba(207, 207, 209, 0.2) 1px, rgba(207, 207, 209, 0.1) 1px, rgba(207, 207, 209, 0) 100%)}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{background:#e4e4e6}";
|
|
7420
8120
|
|
|
7421
|
-
let DuetNumberInput$1 = class extends
|
|
8121
|
+
let DuetNumberInput$1 = class extends H {
|
|
7422
8122
|
constructor() {
|
|
7423
8123
|
super();
|
|
7424
8124
|
this.__registerHost();
|
|
@@ -7747,15 +8447,15 @@ let DuetNumberInput$1 = class extends HTMLElement {
|
|
|
7747
8447
|
static get style() { return duetNumberInputCss; }
|
|
7748
8448
|
};
|
|
7749
8449
|
|
|
7750
|
-
const duetParagraphCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.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{padding:0 !important}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.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:#171c3a}.duet-paragraph.duet-paragraph-small{font-size:0.875rem}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.intro{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){.duet-paragraph.intro{font-size:1rem}}@media (min-width: 46.2962962963rem){.duet-paragraph.intro{font-size:1.25rem}}.duet-paragraph.intro.duet-m-0{margin:0 !important}::slotted(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{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{color:#004d80;text-decoration:none}::slotted(a):hover.duet-theme-turva{color:#940925}::slotted(a):active{opacity:0.75;transition:none}";
|
|
8450
|
+
const duetParagraphCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.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{padding:0 !important}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.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:#171c3a}.duet-paragraph.duet-paragraph-small{font-size:0.875rem}.duet-paragraph.duet-paragraph-semi-bold{font-weight:600}.duet-paragraph.duet-paragraph-bold{font-weight:700}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.intro{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){.duet-paragraph.intro{font-size:1rem}}@media (min-width: 46.2962962963rem){.duet-paragraph.intro{font-size:1.25rem}}.duet-paragraph.intro.duet-m-0{margin:0 !important}::slotted(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{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{color:#004d80;text-decoration:none}::slotted(a):hover.duet-theme-turva{color:#940925}::slotted(a):active{opacity:0.75;transition:none}";
|
|
7751
8451
|
|
|
7752
|
-
let DuetParagraph$1 = class extends
|
|
8452
|
+
let DuetParagraph$1 = class extends H {
|
|
7753
8453
|
constructor() {
|
|
7754
8454
|
super();
|
|
7755
8455
|
this.__registerHost();
|
|
7756
8456
|
this.__attachShadow();
|
|
7757
8457
|
/**
|
|
7758
|
-
* Theme of the
|
|
8458
|
+
* Theme of the paragraph.
|
|
7759
8459
|
*/
|
|
7760
8460
|
this.theme = "";
|
|
7761
8461
|
/**
|
|
@@ -7766,6 +8466,10 @@ let DuetParagraph$1 = class extends HTMLElement {
|
|
|
7766
8466
|
* Controls the size of the paragraph.
|
|
7767
8467
|
*/
|
|
7768
8468
|
this.size = "medium";
|
|
8469
|
+
/**
|
|
8470
|
+
* Controls the Font-Weight of the paragraph.
|
|
8471
|
+
*/
|
|
8472
|
+
this.weight = undefined;
|
|
7769
8473
|
/**
|
|
7770
8474
|
* Style variation of the paragraph.
|
|
7771
8475
|
*/
|
|
@@ -7791,18 +8495,82 @@ let DuetParagraph$1 = class extends HTMLElement {
|
|
|
7791
8495
|
return (h$1("p", { class: {
|
|
7792
8496
|
"duet-paragraph": true,
|
|
7793
8497
|
"duet-paragraph-small": this.size === "small",
|
|
8498
|
+
"duet-paragraph-semi-bold": this.weight === "semi-bold",
|
|
8499
|
+
"duet-paragraph-bold": this.weight === "bold",
|
|
7794
8500
|
"duet-m-0": this.margin === "none",
|
|
7795
8501
|
[this.variation]: true,
|
|
7796
8502
|
"duet-theme-turva": this.theme === "turva",
|
|
7797
|
-
}, style: { color } }, h$1("slot", null)));
|
|
8503
|
+
}, style: { color }, part: "duet-paragraph" }, h$1("slot", null)));
|
|
7798
8504
|
}
|
|
7799
8505
|
get element() { return this; }
|
|
7800
8506
|
static get style() { return duetParagraphCss; }
|
|
7801
8507
|
};
|
|
7802
8508
|
|
|
8509
|
+
const duetProgressCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:inherit}.duet-progress{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;min-height:1px;}.duet-progress .progress-bar{position:relative;display:block;width:100%;height:inherit;min-height:1px;background-color:#f3f9fc;border-radius:0;box-shadow:none}.duet-theme-turva .duet-progress .progress-bar{background-color:#fcf3f4}.duet-progress .progress-bar>span{display:block;height:inherit;text-indent:-9999px;background-color:#0077b3;border-radius:0}.duet-theme-turva .duet-progress .progress-bar>span{background-color:#c60c30}.duet-progress progress[value]{display:flex;width:100%;height:inherit;min-height:1px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-theme-turva .duet-progress progress[value]{color:#c60c30}.duet-progress progress[value]::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-bar{background-color:#fcf3f4}.duet-progress progress[value]::-webkit-progress-value{background-color:#0077b3;background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-value{background-color:#c60c30}.duet-progress progress[value] ::-moz-progress-bar{background-color:#f3f9fc}.duet-theme-turva .duet-progress progress[value] ::-moz-progress-bar{background-color:#fcf3f4}";
|
|
8510
|
+
|
|
8511
|
+
let DuetProgress$1 = class extends H {
|
|
8512
|
+
constructor() {
|
|
8513
|
+
super();
|
|
8514
|
+
this.__registerHost();
|
|
8515
|
+
/**
|
|
8516
|
+
* Own Properties
|
|
8517
|
+
*/
|
|
8518
|
+
this.progressId = createID("DuetProgress");
|
|
8519
|
+
this.progressLabelId = createID("DuetProgressLabel");
|
|
8520
|
+
/**
|
|
8521
|
+
* Defaults for accessibleLabel
|
|
8522
|
+
*/
|
|
8523
|
+
this.accessibleLabelUploadDefaults = {
|
|
8524
|
+
fi: ["lähetys valmis", "lähetys käynnissä"],
|
|
8525
|
+
sv: ["Uppladdningen är klar", "Uppladdning pågår"],
|
|
8526
|
+
en: ["upload completed", "upload in progress"],
|
|
8527
|
+
};
|
|
8528
|
+
/**
|
|
8529
|
+
* Adds accessible label for upload in progress and upload complete states
|
|
8530
|
+
* @default {fi: ["lähetys valmis", "lähetys käynnissä"],sv: ["Uppladdningen är klar", "Uppladdning pågår"], en: ["completed", "in progress"]}
|
|
8531
|
+
*/
|
|
8532
|
+
this.accessibleLabelUpload = getLocaleString(this.accessibleLabelUploadDefaults);
|
|
8533
|
+
/**
|
|
8534
|
+
* Progress of the bar, a value from 0-100
|
|
8535
|
+
*/
|
|
8536
|
+
this.progress = 0;
|
|
8537
|
+
/**
|
|
8538
|
+
* Height of progressbar
|
|
8539
|
+
*/
|
|
8540
|
+
this.height = "10px";
|
|
8541
|
+
/**
|
|
8542
|
+
* Theme of the input.
|
|
8543
|
+
*/
|
|
8544
|
+
this.theme = "";
|
|
8545
|
+
}
|
|
8546
|
+
/**
|
|
8547
|
+
* Component lifecycle events.
|
|
8548
|
+
*/
|
|
8549
|
+
componentWillLoad() {
|
|
8550
|
+
inheritGlobalTheme(this);
|
|
8551
|
+
}
|
|
8552
|
+
/**
|
|
8553
|
+
* render() function
|
|
8554
|
+
* Always the last one in the class.
|
|
8555
|
+
*/
|
|
8556
|
+
render() {
|
|
8557
|
+
return (h$1(Host, null, h$1("div", { "aria-live": this.accessibleLabel ? "polite" : "off", "aria-hidden": this.accessibleLabel ? "false" : "true", "aria-atomic": "true", style: {
|
|
8558
|
+
height: this.height,
|
|
8559
|
+
}, id: this.progressId, class: {
|
|
8560
|
+
"duet-progress": true,
|
|
8561
|
+
"duet-progress-done": this.progress === 100,
|
|
8562
|
+
"duet-progress-start": this.progress === 0,
|
|
8563
|
+
"duet-progress-inprogress": this.progress < 99 && this.progress !== 0,
|
|
8564
|
+
"duet-theme-turva": this.theme === "turva",
|
|
8565
|
+
} }, h$1("duet-visually-hidden", null, h$1("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (h$1("span", null, this.accessibleLabel, ", ", this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))), this.caption && (h$1("div", { class: "duet-progress-caption" }, h$1("span", null, this.caption))), h$1("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" }, h$1("div", { class: "progress-bar" }, h$1("span", { style: { width: `${this.progress}%;` } }, "Progress: ", this.progress, "%"))))));
|
|
8566
|
+
}
|
|
8567
|
+
get element() { return this; }
|
|
8568
|
+
static get style() { return duetProgressCss; }
|
|
8569
|
+
};
|
|
8570
|
+
|
|
7803
8571
|
const duetRadioCss = "*.sc-duet-radio,*.sc-duet-radio::after,*.sc-duet-radio::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-radio-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:28px !important;margin-bottom:12px !important;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-radio-h:last-child,.sc-duet-radio-h:last-of-type{margin-right:0 !important}.vertical.sc-duet-radio-h{margin-right:0 !important}.horizontal.sc-duet-radio-h{margin-bottom:0 !important;width:auto}.horizontal.sc-duet-radio-h .duet-label.sc-duet-radio span.sc-duet-radio{max-width:100%}@media (min-width: 48em){.horizontal-responsive.sc-duet-radio-h{margin-right:28px !important;margin-bottom:0 !important;width:auto}.horizontal-responsive.sc-duet-radio-h:last-child,.horizontal-responsive.sc-duet-radio-h:last-of-type{margin-right:0 !important}.horizontal-responsive.sc-duet-radio-h .duet-label.sc-duet-radio span.sc-duet-radio{max-width:100%}}.duet-m-0.sc-duet-radio-h{margin:0 !important}.sc-duet-radio-h:last-child:not(:only-child){margin-right:0 !important;margin-bottom:0 !important}.duet-label.sc-duet-radio{position:relative;z-index:100;display:flex;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;cursor:pointer;background:transparent}.duet-theme-turva.sc-duet-radio .duet-label.sc-duet-radio{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-label.sc-duet-radio span.sc-duet-radio{flex-grow:1;font-size:1rem}.duet-label-hidden.sc-duet-radio .duet-label.sc-duet-radio{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-radio-container.sc-duet-radio{position:relative;width:100%;height:100%}.duet-radio.sc-duet-radio{padding:14px !important;position:absolute;top:0;left:0;z-index:200;width:100%;height:100%;cursor:pointer;opacity:0}.duet-radio.sc-duet-radio+label.sc-duet-radio::before{z-index:100;flex-shrink:0;width:20px;height:20px;margin:2px 10px 1px 1px;content:\"\";background:white;border:1px solid #00294d;border-radius:50%}.duet-theme-turva.sc-duet-radio .duet-radio.sc-duet-radio+label.sc-duet-radio::before{border-color:#171c3a}.duet-radio.sc-duet-radio:focus+label.sc-duet-radio::before{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva.sc-duet-radio .duet-radio.sc-duet-radio:focus+label.sc-duet-radio::before{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-radio.sc-duet-radio:checked+label.sc-duet-radio::after{position:absolute;top:6px;left:5px;z-index:200;flex-shrink:0;width:12px;height:12px;content:\"\";background:#00294d;border-radius:50%}.duet-theme-turva.sc-duet-radio .duet-radio.sc-duet-radio:checked+label.sc-duet-radio::after{background:#171c3a}.duet-radio[disabled].sc-duet-radio{cursor:default}.duet-radio[disabled].sc-duet-radio+label.sc-duet-radio{color:#657787}.duet-theme-turva.sc-duet-radio .duet-radio[disabled].sc-duet-radio+label.sc-duet-radio{color:#747475}.duet-radio[disabled].sc-duet-radio+label.sc-duet-radio::before{border-color:#cfd2d4}.duet-theme-turva.sc-duet-radio .duet-radio[disabled].sc-duet-radio+label.sc-duet-radio::before{border-color:#cfcfd1}.duet-radio[disabled].sc-duet-radio:checked+label.sc-duet-radio::before{border:1px solid #657787}.duet-radio[disabled].sc-duet-radio:checked+label.sc-duet-radio::after{background:#657787}.duet-theme-turva.sc-duet-radio .duet-radio[disabled].sc-duet-radio:checked+label.sc-duet-radio::after{background:#747475;border-color:#747475}";
|
|
7804
8572
|
|
|
7805
|
-
let DuetRadio$1 = class extends
|
|
8573
|
+
let DuetRadio$1 = class extends H {
|
|
7806
8574
|
constructor() {
|
|
7807
8575
|
super();
|
|
7808
8576
|
this.__registerHost();
|
|
@@ -7909,7 +8677,7 @@ let DuetRadio$1 = class extends HTMLElement {
|
|
|
7909
8677
|
|
|
7910
8678
|
const duetRadioGroupCss = "*.sc-duet-radio-group,*.sc-duet-radio-group::after,*.sc-duet-radio-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-radio-group-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%}.horizontal.sc-duet-radio-group-h .duet-radio-group.sc-duet-radio-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-radio-group-h .duet-radio-group.sc-duet-radio-group{display:flex}}.horizontal.sc-duet-radio-group-h .duet-radio-group.duet-no-stacking.sc-duet-radio-group{display:flex}.deut-radio-group.sc-duet-radio-group{width:100%}";
|
|
7911
8679
|
|
|
7912
|
-
let DuetRadioGroup$1 = class extends
|
|
8680
|
+
let DuetRadioGroup$1 = class extends H {
|
|
7913
8681
|
constructor() {
|
|
7914
8682
|
super();
|
|
7915
8683
|
this.__registerHost();
|
|
@@ -8067,7 +8835,7 @@ const colors = {
|
|
|
8067
8835
|
inactive: colorGray,
|
|
8068
8836
|
},
|
|
8069
8837
|
};
|
|
8070
|
-
let DuetRangeSlider$1 = class extends
|
|
8838
|
+
let DuetRangeSlider$1 = class extends H {
|
|
8071
8839
|
constructor() {
|
|
8072
8840
|
super();
|
|
8073
8841
|
this.__registerHost();
|
|
@@ -8210,7 +8978,7 @@ let DuetRangeSlider$1 = class extends HTMLElement {
|
|
|
8210
8978
|
static get style() { return duetRangeSliderCss; }
|
|
8211
8979
|
};
|
|
8212
8980
|
|
|
8213
|
-
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-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}";
|
|
8981
|
+
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}";
|
|
8214
8982
|
|
|
8215
8983
|
function isOptionGroup(item) {
|
|
8216
8984
|
return "options" in item;
|
|
@@ -8226,7 +8994,7 @@ function findOptionByValue(items, value) {
|
|
|
8226
8994
|
}
|
|
8227
8995
|
}
|
|
8228
8996
|
}
|
|
8229
|
-
let DuetSelect$1 = class extends
|
|
8997
|
+
let DuetSelect$1 = class extends H {
|
|
8230
8998
|
constructor() {
|
|
8231
8999
|
super();
|
|
8232
9000
|
this.__registerHost();
|
|
@@ -8333,14 +9101,14 @@ let DuetSelect$1 = class extends HTMLElement {
|
|
|
8333
9101
|
if (this.nativeSelect) {
|
|
8334
9102
|
this.nativeSelect.value = this.value;
|
|
8335
9103
|
}
|
|
8336
|
-
this.isCaptionVisible = !!
|
|
9104
|
+
this.isCaptionVisible = !!this.caption;
|
|
8337
9105
|
}
|
|
8338
9106
|
/**
|
|
8339
9107
|
* Component lifecycle events.
|
|
8340
9108
|
*/
|
|
8341
9109
|
componentWillLoad() {
|
|
8342
9110
|
inheritGlobalTheme(this);
|
|
8343
|
-
this.isCaptionVisible = !!
|
|
9111
|
+
this.isCaptionVisible = !!this.caption;
|
|
8344
9112
|
this.refresh();
|
|
8345
9113
|
}
|
|
8346
9114
|
/**
|
|
@@ -8383,7 +9151,7 @@ let DuetSelect$1 = class extends HTMLElement {
|
|
|
8383
9151
|
"duet-theme-turva": this.theme === "turva",
|
|
8384
9152
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
8385
9153
|
"has-error": !!this.error,
|
|
8386
|
-
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), h$1("
|
|
9154
|
+
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h$1("div", { class: "duet-select-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-select-placeholder", size: "small" }, this.placeholder)), h$1("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 && (h$1("option", { disabled: true, selected: true, value: "" }, this.placeholder)), !this.processedItems ? (h$1("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
|
|
8387
9155
|
return isOptionGroup(item) ? this.renderOptionGroup(item) : this.renderOption(item);
|
|
8388
9156
|
}))), h$1("div", { class: "duet-select", "aria-hidden": "true" }, h$1("span", { key: this.value }, this.getSelectedItemLabel()), h$1("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h$1("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" })))), h$1("span", { class: "duet-select-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", null, this.error)))));
|
|
8389
9157
|
}
|
|
@@ -8397,7 +9165,7 @@ let DuetSelect$1 = class extends HTMLElement {
|
|
|
8397
9165
|
|
|
8398
9166
|
const duetSpacerCss = ":host{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:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";
|
|
8399
9167
|
|
|
8400
|
-
let DuetSpacer$1 = class extends
|
|
9168
|
+
let DuetSpacer$1 = class extends H {
|
|
8401
9169
|
constructor() {
|
|
8402
9170
|
super();
|
|
8403
9171
|
this.__registerHost();
|
|
@@ -8439,7 +9207,7 @@ let DuetSpacer$1 = class extends HTMLElement {
|
|
|
8439
9207
|
|
|
8440
9208
|
const duetSpinnerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute;top:50%;left:50%;z-index:800;max-width:100%}:host(.duet-theme-default) .duet-spinner{color:#0077b3 !important}:host(.duet-theme-turva) .duet-spinner{color:#c60c30 !important}:host(.duet-custom-color){color:inherit}*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-spinner{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:800;width:24px;height:24px;color:#0077b3;border:2px solid transparent;border-left:2px solid currentColor;border-radius:50%;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%;animation:duetRotate 0.6s linear infinite}.duet-spinner::after{position:absolute;top:50%;left:50%;z-index:200;box-sizing:content-box;width:100%;height:100%;overflow:hidden;content:\"\";border:2px solid currentColor;border-radius:50%;opacity:0.3;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%}.duet-spinner.medium{width:36px;height:36px;border-width:4px}.duet-spinner.medium::after{border-width:4px}.duet-spinner.large{width:72px;height:72px;border-width:8px}.duet-spinner.large::after{border-width:8px}@keyframes duetRotate{0%{transform:translateZ(0) rotate(0deg) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}";
|
|
8441
9209
|
|
|
8442
|
-
let DuetSpinner$1 = class extends
|
|
9210
|
+
let DuetSpinner$1 = class extends H {
|
|
8443
9211
|
constructor() {
|
|
8444
9212
|
super();
|
|
8445
9213
|
this.__registerHost();
|
|
@@ -8490,7 +9258,7 @@ var actionEdit2={"title":"action-edit-2","tags":"action edit 2 pen pencil","svg"
|
|
|
8490
9258
|
|
|
8491
9259
|
const duetStepCss = "*.sc-duet-step,*.sc-duet-step::after,*.sc-duet-step::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-step-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block}.duet-step.sc-duet-step{padding:20px !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:600;background:white;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-step.duet-theme-turva.sc-duet-step{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";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)}.duet-step.rounded-top.sc-duet-step{border-top-left-radius:4px;border-top-right-radius:4px}.duet-step.rounded-bottom.sc-duet-step{margin-bottom:20px !important;border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){.duet-step.rounded-bottom.sc-duet-step{margin-bottom:0 !important}}@media (min-width: 36em){.duet-step.sc-duet-step{padding:0 20px 0 0 !important;margin:0 !important;font-size:1.25rem;box-shadow:none !important}}.duet-step-heading.sc-duet-step{display:flex;align-items:center;border-radius:4px}.duet-step-heading[aria-disabled=false].sc-duet-step{cursor:pointer}.duet-step-heading.sc-duet-step:focus{outline:0}.duet-step-heading.sc-duet-step:active{opacity:0.75}.user-is-tabbing.sc-duet-step-h .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.sc-duet-step-h .duet-theme-turva.sc-duet-step .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#005f8f}.duet-theme-turva.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#9e0a26}.is-current.sc-duet-step .duet-step-heading.sc-duet-step{margin-bottom:20px}@media (min-width: 36em){.duet-step-heading.sc-duet-step{margin-top:8px;margin-bottom:8px !important}.sc-duet-step-h:first-of-type .duet-step-heading.sc-duet-step{margin-top:0}.sc-duet-step-h:last-of-type .duet-step-heading.sc-duet-step{margin-bottom:0 !important}}.duet-step-counter.sc-duet-step{-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;line-height:30px;color:white;text-align:center;border-radius:50%;transition:background-color 300ms ease}@media (min-width: 36em){.duet-step-counter.sc-duet-step{width:40px;height:40px;line-height:40px}}.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#0077b3}.duet-theme-turva.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#c60c30}.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#657787}.duet-theme-turva.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#747475}.duet-step-icon.sc-duet-step{display:flex;align-items:center;justify-content:center;width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step{width:20px;height:20px}}.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:20px;height:20px}}@media (min-width: 36em){.duet-step-content-wrapper.sc-duet-step{min-height:20px;padding-left:40px;margin-left:19px;border-left:2px solid #e1e3e6}.duet-theme-turva.sc-duet-step .duet-step-content-wrapper.sc-duet-step{border-color:#e4e4e6}.sc-duet-step-h:last-of-type .duet-step-content-wrapper.sc-duet-step{min-height:0;border:transparent}}.duet-step-content.sc-duet-step{display:none;padding-bottom:16px}@media (min-width: 36em){.duet-step-content.sc-duet-step{padding-bottom:28px}}.is-current.sc-duet-step .duet-step-content.sc-duet-step{display:block}.duet-step-heading-slot.sc-duet-step{display:none;margin-top:2px}@media (min-width: 48em){.duet-step-heading-slot.sc-duet-step{display:block}}";
|
|
8492
9260
|
|
|
8493
|
-
let DuetStep$1 = class extends
|
|
9261
|
+
let DuetStep$1 = class extends H {
|
|
8494
9262
|
constructor() {
|
|
8495
9263
|
super();
|
|
8496
9264
|
this.__registerHost();
|
|
@@ -8598,7 +9366,7 @@ function groupBy(prop, items) {
|
|
|
8598
9366
|
|
|
8599
9367
|
const duetStepperCss = ":host{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;width:100%}:host(.duet-m-0){margin:0 !important}.duet-stepper{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-stepper{padding:28px !important;padding-top:36px !important;padding-bottom:36px !important;background:white;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)}}";
|
|
8600
9368
|
|
|
8601
|
-
let DuetStepper$1 = class extends
|
|
9369
|
+
let DuetStepper$1 = class extends H {
|
|
8602
9370
|
constructor() {
|
|
8603
9371
|
super();
|
|
8604
9372
|
this.__registerHost();
|
|
@@ -8715,7 +9483,7 @@ let DuetStepper$1 = class extends HTMLElement {
|
|
|
8715
9483
|
|
|
8716
9484
|
const duetTabCss = ".sc-duet-tab-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%}.duet-tab.sc-duet-tab{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:none;width:100%}.duet-tab.selected.sc-duet-tab{display:block}";
|
|
8717
9485
|
|
|
8718
|
-
let DuetTab$1 = class extends
|
|
9486
|
+
let DuetTab$1 = class extends H {
|
|
8719
9487
|
constructor() {
|
|
8720
9488
|
super();
|
|
8721
9489
|
this.__registerHost();
|
|
@@ -8732,9 +9500,9 @@ let DuetTab$1 = class extends HTMLElement {
|
|
|
8732
9500
|
static get style() { return duetTabCss; }
|
|
8733
9501
|
};
|
|
8734
9502
|
|
|
8735
|
-
const duetTabGroupCss = "*.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}.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.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.sc-duet-tab-group{margin:0 !important}.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:none}@media (min-width: 36em){.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:block}}.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.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom-color:#e4e4e6 !important}@media (min-width: 36em){duet-select.sc-duet-tab-group{display:none !important}}.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 !important;text-align:left;text-decoration:none;cursor:pointer;background:white;border:2px solid #e1e3e6;border-style:solid;border-radius:0;transition:150ms ease}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}.duet-tab-button.duet-m-0.sc-duet-tab-group{margin:0 !important}.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 !important;border-color:#e4e4e6}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}@media (min-width: 36em){.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.sc-duet-tab-group:hover{z-index:200;border-color:#909599}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:hover{border-color:#747475 !important}.duet-tab-button.sc-duet-tab-group:active{opacity:0.75;transition:none}.duet-tab-button.selected.sc-duet-tab-group{z-index:201;color:white !important;background:#00294d;border-color:#00294d;outline:0;box-shadow:none !important}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:white !important;background-color:#
|
|
9503
|
+
const duetTabGroupCss = "*.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}.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.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.sc-duet-tab-group{margin:0 !important}.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:none}@media (min-width: 36em){.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:block}}.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.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom-color:#e4e4e6 !important}@media (min-width: 36em){duet-select.sc-duet-tab-group{display:none !important}}.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 !important;text-align:left;text-decoration:none;cursor:pointer;background:white;border:2px solid #e1e3e6;border-style:solid;border-radius:0;transition:150ms ease}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}.duet-tab-button.duet-m-0.sc-duet-tab-group{margin:0 !important}.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 !important;border-color:#e4e4e6}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}@media (min-width: 36em){.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.sc-duet-tab-group:hover{z-index:200;border-color:#909599}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:hover{border-color:#747475 !important}.duet-tab-button.sc-duet-tab-group:active{opacity:0.75;transition:none}.duet-tab-button.selected.sc-duet-tab-group{z-index:201;color:white !important;background:#00294d;border-color:#00294d;outline:0;box-shadow:none !important}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:white !important;background-color:#171c3a;border-color:#171c3a !important}.duet-tab-button.sc-duet-tab-group:focus{z-index:200;outline:0}.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}.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.sc-duet-tab-group:first-child{border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.duet-tab-button.sc-duet-tab-group:first-child{border-top-right-radius:0;border-bottom-left-radius:4px}}.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.sc-duet-tab-group:last-child{border-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}}.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.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.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#0077b3 !important;background:white;border-bottom:3px solid #0077b3}.duet-theme-turva.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#c60c30 !important;border-bottom-color:#c60c30 !important}.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.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}";
|
|
8736
9504
|
|
|
8737
|
-
let DuetTabGroup$1 = class extends
|
|
9505
|
+
let DuetTabGroup$1 = class extends H {
|
|
8738
9506
|
constructor() {
|
|
8739
9507
|
super();
|
|
8740
9508
|
this.__registerHost();
|
|
@@ -8912,7 +9680,7 @@ let DuetTabGroup$1 = class extends HTMLElement {
|
|
|
8912
9680
|
static get style() { return duetTabGroupCss; }
|
|
8913
9681
|
};
|
|
8914
9682
|
|
|
8915
|
-
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-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.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-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-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.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-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.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-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)}";
|
|
9683
|
+
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-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}";
|
|
8916
9684
|
|
|
8917
9685
|
// remove wrapping speech marks.
|
|
8918
9686
|
// media query tokens are wrapped in speech marks,
|
|
@@ -8933,7 +9701,7 @@ const stickyTopValues = {
|
|
|
8933
9701
|
"with-links": parseFloat(sizeNavigation) * 16,
|
|
8934
9702
|
"without-links": parseFloat(sizeHeader) * 16,
|
|
8935
9703
|
};
|
|
8936
|
-
let DuetTable$1 = class extends
|
|
9704
|
+
let DuetTable$1 = class extends H {
|
|
8937
9705
|
constructor() {
|
|
8938
9706
|
super();
|
|
8939
9707
|
this.__registerHost();
|
|
@@ -8973,7 +9741,7 @@ let DuetTable$1 = class extends HTMLElement {
|
|
|
8973
9741
|
}
|
|
8974
9742
|
connectedCallback() {
|
|
8975
9743
|
this.mq = matchMedia(breakpointToToken[this.breakpoint]);
|
|
8976
|
-
this.mq.
|
|
9744
|
+
this.mq.addEventListener("change", this.handleMediaQueryChange);
|
|
8977
9745
|
this.handleMediaQueryChange(this.mq);
|
|
8978
9746
|
this.observer = new MutationObserver(() => this.copyHeadingsToCells());
|
|
8979
9747
|
this.observer.observe(this.element, {
|
|
@@ -9033,7 +9801,7 @@ let DuetTable$1 = class extends HTMLElement {
|
|
|
9033
9801
|
static get style() { return duetTableCss; }
|
|
9034
9802
|
};
|
|
9035
9803
|
|
|
9036
|
-
const duetTextareaCss = "*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-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:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;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.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{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}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{font-size:0.875rem;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}";
|
|
9804
|
+
const duetTextareaCss = "*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-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:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea-wrapper.sc-duet-textarea{position:relative}.duet-textarea-placeholder.sc-duet-textarea{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-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;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.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{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}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{font-size:0.875rem;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}";
|
|
9037
9805
|
|
|
9038
9806
|
const CharacterCount = ({ value, maxlength, label, theme }) => {
|
|
9039
9807
|
if (maxlength == null) {
|
|
@@ -9044,7 +9812,7 @@ const CharacterCount = ({ value, maxlength, label, theme }) => {
|
|
|
9044
9812
|
const isApproachingLimit = remainder / maxlength <= 0.1; // <= 10% chars remaining
|
|
9045
9813
|
return (h$1("div", { class: "duet-character-count" }, h$1("duet-caption", { margin: "none", theme: theme, size: "small" }, h$1("duet-visually-hidden", { "aria-live": "polite", "aria-atomic": "true", class: "duet-textarea-counter-remaining" }, isApproachingLimit && `${remainder} ${label}`), h$1("span", { "aria-hidden": "true" }, length, "/", maxlength))));
|
|
9046
9814
|
};
|
|
9047
|
-
let DuetTextarea$1 = class extends
|
|
9815
|
+
let DuetTextarea$1 = class extends H {
|
|
9048
9816
|
constructor() {
|
|
9049
9817
|
super();
|
|
9050
9818
|
this.__registerHost();
|
|
@@ -9135,7 +9903,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9135
9903
|
cleanValue(this.nativeInput, this.disallowPatternRegex);
|
|
9136
9904
|
}
|
|
9137
9905
|
this.value = this.nativeInput.value;
|
|
9138
|
-
this.isCaptionVisible = !!
|
|
9906
|
+
this.isCaptionVisible = !!this.caption;
|
|
9139
9907
|
this.duetInput.emit({
|
|
9140
9908
|
originalEvent: ev,
|
|
9141
9909
|
value: this.value,
|
|
@@ -9174,7 +9942,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9174
9942
|
componentWillLoad() {
|
|
9175
9943
|
inheritGlobalTheme(this);
|
|
9176
9944
|
this.disallowedPatternChange();
|
|
9177
|
-
this.isCaptionVisible = !!
|
|
9945
|
+
this.isCaptionVisible = !!this.caption;
|
|
9178
9946
|
if (this.counter && this.maxlength == null) {
|
|
9179
9947
|
console.warn("[DUET WARNING]: counter will only take effect if maxlength is set");
|
|
9180
9948
|
}
|
|
@@ -9208,7 +9976,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9208
9976
|
"duet-label-hidden": this.labelHidden,
|
|
9209
9977
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
9210
9978
|
"has-error": !!this.error,
|
|
9211
|
-
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), h$1("textarea", { onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, ref: input => (this.nativeInput = input), class: { "duet-textarea": true, disabled: this.disabled }, value: this.value, disabled: this.disabled, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", required: this.required, minlength: this.minlength, maxlength: this.maxlength, role: this.role, name: this.name, id: identifier }), h$1("duet-grid", { alignment: "stretch" }, h$1("duet-grid-item", { margin: "none", fill: true }, h$1("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", null, this.error))), h$1("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (h$1(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
|
|
9979
|
+
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h$1("div", { class: "duet-textarea-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-textarea-placeholder", size: "small" }, this.placeholder)), h$1("textarea", { onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, ref: input => (this.nativeInput = input), class: { "duet-textarea": true, disabled: this.disabled }, value: this.value, disabled: this.disabled, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", required: this.required, minlength: this.minlength, maxlength: this.maxlength, role: this.role, name: this.name, id: identifier })), h$1("duet-grid", { alignment: "stretch" }, h$1("duet-grid-item", { margin: "none", fill: true }, h$1("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", null, this.error))), h$1("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (h$1(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
|
|
9212
9980
|
}
|
|
9213
9981
|
get element() { return this; }
|
|
9214
9982
|
static get watchers() { return {
|
|
@@ -9219,7 +9987,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9219
9987
|
|
|
9220
9988
|
const duetToggleCss = "*.sc-duet-toggle,*.sc-duet-toggle::after,*.sc-duet-toggle::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-toggle-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;-webkit-user-select:none;user-select:none;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-toggle-h:last-child,.sc-duet-toggle-h:last-of-type{margin-right:0 !important}.duet-m-0.sc-duet-toggle-h{margin:0 !important}duet-label.sc-duet-toggle{display:block !important;width:100% !important}.duet-switch.sc-duet-toggle{position:relative;display:block;width:48px;height:28px}.duet-switch.sc-duet-toggle input.sc-duet-toggle{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-switch.sc-duet-toggle input.sc-duet-toggle:checked+.duet-slider.sc-duet-toggle{background-color:#0077b3;box-shadow:none}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:checked+.duet-slider.sc-duet-toggle{background-color:#c60c30}.duet-switch.sc-duet-toggle input.sc-duet-toggle:checked+.duet-slider.sc-duet-toggle::before{background-color:white;box-shadow:none;transform:translateX(20px)}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled+.duet-slider.sc-duet-toggle{cursor:default}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle{box-shadow:inset 0 0 0 1px #cfd2d4}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle{box-shadow:inset 0 0 0 1px #cfcfd1}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle::before{background:#cfd2d4}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle::before{background:#cfcfd1}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:checked+.duet-slider.sc-duet-toggle{background:#cfd2d4}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:checked+.duet-slider.sc-duet-toggle{background:#cfcfd1}.user-is-tabbing.sc-duet-toggle-h .duet-switch.sc-duet-toggle input.sc-duet-toggle:focus+.duet-slider.sc-duet-toggle{box-shadow:0 0 0 1px white, 0 0 0 3px rgba(0, 119, 179, 0.75)}.user-is-tabbing.sc-duet-toggle-h .duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:focus+.duet-slider.sc-duet-toggle{box-shadow:0 0 0 1px white, 0 0 0 3px #171c3a}.duet-slider.sc-duet-toggle{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer;background-color:white;border-radius:20px;box-shadow:inset 0 0 0 1px #00294d;transition:background-color 300ms ease}.duet-theme-turva.sc-duet-toggle .duet-slider.sc-duet-toggle{box-shadow:inset 0 0 0 1px #171c3a}.duet-slider.sc-duet-toggle::before{position:absolute;bottom:4px;left:4px;width:20px;height:20px;content:\"\";background-color:#00294d;border-radius:50%;transition:300ms ease}.duet-theme-turva.sc-duet-toggle .duet-slider.sc-duet-toggle::before{background-color:#171c3a}";
|
|
9221
9989
|
|
|
9222
|
-
let DuetToggle$1 = class extends
|
|
9990
|
+
let DuetToggle$1 = class extends H {
|
|
9223
9991
|
constructor() {
|
|
9224
9992
|
super();
|
|
9225
9993
|
this.__registerHost();
|
|
@@ -9308,7 +10076,7 @@ let DuetToggle$1 = class extends HTMLElement {
|
|
|
9308
10076
|
|
|
9309
10077
|
const duetTooltipCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;z-index:200;display:inline-flex;width:auto;margin-top:-16px !important;margin-left:-3px !important;-webkit-tap-highlight-color:transparent}.duet-tooltip{position:absolute;right:-21px;bottom:100%;z-index:950;display:block;width:282px;min-height:48px;max-height:340px;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:#00294d;visibility:hidden;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:300ms ease;transform:scale(0.9) translateZ(0) translateY(20px);transform-origin:100% 100%}.duet-tooltip.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:#171c3a;border-color:#e4e4e6;box-shadow:0 2px 10px 0 rgba(117, 117, 117, 0.13)}.duet-tooltip::after{position:absolute;right:22px;bottom:-20px;z-index:200;width:0;height:0;content:\"\";border:10px solid transparent;border-top:10px solid white}.duet-tooltip::before{position:absolute;right:21px;bottom:-22px;z-index:100;width:0;height:0;content:\"\";border:11px solid transparent;border-top:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip::before{border-top:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-down{top:100%;bottom:auto;transform:scale(0.9) translateZ(0) translateY(-20px);transform-origin:100% 0}.duet-tooltip.duet-tooltip-down::after{top:-20px;bottom:auto;border:10px solid transparent;border-bottom:10px solid white}.duet-tooltip.duet-tooltip-down::before{top:-22px;bottom:auto;border:11px solid transparent;border-bottom:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip.duet-tooltip-down::before{border-bottom:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-left{right:-21px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-left::after{right:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-left::before{right:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-right{right:auto !important;left:-9px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-right::after{right:auto !important;left:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-right::before{right:auto !important;left:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label{right:auto !important;left:0;width:282px !important;transform-origin:0 0 !important}.duet-tooltip.duet-tooltip-has-label::after{right:auto !important;left:1px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label::before{right:auto !important;left:0 !important;transform:none !important}.duet-tooltip.duet-tooltip-active{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(-8px)}.duet-tooltip.duet-tooltip-active.duet-tooltip-down{transform:scale(1.0001) translateZ(0) translateY(8px)}.duet-tooltip-button{z-index:100;display:inline-block;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 !important;margin-right:-12px;line-height:normal !important;color:#0077b3;white-space:nowrap;cursor:pointer;background:transparent !important;border-radius:4px}.duet-tooltip-button.duet-theme-turva{color:#c60c30}.duet-tooltip-button:hover{color:#004d80}.duet-tooltip-button:hover.duet-theme-turva{color:#940925}.duet-tooltip-button:focus{background:transparent !important;outline:0}:host(.user-is-tabbing) .duet-tooltip-button:focus{background:transparent !important;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}:host(.user-is-tabbing) .duet-tooltip-button.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tooltip-button svg{width:20px;height:20px;pointer-events:none}.duet-tooltip-button-has-label{margin-right:0}.duet-tooltip-scrollable{padding:20px !important;width:100%;max-height:250px;padding-right:25px !important;overflow-y:auto;-webkit-hyphens:auto;hyphens:auto;border-radius:4px;-webkit-overflow-scrolling:touch}.duet-tooltip-scrollable:focus{outline:none}:host(.user-is-tabbing) .duet-tooltip-scrollable:focus{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-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tooltip-scrollable::-webkit-scrollbar{width:4px}.duet-tooltip-scrollable::-webkit-scrollbar-track{border-radius:4px}.duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e1e3e6;border-radius:4px}.duet-theme-turva .duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e4e4e6}.duet-tooltip-label{position:relative;z-index:100;display:inline-block;max-width:calc(100% - 30px);margin-left:12px !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:600;line-height:1.25;text-align:left;white-space:normal;vertical-align:top}.duet-theme-turva .duet-tooltip-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-tooltip-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0 !important;padding:0 !important;margin:0 !important;line-height:normal;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;-webkit-appearance:none;appearance:none}.duet-tooltip-close:focus{outline:none;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .duet-tooltip-close:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}@media (min-width: 48em){.duet-tooltip.duet-mq-medium{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-medium::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium.duet-tooltip-down{transform-origin:50% 0}}@media (min-width: 62em){.duet-tooltip.duet-mq-large{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-large::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large.duet-tooltip-down{transform-origin:50% 0}}";
|
|
9310
10078
|
|
|
9311
|
-
let DuetTooltip$1 = class extends
|
|
10079
|
+
let DuetTooltip$1 = class extends H {
|
|
9312
10080
|
constructor() {
|
|
9313
10081
|
super();
|
|
9314
10082
|
this.__registerHost();
|
|
@@ -9535,7 +10303,7 @@ let DuetTooltip$1 = class extends HTMLElement {
|
|
|
9535
10303
|
const duetTrayCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-tray{position:fixed;top:4rem;right:0;left:0;z-index:399;display:flex;flex-direction:column;max-height:calc(100% - 8rem);padding:16px 20px 16px 24px;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;visibility:hidden;background:#f3f9fc;border-bottom:1px solid #e1e3e6;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:opacity 600ms ease, visibility 600ms ease, transform 600ms ease;transform:translateY(-4rem)}@media (min-width: 62em){.duet-tray{padding:16px 36px}}@media (min-width: 106.25em){.duet-tray{padding:16px 52px 16px 60px}}.duet-tray:focus{outline:0}:host(.user-is-tabbing) .duet-tray:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-tray.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tray.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:#171c3a;background:#f5f5f7;border-color:#e4e4e6}.duet-tray.duet-tray-is-active{visibility:visible;opacity:1;transform:translateY(0)}.duet-tray.duet-tray-is-hidden{visibility:hidden;opacity:0;transform:translateY(-4rem)}@media (min-width: 62em){.duet-tray.duet-tray-is-responsive{display:none !important}}.duet-tray.duet-tray-is-expandable{padding-right:66px}@media (min-width: 62em){.duet-tray.duet-tray-is-expandable{padding-right:78px}}@media (min-width: 106.25em){.duet-tray.duet-tray-is-expandable{padding-right:94px}}.duet-tray-expandable{position:relative;z-index:100;width:calc(100% + 46px);max-height:0;overflow-y:auto;visibility:hidden;opacity:0;transition:opacity 600ms ease, visibility 600ms ease, max-height 600ms ease;scrollbar-width:none}.duet-tray-expandable::-webkit-scrollbar{display:none}.duet-tray-expandable.active{max-height:500px;visibility:visible;opacity:1}.duet-tray-expandable-content{width:100%;margin-top:16px;border-top:1px solid #e1e3e6}.duet-theme-turva .duet-tray-expandable-content{border-color:#e4e4e6}.duet-tray-button{-webkit-user-select:none;user-select:none;padding:20px !important;position:absolute;top:-2px;right:0;z-index:200;color:#00294d;text-align:center;cursor:pointer;border-radius:4px;transition:transform 300ms ease;-webkit-tap-highlight-color:transparent}@media (min-width: 62em){.duet-tray-button{margin-right:16px}}@media (min-width: 106.25em){.duet-tray-button{margin-right:36px}}.duet-theme-turva .duet-tray-button{color:#171c3a}.duet-tray-button.duet-tray-is-expanded{transform:rotate(-180deg)}.duet-tray-button:focus{outline:0}:host(.user-is-tabbing) .duet-tray-button:focus{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-tray-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tray-button:active{box-shadow:none;opacity:0.75}";
|
|
9536
10304
|
|
|
9537
10305
|
const topOffset = parseFloat(sizeHeader) * 2 * 16; // convert rem -> px
|
|
9538
|
-
let DuetTray$1 = class extends
|
|
10306
|
+
let DuetTray$1 = class extends H {
|
|
9539
10307
|
constructor() {
|
|
9540
10308
|
super();
|
|
9541
10309
|
this.__registerHost();
|
|
@@ -9657,9 +10425,1205 @@ let DuetTray$1 = class extends HTMLElement {
|
|
|
9657
10425
|
static get style() { return duetTrayCss; }
|
|
9658
10426
|
};
|
|
9659
10427
|
|
|
10428
|
+
const errorCodes = [
|
|
10429
|
+
{
|
|
10430
|
+
type: "default",
|
|
10431
|
+
system_message: "unknown error",
|
|
10432
|
+
message: {
|
|
10433
|
+
fi: "Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",
|
|
10434
|
+
sv: "Ett okänt fel uppstod, försök igen.",
|
|
10435
|
+
en: "An unknown error occured, please try again."
|
|
10436
|
+
}
|
|
10437
|
+
},
|
|
10438
|
+
{
|
|
10439
|
+
type: "400",
|
|
10440
|
+
system_message: "Bad Request: The server could not understand the request due to invalid syntax.",
|
|
10441
|
+
message: {
|
|
10442
|
+
fi: "Tiedostoa ei hyväksytty.",
|
|
10443
|
+
sv: "Servern avvisade din fil.",
|
|
10444
|
+
en: "The server rejected your file."
|
|
10445
|
+
}
|
|
10446
|
+
},
|
|
10447
|
+
{
|
|
10448
|
+
type: "401",
|
|
10449
|
+
system_message: "Not Authenticated: The client must authenticate itself to get the requested response...",
|
|
10450
|
+
message: {
|
|
10451
|
+
fi: "Vain kirjautunut käyttäjä voi lähettää tiedostoja.",
|
|
10452
|
+
sv: "Du måste vara inloggad för att ladda upp filer.",
|
|
10453
|
+
en: "You need to be logged in to upload files."
|
|
10454
|
+
}
|
|
10455
|
+
},
|
|
10456
|
+
{
|
|
10457
|
+
type: "403",
|
|
10458
|
+
system_message: "No Access: The client does not have access rights to the content.",
|
|
10459
|
+
message: {
|
|
10460
|
+
fi: "Ei oikeuksia lähettää tiedostoja.",
|
|
10461
|
+
sv: "Du har inte rätt åtkomsträttigheter för att ladda upp filer.",
|
|
10462
|
+
en: "You do not have the correct access rights to upload files."
|
|
10463
|
+
}
|
|
10464
|
+
},
|
|
10465
|
+
{
|
|
10466
|
+
type: "413",
|
|
10467
|
+
system_message: "Payload too large",
|
|
10468
|
+
message: {
|
|
10469
|
+
fi: "Tiedosto oli liian vastaanotettavaksi.",
|
|
10470
|
+
sv: "Filen var för stor för servern att hantera.",
|
|
10471
|
+
en: "The file was to large for the server to handle."
|
|
10472
|
+
}
|
|
10473
|
+
},
|
|
10474
|
+
{
|
|
10475
|
+
type: "415",
|
|
10476
|
+
system_message: "Unsupported media type",
|
|
10477
|
+
message: {
|
|
10478
|
+
fi: "Tiedoston tyyppi oli väärä.",
|
|
10479
|
+
sv: "Servern avvisade filen eftersom den hade fel typ.",
|
|
10480
|
+
en: "The server rejected the file because it had the wrong type."
|
|
10481
|
+
}
|
|
10482
|
+
},
|
|
10483
|
+
{
|
|
10484
|
+
type: "429",
|
|
10485
|
+
system_message: "Too many request from same address",
|
|
10486
|
+
message: {
|
|
10487
|
+
fi: "Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",
|
|
10488
|
+
sv: "Servern har fått många förfrågningar från dig, försök igen senare.",
|
|
10489
|
+
en: "The server has received to many request from you, please try again later."
|
|
10490
|
+
}
|
|
10491
|
+
},
|
|
10492
|
+
{
|
|
10493
|
+
type: "500",
|
|
10494
|
+
system_message: "Internal Server Error",
|
|
10495
|
+
message: {
|
|
10496
|
+
fi: "Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",
|
|
10497
|
+
sv: "Servern rapporterade ett okänt fel och uppladdningen misslyckades.",
|
|
10498
|
+
en: "The server reported an unknown error and the upload failed."
|
|
10499
|
+
}
|
|
10500
|
+
},
|
|
10501
|
+
{
|
|
10502
|
+
type: "duet-upload-100",
|
|
10503
|
+
system_message: "File extension not allowed",
|
|
10504
|
+
message: {
|
|
10505
|
+
fi: "Tiedoston tyyppi ei ole sallittu.",
|
|
10506
|
+
sv: "Du kan inte ladda upp filer av den type.",
|
|
10507
|
+
en: "You cannot upload files with that extension."
|
|
10508
|
+
}
|
|
10509
|
+
},
|
|
10510
|
+
{
|
|
10511
|
+
type: "duet-upload-001",
|
|
10512
|
+
system_message: "File transfer failed",
|
|
10513
|
+
message: {
|
|
10514
|
+
fi: "Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",
|
|
10515
|
+
sv: "Din anslutning till servern avbröts, försök igen.",
|
|
10516
|
+
en: "Your connection to the server was interrupted, try again."
|
|
10517
|
+
}
|
|
10518
|
+
},
|
|
10519
|
+
{
|
|
10520
|
+
type: "duet-upload-101",
|
|
10521
|
+
system_message: "File mimetype not allowed",
|
|
10522
|
+
message: {
|
|
10523
|
+
fi: "Tiedoston tyyppi ei ole sallittu.",
|
|
10524
|
+
sv: "Du kan inte ladda upp filer av den typ.",
|
|
10525
|
+
en: "You cannot upload files of that type."
|
|
10526
|
+
}
|
|
10527
|
+
},
|
|
10528
|
+
{
|
|
10529
|
+
type: "duet-upload-201",
|
|
10530
|
+
system_message: "File is too large",
|
|
10531
|
+
message: {
|
|
10532
|
+
fi: "Tiedosto on liian iso.",
|
|
10533
|
+
sv: "Filen är större än tillåtet.",
|
|
10534
|
+
en: "The file is larger than permitted."
|
|
10535
|
+
}
|
|
10536
|
+
},
|
|
10537
|
+
{
|
|
10538
|
+
type: "duet-upload-202",
|
|
10539
|
+
system_message: "The combined size of all files is too large",
|
|
10540
|
+
message: {
|
|
10541
|
+
fi: "Tiedostojen yhteenlaskettu koko on liian iso.",
|
|
10542
|
+
sv: "Du har nått den maximala kombinerade filstorleken.",
|
|
10543
|
+
en: "You have reached the maximum combined filesize."
|
|
10544
|
+
}
|
|
10545
|
+
},
|
|
10546
|
+
{
|
|
10547
|
+
type: "duet-upload-301",
|
|
10548
|
+
system_message: "The maximum file limit has been reached",
|
|
10549
|
+
message: {
|
|
10550
|
+
fi: "Liitteiden maksimimäärä saavutettu.",
|
|
10551
|
+
sv: "Maximalt antal bilagor har uppnåtts.",
|
|
10552
|
+
en: "Maximum number of attachments reached."
|
|
10553
|
+
}
|
|
10554
|
+
}
|
|
10555
|
+
];
|
|
10556
|
+
|
|
10557
|
+
const getError = (code) => {
|
|
10558
|
+
let error = {
|
|
10559
|
+
type: undefined,
|
|
10560
|
+
system_message: undefined,
|
|
10561
|
+
message: undefined,
|
|
10562
|
+
};
|
|
10563
|
+
error = errorCodes.filter(errorItem => {
|
|
10564
|
+
// the == is intentional we may be comparing numbers to strings - and that is ok here
|
|
10565
|
+
return errorItem.type == code;
|
|
10566
|
+
})[0];
|
|
10567
|
+
if (!error) {
|
|
10568
|
+
error = errorCodes.filter(errorItem => {
|
|
10569
|
+
return errorItem.type === "default";
|
|
10570
|
+
})[0];
|
|
10571
|
+
}
|
|
10572
|
+
return error;
|
|
10573
|
+
};
|
|
10574
|
+
const getI18nError = (errorCode) => {
|
|
10575
|
+
const errorFromJson = getError(errorCode);
|
|
10576
|
+
const i18String = getLocaleString(errorFromJson.message);
|
|
10577
|
+
if (i18String === "" || !i18String) {
|
|
10578
|
+
return errorFromJson.system_message;
|
|
10579
|
+
}
|
|
10580
|
+
else {
|
|
10581
|
+
return i18String;
|
|
10582
|
+
}
|
|
10583
|
+
};
|
|
10584
|
+
|
|
10585
|
+
const ErrorItem = ({ data }) => {
|
|
10586
|
+
const { item, error } = data;
|
|
10587
|
+
const { name } = item;
|
|
10588
|
+
const { type } = error;
|
|
10589
|
+
return (h("span", { class: "duet-upload-item-error", role: "status" },
|
|
10590
|
+
h("duet-paragraph", { class: "duet-upload-item-name", color: "danger", margin: "none", weight: "semi-bold" },
|
|
10591
|
+
h("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
|
|
10592
|
+
" ",
|
|
10593
|
+
name),
|
|
10594
|
+
h("duet-paragraph", { class: "duet-upload-item-error-label", size: "small", margin: "none", color: "danger" }, getI18nError(type))));
|
|
10595
|
+
};
|
|
10596
|
+
|
|
10597
|
+
const ProgressItem = ({ progress, name }) => (h("span", null,
|
|
10598
|
+
h("duet-paragraph", { color: "secondary", margin: "none", size: "small" }, name),
|
|
10599
|
+
h("duet-spacer", { size: "xx-small" }),
|
|
10600
|
+
h("duet-progress", { progress: Math.ceil(progress), "aria-hidden": true })));
|
|
10601
|
+
|
|
10602
|
+
const formatBytes = (bytes, decimals = 2) => {
|
|
10603
|
+
if (bytes === 0) {
|
|
10604
|
+
return "0 Bytes";
|
|
10605
|
+
}
|
|
10606
|
+
const k = 1024;
|
|
10607
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
10608
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
10609
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
10610
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
10611
|
+
};
|
|
10612
|
+
|
|
10613
|
+
const SuccessItem = ({ data, showLinks }) => {
|
|
10614
|
+
const { item, size, uploaded, url, meta } = data;
|
|
10615
|
+
const { name } = item;
|
|
10616
|
+
const ContentName = (h("span", { class: "duet-upload-item-name" },
|
|
10617
|
+
h("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
|
|
10618
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
10619
|
+
name));
|
|
10620
|
+
const SizeText = (h("span", { class: "duet-upload-item-size", style: { fontSize: "14px", fontWeight: "400" } },
|
|
10621
|
+
"(",
|
|
10622
|
+
formatBytes(size),
|
|
10623
|
+
")"));
|
|
10624
|
+
const FilenameLine = uploaded && url && showLinks ? (h("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
|
|
10625
|
+
h("duet-link", { url: url, external: true }, ContentName),
|
|
10626
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
10627
|
+
SizeText)) : (h("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
|
|
10628
|
+
ContentName,
|
|
10629
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
10630
|
+
SizeText));
|
|
10631
|
+
const Badges = meta && meta.badges ? (h("span", null,
|
|
10632
|
+
h("duet-spacer", { size: "xx-small" }),
|
|
10633
|
+
meta.badges.map(badgeText => (h("duet-badge", { color: "primary" }, badgeText))))) : undefined;
|
|
10634
|
+
return (h("span", { class: "duet-upload-item-success" },
|
|
10635
|
+
h("div", null, FilenameLine),
|
|
10636
|
+
Badges));
|
|
10637
|
+
};
|
|
10638
|
+
|
|
10639
|
+
const validateFileExtension = (name, allowedExtensions) => {
|
|
10640
|
+
if (!allowedExtensions) {
|
|
10641
|
+
return true;
|
|
10642
|
+
}
|
|
10643
|
+
const ext = name.split(".");
|
|
10644
|
+
const validExtension = allowedExtensions.split(",");
|
|
10645
|
+
const extension = ext[ext.length - 1];
|
|
10646
|
+
return validExtension.includes(extension);
|
|
10647
|
+
};
|
|
10648
|
+
const validateFileMime = (type, allowedMimetypes) => {
|
|
10649
|
+
if (!allowedMimetypes || !type) {
|
|
10650
|
+
return true;
|
|
10651
|
+
}
|
|
10652
|
+
const validMimeTypes = allowedMimetypes.split(",");
|
|
10653
|
+
let valid = false;
|
|
10654
|
+
validMimeTypes.forEach(mimeType => {
|
|
10655
|
+
const allowedTypes = mimeType.split("/");
|
|
10656
|
+
const fileType = type.split("/");
|
|
10657
|
+
if (allowedTypes[0] === fileType[0] && (allowedTypes[1] === fileType[1] || allowedTypes[1] === "*")) {
|
|
10658
|
+
valid = true;
|
|
10659
|
+
}
|
|
10660
|
+
});
|
|
10661
|
+
return valid;
|
|
10662
|
+
};
|
|
10663
|
+
const validateFileSize = (size, maxBytes) => {
|
|
10664
|
+
if (!maxBytes || !size) {
|
|
10665
|
+
return true;
|
|
10666
|
+
}
|
|
10667
|
+
return maxBytes >= size;
|
|
10668
|
+
};
|
|
10669
|
+
const validateFile = (item, validators) => {
|
|
10670
|
+
const { allowedMimetypes, allowedExtensions, maxBytes } = validators;
|
|
10671
|
+
let valid = false;
|
|
10672
|
+
let errorMessage = getError("default");
|
|
10673
|
+
if (item) {
|
|
10674
|
+
const { name, type, size } = item;
|
|
10675
|
+
const mime = validateFileMime(type, allowedMimetypes);
|
|
10676
|
+
const ext = validateFileExtension(name, allowedExtensions);
|
|
10677
|
+
const bytes = validateFileSize(size, maxBytes);
|
|
10678
|
+
if (!mime) {
|
|
10679
|
+
errorMessage = getError("duet-upload-101");
|
|
10680
|
+
}
|
|
10681
|
+
if (!ext) {
|
|
10682
|
+
errorMessage = getError("duet-upload-100");
|
|
10683
|
+
}
|
|
10684
|
+
if (!bytes) {
|
|
10685
|
+
errorMessage = getError("duet-upload-201");
|
|
10686
|
+
}
|
|
10687
|
+
valid = mime && ext && bytes;
|
|
10688
|
+
}
|
|
10689
|
+
else {
|
|
10690
|
+
valid = false;
|
|
10691
|
+
}
|
|
10692
|
+
return {
|
|
10693
|
+
valid,
|
|
10694
|
+
errorMessage: valid ? undefined : getLocaleString(errorMessage.message),
|
|
10695
|
+
errorSystem: valid ? undefined : errorMessage.system_message,
|
|
10696
|
+
errorType: valid ? undefined : errorMessage.type,
|
|
10697
|
+
};
|
|
10698
|
+
};
|
|
10699
|
+
const validateTotalSizeIsAboveMax = (filelist, maxTotalBytes) => {
|
|
10700
|
+
let total = 0;
|
|
10701
|
+
if (maxTotalBytes) {
|
|
10702
|
+
filelist.forEach(item => {
|
|
10703
|
+
if (item.valid && item.size) {
|
|
10704
|
+
total += item.size;
|
|
10705
|
+
}
|
|
10706
|
+
});
|
|
10707
|
+
if (total < maxTotalBytes) {
|
|
10708
|
+
return true;
|
|
10709
|
+
}
|
|
10710
|
+
}
|
|
10711
|
+
return false;
|
|
10712
|
+
};
|
|
10713
|
+
const validateTotalAmountIsAboveMax = (filelist, maxFiles) => {
|
|
10714
|
+
let total = 0;
|
|
10715
|
+
if (maxFiles) {
|
|
10716
|
+
filelist.forEach(item => {
|
|
10717
|
+
if (item.valid) {
|
|
10718
|
+
total++;
|
|
10719
|
+
}
|
|
10720
|
+
});
|
|
10721
|
+
if (total > maxFiles) {
|
|
10722
|
+
return true;
|
|
10723
|
+
}
|
|
10724
|
+
}
|
|
10725
|
+
return false;
|
|
10726
|
+
};
|
|
10727
|
+
|
|
10728
|
+
const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress }) => {
|
|
10729
|
+
const { type = "POST", xhr, uri, argument = null, headers = null } = options;
|
|
10730
|
+
xhr.open(type, `${uri}${argument || ""}`, true);
|
|
10731
|
+
const { data, name } = payload;
|
|
10732
|
+
// headers must be added after open
|
|
10733
|
+
if (headers) {
|
|
10734
|
+
Object.keys(headers).forEach(key => {
|
|
10735
|
+
xhr.setRequestHeader(key, headers[key]);
|
|
10736
|
+
});
|
|
10737
|
+
}
|
|
10738
|
+
if (type === "POST") {
|
|
10739
|
+
xhr.onreadystatechange = () => {
|
|
10740
|
+
// Call a function when the state changes.
|
|
10741
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 200 && xhr.status < 300) {
|
|
10742
|
+
// Request finished without errors
|
|
10743
|
+
onSuccess(xhr, name, xhr.status);
|
|
10744
|
+
}
|
|
10745
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 300 && xhr.status < 999) {
|
|
10746
|
+
// Request finished with errors
|
|
10747
|
+
onFailure(xhr, name, xhr.status);
|
|
10748
|
+
}
|
|
10749
|
+
};
|
|
10750
|
+
onProgress(name);
|
|
10751
|
+
}
|
|
10752
|
+
xhr.send(data);
|
|
10753
|
+
return xhr;
|
|
10754
|
+
};
|
|
10755
|
+
|
|
10756
|
+
const duetUploadCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.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{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";
|
|
10757
|
+
|
|
10758
|
+
let DuetUpload$1 = class extends H {
|
|
10759
|
+
constructor() {
|
|
10760
|
+
super();
|
|
10761
|
+
this.__registerHost();
|
|
10762
|
+
this.__attachShadow();
|
|
10763
|
+
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
10764
|
+
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
10765
|
+
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
10766
|
+
this.duetDone = createEvent$2(this, "duetDone", 3);
|
|
10767
|
+
this.duetState = createEvent$2(this, "duetState", 3);
|
|
10768
|
+
this.duetDelete = createEvent$2(this, "duetDelete", 3);
|
|
10769
|
+
this.duetCancel = createEvent$2(this, "duetCancel", 3);
|
|
10770
|
+
this.duetProgress = createEvent$2(this, "duetProgress", 3);
|
|
10771
|
+
this.duetUpload = createEvent$2(this, "duetUpload", 3);
|
|
10772
|
+
/**
|
|
10773
|
+
* Own Properties
|
|
10774
|
+
*/
|
|
10775
|
+
this.buttonId = createID("DuetButton");
|
|
10776
|
+
this.labelId = createID("DuetLabel");
|
|
10777
|
+
this.uploadId = createID("DuetUpload");
|
|
10778
|
+
this.editableTableId = createID("DuetEditableTable");
|
|
10779
|
+
this.filesInProgress = new Map();
|
|
10780
|
+
this.fileMaxReached = false;
|
|
10781
|
+
this.bytesMaxReached = false;
|
|
10782
|
+
this.internalStatusMessageLabel = undefined;
|
|
10783
|
+
/**
|
|
10784
|
+
* Properties
|
|
10785
|
+
*/
|
|
10786
|
+
this.DefaultGroups = {
|
|
10787
|
+
inprogress: "inprogress",
|
|
10788
|
+
success: "success",
|
|
10789
|
+
failure: "failure",
|
|
10790
|
+
};
|
|
10791
|
+
/**
|
|
10792
|
+
* State() variables
|
|
10793
|
+
*/
|
|
10794
|
+
this.tick = Date.now();
|
|
10795
|
+
/**
|
|
10796
|
+
* If external is set to true, the upload component will not actually upload the files, but only keep states
|
|
10797
|
+
* it will be up to you to handle the upload and return progress information to the upload-component
|
|
10798
|
+
*/
|
|
10799
|
+
this.external = false;
|
|
10800
|
+
/**
|
|
10801
|
+
* If set the upload component will not display an upload button, you will have to create one yourself
|
|
10802
|
+
* and call the exposed method startUpload
|
|
10803
|
+
*/
|
|
10804
|
+
this.hideButton = false;
|
|
10805
|
+
/**
|
|
10806
|
+
* Default actions added to the internally used duet-editable-table
|
|
10807
|
+
*/
|
|
10808
|
+
this.actions = [
|
|
10809
|
+
{
|
|
10810
|
+
icon: "action-delete",
|
|
10811
|
+
color: "color-danger",
|
|
10812
|
+
color_hover: "primary-dark",
|
|
10813
|
+
id: "delete",
|
|
10814
|
+
map: ["success", "failure"],
|
|
10815
|
+
label: {
|
|
10816
|
+
fi: "Poista tiedosto",
|
|
10817
|
+
en: "Poista tiedosto",
|
|
10818
|
+
sv: "Ta bort filen",
|
|
10819
|
+
},
|
|
10820
|
+
},
|
|
10821
|
+
{
|
|
10822
|
+
icon: "navigation-close",
|
|
10823
|
+
color: "primary",
|
|
10824
|
+
color_hover: "primary-dark",
|
|
10825
|
+
id: "cancel",
|
|
10826
|
+
map: ["inprogress"],
|
|
10827
|
+
label: {
|
|
10828
|
+
fi: "Keskeytä lähetys",
|
|
10829
|
+
en: "Cancel the upload",
|
|
10830
|
+
sv: "Stop överföringen",
|
|
10831
|
+
},
|
|
10832
|
+
},
|
|
10833
|
+
];
|
|
10834
|
+
/**
|
|
10835
|
+
* If enabled the editable-table will display links on successfully uploaded items,
|
|
10836
|
+
* this requires the server can respond with link URIs in the correct format
|
|
10837
|
+
* and that the files are accessible to the user
|
|
10838
|
+
*/
|
|
10839
|
+
this.showLinks = false;
|
|
10840
|
+
/**
|
|
10841
|
+
* Property to change the aria upload progress text read aloud by screenreaders
|
|
10842
|
+
* @default {
|
|
10843
|
+
* fi: {
|
|
10844
|
+
* inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
10845
|
+
* inProgressWithErrors:
|
|
10846
|
+
* "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
10847
|
+
* done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
10848
|
+
* doneWithErrors:
|
|
10849
|
+
* "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
10850
|
+
* files: "tiedostot",
|
|
10851
|
+
* file: "tiedosto",
|
|
10852
|
+
* },
|
|
10853
|
+
* sv: {
|
|
10854
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10855
|
+
* inProgressWithErrors:
|
|
10856
|
+
* "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
10857
|
+
* done: "Alla {filesTotal} har lagts till",
|
|
10858
|
+
* doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
10859
|
+
* files: "filer",
|
|
10860
|
+
* file: "fil",
|
|
10861
|
+
* },
|
|
10862
|
+
* en: {
|
|
10863
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10864
|
+
* inProgressWithErrors:
|
|
10865
|
+
* "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
10866
|
+
* done: "All {filesTotal} added successfully",
|
|
10867
|
+
* doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
10868
|
+
* files: "tiedostoa",
|
|
10869
|
+
* file: "tiedosto",
|
|
10870
|
+
* },
|
|
10871
|
+
* }
|
|
10872
|
+
*/
|
|
10873
|
+
this.statusLabelDefaults = {
|
|
10874
|
+
fi: {
|
|
10875
|
+
inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
10876
|
+
inProgressWithErrors: "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
10877
|
+
done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
10878
|
+
doneWithErrors: "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
10879
|
+
files: "tiedostot",
|
|
10880
|
+
file: "tiedosto",
|
|
10881
|
+
},
|
|
10882
|
+
sv: {
|
|
10883
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10884
|
+
inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
10885
|
+
done: "Alla {filesTotal} har lagts till",
|
|
10886
|
+
doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
10887
|
+
files: "filer",
|
|
10888
|
+
file: "fil",
|
|
10889
|
+
},
|
|
10890
|
+
en: {
|
|
10891
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10892
|
+
inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
10893
|
+
done: "All {filesTotal} added successfully",
|
|
10894
|
+
doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
10895
|
+
files: "tiedostoa",
|
|
10896
|
+
file: "tiedosto",
|
|
10897
|
+
},
|
|
10898
|
+
};
|
|
10899
|
+
/**
|
|
10900
|
+
* Strings used for the status aria-label
|
|
10901
|
+
*/
|
|
10902
|
+
this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
|
|
10903
|
+
/**
|
|
10904
|
+
* Property to change button label defaults on the component.
|
|
10905
|
+
* @default {
|
|
10906
|
+
fi: "Lisää liite",
|
|
10907
|
+
sv: "Lägg till en bilaga",
|
|
10908
|
+
en: "Add an attachment",
|
|
10909
|
+
}
|
|
10910
|
+
*/
|
|
10911
|
+
this.buttonLabelDefaults = {
|
|
10912
|
+
fi: "Lisää liite",
|
|
10913
|
+
sv: "Lägg till en bilaga",
|
|
10914
|
+
en: "Add an attachment",
|
|
10915
|
+
};
|
|
10916
|
+
/**
|
|
10917
|
+
* Label of button
|
|
10918
|
+
* @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment" }
|
|
10919
|
+
*/
|
|
10920
|
+
this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
|
|
10921
|
+
/**
|
|
10922
|
+
* accessible aria-Label of button
|
|
10923
|
+
*/
|
|
10924
|
+
this.accessibleButtonLabel = undefined;
|
|
10925
|
+
/**
|
|
10926
|
+
* Theme of the input.
|
|
10927
|
+
*/
|
|
10928
|
+
this.theme = "";
|
|
10929
|
+
/**
|
|
10930
|
+
* Makes the input component disabled. This prevents users from being able to
|
|
10931
|
+
* interact with the upload component, and conveys its inactive state to assistive technologies.
|
|
10932
|
+
*/
|
|
10933
|
+
this.disabled = false;
|
|
10934
|
+
/**
|
|
10935
|
+
* Controls the margin of the component.
|
|
10936
|
+
*/
|
|
10937
|
+
this.margin = "auto";
|
|
10938
|
+
/**
|
|
10939
|
+
* Set whether the input is required or not. Please note that this is necessary for
|
|
10940
|
+
* accessible inputs when the user is required to fill them. When using this property
|
|
10941
|
+
* you need to also set “novalidate” attribute to your form element to prevent
|
|
10942
|
+
* browser from displaying its own validation errors.
|
|
10943
|
+
*/
|
|
10944
|
+
this.required = false;
|
|
10945
|
+
/**
|
|
10946
|
+
* Key used to set vertical alignment of action buttons
|
|
10947
|
+
*/
|
|
10948
|
+
this.alignment = "middle";
|
|
10949
|
+
/**
|
|
10950
|
+
* Visually hides the groups labels in the editable table list used to display the list of files
|
|
10951
|
+
*/
|
|
10952
|
+
this.hideGroups = false;
|
|
10953
|
+
/**
|
|
10954
|
+
* Map of string that contain list of uploaded files.
|
|
10955
|
+
*/
|
|
10956
|
+
this.files = new Map();
|
|
10957
|
+
/**
|
|
10958
|
+
* Property to read if the internally used editable-table contains errors or not
|
|
10959
|
+
*/
|
|
10960
|
+
this.valid = !this.required;
|
|
10961
|
+
/**
|
|
10962
|
+
* Property to change labelDefaults defaults on the component.
|
|
10963
|
+
* normally you would handle these strings on an application level and override @label when needed
|
|
10964
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
10965
|
+
*/
|
|
10966
|
+
this.labelDefaults = {
|
|
10967
|
+
fi: "Lisää liite",
|
|
10968
|
+
sv: "Lägg till en bilaga",
|
|
10969
|
+
en: "Add attachments",
|
|
10970
|
+
};
|
|
10971
|
+
/**
|
|
10972
|
+
* Label for the input.
|
|
10973
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
10974
|
+
*/
|
|
10975
|
+
this.label = getLocaleString(this.labelDefaults);
|
|
10976
|
+
/**
|
|
10977
|
+
* Property to change descriptionDefaults defaults on the component.
|
|
10978
|
+
* @default {
|
|
10979
|
+
fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
|
|
10980
|
+
sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
|
|
10981
|
+
en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.",
|
|
10982
|
+
}
|
|
10983
|
+
*/
|
|
10984
|
+
this.descriptionDefaults = {
|
|
10985
|
+
fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
|
|
10986
|
+
sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
|
|
10987
|
+
en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.",
|
|
10988
|
+
};
|
|
10989
|
+
/**
|
|
10990
|
+
* Description for the upload component.
|
|
10991
|
+
* @default {
|
|
10992
|
+
fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
|
|
10993
|
+
sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
|
|
10994
|
+
en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.",
|
|
10995
|
+
}
|
|
10996
|
+
*/
|
|
10997
|
+
this.description = getLocaleString(this.descriptionDefaults);
|
|
10998
|
+
/**
|
|
10999
|
+
* Defaults for the filelist's empty state.
|
|
11000
|
+
* @default {
|
|
11001
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
11002
|
+
sv: "Inga filer har lagts till ännu.",
|
|
11003
|
+
en: "No files added yet.",
|
|
11004
|
+
}
|
|
11005
|
+
*/
|
|
11006
|
+
this.fileListEmptyDefaults = {
|
|
11007
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
11008
|
+
sv: "Inga filer har lagts till ännu.",
|
|
11009
|
+
en: "No files added yet.",
|
|
11010
|
+
};
|
|
11011
|
+
/**
|
|
11012
|
+
* Label for the filelist's empty state.
|
|
11013
|
+
* @default { fi: "Ei vielä lisättyjä tiedostoja.",sv: "Inga filer har lagts till ännu.",en: "No files added yet."}
|
|
11014
|
+
*/
|
|
11015
|
+
this.fileListEmpty = getLocaleString(this.fileListEmptyDefaults);
|
|
11016
|
+
/**
|
|
11017
|
+
* Display the input in error state along with an error message.
|
|
11018
|
+
*/
|
|
11019
|
+
this.error = "";
|
|
11020
|
+
/**
|
|
11021
|
+
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
11022
|
+
*/
|
|
11023
|
+
this.maxBytes = 200000000;
|
|
11024
|
+
/**
|
|
11025
|
+
* Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded.
|
|
11026
|
+
*/
|
|
11027
|
+
this.maxBytesTotal = undefined;
|
|
11028
|
+
/**
|
|
11029
|
+
* Use maxFiles to specify the maximum amount of files that can be uploaded
|
|
11030
|
+
*/
|
|
11031
|
+
this.maxFiles = 99;
|
|
11032
|
+
/**
|
|
11033
|
+
* A string of commaseperated file type values that are allowed
|
|
11034
|
+
* @example: .pdf,.doc,.docx
|
|
11035
|
+
*/
|
|
11036
|
+
this.allowedExtensions = "all";
|
|
11037
|
+
/**
|
|
11038
|
+
* A string of commaseperated mime type values that are allowed
|
|
11039
|
+
* @example: image/*,application/msword,
|
|
11040
|
+
*/
|
|
11041
|
+
this.allowedMimetypes = "*";
|
|
11042
|
+
/**
|
|
11043
|
+
* Use multiple to allow the user to select multiple files when uploading
|
|
11044
|
+
*/
|
|
11045
|
+
this.multiple = true;
|
|
11046
|
+
/**
|
|
11047
|
+
* Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,
|
|
11048
|
+
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
11049
|
+
*/
|
|
11050
|
+
this.limitSelection = false;
|
|
11051
|
+
/**
|
|
11052
|
+
* Private functions
|
|
11053
|
+
*/
|
|
11054
|
+
this.listenForActionEvents = () => {
|
|
11055
|
+
this.element.addEventListener("duetEditableItemAction", (e) => {
|
|
11056
|
+
const detail = e.detail;
|
|
11057
|
+
const { action, keyName, originalEvent } = detail;
|
|
11058
|
+
switch (action) {
|
|
11059
|
+
case "delete":
|
|
11060
|
+
this.onDelete(keyName, originalEvent);
|
|
11061
|
+
break;
|
|
11062
|
+
case "cancel":
|
|
11063
|
+
this.onCancel(keyName, originalEvent);
|
|
11064
|
+
break;
|
|
11065
|
+
// code block
|
|
11066
|
+
}
|
|
11067
|
+
});
|
|
11068
|
+
};
|
|
11069
|
+
this.verifyValidity = () => {
|
|
11070
|
+
const { invalid, valid } = this.getFilesAsArray();
|
|
11071
|
+
const oldValid = this.valid;
|
|
11072
|
+
this.valid = invalid.length === 0 && valid.length !== 0;
|
|
11073
|
+
if (this.valid !== oldValid) {
|
|
11074
|
+
this.duetState.emit({
|
|
11075
|
+
originalEvent: undefined,
|
|
11076
|
+
data: { valid: this.valid, from: "componentWillRender" },
|
|
11077
|
+
component: "duet-upload",
|
|
11078
|
+
});
|
|
11079
|
+
}
|
|
11080
|
+
};
|
|
11081
|
+
this.getGroupFromItemData = (item) => {
|
|
11082
|
+
if (item.valid && item.progress === 100) {
|
|
11083
|
+
// if the item has a group, move the file to that group instead
|
|
11084
|
+
// of into the standard success group
|
|
11085
|
+
if (item.group) {
|
|
11086
|
+
return item.group;
|
|
11087
|
+
}
|
|
11088
|
+
return this.DefaultGroups.success;
|
|
11089
|
+
}
|
|
11090
|
+
else if (item.progress > 0 && item.progress !== 100) {
|
|
11091
|
+
return this.DefaultGroups.inprogress;
|
|
11092
|
+
}
|
|
11093
|
+
else if (!item.valid) {
|
|
11094
|
+
return this.DefaultGroups.failure;
|
|
11095
|
+
}
|
|
11096
|
+
else if (item.group) {
|
|
11097
|
+
return item.group;
|
|
11098
|
+
}
|
|
11099
|
+
else {
|
|
11100
|
+
return "none";
|
|
11101
|
+
}
|
|
11102
|
+
};
|
|
11103
|
+
this.getItemHTMLFromItemData = (data, group) => {
|
|
11104
|
+
if (group === this.DefaultGroups.success) {
|
|
11105
|
+
return h$1(SuccessItem, { data: data, showLinks: this.showLinks });
|
|
11106
|
+
}
|
|
11107
|
+
else if (group === this.DefaultGroups.inprogress) {
|
|
11108
|
+
return h$1(ProgressItem, { progress: data.progress, name: data.item.name });
|
|
11109
|
+
}
|
|
11110
|
+
else if (group === this.DefaultGroups.failure) {
|
|
11111
|
+
return h$1(ErrorItem, { data: data });
|
|
11112
|
+
}
|
|
11113
|
+
else if (data.group) {
|
|
11114
|
+
return data.html;
|
|
11115
|
+
}
|
|
11116
|
+
else {
|
|
11117
|
+
return "none";
|
|
11118
|
+
}
|
|
11119
|
+
};
|
|
11120
|
+
this.convertToDuetEditableTableItems = () => {
|
|
11121
|
+
// we're always recreating the map - in order to force an update down stream.
|
|
11122
|
+
const itemData = new Map();
|
|
11123
|
+
//walk the files Map and convert to DuetEditableTableItemData
|
|
11124
|
+
this.files.forEach((data, key, _originalMap) => {
|
|
11125
|
+
const group = this.getGroupFromItemData(data);
|
|
11126
|
+
const item = this.getItemHTMLFromItemData(data, group);
|
|
11127
|
+
itemData.set(key, {
|
|
11128
|
+
uid: data.uid,
|
|
11129
|
+
item,
|
|
11130
|
+
group,
|
|
11131
|
+
});
|
|
11132
|
+
});
|
|
11133
|
+
return itemData;
|
|
11134
|
+
};
|
|
11135
|
+
this.kick = debounce(() => {
|
|
11136
|
+
this.tick = Date.now();
|
|
11137
|
+
}, 30); // will trigger re-render
|
|
11138
|
+
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
11139
|
+
this.updateValueInMap = (item, key, value, kick = true) => {
|
|
11140
|
+
const fileItem = this.files.get(item);
|
|
11141
|
+
fileItem[key] = value;
|
|
11142
|
+
this.files.set(item, fileItem);
|
|
11143
|
+
if (kick) {
|
|
11144
|
+
this.kick();
|
|
11145
|
+
}
|
|
11146
|
+
};
|
|
11147
|
+
this.updateProgress = (ev, name) => {
|
|
11148
|
+
const updateProgressHelper = percentComplete => {
|
|
11149
|
+
this.updateValueInMap(name, "progress", percentComplete);
|
|
11150
|
+
this.onProgress(name, percentComplete, ev);
|
|
11151
|
+
};
|
|
11152
|
+
if (ev.lengthComputable) {
|
|
11153
|
+
const percentComplete = (ev.loaded / ev.total) * 100;
|
|
11154
|
+
updateProgressHelper(percentComplete);
|
|
11155
|
+
}
|
|
11156
|
+
else {
|
|
11157
|
+
console.log("cant read progress");
|
|
11158
|
+
}
|
|
11159
|
+
};
|
|
11160
|
+
this.trackProgress = (name, remove = false) => {
|
|
11161
|
+
if (remove) {
|
|
11162
|
+
this.filesInProgress.delete(name);
|
|
11163
|
+
}
|
|
11164
|
+
else {
|
|
11165
|
+
this.filesInProgress.set(name, "inprogress");
|
|
11166
|
+
}
|
|
11167
|
+
if (this.filesInProgress.size === 0) {
|
|
11168
|
+
this.onDone();
|
|
11169
|
+
}
|
|
11170
|
+
};
|
|
11171
|
+
this.getFilesAsArray = () => {
|
|
11172
|
+
const filesInQueue = [];
|
|
11173
|
+
const filesInError = [];
|
|
11174
|
+
this.files.forEach(value => {
|
|
11175
|
+
if (value.valid && !value.deleted) {
|
|
11176
|
+
filesInQueue.push(value);
|
|
11177
|
+
}
|
|
11178
|
+
else if (!value.valid && !value.deleted) {
|
|
11179
|
+
filesInError.push(value);
|
|
11180
|
+
}
|
|
11181
|
+
});
|
|
11182
|
+
return { valid: filesInQueue, invalid: filesInError };
|
|
11183
|
+
};
|
|
11184
|
+
this.resetFormFields = () => {
|
|
11185
|
+
/**
|
|
11186
|
+
* You cannot modify a FileList, nor remove single items from it
|
|
11187
|
+
* This completely removes all items in the FileList
|
|
11188
|
+
* We reset the form fields to always be able to re-upload files
|
|
11189
|
+
* and because we handle all uploads and states internally in the component (not relying on native form elements)
|
|
11190
|
+
*/
|
|
11191
|
+
/* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
|
|
11192
|
+
* TODO: this would remove the capability of Re-uploading, unless we can catch and remove the user file from the form filelist before the upload is canceled by the browser
|
|
11193
|
+
* TODO: but for now we'll just reset the form fields
|
|
11194
|
+
*/
|
|
11195
|
+
this.nativeInput.value = "";
|
|
11196
|
+
};
|
|
11197
|
+
this.startUpload = async (ev, metaData = undefined) => {
|
|
11198
|
+
await this.setFocus();
|
|
11199
|
+
this.metaData = metaData;
|
|
11200
|
+
this.nativeInput.click();
|
|
11201
|
+
this.onUpload(ev, metaData);
|
|
11202
|
+
ev.stopPropagation();
|
|
11203
|
+
ev.preventDefault();
|
|
11204
|
+
return;
|
|
11205
|
+
};
|
|
11206
|
+
/**
|
|
11207
|
+
* Eventlisteners for the XHR requests
|
|
11208
|
+
*/
|
|
11209
|
+
this.transferComplete = name => {
|
|
11210
|
+
this.updateValueInMap(name, "progress", 100, false);
|
|
11211
|
+
this.trackProgress(name, true);
|
|
11212
|
+
};
|
|
11213
|
+
this.transferDone = (xhr, name, status) => {
|
|
11214
|
+
this.updateValueInMap(name, "status", status, false);
|
|
11215
|
+
this.updateValueInMap(name, "uploaded", true, false);
|
|
11216
|
+
try {
|
|
11217
|
+
const response = JSON.parse(xhr.response);
|
|
11218
|
+
this.updateValueInMap(name, "url", response.url);
|
|
11219
|
+
}
|
|
11220
|
+
catch (e) {
|
|
11221
|
+
this.updateValueInMap(name, "url", null);
|
|
11222
|
+
console.error("Server did not respond with expected response {url: string}");
|
|
11223
|
+
}
|
|
11224
|
+
return;
|
|
11225
|
+
};
|
|
11226
|
+
this.transferDoneWithFailure = (xhr, name, status) => {
|
|
11227
|
+
try {
|
|
11228
|
+
const { error } = JSON.parse(xhr.response);
|
|
11229
|
+
this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
|
|
11230
|
+
}
|
|
11231
|
+
catch (e) {
|
|
11232
|
+
console.error("Server did not respond with expected response error:{message: string, type: int}");
|
|
11233
|
+
this.updateValueInMap(name, "error", { type: status }, false);
|
|
11234
|
+
}
|
|
11235
|
+
this.updateValueInMap(name, "valid", false, true);
|
|
11236
|
+
};
|
|
11237
|
+
this.transferFailed = name => {
|
|
11238
|
+
this.updateValueInMap(name, "error", getError("duet-upload-001"));
|
|
11239
|
+
};
|
|
11240
|
+
this.transferCanceled = name => {
|
|
11241
|
+
this.files.delete(name);
|
|
11242
|
+
this.validateTotals(name);
|
|
11243
|
+
this.kick();
|
|
11244
|
+
};
|
|
11245
|
+
this.validateTotals = (name) => {
|
|
11246
|
+
const isTotalSizeOverMaxSize = validateTotalSizeIsAboveMax(this.files, this.maxBytesTotal);
|
|
11247
|
+
const isTotalFileAmountAboveMax = validateTotalAmountIsAboveMax(this.files, this.maxFiles);
|
|
11248
|
+
if (isTotalSizeOverMaxSize && name) {
|
|
11249
|
+
this.updateValueInMap(name, "error", getError("duet-upload-202"), false);
|
|
11250
|
+
}
|
|
11251
|
+
if (isTotalFileAmountAboveMax && name) {
|
|
11252
|
+
this.updateValueInMap(name, "error", getError("duet-upload-301"), false);
|
|
11253
|
+
}
|
|
11254
|
+
this.bytesMaxReached = isTotalSizeOverMaxSize;
|
|
11255
|
+
this.fileMaxReached = isTotalFileAmountAboveMax;
|
|
11256
|
+
return {
|
|
11257
|
+
bytesMaxReached: isTotalSizeOverMaxSize,
|
|
11258
|
+
fileMaxReached: isTotalFileAmountAboveMax,
|
|
11259
|
+
};
|
|
11260
|
+
};
|
|
11261
|
+
this.onDelete = (key, ev) => {
|
|
11262
|
+
const deletedItem = this.files.get(key);
|
|
11263
|
+
this.files.delete(key);
|
|
11264
|
+
this.validateTotals();
|
|
11265
|
+
this.kick();
|
|
11266
|
+
this.duetDelete.emit({
|
|
11267
|
+
originalEvent: ev,
|
|
11268
|
+
data: { deletion: deletedItem },
|
|
11269
|
+
component: "duet-upload",
|
|
11270
|
+
});
|
|
11271
|
+
if (!this.external) {
|
|
11272
|
+
this.makeXHRDeleteRequest(deletedItem);
|
|
11273
|
+
}
|
|
11274
|
+
this.resetFormFields();
|
|
11275
|
+
};
|
|
11276
|
+
this.onCancel = (key, ev) => {
|
|
11277
|
+
const cancelledItem = this.files.get(key);
|
|
11278
|
+
this.files.delete(key);
|
|
11279
|
+
if (!this.external) {
|
|
11280
|
+
const { xhr } = cancelledItem;
|
|
11281
|
+
xhr.abort();
|
|
11282
|
+
}
|
|
11283
|
+
else {
|
|
11284
|
+
this.kick();
|
|
11285
|
+
}
|
|
11286
|
+
this.resetFormFields();
|
|
11287
|
+
this.duetCancel.emit({
|
|
11288
|
+
originalEvent: ev,
|
|
11289
|
+
data: { cancelled: cancelledItem },
|
|
11290
|
+
component: "duet-upload",
|
|
11291
|
+
});
|
|
11292
|
+
};
|
|
11293
|
+
this.onUpload = (ev, metaData) => {
|
|
11294
|
+
this.duetUpload.emit({
|
|
11295
|
+
originalEvent: ev,
|
|
11296
|
+
metaData,
|
|
11297
|
+
component: "duet-upload",
|
|
11298
|
+
});
|
|
11299
|
+
};
|
|
11300
|
+
this.onBlur = (ev) => {
|
|
11301
|
+
this.duetBlur.emit({
|
|
11302
|
+
originalEvent: ev,
|
|
11303
|
+
component: "duet-upload",
|
|
11304
|
+
});
|
|
11305
|
+
};
|
|
11306
|
+
this.onProgress = (key, percentComplete, ev) => {
|
|
11307
|
+
this.duetChange.emit({
|
|
11308
|
+
originalEvent: ev,
|
|
11309
|
+
data: {
|
|
11310
|
+
key,
|
|
11311
|
+
percentComplete,
|
|
11312
|
+
},
|
|
11313
|
+
component: "duet-upload",
|
|
11314
|
+
});
|
|
11315
|
+
};
|
|
11316
|
+
this.onFocus = (ev) => {
|
|
11317
|
+
this.duetFocus.emit({
|
|
11318
|
+
originalEvent: ev,
|
|
11319
|
+
component: "duet-upload",
|
|
11320
|
+
});
|
|
11321
|
+
};
|
|
11322
|
+
this.onDone = () => {
|
|
11323
|
+
this.duetDone.emit({
|
|
11324
|
+
component: "duet-upload",
|
|
11325
|
+
data: { files: this.files },
|
|
11326
|
+
});
|
|
11327
|
+
};
|
|
11328
|
+
}
|
|
11329
|
+
watchValidHandler(newValue, oldValue) {
|
|
11330
|
+
if (newValue !== oldValue) {
|
|
11331
|
+
this.kick();
|
|
11332
|
+
}
|
|
11333
|
+
}
|
|
11334
|
+
/**
|
|
11335
|
+
* Component lifecycle events.
|
|
11336
|
+
*/
|
|
11337
|
+
componentWillLoad() {
|
|
11338
|
+
if (typeof this.statusMessageLabel === "string") {
|
|
11339
|
+
this.internalStatusMessageLabel = sanitizeString(this.groups);
|
|
11340
|
+
}
|
|
11341
|
+
else {
|
|
11342
|
+
this.internalStatusMessageLabel = this.statusMessageLabel;
|
|
11343
|
+
}
|
|
11344
|
+
inheritGlobalTheme(this);
|
|
11345
|
+
this.listenForActionEvents();
|
|
11346
|
+
}
|
|
11347
|
+
componentWillRender() {
|
|
11348
|
+
// listen to the events from the component
|
|
11349
|
+
this.verifyValidity();
|
|
11350
|
+
}
|
|
11351
|
+
/**
|
|
11352
|
+
* XHR request utilities
|
|
11353
|
+
*/
|
|
11354
|
+
makeXHRPostRequest(data) {
|
|
11355
|
+
const xhr = new XMLHttpRequest();
|
|
11356
|
+
const name = data.get("name");
|
|
11357
|
+
xhr.upload.addEventListener("progress", ev => {
|
|
11358
|
+
this.updateProgress(ev, name);
|
|
11359
|
+
});
|
|
11360
|
+
xhr.upload.addEventListener("load", () => {
|
|
11361
|
+
this.transferComplete(name);
|
|
11362
|
+
});
|
|
11363
|
+
xhr.upload.addEventListener("error", () => {
|
|
11364
|
+
this.transferFailed(name);
|
|
11365
|
+
});
|
|
11366
|
+
xhr.upload.addEventListener("abort", () => {
|
|
11367
|
+
this.transferCanceled(name);
|
|
11368
|
+
});
|
|
11369
|
+
return makeXhrRequest({
|
|
11370
|
+
payload: { data, name },
|
|
11371
|
+
options: { type: "POST", uri: this.uri, xhr, argument: null, headers: null },
|
|
11372
|
+
onFailure: this.transferDoneWithFailure,
|
|
11373
|
+
onSuccess: this.transferDone,
|
|
11374
|
+
onProgress: this.trackProgress,
|
|
11375
|
+
});
|
|
11376
|
+
}
|
|
11377
|
+
makeXHRDeleteRequest(data) {
|
|
11378
|
+
const { uid, item } = data;
|
|
11379
|
+
const xhr = new XMLHttpRequest();
|
|
11380
|
+
// don't present server issues to user on deletes, just remove them from the visible list
|
|
11381
|
+
return makeXhrRequest({
|
|
11382
|
+
payload: { data: null, name },
|
|
11383
|
+
options: {
|
|
11384
|
+
type: "DELETE",
|
|
11385
|
+
xhr,
|
|
11386
|
+
uri: this.uri,
|
|
11387
|
+
arguments: `?key=${uid}&name=${item.name}`,
|
|
11388
|
+
headers: {
|
|
11389
|
+
"x-fileuid": uid,
|
|
11390
|
+
"x-filename": item.name,
|
|
11391
|
+
},
|
|
11392
|
+
},
|
|
11393
|
+
onFailure: this.transferDoneWithFailure,
|
|
11394
|
+
onSuccess: this.transferDone,
|
|
11395
|
+
onProgress: this.trackProgress,
|
|
11396
|
+
});
|
|
11397
|
+
}
|
|
11398
|
+
/**
|
|
11399
|
+
* Component event handling.
|
|
11400
|
+
*/
|
|
11401
|
+
async onChange(ev) {
|
|
11402
|
+
var _a;
|
|
11403
|
+
const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
|
|
11404
|
+
// FileList is a nice array like structure but
|
|
11405
|
+
// to ensure uniqueness of files we use a mapping structure and
|
|
11406
|
+
// key to the name (makes it easier to delete as well)
|
|
11407
|
+
if (selectedFiles) {
|
|
11408
|
+
for (const item of selectedFiles) {
|
|
11409
|
+
const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
|
|
11410
|
+
maxBytes: this.maxBytes,
|
|
11411
|
+
allowedExtensions: this.allowedExtensions,
|
|
11412
|
+
allowedMimetypes: this.allowedMimetypes,
|
|
11413
|
+
});
|
|
11414
|
+
const uid = this.genHashName();
|
|
11415
|
+
const fileListItem = {
|
|
11416
|
+
uid,
|
|
11417
|
+
item: item,
|
|
11418
|
+
size: item.size,
|
|
11419
|
+
meta: this.metaData,
|
|
11420
|
+
uploaded: false,
|
|
11421
|
+
valid,
|
|
11422
|
+
error: {
|
|
11423
|
+
type: valid ? undefined : errorType,
|
|
11424
|
+
message: valid ? undefined : errorMessage,
|
|
11425
|
+
system_message: valid ? undefined : errorSystem,
|
|
11426
|
+
},
|
|
11427
|
+
progress: 0,
|
|
11428
|
+
deleted: false,
|
|
11429
|
+
xhr: false,
|
|
11430
|
+
url: false,
|
|
11431
|
+
};
|
|
11432
|
+
this.files.set(item.name, fileListItem);
|
|
11433
|
+
// validate that we haven't hit any maxfiles or maxbytes limits before we upload
|
|
11434
|
+
const { bytesMaxReached, fileMaxReached } = this.validateTotals(item.name);
|
|
11435
|
+
if (bytesMaxReached) {
|
|
11436
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
11437
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
11438
|
+
}
|
|
11439
|
+
else if (fileMaxReached) {
|
|
11440
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
11441
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
11442
|
+
}
|
|
11443
|
+
else if (valid && !this.external) {
|
|
11444
|
+
// if all is well AND external file upload handling has not been set, start upload
|
|
11445
|
+
const data = new FormData();
|
|
11446
|
+
data.append("file", item);
|
|
11447
|
+
data.append("uid", uid);
|
|
11448
|
+
data.append("name", item.name);
|
|
11449
|
+
data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size, meta: fileListItem.meta }));
|
|
11450
|
+
try {
|
|
11451
|
+
fileListItem.xhr = await this.makeXHRPostRequest(data);
|
|
11452
|
+
}
|
|
11453
|
+
catch (e) {
|
|
11454
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
11455
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
11456
|
+
}
|
|
11457
|
+
}
|
|
11458
|
+
// kick the stat to force update
|
|
11459
|
+
this.kick();
|
|
11460
|
+
}
|
|
11461
|
+
}
|
|
11462
|
+
// reset the form, so that a user may upload a file again (with the same name)
|
|
11463
|
+
this.resetFormFields();
|
|
11464
|
+
// reset the internal metaData state
|
|
11465
|
+
this.metaData = undefined;
|
|
11466
|
+
this.duetChange.emit({
|
|
11467
|
+
originalEvent: ev,
|
|
11468
|
+
data: { files: this.files },
|
|
11469
|
+
component: "duet-upload",
|
|
11470
|
+
});
|
|
11471
|
+
}
|
|
11472
|
+
/**
|
|
11473
|
+
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
11474
|
+
* `input.focus()`.
|
|
11475
|
+
*/
|
|
11476
|
+
async setFocus(options) {
|
|
11477
|
+
if (this.nativeInput) {
|
|
11478
|
+
this.nativeInput.focus(options);
|
|
11479
|
+
}
|
|
11480
|
+
return;
|
|
11481
|
+
}
|
|
11482
|
+
/**
|
|
11483
|
+
* Method for invoking the upload sequence
|
|
11484
|
+
*/
|
|
11485
|
+
async upload(metaData = undefined) {
|
|
11486
|
+
await this.setFocus();
|
|
11487
|
+
this.metaData = metaData;
|
|
11488
|
+
this.nativeInput.click();
|
|
11489
|
+
return;
|
|
11490
|
+
}
|
|
11491
|
+
/**
|
|
11492
|
+
* Get list of files, divided in errors and valid sections
|
|
11493
|
+
*/
|
|
11494
|
+
async getFiles() {
|
|
11495
|
+
if (!this.files || this.files.size === 0) {
|
|
11496
|
+
return false;
|
|
11497
|
+
}
|
|
11498
|
+
return this.getFilesAsArray();
|
|
11499
|
+
}
|
|
11500
|
+
/**
|
|
11501
|
+
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
11502
|
+
*/
|
|
11503
|
+
async updateValue(item, key, value) {
|
|
11504
|
+
this.updateValueInMap(item, key, value);
|
|
11505
|
+
}
|
|
11506
|
+
/**
|
|
11507
|
+
* render() function
|
|
11508
|
+
* Always the last one in the class.
|
|
11509
|
+
*/
|
|
11510
|
+
render() {
|
|
11511
|
+
const identifier = this.identifier || this.uploadId;
|
|
11512
|
+
let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
|
|
11513
|
+
caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
|
|
11514
|
+
caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
|
|
11515
|
+
return (h$1(Host, { class: { "duet-m-0": this.margin === "none" } }, h$1("duet-fieldset", { label: this.label, caption: caption }, h$1("slot", { name: "header" }), !this.files.size && (h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
11516
|
+
"duet-upload-filelist-empty": !this.files.size,
|
|
11517
|
+
"duet-upload-filelist": true,
|
|
11518
|
+
"duet-upload-filelist-filled": this.files.size,
|
|
11519
|
+
}, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && h$1("slot", { name: "fileheader" }), !!this.files.size && (h$1("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 && (h$1("duet-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 && h$1("slot", { name: "filefooter" }), h$1("duet-spacer", { size: "large" }), !this.hideButton && (h$1("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" }, this.buttonLabel)), h$1("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (h$1("duet-alert", null, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), h$1("duet-spacer", { size: "medium" }), h$1("duet-visually-hidden", null, h$1("input", { ref: input => {
|
|
11520
|
+
this.nativeInput = input;
|
|
11521
|
+
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
11522
|
+
"duet-upload": true,
|
|
11523
|
+
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
11524
|
+
}
|
|
11525
|
+
get element() { return this; }
|
|
11526
|
+
static get watchers() { return {
|
|
11527
|
+
"valid": ["watchValidHandler"]
|
|
11528
|
+
}; }
|
|
11529
|
+
static get style() { return duetUploadCss; }
|
|
11530
|
+
};
|
|
11531
|
+
|
|
11532
|
+
let DuetUploadAriaStatus$1 = class extends H {
|
|
11533
|
+
constructor() {
|
|
11534
|
+
super();
|
|
11535
|
+
this.__registerHost();
|
|
11536
|
+
this.__attachShadow();
|
|
11537
|
+
/**
|
|
11538
|
+
* State() variables
|
|
11539
|
+
*/
|
|
11540
|
+
this.statusMessage = null;
|
|
11541
|
+
/**
|
|
11542
|
+
* Status labels used in the component
|
|
11543
|
+
*/
|
|
11544
|
+
this.statusMessageLabel = null;
|
|
11545
|
+
/**
|
|
11546
|
+
* Adds accessible label that is read aloud
|
|
11547
|
+
*/
|
|
11548
|
+
this.accessibleAriaLive = "polite";
|
|
11549
|
+
/**
|
|
11550
|
+
* valid file amount
|
|
11551
|
+
*/
|
|
11552
|
+
this.valid = undefined;
|
|
11553
|
+
/**
|
|
11554
|
+
* total files
|
|
11555
|
+
*/
|
|
11556
|
+
this.total = undefined;
|
|
11557
|
+
/**
|
|
11558
|
+
* invalid file amount
|
|
11559
|
+
*/
|
|
11560
|
+
this.invalid = undefined;
|
|
11561
|
+
/**
|
|
11562
|
+
* valid file amount
|
|
11563
|
+
*/
|
|
11564
|
+
this.inprogress = undefined;
|
|
11565
|
+
/**
|
|
11566
|
+
* Private functions
|
|
11567
|
+
*/
|
|
11568
|
+
this.replacePlaceHolders = (statusString) => {
|
|
11569
|
+
const addFiles = (amount) => {
|
|
11570
|
+
return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
|
|
11571
|
+
};
|
|
11572
|
+
return statusString
|
|
11573
|
+
.replace("{filesUploaded}", addFiles(this.valid))
|
|
11574
|
+
.replace("{filesInProgress}", addFiles(this.inprogress))
|
|
11575
|
+
.replace("{filesTotal}", addFiles(this.total))
|
|
11576
|
+
.replace("{filesWithErrors}", addFiles(this.invalid));
|
|
11577
|
+
};
|
|
11578
|
+
this.getStatusMessage = () => {
|
|
11579
|
+
const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
|
|
11580
|
+
const hasErrors = this.invalid > 0;
|
|
11581
|
+
const isInProgress = this.inprogress > 0;
|
|
11582
|
+
const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
|
|
11583
|
+
const isDone = this.valid === this.total && !isInProgress && !hasErrors;
|
|
11584
|
+
const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
|
|
11585
|
+
if (isDone) {
|
|
11586
|
+
this.statusMessage = this.replacePlaceHolders(done);
|
|
11587
|
+
return;
|
|
11588
|
+
}
|
|
11589
|
+
else if (isInProgressWithErrors) {
|
|
11590
|
+
this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
|
|
11591
|
+
return;
|
|
11592
|
+
}
|
|
11593
|
+
else if (isInProgress) {
|
|
11594
|
+
this.statusMessage = this.replacePlaceHolders(inProgress);
|
|
11595
|
+
return;
|
|
11596
|
+
}
|
|
11597
|
+
else if (isDoneWithErrors) {
|
|
11598
|
+
this.statusMessage = this.replacePlaceHolders(doneWithErrors);
|
|
11599
|
+
return;
|
|
11600
|
+
}
|
|
11601
|
+
return;
|
|
11602
|
+
};
|
|
11603
|
+
}
|
|
11604
|
+
watchHandler(newValue, oldValue) {
|
|
11605
|
+
if (newValue !== oldValue) {
|
|
11606
|
+
this.getStatusMessage();
|
|
11607
|
+
}
|
|
11608
|
+
}
|
|
11609
|
+
/**
|
|
11610
|
+
* render() function
|
|
11611
|
+
* Always the last one in the class.
|
|
11612
|
+
*/
|
|
11613
|
+
render() {
|
|
11614
|
+
return (h$1(Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, h$1("duet-visually-hidden", null, this.statusMessage)));
|
|
11615
|
+
}
|
|
11616
|
+
static get watchers() { return {
|
|
11617
|
+
"valid": ["watchHandler"],
|
|
11618
|
+
"invalid": ["watchHandler"],
|
|
11619
|
+
"inprogress": ["watchHandler"],
|
|
11620
|
+
"total": ["watchHandler"]
|
|
11621
|
+
}; }
|
|
11622
|
+
};
|
|
11623
|
+
|
|
9660
11624
|
const duetVisuallyHiddenCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;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}";
|
|
9661
11625
|
|
|
9662
|
-
let DuetVisuallyHidden$1 = class extends
|
|
11626
|
+
let DuetVisuallyHidden$1 = class extends H {
|
|
9663
11627
|
constructor() {
|
|
9664
11628
|
super();
|
|
9665
11629
|
this.__registerHost();
|
|
@@ -9682,19 +11646,22 @@ const DuetButton = /*@__PURE__*/proxyCustomElement(DuetButton$1, [1,"duet-button
|
|
|
9682
11646
|
const DuetCaption = /*@__PURE__*/proxyCustomElement(DuetCaption$1, [1,"duet-caption",{"theme":[1025],"margin":[1],"selected":[4],"size":[1]}]);
|
|
9683
11647
|
const DuetCard = /*@__PURE__*/proxyCustomElement(DuetCard$1, [1,"duet-card",{"accessibleLabel":[1,"accessible-label"],"heading":[1],"secondaryHeading":[1,"secondary-heading"],"variation":[1],"collapsible":[4],"open":[1540],"headingLevel":[1,"heading-level"],"icon":[1],"image":[1],"background":[1],"padding":[1],"margin":[1],"theme":[1025],"url":[1]}]);
|
|
9684
11648
|
const DuetCheckbox = /*@__PURE__*/proxyCustomElement(DuetCheckbox$1, [2,"duet-checkbox",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"margin":[1],"accessibleControls":[1,"accessible-controls"],"accessibleIndex":[1,"accessible-index"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"required":[4],"theme":[1025],"disabled":[516],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"role":[1],"checked":[1540],"value":[1537]}]);
|
|
9685
|
-
const DuetChoice = /*@__PURE__*/proxyCustomElement(DuetChoice$1, [6,"duet-choice",{"theme":[1025],"label":[1],"accessibleLabelInfoButtonDefaults":[1,"accessible-label-info-default"],"accessibleLabelInfoButton":[1,"accessible-label-info-button"],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"caption":[1],"value":[1537],"type":[513],"name":[1],"checked":[1540],"collapsible":[4],"margin":[1],"icon":[1],"expand":[4],"padding":[1],"identifier":[1],"groupDirection":[1,"group-direction"],"groupDisabled":[4,"group-disabled"],"groupResponsive":[4,"group-responsive"],"disabled":[516],"required":[4],"isHovering":[32],"isInfoOpen":[32],"isBlurred":[32]},[[2,"blur","handleHostBlur"],[2,"keydown","handleHostKeyDown"],[2,"keyup","handleHostKeyUp"]]]);
|
|
11649
|
+
const DuetChoice = /*@__PURE__*/proxyCustomElement(DuetChoice$1, [6,"duet-choice",{"theme":[1025],"label":[1],"accessibleLabelInfoButtonDefaults":[1,"accessible-label-info-default"],"accessibleLabelInfoButton":[1,"accessible-label-info-button"],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"caption":[1],"value":[1537],"type":[513],"name":[1],"checked":[1540],"collapsible":[4],"margin":[1],"icon":[1],"expand":[4],"padding":[1],"identifier":[1],"groupDirection":[1,"group-direction"],"groupDisabled":[4,"group-disabled"],"groupResponsive":[4,"group-responsive"],"disabled":[516],"required":[4],"infoLabelDefaults":[1,"accessible-label-info-default"],"infoLabel":[1,"info-label"],"isHovering":[32],"isInfoOpen":[32],"isBlurred":[32]},[[2,"blur","handleHostBlur"],[2,"keydown","handleHostKeyDown"],[2,"keyup","handleHostKeyUp"]]]);
|
|
9686
11650
|
const DuetChoiceGroup = /*@__PURE__*/proxyCustomElement(DuetChoiceGroup$1, [6,"duet-choice-group",{"direction":[1],"margin":[1],"theme":[1025],"error":[1],"name":[1],"label":[1],"labelHidden":[4,"label-hidden"],"caption":[1],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"],"responsive":[4],"value":[1537],"disabled":[4]}]);
|
|
9687
11651
|
const DuetCollapsible = /*@__PURE__*/proxyCustomElement(DuetCollapsible$1, [1,"duet-collapsible",{"theme":[1025],"heading":[1],"headingWeight":[1,"heading-weight"],"headingSize":[1,"heading-size"],"headingLevel":[1,"heading-level"],"margin":[1],"open":[1540]}]);
|
|
9688
11652
|
const DuetCookieConsent = /*@__PURE__*/proxyCustomElement(DuetCookieConsent$1, [1,"duet-cookie-consent",{"accessibleLabel":[1,"accessible-label"],"theme":[1025]}]);
|
|
9689
11653
|
const DuetDatePicker = /*@__PURE__*/proxyCustomElement(DuetDatePicker$1, [2,"duet-date-picker",{"theme":[1025],"expand":[4],"name":[1],"identifier":[1],"label":[1],"caption":[1],"margin":[1],"language":[1],"placeholderDefaults":[1,"placeholder-default"],"placeholder":[1],"echoPlaceholder":[1540,"echo-placeholder"],"disabled":[516],"error":[1],"labelHidden":[4,"label-hidden"],"role":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"required":[4],"direction":[1],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"],"value":[1537],"min":[1],"max":[1],"validity":[1040],"open":[32],"focusedDay":[32],"inputValue":[32]},[[4,"click","handleDocumentClick"]]]);
|
|
9690
11654
|
const DuetDivider = /*@__PURE__*/proxyCustomElement(DuetDivider$1, [1,"duet-divider",{"theme":[1025],"margin":[1]}]);
|
|
11655
|
+
const DuetEditableTable = /*@__PURE__*/proxyCustomElement(DuetEditableTable$1, [1,"duet-editable-table",{"items":[1040],"alignment":[1],"groupsLabelDefaults":[16],"actionLabelDefaults":[16],"groups":[1],"actions":[1],"hideGroups":[4,"hide-table-labels"],"accessibleRole":[1,"accessible-role"],"theme":[1025],"tick":[32]}]);
|
|
11656
|
+
const DuetEditableTableButton = /*@__PURE__*/proxyCustomElement(DuetEditableTableButton$1, [2,"duet-editable-table-button",{"theme":[1025],"actions":[16],"uid":[1],"group":[1],"keyName":[1,"key-name"],"isHovering":[32]}]);
|
|
11657
|
+
const DuetEditableTableItem = /*@__PURE__*/proxyCustomElement(DuetEditableTableItem$1, [1,"duet-editable-table-item",{"theme":[1025],"actions":[16],"groupId":[1,"group-id"],"alignment":[1],"keyName":[1,"key-name"],"data":[1040],"isHovering":[32]}]);
|
|
9691
11658
|
const DuetEmptyState = /*@__PURE__*/proxyCustomElement(DuetEmptyState$1, [1,"duet-empty-state",{"theme":[1025],"icon":[1],"size":[1]}]);
|
|
9692
11659
|
const DuetFieldset = /*@__PURE__*/proxyCustomElement(DuetFieldset$1, [1,"duet-fieldset",{"theme":[1025],"margin":[1],"caption":[1],"label":[1],"error":[1],"labelHidden":[4,"label-hidden"],"hasTooltip":[32]}]);
|
|
9693
11660
|
const DuetFooter = /*@__PURE__*/proxyCustomElement(DuetFooter$1, [1,"duet-footer",{"theme":[1025],"variation":[1],"margin":[1],"logoHref":[1,"logo-href"],"language":[1025],"items":[8],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"menu":[8],"processedItems":[32],"processedMenu":[32]}]);
|
|
9694
|
-
const DuetGrid = /*@__PURE__*/proxyCustomElement(DuetGrid$1, [2,"duet-grid",{"responsive":[4],"breakpoint":[1],"direction":[1],"alignment":[1],"distribution":[1],"mobile":[1]}]);
|
|
11661
|
+
const DuetGrid = /*@__PURE__*/proxyCustomElement(DuetGrid$1, [2,"duet-grid",{"responsive":[4],"breakpoint":[1],"direction":[1],"alignment":[1],"distribution":[1],"mobile":[1],"distributeFormElement":[32]}]);
|
|
9695
11662
|
const DuetGridItem = /*@__PURE__*/proxyCustomElement(DuetGridItem$1, [2,"duet-grid-item",{"fill":[4],"maxWidth":[1,"max-width"],"minWidth":[1,"min-width"],"theme":[1025],"margin":[1],"responsive":[4],"breakpoint":[1]}]);
|
|
9696
|
-
const DuetHeader = /*@__PURE__*/proxyCustomElement(DuetHeader$1, [1,"duet-header",{"theme":[1025],"language":[1025],"accessibleI18nLabelsDefaults":[1,"accessible-labels-default"],"accessibleI18nLabels":[16],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"accessibleLabelDefaults":[1,"accessible-label-default"],"accessibleLabel":[1,"accessible-label"],"user":[8],"logoHref":[1,"logo-href"],"currentHref":[1025,"current-href"],"skipToId":[1,"skip-to-id"],"items":[8],"region":[1],"session":[8],"back":[8],"contact":[1],"contactItems":[8,"contact-items"],"languageItems":[8,"language-items"],"isContactOpen":[32],"isLanguageOpen":[32],"isSlideOutOpen":[32],"processedItems":[32],"processedLanguageItems":[32],"processedContactItems":[32],"processedSession":[32],"processedUser":[32],"processedBack":[32]},[[8,"keyup","handleKeyUp"],[8,"keydown","handleKeyDown"],[4,"focus","handleDocumentClick"],[4,"click","handleDocumentClick"]]]);
|
|
9697
|
-
const DuetHeading = /*@__PURE__*/proxyCustomElement(DuetHeading$1, [1,"duet-heading",{"level":[513],"margin":[1],"visualLevel":[1,"visual-level"],"border":[
|
|
11663
|
+
const DuetHeader = /*@__PURE__*/proxyCustomElement(DuetHeader$1, [1,"duet-header",{"theme":[1025],"language":[1025],"accessibleI18nLabelsDefaults":[1,"accessible-labels-default"],"accessibleI18nLabels":[16],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"accessibleLabelDefaults":[1,"accessible-label-default"],"accessibleLabel":[1,"accessible-label"],"user":[8],"logoHref":[1,"logo-href"],"currentHref":[1025,"current-href"],"skipToId":[1,"skip-to-id"],"items":[8],"region":[1],"session":[8],"search":[8],"back":[8],"contact":[1],"contactItems":[8,"contact-items"],"languageItems":[8,"language-items"],"isContactOpen":[32],"isLanguageOpen":[32],"isSlideOutOpen":[32],"isSegmentOpen":[32],"openMenu":[32],"closedActives":[32],"processedItems":[32],"processedLanguageItems":[32],"processedContactItems":[32],"processedSession":[32],"processedSearch":[32],"processedUser":[32],"processedBack":[32],"renderDesktopNav":[32]},[[8,"keyup","handleKeyUp"],[8,"keydown","handleKeyDown"],[4,"focus","handleDocumentClick"],[4,"click","handleDocumentClick"]]]);
|
|
11664
|
+
const DuetHeading = /*@__PURE__*/proxyCustomElement(DuetHeading$1, [1,"duet-heading",{"level":[513],"margin":[1],"visualLevel":[1,"visual-level"],"border":[8],"weight":[1],"color":[1],"theme":[1025],"hyphenate":[4]}]);
|
|
9698
11665
|
const DuetHero = /*@__PURE__*/proxyCustomElement(DuetHero$1, [1,"duet-hero",{"theme":[1025],"heading":[1],"preHeading":[1,"pre-heading"],"level":[1],"description":[1],"icon":[1],"iconSize":[1,"icon-size"],"iconRight":[4,"icon-right"],"categoryIcon":[1,"category-icon"],"categoryIconColor":[1,"category-icon-color"],"buttonLabel":[1,"button-label"],"language":[1025],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"buttonUrl":[1,"button-url"],"buttonId":[1,"button-id"],"buttonData":[16],"textCenter":[4,"text-center"],"leftAlign":[4,"left-align"],"image":[1],"variation":[1],"back":[8],"listItems":[8,"list-items"],"actions":[8],"processedListItems":[32],"processedActions":[32],"processedBack":[32]}]);
|
|
9699
11666
|
const DuetIcon = /*@__PURE__*/proxyCustomElement(DuetIcon$1, [1,"duet-icon",{"theme":[1025],"icon":[1],"src":[1],"name":[1],"margin":[1],"responsive":[4],"color":[513],"background":[1],"size":[1],"outline":[1],"svgContent":[32]}]);
|
|
9700
11667
|
const DuetInput = /*@__PURE__*/proxyCustomElement(DuetInput$1, [6,"duet-input",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleAutocomplete":[1,"accessible-autocomplete"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"debounce":[2],"caption":[1],"echoPlaceholder":[4,"echo-placeholder"],"theme":[1025],"expand":[4],"disabled":[516],"identifier":[1],"margin":[1],"required":[4],"type":[1],"label":[1],"error":[1],"labelHidden":[4,"label-hidden"],"numericKeyboard":[4,"numeric-keyboard"],"name":[1],"pattern":[1],"maxlength":[2],"minlength":[2],"placeholder":[1],"component":[1],"role":[1],"icon":[1],"autoComplete":[1,"auto-complete"],"disallowPattern":[1,"disallow-pattern"],"value":[1025],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"]}]);
|
|
@@ -9708,7 +11675,8 @@ const DuetModal = /*@__PURE__*/proxyCustomElement(DuetModal$1, [1,"duet-modal",{
|
|
|
9708
11675
|
const DuetNotification = /*@__PURE__*/proxyCustomElement(DuetNotification$1, [1,"duet-notification",{"language":[1],"accessibleLabelUnreadDefaults":[16],"accessibleLabelUnread":[1,"accessible-label-unread"],"url":[1],"date":[1],"highlight":[4],"external":[4],"theme":[1025]}]);
|
|
9709
11676
|
const DuetNotificationDrawer = /*@__PURE__*/proxyCustomElement(DuetNotificationDrawer$1, [1,"duet-notification-drawer",{"icon":[1],"label":[1],"language":[1],"accessibleLabelNotificationsDefaults":[1,"accessible-label-notification-default"],"accessibleLabelNotifications":[1,"accessible-label-notifications"],"badge":[4],"theme":[1025],"direction":[1],"isOpen":[32],"hasNotifications":[32]},[[6,"focus","handleClickFocusOutside"],[6,"click","handleClickFocusOutside"]]]);
|
|
9710
11677
|
const DuetNumberInput = /*@__PURE__*/proxyCustomElement(DuetNumberInput$1, [2,"duet-number-input",{"language":[1025],"locale":[1],"unit":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleLiveDefaults":[1,"accessible-live-default"],"accessibleLive":[1,"accessible-live"],"accessibleLiveEnabled":[4,"accessible-live-enabled"],"accessibleAddDefaults":[1,"accessible-add-default"],"accessibleAdd":[1,"accessible-add"],"accessibleSubtractDefaults":[1,"accessible-subtract-defaults"],"accessibleSubtract":[1,"accessible-subtract"],"theme":[1025],"margin":[1],"expand":[4],"identifier":[1],"min":[2],"labelDefaults":[1,"label-default"],"label":[1],"labelHidden":[4,"label-hidden"],"max":[2],"name":[1],"error":[1],"tooltip":[1],"step":[2],"rounding":[4],"role":[1],"disabled":[516],"required":[4],"value":[1025],"focusedValue":[32]}]);
|
|
9711
|
-
const DuetParagraph = /*@__PURE__*/proxyCustomElement(DuetParagraph$1, [1,"duet-paragraph",{"theme":[1025],"margin":[1],"size":[1],"variation":[1],"color":[1]}]);
|
|
11678
|
+
const DuetParagraph = /*@__PURE__*/proxyCustomElement(DuetParagraph$1, [1,"duet-paragraph",{"theme":[1025],"margin":[1],"size":[1],"weight":[1],"variation":[1],"color":[1]}]);
|
|
11679
|
+
const DuetProgress = /*@__PURE__*/proxyCustomElement(DuetProgress$1, [0,"duet-progress",{"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleLabel":[1,"accessible-label"],"accessibleLabelUploadDefaults":[1,"accessible-label-upload-defaults"],"accessibleLabelUpload":[1,"accessible-label-upload"],"progress":[1538],"caption":[1],"height":[1],"theme":[1025]}]);
|
|
9712
11680
|
const DuetRadio = /*@__PURE__*/proxyCustomElement(DuetRadio$1, [2,"duet-radio",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleIndex":[1,"accessible-index"],"margin":[1],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"theme":[1025],"disabled":[516],"required":[4],"blockEvents":[4,"block-events"],"identifier":[1],"label":[1],"name":[1],"role":[1],"groupDisabled":[4,"group-disabled"],"groupDirection":[1,"group-direction"],"groupResponsive":[4,"group-responsive"],"checked":[1540],"value":[1537]}]);
|
|
9713
11681
|
const DuetRadioGroup = /*@__PURE__*/proxyCustomElement(DuetRadioGroup$1, [6,"duet-radio-group",{"direction":[1],"margin":[1],"theme":[1025],"error":[1],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"],"name":[1],"label":[1],"labelHidden":[4,"label-hidden"],"caption":[1],"responsive":[4],"value":[1537],"disabled":[4]}]);
|
|
9714
11682
|
const DuetRangeSlider = /*@__PURE__*/proxyCustomElement(DuetRangeSlider$1, [2,"duet-range-slider",{"theme":[1025],"margin":[1],"expand":[4],"identifier":[1],"name":[1],"required":[4],"disabled":[516],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"min":[2],"label":[1],"labelHidden":[4,"label-hidden"],"unit":[1],"max":[2],"step":[2],"locale":[1],"value":[1026],"debounce":[2]}]);
|
|
@@ -9724,6 +11692,8 @@ const DuetTextarea = /*@__PURE__*/proxyCustomElement(DuetTextarea$1, [2,"duet-te
|
|
|
9724
11692
|
const DuetToggle = /*@__PURE__*/proxyCustomElement(DuetToggle$1, [2,"duet-toggle",{"theme":[1025],"margin":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"label":[1],"required":[4],"disabled":[516],"checked":[1540],"value":[1537],"identifier":[1],"name":[1],"role":[1]}]);
|
|
9725
11693
|
const DuetTooltip = /*@__PURE__*/proxyCustomElement(DuetTooltip$1, [1,"duet-tooltip",{"theme":[1025],"language":[1025],"accessibleLabelDefault":[1,"accessible-label-default"],"accessibleLabel":[1,"accessible-label"],"accessibleInputLabel":[1,"accessible-input-label"],"accessibleCloseLabelDefault":[1,"accessible-close-label-default"],"accessibleCloseLabel":[1,"accessible-close-label"],"label":[1],"breakpoint":[1],"direction":[1],"positionVertical":[513,"position-vertical"],"positionHorizontal":[513,"position-horizontal"],"active":[1540],"openDown":[32]},[[9,"scroll","onScroll"],[4,"click","handleDocumentClick"]]]);
|
|
9726
11694
|
const DuetTray = /*@__PURE__*/proxyCustomElement(DuetTray$1, [1,"duet-tray",{"language":[1025],"accessibleCloseLabelDefaults":[1,"accessible-close-label-default"],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleOpenLabelDefaults":[1,"accessible-open-label-default"],"accessibleOpenLabel":[1,"accessible-open-label"],"theme":[1025],"active":[516],"autoHide":[4,"auto-hide"],"responsive":[4],"expanded":[32],"hiddenState":[32]},[[9,"scroll","getFrame"],[16,"click","handleBodyClick"]]]);
|
|
11695
|
+
const DuetUpload = /*@__PURE__*/proxyCustomElement(DuetUpload$1, [1,"duet-upload",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"external":[4],"hideButton":[4,"hide-upload-button"],"actions":[1],"uri":[1],"showLinks":[4,"show-links"],"caption":[1],"statusLabelDefaults":[1,"status-label-default"],"statusMessageLabel":[1,"status-message-label"],"buttonLabelDefaults":[1,"button-label-default"],"buttonLabel":[1,"button-label"],"accessibleButtonLabel":[1,"accessible-button-label"],"theme":[1025],"disabled":[516],"identifier":[1],"margin":[1],"required":[4],"groups":[1],"alignment":[1],"hideGroups":[4,"hide-table-labels"],"files":[1040],"valid":[1540],"labelDefaults":[1,"label-default"],"label":[1],"descriptionDefaults":[1,"description-default"],"description":[1],"fileListEmptyDefaults":[1,"list-empty-default"],"fileListEmpty":[1,"file-list-empty"],"error":[1],"name":[1],"maxBytes":[2,"max-bytes"],"maxBytesTotal":[2,"max-bytes-total"],"maxFiles":[2,"max-files"],"allowedExtensions":[1,"allowed-extensions"],"allowedMimetypes":[1,"allowed-mimetypes"],"multiple":[4],"limitSelection":[4,"limit-selection"],"value":[1025],"tick":[32]}]);
|
|
11696
|
+
const DuetUploadAriaStatus = /*@__PURE__*/proxyCustomElement(DuetUploadAriaStatus$1, [1,"duet-upload-aria-status",{"statusMessageLabel":[16],"accessibleAriaLive":[1,"accessible-aria-live"],"valid":[2],"total":[2],"invalid":[2],"inprogress":[2],"statusMessage":[32]}]);
|
|
9727
11697
|
const DuetVisuallyHidden = /*@__PURE__*/proxyCustomElement(DuetVisuallyHidden$1, [1,"duet-visually-hidden"]);
|
|
9728
11698
|
const defineCustomElements = (opts) => {
|
|
9729
11699
|
if (typeof customElements !== 'undefined') {
|
|
@@ -9740,6 +11710,9 @@ const defineCustomElements = (opts) => {
|
|
|
9740
11710
|
DuetCookieConsent,
|
|
9741
11711
|
DuetDatePicker,
|
|
9742
11712
|
DuetDivider,
|
|
11713
|
+
DuetEditableTable,
|
|
11714
|
+
DuetEditableTableButton,
|
|
11715
|
+
DuetEditableTableItem,
|
|
9743
11716
|
DuetEmptyState,
|
|
9744
11717
|
DuetFieldset,
|
|
9745
11718
|
DuetFooter,
|
|
@@ -9761,6 +11734,7 @@ const defineCustomElements = (opts) => {
|
|
|
9761
11734
|
DuetNotificationDrawer,
|
|
9762
11735
|
DuetNumberInput,
|
|
9763
11736
|
DuetParagraph,
|
|
11737
|
+
DuetProgress,
|
|
9764
11738
|
DuetRadio,
|
|
9765
11739
|
DuetRadioGroup,
|
|
9766
11740
|
DuetRangeSlider,
|
|
@@ -9776,6 +11750,8 @@ const defineCustomElements = (opts) => {
|
|
|
9776
11750
|
DuetToggle,
|
|
9777
11751
|
DuetTooltip,
|
|
9778
11752
|
DuetTray,
|
|
11753
|
+
DuetUpload,
|
|
11754
|
+
DuetUploadAriaStatus,
|
|
9779
11755
|
DuetVisuallyHidden
|
|
9780
11756
|
].forEach(cmp => {
|
|
9781
11757
|
if (!customElements.get(cmp.is)) {
|
|
@@ -9786,7 +11762,7 @@ const defineCustomElements = (opts) => {
|
|
|
9786
11762
|
};
|
|
9787
11763
|
|
|
9788
11764
|
/*
|
|
9789
|
-
Stencil Client Platform v2.
|
|
11765
|
+
Stencil Client Platform v2.12.1 | MIT Licensed | https://stenciljs.com
|
|
9790
11766
|
*/
|
|
9791
11767
|
/**
|
|
9792
11768
|
* @license
|
|
@@ -9854,6 +11830,7 @@ const extractCommentsWithHash = (input) => {
|
|
|
9854
11830
|
};
|
|
9855
11831
|
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
|
9856
11832
|
const _curlyRe = /([{}])/g;
|
|
11833
|
+
const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
|
|
9857
11834
|
const OPEN_CURLY = '{';
|
|
9858
11835
|
const CLOSE_CURLY = '}';
|
|
9859
11836
|
const BLOCK_PLACEHOLDER = '%BLOCK%';
|
|
@@ -10006,17 +11983,18 @@ const selectorNeedsScoping = (selector, scopeSelector) => {
|
|
|
10006
11983
|
const re = makeScopeMatcher(scopeSelector);
|
|
10007
11984
|
return !re.test(selector);
|
|
10008
11985
|
};
|
|
11986
|
+
const injectScopingSelector = (selector, scopingSelector) => {
|
|
11987
|
+
return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
|
|
11988
|
+
return before + scopingSelector + colon + after;
|
|
11989
|
+
});
|
|
11990
|
+
};
|
|
10009
11991
|
const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
10010
11992
|
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
|
10011
11993
|
_polyfillHostRe.lastIndex = 0;
|
|
10012
11994
|
if (_polyfillHostRe.test(selector)) {
|
|
10013
11995
|
const replaceBy = `.${hostSelector}`;
|
|
10014
11996
|
return selector
|
|
10015
|
-
.replace(_polyfillHostNoCombinatorRe, (_, selector) =>
|
|
10016
|
-
return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
10017
|
-
return before + replaceBy + colon + after;
|
|
10018
|
-
});
|
|
10019
|
-
})
|
|
11997
|
+
.replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
|
|
10020
11998
|
.replace(_polyfillHostRe, replaceBy + ' ');
|
|
10021
11999
|
}
|
|
10022
12000
|
return scopeSelector + ' ' + selector;
|
|
@@ -10037,10 +12015,7 @@ const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
|
10037
12015
|
// remove :host since it should be unnecessary
|
|
10038
12016
|
const t = p.replace(_polyfillHostRe, '');
|
|
10039
12017
|
if (t.length > 0) {
|
|
10040
|
-
|
|
10041
|
-
if (matches) {
|
|
10042
|
-
scopedP = matches[1] + className + matches[2] + matches[3];
|
|
10043
|
-
}
|
|
12018
|
+
scopedP = injectScopingSelector(t, className);
|
|
10044
12019
|
}
|
|
10045
12020
|
}
|
|
10046
12021
|
return scopedP;
|
|
@@ -10178,4 +12153,4 @@ const shadowCss = /*#__PURE__*/Object.freeze({
|
|
|
10178
12153
|
scopeCss: scopeCss
|
|
10179
12154
|
});
|
|
10180
12155
|
|
|
10181
|
-
export { DuetAlert, DuetBadge, DuetButton, DuetCaption, DuetCard, DuetCheckbox, DuetChoice, DuetChoiceGroup, DuetCollapsible, DuetCookieConsent, DuetDatePicker, DuetDivider, DuetEmptyState, DuetFieldset, DuetFooter, DuetGrid, DuetGridItem, DuetHeader, DuetHeading, DuetHero, DuetIcon, DuetInput, DuetLabel, DuetLayout, DuetLink, DuetList, DuetListItem, DuetLogo, DuetModal, DuetNotification, DuetNotificationDrawer, DuetNumberInput, DuetParagraph, DuetRadio, DuetRadioGroup, DuetRangeSlider, DuetSelect, DuetSpacer, DuetSpinner, DuetStep, DuetStepper, DuetTab, DuetTabGroup, DuetTable, DuetTextarea, DuetToggle, DuetTooltip, DuetTray, DuetVisuallyHidden, defineCustomElements, setAssetPath, setPlatformOptions };
|
|
12156
|
+
export { DuetAlert, DuetBadge, DuetButton, DuetCaption, DuetCard, DuetCheckbox, DuetChoice, DuetChoiceGroup, DuetCollapsible, DuetCookieConsent, DuetDatePicker, DuetDivider, DuetEditableTable, DuetEditableTableButton, DuetEditableTableItem, DuetEmptyState, DuetFieldset, DuetFooter, DuetGrid, DuetGridItem, DuetHeader, DuetHeading, DuetHero, DuetIcon, DuetInput, DuetLabel, DuetLayout, DuetLink, DuetList, DuetListItem, DuetLogo, DuetModal, DuetNotification, DuetNotificationDrawer, DuetNumberInput, DuetParagraph, DuetProgress, DuetRadio, DuetRadioGroup, DuetRangeSlider, DuetSelect, DuetSpacer, DuetSpinner, DuetStep, DuetStepper, DuetTab, DuetTabGroup, DuetTable, DuetTextarea, DuetToggle, DuetTooltip, DuetTray, DuetUpload, DuetUploadAriaStatus, DuetVisuallyHidden, defineCustomElements, setAssetPath, setPlatformOptions };
|