@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
package/hydrate/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
/*!
|
|
9
|
-
Stencil Mock Doc v2.
|
|
9
|
+
Stencil Mock Doc v2.12.1 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
const CONTENT_REF_ID = 'r';
|
|
12
12
|
const ORG_LOCATION_ID = 'o';
|
|
@@ -551,7 +551,7 @@ class MockCSSStyleDeclaration {
|
|
|
551
551
|
const splt = rule.split(':');
|
|
552
552
|
if (splt.length > 1) {
|
|
553
553
|
const prop = splt[0].trim();
|
|
554
|
-
const value = splt
|
|
554
|
+
const value = splt.slice(1).join(':').trim();
|
|
555
555
|
if (prop !== '' && value !== '') {
|
|
556
556
|
this._styles.set(jsCaseToCssCase(prop), value);
|
|
557
557
|
}
|
|
@@ -1514,6 +1514,9 @@ class MockNode {
|
|
|
1514
1514
|
return null;
|
|
1515
1515
|
}
|
|
1516
1516
|
contains(otherNode) {
|
|
1517
|
+
if (otherNode === this) {
|
|
1518
|
+
return true;
|
|
1519
|
+
}
|
|
1517
1520
|
return this.childNodes.includes(otherNode);
|
|
1518
1521
|
}
|
|
1519
1522
|
removeChild(childNode) {
|
|
@@ -4701,7 +4704,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
4701
4704
|
|
|
4702
4705
|
|
|
4703
4706
|
const NAMESPACE = 'duet';
|
|
4704
|
-
const BUILD = /* duet */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender:
|
|
4707
|
+
const BUILD = /* duet */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
4705
4708
|
|
|
4706
4709
|
const TAB_KEY = 9;
|
|
4707
4710
|
var appGlobalScript = () => {
|
|
@@ -5170,7 +5173,8 @@ const createElm = (e, t, o, n) => {
|
|
|
5170
5173
|
const n = createTime("scheduleUpdate", e.$cmpMeta$.$tagName$), s = e.$lazyInstance$ ;
|
|
5171
5174
|
let l;
|
|
5172
5175
|
return t ? ((e.$flags$ |= 256, e.$queuedListeners$ && (e.$queuedListeners$.map((([e, t]) => safeCall(s, e, t))),
|
|
5173
|
-
e.$queuedListeners$ = null)), (l = safeCall(s, "componentWillLoad"))) : (BUILD.cmpWillUpdate ),
|
|
5176
|
+
e.$queuedListeners$ = null)), (l = safeCall(s, "componentWillLoad"))) : (BUILD.cmpWillUpdate ), (l = then(l, (() => safeCall(s, "componentWillRender")))),
|
|
5177
|
+
n(), then(l, (() => updateComponent(e, s, t)));
|
|
5174
5178
|
}, updateComponent = async (e, t, o) => {
|
|
5175
5179
|
const n = e.$hostElement$, s = createTime("update", e.$cmpMeta$.$tagName$), l = n["s-rc"];
|
|
5176
5180
|
o && attachStyles(e);
|
|
@@ -5635,6 +5639,9 @@ const getLocale = (lang) => {
|
|
|
5635
5639
|
}
|
|
5636
5640
|
throw new Error(`Locale for "${lang}" not found`);
|
|
5637
5641
|
};
|
|
5642
|
+
/**
|
|
5643
|
+
* Takes any json object that is passed and/or htmlencoded and converts it to proper json
|
|
5644
|
+
*/
|
|
5638
5645
|
const sanitizeString = (string) => {
|
|
5639
5646
|
const argIsString = typeof string === "string";
|
|
5640
5647
|
if (argIsString) {
|
|
@@ -5642,7 +5649,7 @@ const sanitizeString = (string) => {
|
|
|
5642
5649
|
return JSON.parse(convertHtmlQuotes(string));
|
|
5643
5650
|
}
|
|
5644
5651
|
catch (e) {
|
|
5645
|
-
console.log("
|
|
5652
|
+
console.log("sanitizeString received a string, that didnt parse to json object", string, e);
|
|
5646
5653
|
}
|
|
5647
5654
|
}
|
|
5648
5655
|
return string;
|
|
@@ -5654,7 +5661,7 @@ const sanitizeString = (string) => {
|
|
|
5654
5661
|
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
|
|
5655
5662
|
* @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
|
|
5656
5663
|
* @default {object} {locale: "fi-FI", money: "€"}
|
|
5657
|
-
* @returns {(string|Object)} given example contains {fi:"something"} and
|
|
5664
|
+
* @returns {(string|Object)} given example contains {fi:"something"} and language===fi this will return "something"
|
|
5658
5665
|
*/
|
|
5659
5666
|
const getLocaleString = (langObject, languageOverride) => {
|
|
5660
5667
|
const obj = sanitizeString(langObject);
|
|
@@ -5962,6 +5969,7 @@ const sizeTappableSquare = "48px";
|
|
|
5962
5969
|
const sizeIconXSmall = "16px";
|
|
5963
5970
|
const sizeIconXxxSmall = "7px";
|
|
5964
5971
|
const sizeButtonBorder = "2px";
|
|
5972
|
+
const sizeButtonTinyBorder = "1px";
|
|
5965
5973
|
const sizeIconMedium = "24px";
|
|
5966
5974
|
const sizeIconSmall = "20px";
|
|
5967
5975
|
const opacity85 = "0.85";
|
|
@@ -6111,6 +6119,7 @@ var tokens$2 = /*#__PURE__*/Object.freeze({
|
|
|
6111
6119
|
sizeIconXSmall: sizeIconXSmall,
|
|
6112
6120
|
sizeIconXxxSmall: sizeIconXxxSmall,
|
|
6113
6121
|
sizeButtonBorder: sizeButtonBorder,
|
|
6122
|
+
sizeButtonTinyBorder: sizeButtonTinyBorder,
|
|
6114
6123
|
sizeIconMedium: sizeIconMedium,
|
|
6115
6124
|
sizeIconSmall: sizeIconSmall,
|
|
6116
6125
|
opacity85: opacity85,
|
|
@@ -6144,26 +6153,73 @@ var tokens$2 = /*#__PURE__*/Object.freeze({
|
|
|
6144
6153
|
mediaQueryXxxLarge: mediaQueryXxxLarge
|
|
6145
6154
|
});
|
|
6146
6155
|
|
|
6147
|
-
const
|
|
6148
|
-
function
|
|
6149
|
-
|
|
6156
|
+
const allowedThemes = ["turva"];
|
|
6157
|
+
function isDashCase(str) {
|
|
6158
|
+
const dash = str.includes("-");
|
|
6159
|
+
const barredString = str.includes(" ") || str.includes("_");
|
|
6160
|
+
const barredStartingString = str.charAt(0) === "-";
|
|
6161
|
+
return dash && !barredString && !barredStartingString;
|
|
6162
|
+
}
|
|
6163
|
+
function capitalize(str = "") {
|
|
6164
|
+
return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
|
|
6165
|
+
}
|
|
6166
|
+
function lowerCaseFirst(str = "") {
|
|
6167
|
+
return `${str.charAt(0).toLowerCase()}${str.slice(1)}`;
|
|
6168
|
+
}
|
|
6169
|
+
function camelize(str = "") {
|
|
6170
|
+
const arr = str.split("-");
|
|
6171
|
+
//loop through each element of the array and capitalize the first letter.'
|
|
6172
|
+
arr.forEach((string, index) => {
|
|
6173
|
+
arr[index] = capitalize(string);
|
|
6174
|
+
});
|
|
6175
|
+
return arr.join("");
|
|
6150
6176
|
}
|
|
6151
|
-
function
|
|
6152
|
-
|
|
6177
|
+
function getTheme(theme = "") {
|
|
6178
|
+
if (allowedThemes.includes(theme.toLowerCase())) {
|
|
6179
|
+
return theme.toLowerCase();
|
|
6180
|
+
}
|
|
6181
|
+
return "";
|
|
6182
|
+
}
|
|
6183
|
+
function hasColor(str = "") {
|
|
6184
|
+
return str.indexOf("Color") === 0 || str.indexOf("color") === 0;
|
|
6153
6185
|
}
|
|
6154
|
-
function
|
|
6155
|
-
if (
|
|
6156
|
-
return
|
|
6186
|
+
function addColor(str = "") {
|
|
6187
|
+
if (str && !isDashCase(str) && !hasColor(str)) {
|
|
6188
|
+
return `color${capitalize(str)}`;
|
|
6157
6189
|
}
|
|
6158
|
-
|
|
6159
|
-
|
|
6190
|
+
return str;
|
|
6191
|
+
}
|
|
6192
|
+
function addTheme(str, theme) {
|
|
6193
|
+
const hasTheme = getTheme(theme).length;
|
|
6194
|
+
if (hasTheme && str.indexOf(theme) === -1) {
|
|
6195
|
+
return `${str}${capitalize(theme)}`;
|
|
6160
6196
|
}
|
|
6161
|
-
return
|
|
6197
|
+
return str;
|
|
6162
6198
|
}
|
|
6163
|
-
function getColorByName(name) {
|
|
6164
|
-
if (name) {
|
|
6165
|
-
return
|
|
6199
|
+
function getColorByName(name, theme = "") {
|
|
6200
|
+
if (!name) {
|
|
6201
|
+
return undefined;
|
|
6166
6202
|
}
|
|
6203
|
+
const defaultColor = convertToColorName(name);
|
|
6204
|
+
const themedColor = convertToColorName(name, theme);
|
|
6205
|
+
// lets just try to get the color first to save some cycles
|
|
6206
|
+
let resolvedToken = tokens$2[themedColor];
|
|
6207
|
+
if (!resolvedToken) {
|
|
6208
|
+
resolvedToken = tokens$2[defaultColor];
|
|
6209
|
+
}
|
|
6210
|
+
return resolvedToken;
|
|
6211
|
+
}
|
|
6212
|
+
function convertToColorName(name = "", theme = "") {
|
|
6213
|
+
let colorResolution = name;
|
|
6214
|
+
const dash = isDashCase(name);
|
|
6215
|
+
if (dash) {
|
|
6216
|
+
colorResolution = camelize(colorResolution);
|
|
6217
|
+
}
|
|
6218
|
+
colorResolution = addColor(colorResolution);
|
|
6219
|
+
colorResolution = addTheme(colorResolution, theme);
|
|
6220
|
+
// takes care of the case where colorPrimaryDark ends up with ColorPrimaryDark
|
|
6221
|
+
colorResolution = lowerCaseFirst(colorResolution);
|
|
6222
|
+
return colorResolution;
|
|
6167
6223
|
}
|
|
6168
6224
|
|
|
6169
6225
|
const duetButtonCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-button,*.sc-duet-button::after,*.sc-duet-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-button-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;position:relative;z-index:1;display:inline-flex;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}/*!@:host:last-child, :host:last-of-type*/.sc-duet-button-h:last-child,.sc-duet-button-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){/*!@:host*/.sc-duet-button-h{width:100%}}/*!@:host(.duet-small)*/.duet-small.sc-duet-button-h{margin-right:2px !important;margin-bottom:8px !important}/*!@:host(.duet-small):last-child, :host(.duet-small):last-of-type*/.duet-small.sc-duet-button-h:last-child,.duet-small.sc-duet-button-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){/*!@:host(.duet-small)*/.duet-small.sc-duet-button-h{width:auto}}/*!@:host(.duet-expand)*/.duet-expand.sc-duet-button-h{width:100% !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-button-h{margin:0 !important}/*!@:host(.duet-fixed)*/.duet-fixed.sc-duet-button-h{width:auto !important}/*!@:host(:last-child)*/.sc-duet-button-h:last-child{margin-right:0 !important}/*!@.duet-button-container*/.duet-button-container.sc-duet-button{position:relative;width:100%}/*!@.duet-button*/.duet-button.sc-duet-button{padding:14px 27px 15px !important;-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;min-width:8rem;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#0077b3 !important;text-align:center;text-decoration:none;cursor:pointer;background:transparent;border-style:solid;border-width:2px;border-radius:20rem;transition:background-color 300ms ease, color 300ms ease, border 300ms ease, box-shadow 300ms ease}/*!@.duet-button.duet-p-0*/.duet-button.duet-p-0.sc-duet-button{padding:0 !important}/*!@.duet-button.duet-m-0*/.duet-button.duet-m-0.sc-duet-button{margin:0 !important}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only)*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only){padding:9px 19px 10px !important;min-width:5.3333333333rem;font-size:0.875rem}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only).icon{padding-left:48px !important}/*!@.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right*/.duet-button.duet-button-is-small.sc-duet-button:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}/*!@.duet-theme-turva .duet-button*/.duet-theme-turva.sc-duet-button .duet-button.sc-duet-button{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30 !important}/*!@.duet-button .duet-button-contents*/.duet-button.sc-duet-button .duet-button-contents.sc-duet-button{position:relative;display:inline-block;margin:0 auto;pointer-events:none}/*!@.duet-button.duet-no-wrap*/.duet-button.duet-no-wrap.sc-duet-button{white-space:nowrap}/*!@.duet-button.icon*/.duet-button.icon.sc-duet-button{padding-left:52px !important}/*!@.duet-button.icon-right*/.duet-button.icon-right.sc-duet-button{padding-right:52px !important;padding-left:28px !important}/*!@.duet-button svg*/.duet-button.sc-duet-button svg.sc-duet-button{width:100%;min-width:100%;fill:currentColor}/*!@.duet-button .duet-button-icon*/.duet-button.sc-duet-button .duet-button-icon.sc-duet-button{position:absolute;top:50%;left:-28px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 !important;transform:translateY(-50%)}/*!@.duet-button .duet-button-icon duet-icon*/.duet-button.sc-duet-button .duet-button-icon.sc-duet-button duet-icon.sc-duet-button{width:16px;height:16px}/*!@.duet-button .duet-button-icon.right*/.duet-button.sc-duet-button .duet-button-icon.right.sc-duet-button{right:-28px;left:auto}/*!@.duet-button .duet-button-icon.large*/.duet-button.sc-duet-button .duet-button-icon.large.sc-duet-button{left:-32px;width:20px;height:20px}/*!@.duet-button .duet-button-icon.large duet-icon*/.duet-button.sc-duet-button .duet-button-icon.large.sc-duet-button duet-icon.sc-duet-button{width:20px;height:20px}/*!@.duet-button .duet-button-icon.large.right*/.duet-button.sc-duet-button .duet-button-icon.large.right.sc-duet-button{right:-32px;left:auto}/*!@.duet-button .duet-button-icon.medium-small*/.duet-button.sc-duet-button .duet-button-icon.medium-small.sc-duet-button{left:-16px;width:10px;height:10px;padding-top:1px}/*!@.duet-button .duet-button-icon.medium-small duet-icon*/.duet-button.sc-duet-button .duet-button-icon.medium-small.sc-duet-button duet-icon.sc-duet-button{width:10px;height:10px}/*!@.duet-button .duet-button-icon.medium-small.right*/.duet-button.sc-duet-button .duet-button-icon.medium-small.right.sc-duet-button{right:-16px;left:auto}/*!@.duet-button .duet-button-icon.small*/.duet-button.sc-duet-button .duet-button-icon.small.sc-duet-button{left:-16px;width:7px;height:7px}/*!@.duet-button .duet-button-icon.small duet-icon*/.duet-button.sc-duet-button .duet-button-icon.small.sc-duet-button duet-icon.sc-duet-button{width:7px;height:7px}/*!@.duet-button .duet-button-icon.small.right*/.duet-button.sc-duet-button .duet-button-icon.small.right.sc-duet-button{right:-16px;left:auto}/*!@.duet-button:focus*/.duet-button.sc-duet-button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@.duet-theme-turva .duet-button:focus*/.duet-theme-turva.sc-duet-button .duet-button.sc-duet-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-button:active*/.duet-button.sc-duet-button:active{opacity:0.75;transition:none}/*!@.duet-button.default*/.duet-button.default.sc-duet-button{border-color:#e1e3e6}/*!@.duet-theme-turva .duet-button.default*/.duet-theme-turva.sc-duet-button .duet-button.default.sc-duet-button{color:#c60c30 !important;border-color:#e4e4e6}/*!@.duet-button.default:hover*/.duet-button.default.sc-duet-button:hover{border-color:#0077b3}/*!@.duet-theme-turva .duet-button.default:hover*/.duet-theme-turva.sc-duet-button .duet-button.default.sc-duet-button:hover{border-color:#c60c30}/*!@.duet-button.default.duet-button-negative*/.duet-button.default.duet-button-negative.sc-duet-button{background-color:white}/*!@.duet-theme-turva .duet-button.default.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.default.duet-button-negative.sc-duet-button{background-color:#e4e4e6 !important}/*!@.duet-button.default.duet-button-negative:hover*/.duet-button.default.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.default.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.default.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.primary*/.duet-button.primary.sc-duet-button{color:white !important;background:#0077b3;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.primary*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button{color:white !important;background:#c60c30;border-color:#c60c30}/*!@.duet-button.primary:hover*/.duet-button.primary.sc-duet-button:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}/*!@.duet-theme-turva .duet-button.primary:hover*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button:hover{background:#940925;border-color:#940925}/*!@.duet-button.primary:focus*/.duet-button.primary.sc-duet-button:focus{outline:0;box-shadow:0 0 0 1px white, 0 0 0 4px rgba(0, 119, 179, 0.75)}/*!@.duet-theme-turva .duet-button.primary:focus*/.duet-theme-turva.sc-duet-button .duet-button.primary.sc-duet-button:focus{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}/*!@.duet-button.secondary*/.duet-button.secondary.sc-duet-button{color:#00294d !important;background:transparent;border-color:#00294d}/*!@.duet-theme-turva .duet-button.secondary*/.duet-theme-turva.sc-duet-button .duet-button.secondary.sc-duet-button{color:#171c3a !important;border-color:#171c3a}/*!@.duet-button.secondary:hover*/.duet-button.secondary.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.secondary:hover*/.duet-theme-turva.sc-duet-button .duet-button.secondary.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.secondary.duet-button-negative*/.duet-button.secondary.duet-button-negative.sc-duet-button{color:#e1e3e6 !important;border-color:white}/*!@.duet-theme-turva .duet-button.secondary.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.secondary.duet-button-negative.sc-duet-button{color:#e4e4e6 !important}/*!@.duet-button.secondary.duet-button-negative:hover*/.duet-button.secondary.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important;border-color:#0077b3}/*!@.duet-theme-turva .duet-button.secondary.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.secondary.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important;border-color:#c60c30}/*!@.duet-button.negative*/.duet-button.negative.sc-duet-button{color:#00294d !important;background:white;border-color:white}/*!@.duet-theme-turva .duet-button.negative*/.duet-theme-turva.sc-duet-button .duet-button.negative.sc-duet-button{color:#171c3a !important}/*!@.duet-button.negative:hover*/.duet-button.negative.sc-duet-button:hover{color:white !important;background:transparent;border-color:white}/*!@.duet-button.negative:focus*/.duet-button.negative.sc-duet-button:focus{outline:0;box-shadow:0 0 0 1px #00294d, 0 0 0 4px rgba(255, 255, 255, 0.7)}/*!@.duet-theme-turva .duet-button.negative:focus*/.duet-theme-turva.sc-duet-button .duet-button.negative.sc-duet-button:focus{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}/*!@.duet-button.destructive*/.duet-button.destructive.sc-duet-button{color:#de2362 !important;background:white;border-color:#de2362}/*!@.duet-theme-turva .duet-button.destructive*/.duet-theme-turva.sc-duet-button .duet-button.destructive.sc-duet-button{color:#e02a0d !important;background:white;border-color:#e02a0d}/*!@.duet-button.destructive:hover*/.duet-button.destructive.sc-duet-button:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}/*!@.duet-theme-turva .duet-button.destructive:hover*/.duet-theme-turva.sc-duet-button .duet-button.destructive.sc-duet-button:hover{color:white !important;background:#b3220a;border-color:#b3220a}/*!@.duet-button.plain*/.duet-button.plain.sc-duet-button{min-width:48px;padding-right:0 !important;padding-left:0 !important;line-height:1.5;text-align:left;background:transparent;border:0;border-color:transparent;border-radius:4px}/*!@.duet-theme-turva .duet-button.plain*/.duet-theme-turva.sc-duet-button .duet-button.plain.sc-duet-button{color:#c60c30 !important;background:transparent;border-color:transparent}/*!@.duet-button.plain.icon*/.duet-button.plain.icon.sc-duet-button{padding-left:20px !important}/*!@.duet-button.plain.icon.icon-right*/.duet-button.plain.icon.icon-right.sc-duet-button{padding-right:20px !important;padding-left:0 !important}/*!@.duet-button.plain.icon.medium*/.duet-button.plain.icon.medium.sc-duet-button{padding-left:24px !important}/*!@.duet-button.plain.icon.medium.icon-right*/.duet-button.plain.icon.medium.icon-right.sc-duet-button{padding-right:24px !important;padding-left:0 !important}/*!@.duet-button.plain.icon.large*/.duet-button.plain.icon.large.sc-duet-button{padding-left:30px !important}/*!@.duet-button.plain.icon.large.icon-right*/.duet-button.plain.icon.large.icon-right.sc-duet-button{padding-right:30px !important;padding-left:0 !important}/*!@.duet-button.plain .duet-button-icon.left*/.duet-button.plain.sc-duet-button .duet-button-icon.left.sc-duet-button{left:-16.6666666667px !important}/*!@.duet-button.plain .duet-button-icon.left.medium*/.duet-button.plain.sc-duet-button .duet-button-icon.left.medium.sc-duet-button{left:-24px !important}/*!@.duet-button.plain .duet-button-icon.left.large*/.duet-button.plain.sc-duet-button .duet-button-icon.left.large.sc-duet-button{left:-30px !important}/*!@.duet-button.plain .duet-button-icon.right*/.duet-button.plain.sc-duet-button .duet-button-icon.right.sc-duet-button{right:-16.6666666667px !important}/*!@.duet-button.plain .duet-button-icon.right.medium*/.duet-button.plain.sc-duet-button .duet-button-icon.right.medium.sc-duet-button{right:-24px !important}/*!@.duet-button.plain .duet-button-icon.right.large*/.duet-button.plain.sc-duet-button .duet-button-icon.right.large.sc-duet-button{right:-30px !important}/*!@.duet-button.plain[disabled]*/.duet-button.plain[disabled].sc-duet-button{color:#657787 !important;background:transparent !important;border-color:transparent !important}/*!@.duet-theme-turva .duet-button.plain[disabled]*/.duet-theme-turva.sc-duet-button .duet-button.plain[disabled].sc-duet-button{color:transparent !important;background:transparent !important;border-color:#e4e4e6 !important}/*!@.duet-button.plain:hover*/.duet-button.plain.sc-duet-button:hover{color:#004d80 !important;background:transparent !important}/*!@.duet-theme-turva .duet-button.plain:hover*/.duet-theme-turva.sc-duet-button .duet-button.plain.sc-duet-button:hover{color:#940925 !important}/*!@.duet-button.plain.duet-button-negative*/.duet-button.plain.duet-button-negative.sc-duet-button{color:white !important}/*!@.duet-theme-turva .duet-button.plain.duet-button-negative*/.duet-theme-turva.sc-duet-button .duet-button.plain.duet-button-negative.sc-duet-button{color:#e4e4e6 !important}/*!@.duet-button.plain.duet-button-negative:hover*/.duet-button.plain.duet-button-negative.sc-duet-button:hover{color:#0077b3 !important}/*!@.duet-theme-turva .duet-button.plain.duet-button-negative:hover*/.duet-theme-turva.sc-duet-button .duet-button.plain.duet-button-negative.sc-duet-button:hover{color:#c60c30 !important}/*!@.duet-button.duet-button-icon-only*/.duet-button.duet-button-icon-only.sc-duet-button{min-width:48px;min-height:48px;padding:0 !important}/*!@.duet-button.duet-button-icon-only .duet-button-contents*/.duet-button.duet-button-icon-only.sc-duet-button .duet-button-contents.sc-duet-button{position:static}/*!@.duet-button.duet-button-icon-only .duet-button-icon.left.large,\n.duet-button.duet-button-icon-only .duet-button-icon.left.medium,\n.duet-button.duet-button-icon-only .duet-button-icon.left.small*/.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.large.sc-duet-button,.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.medium.sc-duet-button,.duet-button.duet-button-icon-only.sc-duet-button .duet-button-icon.left.small.sc-duet-button{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}/*!@.duet-button[disabled], .duet-button[disabled]:hover, .duet-button.duet-button-negative[disabled], .duet-button.duet-button-negative[disabled]:hover*/.duet-button[disabled].sc-duet-button,.duet-button[disabled].sc-duet-button:hover,.duet-button.duet-button-negative[disabled].sc-duet-button,.duet-button.duet-button-negative[disabled].sc-duet-button:hover{color:#657787 !important;background:#e1e3e6 !important;border-color:#e1e3e6 !important;box-shadow:none !important}/*!@.duet-theme-turva .duet-button[disabled], .duet-theme-turva .duet-button[disabled]:hover, .duet-theme-turva .duet-button.duet-button-negative [disabled], .duet-theme-turva .duet-button.duet-button-negative [disabled]:hover*/.duet-theme-turva.sc-duet-button .duet-button[disabled].sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button[disabled].sc-duet-button:hover,.duet-theme-turva.sc-duet-button .duet-button.duet-button-negative.sc-duet-button [disabled].sc-duet-button,.duet-theme-turva.sc-duet-button .duet-button.duet-button-negative.sc-duet-button [disabled].sc-duet-button:hover{color:#747475 !important;background:#e4e4e6 !important;border-color:#e4e4e6 !important}/*!@.duet-button-is-loading.primary*/.duet-button-is-loading.primary.sc-duet-button{color:white}/*!@.duet-button-is-loading.default*/.duet-button-is-loading.default.sc-duet-button{color:#0077b3}/*!@.duet-button-is-loading.default.duet-theme-turva*/.duet-button-is-loading.default.duet-theme-turva.sc-duet-button{color:#c60c30}/*!@.duet-button-is-loading .duet-button-contents*/.duet-button-is-loading.sc-duet-button .duet-button-contents.sc-duet-button{visibility:hidden;opacity:0}";
|
|
@@ -6676,7 +6732,7 @@ class DuetCard {
|
|
|
6676
6732
|
}; }
|
|
6677
6733
|
}
|
|
6678
6734
|
|
|
6679
|
-
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-
|
|
6735
|
+
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}";
|
|
6680
6736
|
|
|
6681
6737
|
class DuetCheckbox {
|
|
6682
6738
|
constructor(hostRef) {
|
|
@@ -6809,11 +6865,24 @@ class DuetCheckbox {
|
|
|
6809
6865
|
|
|
6810
6866
|
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>"};
|
|
6811
6867
|
|
|
6868
|
+
const focusElement = (element) => {
|
|
6869
|
+
if ("setFocus" in element) {
|
|
6870
|
+
element.setFocus();
|
|
6871
|
+
}
|
|
6872
|
+
else {
|
|
6873
|
+
element.focus();
|
|
6874
|
+
}
|
|
6875
|
+
};
|
|
6876
|
+
const FocusGuard = ({ moveFocusTo }) => {
|
|
6877
|
+
return hAsync("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
|
|
6878
|
+
};
|
|
6879
|
+
|
|
6812
6880
|
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}";
|
|
6813
6881
|
|
|
6814
6882
|
/**
|
|
6815
6883
|
* @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
|
|
6816
6884
|
* @slot info - Info content. Anything inserted into this slot is displayed in a collapsible info box.
|
|
6885
|
+
* @slot collapsible_header - header that is only added to collapsible element, this header should be used when the components collapsible area contains additional interactive elements (such as form items) and should be user for a short description of the content below it, it is mandatory for good accessibility to use this - and aria-decribe-by will point to it. If you use the collapsible area with simple text - describe-by will point to this area
|
|
6817
6886
|
* @slot additional - Additional content. Anything inserted into this slot is displayed as additional content under the label and caption
|
|
6818
6887
|
*/
|
|
6819
6888
|
class DuetChoice {
|
|
@@ -6822,8 +6891,11 @@ class DuetChoice {
|
|
|
6822
6891
|
this.duetChange = createEvent$2(this, "duetChange", 7);
|
|
6823
6892
|
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
6824
6893
|
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
6894
|
+
this.hasHeader = false;
|
|
6825
6895
|
this.choiceId = createID("DuetChoice");
|
|
6826
6896
|
this.expandId = createID("DuetChoiceExpand");
|
|
6897
|
+
this.headerId = createID("DuetChoiceHeader");
|
|
6898
|
+
this.infoButtonId = createID("DuetChoiceInfoButton");
|
|
6827
6899
|
/**
|
|
6828
6900
|
* State() variables
|
|
6829
6901
|
* Inlined decorator, alphabetical order.
|
|
@@ -6901,6 +6973,24 @@ class DuetChoice {
|
|
|
6901
6973
|
* browser from displaying its own validation errors.
|
|
6902
6974
|
*/
|
|
6903
6975
|
this.required = false;
|
|
6976
|
+
/**
|
|
6977
|
+
* Placeholder defaults
|
|
6978
|
+
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
6979
|
+
*/
|
|
6980
|
+
this.infoLabelDefaults = {
|
|
6981
|
+
fi: "Lisätietoja",
|
|
6982
|
+
en: "More information about",
|
|
6983
|
+
sv: "Mera information om",
|
|
6984
|
+
};
|
|
6985
|
+
/**
|
|
6986
|
+
* Hint text to display before the user types into the date picker input.
|
|
6987
|
+
* @default {
|
|
6988
|
+
* fi: "Lisätietoja",
|
|
6989
|
+
* en: "More information about",
|
|
6990
|
+
* sv: "Mera information om",
|
|
6991
|
+
* }
|
|
6992
|
+
*/
|
|
6993
|
+
this.infoLabel = getLocaleString(this.infoLabelDefaults, getLanguage());
|
|
6904
6994
|
this.onMouseEnter = () => {
|
|
6905
6995
|
this.isHovering = true;
|
|
6906
6996
|
};
|
|
@@ -6975,6 +7065,7 @@ class DuetChoice {
|
|
|
6975
7065
|
componentWillLoad() {
|
|
6976
7066
|
inheritGlobalTheme(this);
|
|
6977
7067
|
this.hasInfo = !!this.element.querySelector("[slot='info']");
|
|
7068
|
+
this.hasHeader = !!this.element.querySelector('[slot="header"]');
|
|
6978
7069
|
this.hasAdditional = !!this.element.querySelector("[slot='additional']");
|
|
6979
7070
|
}
|
|
6980
7071
|
/**
|
|
@@ -6995,8 +7086,11 @@ class DuetChoice {
|
|
|
6995
7086
|
handleHostKeyDown() {
|
|
6996
7087
|
this.isKeyDown = true;
|
|
6997
7088
|
}
|
|
6998
|
-
handleHostKeyUp() {
|
|
7089
|
+
handleHostKeyUp(ev) {
|
|
6999
7090
|
this.isKeyDown = false;
|
|
7091
|
+
if (isEscapeKey(ev) && this.isInfoOpen) {
|
|
7092
|
+
this.toggleInfo();
|
|
7093
|
+
}
|
|
7000
7094
|
}
|
|
7001
7095
|
/**
|
|
7002
7096
|
* Sets focus on the specified `duet-choice`. Use this method instead of the global
|
|
@@ -7010,7 +7104,12 @@ class DuetChoice {
|
|
|
7010
7104
|
return this.accessibleDescribedBy;
|
|
7011
7105
|
}
|
|
7012
7106
|
if (this.collapsible || this.hasInfo) {
|
|
7013
|
-
|
|
7107
|
+
if (this.hasHeader) {
|
|
7108
|
+
return this.headerId;
|
|
7109
|
+
}
|
|
7110
|
+
else {
|
|
7111
|
+
return this.expandId;
|
|
7112
|
+
}
|
|
7014
7113
|
}
|
|
7015
7114
|
return null;
|
|
7016
7115
|
}
|
|
@@ -7059,23 +7158,13 @@ class DuetChoice {
|
|
|
7059
7158
|
info: this.isInfoOpen,
|
|
7060
7159
|
collapsible: this.collapsible,
|
|
7061
7160
|
"duet-p-0": this.padding === "none",
|
|
7062
|
-
} }, hAsync("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) }), hAsync("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick }, this.icon && (hAsync("div", { class: "duet-choice-card-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), this.label, this.hasInfo
|
|
7063
|
-
// this is an incredibly dirty way of both hiding the expanded / collapsed state text
|
|
7064
|
-
// and an extremely bad way of notifying any screenreaders about state - unfortunately
|
|
7065
|
-
// this is extremely difficult to do consistently across browsers so this hack is the best way todo it
|
|
7066
|
-
(this.collapsible && (hAsync("span", { lang: "en", style: { opacity: "0", pointerEvents: "none", fontSize: "0", lineHeight: "0" } }, this.collapsible
|
|
7067
|
-
? this.checked
|
|
7068
|
-
? ", Expanded"
|
|
7069
|
-
: ", Collapsed"
|
|
7070
|
-
: this.isInfoOpen
|
|
7071
|
-
? ", Expanded"
|
|
7072
|
-
: ", Collapsed"))), this.caption && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("duet-caption", { margin: "none", selected: this.checked }, this.caption))), this.hasAdditional && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("slot", { name: "additional" }))), hAsync("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && hAsync("div", { class: "duet-checkmark" })))), this.hasInfo && !this.collapsible && (hAsync("button", { class: {
|
|
7161
|
+
} }, hAsync("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) }), hAsync("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick }, this.icon && (hAsync("div", { class: "duet-choice-card-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), this.label, this.caption && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("duet-caption", { margin: "none", selected: this.checked }, this.caption))), this.hasAdditional && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("slot", { name: "additional" }))), hAsync("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && hAsync("div", { class: "duet-checkmark" })))), this.hasInfo && !this.collapsible && (hAsync("button", { ref: button => (this.infoButtonEl = button), id: this.infoButtonId, class: {
|
|
7073
7162
|
"duet-choice-info-toggle": true,
|
|
7074
7163
|
"duet-theme-turva": this.theme === "turva",
|
|
7075
|
-
}, 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" }, hAsync("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton), hAsync("div", { class: "duet-choice-info-icon" }, hAsync("duet-icon", { icon: messagingInfo.svg, margin: "none", size: "small", color: "currentColor" }))))), this.collapsible || this.hasInfo ? (hAsync("div", { class: this.getClassNames(), id: this.expandId }, hAsync("span", { class: {
|
|
7164
|
+
}, 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" }, hAsync("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton), hAsync("div", { class: "duet-choice-info-icon" }, hAsync("duet-icon", { icon: messagingInfo.svg, margin: "none", size: "small", color: "currentColor" }))))), this.collapsible || this.hasInfo ? (hAsync("div", { class: this.getClassNames(), id: this.expandId }, hAsync("span", { class: {
|
|
7076
7165
|
"duet-choice-section-visible": this.collapsible ? this.checked : this.isInfoOpen,
|
|
7077
7166
|
"duet-choice-section-hidden": this.collapsible ? !this.checked : !this.isInfoOpen,
|
|
7078
|
-
} }, this.hasInfo ? (hAsync("span", null, hAsync("slot", { name: "info" }), hAsync("slot", null))) : (hAsync("span", null, hAsync("slot", null)))))) : null));
|
|
7167
|
+
} }, hAsync("span", { id: this.headerId }, hAsync("slot", { name: "header" })), this.hasInfo ? (hAsync("span", null, hAsync("span", { "aria-relevant": "all", "aria-atomic": "true", "aria-live": this.isInfoOpen ? "polite" : "off" }, hAsync("slot", { name: "info" })), hAsync("slot", null))) : (hAsync("span", null, hAsync("slot", null)))), this.isInfoOpen && hAsync(FocusGuard, { moveFocusTo: this.infoButtonEl }))) : null));
|
|
7079
7168
|
}
|
|
7080
7169
|
get element() { return getElement(this); }
|
|
7081
7170
|
static get style() { return duetChoiceCss; }
|
|
@@ -7107,6 +7196,8 @@ class DuetChoice {
|
|
|
7107
7196
|
"groupResponsive": [4, "group-responsive"],
|
|
7108
7197
|
"disabled": [516],
|
|
7109
7198
|
"required": [4],
|
|
7199
|
+
"infoLabelDefaults": [1, "accessible-label-info-default"],
|
|
7200
|
+
"infoLabel": [1, "info-label"],
|
|
7110
7201
|
"isHovering": [32],
|
|
7111
7202
|
"isInfoOpen": [32],
|
|
7112
7203
|
"isBlurred": [32],
|
|
@@ -7118,19 +7209,41 @@ class DuetChoice {
|
|
|
7118
7209
|
}; }
|
|
7119
7210
|
}
|
|
7120
7211
|
|
|
7121
|
-
const
|
|
7212
|
+
const watchFor = (containerEl, tagName, onChange, changeHandler, options = {
|
|
7213
|
+
childList: true,
|
|
7214
|
+
subtree: true,
|
|
7215
|
+
}) => {
|
|
7122
7216
|
let mutation;
|
|
7123
7217
|
if (typeof MutationObserver !== "undefined") {
|
|
7124
7218
|
mutation = new MutationObserver(mutationList => {
|
|
7125
|
-
onChange(
|
|
7126
|
-
});
|
|
7127
|
-
mutation.observe(containerEl, {
|
|
7128
|
-
childList: true,
|
|
7129
|
-
subtree: true,
|
|
7219
|
+
onChange(changeHandler(mutationList, tagName));
|
|
7130
7220
|
});
|
|
7221
|
+
mutation.observe(containerEl, options);
|
|
7131
7222
|
}
|
|
7132
7223
|
return mutation;
|
|
7133
7224
|
};
|
|
7225
|
+
const watchForOptions = (containerEl, tagName, onChange) => {
|
|
7226
|
+
return watchFor(containerEl, tagName, onChange, getSelectedOption);
|
|
7227
|
+
};
|
|
7228
|
+
const watchForElement = (containerEl, tagName, onChange) => {
|
|
7229
|
+
return watchFor(containerEl, tagName, onChange, getElementItem, {
|
|
7230
|
+
childList: true,
|
|
7231
|
+
subtree: true,
|
|
7232
|
+
});
|
|
7233
|
+
};
|
|
7234
|
+
const getElementItem = (mutationList) => {
|
|
7235
|
+
let addedNode = false;
|
|
7236
|
+
let removedNode = false;
|
|
7237
|
+
mutationList.forEach(mut => {
|
|
7238
|
+
if (mut.addedNodes.length) {
|
|
7239
|
+
addedNode = true;
|
|
7240
|
+
}
|
|
7241
|
+
if (mut.removedNodes.length) {
|
|
7242
|
+
removedNode = true;
|
|
7243
|
+
}
|
|
7244
|
+
});
|
|
7245
|
+
return { addedNode, removedNode, mutationList };
|
|
7246
|
+
};
|
|
7134
7247
|
const getSelectedOption = (mutationList, tagName) => {
|
|
7135
7248
|
let newOption;
|
|
7136
7249
|
mutationList.forEach(mut => {
|
|
@@ -7438,6 +7551,7 @@ const size_tappable_square = "48px";
|
|
|
7438
7551
|
const size_icon_x_small = "16px";
|
|
7439
7552
|
const size_icon_xxx_small = "7px";
|
|
7440
7553
|
const size_button_border = "2px";
|
|
7554
|
+
const size_button_tiny_border = "1px";
|
|
7441
7555
|
const size_icon_medium = "24px";
|
|
7442
7556
|
const size_icon_small = "20px";
|
|
7443
7557
|
const opacity_85 = "0.85";
|
|
@@ -7585,6 +7699,7 @@ var tokens = {
|
|
|
7585
7699
|
size_icon_x_small: size_icon_x_small,
|
|
7586
7700
|
size_icon_xxx_small: size_icon_xxx_small,
|
|
7587
7701
|
size_button_border: size_button_border,
|
|
7702
|
+
size_button_tiny_border: size_button_tiny_border,
|
|
7588
7703
|
size_icon_medium: size_icon_medium,
|
|
7589
7704
|
size_icon_small: size_icon_small,
|
|
7590
7705
|
opacity_85: opacity_85,
|
|
@@ -7735,6 +7850,7 @@ var tokens$1 = /*#__PURE__*/Object.freeze({
|
|
|
7735
7850
|
size_icon_x_small: size_icon_x_small,
|
|
7736
7851
|
size_icon_xxx_small: size_icon_xxx_small,
|
|
7737
7852
|
size_button_border: size_button_border,
|
|
7853
|
+
size_button_tiny_border: size_button_tiny_border,
|
|
7738
7854
|
size_icon_medium: size_icon_medium,
|
|
7739
7855
|
size_icon_small: size_icon_small,
|
|
7740
7856
|
opacity_85: opacity_85,
|
|
@@ -7771,6 +7887,9 @@ var tokens$1 = /*#__PURE__*/Object.freeze({
|
|
|
7771
7887
|
|
|
7772
7888
|
const duetCollapsibleCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-collapsible,*.sc-duet-collapsible::after,*.sc-duet-collapsible::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-collapsible-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;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)*/.duet-theme-turva.sc-duet-collapsible-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}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-collapsible-h{margin:0 !important}/*!@.duet-collapsible-content*/.duet-collapsible-content.sc-duet-collapsible{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*/.duet-collapsible-content.sc-duet-collapsible{font-size:0.875rem}}/*!@.duet-collapsible-content.duet-theme-turva*/.duet-collapsible-content.duet-theme-turva.sc-duet-collapsible{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*/[open].sc-duet-collapsible-h .duet-collapsible-content.sc-duet-collapsible{display:block}/*!@.duet-collapsible-heading*/.duet-collapsible-heading.sc-duet-collapsible{-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*/.duet-collapsible-heading.duet-collapsible-normal-weight.sc-duet-collapsible{font-weight:400}/*!@.duet-collapsible-heading.duet-theme-turva*/.duet-collapsible-heading.duet-theme-turva.sc-duet-collapsible{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*/.duet-collapsible-heading.sc-duet-collapsible .duet-collapsible-heading-content.sc-duet-collapsible{flex:1}/*!@.duet-collapsible-heading:focus*/.duet-collapsible-heading.sc-duet-collapsible:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-collapsible-heading:focus*/.user-is-tabbing.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible: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*/.user-is-tabbing.duet-theme-turva.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-collapsible-heading-icon*/.duet-collapsible-heading-icon.sc-duet-collapsible{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*/.duet-collapsible-heading-icon.sc-duet-collapsible:last-child,.duet-collapsible-heading-icon.sc-duet-collapsible:last-of-type{margin-right:0 !important}/*!@[aria-expanded=true] .duet-collapsible-heading-icon*/[aria-expanded=true].sc-duet-collapsible .duet-collapsible-heading-icon.sc-duet-collapsible{transform:rotate(180deg)}";
|
|
7773
7889
|
|
|
7890
|
+
/**
|
|
7891
|
+
* @part duet-collapsible-heading-content - piercing selector for styling the heading content
|
|
7892
|
+
*/
|
|
7774
7893
|
class DuetCollapsible {
|
|
7775
7894
|
constructor(hostRef) {
|
|
7776
7895
|
registerInstance(this, hostRef);
|
|
@@ -7889,7 +8008,7 @@ class DuetCollapsible {
|
|
|
7889
8008
|
"duet-collapsible-heading": true,
|
|
7890
8009
|
"duet-theme-turva": this.theme === "turva",
|
|
7891
8010
|
"duet-collapsible-normal-weight": this.headingWeight === "normal",
|
|
7892
|
-
}, style: { "font-size": this.getFontSizeFromTokens() }, role: "button", tabindex: "0", ref: button => (this.nativeButton = button), "aria-expanded": this.open ? "true" : "false", "aria-controls": this.id, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, hAsync("div", { class: "duet-collapsible-heading-icon" }, hAsync("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: actionArrowDownSmall.svg })), hAsync("div", { class: "duet-collapsible-heading-content" }, this.heading)), hAsync("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" } }, hAsync("slot", null))));
|
|
8011
|
+
}, style: { "font-size": this.getFontSizeFromTokens() }, role: "button", tabindex: "0", ref: button => (this.nativeButton = button), "aria-expanded": this.open ? "true" : "false", "aria-controls": this.id, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, hAsync("div", { class: "duet-collapsible-heading-icon" }, hAsync("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: actionArrowDownSmall.svg })), hAsync("div", { class: "duet-collapsible-heading-content", part: "duet-collapsible-heading-content" }, this.heading)), hAsync("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" } }, hAsync("slot", null))));
|
|
7893
8012
|
}
|
|
7894
8013
|
get element() { return getElement(this); }
|
|
7895
8014
|
static get style() { return duetCollapsibleCss; }
|
|
@@ -7959,18 +8078,6 @@ class DuetCookieConsent {
|
|
|
7959
8078
|
}; }
|
|
7960
8079
|
}
|
|
7961
8080
|
|
|
7962
|
-
const focusElement = (element) => {
|
|
7963
|
-
if ("setFocus" in element) {
|
|
7964
|
-
element.setFocus();
|
|
7965
|
-
}
|
|
7966
|
-
else {
|
|
7967
|
-
element.focus();
|
|
7968
|
-
}
|
|
7969
|
-
};
|
|
7970
|
-
const FocusGuard = ({ moveFocusTo }) => {
|
|
7971
|
-
return hAsync("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
|
|
7972
|
-
};
|
|
7973
|
-
|
|
7974
8081
|
const formatOptionsShort = { day: "numeric", month: "long" };
|
|
7975
8082
|
const formatOptionsLong = { day: "numeric", month: "long", year: "numeric" };
|
|
7976
8083
|
const i18n$2 = {
|
|
@@ -8403,14 +8510,14 @@ class DuetDatePicker {
|
|
|
8403
8510
|
*/
|
|
8404
8511
|
this.margin = "auto";
|
|
8405
8512
|
/**
|
|
8406
|
-
* The currently active language. This setting changes the month/year/day
|
|
8513
|
+
* The currently active language. This setting changes the month/year/day.
|
|
8407
8514
|
* names and button labels as well as all screen reader labels.
|
|
8408
|
-
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
8515
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing.
|
|
8409
8516
|
* @default "fi"
|
|
8410
8517
|
*/
|
|
8411
8518
|
this.language = getLanguage();
|
|
8412
8519
|
/**
|
|
8413
|
-
* Placeholder defaults
|
|
8520
|
+
* Placeholder defaults.
|
|
8414
8521
|
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
8415
8522
|
*/
|
|
8416
8523
|
this.placeholderDefaults = {
|
|
@@ -8473,7 +8580,7 @@ class DuetDatePicker {
|
|
|
8473
8580
|
*/
|
|
8474
8581
|
this.min = "";
|
|
8475
8582
|
/**
|
|
8476
|
-
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD
|
|
8583
|
+
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.
|
|
8477
8584
|
* This setting can be used alone or together with the min property.
|
|
8478
8585
|
*/
|
|
8479
8586
|
this.max = "";
|
|
@@ -8857,49 +8964,221 @@ class DuetDivider {
|
|
|
8857
8964
|
}; }
|
|
8858
8965
|
}
|
|
8859
8966
|
|
|
8860
|
-
const
|
|
8967
|
+
const debounce = (func, timeout = 50) => {
|
|
8968
|
+
let timer;
|
|
8969
|
+
return (...args) => {
|
|
8970
|
+
clearTimeout(timer);
|
|
8971
|
+
timer = setTimeout(() => {
|
|
8972
|
+
func.apply(undefined, args);
|
|
8973
|
+
}, timeout);
|
|
8974
|
+
};
|
|
8975
|
+
};
|
|
8861
8976
|
|
|
8862
|
-
|
|
8977
|
+
/**
|
|
8978
|
+
* Produces a function which uses template strings to do simple interpolation from objects.
|
|
8979
|
+
*
|
|
8980
|
+
* Usage:
|
|
8981
|
+
* var makeMeKing = generateTemplateFn('${name} is now the king of ${country}!');
|
|
8982
|
+
*
|
|
8983
|
+
* console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'}));
|
|
8984
|
+
* // Logs 'Bryan is now the king of Scotland!'
|
|
8985
|
+
*/
|
|
8986
|
+
const generateTemplateFn = (function () {
|
|
8987
|
+
const cache = {};
|
|
8988
|
+
function generateTemplate(template) {
|
|
8989
|
+
if (typeof template !== "string") {
|
|
8990
|
+
template = template.outerHTML;
|
|
8991
|
+
}
|
|
8992
|
+
let fn = cache[template];
|
|
8993
|
+
if (!fn) {
|
|
8994
|
+
// Replace ${expressions} (etc) with ${map.expressions}.
|
|
8995
|
+
const sanitized = template
|
|
8996
|
+
.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g, function (_, match) {
|
|
8997
|
+
return `\$\{map.${match.trim()}\}`;
|
|
8998
|
+
})
|
|
8999
|
+
// Afterwards, replace anything that's not ${map.expressions}' (etc) with a blank string.
|
|
9000
|
+
.replace(/(\$\{(?!map\.)[^}]+\})/g, "");
|
|
9001
|
+
fn = Function("map", `return \`${sanitized}\``);
|
|
9002
|
+
}
|
|
9003
|
+
return fn;
|
|
9004
|
+
}
|
|
9005
|
+
return generateTemplate;
|
|
9006
|
+
})();
|
|
9007
|
+
|
|
9008
|
+
const duetEditableTableCss = "/*!@duet-editable-table*/duet-editable-table.sc-duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-editable-table-header tr .duet-editable-table-header-hidden*/.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";
|
|
9009
|
+
|
|
9010
|
+
class DuetEditableTable {
|
|
8863
9011
|
constructor(hostRef) {
|
|
8864
9012
|
registerInstance(this, hostRef);
|
|
9013
|
+
this.template = undefined;
|
|
8865
9014
|
/**
|
|
8866
|
-
*
|
|
9015
|
+
* State() variables
|
|
9016
|
+
* @internal
|
|
9017
|
+
*/
|
|
9018
|
+
this.tick = Date.now();
|
|
9019
|
+
/**
|
|
9020
|
+
* Map of items that contain list of things.
|
|
9021
|
+
*/
|
|
9022
|
+
this.items = new Map();
|
|
9023
|
+
/**
|
|
9024
|
+
* Key used to set vertical alignment of action buttons
|
|
9025
|
+
*/
|
|
9026
|
+
this.alignment = "middle";
|
|
9027
|
+
/**
|
|
9028
|
+
* Array of internationalized defaults for the default groups labels.
|
|
9029
|
+
*/
|
|
9030
|
+
this.groupsLabelDefaults = {
|
|
9031
|
+
fi: "Kaikki",
|
|
9032
|
+
en: "All items",
|
|
9033
|
+
sv: "Alla objekt",
|
|
9034
|
+
};
|
|
9035
|
+
/**
|
|
9036
|
+
* Array of internationalized defaults for the default action labels.
|
|
9037
|
+
*/
|
|
9038
|
+
this.actionLabelDefaults = {
|
|
9039
|
+
fi: "Toiminnot",
|
|
9040
|
+
en: "Actions",
|
|
9041
|
+
sv: "Handlingar",
|
|
9042
|
+
};
|
|
9043
|
+
/**
|
|
9044
|
+
* Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
|
|
9045
|
+
* @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
|
|
9046
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
|
|
9047
|
+
*/
|
|
9048
|
+
this.groups = [
|
|
9049
|
+
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
9050
|
+
];
|
|
9051
|
+
/**
|
|
9052
|
+
* Array of actions that are mapped via the map variable to the various groups defined in group.
|
|
9053
|
+
* @default undefined
|
|
9054
|
+
* @example [{
|
|
9055
|
+
variation: "default",
|
|
9056
|
+
icon: "action-edit-2",
|
|
9057
|
+
id: "edit",
|
|
9058
|
+
map: ["success"],
|
|
9059
|
+
label: {
|
|
9060
|
+
fi: " Label",
|
|
9061
|
+
en: " Label",
|
|
9062
|
+
sv: " Label",
|
|
9063
|
+
}
|
|
9064
|
+
}]
|
|
9065
|
+
*/
|
|
9066
|
+
this.actions = undefined;
|
|
9067
|
+
/**
|
|
9068
|
+
* Shows or hides the table labels.
|
|
9069
|
+
*/
|
|
9070
|
+
this.hideGroups = false;
|
|
9071
|
+
/**
|
|
9072
|
+
* Exposes the aria role for optimizing accessibility.
|
|
9073
|
+
*/
|
|
9074
|
+
this.accessibleRole = undefined;
|
|
9075
|
+
/**
|
|
9076
|
+
* Theme of the table.
|
|
8867
9077
|
*/
|
|
8868
9078
|
this.theme = "";
|
|
8869
9079
|
/**
|
|
8870
|
-
*
|
|
9080
|
+
* Private methods.
|
|
8871
9081
|
*/
|
|
8872
|
-
this.
|
|
9082
|
+
this.kick = debounce(() => {
|
|
9083
|
+
this.tick = Date.now();
|
|
9084
|
+
}, 100); // will trigger re-render
|
|
8873
9085
|
/**
|
|
8874
|
-
*
|
|
9086
|
+
* If a user defines a template section within editable table, try to read an use it.
|
|
8875
9087
|
*/
|
|
8876
|
-
this.
|
|
9088
|
+
this.getTemplate = () => {
|
|
9089
|
+
const templateDom = this.element.getElementsByTagName("template");
|
|
9090
|
+
if (templateDom === null || templateDom === void 0 ? void 0 : templateDom.length) {
|
|
9091
|
+
const templateString = templateDom[0].content.firstElementChild.outerHTML;
|
|
9092
|
+
return generateTemplateFn(templateString);
|
|
9093
|
+
}
|
|
9094
|
+
else {
|
|
9095
|
+
return false;
|
|
9096
|
+
}
|
|
9097
|
+
};
|
|
9098
|
+
this.getItemData = (data) => {
|
|
9099
|
+
const { item, group, uid } = data;
|
|
9100
|
+
if (this.template) {
|
|
9101
|
+
return {
|
|
9102
|
+
group,
|
|
9103
|
+
uid,
|
|
9104
|
+
item: this.template(item),
|
|
9105
|
+
};
|
|
9106
|
+
}
|
|
9107
|
+
return { item, group, uid };
|
|
9108
|
+
};
|
|
9109
|
+
this.filterMap = needle => {
|
|
9110
|
+
if (needle === "all") {
|
|
9111
|
+
return Array.from(this.items);
|
|
9112
|
+
}
|
|
9113
|
+
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
9114
|
+
};
|
|
8877
9115
|
}
|
|
8878
9116
|
/**
|
|
8879
9117
|
* Component lifecycle events.
|
|
8880
9118
|
*/
|
|
8881
9119
|
componentWillLoad() {
|
|
9120
|
+
// look for a <template> region in the duet-editable-table
|
|
9121
|
+
this.template = this.getTemplate();
|
|
9122
|
+
// take care of the case where groups and actions are defined as html properties instead of javascript objects
|
|
9123
|
+
if (typeof this.groups === "string") {
|
|
9124
|
+
this.internalGroupArray = sanitizeString(this.groups);
|
|
9125
|
+
}
|
|
9126
|
+
else {
|
|
9127
|
+
this.internalGroupArray = this.groups;
|
|
9128
|
+
}
|
|
9129
|
+
if (typeof this.actions === "string") {
|
|
9130
|
+
this.internalActionsArray = sanitizeString(this.actions);
|
|
9131
|
+
}
|
|
9132
|
+
else {
|
|
9133
|
+
this.internalActionsArray = this.actions;
|
|
9134
|
+
}
|
|
8882
9135
|
inheritGlobalTheme(this);
|
|
8883
9136
|
}
|
|
8884
9137
|
/**
|
|
8885
|
-
*
|
|
8886
|
-
*
|
|
9138
|
+
* Method to force an update of a tabular data array.
|
|
9139
|
+
* when called the method will rerender the entire tabular structure.
|
|
8887
9140
|
*/
|
|
9141
|
+
async updateTable(passedItems = undefined) {
|
|
9142
|
+
this.items = new Map(passedItems || this.items);
|
|
9143
|
+
this.kick();
|
|
9144
|
+
}
|
|
8888
9145
|
render() {
|
|
8889
|
-
return (hAsync(Host,
|
|
8890
|
-
"duet-empty-state": true,
|
|
9146
|
+
return (hAsync(Host, { class: {
|
|
8891
9147
|
"duet-theme-turva": this.theme === "turva",
|
|
8892
|
-
|
|
8893
|
-
|
|
9148
|
+
} }, this.internalGroupArray.map(group => {
|
|
9149
|
+
const currentGroup = this.filterMap(group.id);
|
|
9150
|
+
if (!currentGroup.length) {
|
|
9151
|
+
return;
|
|
9152
|
+
}
|
|
9153
|
+
return (hAsync("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, hAsync("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, hAsync("thead", { class: "duet-editable-table-header" }, hAsync("tr", null, hAsync("th", { class: {
|
|
9154
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
9155
|
+
} }, !this.hideGroups ? (getLocaleString(group.label)) : (hAsync("duet-visually-hidden", null, getLocaleString(group.label)))), hAsync("th", { class: {
|
|
9156
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
9157
|
+
} }, hAsync("duet-visually-hidden", null, group.actionLabel
|
|
9158
|
+
? getLocaleString(group.actionLabel)
|
|
9159
|
+
: getLocaleString(this.actionLabelDefaults))))), hAsync("tbody", null, currentGroup.map(dataAsArray => {
|
|
9160
|
+
const [key, value] = dataAsArray;
|
|
9161
|
+
return (hAsync("duet-editable-table-item", { theme: this.theme, keyName: key, data: this.getItemData(value), groupId: group.id, part: group.id, alignment: this.alignment, actions: this.internalActionsArray }));
|
|
9162
|
+
})))));
|
|
9163
|
+
})));
|
|
8894
9164
|
}
|
|
8895
|
-
|
|
9165
|
+
get element() { return getElement(this); }
|
|
9166
|
+
static get style() { return duetEditableTableCss; }
|
|
8896
9167
|
static get cmpMeta() { return {
|
|
8897
9168
|
"$flags$": 9,
|
|
8898
|
-
"$tagName$": "duet-
|
|
9169
|
+
"$tagName$": "duet-editable-table",
|
|
8899
9170
|
"$members$": {
|
|
9171
|
+
"items": [1040],
|
|
9172
|
+
"alignment": [1],
|
|
9173
|
+
"groupsLabelDefaults": [16],
|
|
9174
|
+
"actionLabelDefaults": [16],
|
|
9175
|
+
"groups": [1],
|
|
9176
|
+
"actions": [1],
|
|
9177
|
+
"hideGroups": [4, "hide-table-labels"],
|
|
9178
|
+
"accessibleRole": [1, "accessible-role"],
|
|
8900
9179
|
"theme": [1025],
|
|
8901
|
-
"
|
|
8902
|
-
"
|
|
9180
|
+
"tick": [32],
|
|
9181
|
+
"updateTable": [64]
|
|
8903
9182
|
},
|
|
8904
9183
|
"$listeners$": undefined,
|
|
8905
9184
|
"$lazyBundleId$": "-",
|
|
@@ -8907,69 +9186,95 @@ class DuetEmptyState {
|
|
|
8907
9186
|
}; }
|
|
8908
9187
|
}
|
|
8909
9188
|
|
|
8910
|
-
const
|
|
9189
|
+
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}";
|
|
8911
9190
|
|
|
8912
|
-
|
|
8913
|
-
* @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
|
|
8914
|
-
* @slot tooltip - Use to place a tooltip alongside the fieldset label.
|
|
8915
|
-
*/
|
|
8916
|
-
class DuetFieldset {
|
|
9191
|
+
class DuetEditableTableButton {
|
|
8917
9192
|
constructor(hostRef) {
|
|
8918
9193
|
registerInstance(this, hostRef);
|
|
8919
|
-
this.
|
|
8920
|
-
this.
|
|
8921
|
-
this.hasTooltip = false;
|
|
9194
|
+
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
9195
|
+
this.isHovering = false;
|
|
8922
9196
|
/**
|
|
8923
|
-
* Theme of the
|
|
9197
|
+
* Theme of the empty state component.
|
|
8924
9198
|
*/
|
|
8925
|
-
this.theme =
|
|
9199
|
+
this.theme = undefined;
|
|
8926
9200
|
/**
|
|
8927
|
-
*
|
|
9201
|
+
* action items passed from host component
|
|
9202
|
+
* @internal
|
|
8928
9203
|
*/
|
|
8929
|
-
this.
|
|
9204
|
+
this.actions = undefined;
|
|
8930
9205
|
/**
|
|
8931
|
-
*
|
|
9206
|
+
* uid that gets passed along when the action is emitted
|
|
9207
|
+
* @internal
|
|
8932
9208
|
*/
|
|
8933
|
-
this.
|
|
8934
|
-
|
|
8935
|
-
|
|
9209
|
+
this.uid = "";
|
|
9210
|
+
/**
|
|
9211
|
+
* group associated with action
|
|
9212
|
+
* @internal
|
|
9213
|
+
*/
|
|
9214
|
+
this.group = "";
|
|
9215
|
+
/**
|
|
9216
|
+
* key of the item in the map
|
|
9217
|
+
* @internal
|
|
9218
|
+
*/
|
|
9219
|
+
this.keyName = "";
|
|
9220
|
+
this.onMouseEnter = () => {
|
|
9221
|
+
this.isHovering = true;
|
|
9222
|
+
};
|
|
9223
|
+
this.onMouseLeave = () => {
|
|
9224
|
+
this.isHovering = false;
|
|
9225
|
+
};
|
|
9226
|
+
this.getColours = (byName = false) => {
|
|
9227
|
+
let colorHover = this.actions.color_hover;
|
|
9228
|
+
let colorBlur = this.actions.color;
|
|
9229
|
+
if (byName) {
|
|
9230
|
+
colorHover = getColorByName(this.actions.color_hover, this.theme);
|
|
9231
|
+
colorBlur = getColorByName(this.actions.color, this.theme);
|
|
9232
|
+
}
|
|
9233
|
+
return this.isHovering ? colorHover : colorBlur;
|
|
8936
9234
|
};
|
|
8937
9235
|
}
|
|
8938
9236
|
/**
|
|
9237
|
+
/**
|
|
8939
9238
|
* Component lifecycle events.
|
|
8940
9239
|
*/
|
|
8941
9240
|
componentWillLoad() {
|
|
8942
9241
|
inheritGlobalTheme(this);
|
|
8943
|
-
|
|
9242
|
+
}
|
|
9243
|
+
/**
|
|
9244
|
+
/**
|
|
9245
|
+
* private functions
|
|
9246
|
+
*/
|
|
9247
|
+
emitActionEvent(ev) {
|
|
9248
|
+
this.duetEditableItemAction.emit({
|
|
9249
|
+
originalEvent: ev,
|
|
9250
|
+
uid: this.uid,
|
|
9251
|
+
group: this.group,
|
|
9252
|
+
action: this.actions.id,
|
|
9253
|
+
keyName: this.keyName,
|
|
9254
|
+
component: "duet-editable-table-item",
|
|
9255
|
+
});
|
|
8944
9256
|
}
|
|
8945
9257
|
/**
|
|
8946
9258
|
* render() function
|
|
8947
9259
|
* Always the last one in the class.
|
|
8948
9260
|
*/
|
|
8949
9261
|
render() {
|
|
8950
|
-
return (hAsync(
|
|
8951
|
-
"
|
|
8952
|
-
|
|
8953
|
-
} }, hAsync("legend", { id: this.labelId }, hAsync("span", null, this.label), this.caption && hAsync("span", null, this.caption)), hAsync("div", { class: {
|
|
8954
|
-
"duet-legend-wrapper": true,
|
|
8955
|
-
"duet-legend-has-caption": !!this.caption,
|
|
8956
|
-
"duet-legend-has-tooltip": this.hasTooltip,
|
|
8957
|
-
"duet-legend-hidden": this.labelHidden,
|
|
8958
|
-
} }, hAsync("div", { class: "duet-fieldset-label" }, hAsync("span", { "aria-hidden": "true" }, this.label), hAsync("slot", { onSlotchange: this.checkHasTooltip, name: "tooltip" })), this.caption && (hAsync("div", { class: "duet-fieldset-caption", "aria-hidden": "true" }, hAsync("duet-caption", { margin: "none" }, this.caption)))), hAsync("slot", null), hAsync("span", { class: "duet-fieldset-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error)))));
|
|
9262
|
+
return (hAsync("button", { style: {
|
|
9263
|
+
"border-color": this.getColours(true),
|
|
9264
|
+
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) }, hAsync("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.getColours(), margin: "none" })));
|
|
8959
9265
|
}
|
|
8960
|
-
get
|
|
8961
|
-
static get style() { return
|
|
9266
|
+
get el() { return getElement(this); }
|
|
9267
|
+
static get style() { return duetEditableTableButtonCss; }
|
|
8962
9268
|
static get cmpMeta() { return {
|
|
8963
|
-
"$flags$":
|
|
8964
|
-
"$tagName$": "duet-
|
|
9269
|
+
"$flags$": 2,
|
|
9270
|
+
"$tagName$": "duet-editable-table-button",
|
|
8965
9271
|
"$members$": {
|
|
8966
9272
|
"theme": [1025],
|
|
8967
|
-
"
|
|
8968
|
-
"
|
|
8969
|
-
"
|
|
8970
|
-
"
|
|
8971
|
-
"
|
|
8972
|
-
"hasTooltip": [32]
|
|
9273
|
+
"actions": [16],
|
|
9274
|
+
"uid": [1],
|
|
9275
|
+
"group": [1],
|
|
9276
|
+
"keyName": [1, "key-name"],
|
|
9277
|
+
"isHovering": [32]
|
|
8973
9278
|
},
|
|
8974
9279
|
"$listeners$": undefined,
|
|
8975
9280
|
"$lazyBundleId$": "-",
|
|
@@ -8977,74 +9282,288 @@ class DuetFieldset {
|
|
|
8977
9282
|
}; }
|
|
8978
9283
|
}
|
|
8979
9284
|
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
9285
|
+
//simple functional component that renders the data in the table
|
|
9286
|
+
const TableData = ({ data, groupId, alignment }, _children) => {
|
|
9287
|
+
if (typeof data === "string") {
|
|
9288
|
+
return (hAsync("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }));
|
|
9289
|
+
}
|
|
9290
|
+
else {
|
|
9291
|
+
return (hAsync("td", { class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
|
|
9292
|
+
}
|
|
9293
|
+
};
|
|
8985
9294
|
|
|
8986
|
-
const
|
|
9295
|
+
const duetEditableTableItemCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-editable-table-item,*.sc-duet-editable-table-item::after,*.sc-duet-editable-table-item::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-editable-table-item-h{display:table-row;height:32px}/*!@.duet-editable-table-content, .duet-editable-table-actions*/.duet-editable-table-content.sc-duet-editable-table-item,.duet-editable-table-actions.sc-duet-editable-table-item{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}/*!@.duet-editable-table-actions-items*/.duet-editable-table-actions-items.sc-duet-editable-table-item{display:flex;justify-content:flex-end}/*!@.duet-editable-table-actions-items duet-editable-table-button*/.duet-editable-table-actions-items.sc-duet-editable-table-item duet-editable-table-button.sc-duet-editable-table-item{padding-left:8px}/*!@.duet-editable-table .editable-item-small*/.duet-editable-table.sc-duet-editable-table-item .editable-item-small.sc-duet-editable-table-item{font-size:0.75rem;font-weight:400}";
|
|
8987
9296
|
|
|
8988
|
-
|
|
8989
|
-
fi: { lahi: "© LähiTapiola", turva: "© Turva" },
|
|
8990
|
-
sv: { lahi: "© LokalTapiola", turva: "© Turva" },
|
|
8991
|
-
en: { lahi: "© LocalTapiola", turva: "© Turva" },
|
|
8992
|
-
};
|
|
8993
|
-
const createEvent$1 = (ev, data) => ({
|
|
8994
|
-
component: "duet-footer",
|
|
8995
|
-
data,
|
|
8996
|
-
originalEvent: ev,
|
|
8997
|
-
});
|
|
8998
|
-
class DuetFooter {
|
|
9297
|
+
class DuetEditableTableItem {
|
|
8999
9298
|
constructor(hostRef) {
|
|
9000
9299
|
registerInstance(this, hostRef);
|
|
9001
|
-
this.
|
|
9002
|
-
this.
|
|
9003
|
-
this.duetMenuClick = createEvent$2(this, "duetMenuClick", 7);
|
|
9004
|
-
this.duetItemClick = createEvent$2(this, "duetItemClick", 7);
|
|
9005
|
-
this.duetAnalytics = createEvent$2(this, "duetAnalytics", 7);
|
|
9006
|
-
/**
|
|
9007
|
-
* State() variables
|
|
9008
|
-
* Inlined decorator, alphabetical order.
|
|
9009
|
-
*/
|
|
9010
|
-
this.processedItems = null;
|
|
9011
|
-
this.processedMenu = null;
|
|
9300
|
+
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
9301
|
+
this.isHovering = false;
|
|
9012
9302
|
/**
|
|
9013
|
-
* Theme of the
|
|
9303
|
+
* Theme of the empty state component.
|
|
9014
9304
|
*/
|
|
9015
9305
|
this.theme = "";
|
|
9016
9306
|
/**
|
|
9017
|
-
*
|
|
9018
|
-
*/
|
|
9019
|
-
this.variation = "default";
|
|
9020
|
-
/**
|
|
9021
|
-
* Controls the margin of the component.
|
|
9307
|
+
* Actions that can be performed on the element
|
|
9022
9308
|
*/
|
|
9023
|
-
this.
|
|
9309
|
+
this.actions = undefined;
|
|
9024
9310
|
/**
|
|
9025
|
-
*
|
|
9311
|
+
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
9312
|
+
* @internal
|
|
9026
9313
|
*/
|
|
9027
|
-
this.
|
|
9314
|
+
this.groupId = "";
|
|
9028
9315
|
/**
|
|
9029
|
-
*
|
|
9030
|
-
* chosen language.
|
|
9031
|
-
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
9032
|
-
* @default "fi"
|
|
9316
|
+
* Key used to set vertical alignment of action buttons
|
|
9033
9317
|
*/
|
|
9034
|
-
this.
|
|
9318
|
+
this.alignment = "middle";
|
|
9035
9319
|
/**
|
|
9036
|
-
*
|
|
9037
|
-
* normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
|
|
9038
|
-
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
9320
|
+
* Key used to identify item, when running actions
|
|
9039
9321
|
*/
|
|
9040
|
-
this.
|
|
9322
|
+
this.keyName = "";
|
|
9041
9323
|
/**
|
|
9042
|
-
*
|
|
9043
|
-
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
9324
|
+
* Object of data itemsused to render the entire row
|
|
9044
9325
|
*/
|
|
9045
|
-
this.
|
|
9046
|
-
|
|
9047
|
-
|
|
9326
|
+
this.data = undefined;
|
|
9327
|
+
}
|
|
9328
|
+
watchPropHandler(_newValue, _oldValue) {
|
|
9329
|
+
// console.log("The new value of activated is: ", _newValue)
|
|
9330
|
+
}
|
|
9331
|
+
/**
|
|
9332
|
+
/**
|
|
9333
|
+
* Component lifecycle events.
|
|
9334
|
+
*/
|
|
9335
|
+
componentWillLoad() {
|
|
9336
|
+
inheritGlobalTheme(this);
|
|
9337
|
+
}
|
|
9338
|
+
/**
|
|
9339
|
+
/**
|
|
9340
|
+
* private functions
|
|
9341
|
+
*/
|
|
9342
|
+
/**
|
|
9343
|
+
* render() function
|
|
9344
|
+
* Always the last one in the class.
|
|
9345
|
+
*/
|
|
9346
|
+
render() {
|
|
9347
|
+
return (hAsync(Host, { role: "row" }, hAsync(TableData, { data: this.data.item, alignment: this.alignment, groupId: this.groupId }), hAsync("td", { class: "duet-editable-table-actions", style: { verticalAlign: this.alignment } }, hAsync("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
9348
|
+
const { map = undefined } = result;
|
|
9349
|
+
// if map has been specified, only show the current action if groupID matches the map array
|
|
9350
|
+
if (map && !map.includes(this.groupId)) {
|
|
9351
|
+
return;
|
|
9352
|
+
}
|
|
9353
|
+
return (hAsync("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
9354
|
+
})))));
|
|
9355
|
+
}
|
|
9356
|
+
get el() { return getElement(this); }
|
|
9357
|
+
static get watchers() { return {
|
|
9358
|
+
"data": ["watchPropHandler"]
|
|
9359
|
+
}; }
|
|
9360
|
+
static get style() { return duetEditableTableItemCss; }
|
|
9361
|
+
static get cmpMeta() { return {
|
|
9362
|
+
"$flags$": 9,
|
|
9363
|
+
"$tagName$": "duet-editable-table-item",
|
|
9364
|
+
"$members$": {
|
|
9365
|
+
"theme": [1025],
|
|
9366
|
+
"actions": [16],
|
|
9367
|
+
"groupId": [1, "group-id"],
|
|
9368
|
+
"alignment": [1],
|
|
9369
|
+
"keyName": [1, "key-name"],
|
|
9370
|
+
"data": [1040],
|
|
9371
|
+
"isHovering": [32]
|
|
9372
|
+
},
|
|
9373
|
+
"$listeners$": undefined,
|
|
9374
|
+
"$lazyBundleId$": "-",
|
|
9375
|
+
"$attrsToReflect$": []
|
|
9376
|
+
}; }
|
|
9377
|
+
}
|
|
9378
|
+
|
|
9379
|
+
const duetEmptyStateCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-empty-state,*.sc-duet-empty-state::after,*.sc-duet-empty-state::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-empty-state-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%;height:100%}/*!@.duet-empty-state*/.duet-empty-state.sc-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*/.duet-empty-state.duet-theme-turva.sc-duet-empty-state{color:#171c3a;background:#f5f5f7}";
|
|
9380
|
+
|
|
9381
|
+
class DuetEmptyState {
|
|
9382
|
+
constructor(hostRef) {
|
|
9383
|
+
registerInstance(this, hostRef);
|
|
9384
|
+
/**
|
|
9385
|
+
* Theme of the empty state component.
|
|
9386
|
+
*/
|
|
9387
|
+
this.theme = "";
|
|
9388
|
+
/**
|
|
9389
|
+
* Icon shown in the empty state component.
|
|
9390
|
+
*/
|
|
9391
|
+
this.icon = "messaging-question";
|
|
9392
|
+
/**
|
|
9393
|
+
* The size of the empty state message.
|
|
9394
|
+
*/
|
|
9395
|
+
this.size = "medium";
|
|
9396
|
+
}
|
|
9397
|
+
/**
|
|
9398
|
+
* Component lifecycle events.
|
|
9399
|
+
*/
|
|
9400
|
+
componentWillLoad() {
|
|
9401
|
+
inheritGlobalTheme(this);
|
|
9402
|
+
}
|
|
9403
|
+
/**
|
|
9404
|
+
* render() function
|
|
9405
|
+
* Always the last one in the class.
|
|
9406
|
+
*/
|
|
9407
|
+
render() {
|
|
9408
|
+
return (hAsync(Host, null, hAsync("div", { class: {
|
|
9409
|
+
"duet-empty-state": true,
|
|
9410
|
+
"duet-theme-turva": this.theme === "turva",
|
|
9411
|
+
"duet-is-small": this.size === "small",
|
|
9412
|
+
} }, hAsync("duet-icon", { color: "currentColor", name: this.icon, size: this.size === "small" ? "large" : "x-large" }), hAsync("div", null, hAsync("slot", null)))));
|
|
9413
|
+
}
|
|
9414
|
+
static get style() { return duetEmptyStateCss; }
|
|
9415
|
+
static get cmpMeta() { return {
|
|
9416
|
+
"$flags$": 9,
|
|
9417
|
+
"$tagName$": "duet-empty-state",
|
|
9418
|
+
"$members$": {
|
|
9419
|
+
"theme": [1025],
|
|
9420
|
+
"icon": [1],
|
|
9421
|
+
"size": [1]
|
|
9422
|
+
},
|
|
9423
|
+
"$listeners$": undefined,
|
|
9424
|
+
"$lazyBundleId$": "-",
|
|
9425
|
+
"$attrsToReflect$": []
|
|
9426
|
+
}; }
|
|
9427
|
+
}
|
|
9428
|
+
|
|
9429
|
+
const duetFieldsetCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-fieldset,*.sc-duet-fieldset::after,*.sc-duet-fieldset::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-fieldset-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;display:block;width:100%}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-fieldset-h{margin:0 !important}/*!@fieldset*/fieldset.sc-duet-fieldset{border:0}/*!@legend*/legend.sc-duet-fieldset{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*/.duet-legend-wrapper.sc-duet-fieldset{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*/.duet-theme-turva.sc-duet-fieldset .duet-legend-wrapper.sc-duet-fieldset{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*/.duet-fieldset-label.sc-duet-fieldset{margin-bottom:12px !important;margin-top:8px}/*!@.duet-legend-has-caption .duet-fieldset-label*/.duet-legend-has-caption.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:6px !important}/*!@.duet-legend-has-tooltip .duet-fieldset-label*/.duet-legend-has-tooltip.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{padding-right:36px}@media (min-width: 48em){/*!@.duet-legend-has-tooltip .duet-fieldset-label*/.duet-legend-has-tooltip.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){/*!@.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label*/.duet-legend-has-tooltip.duet-legend-has-caption.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:-3px !important}}/*!@.duet-fieldset-caption*/.duet-fieldset-caption.sc-duet-fieldset{margin-bottom:12px !important}/*!@.duet-fieldset-help*/.duet-fieldset-help.sc-duet-fieldset{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*/.duet-fieldset-help.sc-duet-fieldset span.sc-duet-fieldset{display:block;margin-top:12px}/*!@.duet-theme-turva .duet-fieldset-help*/.duet-theme-turva.sc-duet-fieldset .duet-fieldset-help.sc-duet-fieldset{color:#e02a0d}/*!@::slotted(duet-tooltip)*/.sc-duet-fieldset-s>duet-tooltip{position:absolute;top:4px;right:0}@media (min-width: 48em){/*!@::slotted(duet-tooltip)*/.sc-duet-fieldset-s>duet-tooltip{position:relative;right:auto}}/*!@.duet-legend-hidden*/.duet-legend-hidden.sc-duet-fieldset{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
9430
|
+
|
|
9431
|
+
/**
|
|
9432
|
+
* @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
|
|
9433
|
+
* @slot tooltip - Use to place a tooltip alongside the fieldset label.
|
|
9434
|
+
*/
|
|
9435
|
+
class DuetFieldset {
|
|
9436
|
+
constructor(hostRef) {
|
|
9437
|
+
registerInstance(this, hostRef);
|
|
9438
|
+
this.errorId = createID("DuetError");
|
|
9439
|
+
this.labelId = createID("DuetLabel");
|
|
9440
|
+
this.hasTooltip = false;
|
|
9441
|
+
/**
|
|
9442
|
+
* Theme of the fieldset.
|
|
9443
|
+
*/
|
|
9444
|
+
this.theme = "";
|
|
9445
|
+
/**
|
|
9446
|
+
* Controls the margin of the component.
|
|
9447
|
+
*/
|
|
9448
|
+
this.margin = "auto";
|
|
9449
|
+
/**
|
|
9450
|
+
* Visually hide the label, but still show it to screen readers.
|
|
9451
|
+
*/
|
|
9452
|
+
this.labelHidden = false;
|
|
9453
|
+
this.checkHasTooltip = () => {
|
|
9454
|
+
this.hasTooltip = !!this.element.querySelector("[slot='tooltip']");
|
|
9455
|
+
};
|
|
9456
|
+
}
|
|
9457
|
+
/**
|
|
9458
|
+
* Component lifecycle events.
|
|
9459
|
+
*/
|
|
9460
|
+
componentWillLoad() {
|
|
9461
|
+
inheritGlobalTheme(this);
|
|
9462
|
+
this.checkHasTooltip();
|
|
9463
|
+
}
|
|
9464
|
+
/**
|
|
9465
|
+
* render() function
|
|
9466
|
+
* Always the last one in the class.
|
|
9467
|
+
*/
|
|
9468
|
+
render() {
|
|
9469
|
+
return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("fieldset", { "aria-labelledby": `${this.labelId} ${this.errorId}`, class: {
|
|
9470
|
+
"duet-fieldset": true,
|
|
9471
|
+
"duet-theme-turva": this.theme === "turva",
|
|
9472
|
+
} }, hAsync("legend", { id: this.labelId }, hAsync("span", null, this.label), this.caption && hAsync("span", null, this.caption)), hAsync("div", { class: {
|
|
9473
|
+
"duet-legend-wrapper": true,
|
|
9474
|
+
"duet-legend-has-caption": !!this.caption,
|
|
9475
|
+
"duet-legend-has-tooltip": this.hasTooltip,
|
|
9476
|
+
"duet-legend-hidden": this.labelHidden,
|
|
9477
|
+
} }, hAsync("div", { class: "duet-fieldset-label" }, hAsync("span", { "aria-hidden": "true" }, this.label), hAsync("slot", { onSlotchange: this.checkHasTooltip, name: "tooltip" })), this.caption && (hAsync("div", { class: "duet-fieldset-caption", "aria-hidden": "true" }, hAsync("duet-caption", { margin: "none" }, this.caption)))), hAsync("slot", null), hAsync("span", { class: "duet-fieldset-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error)))));
|
|
9478
|
+
}
|
|
9479
|
+
get element() { return getElement(this); }
|
|
9480
|
+
static get style() { return duetFieldsetCss; }
|
|
9481
|
+
static get cmpMeta() { return {
|
|
9482
|
+
"$flags$": 9,
|
|
9483
|
+
"$tagName$": "duet-fieldset",
|
|
9484
|
+
"$members$": {
|
|
9485
|
+
"theme": [1025],
|
|
9486
|
+
"margin": [1],
|
|
9487
|
+
"caption": [1],
|
|
9488
|
+
"label": [1],
|
|
9489
|
+
"error": [1],
|
|
9490
|
+
"labelHidden": [4, "label-hidden"],
|
|
9491
|
+
"hasTooltip": [32]
|
|
9492
|
+
},
|
|
9493
|
+
"$listeners$": undefined,
|
|
9494
|
+
"$lazyBundleId$": "-",
|
|
9495
|
+
"$attrsToReflect$": []
|
|
9496
|
+
}; }
|
|
9497
|
+
}
|
|
9498
|
+
|
|
9499
|
+
var actionArrowRight={"title":"action-arrow-right","tags":"action arrow right caret","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M5.499 24a.752.752 0 0 1-.53-1.281L15.689 12 4.969 1.28c-.142-.141-.22-.33-.22-.53s.078-.389.22-.53c.141-.142.33-.22.53-.22s.389.078.53.22l10.72 10.72a1.5 1.5 0 0 1 .001 2.119L6.029 23.78a.743.743 0 0 1-.53.22z\"/></svg>"};
|
|
9500
|
+
|
|
9501
|
+
var actionNewWindow={"title":"action-new-window","tags":"arrow open new window tab external link square box rectangle action","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M10.25 2a.75.75 0 1 1 0 1.5h-6.5A2.252 2.252 0 0 0 1.5 5.75v14.5a2.252 2.252 0 0 0 2.25 2.25h14.5a2.252 2.252 0 0 0 2.25-2.25v-6.5a.75.75 0 0 1 1.5 0v6.5A3.754 3.754 0 0 1 18.25 24H3.75A3.754 3.754 0 0 1 0 20.25V5.75A3.754 3.754 0 0 1 3.75 2zm12.985-2c.1 0 .198.02.29.058l.025.011a.726.726 0 0 1 .15.091l.066.059a.755.755 0 0 1 .109.138l.051.1c.04.092.06.192.06.293l-.001 6.363c0 .2-.078.389-.22.53a.743.743 0 0 1-.53.22.743.743 0 0 1-.53-.22.743.743 0 0 1-.22-.53V2.559L15.28 9.764a.75.75 0 0 1-1.06-1.06l7.204-7.205h-4.553a.744.744 0 0 1-.75-.75c0-.2.078-.388.22-.53A.743.743 0 0 1 16.87 0z\"/></svg>"};
|
|
9502
|
+
|
|
9503
|
+
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>"};
|
|
9504
|
+
|
|
9505
|
+
const duetFooterCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-footer,*.sc-duet-footer::after,*.sc-duet-footer::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-footer-h{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*/.duet-footer.sc-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*/.duet-footer.duet-p-0.sc-duet-footer{padding:0 !important}/*!@.duet-footer.duet-m-0*/.duet-footer.duet-m-0.sc-duet-footer{margin:0 !important}@media (min-width: 36em){/*!@.duet-footer*/.duet-footer.sc-duet-footer{padding-top:36px}}@media (min-width: 62em){/*!@.duet-footer*/.duet-footer.sc-duet-footer{padding-top:48px;padding-bottom:36px}}/*!@.duet-footer.duet-theme-turva*/.duet-footer.duet-theme-turva.sc-duet-footer{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*/.duet-footer.sc-duet-footer a.sc-duet-footer{color:white;text-decoration:none}@media (min-width: 62em){/*!@.duet-footer a*/.duet-footer.sc-duet-footer a.sc-duet-footer{border-radius:4px}}/*!@.duet-footer a:focus*/.duet-footer.sc-duet-footer a.sc-duet-footer:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-footer a:focus*/.user-is-tabbing.sc-duet-footer-h .duet-footer.sc-duet-footer a.sc-duet-footer: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*/.user-is-tabbing.sc-duet-footer-h .duet-theme-turva.sc-duet-footer a.sc-duet-footer:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-footer-wrapper*/.duet-footer-wrapper.sc-duet-footer{position:relative;margin:0 auto}@media (min-width: 62em){/*!@.duet-footer-wrapper*/.duet-footer-wrapper.sc-duet-footer{padding:0 72px 0 48px}}@media (min-width: 76.25em){/*!@.duet-footer-wrapper*/.duet-footer-wrapper.sc-duet-footer{max-width:1110px;padding:0 20px 0 0}}/*!@.duet-footer-top*/.duet-footer-top.sc-duet-footer{width:100%}@media (min-width: 62em){/*!@.duet-footer-top*/.duet-footer-top.sc-duet-footer{display:flex;flex-direction:row;align-items:center;justify-content:space-between}}/*!@duet-logo*/duet-logo.sc-duet-footer{margin-left:16px !important}@media (min-width: 36em){/*!@duet-logo*/duet-logo.sc-duet-footer{margin-left:28px !important}}@media (min-width: 62em){/*!@duet-logo*/duet-logo.sc-duet-footer{margin-left:0 !important}}/*!@.duet-footer-link*/.duet-footer-link.sc-duet-footer{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*/.duet-footer-link.sc-duet-footer{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){/*!@.duet-footer-link*/.duet-footer-link.sc-duet-footer{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}/*!@.duet-footer-link:first-of-type*/.duet-footer-link.sc-duet-footer: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*/.duet-footer-link.sc-duet-footer:first-of-type{margin:0;border:0}}/*!@.duet-footer-link span*/.duet-footer-link.sc-duet-footer span.sc-duet-footer{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}/*!@.duet-footer-link:hover*/.duet-footer-link.sc-duet-footer:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){/*!@.duet-footer-link:hover*/.duet-footer-link.sc-duet-footer:hover{background:transparent}}/*!@.duet-footer-icon*/.duet-footer-icon.sc-duet-footer{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*/.duet-theme-turva.sc-duet-footer .duet-footer-icon.sc-duet-footer{background:transparent;box-shadow:0 0 0 1px white}/*!@a:hover .duet-footer-icon*/a.sc-duet-footer:hover .duet-footer-icon.sc-duet-footer{background:#006ba1}/*!@.duet-theme-turva a:hover .duet-footer-icon*/.duet-theme-turva.sc-duet-footer a.sc-duet-footer:hover .duet-footer-icon.sc-duet-footer{background:transparent}/*!@.duet-footer-arrow*/.duet-footer-arrow.sc-duet-footer{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*/.duet-footer-arrow.sc-duet-footer{width:10px;min-width:10px;margin-top:3px;margin-left:8px}}@media (min-width: 62em){/*!@.duet-footer-arrow*/.duet-footer-arrow.sc-duet-footer{margin-right:0}}/*!@a:hover .duet-footer-arrow*/a.sc-duet-footer:hover .duet-footer-arrow.sc-duet-footer{transform:translateX(4px)}/*!@.duet-footer-arrow duet-icon*/.duet-footer-arrow.sc-duet-footer duet-icon.sc-duet-footer{width:20px;height:20px}@media (min-width: 62em){/*!@.duet-footer-arrow duet-icon*/.duet-footer-arrow.sc-duet-footer duet-icon.sc-duet-footer{width:10px;height:10px}}/*!@.duet-footer-menu*/.duet-footer-menu.sc-duet-footer{padding:20px !important;font-size:0.875rem}@media (min-width: 36em){/*!@.duet-footer-menu*/.duet-footer-menu.sc-duet-footer{padding:28px !important}}@media (min-width: 62em){/*!@.duet-footer-menu*/.duet-footer-menu.sc-duet-footer{padding-left:8px !important}}/*!@.duet-footer-menu a*/.duet-footer-menu.sc-duet-footer a.sc-duet-footer{text-decoration:none;white-space:nowrap}/*!@.duet-footer-menu a:hover, .duet-footer-menu a:focus*/.duet-footer-menu.sc-duet-footer a.sc-duet-footer:hover,.duet-footer-menu.sc-duet-footer a.sc-duet-footer:focus{text-decoration:underline}/*!@.duet-footer-menu a:hover .duet-footer-divider, .duet-footer-menu a:focus .duet-footer-divider*/.duet-footer-menu.sc-duet-footer a.sc-duet-footer:hover .duet-footer-divider.sc-duet-footer,.duet-footer-menu.sc-duet-footer a.sc-duet-footer:focus .duet-footer-divider.sc-duet-footer{text-decoration:none}/*!@.duet-footer-menu .duet-footer-divider*/.duet-footer-menu.sc-duet-footer .duet-footer-divider.sc-duet-footer{display:inline-block;margin:0 8px}/*!@.duet-footer-menu a:last-of-type .duet-footer-divider*/.duet-footer-menu.sc-duet-footer a.sc-duet-footer:last-of-type .duet-footer-divider.sc-duet-footer{display:none}/*!@.duet-footer-copyright*/.duet-footer-copyright.sc-duet-footer{color:white}/*!@.duet-footer-simple*/.duet-footer-simple.sc-duet-footer{padding:0;margin:0;margin-top:16px;color:#00294d;background:transparent !important;border-top:1px solid #e1e3e6}/*!@.duet-footer-simple .duet-footer-wrapper*/.duet-footer-simple.sc-duet-footer .duet-footer-wrapper.sc-duet-footer{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){/*!@.duet-footer-simple .duet-footer-wrapper*/.duet-footer-simple.sc-duet-footer .duet-footer-wrapper.sc-duet-footer{padding:0 36px}}@media (min-width: 106.25em){/*!@.duet-footer-simple .duet-footer-wrapper*/.duet-footer-simple.sc-duet-footer .duet-footer-wrapper.sc-duet-footer{padding:0 48px}}/*!@.duet-footer-simple .duet-footer-copyright,\n.duet-footer-simple .duet-footer-menu a*/.duet-footer-simple.sc-duet-footer .duet-footer-copyright.sc-duet-footer,.duet-footer-simple.sc-duet-footer .duet-footer-menu.sc-duet-footer a.sc-duet-footer{color:#00294d}/*!@.duet-footer-simple .duet-footer-menu*/.duet-footer-simple.sc-duet-footer .duet-footer-menu.sc-duet-footer{padding:20px 0 !important}/*!@.duet-footer-simple.duet-theme-turva*/.duet-footer-simple.duet-theme-turva.sc-duet-footer{color:#171c3a;border-color:#e4e4e6}/*!@.duet-footer-simple.duet-theme-turva .duet-footer-copyright,\n.duet-footer-simple.duet-theme-turva .duet-footer-menu a*/.duet-footer-simple.duet-theme-turva.sc-duet-footer .duet-footer-copyright.sc-duet-footer,.duet-footer-simple.duet-theme-turva.sc-duet-footer .duet-footer-menu.sc-duet-footer a.sc-duet-footer{color:#171c3a}/*!@.duet-footer-external*/.duet-footer-external.sc-duet-footer{display:inline-block;margin-left:4px;color:#0077b3}/*!@.duet-theme-turva .duet-footer-external*/.duet-theme-turva.sc-duet-footer .duet-footer-external.sc-duet-footer{color:white}/*!@.duet-footer-simple.duet-theme-turva .duet-footer-external*/.duet-footer-simple.duet-theme-turva.sc-duet-footer .duet-footer-external.sc-duet-footer{color:#c60c30}";
|
|
9506
|
+
|
|
9507
|
+
const i18n$1 = {
|
|
9508
|
+
fi: { lahi: "© LähiTapiola", turva: "© Turva" },
|
|
9509
|
+
sv: { lahi: "© LokalTapiola", turva: "© Turva" },
|
|
9510
|
+
en: { lahi: "© LocalTapiola", turva: "© Turva" },
|
|
9511
|
+
};
|
|
9512
|
+
const createEvent$1 = (ev, data) => ({
|
|
9513
|
+
component: "duet-footer",
|
|
9514
|
+
data,
|
|
9515
|
+
originalEvent: ev,
|
|
9516
|
+
});
|
|
9517
|
+
class DuetFooter {
|
|
9518
|
+
constructor(hostRef) {
|
|
9519
|
+
registerInstance(this, hostRef);
|
|
9520
|
+
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
9521
|
+
this.duetLogoClick = createEvent$2(this, "duetLogoClick", 7);
|
|
9522
|
+
this.duetMenuClick = createEvent$2(this, "duetMenuClick", 7);
|
|
9523
|
+
this.duetItemClick = createEvent$2(this, "duetItemClick", 7);
|
|
9524
|
+
this.duetAnalytics = createEvent$2(this, "duetAnalytics", 7);
|
|
9525
|
+
/**
|
|
9526
|
+
* State() variables
|
|
9527
|
+
* Inlined decorator, alphabetical order.
|
|
9528
|
+
*/
|
|
9529
|
+
this.processedItems = null;
|
|
9530
|
+
this.processedMenu = null;
|
|
9531
|
+
/**
|
|
9532
|
+
* Theme of the navigation.
|
|
9533
|
+
*/
|
|
9534
|
+
this.theme = "";
|
|
9535
|
+
/**
|
|
9536
|
+
* Style variation of the footer.
|
|
9537
|
+
*/
|
|
9538
|
+
this.variation = "default";
|
|
9539
|
+
/**
|
|
9540
|
+
* Controls the margin of the component.
|
|
9541
|
+
*/
|
|
9542
|
+
this.margin = "auto";
|
|
9543
|
+
/**
|
|
9544
|
+
* URL that the logo link points to.
|
|
9545
|
+
*/
|
|
9546
|
+
this.logoHref = "/";
|
|
9547
|
+
/**
|
|
9548
|
+
* The currently active language. This setting changes the logo to match the
|
|
9549
|
+
* chosen language.
|
|
9550
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
9551
|
+
* @default "fi"
|
|
9552
|
+
*/
|
|
9553
|
+
this.language = getLanguage();
|
|
9554
|
+
/**
|
|
9555
|
+
* Property to change accessibleLabelExternal defaults on the component.
|
|
9556
|
+
* normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
|
|
9557
|
+
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
9558
|
+
*/
|
|
9559
|
+
this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
|
|
9560
|
+
/**
|
|
9561
|
+
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
9562
|
+
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
9563
|
+
*/
|
|
9564
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
|
|
9565
|
+
/**
|
|
9566
|
+
* Component event handling.
|
|
9048
9567
|
*/
|
|
9049
9568
|
this.handleClick = (event) => {
|
|
9050
9569
|
if (event.data.analyticsId) {
|
|
@@ -9137,6 +9656,12 @@ function isGridItem(element) {
|
|
|
9137
9656
|
class DuetGrid {
|
|
9138
9657
|
constructor(hostRef) {
|
|
9139
9658
|
registerInstance(this, hostRef);
|
|
9659
|
+
this.mql = [
|
|
9660
|
+
window.matchMedia(media_query_large.replace(/'/g, "")),
|
|
9661
|
+
window.matchMedia(media_query_medium.replace(/'/g, "")),
|
|
9662
|
+
window.matchMedia(media_query_small.replace(/'/g, "")),
|
|
9663
|
+
];
|
|
9664
|
+
this.distributeFormElement = false;
|
|
9140
9665
|
/**
|
|
9141
9666
|
* Enable or disable the automatic responsive behaviour of the grid component.
|
|
9142
9667
|
* Setting this option to "true" makes sure that contents are stacked vertically
|
|
@@ -9153,7 +9678,9 @@ class DuetGrid {
|
|
|
9153
9678
|
*/
|
|
9154
9679
|
this.direction = "horizontal";
|
|
9155
9680
|
/**
|
|
9156
|
-
* Adjusts the vertical alignment of the grid items
|
|
9681
|
+
* Adjusts the vertical alignment of the grid items, if set to "form_distribute"
|
|
9682
|
+
* the grid will try to calculate correct paddings for any duet-input fields inside duet-grid-items,
|
|
9683
|
+
* so that they align even when displaying errors.
|
|
9157
9684
|
*/
|
|
9158
9685
|
this.alignment = "top";
|
|
9159
9686
|
/**
|
|
@@ -9165,14 +9692,39 @@ class DuetGrid {
|
|
|
9165
9692
|
*/
|
|
9166
9693
|
this.mobile = "";
|
|
9167
9694
|
}
|
|
9695
|
+
/**
|
|
9696
|
+
* Private functions
|
|
9697
|
+
*/
|
|
9698
|
+
/**
|
|
9699
|
+
* Returns the element height including margins
|
|
9700
|
+
* @param element - element
|
|
9701
|
+
* @returns {number}
|
|
9702
|
+
*/
|
|
9703
|
+
outerHeight(element) {
|
|
9704
|
+
const height = element.offsetHeight, style = window.getComputedStyle(element);
|
|
9705
|
+
return ["top", "bottom"]
|
|
9706
|
+
.map(side => parseInt(style[`margin-${side}`]))
|
|
9707
|
+
.reduce((total, side) => total + side, height);
|
|
9708
|
+
}
|
|
9168
9709
|
/**
|
|
9169
9710
|
* Component lifecycle events.
|
|
9170
9711
|
*/
|
|
9171
9712
|
async connectedCallback() {
|
|
9172
9713
|
const el = this.element;
|
|
9714
|
+
this.distributeFormElement = this.alignment === "form_distribute";
|
|
9173
9715
|
this.mutationO = watchForOptions(el, "duet-grid-item", () => {
|
|
9174
9716
|
this.updateGridItems();
|
|
9175
9717
|
});
|
|
9718
|
+
// the next two functions are used to watch for changes in the grid items, and are process intensive - so only run when needed
|
|
9719
|
+
if (this.distributeFormElement) {
|
|
9720
|
+
this.mutation1 = watchForElement(el, "duet-input", () => {
|
|
9721
|
+
this.updateGridItemsWithInputFields();
|
|
9722
|
+
});
|
|
9723
|
+
// listen for potential mediaquery changes and reset layout
|
|
9724
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
9725
|
+
this.mql[i].addEventListener("change", this.updateGridItemsWithInputFields.bind(this));
|
|
9726
|
+
}
|
|
9727
|
+
}
|
|
9176
9728
|
this.updateGridItems();
|
|
9177
9729
|
}
|
|
9178
9730
|
disconnectedCallback() {
|
|
@@ -9180,6 +9732,14 @@ class DuetGrid {
|
|
|
9180
9732
|
this.mutationO.disconnect();
|
|
9181
9733
|
this.mutationO = undefined;
|
|
9182
9734
|
}
|
|
9735
|
+
if (this.mutation1) {
|
|
9736
|
+
this.mutation1.disconnect();
|
|
9737
|
+
this.mutation1 = undefined;
|
|
9738
|
+
}
|
|
9739
|
+
// listen for potential mediaquery changes and reset layout
|
|
9740
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
9741
|
+
this.mql[i].removeEventListener("change", this.updateGridItemsWithInputFields.bind(this));
|
|
9742
|
+
}
|
|
9183
9743
|
}
|
|
9184
9744
|
/**
|
|
9185
9745
|
* Local methods
|
|
@@ -9191,6 +9751,29 @@ class DuetGrid {
|
|
|
9191
9751
|
item.breakpoint = this.breakpoint;
|
|
9192
9752
|
});
|
|
9193
9753
|
}
|
|
9754
|
+
async updateGridItemsWithInputFields() {
|
|
9755
|
+
const items = Array.from(this.element.children).filter(isGridItem);
|
|
9756
|
+
// if layout changes to columns instead of row, remove all padding
|
|
9757
|
+
const hasColumnLayout = window ? window.getComputedStyle(this.element).flexDirection === "column" : false;
|
|
9758
|
+
let maxHeight = 0;
|
|
9759
|
+
const sizes = [];
|
|
9760
|
+
items.forEach(item => {
|
|
9761
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
9762
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
9763
|
+
sizes.push(height);
|
|
9764
|
+
});
|
|
9765
|
+
maxHeight = Math.max(...sizes);
|
|
9766
|
+
items.forEach(item => {
|
|
9767
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
9768
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
9769
|
+
if (height < maxHeight && !hasColumnLayout) {
|
|
9770
|
+
item.setAttribute("style", `padding-bottom: ${maxHeight - height}px;`);
|
|
9771
|
+
}
|
|
9772
|
+
else if (height === maxHeight || hasColumnLayout) {
|
|
9773
|
+
item.setAttribute("style", `padding-bottom: 0px;`);
|
|
9774
|
+
}
|
|
9775
|
+
});
|
|
9776
|
+
}
|
|
9194
9777
|
/**
|
|
9195
9778
|
* render() function
|
|
9196
9779
|
* Always the last one in the class.
|
|
@@ -9200,7 +9783,7 @@ class DuetGrid {
|
|
|
9200
9783
|
"duet-grid": true,
|
|
9201
9784
|
"duet-no-stacking": !this.responsive,
|
|
9202
9785
|
"duet-grid-align-top": this.alignment === "top",
|
|
9203
|
-
"duet-grid-align-bottom": this.alignment === "bottom",
|
|
9786
|
+
"duet-grid-align-bottom": this.alignment === "bottom" || this.alignment === "form_distribute",
|
|
9204
9787
|
"duet-grid-align-center": this.alignment === "center",
|
|
9205
9788
|
"duet-grid-align-stretch": this.alignment === "stretch",
|
|
9206
9789
|
"duet-grid-align-baseline": this.alignment === "baseline",
|
|
@@ -9235,7 +9818,8 @@ class DuetGrid {
|
|
|
9235
9818
|
"direction": [1],
|
|
9236
9819
|
"alignment": [1],
|
|
9237
9820
|
"distribution": [1],
|
|
9238
|
-
"mobile": [1]
|
|
9821
|
+
"mobile": [1],
|
|
9822
|
+
"distributeFormElement": [32]
|
|
9239
9823
|
},
|
|
9240
9824
|
"$listeners$": undefined,
|
|
9241
9825
|
"$lazyBundleId$": "-",
|
|
@@ -9316,6 +9900,8 @@ class DuetGridItem {
|
|
|
9316
9900
|
}; }
|
|
9317
9901
|
}
|
|
9318
9902
|
|
|
9903
|
+
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>"};
|
|
9904
|
+
|
|
9319
9905
|
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>"};
|
|
9320
9906
|
|
|
9321
9907
|
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>"};
|
|
@@ -9506,7 +10092,41 @@ const enableBodyScroll = targetElement => {
|
|
|
9506
10092
|
}
|
|
9507
10093
|
};
|
|
9508
10094
|
|
|
9509
|
-
const duetHeaderCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-header,*.sc-duet-header::after,*.sc-duet-header::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-header-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%}@supports (position: -webkit-sticky){/*!@:host*/.sc-duet-header-h{position:-webkit-sticky;top:-4rem;z-index:400}}@supports (position: sticky){/*!@:host*/.sc-duet-header-h{position:sticky;top:-4rem;z-index:400}}/*!@.duet-header-reserved-space*/.duet-header-reserved-space.sc-duet-header{height:4rem}@media (min-width: 62em){/*!@.duet-header-reserved-space.duet-with-links*/.duet-header-reserved-space.duet-with-links.sc-duet-header{height:7rem}}/*!@.duet-header*/.duet-header.sc-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*/.duet-header.duet-theme-turva.sc-duet-header{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*/.duet-header.duet-theme-turva.sc-duet-header{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13)}}@media (min-width: 62em){/*!@.duet-header*/.duet-header.sc-duet-header{position:absolute;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07)}/*!@.duet-header.duet-header-inactive*/.duet-header.duet-header-inactive.sc-duet-header{position:fixed}}/*!@.duet-header **/.duet-header.sc-duet-header *.sc-duet-header{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}/*!@.duet-header-top*/.duet-header-top.sc-duet-header{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*/.duet-header-top.sc-duet-header{z-index:100;padding:0 28px;box-shadow:none}/*!@.duet-header-top duet-logo*/.duet-header-top.sc-duet-header duet-logo.sc-duet-header{padding-right:4px}}@media (min-width: 106.25em){/*!@.duet-header-top*/.duet-header-top.sc-duet-header{padding:0 48px}}/*!@.duet-theme-turva .duet-header-top*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header{box-shadow:none}}/*!@.duet-theme-turva .duet-header-top duet-logo*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header duet-logo.sc-duet-header{left:-80px !important;margin-top:-8px !important}/*!@.duet-header-top .duet-header-region*/.duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{border-color:#cfcfd1}@media (max-width: 35.9375em){/*!@.duet-header-top .duet-header-region*/.duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{display:none}}@media (min-width: 62em){/*!@.duet-header-top .duet-header-region*/.duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{padding-left:19px}}/*!@.duet-header-bottom*/.duet-header-bottom.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-bottom.sc-duet-header{background:#f5f5f7}@media (min-width: 62em){/*!@.duet-header-bottom*/.duet-header-bottom.sc-duet-header{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*/.duet-header-bottom.duet-header-inactive.sc-duet-header{position:relative}}/*!@.duet-header-bottom.active*/.duet-header-bottom.active.sc-duet-header{visibility:visible;opacity:1;transition:opacity 300ms ease, visibility 300ms ease}@media (min-width: 62em){/*!@.duet-header-bottom*/.duet-header-bottom.sc-duet-header{position:relative;transition:none !important}}/*!@.duet-header-items,\n.duet-header-bottom-utils,\n.duet-header-utils*/.duet-header-items.sc-duet-header,.duet-header-bottom-utils.sc-duet-header,.duet-header-utils.sc-duet-header{opacity:0;transition:transform 600ms ease, opacity 600ms ease;transform:translateY(-28px)}@media (min-width: 62em){/*!@.duet-header-items,\n.duet-header-bottom-utils,\n.duet-header-utils*/.duet-header-items.sc-duet-header,.duet-header-bottom-utils.sc-duet-header,.duet-header-utils.sc-duet-header{opacity:1;transition:none !important;transform:none}}/*!@.active .duet-header-items,\n.active .duet-header-bottom-utils,\n.active .duet-header-utils*/.active.sc-duet-header .duet-header-items.sc-duet-header,.active.sc-duet-header .duet-header-bottom-utils.sc-duet-header,.active.sc-duet-header .duet-header-utils.sc-duet-header{opacity:1;transform:translateY(0)}/*!@.duet-header-items*/.duet-header-items.sc-duet-header{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*/.duet-header-items.sc-duet-header{z-index:100;display:flex;flex-direction:row;padding:0 21.5384615385px}}@media (min-width: 106.25em){/*!@.duet-header-items*/.duet-header-items.sc-duet-header{padding-left:43.6363636364px}}/*!@.duet-header-items a*/.duet-header-items.sc-duet-header a.sc-duet-header{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*/.duet-header-items.sc-duet-header a.sc-duet-header{border-radius:4px}}/*!@.duet-theme-turva .duet-header-items a*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header a.sc-duet-header{font-weight:600;color:#171c3a;border-color:#e1e3e6}/*!@.duet-header-items a:hover*/.duet-header-items.sc-duet-header a.sc-duet-header:hover{color:#004d80}/*!@.duet-theme-turva .duet-header-items a:hover*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header a.sc-duet-header:hover{color:#444445}/*!@.duet-header-items a:focus*/.duet-header-items.sc-duet-header a.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-items a:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-items.sc-duet-header a.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header a.sc-duet-header: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*/.duet-header-items.sc-duet-header a.sc-duet-header{width:auto;max-width:300px;padding:0 12px;overflow:hidden;font-size:0.875rem;text-overflow:ellipsis;border:0}}/*!@.duet-header-items a.active*/.duet-header-items.sc-duet-header a.active.sc-duet-header{color:#0077b3;-moz-osx-font-smoothing:auto;-webkit-font-smoothing:subpixel-antialiased}/*!@.duet-theme-turva .duet-header-items a.active*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header a.active.sc-duet-header{color:#c60c30}/*!@.duet-header-items a.active:hover*/.duet-header-items.sc-duet-header a.active.sc-duet-header:hover{color:#0077b3}/*!@.duet-theme-turva .duet-header-items a.active:hover*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header a.active.sc-duet-header:hover{color:#c60c30}/*!@.duet-header-items a.active::after*/.duet-header-items.sc-duet-header a.active.sc-duet-header::after{position:absolute;top:0;bottom:0;left:0;width:4px;content:\"\";background:#0077b3}/*!@.duet-theme-turva .duet-header-items a.active::after*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header a.active.sc-duet-header::after{background:#c60c30}@media (min-width: 62em){/*!@.duet-header-items a.active::after*/.duet-header-items.sc-duet-header a.active.sc-duet-header::after{top:auto;left:12px;width:calc(100% - 24px);height:3px}}/*!@.duet-header-toggle*/.duet-header-toggle.sc-duet-header{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*/.duet-header-toggle.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-toggle:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-toggle.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-toggle.sc-duet-header: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*/.duet-header-toggle.sc-duet-header{display:none}}/*!@.duet-header-hamburger*/.duet-header-hamburger.sc-duet-header{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*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header{background:#171c3a}/*!@.duet-header-hamburger .duet-header-bar:nth-child(1)*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(1){top:0}/*!@.duet-header-hamburger .duet-header-bar:nth-child(2), .duet-header-hamburger .duet-header-bar:nth-child(3)*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(2),.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(3){top:7px}/*!@.duet-header-hamburger .duet-header-bar:nth-child(4)*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(4){top:14px}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(1)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(1){top:7px;left:50%;width:0%}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(2)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(2){transform:rotate(45deg)}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(3)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(3){transform:rotate(-45deg)}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(4)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(4){top:7px;left:50%;width:0%}/*!@.duet-header-utils*/.duet-header-utils.sc-duet-header{display:flex;flex-direction:column;width:100%}@media (min-width: 62em){/*!@.duet-header-utils*/.duet-header-utils.sc-duet-header{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*/.duet-header-utils.sc-duet-header{margin-right:36px}}@media (min-width: 62em){/*!@.duet-header-bottom-utils*/.duet-header-bottom-utils.sc-duet-header{position:absolute;top:0;right:0;z-index:999999999;margin-right:20px}}@media (min-width: 106.25em){/*!@.duet-header-bottom-utils*/.duet-header-bottom-utils.sc-duet-header{margin-right:36px}}/*!@button*/button.sc-duet-header{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*/.duet-theme-turva.sc-duet-header button.sc-duet-header{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*/.duet-header-button.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header{color:#171c3a;border-color:#e4e4e6}/*!@.duet-header-button:hover*/.duet-header-button.sc-duet-header:hover{color:#004d80}/*!@.duet-theme-turva .duet-header-button:hover*/.duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header:hover{color:#444445}/*!@.duet-header-button:focus*/.duet-header-button.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-button:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-button.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-header-button:active*/.duet-header-button.sc-duet-header:active{opacity:0.75}@media (min-width: 62em){/*!@.duet-header-button*/.duet-header-button.sc-duet-header{width:auto;max-width:200px;height:4rem;padding:0 16px;font-size:0.875rem;line-height:4rem;border:0}/*!@.duet-header-button::before*/.duet-header-button.sc-duet-header::before{position:absolute;top:50%;right:0;width:1px;height:20px;content:\"\";background:#cfd2d4;transform:translateY(-50%)}/*!@.duet-theme-turva .duet-header-button::before*/.duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header::before{background:#cfcfd1}}/*!@.duet-header-button.active*/.duet-header-button.active.sc-duet-header{color:#0077b3;border-radius:0}/*!@.duet-theme-turva .duet-header-button.active*/.duet-theme-turva.sc-duet-header .duet-header-button.active.sc-duet-header{color:#c60c30}/*!@.duet-header-button.active:hover*/.duet-header-button.active.sc-duet-header:hover{color:#0077b3}/*!@.duet-theme-turva .duet-header-button.active:hover*/.duet-theme-turva.sc-duet-header .duet-header-button.active.sc-duet-header:hover{color:#c60c30}/*!@.duet-header-button.active::after*/.duet-header-button.active.sc-duet-header::after{position:absolute;top:0;bottom:0;left:0;width:3px;content:\"\";background:#0077b3}/*!@.duet-theme-turva .duet-header-button.active::after*/.duet-theme-turva.sc-duet-header .duet-header-button.active.sc-duet-header::after{color:#c60c30}/*!@.duet-header-no-action*/.duet-header-no-action.sc-duet-header{pointer-events:none}/*!@.duet-header-user-label*/.duet-header-user-label.sc-duet-header{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 62em){/*!@.duet-header-utils > *:last-child::before,\n.duet-header-utils > *:last-child button::before*/.duet-header-utils.sc-duet-header>*.sc-duet-header:last-child::before,.duet-header-utils.sc-duet-header>*.sc-duet-header:last-child button.sc-duet-header::before{display:none}}@media (min-width: 62em){/*!@.duet-header-utils > *:last-child .duet-header-dropdown-content*/.duet-header-utils.sc-duet-header>*.sc-duet-header:last-child .duet-header-dropdown-content.sc-duet-header{right:0;left:auto}}/*!@.duet-header-language*/.duet-header-language.sc-duet-header{text-transform:uppercase}/*!@.duet-header-icon*/.duet-header-icon.sc-duet-header{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*/.duet-header-icon.sc-duet-header{margin-right:8px}}/*!@.duet-header-caret*/.duet-header-caret.sc-duet-header{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*/.duet-header-caret.sc-duet-header{width:7px;height:7px}}/*!@.duet-header-caret duet-icon*/.duet-header-caret.sc-duet-header duet-icon.sc-duet-header{width:10px}/*!@.duet-header-dropdown-toggle.active .duet-header-caret*/.duet-header-dropdown-toggle.active.sc-duet-header .duet-header-caret.sc-duet-header{transform:translateY(-50%) rotate(180deg)}/*!@.duet-header-dropdown-toggle:focus*/.duet-header-dropdown-toggle.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-dropdown-toggle:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-dropdown-toggle.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-header-dropdown-toggle:active*/.duet-header-dropdown-toggle.sc-duet-header:active{outline:none}/*!@.duet-header-badge*/.duet-header-badge.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-badge.sc-duet-header{background:#faa40f}/*!@.duet-header-dropdown*/.duet-header-dropdown.sc-duet-header{position:relative}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-toggle*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header{z-index:200;padding-right:36px;overflow:hidden;transition:border 300ms ease}}/*!@.duet-header-dropdown .duet-header-dropdown-toggle::after*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header::after{display:none !important}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-toggle::after*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header::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*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header::after{background:#c60c30}}/*!@.duet-header-dropdown .duet-header-dropdown-toggle.active, .duet-header-dropdown .duet-header-dropdown-toggle.active:hover*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header,.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header,.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header: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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header,.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header:hover{border:0}/*!@.duet-header-dropdown .duet-header-dropdown-toggle.active::after, .duet-header-dropdown .duet-header-dropdown-toggle.active:hover::after*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header::after,.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header:hover::after{position:absolute;top:auto;bottom:0;left:0;width:100%;height:3px;transform:translateY(0)}}/*!@.duet-header-dropdown .duet-header-dropdown-content*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{display:none;padding-bottom:16px;background:#f5f8fa;border-bottom:1px solid #e1e3e6}/*!@.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{background:#f5f5f7;border-color:#e1e3e6}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.active.sc-duet-header{display:block}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content.active*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.active.sc-duet-header{visibility:visible;opacity:1;transform:translateZ(0) translateY(0)}}/*!@.duet-header-dropdown .duet-header-dropdown-content a*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header{color:#171c3a}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content a*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header{padding-left:20px !important}}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content a:hover*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:hover{background:#e6f2f8}/*!@.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a:hover*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:hover{background:#f9e6ea}}/*!@.duet-header-dropdown .duet-header-dropdown-content a:focus*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-dropdown .duet-header-dropdown-content a:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.active.sc-duet-header{padding-right:36px;font-weight:600;vertical-align:baseline;pointer-events:none}/*!@.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a.active*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.active.sc-duet-header{font-weight:700}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content a.active*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.active.sc-duet-header{color:white;background:#0077b3}/*!@.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a.active*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.active.sc-duet-header{background:#c60c30}}/*!@.duet-header-dropdown .duet-header-dropdown-content .duet-header-link-external*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header .duet-header-link-external.sc-duet-header{margin-left:4px}/*!@.duet-header-back .duet-header-top*/.duet-header-back.sc-duet-header .duet-header-top.sc-duet-header{flex-direction:row;align-items:center;justify-content:center}/*!@.duet-header-back duet-button*/.duet-header-back.sc-duet-header duet-button.sc-duet-header{position:absolute;top:50%;left:36px;transform:translateY(-50%)}@media (max-width: 35.9375em){/*!@.duet-header-back duet-button*/.duet-header-back.sc-duet-header duet-button.sc-duet-header{left:20px;max-width:40px;padding:0 12px;overflow:hidden}}/*!@.duet-header-back .duet-header-toggle*/.duet-header-back.sc-duet-header .duet-header-toggle.sc-duet-header{display:none !important}/*!@.duet-header-skip*/.duet-header-skip.sc-duet-header{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*/.duet-header-skip.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-skip.sc-duet-header:focus,.duet-header-skip.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-skip.sc-duet-header{min-width:120px;color:#171c3a}@media (min-width: 106.25em){/*!@.duet-header-skip*/.duet-header-skip.sc-duet-header{margin-left:20px}}/*!@.duet-header-skip:focus*/.duet-header-skip.sc-duet-header:focus{top:12px;left:20px;width:auto;height:auto;outline:0;opacity:1}";
|
|
10095
|
+
const DuetHeaderIcon = (props, _children) => {
|
|
10096
|
+
const iconSize = props.iconSize ? props.iconSize : "x-small";
|
|
10097
|
+
return (hAsync("span", { class: "duet-header-icon" },
|
|
10098
|
+
hAsync("duet-icon", { margin: "none", size: iconSize, icon: props.icon, color: "currentColor" })));
|
|
10099
|
+
};
|
|
10100
|
+
|
|
10101
|
+
const DuetHeaderDropdown = (props, _children) => {
|
|
10102
|
+
const accessibleLabel = props.accessibleText ? props.accessibleText : props.label;
|
|
10103
|
+
return (hAsync("div", { class: { ["duet-header-dropdown"]: true, [props.className]: !!props.className } },
|
|
10104
|
+
hAsync("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: {
|
|
10105
|
+
[props.id]: true,
|
|
10106
|
+
"duet-header-dropdown-toggle": true,
|
|
10107
|
+
"duet-header-button": true,
|
|
10108
|
+
active: props.active,
|
|
10109
|
+
}, onClick: props.onToggle },
|
|
10110
|
+
props.icon && hAsync(DuetHeaderIcon, { icon: props.icon }),
|
|
10111
|
+
hAsync("span", { "aria-hidden": "true", id: `${props.id}-label`, class: "duet-header-dropdown-label" }, props.label),
|
|
10112
|
+
props.badge && hAsync("div", { class: "duet-header-badge" }),
|
|
10113
|
+
hAsync("div", { class: "duet-header-caret", "aria-hidden": "true" },
|
|
10114
|
+
hAsync("duet-icon", { margin: "none", size: "auto", icon: actionArrowDownSmall.svg, color: "currentColor" })),
|
|
10115
|
+
hAsync("duet-visually-hidden", { id: `${props.id}-accessible-label` }, accessibleLabel)),
|
|
10116
|
+
hAsync("div", { ref: props.itemsRef, tabindex: "-1", role: "menu", id: props.id, "aria-labelledby": `${props.id}-button`, class: {
|
|
10117
|
+
"duet-header-dropdown-content": true,
|
|
10118
|
+
[`${props.id}-items`]: true,
|
|
10119
|
+
active: props.isOpen,
|
|
10120
|
+
} }, _children)));
|
|
10121
|
+
};
|
|
10122
|
+
|
|
10123
|
+
const DuetHeaderHamburger = () => (hAsync("div", { class: "duet-header-hamburger" },
|
|
10124
|
+
hAsync("span", { class: "duet-header-bar" }),
|
|
10125
|
+
hAsync("span", { class: "duet-header-bar" }),
|
|
10126
|
+
hAsync("span", { class: "duet-header-bar" }),
|
|
10127
|
+
hAsync("span", { class: "duet-header-bar" })));
|
|
10128
|
+
|
|
10129
|
+
const duetHeaderCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-header,*.sc-duet-header::after,*.sc-duet-header::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-header-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%}@supports (position: -webkit-sticky){/*!@:host*/.sc-duet-header-h{position:-webkit-sticky;top:-4rem;z-index:400}}@supports (position: sticky){/*!@:host*/.sc-duet-header-h{position:sticky;top:-4rem;z-index:400}}@supports (position: -webkit-sticky){/*!@:host(.duet-header-multi-level-desktop-variation)*/.duet-header-multi-level-desktop-variation.sc-duet-header-h{top:0}}@supports (position: sticky){/*!@:host(.duet-header-multi-level-desktop-variation)*/.duet-header-multi-level-desktop-variation.sc-duet-header-h{top:0}}/*!@.duet-header-reserved-space*/.duet-header-reserved-space.sc-duet-header{height:4rem}@media (min-width: 62em){/*!@.duet-header-reserved-space.duet-with-links*/.duet-header-reserved-space.duet-with-links.sc-duet-header{height:7rem}}/*!@.duet-header*/.duet-header.sc-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*/.duet-header.duet-theme-turva.sc-duet-header{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*/.duet-header.duet-theme-turva.sc-duet-header{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13)}}@media (min-width: 62em){/*!@.duet-header*/.duet-header.sc-duet-header{position:absolute;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07)}/*!@.duet-header.duet-header-inactive*/.duet-header.duet-header-inactive.sc-duet-header{position:fixed}}/*!@.duet-header **/.duet-header.sc-duet-header *.sc-duet-header{-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}/*!@.duet-header-top*/.duet-header-top.sc-duet-header{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*/.duet-header-top.sc-duet-header{z-index:100;padding:0 28px;box-shadow:none}/*!@.duet-header-top duet-logo*/.duet-header-top.sc-duet-header duet-logo.sc-duet-header{padding-right:4px}}@media (min-width: 106.25em){/*!@.duet-header-top*/.duet-header-top.sc-duet-header{padding:0 48px}}/*!@.duet-theme-turva .duet-header-top*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header{box-shadow:none}}/*!@.duet-theme-turva .duet-header-top duet-logo*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header duet-logo.sc-duet-header{left:-80px !important;margin-top:-8px !important}/*!@.duet-header-top .duet-header-region*/.duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{border-color:#cfcfd1}@media (max-width: 35.9375em){/*!@.duet-header-top .duet-header-region*/.duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{display:none}}@media (min-width: 62em){/*!@.duet-header-top .duet-header-region*/.duet-header-top.sc-duet-header .duet-header-region.sc-duet-header{padding-left:19px}}/*!@.duet-header-bottom*/.duet-header-bottom.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-bottom.sc-duet-header{background:#f5f5f7}@media (min-width: 62em){/*!@.duet-header-bottom*/.duet-header-bottom.sc-duet-header{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*/.duet-header-bottom.duet-header-inactive.sc-duet-header{position:relative}}/*!@.duet-header-bottom.active*/.duet-header-bottom.active.sc-duet-header{visibility:visible;opacity:1;transition:opacity 300ms ease, visibility 300ms ease}@media (min-width: 62em){/*!@.duet-header-bottom*/.duet-header-bottom.sc-duet-header{position:relative;transition:none !important}}/*!@.duet-header-items,\n.duet-header-bottom-utils,\n.duet-header-utils*/.duet-header-items.sc-duet-header,.duet-header-bottom-utils.sc-duet-header,.duet-header-utils.sc-duet-header{opacity:0;transition:transform 600ms ease, opacity 600ms ease;transform:translateY(-28px)}@media (min-width: 62em){/*!@.duet-header-items,\n.duet-header-bottom-utils,\n.duet-header-utils*/.duet-header-items.sc-duet-header,.duet-header-bottom-utils.sc-duet-header,.duet-header-utils.sc-duet-header{opacity:1;transition:none !important;transform:none}}/*!@.active .duet-header-items,\n.active .duet-header-bottom-utils,\n.active .duet-header-utils*/.active.sc-duet-header .duet-header-items.sc-duet-header,.active.sc-duet-header .duet-header-bottom-utils.sc-duet-header,.active.sc-duet-header .duet-header-utils.sc-duet-header{opacity:1;transform:translateY(0)}/*!@.duet-header-items*/.duet-header-items.sc-duet-header{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*/.duet-header-items.sc-duet-header{z-index:100;display:flex;flex-direction:row;padding:0 21.5384615385px}}@media (min-width: 106.25em){/*!@.duet-header-items*/.duet-header-items.sc-duet-header{padding-left:43.6363636364px}}/*!@.duet-header-items .duet-header-item-container*/.duet-header-items.sc-duet-header .duet-header-item-container.sc-duet-header{border-bottom:1px solid #e1e3e6;border-radius:0}@media (min-width: 62em){/*!@.duet-header-items .duet-header-item-container*/.duet-header-items.sc-duet-header .duet-header-item-container.sc-duet-header{border:0}}/*!@.duet-header-items .duet-header-second-level .duet-header-item*/.duet-header-items.sc-duet-header .duet-header-second-level.sc-duet-header .duet-header-item.sc-duet-header{padding:0 40px;border:0}/*!@.duet-header-items .duet-header-second-level .duet-header-button*/.duet-header-items.sc-duet-header .duet-header-second-level.sc-duet-header .duet-header-button.sc-duet-header{border:0}/*!@.duet-header-items .duet-header-second-level .duet-header-dropdown-content*/.duet-header-items.sc-duet-header .duet-header-second-level.sc-duet-header .duet-header-dropdown-content.sc-duet-header{padding:0;border:0}/*!@.duet-header-items .duet-header-third-level .duet-header-item*/.duet-header-items.sc-duet-header .duet-header-third-level.sc-duet-header .duet-header-item.sc-duet-header{padding:0 75px}/*!@.duet-header-items .duet-header-item*/.duet-header-items.sc-duet-header .duet-header-item.sc-duet-header{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*/.duet-header-items.sc-duet-header .duet-header-item.sc-duet-header{border-radius:4px}}/*!@.duet-theme-turva .duet-header-items .duet-header-item*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header .duet-header-item.sc-duet-header{font-weight:600;color:#171c3a;border-color:#e1e3e6}/*!@.duet-header-items .duet-header-item:hover*/.duet-header-items.sc-duet-header .duet-header-item.sc-duet-header:hover{color:#004d80}/*!@.duet-theme-turva .duet-header-items .duet-header-item:hover*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header .duet-header-item.sc-duet-header:hover{color:#444445}/*!@.duet-header-items .duet-header-item:focus*/.duet-header-items.sc-duet-header .duet-header-item.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-items .duet-header-item:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-items.sc-duet-header .duet-header-item.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header .duet-header-item.sc-duet-header: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*/.duet-header-items.sc-duet-header .duet-header-item.sc-duet-header{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*/.duet-header-items.sc-duet-header .duet-header-item.active.sc-duet-header{color:#0077b3;-moz-osx-font-smoothing:auto;-webkit-font-smoothing:subpixel-antialiased}/*!@.duet-theme-turva .duet-header-items .duet-header-item.active*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header .duet-header-item.active.sc-duet-header{color:#c60c30}/*!@.duet-header-items .duet-header-item.active:hover*/.duet-header-items.sc-duet-header .duet-header-item.active.sc-duet-header:hover{color:#0077b3}/*!@.duet-theme-turva .duet-header-items .duet-header-item.active:hover*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header .duet-header-item.active.sc-duet-header:hover{color:#c60c30}/*!@.duet-header-items .duet-header-item.active::after*/.duet-header-items.sc-duet-header .duet-header-item.active.sc-duet-header::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*/.duet-theme-turva.sc-duet-header .duet-header-items.sc-duet-header .duet-header-item.active.sc-duet-header::after{background:#c60c30}@media (min-width: 62em){/*!@.duet-header-items .duet-header-item.active::after*/.duet-header-items.sc-duet-header .duet-header-item.active.sc-duet-header::after{top:auto;left:12px;width:calc(100% - 24px);height:3px}}/*!@.duet-header-third-level-active .duet-header-items .duet-header-first-level.active*/.duet-header-third-level-active.sc-duet-header .duet-header-items.sc-duet-header .duet-header-first-level.active.sc-duet-header{color:#00294d}/*!@.duet-header-third-level-active .duet-header-items .duet-header-first-level.active::after*/.duet-header-third-level-active.sc-duet-header .duet-header-items.sc-duet-header .duet-header-first-level.active.sc-duet-header::after{display:none}/*!@.duet-header-third-level-active .duet-header-items .duet-header-second-level button*/.duet-header-third-level-active.sc-duet-header .duet-header-items.sc-duet-header .duet-header-second-level.sc-duet-header button.sc-duet-header{color:#00294d}/*!@.duet-header-toggle*/.duet-header-toggle.sc-duet-header{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*/.duet-header-toggle.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-toggle:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-toggle.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-toggle.sc-duet-header: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*/.duet-header-toggle.sc-duet-header{display:none}}/*!@.duet-header-hamburger*/.duet-header-hamburger.sc-duet-header{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*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header{background:#171c3a}/*!@.duet-header-hamburger .duet-header-bar:nth-child(1)*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(1){top:0}/*!@.duet-header-hamburger .duet-header-bar:nth-child(2), .duet-header-hamburger .duet-header-bar:nth-child(3)*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(2),.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(3){top:7px}/*!@.duet-header-hamburger .duet-header-bar:nth-child(4)*/.duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(4){top:14px}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(1)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(1){top:7px;left:50%;width:0%}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(2)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(2){transform:rotate(45deg)}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(3)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(3){transform:rotate(-45deg)}/*!@button.active .duet-header-hamburger .duet-header-bar:nth-child(4)*/button.active.sc-duet-header .duet-header-hamburger.sc-duet-header .duet-header-bar.sc-duet-header:nth-child(4){top:7px;left:50%;width:0%}/*!@.duet-header-utils*/.duet-header-utils.sc-duet-header{display:flex;flex-direction:column;width:100%}@media (min-width: 62em){/*!@.duet-header-utils*/.duet-header-utils.sc-duet-header{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*/.duet-header-utils.sc-duet-header{margin-right:36px}}@media (min-width: 62em){/*!@.duet-header-bottom-utils*/.duet-header-bottom-utils.sc-duet-header{position:absolute;top:0;right:0;z-index:999999999;margin-right:20px}}@media (min-width: 106.25em){/*!@.duet-header-bottom-utils*/.duet-header-bottom-utils.sc-duet-header{margin-right:36px}}/*!@button*/button.sc-duet-header{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*/.duet-theme-turva.sc-duet-header button.sc-duet-header{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*/.duet-header-button.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header{color:#171c3a;border-color:#e4e4e6}/*!@.duet-header-button:hover*/.duet-header-button.sc-duet-header:hover{color:#004d80}/*!@.duet-theme-turva .duet-header-button:hover*/.duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header:hover{color:#444445}/*!@.duet-header-button:focus*/.duet-header-button.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-button:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-button.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-header-button:active*/.duet-header-button.sc-duet-header:active{opacity:0.75}@media (min-width: 62em){/*!@.duet-header-button*/.duet-header-button.sc-duet-header{width:auto;max-width:200px;height:4rem;padding:0 16px;font-size:0.875rem;line-height:4rem;border:0}/*!@.duet-header-button::before*/.duet-header-button.sc-duet-header::before{position:absolute;top:50%;right:0;width:1px;height:20px;content:\"\";background:#cfd2d4;transform:translateY(-50%)}/*!@.duet-theme-turva .duet-header-button::before*/.duet-theme-turva.sc-duet-header .duet-header-button.sc-duet-header::before{background:#cfcfd1}}/*!@.duet-header-button.active*/.duet-header-button.active.sc-duet-header{color:#0077b3;border-radius:0}/*!@.duet-theme-turva .duet-header-button.active*/.duet-theme-turva.sc-duet-header .duet-header-button.active.sc-duet-header{color:#c60c30}/*!@.duet-header-button.active:hover*/.duet-header-button.active.sc-duet-header:hover{color:#0077b3}/*!@.duet-theme-turva .duet-header-button.active:hover*/.duet-theme-turva.sc-duet-header .duet-header-button.active.sc-duet-header:hover{color:#c60c30}/*!@.duet-header-button.active::after*/.duet-header-button.active.sc-duet-header::after{position:absolute;top:0;bottom:0;left:0;width:3px;content:\"\";background:#0077b3}/*!@.duet-theme-turva .duet-header-button.active::after*/.duet-theme-turva.sc-duet-header .duet-header-button.active.sc-duet-header::after{color:#c60c30}/*!@.duet-header-utils .duet-header-button.duet-header-logout*/.duet-header-utils.sc-duet-header .duet-header-button.duet-header-logout.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-utils.sc-duet-header .duet-header-button.duet-header-logout.sc-duet-header{border-color:#171c3a}/*!@.duet-header-utils .duet-header-button.duet-header-logout .duet-header-icon*/.duet-header-utils.sc-duet-header .duet-header-button.duet-header-logout.sc-duet-header .duet-header-icon.sc-duet-header{margin-right:0.5rem}/*!@.duet-header-utils .duet-header-button.duet-header-logout .duet-header-button-label*/.duet-header-utils.sc-duet-header .duet-header-button.duet-header-logout.sc-duet-header .duet-header-button-label.sc-duet-header{font-size:0.875rem}@media (min-width: 62em){/*!@.duet-header-utils .duet-header-button.duet-header-logout*/.duet-header-utils.sc-duet-header .duet-header-button.duet-header-logout.sc-duet-header{height:4rem;margin:0;font-weight:400;border:0}/*!@.duet-header-utils .duet-header-button.duet-header-logout .duet-header-icon*/.duet-header-utils.sc-duet-header .duet-header-button.duet-header-logout.sc-duet-header .duet-header-icon.sc-duet-header{margin-right:0.75rem}}/*!@.duet-header-no-action*/.duet-header-no-action.sc-duet-header{pointer-events:none}/*!@.duet-header-user-label*/.duet-header-user-label.sc-duet-header{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 62em){/*!@.duet-header-utils > *:last-child::before,\n.duet-header-utils > *:last-child button::before*/.duet-header-utils.sc-duet-header>*.sc-duet-header:last-child::before,.duet-header-utils.sc-duet-header>*.sc-duet-header:last-child button.sc-duet-header::before{display:none}}@media (min-width: 62em){/*!@.duet-header-utils > *:last-child .duet-header-dropdown-content*/.duet-header-utils.sc-duet-header>*.sc-duet-header:last-child .duet-header-dropdown-content.sc-duet-header{right:0;left:auto}}/*!@.duet-header-language*/.duet-header-language.sc-duet-header{text-transform:uppercase}/*!@.duet-header-icon*/.duet-header-icon.sc-duet-header{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*/.duet-header-icon.sc-duet-header{margin-right:8px}}/*!@.duet-header-caret*/.duet-header-caret.sc-duet-header{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*/.duet-header-caret.sc-duet-header{width:7px;height:7px}}/*!@.duet-header-caret duet-icon*/.duet-header-caret.sc-duet-header duet-icon.sc-duet-header{width:10px}/*!@.duet-header-dropdown-toggle.active .duet-header-caret*/.duet-header-dropdown-toggle.active.sc-duet-header .duet-header-caret.sc-duet-header{transform:translateY(-50%) rotate(180deg)}/*!@.duet-header-dropdown-toggle:focus*/.duet-header-dropdown-toggle.sc-duet-header:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-dropdown-toggle:focus*/.user-is-tabbing.sc-duet-header-h .duet-header-dropdown-toggle.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-header-dropdown-toggle:active*/.duet-header-dropdown-toggle.sc-duet-header:active{outline:none}/*!@.duet-header-badge*/.duet-header-badge.sc-duet-header{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*/.duet-theme-turva.sc-duet-header .duet-header-badge.sc-duet-header{background:#faa40f}/*!@.duet-header-dropdown*/.duet-header-dropdown.sc-duet-header{position:relative}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-toggle*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header{z-index:200;padding-right:36px;overflow:hidden;transition:border 300ms ease}}/*!@.duet-header-dropdown .duet-header-dropdown-toggle::after*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header::after{display:none !important}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-toggle::after*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header::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*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header::after{background:#c60c30}}/*!@.duet-header-dropdown .duet-header-dropdown-toggle.active, .duet-header-dropdown .duet-header-dropdown-toggle.active:hover*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header,.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header,.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header: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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header,.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header:hover{border:0}/*!@.duet-header-dropdown .duet-header-dropdown-toggle.active::after, .duet-header-dropdown .duet-header-dropdown-toggle.active:hover::after*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header::after,.duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header:hover::after{position:absolute;top:auto;bottom:0;left:0;width:100%;height:3px;transform:translateY(0)}}/*!@.duet-header-dropdown .duet-header-dropdown-content*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{display:none;padding-bottom:16px;background:#f3f9fc;border-bottom:1px solid #e1e3e6}/*!@.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{background:#f5f5f7;border-color:#e1e3e6}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{min-width:170px}}/*!@.duet-header-dropdown .duet-header-dropdown-content.active*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.active.sc-duet-header{display:block}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content.active*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.active.sc-duet-header{visibility:visible;opacity:1;transform:translateZ(0) translateY(0)}}/*!@.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item)*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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)*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:not(.duet-header-item){color:#171c3a}@media (min-width: 62em){/*!@.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item)*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:not(.duet-header-item):hover{background:#e6f2f8}/*!@.duet-theme-turva .duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):hover*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:not(.duet-header-item):hover{background:#f9e6ea}}/*!@.duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):focus*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:not(.duet-header-item):focus{outline:0}/*!@:host(.user-is-tabbing) .duet-header-dropdown .duet-header-dropdown-content a:not(.duet-header-item):focus*/.user-is-tabbing.sc-duet-header-h .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.user-is-tabbing.sc-duet-header-h .duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header:not(.duet-header-item).active{background:#c60c30}}/*!@.duet-header-dropdown .duet-header-dropdown-content .duet-header-link-external*/.duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header .duet-header-link-external.sc-duet-header{margin-left:4px}/*!@.duet-header-back .duet-header-top*/.duet-header-back.sc-duet-header .duet-header-top.sc-duet-header{flex-direction:row;align-items:center;justify-content:center}/*!@.duet-header-back duet-button*/.duet-header-back.sc-duet-header duet-button.sc-duet-header{position:absolute;top:50%;left:36px;transform:translateY(-50%)}@media (max-width: 35.9375em){/*!@.duet-header-back duet-button*/.duet-header-back.sc-duet-header duet-button.sc-duet-header{left:20px;max-width:40px;padding:0 12px;overflow:hidden}}/*!@.duet-header-back .duet-header-toggle*/.duet-header-back.sc-duet-header .duet-header-toggle.sc-duet-header{display:none !important}/*!@.duet-header-skip*/.duet-header-skip.sc-duet-header{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*/.duet-header-skip.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-skip.sc-duet-header:focus,.duet-header-skip.sc-duet-header: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*/.duet-theme-turva.sc-duet-header .duet-header-skip.sc-duet-header{min-width:120px;color:#171c3a}@media (min-width: 106.25em){/*!@.duet-header-skip*/.duet-header-skip.sc-duet-header{margin-left:20px}}/*!@.duet-header-skip:focus*/.duet-header-skip.sc-duet-header:focus{top:12px;left:20px;width:auto;height:auto;outline:0;opacity:1}/*!@.duet-header-multi-level-desktop*/.duet-header-multi-level-desktop.sc-duet-header{height:6rem}/*!@.duet-header-multi-level-desktop .duet-header-top*/.duet-header-multi-level-desktop.sc-duet-header .duet-header-top.sc-duet-header{justify-content:space-between;height:6rem}/*!@.duet-header-multi-level-desktop .duet-header-button*/.duet-header-multi-level-desktop.sc-duet-header .duet-header-button.sc-duet-header{height:6rem}/*!@.duet-header-multi-level-desktop .logo-and-segment*/.duet-header-multi-level-desktop.sc-duet-header .logo-and-segment.sc-duet-header{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*/.duet-header-multi-level-desktop.sc-duet-header .logo-and-segment.sc-duet-header .duet-header-dropdown.sc-duet-header{z-index:400;margin-left:2rem}/*!@.duet-header-multi-level-desktop .logo-and-segment .duet-header-dropdown .duet-header-dropdown-content*/.duet-header-multi-level-desktop.sc-duet-header .logo-and-segment.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{background:#f3f9fc}/*!@.duet-header-multi-level-desktop .logo-and-segment button*/.duet-header-multi-level-desktop.sc-duet-header .logo-and-segment.sc-duet-header button.sc-duet-header{align-items:flex-start;height:2rem;font-weight:600;line-height:1rem}/*!@.duet-header-multi-level-desktop .logo-and-segment button::before*/.duet-header-multi-level-desktop.sc-duet-header .logo-and-segment.sc-duet-header button.sc-duet-header::before{display:none}/*!@.duet-header-multi-level-desktop .logo-and-segment .duet-header-caret*/.duet-header-multi-level-desktop.sc-duet-header .logo-and-segment.sc-duet-header .duet-header-caret.sc-duet-header{top:25%}/*!@.duet-header-multi-level-desktop-nav*/.duet-header-multi-level-desktop-nav.sc-duet-header{display:flex}/*!@.duet-header-multi-level-desktop-nav .duet-header-dropdown*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header{position:static}/*!@.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-toggle*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.sc-duet-header{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*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header{color:#0077b3}/*!@.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{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*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header{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*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header::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*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.active.sc-duet-header{font-weight:600;color:#0077b3;background:none}/*!@.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a.active::after*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.active.sc-duet-header::after{transform:translateY(0)}/*!@.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content a .duet-header-icon*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header .duet-header-icon.sc-duet-header{margin:0}/*!@.duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content .duet-header-badge*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header .duet-header-badge.sc-duet-header{position:absolute;margin-top:-2rem;margin-right:-2.25rem}/*!@.duet-header-multi-level-desktop-nav button::before*/.duet-header-multi-level-desktop-nav.sc-duet-header button.sc-duet-header::before{display:none}/*!@.duet-header-multi-level-desktop-nav .duet-header-caret*/.duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-caret.sc-duet-header{display:none}/*!@.duet-header-multi-level-desktop-utils*/.duet-header-multi-level-desktop-utils.sc-duet-header{display:flex;flex-basis:0;flex-grow:1;justify-content:flex-end}/*!@.duet-header-multi-level-desktop-utils > :last-child::before*/.duet-header-multi-level-desktop-utils.sc-duet-header>.sc-duet-header:last-child::before{display:none}/*!@.duet-header-multi-level-desktop-utils .duet-header-dropdown*/.duet-header-multi-level-desktop-utils.sc-duet-header .duet-header-dropdown.sc-duet-header{z-index:400}/*!@.duet-header-multi-level-desktop-utils .duet-header-dropdown .duet-header-dropdown-content*/.duet-header-multi-level-desktop-utils.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{background:#f3f9fc}/*!@.duet-header-multi-level-desktop-utils .duet-header-button-label,\n.duet-header-multi-level-desktop-utils .duet-header-dropdown-label*/.duet-header-multi-level-desktop-utils.sc-duet-header .duet-header-button-label.sc-duet-header,.duet-header-multi-level-desktop-utils.sc-duet-header .duet-header-dropdown-label.sc-duet-header{display:none}@media (min-width: 64.0625em){/*!@.duet-header-multi-level-desktop-utils .duet-header-button-label,\n.duet-header-multi-level-desktop-utils .duet-header-dropdown-label*/.duet-header-multi-level-desktop-utils.sc-duet-header .duet-header-button-label.sc-duet-header,.duet-header-multi-level-desktop-utils.sc-duet-header .duet-header-dropdown-label.sc-duet-header{display:initial}}/*!@.duet-header-multi-level-desktop .duet-theme-turva .logo-and-segment .duet-header-dropdown .duet-header-dropdown-content*/.duet-header-multi-level-desktop.sc-duet-header .duet-theme-turva.sc-duet-header .logo-and-segment.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{background:#fcf3f4}/*!@.duet-header-multi-level-desktop .duet-theme-turva .duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-toggle.active*/.duet-header-multi-level-desktop.sc-duet-header .duet-theme-turva.sc-duet-header .duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-toggle.active.sc-duet-header{color:#c60c30}/*!@.duet-header-multi-level-desktop .duet-theme-turva .duet-header-multi-level-desktop-nav .duet-header-dropdown .duet-header-dropdown-content*/.duet-header-multi-level-desktop.sc-duet-header .duet-theme-turva.sc-duet-header .duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{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*/.duet-header-multi-level-desktop.sc-duet-header .duet-theme-turva.sc-duet-header .duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.sc-duet-header::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*/.duet-header-multi-level-desktop.sc-duet-header .duet-theme-turva.sc-duet-header .duet-header-multi-level-desktop-nav.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header a.active.sc-duet-header{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*/.duet-header-multi-level-desktop.sc-duet-header .duet-theme-turva.sc-duet-header .duet-header-multi-level-desktop-utils.sc-duet-header .duet-header-dropdown.sc-duet-header .duet-header-dropdown-content.sc-duet-header{background:#fcf3f4}";
|
|
9510
10130
|
|
|
9511
10131
|
const createEvent = (ev, data) => ({
|
|
9512
10132
|
component: "duet-header",
|
|
@@ -9514,14 +10134,15 @@ const createEvent = (ev, data) => ({
|
|
|
9514
10134
|
originalEvent: ev,
|
|
9515
10135
|
});
|
|
9516
10136
|
/**
|
|
9517
|
-
* @slot utility - A slot for utilities, such as a notification drawer
|
|
9518
|
-
* @slot logo-utility - A slot to place elements alongside the logo. This takes precedence over the **region** prop.
|
|
10137
|
+
* @slot utility - A slot for utilities, such as a notification drawer or shopping basket.
|
|
10138
|
+
* @slot logo-utility - A slot to place elements alongside the logo. This takes precedence over the **region** prop. Note: not available in desktop multilevel header.
|
|
9519
10139
|
*/
|
|
9520
10140
|
class DuetHeader {
|
|
9521
10141
|
constructor(hostRef) {
|
|
9522
10142
|
registerInstance(this, hostRef);
|
|
9523
10143
|
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
9524
10144
|
this.duetSessionClick = createEvent$2(this, "duetSessionClick", 7);
|
|
10145
|
+
this.duetSearchClick = createEvent$2(this, "duetSearchClick", 7);
|
|
9525
10146
|
this.duetUserClick = createEvent$2(this, "duetUserClick", 7);
|
|
9526
10147
|
this.duetLanguageSelect = createEvent$2(this, "duetLanguageSelect", 7);
|
|
9527
10148
|
this.duetLogoClick = createEvent$2(this, "duetLogoClick", 7);
|
|
@@ -9530,7 +10151,15 @@ class DuetHeader {
|
|
|
9530
10151
|
this.duetItemClick = createEvent$2(this, "duetItemClick", 7);
|
|
9531
10152
|
this.duetSkipClick = createEvent$2(this, "duetSkipClick", 7);
|
|
9532
10153
|
this.duetAnalytics = createEvent$2(this, "duetAnalytics", 7);
|
|
10154
|
+
var _a;
|
|
10155
|
+
/**
|
|
10156
|
+
* Own Properties
|
|
10157
|
+
*/
|
|
10158
|
+
this.subMenuItemRefs = {};
|
|
10159
|
+
this.subMenuButtonRefs = {};
|
|
9533
10160
|
this.hasLanguageChanged = false;
|
|
10161
|
+
this.mql = [window.matchMedia(media_query_large.replace(/'/g, ""))];
|
|
10162
|
+
this.boundMqlFunctions = [];
|
|
9534
10163
|
/**
|
|
9535
10164
|
* State() variables
|
|
9536
10165
|
* Inlined decorator, alphabetical order.
|
|
@@ -9538,12 +10167,17 @@ class DuetHeader {
|
|
|
9538
10167
|
this.isContactOpen = false;
|
|
9539
10168
|
this.isLanguageOpen = false;
|
|
9540
10169
|
this.isSlideOutOpen = false;
|
|
10170
|
+
this.isSegmentOpen = false;
|
|
10171
|
+
this.openMenu = null;
|
|
10172
|
+
this.closedActives = null;
|
|
9541
10173
|
this.processedItems = null;
|
|
9542
10174
|
this.processedLanguageItems = null;
|
|
9543
10175
|
this.processedContactItems = null;
|
|
9544
10176
|
this.processedSession = null;
|
|
10177
|
+
this.processedSearch = null;
|
|
9545
10178
|
this.processedUser = null;
|
|
9546
10179
|
this.processedBack = null;
|
|
10180
|
+
this.renderDesktopNav = (_a = this.mql[0]) === null || _a === void 0 ? void 0 : _a.matches;
|
|
9547
10181
|
/**
|
|
9548
10182
|
* Theme of the header.
|
|
9549
10183
|
*/
|
|
@@ -9649,6 +10283,7 @@ class DuetHeader {
|
|
|
9649
10283
|
this.logoHref = "/";
|
|
9650
10284
|
/**
|
|
9651
10285
|
* The href of the current page item that is shown as “active”.
|
|
10286
|
+
* Note: not available in multilevel headers.
|
|
9652
10287
|
*/
|
|
9653
10288
|
this.currentHref = "/";
|
|
9654
10289
|
/**
|
|
@@ -9658,10 +10293,12 @@ class DuetHeader {
|
|
|
9658
10293
|
this.skipToId = "";
|
|
9659
10294
|
/**
|
|
9660
10295
|
* Region that is shown next to the logo. If empty, region will be hidden.
|
|
10296
|
+
* Note: not available in desktop multilevel header.
|
|
9661
10297
|
*/
|
|
9662
10298
|
this.region = "";
|
|
9663
10299
|
/**
|
|
9664
10300
|
* Label of the contact menu. If empty, contact menu will be hidden.
|
|
10301
|
+
* Note: not available in multilevel headers.
|
|
9665
10302
|
*/
|
|
9666
10303
|
this.contact = "";
|
|
9667
10304
|
this.handleClick = (event) => {
|
|
@@ -9680,6 +10317,11 @@ class DuetHeader {
|
|
|
9680
10317
|
this.handleClick(e);
|
|
9681
10318
|
this.duetSessionClick.emit(e);
|
|
9682
10319
|
};
|
|
10320
|
+
this.handleSearchClick = (ev) => {
|
|
10321
|
+
const e = createEvent(ev, this.processedSearch);
|
|
10322
|
+
this.handleClick(e);
|
|
10323
|
+
this.duetSearchClick.emit(e);
|
|
10324
|
+
};
|
|
9683
10325
|
this.handleUserClick = (ev) => {
|
|
9684
10326
|
const e = createEvent(ev, this.processedUser);
|
|
9685
10327
|
this.handleClick(e);
|
|
@@ -9702,40 +10344,55 @@ class DuetHeader {
|
|
|
9702
10344
|
this.duetLogoClick.emit(e);
|
|
9703
10345
|
};
|
|
9704
10346
|
this.handleArrowKeys = ev => {
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
button.focus();
|
|
9716
|
-
}
|
|
10347
|
+
let button;
|
|
10348
|
+
if (isArrowLeftKey(ev) || isArrowUpKey(ev)) {
|
|
10349
|
+
button = ev.target.previousElementSibling;
|
|
10350
|
+
}
|
|
10351
|
+
else if (isArrowRightKey(ev) || isArrowDownKey(ev)) {
|
|
10352
|
+
button = ev.target.nextElementSibling;
|
|
10353
|
+
}
|
|
10354
|
+
if (button) {
|
|
10355
|
+
ev.preventDefault();
|
|
10356
|
+
button.focus();
|
|
9717
10357
|
}
|
|
9718
10358
|
};
|
|
9719
|
-
this.toggleMenu = (ev, type) => {
|
|
10359
|
+
this.toggleMenu = (ev, type, id, active) => {
|
|
9720
10360
|
let el;
|
|
9721
10361
|
ev.preventDefault();
|
|
9722
10362
|
ev.stopPropagation();
|
|
10363
|
+
if (active === true && !this.openMenu) {
|
|
10364
|
+
const closedActives = this.closedActives ? [...this.closedActives] : [];
|
|
10365
|
+
const index = closedActives.findIndex(i => i === id);
|
|
10366
|
+
if (index > -1) {
|
|
10367
|
+
closedActives.splice(index, 1);
|
|
10368
|
+
this.closedActives = [...closedActives];
|
|
10369
|
+
}
|
|
10370
|
+
else {
|
|
10371
|
+
this.closedActives = [...closedActives, id];
|
|
10372
|
+
}
|
|
10373
|
+
}
|
|
10374
|
+
else {
|
|
10375
|
+
this.openMenu = this.openMenu === id ? null : id;
|
|
10376
|
+
}
|
|
9723
10377
|
// For language menu
|
|
9724
10378
|
if (type === "language") {
|
|
9725
10379
|
this.isContactOpen = false;
|
|
9726
10380
|
this.isLanguageOpen = !this.isLanguageOpen;
|
|
10381
|
+
this.isSegmentOpen = false;
|
|
9727
10382
|
el = this.languageItemsEl;
|
|
9728
10383
|
}
|
|
9729
10384
|
// For contact menu
|
|
9730
10385
|
else if (type === "contact") {
|
|
9731
10386
|
this.isLanguageOpen = false;
|
|
9732
10387
|
this.isContactOpen = !this.isContactOpen;
|
|
10388
|
+
this.isSegmentOpen = false;
|
|
9733
10389
|
el = this.contactItemsEl;
|
|
9734
10390
|
}
|
|
9735
10391
|
// For mobile menu
|
|
9736
10392
|
else if (type === "mobile") {
|
|
9737
10393
|
this.isContactOpen = false;
|
|
9738
10394
|
this.isLanguageOpen = false;
|
|
10395
|
+
this.isSegmentOpen = false;
|
|
9739
10396
|
el = this.navigationEl;
|
|
9740
10397
|
this.isSlideOutOpen = !this.isSlideOutOpen;
|
|
9741
10398
|
if (this.isSlideOutOpen) {
|
|
@@ -9745,7 +10402,19 @@ class DuetHeader {
|
|
|
9745
10402
|
enableBodyScroll(this.navigationEl);
|
|
9746
10403
|
}
|
|
9747
10404
|
}
|
|
9748
|
-
if (
|
|
10405
|
+
else if (type === "sub") {
|
|
10406
|
+
this.isContactOpen = false;
|
|
10407
|
+
this.isLanguageOpen = false;
|
|
10408
|
+
this.isSegmentOpen = false;
|
|
10409
|
+
el = this.subMenuItemRefs[id];
|
|
10410
|
+
}
|
|
10411
|
+
else if (type === "segment") {
|
|
10412
|
+
this.isContactOpen = false;
|
|
10413
|
+
this.isLanguageOpen = false;
|
|
10414
|
+
this.isSegmentOpen = !this.isSegmentOpen;
|
|
10415
|
+
el = this.segmentItemsEl;
|
|
10416
|
+
}
|
|
10417
|
+
if (this.isSlideOutOpen || this.isLanguageOpen || this.isContactOpen || this.isSegmentOpen || this.openMenu) {
|
|
9749
10418
|
const drawer = this.element.querySelector("duet-notification-drawer");
|
|
9750
10419
|
if (drawer) {
|
|
9751
10420
|
drawer.close(false);
|
|
@@ -9764,10 +10433,21 @@ class DuetHeader {
|
|
|
9764
10433
|
inheritGlobalTheme(this);
|
|
9765
10434
|
this.refresh();
|
|
9766
10435
|
}
|
|
10436
|
+
connectedCallback() {
|
|
10437
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
10438
|
+
const bound = this.refresh.bind(this);
|
|
10439
|
+
this.mql[i].addEventListener("change", bound);
|
|
10440
|
+
this.boundMqlFunctions[i] = bound;
|
|
10441
|
+
}
|
|
10442
|
+
}
|
|
9767
10443
|
disconnectedCallback() {
|
|
9768
10444
|
if (this.navigationEl) {
|
|
9769
10445
|
enableBodyScroll(this.navigationEl);
|
|
9770
10446
|
}
|
|
10447
|
+
for (let i = 0; i < this.mql.length; i++) {
|
|
10448
|
+
this.mql[i].removeEventListener("change", this.boundMqlFunctions[i]);
|
|
10449
|
+
}
|
|
10450
|
+
this.boundMqlFunctions = [];
|
|
9771
10451
|
}
|
|
9772
10452
|
/**
|
|
9773
10453
|
* Component event handling.
|
|
@@ -9780,7 +10460,7 @@ class DuetHeader {
|
|
|
9780
10460
|
}
|
|
9781
10461
|
}
|
|
9782
10462
|
handleKeyDown(ev) {
|
|
9783
|
-
if (this.isContactOpen || this.isLanguageOpen) {
|
|
10463
|
+
if (this.isContactOpen || this.isLanguageOpen || this.isSegmentOpen) {
|
|
9784
10464
|
const activeElement = this.element.shadowRoot.activeElement;
|
|
9785
10465
|
// When Space is pressed
|
|
9786
10466
|
if (isSpaceKey(ev) && activeElement) {
|
|
@@ -9792,6 +10472,12 @@ class DuetHeader {
|
|
|
9792
10472
|
else if (this.isLanguageOpen) {
|
|
9793
10473
|
this.closeMenus(true);
|
|
9794
10474
|
}
|
|
10475
|
+
else if (this.isSegmentOpen) {
|
|
10476
|
+
this.closeMenus();
|
|
10477
|
+
}
|
|
10478
|
+
else if (this.openMenu) {
|
|
10479
|
+
this.closeMenus();
|
|
10480
|
+
}
|
|
9795
10481
|
activeElement.click();
|
|
9796
10482
|
}
|
|
9797
10483
|
}
|
|
@@ -9821,10 +10507,15 @@ class DuetHeader {
|
|
|
9821
10507
|
* Local methods.
|
|
9822
10508
|
*/
|
|
9823
10509
|
async refresh() {
|
|
10510
|
+
if (this.renderDesktopNav !== this.mql[0].matches) {
|
|
10511
|
+
this.renderDesktopNav = this.mql[0].matches;
|
|
10512
|
+
this.openMenu = null;
|
|
10513
|
+
}
|
|
9824
10514
|
this.processedItems = parsePossibleJSON(this.items);
|
|
9825
10515
|
this.processedLanguageItems = parsePossibleJSON(this.languageItems);
|
|
9826
10516
|
this.processedContactItems = parsePossibleJSON(this.contactItems);
|
|
9827
10517
|
this.processedSession = parsePossibleJSON(this.session);
|
|
10518
|
+
this.processedSearch = parsePossibleJSON(this.search);
|
|
9828
10519
|
this.processedUser = parsePossibleJSON(this.user);
|
|
9829
10520
|
this.processedBack = parsePossibleJSON(this.back);
|
|
9830
10521
|
}
|
|
@@ -9841,7 +10532,7 @@ class DuetHeader {
|
|
|
9841
10532
|
* Closes all dropdown menus in header when called.
|
|
9842
10533
|
*/
|
|
9843
10534
|
async closeMenus(moveFocusToButton = false) {
|
|
9844
|
-
if (this.isContactOpen || this.isLanguageOpen) {
|
|
10535
|
+
if (this.isContactOpen || this.isLanguageOpen || this.isSegmentOpen || this.openMenu) {
|
|
9845
10536
|
if (this.isContactOpen && moveFocusToButton) {
|
|
9846
10537
|
this.contactItemsButtonEl.focus({
|
|
9847
10538
|
preventScroll: true,
|
|
@@ -9852,8 +10543,20 @@ class DuetHeader {
|
|
|
9852
10543
|
preventScroll: true,
|
|
9853
10544
|
});
|
|
9854
10545
|
}
|
|
10546
|
+
if (this.isSegmentOpen && moveFocusToButton) {
|
|
10547
|
+
this.segmentItemsButtonEl.focus({
|
|
10548
|
+
preventScroll: true,
|
|
10549
|
+
});
|
|
10550
|
+
}
|
|
10551
|
+
if (this.openMenu && moveFocusToButton) {
|
|
10552
|
+
this.subMenuButtonRefs[this.openMenu].focus({
|
|
10553
|
+
preventScroll: true,
|
|
10554
|
+
});
|
|
10555
|
+
}
|
|
9855
10556
|
this.isContactOpen = false;
|
|
9856
10557
|
this.isLanguageOpen = false;
|
|
10558
|
+
this.isSegmentOpen = false;
|
|
10559
|
+
this.openMenu = null;
|
|
9857
10560
|
}
|
|
9858
10561
|
}
|
|
9859
10562
|
/**
|
|
@@ -9869,45 +10572,93 @@ class DuetHeader {
|
|
|
9869
10572
|
*/
|
|
9870
10573
|
render() {
|
|
9871
10574
|
const { skipLabel, changeLanguage, activeLanguage } = this.accessibleI18nLabels;
|
|
9872
|
-
|
|
10575
|
+
const skipToLabel = this.skipToId ? (hAsync("a", { href: this.skipToId, class: "duet-header-skip", onClick: this.handleSkipClick }, skipLabel)) : null;
|
|
10576
|
+
const logo = (hAsync("duet-logo", { href: this.logoHref, size: "medium", ref: el => (this.logoEl = el), language: this.language, theme: this.theme, onClick: this.handleLogoClick }));
|
|
10577
|
+
const largeLogo = (hAsync("duet-logo", { href: this.logoHref, size: "large", ref: el => (this.logoEl = el), language: this.language, theme: this.theme, onClick: this.handleLogoClick }));
|
|
10578
|
+
const contactDropdown = this.contact && this.processedContactItems ? (hAsync(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 => (hAsync("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, Build.isBrowser ))))) : null;
|
|
10579
|
+
const languageDropdown = this.language && this.processedLanguageItems ? (hAsync(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 => (hAsync("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;
|
|
10580
|
+
const processedUserWithLink = this.processedUser && this.processedUser.href ? (hAsync("a", { href: this.processedUser.href || "#", id: this.processedUser.id, class: "duet-header-user duet-header-button", onClick: this.handleUserClick }, hAsync(DuetHeaderIcon, { icon: navigationUser.svg }), hAsync("span", { class: "duet-header-user-label" }, this.processedUser.label))) : null;
|
|
10581
|
+
const processedUserWithoutLink = this.processedUser && !this.processedUser.href ? (hAsync("span", { id: this.processedUser.id, class: "duet-header-user duet-header-button duet-header-no-action" }, hAsync(DuetHeaderIcon, { icon: navigationUser.svg }), hAsync("span", { class: "duet-header-user-label" }, this.processedUser.label))) : null;
|
|
10582
|
+
const processedSessionIconSize = this.renderDesktopNav ? "x-small" : "small";
|
|
10583
|
+
const processedSession = this.processedSession ? (hAsync("a", { href: this.processedSession.href || "#", id: this.processedSession.id, class: "duet-header-logout duet-header-button", onClick: this.handleSessionClick }, hAsync(DuetHeaderIcon, { icon: this.processedSession.type === "logout" ? navigationLogout.svg : navigationLogin.svg, iconSize: processedSessionIconSize }), hAsync("span", { class: "duet-header-button-label" }, this.processedSession.label))) : null;
|
|
10584
|
+
const processedSearch = this.processedSearch ? (hAsync("a", { href: this.processedSearch.href || "#", id: this.processedSearch.id, class: "duet-header-search duet-header-button", onClick: this.handleSearchClick }, hAsync(DuetHeaderIcon, { icon: formSearch.svg }), hAsync("span", { class: "duet-header-button-label" }, this.processedSearch.label))) : null;
|
|
10585
|
+
// Back variation
|
|
10586
|
+
if (this.processedBack) {
|
|
10587
|
+
return (hAsync(Host, { class: "duet-header-back-variation" }, hAsync("div", { class: "duet-header-reserved-space" }, hAsync("header", { class: {
|
|
10588
|
+
"duet-header": true,
|
|
10589
|
+
"duet-theme-turva": this.theme === "turva",
|
|
10590
|
+
"duet-header-back": true,
|
|
10591
|
+
"duet-header-inactive": true,
|
|
10592
|
+
} }, hAsync("div", { class: "duet-header-top" }, skipToLabel, hAsync("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, hAsync("slot", { name: "logo-utility" }))))));
|
|
10593
|
+
}
|
|
10594
|
+
// multi level desktop variation
|
|
10595
|
+
const itemsHaveSubItems = this.processedItems && this.processedItems.some(item => item.items && item.items.length > 0);
|
|
10596
|
+
if (this.renderDesktopNav && itemsHaveSubItems) {
|
|
10597
|
+
const activeSegment = this.processedItems.find(item => item.active);
|
|
10598
|
+
const isThirdLevelActive = this.processedItems &&
|
|
10599
|
+
this.processedItems.some(item => item.items &&
|
|
10600
|
+
item.items.some(secondLevelItem => secondLevelItem.items && secondLevelItem.items.some(thirdLevelItem => thirdLevelItem.active === true)));
|
|
10601
|
+
const segmentId = "duet-header-segment";
|
|
10602
|
+
return (hAsync(Host, { class: "duet-header-multi-level-desktop-variation" }, hAsync("div", { class: {
|
|
10603
|
+
"duet-header-multi-level-desktop": true,
|
|
10604
|
+
"duet-header-multi-level-desktop-third-level-is-open": isThirdLevelActive,
|
|
10605
|
+
} }, hAsync("header", { class: {
|
|
10606
|
+
"duet-header": true,
|
|
10607
|
+
"duet-theme-turva": this.theme === "turva",
|
|
10608
|
+
"duet-header-inactive": !this.processedItems,
|
|
10609
|
+
} }, hAsync("div", { class: "duet-header-top" }, skipToLabel, hAsync("div", { class: "logo-and-segment" }, largeLogo, this.processedItems && (hAsync(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 => (hAsync("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 && (hAsync("div", { class: "duet-header-icon" }, hAsync("duet-icon", { margin: "none", size: "x-small", name: item.icon, color: "currentColor" }))), hAsync("span", null, item.label), item.badge && hAsync("div", { class: "duet-header-badge" }))))))), hAsync("nav", { class: "duet-header-multi-level-desktop-nav" }, activeSegment.items &&
|
|
10610
|
+
activeSegment.items
|
|
10611
|
+
.filter(secondLevelItem => secondLevelItem.items && secondLevelItem.items.length > 0)
|
|
10612
|
+
.map((secondLevelItem, secondLevelItemIndex) => {
|
|
10613
|
+
const id = secondLevelItem.id || `segment-item-${secondLevelItemIndex}`;
|
|
10614
|
+
return (hAsync(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 &&
|
|
10615
|
+
secondLevelItem.items.map(thirdLevelItem => (hAsync("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 && (hAsync("div", { class: "duet-header-icon" }, hAsync("duet-icon", { margin: "none", size: "medium", name: thirdLevelItem.icon, color: "currentColor" }))), hAsync("span", null, thirdLevelItem.label), thirdLevelItem.badge && hAsync("div", { class: "duet-header-badge" }))))));
|
|
10616
|
+
})), hAsync("div", { class: "duet-header-multi-level-desktop-utils" }, processedSearch, languageDropdown, processedSession), hAsync("slot", { name: "utility" }))))));
|
|
10617
|
+
}
|
|
10618
|
+
// Default variation
|
|
10619
|
+
const isThirdLevelActive = this.processedItems &&
|
|
10620
|
+
this.processedItems.some(item => item.items &&
|
|
10621
|
+
item.items.some(secondLevelItem => secondLevelItem.items && secondLevelItem.items.some(thirdLevelItem => thirdLevelItem.active === true)));
|
|
10622
|
+
return (hAsync(Host, { class: {
|
|
10623
|
+
"duet-header-default-variation": true,
|
|
10624
|
+
} }, hAsync("div", { class: {
|
|
9873
10625
|
"duet-header-reserved-space": true,
|
|
9874
10626
|
"duet-with-links": !!this.processedItems,
|
|
9875
|
-
"duet-
|
|
10627
|
+
"duet-header-third-level-active": isThirdLevelActive,
|
|
9876
10628
|
} }, hAsync("header", { class: {
|
|
9877
10629
|
"duet-header": true,
|
|
9878
10630
|
"duet-theme-turva": this.theme === "turva",
|
|
9879
|
-
"duet-header-back": !!this.processedBack,
|
|
9880
10631
|
"duet-header-inactive": !this.processedItems,
|
|
9881
|
-
} }, hAsync("div", { class: "duet-header-top" },
|
|
9882
|
-
|
|
9883
|
-
|
|
10632
|
+
} }, hAsync("div", { class: "duet-header-top" }, skipToLabel, logo, hAsync("slot", { name: "logo-utility" }, this.region && hAsync("div", { class: "duet-header-region" }, this.region)), (this.processedItems ||
|
|
10633
|
+
languageDropdown ||
|
|
10634
|
+
contactDropdown ||
|
|
9884
10635
|
this.processedSession ||
|
|
9885
|
-
this.processedUser) && (hAsync("button", { class: { "duet-header-toggle": true, active: this.isSlideOutOpen }, onClick: event => this.toggleMenu(event, "mobile"), type: "button" }, hAsync("duet-visually-hidden", null, this.accessibleLabel), hAsync(
|
|
10636
|
+
this.processedUser) && (hAsync("button", { class: { "duet-header-toggle": true, active: this.isSlideOutOpen }, onClick: event => this.toggleMenu(event, "mobile"), type: "button" }, hAsync("duet-visually-hidden", null, this.accessibleLabel), hAsync(DuetHeaderHamburger, null)))), hAsync("div", { ref: el => (this.navigationEl = el), class: {
|
|
9886
10637
|
"duet-header-bottom": true,
|
|
9887
10638
|
active: this.isSlideOutOpen,
|
|
9888
10639
|
inactive: !this.processedItems,
|
|
9889
10640
|
} }, hAsync("nav", { class: "duet-header-items", role: "navigation" }, this.processedItems &&
|
|
9890
|
-
this.processedItems.map(
|
|
9891
|
-
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
10641
|
+
this.processedItems.map((item, itemIndex) => (hAsync("div", { class: "duet-header-item-container" }, hAsync("a", { class: {
|
|
10642
|
+
"duet-header-first-level": true,
|
|
10643
|
+
"duet-header-item": true,
|
|
10644
|
+
active: (!itemsHaveSubItems && this.currentHref === item.href) || item.active === true,
|
|
10645
|
+
}, href: item.href || "#", id: item.id || `header-item-${itemIndex}`, onClick: event => this.handleItemClick(event, item) }, item.label, item.badge && hAsync("div", { class: "duet-header-badge" })), item.items &&
|
|
10646
|
+
item.items
|
|
10647
|
+
.filter(secondLevelitem => secondLevelitem.items && secondLevelitem.items.length > 0)
|
|
10648
|
+
.map((secondLevelItem, secondLevelItemIndex) => {
|
|
10649
|
+
const id = secondLevelItem.id || `header-item-${itemIndex}-${secondLevelItemIndex}`;
|
|
10650
|
+
return (hAsync(DuetHeaderDropdown, { id: id, className: "duet-header-second-level", label: secondLevelItem.label, icon: `${secondLevelItem.icon}.svg`, active: (!this.openMenu &&
|
|
10651
|
+
secondLevelItem.active === true &&
|
|
10652
|
+
!(this.closedActives && !!this.closedActives.find(i => i === id))) ||
|
|
10653
|
+
this.openMenu === id, isOpen: (!this.openMenu &&
|
|
10654
|
+
secondLevelItem.active === true &&
|
|
10655
|
+
!(this.closedActives && !!this.closedActives.find(i => i === id))) ||
|
|
10656
|
+
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) }, hAsync("div", { class: "duet-header-third-level" }, secondLevelItem.items &&
|
|
10657
|
+
secondLevelItem.items.map(thirdLevelItem => (hAsync("a", { class: {
|
|
10658
|
+
"duet-header-item": true,
|
|
10659
|
+
active: thirdLevelItem.active === true,
|
|
10660
|
+
}, 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 && (hAsync("div", { class: "duet-header-icon" }, hAsync("duet-icon", { margin: "none", size: "medium", name: thirdLevelItem.icon, color: "currentColor" }))), hAsync("span", null, thirdLevelItem.label), thirdLevelItem.badge && hAsync("div", { class: "duet-header-badge" })))))));
|
|
10661
|
+
}))))), hAsync("div", { class: "duet-header-bottom-utils" }, hAsync("slot", { name: "utility" })), hAsync("div", { class: "duet-header-utils" }, !itemsHaveSubItems && contactDropdown, languageDropdown, !itemsHaveSubItems && (hAsync(Fragment, null, processedUserWithLink, processedUserWithoutLink)), processedSearch, processedSession))))));
|
|
9911
10662
|
}
|
|
9912
10663
|
get element() { return getElement(this); }
|
|
9913
10664
|
static get watchers() { return {
|
|
@@ -9938,6 +10689,7 @@ class DuetHeader {
|
|
|
9938
10689
|
"items": [8],
|
|
9939
10690
|
"region": [1],
|
|
9940
10691
|
"session": [8],
|
|
10692
|
+
"search": [8],
|
|
9941
10693
|
"back": [8],
|
|
9942
10694
|
"contact": [1],
|
|
9943
10695
|
"contactItems": [8, "contact-items"],
|
|
@@ -9945,12 +10697,17 @@ class DuetHeader {
|
|
|
9945
10697
|
"isContactOpen": [32],
|
|
9946
10698
|
"isLanguageOpen": [32],
|
|
9947
10699
|
"isSlideOutOpen": [32],
|
|
10700
|
+
"isSegmentOpen": [32],
|
|
10701
|
+
"openMenu": [32],
|
|
10702
|
+
"closedActives": [32],
|
|
9948
10703
|
"processedItems": [32],
|
|
9949
10704
|
"processedLanguageItems": [32],
|
|
9950
10705
|
"processedContactItems": [32],
|
|
9951
10706
|
"processedSession": [32],
|
|
10707
|
+
"processedSearch": [32],
|
|
9952
10708
|
"processedUser": [32],
|
|
9953
10709
|
"processedBack": [32],
|
|
10710
|
+
"renderDesktopNav": [32],
|
|
9954
10711
|
"closeMenus": [64],
|
|
9955
10712
|
"setFocus": [64]
|
|
9956
10713
|
},
|
|
@@ -9960,7 +10717,7 @@ class DuetHeader {
|
|
|
9960
10717
|
}; }
|
|
9961
10718
|
}
|
|
9962
10719
|
|
|
9963
|
-
const duetHeadingCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-heading,*.sc-duet-heading::after,*.sc-duet-heading::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-heading-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-heading*/.duet-heading.sc-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*/.duet-heading.sc-duet-heading{margin-bottom:20px !important}}/*!@.duet-heading.duet-theme-turva*/.duet-heading.duet-theme-turva.sc-duet-heading{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*/.duet-heading.duet-heading-border.sc-duet-heading{padding-bottom:20px;border-bottom:1px solid #e1e3e6}/*!@.duet-heading.duet-heading-hyphenate*/.duet-heading.duet-heading-hyphenate.sc-duet-heading{-webkit-hyphens:auto;hyphens:auto}/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:9.4vw}/*!@.duet-heading.h0.duet-p-0*/.duet-heading.h0.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h0.duet-m-0*/.duet-heading.h0.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 31.914893617rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:3rem}}@media (min-width: 47.8723404255rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:4.5rem}}@media (max-width: 22.5em){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:2.25rem}}/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:7vw}/*!@.duet-heading.h1.duet-p-0*/.duet-heading.h1.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h1.duet-m-0*/.duet-heading.h1.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 32.1428571429rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:2.25rem}}@media (min-width: 42.8571428571rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:3rem}}@media (max-width: 22.5em){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:5.8vw}/*!@.duet-heading.h2.duet-p-0*/.duet-heading.h2.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h2.duet-m-0*/.duet-heading.h2.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 25.8620689655rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.5rem}}@media (min-width: 38.7931034483rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:2.25rem}}@media (max-width: 22.5em){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.375rem}}/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{margin-bottom:12px !important;font-size:4.2vw}/*!@.duet-heading.h3.duet-p-0*/.duet-heading.h3.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h3.duet-m-0*/.duet-heading.h3.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 29.7619047619rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.25rem}}@media (min-width: 35.7142857143rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h3.duet-theme-turva*/.duet-heading.h3.duet-theme-turva.sc-duet-heading{font-style:normal}/*!@.duet-heading.h3.duet-heading-border*/.duet-heading.h3.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}/*!@.duet-heading.h4.duet-p-0*/.duet-heading.h4.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h4.duet-m-0*/.duet-heading.h4.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.1rem}}@media (min-width: 31.25rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.25rem}}/*!@.duet-heading.h4.duet-theme-turva*/.duet-heading.h4.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h4.duet-heading-border*/.duet-heading.h4.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}/*!@.duet-heading.h5.duet-p-0*/.duet-heading.h5.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h5.duet-m-0*/.duet-heading.h5.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1rem}}@media (min-width: 28.4090909091rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1363636364rem}}/*!@.duet-heading.h5.duet-theme-turva*/.duet-heading.h5.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h5.duet-heading-border*/.duet-heading.h5.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.h6*/.duet-heading.h6.sc-duet-heading{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}/*!@.duet-heading.h6.duet-p-0*/.duet-heading.h6.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h6.duet-m-0*/.duet-heading.h6.duet-m-0.sc-duet-heading{margin:0 !important}/*!@.duet-heading.h6.duet-theme-turva*/.duet-heading.h6.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h6.duet-heading-border*/.duet-heading.h6.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.duet-semibold, .duet-heading.duet-theme-turva.duet-semibold*/.duet-heading.duet-semibold.sc-duet-heading,.duet-heading.duet-theme-turva.duet-semibold.sc-duet-heading{font-style:normal !important;font-weight:600 !important}";
|
|
10720
|
+
const duetHeadingCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-heading,*.sc-duet-heading::after,*.sc-duet-heading::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-heading-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-heading*/.duet-heading.sc-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*/.duet-heading.sc-duet-heading{margin-bottom:20px !important}}/*!@.duet-heading.duet-theme-turva*/.duet-heading.duet-theme-turva.sc-duet-heading{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*/.duet-heading.duet-heading-border.sc-duet-heading{padding-bottom:20px;border-bottom:1px solid #e1e3e6}/*!@.duet-heading.duet-heading-border.duet-heading-border-solid*/.duet-heading.duet-heading-border.duet-heading-border-solid.sc-duet-heading{border-bottom-color:#657787}/*!@.duet-heading.duet-heading-hyphenate*/.duet-heading.duet-heading-hyphenate.sc-duet-heading{-webkit-hyphens:auto;hyphens:auto}/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:9.4vw}/*!@.duet-heading.h0.duet-p-0*/.duet-heading.h0.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h0.duet-m-0*/.duet-heading.h0.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 31.914893617rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:3rem}}@media (min-width: 47.8723404255rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:4.5rem}}@media (max-width: 22.5em){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:2.25rem}}/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:7vw}/*!@.duet-heading.h1.duet-p-0*/.duet-heading.h1.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h1.duet-m-0*/.duet-heading.h1.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 32.1428571429rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:2.25rem}}@media (min-width: 42.8571428571rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:3rem}}@media (max-width: 22.5em){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:5.8vw}/*!@.duet-heading.h2.duet-p-0*/.duet-heading.h2.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h2.duet-m-0*/.duet-heading.h2.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 25.8620689655rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.5rem}}@media (min-width: 38.7931034483rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:2.25rem}}@media (max-width: 22.5em){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.375rem}}/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{margin-bottom:12px !important;font-size:4.2vw}/*!@.duet-heading.h3.duet-p-0*/.duet-heading.h3.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h3.duet-m-0*/.duet-heading.h3.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 29.7619047619rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.25rem}}@media (min-width: 35.7142857143rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h3.duet-theme-turva*/.duet-heading.h3.duet-theme-turva.sc-duet-heading{font-style:normal}/*!@.duet-heading.h3.duet-heading-border*/.duet-heading.h3.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}/*!@.duet-heading.h4.duet-p-0*/.duet-heading.h4.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h4.duet-m-0*/.duet-heading.h4.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.1rem}}@media (min-width: 31.25rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.25rem}}/*!@.duet-heading.h4.duet-theme-turva*/.duet-heading.h4.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h4.duet-heading-border*/.duet-heading.h4.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}/*!@.duet-heading.h5.duet-p-0*/.duet-heading.h5.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h5.duet-m-0*/.duet-heading.h5.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1rem}}@media (min-width: 28.4090909091rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1363636364rem}}/*!@.duet-heading.h5.duet-theme-turva*/.duet-heading.h5.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h5.duet-heading-border*/.duet-heading.h5.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.h6*/.duet-heading.h6.sc-duet-heading{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}/*!@.duet-heading.h6.duet-p-0*/.duet-heading.h6.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h6.duet-m-0*/.duet-heading.h6.duet-m-0.sc-duet-heading{margin:0 !important}/*!@.duet-heading.h6.duet-theme-turva*/.duet-heading.h6.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h6.duet-heading-border*/.duet-heading.h6.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.duet-semibold, .duet-heading.duet-theme-turva.duet-semibold*/.duet-heading.duet-semibold.sc-duet-heading,.duet-heading.duet-theme-turva.duet-semibold.sc-duet-heading{font-style:normal !important;font-weight:600 !important}";
|
|
9964
10721
|
|
|
9965
10722
|
class DuetHeading {
|
|
9966
10723
|
constructor(hostRef) {
|
|
@@ -9974,7 +10731,7 @@ class DuetHeading {
|
|
|
9974
10731
|
*/
|
|
9975
10732
|
this.margin = "auto";
|
|
9976
10733
|
/**
|
|
9977
|
-
* Enable or disable the border underneath the heading
|
|
10734
|
+
* Enable or disable the border underneath the heading, solid will darken the border
|
|
9978
10735
|
*/
|
|
9979
10736
|
this.border = false;
|
|
9980
10737
|
/**
|
|
@@ -10011,7 +10768,8 @@ class DuetHeading {
|
|
|
10011
10768
|
const color = getColorByName(this.color);
|
|
10012
10769
|
return (hAsync(TagName, { class: {
|
|
10013
10770
|
"duet-heading": true,
|
|
10014
|
-
"duet-heading-border": this.border,
|
|
10771
|
+
"duet-heading-border": this.border !== false,
|
|
10772
|
+
"duet-heading-border-solid": this.border === "solid",
|
|
10015
10773
|
"duet-semibold": this.weight === "semibold",
|
|
10016
10774
|
"duet-heading-hyphenate": this.hyphenate,
|
|
10017
10775
|
"duet-m-0": this.margin === "none",
|
|
@@ -10028,7 +10786,7 @@ class DuetHeading {
|
|
|
10028
10786
|
"level": [513],
|
|
10029
10787
|
"margin": [1],
|
|
10030
10788
|
"visualLevel": [1, "visual-level"],
|
|
10031
|
-
"border": [
|
|
10789
|
+
"border": [8],
|
|
10032
10790
|
"weight": [1],
|
|
10033
10791
|
"color": [1],
|
|
10034
10792
|
"theme": [1025],
|
|
@@ -10361,11 +11119,13 @@ class DuetIcon {
|
|
|
10361
11119
|
* Always the last one in the class.
|
|
10362
11120
|
*/
|
|
10363
11121
|
render() {
|
|
10364
|
-
const color = this.color === "currentColor"
|
|
11122
|
+
const color = this.color === "currentColor"
|
|
11123
|
+
? "currentColor"
|
|
11124
|
+
: getColorByName(this.color, this.theme) || getColorByName(this.outline, this.theme);
|
|
10365
11125
|
const styles = {
|
|
10366
11126
|
color,
|
|
10367
|
-
background: getColorByName(this.background),
|
|
10368
|
-
"border-color": getColorByName(this.outline),
|
|
11127
|
+
background: getColorByName(this.background, this.theme),
|
|
11128
|
+
"border-color": getColorByName(this.outline, this.theme),
|
|
10369
11129
|
};
|
|
10370
11130
|
return (hAsync(Host, { class: {
|
|
10371
11131
|
"duet-m-0": this.margin === "none",
|
|
@@ -10412,8 +11172,6 @@ class DuetIcon {
|
|
|
10412
11172
|
|
|
10413
11173
|
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>"};
|
|
10414
11174
|
|
|
10415
|
-
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>"};
|
|
10416
|
-
|
|
10417
11175
|
/**
|
|
10418
11176
|
* This function restores cursor position after changing input
|
|
10419
11177
|
*
|
|
@@ -10463,7 +11221,7 @@ function cleanValue(input, regex) {
|
|
|
10463
11221
|
return newValue;
|
|
10464
11222
|
}
|
|
10465
11223
|
|
|
10466
|
-
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%}";
|
|
11224
|
+
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%}";
|
|
10467
11225
|
|
|
10468
11226
|
const icons = {
|
|
10469
11227
|
search: formSearch,
|
|
@@ -10603,7 +11361,7 @@ class DuetInput {
|
|
|
10603
11361
|
// (in webkit based browsers settings value trigger cursor position and will set it to EndOfText)
|
|
10604
11362
|
restoreCursor();
|
|
10605
11363
|
}
|
|
10606
|
-
this.isCaptionVisible = !!
|
|
11364
|
+
this.isCaptionVisible = !!this.caption;
|
|
10607
11365
|
const emitEvent = () => this.duetChange.emit({
|
|
10608
11366
|
value: this.value,
|
|
10609
11367
|
component: "duet-input",
|
|
@@ -10622,7 +11380,7 @@ class DuetInput {
|
|
|
10622
11380
|
componentWillLoad() {
|
|
10623
11381
|
inheritGlobalTheme(this);
|
|
10624
11382
|
this.disallowedPatternChange();
|
|
10625
|
-
this.isCaptionVisible = !!
|
|
11383
|
+
this.isCaptionVisible = !!this.caption;
|
|
10626
11384
|
}
|
|
10627
11385
|
/**
|
|
10628
11386
|
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
@@ -10657,12 +11415,12 @@ class DuetInput {
|
|
|
10657
11415
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
10658
11416
|
"has-icon": !!this.icon || (this.type !== "text" && this.type !== "tel" && this.type !== "password"),
|
|
10659
11417
|
"has-error": !!this.error,
|
|
10660
|
-
} }, hAsync("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 && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId,
|
|
11418
|
+
} }, hAsync("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 && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), hAsync("div", { class: "duet-input-relative" }, this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-input-placeholder", margin: "none", size: "small" }, this.placeholder)), hAsync("input", Object.assign({ ref: input => (this.nativeInput = input), onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, type: this.type, class: {
|
|
10661
11419
|
"duet-input": true,
|
|
10662
11420
|
disabled: this.disabled,
|
|
10663
11421
|
"is-number": this.component === "number",
|
|
10664
11422
|
"is-date": this.component === "date",
|
|
10665
|
-
}, 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" && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), hAsync("slot", null)), hAsync("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span",
|
|
11423
|
+
}, 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" && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), hAsync("slot", null)), hAsync("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", { class: "duet-input-error" }, this.error)))));
|
|
10666
11424
|
}
|
|
10667
11425
|
get element() { return getElement(this); }
|
|
10668
11426
|
static get watchers() { return {
|
|
@@ -10869,6 +11627,9 @@ class DuetLayout {
|
|
|
10869
11627
|
|
|
10870
11628
|
const duetLinkCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-link,*.sc-duet-link::after,*.sc-duet-link::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-link-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline}/*!@.duet-link*/.duet-link.sc-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*/.duet-link.sc-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*/.duet-theme-turva.sc-duet-link .duet-link.sc-duet-link:focus,.duet-link.sc-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*/.duet-link.duet-theme-turva.sc-duet-link{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*/.duet-link.sc-duet-link:hover{color:#004d80;text-decoration:none}/*!@.duet-link:hover.duet-theme-turva*/.duet-link.sc-duet-link:hover.duet-theme-turva{color:#940925}/*!@.duet-link:active*/.duet-link.sc-duet-link:active{opacity:0.75;transition:none}/*!@.duet-link-external*/.duet-link-external.sc-duet-link{margin-left:4px}";
|
|
10871
11629
|
|
|
11630
|
+
/**
|
|
11631
|
+
* @part duet-link - piercing selector for styling the link
|
|
11632
|
+
*/
|
|
10872
11633
|
class DuetLink {
|
|
10873
11634
|
constructor(hostRef) {
|
|
10874
11635
|
registerInstance(this, hostRef);
|
|
@@ -10924,7 +11685,7 @@ class DuetLink {
|
|
|
10924
11685
|
"duet-link": true,
|
|
10925
11686
|
"duet-link-is-external": this.external,
|
|
10926
11687
|
"duet-theme-turva": this.theme === "turva",
|
|
10927
|
-
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el) }, hAsync("slot", null), Build.isBrowser )));
|
|
11688
|
+
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el), part: "duet-link" }, hAsync("slot", null), Build.isBrowser )));
|
|
10928
11689
|
}
|
|
10929
11690
|
static get delegatesFocus() { return true; }
|
|
10930
11691
|
static get style() { return duetLinkCss; }
|
|
@@ -11066,7 +11827,7 @@ class DuetList {
|
|
|
11066
11827
|
}; }
|
|
11067
11828
|
}
|
|
11068
11829
|
|
|
11069
|
-
const duetListItemCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-list-item,*.sc-duet-list-item::after,*.sc-duet-list-item::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-list-item-h{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*/.sc-duet-list-item-h{flex-wrap:wrap}}/*!@:host dt,\n:host dd*/.sc-duet-list-item-h dt.sc-duet-list-item,.sc-duet-list-item-h dd.sc-duet-list-item{-webkit-hyphens:auto;hyphens:auto;text-align:left;word-break:break-all;word-break:break-word
|
|
11830
|
+
const duetListItemCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-list-item,*.sc-duet-list-item::after,*.sc-duet-list-item::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-list-item-h{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*/.sc-duet-list-item-h{flex-wrap:wrap}}/*!@:host dt,\n:host dd*/.sc-duet-list-item-h dt.sc-duet-list-item,.sc-duet-list-item-h dd.sc-duet-list-item{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,\n:host dd*/.sc-duet-list-item-h dt.sc-duet-list-item,.sc-duet-list-item-h dd.sc-duet-list-item{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}}/*!@:host dt*/.sc-duet-list-item-h dt.sc-duet-list-item{padding:16px !important;font-weight:600}@media (max-width: 35.9375em){/*!@:host dt*/.sc-duet-list-item-h dt.sc-duet-list-item{padding-bottom:4px !important}}/*!@.duet-theme-turva :host dt*/.duet-theme-turva .sc-duet-list-item-h dt.sc-duet-list-item{font-weight:700}/*!@:host dd*/.sc-duet-list-item-h dd.sc-duet-list-item{padding:16px !important;margin-left:auto;text-align:left}@media (max-width: 35.9375em){/*!@:host dd*/.sc-duet-list-item-h dd.sc-duet-list-item{padding-top:0 !important}}/*!@:host(:not(.duet-list-striped)) dt*/.sc-duet-list-item-h:not(.duet-list-striped) dt.sc-duet-list-item{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){/*!@:host(:not(.duet-list-striped)) dt*/.sc-duet-list-item-h:not(.duet-list-striped) dt.sc-duet-list-item{padding-bottom:4px !important}}/*!@:host(:not(.duet-list-striped)) dd*/.sc-duet-list-item-h:not(.duet-list-striped) dd.sc-duet-list-item{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){/*!@:host(:not(.duet-list-striped)) dd*/.sc-duet-list-item-h:not(.duet-list-striped) dd.sc-duet-list-item{padding-top:0 !important}}/*!@:host(.duet-theme-turva)*/.duet-theme-turva.sc-duet-list-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}/*!@:host(.duet-list-striped:nth-child(odd)) dt,\n:host(.duet-list-striped:nth-child(odd)) dd*/.duet-list-striped.sc-duet-list-item-h:nth-child(odd) dt.sc-duet-list-item,.duet-list-striped.sc-duet-list-item-h:nth-child(odd) dd.sc-duet-list-item{background:#f5f8fa}/*!@:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dt,\n:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dd*/.duet-list-striped.duet-theme-turva.sc-duet-list-item-h:nth-child(odd) dt.sc-duet-list-item,.duet-list-striped.duet-theme-turva.sc-duet-list-item-h:nth-child(odd) dd.sc-duet-list-item{background:#f5f5f7}/*!@:host(.duet-list-width-30) dt*/.duet-list-width-30.sc-duet-list-item-h dt.sc-duet-list-item{flex-basis:33%}/*!@:host(.duet-list-width-30) dd*/.duet-list-width-30.sc-duet-list-item-h dd.sc-duet-list-item{flex-basis:67%}/*!@:host(.duet-list-width-50) dt*/.duet-list-width-50.sc-duet-list-item-h dt.sc-duet-list-item{flex-basis:47%}/*!@:host(.duet-list-width-50) dd*/.duet-list-width-50.sc-duet-list-item-h dd.sc-duet-list-item{flex-basis:53%}/*!@:host(.duet-list-width-70) dt*/.duet-list-width-70.sc-duet-list-item-h dt.sc-duet-list-item{flex-basis:65%}/*!@:host(.duet-list-width-70) dd*/.duet-list-width-70.sc-duet-list-item-h dd.sc-duet-list-item{flex-basis:35%}/*!@:host(.duet-p-0) dt,\n:host(.duet-p-0) dd*/.duet-p-0.sc-duet-list-item-h dt.sc-duet-list-item,.duet-p-0.sc-duet-list-item-h dd.sc-duet-list-item{padding-top:0 !important;padding-bottom:4px !important}@media (max-width: 35.9375em){/*!@:host(.duet-list-mobile-center) dt,\n:host(.duet-list-mobile-center) dd*/.duet-list-mobile-center.sc-duet-list-item-h dt.sc-duet-list-item,.duet-list-mobile-center.sc-duet-list-item-h dd.sc-duet-list-item{text-align:center}}@media (max-width: 61.9375em){/*!@:host(.duet-list-breakpoint-large)*/.duet-list-breakpoint-large.sc-duet-list-item-h{flex-wrap:wrap}/*!@:host(.duet-list-breakpoint-large) dt,\n:host(.duet-list-breakpoint-large) dd*/.duet-list-breakpoint-large.sc-duet-list-item-h dt.sc-duet-list-item,.duet-list-breakpoint-large.sc-duet-list-item-h dd.sc-duet-list-item{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}/*!@:host(.duet-list-breakpoint-large) dd*/.duet-list-breakpoint-large.sc-duet-list-item-h dd.sc-duet-list-item{padding-top:0 !important}}/*!@:host(.duet-list-breakpoint-large.duet-list-striped) dd*/.duet-list-breakpoint-large.duet-list-striped.sc-duet-list-item-h dd.sc-duet-list-item{padding-bottom:16px !important}@media (max-width: 61.9375em){/*!@:host(.duet-list-breakpoint-large.duet-list-mobile-center) dt,\n:host(.duet-list-breakpoint-large.duet-list-mobile-center) dd*/.duet-list-breakpoint-large.duet-list-mobile-center.sc-duet-list-item-h dt.sc-duet-list-item,.duet-list-breakpoint-large.duet-list-mobile-center.sc-duet-list-item-h dd.sc-duet-list-item{text-align:center !important}}";
|
|
11070
11831
|
|
|
11071
11832
|
/**
|
|
11072
11833
|
* @slot label - The list item component’s label content. Use this to put content into description list’s dt element.
|
|
@@ -11547,7 +12308,7 @@ class DuetNotification {
|
|
|
11547
12308
|
}; }
|
|
11548
12309
|
}
|
|
11549
12310
|
|
|
11550
|
-
const duetNotificationDrawerCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-notification-drawer,*.sc-duet-notification-drawer::after,*.sc-duet-notification-drawer::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-notification-drawer-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-drawer*/.duet-drawer.sc-duet-notification-drawer{position:relative}@media (min-width: 62em){/*!@.duet-drawer*/.duet-drawer.sc-duet-notification-drawer{display:inline-block}}/*!@.duet-drawer-toggle*/.duet-drawer-toggle.sc-duet-notification-drawer{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*/.duet-drawer-toggle.sc-duet-notification-drawer{z-index:200;width:auto;max-width:200px;padding:0 30px 0 12px;overflow:hidden;font-size:0.875rem;line-height:4rem;
|
|
12311
|
+
const duetNotificationDrawerCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-notification-drawer,*.sc-duet-notification-drawer::after,*.sc-duet-notification-drawer::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-notification-drawer-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-drawer*/.duet-drawer.sc-duet-notification-drawer{position:relative}@media (min-width: 62em){/*!@.duet-drawer*/.duet-drawer.sc-duet-notification-drawer{display:inline-block}}/*!@.duet-drawer-toggle*/.duet-drawer-toggle.sc-duet-notification-drawer{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*/.duet-drawer-toggle.sc-duet-notification-drawer{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*/.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-toggle.sc-duet-notification-drawer{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*/.duet-drawer-toggle.sc-duet-notification-drawer:active{opacity:0.75}/*!@.duet-drawer-toggle:focus*/.duet-drawer-toggle.sc-duet-notification-drawer:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-drawer-toggle:focus*/.user-is-tabbing.sc-duet-notification-drawer-h .duet-drawer-toggle.sc-duet-notification-drawer: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*/.user-is-tabbing.sc-duet-notification-drawer-h .duet-theme-turva.sc-duet-notification-drawer .duet-drawer-toggle.sc-duet-notification-drawer:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-drawer-toggle:hover*/.duet-drawer-toggle.sc-duet-notification-drawer:hover{color:#004d80}/*!@.duet-theme-turva .duet-drawer-toggle:hover*/.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-toggle.sc-duet-notification-drawer:hover{color:#444445}/*!@.duet-drawer-toggle::after*/.duet-drawer-toggle.sc-duet-notification-drawer::after{display:none !important}@media (min-width: 62em){/*!@.duet-drawer-toggle::after*/.duet-drawer-toggle.sc-duet-notification-drawer::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*/.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-toggle.sc-duet-notification-drawer::after{background:#c60c30}}/*!@.duet-drawer-toggle[aria-expanded=true], .duet-drawer-toggle[aria-expanded=true]:hover*/.duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer,.duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer: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*/.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer,.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer:hover{color:#444445;border-color:#f5f5f7}@media (min-width: 62em){/*!@.duet-drawer-toggle[aria-expanded=true], .duet-drawer-toggle[aria-expanded=true]:hover*/.duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer,.duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer:hover{border:0}/*!@.duet-drawer-toggle[aria-expanded=true]::after, .duet-drawer-toggle[aria-expanded=true]:hover::after*/.duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer::after,.duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer:hover::after{left:0;width:100%;transform:translateY(0)}}/*!@.duet-drawer-icon*/.duet-drawer-icon.sc-duet-notification-drawer{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*/.duet-drawer-icon.sc-duet-notification-drawer{margin-right:8px}}/*!@.duet-drawer-label*/.duet-drawer-label.sc-duet-notification-drawer{line-height:1}/*!@.duet-drawer-caret*/.duet-drawer-caret.sc-duet-notification-drawer{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*/.duet-drawer-caret.sc-duet-notification-drawer{right:16px;width:7px;height:7px}}/*!@.duet-drawer-caret duet-icon*/.duet-drawer-caret.sc-duet-notification-drawer duet-icon.sc-duet-notification-drawer{width:10px}/*!@.duet-drawer-toggle[aria-expanded=true] .duet-drawer-caret*/.duet-drawer-toggle[aria-expanded=true].sc-duet-notification-drawer .duet-drawer-caret.sc-duet-notification-drawer{transform:translateY(-50%) rotate(180deg)}/*!@.duet-drawer-badge*/.duet-drawer-badge.sc-duet-notification-drawer{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*/.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-badge.sc-duet-notification-drawer{background:#faa40f}/*!@.duet-drawer-content*/.duet-drawer-content.sc-duet-notification-drawer{display:none;background-color:white;border-bottom:1px solid #e1e3e6}/*!@.duet-drawer-content:focus*/.duet-drawer-content.sc-duet-notification-drawer:focus{outline:0}/*!@.duet-theme-turva .duet-drawer-content*/.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-content.sc-duet-notification-drawer{background-color:white;border-color:#e1e3e6}@media (min-width: 62em){/*!@.duet-drawer-content*/.duet-drawer-content.sc-duet-notification-drawer{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*/.duet-drawer-content.sc-duet-notification-drawer::-webkit-scrollbar{display:none}/*!@.duet-theme-turva .duet-drawer-content*/.duet-theme-turva.sc-duet-notification-drawer .duet-drawer-content.sc-duet-notification-drawer{background-color:white}/*!@.duet-drawer-content.duet-drawer-left*/.duet-drawer-content.duet-drawer-left.sc-duet-notification-drawer{right:0}/*!@.duet-drawer-content.duet-drawer-right*/.duet-drawer-content.duet-drawer-right.sc-duet-notification-drawer{left:0}}/*!@.duet-drawer-content.duet-drawer-open*/.duet-drawer-content.duet-drawer-open.sc-duet-notification-drawer{display:block}@media (min-width: 62em){/*!@.duet-drawer-content.duet-drawer-open*/.duet-drawer-content.duet-drawer-open.sc-duet-notification-drawer{visibility:visible;opacity:1;transform:scale(1) translateZ(0) translateY(0)}}";
|
|
11551
12312
|
|
|
11552
12313
|
const ESC_KEY = 27;
|
|
11553
12314
|
class DuetNotificationDrawer {
|
|
@@ -12105,13 +12866,16 @@ class DuetNumberInput {
|
|
|
12105
12866
|
}; }
|
|
12106
12867
|
}
|
|
12107
12868
|
|
|
12108
|
-
const duetParagraphCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-paragraph,*.sc-duet-paragraph::after,*.sc-duet-paragraph::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-paragraph-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-paragraph*/.duet-paragraph.sc-duet-paragraph{margin-bottom:16px !important;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}/*!@.duet-paragraph.duet-p-0*/.duet-paragraph.duet-p-0.sc-duet-paragraph{padding:0 !important}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.duet-theme-turva*/.duet-paragraph.duet-theme-turva.sc-duet-paragraph{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}/*!@.duet-paragraph.duet-paragraph-small*/.duet-paragraph.duet-paragraph-small.sc-duet-paragraph{font-size:0.875rem}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1rem}}@media (min-width: 46.2962962963rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1.25rem}}/*!@.duet-paragraph.intro.duet-m-0*/.duet-paragraph.intro.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@::slotted(a)*/.sc-duet-paragraph-s>a{font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;transition:300ms ease}/*!@::slotted(a).duet-theme-turva*/.sc-duet-paragraph-s>a.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}/*!@::slotted(a):hover*/.sc-duet-paragraph-s>a:hover{color:#004d80;text-decoration:none}/*!@::slotted(a):hover.duet-theme-turva*/.sc-duet-paragraph-s>a:hover.duet-theme-turva{color:#940925}/*!@::slotted(a):active*/.sc-duet-paragraph-s>a:active{opacity:0.75;transition:none}";
|
|
12869
|
+
const duetParagraphCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-paragraph,*.sc-duet-paragraph::after,*.sc-duet-paragraph::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-paragraph-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-paragraph*/.duet-paragraph.sc-duet-paragraph{margin-bottom:16px !important;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}/*!@.duet-paragraph.duet-p-0*/.duet-paragraph.duet-p-0.sc-duet-paragraph{padding:0 !important}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.duet-theme-turva*/.duet-paragraph.duet-theme-turva.sc-duet-paragraph{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}/*!@.duet-paragraph.duet-paragraph-small*/.duet-paragraph.duet-paragraph-small.sc-duet-paragraph{font-size:0.875rem}/*!@.duet-paragraph.duet-paragraph-semi-bold*/.duet-paragraph.duet-paragraph-semi-bold.sc-duet-paragraph{font-weight:600}/*!@.duet-paragraph.duet-paragraph-bold*/.duet-paragraph.duet-paragraph-bold.sc-duet-paragraph{font-weight:700}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1rem}}@media (min-width: 46.2962962963rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1.25rem}}/*!@.duet-paragraph.intro.duet-m-0*/.duet-paragraph.intro.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@::slotted(a)*/.sc-duet-paragraph-s>a{font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;transition:300ms ease}/*!@::slotted(a).duet-theme-turva*/.sc-duet-paragraph-s>a.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}/*!@::slotted(a):hover*/.sc-duet-paragraph-s>a:hover{color:#004d80;text-decoration:none}/*!@::slotted(a):hover.duet-theme-turva*/.sc-duet-paragraph-s>a:hover.duet-theme-turva{color:#940925}/*!@::slotted(a):active*/.sc-duet-paragraph-s>a:active{opacity:0.75;transition:none}";
|
|
12109
12870
|
|
|
12871
|
+
/**
|
|
12872
|
+
* @part duet-paragraph - piercing selector for styling the paragraph
|
|
12873
|
+
*/
|
|
12110
12874
|
class DuetParagraph {
|
|
12111
12875
|
constructor(hostRef) {
|
|
12112
12876
|
registerInstance(this, hostRef);
|
|
12113
12877
|
/**
|
|
12114
|
-
* Theme of the
|
|
12878
|
+
* Theme of the paragraph.
|
|
12115
12879
|
*/
|
|
12116
12880
|
this.theme = "";
|
|
12117
12881
|
/**
|
|
@@ -12122,6 +12886,10 @@ class DuetParagraph {
|
|
|
12122
12886
|
* Controls the size of the paragraph.
|
|
12123
12887
|
*/
|
|
12124
12888
|
this.size = "medium";
|
|
12889
|
+
/**
|
|
12890
|
+
* Controls the Font-Weight of the paragraph.
|
|
12891
|
+
*/
|
|
12892
|
+
this.weight = undefined;
|
|
12125
12893
|
/**
|
|
12126
12894
|
* Style variation of the paragraph.
|
|
12127
12895
|
*/
|
|
@@ -12147,10 +12915,12 @@ class DuetParagraph {
|
|
|
12147
12915
|
return (hAsync("p", { class: {
|
|
12148
12916
|
"duet-paragraph": true,
|
|
12149
12917
|
"duet-paragraph-small": this.size === "small",
|
|
12918
|
+
"duet-paragraph-semi-bold": this.weight === "semi-bold",
|
|
12919
|
+
"duet-paragraph-bold": this.weight === "bold",
|
|
12150
12920
|
"duet-m-0": this.margin === "none",
|
|
12151
12921
|
[this.variation]: true,
|
|
12152
12922
|
"duet-theme-turva": this.theme === "turva",
|
|
12153
|
-
}, style: { color } }, hAsync("slot", null)));
|
|
12923
|
+
}, style: { color }, part: "duet-paragraph" }, hAsync("slot", null)));
|
|
12154
12924
|
}
|
|
12155
12925
|
get element() { return getElement(this); }
|
|
12156
12926
|
static get style() { return duetParagraphCss; }
|
|
@@ -12161,6 +12931,7 @@ class DuetParagraph {
|
|
|
12161
12931
|
"theme": [1025],
|
|
12162
12932
|
"margin": [1],
|
|
12163
12933
|
"size": [1],
|
|
12934
|
+
"weight": [1],
|
|
12164
12935
|
"variation": [1],
|
|
12165
12936
|
"color": [1]
|
|
12166
12937
|
},
|
|
@@ -12170,6 +12941,84 @@ class DuetParagraph {
|
|
|
12170
12941
|
}; }
|
|
12171
12942
|
}
|
|
12172
12943
|
|
|
12944
|
+
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}";
|
|
12945
|
+
|
|
12946
|
+
class DuetProgress {
|
|
12947
|
+
constructor(hostRef) {
|
|
12948
|
+
registerInstance(this, hostRef);
|
|
12949
|
+
/**
|
|
12950
|
+
* Own Properties
|
|
12951
|
+
*/
|
|
12952
|
+
this.progressId = createID("DuetProgress");
|
|
12953
|
+
this.progressLabelId = createID("DuetProgressLabel");
|
|
12954
|
+
/**
|
|
12955
|
+
* Defaults for accessibleLabel
|
|
12956
|
+
*/
|
|
12957
|
+
this.accessibleLabelUploadDefaults = {
|
|
12958
|
+
fi: ["lähetys valmis", "lähetys käynnissä"],
|
|
12959
|
+
sv: ["Uppladdningen är klar", "Uppladdning pågår"],
|
|
12960
|
+
en: ["upload completed", "upload in progress"],
|
|
12961
|
+
};
|
|
12962
|
+
/**
|
|
12963
|
+
* Adds accessible label for upload in progress and upload complete states
|
|
12964
|
+
* @default {fi: ["lähetys valmis", "lähetys käynnissä"],sv: ["Uppladdningen är klar", "Uppladdning pågår"], en: ["completed", "in progress"]}
|
|
12965
|
+
*/
|
|
12966
|
+
this.accessibleLabelUpload = getLocaleString(this.accessibleLabelUploadDefaults);
|
|
12967
|
+
/**
|
|
12968
|
+
* Progress of the bar, a value from 0-100
|
|
12969
|
+
*/
|
|
12970
|
+
this.progress = 0;
|
|
12971
|
+
/**
|
|
12972
|
+
* Height of progressbar
|
|
12973
|
+
*/
|
|
12974
|
+
this.height = "10px";
|
|
12975
|
+
/**
|
|
12976
|
+
* Theme of the input.
|
|
12977
|
+
*/
|
|
12978
|
+
this.theme = "";
|
|
12979
|
+
}
|
|
12980
|
+
/**
|
|
12981
|
+
* Component lifecycle events.
|
|
12982
|
+
*/
|
|
12983
|
+
componentWillLoad() {
|
|
12984
|
+
inheritGlobalTheme(this);
|
|
12985
|
+
}
|
|
12986
|
+
/**
|
|
12987
|
+
* render() function
|
|
12988
|
+
* Always the last one in the class.
|
|
12989
|
+
*/
|
|
12990
|
+
render() {
|
|
12991
|
+
return (hAsync(Host, null, hAsync("div", { "aria-live": this.accessibleLabel ? "polite" : "off", "aria-hidden": this.accessibleLabel ? "false" : "true", "aria-atomic": "true", style: {
|
|
12992
|
+
height: this.height,
|
|
12993
|
+
}, id: this.progressId, class: {
|
|
12994
|
+
"duet-progress": true,
|
|
12995
|
+
"duet-progress-done": this.progress === 100,
|
|
12996
|
+
"duet-progress-start": this.progress === 0,
|
|
12997
|
+
"duet-progress-inprogress": this.progress < 99 && this.progress !== 0,
|
|
12998
|
+
"duet-theme-turva": this.theme === "turva",
|
|
12999
|
+
} }, hAsync("duet-visually-hidden", null, hAsync("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (hAsync("span", null, this.accessibleLabel, ", ", this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))), this.caption && (hAsync("div", { class: "duet-progress-caption" }, hAsync("span", null, this.caption))), hAsync("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" }, hAsync("div", { class: "progress-bar" }, hAsync("span", { style: { width: `${this.progress}%;` } }, "Progress: ", this.progress, "%"))))));
|
|
13000
|
+
}
|
|
13001
|
+
get element() { return getElement(this); }
|
|
13002
|
+
static get style() { return duetProgressCss; }
|
|
13003
|
+
static get cmpMeta() { return {
|
|
13004
|
+
"$flags$": 0,
|
|
13005
|
+
"$tagName$": "duet-progress",
|
|
13006
|
+
"$members$": {
|
|
13007
|
+
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
13008
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
13009
|
+
"accessibleLabelUploadDefaults": [1, "accessible-label-upload-defaults"],
|
|
13010
|
+
"accessibleLabelUpload": [1, "accessible-label-upload"],
|
|
13011
|
+
"progress": [1538],
|
|
13012
|
+
"caption": [1],
|
|
13013
|
+
"height": [1],
|
|
13014
|
+
"theme": [1025]
|
|
13015
|
+
},
|
|
13016
|
+
"$listeners$": undefined,
|
|
13017
|
+
"$lazyBundleId$": "-",
|
|
13018
|
+
"$attrsToReflect$": [["progress", "progress"]]
|
|
13019
|
+
}; }
|
|
13020
|
+
}
|
|
13021
|
+
|
|
12173
13022
|
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}";
|
|
12174
13023
|
|
|
12175
13024
|
class DuetRadio {
|
|
@@ -12658,7 +13507,7 @@ class DuetRangeSlider {
|
|
|
12658
13507
|
}; }
|
|
12659
13508
|
}
|
|
12660
13509
|
|
|
12661
|
-
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}";
|
|
13510
|
+
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}";
|
|
12662
13511
|
|
|
12663
13512
|
function isOptionGroup(item) {
|
|
12664
13513
|
return "options" in item;
|
|
@@ -12780,14 +13629,14 @@ class DuetSelect {
|
|
|
12780
13629
|
if (this.nativeSelect) {
|
|
12781
13630
|
this.nativeSelect.value = this.value;
|
|
12782
13631
|
}
|
|
12783
|
-
this.isCaptionVisible = !!
|
|
13632
|
+
this.isCaptionVisible = !!this.caption;
|
|
12784
13633
|
}
|
|
12785
13634
|
/**
|
|
12786
13635
|
* Component lifecycle events.
|
|
12787
13636
|
*/
|
|
12788
13637
|
componentWillLoad() {
|
|
12789
13638
|
inheritGlobalTheme(this);
|
|
12790
|
-
this.isCaptionVisible = !!
|
|
13639
|
+
this.isCaptionVisible = !!this.caption;
|
|
12791
13640
|
this.refresh();
|
|
12792
13641
|
}
|
|
12793
13642
|
/**
|
|
@@ -12830,7 +13679,7 @@ class DuetSelect {
|
|
|
12830
13679
|
"duet-theme-turva": this.theme === "turva",
|
|
12831
13680
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
12832
13681
|
"has-error": !!this.error,
|
|
12833
|
-
} }, hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), hAsync("
|
|
13682
|
+
} }, hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), hAsync("div", { class: "duet-select-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-select-placeholder", size: "small" }, this.placeholder)), hAsync("select", { ref: select => (this.nativeSelect = select), disabled: this.disabled, name: this.name, id: identifier, role: this.role, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, required: this.required, "aria-describedby": this.accessibleDescribedBy }, this.placeholder && (hAsync("option", { disabled: true, selected: true, value: "" }, this.placeholder)), !this.processedItems ? (hAsync("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
|
|
12834
13683
|
return isOptionGroup(item) ? this.renderOptionGroup(item) : this.renderOption(item);
|
|
12835
13684
|
}))), hAsync("div", { class: "duet-select", "aria-hidden": "true" }, hAsync("span", { key: this.value }, this.getSelectedItemLabel()), hAsync("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" })))), hAsync("span", { class: "duet-select-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error)))));
|
|
12836
13685
|
}
|
|
@@ -13263,7 +14112,7 @@ class DuetTab {
|
|
|
13263
14112
|
}; }
|
|
13264
14113
|
}
|
|
13265
14114
|
|
|
13266
|
-
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:#
|
|
14115
|
+
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}";
|
|
13267
14116
|
|
|
13268
14117
|
class DuetTabGroup {
|
|
13269
14118
|
constructor(hostRef) {
|
|
@@ -13463,7 +14312,7 @@ class DuetTabGroup {
|
|
|
13463
14312
|
}; }
|
|
13464
14313
|
}
|
|
13465
14314
|
|
|
13466
|
-
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)}";
|
|
14315
|
+
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)}";
|
|
13467
14316
|
|
|
13468
14317
|
// remove wrapping speech marks.
|
|
13469
14318
|
// media query tokens are wrapped in speech marks,
|
|
@@ -13591,7 +14440,7 @@ class DuetTable {
|
|
|
13591
14440
|
}; }
|
|
13592
14441
|
}
|
|
13593
14442
|
|
|
13594
|
-
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}";
|
|
14443
|
+
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}";
|
|
13595
14444
|
|
|
13596
14445
|
const CharacterCount = ({ value, maxlength, label, theme }) => {
|
|
13597
14446
|
if (maxlength == null) {
|
|
@@ -13692,7 +14541,7 @@ class DuetTextarea {
|
|
|
13692
14541
|
cleanValue(this.nativeInput, this.disallowPatternRegex);
|
|
13693
14542
|
}
|
|
13694
14543
|
this.value = this.nativeInput.value;
|
|
13695
|
-
this.isCaptionVisible = !!
|
|
14544
|
+
this.isCaptionVisible = !!this.caption;
|
|
13696
14545
|
this.duetInput.emit({
|
|
13697
14546
|
originalEvent: ev,
|
|
13698
14547
|
value: this.value,
|
|
@@ -13731,7 +14580,7 @@ class DuetTextarea {
|
|
|
13731
14580
|
componentWillLoad() {
|
|
13732
14581
|
inheritGlobalTheme(this);
|
|
13733
14582
|
this.disallowedPatternChange();
|
|
13734
|
-
this.isCaptionVisible = !!
|
|
14583
|
+
this.isCaptionVisible = !!this.caption;
|
|
13735
14584
|
if (this.counter && this.maxlength == null) {
|
|
13736
14585
|
console.warn("[DUET WARNING]: counter will only take effect if maxlength is set");
|
|
13737
14586
|
}
|
|
@@ -13765,7 +14614,7 @@ class DuetTextarea {
|
|
|
13765
14614
|
"duet-label-hidden": this.labelHidden,
|
|
13766
14615
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
13767
14616
|
"has-error": !!this.error,
|
|
13768
|
-
} }, hAsync("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 && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), hAsync("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 }), hAsync("duet-grid", { alignment: "stretch" }, hAsync("duet-grid-item", { margin: "none", fill: true }, hAsync("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error))), hAsync("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (hAsync(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
|
|
14617
|
+
} }, hAsync("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 && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), hAsync("div", { class: "duet-textarea-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-textarea-placeholder", size: "small" }, this.placeholder)), hAsync("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 })), hAsync("duet-grid", { alignment: "stretch" }, hAsync("duet-grid-item", { margin: "none", fill: true }, hAsync("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error))), hAsync("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (hAsync(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
|
|
13769
14618
|
}
|
|
13770
14619
|
get element() { return getElement(this); }
|
|
13771
14620
|
static get watchers() { return {
|
|
@@ -14317,6 +15166,1274 @@ class DuetTray {
|
|
|
14317
15166
|
}; }
|
|
14318
15167
|
}
|
|
14319
15168
|
|
|
15169
|
+
var errorCodes = [
|
|
15170
|
+
{
|
|
15171
|
+
type: "default",
|
|
15172
|
+
system_message: "unknown error",
|
|
15173
|
+
message: {
|
|
15174
|
+
fi: "Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",
|
|
15175
|
+
sv: "Ett okänt fel uppstod, försök igen.",
|
|
15176
|
+
en: "An unknown error occured, please try again."
|
|
15177
|
+
}
|
|
15178
|
+
},
|
|
15179
|
+
{
|
|
15180
|
+
type: "400",
|
|
15181
|
+
system_message: "Bad Request: The server could not understand the request due to invalid syntax.",
|
|
15182
|
+
message: {
|
|
15183
|
+
fi: "Tiedostoa ei hyväksytty.",
|
|
15184
|
+
sv: "Servern avvisade din fil.",
|
|
15185
|
+
en: "The server rejected your file."
|
|
15186
|
+
}
|
|
15187
|
+
},
|
|
15188
|
+
{
|
|
15189
|
+
type: "401",
|
|
15190
|
+
system_message: "Not Authenticated: The client must authenticate itself to get the requested response...",
|
|
15191
|
+
message: {
|
|
15192
|
+
fi: "Vain kirjautunut käyttäjä voi lähettää tiedostoja.",
|
|
15193
|
+
sv: "Du måste vara inloggad för att ladda upp filer.",
|
|
15194
|
+
en: "You need to be logged in to upload files."
|
|
15195
|
+
}
|
|
15196
|
+
},
|
|
15197
|
+
{
|
|
15198
|
+
type: "403",
|
|
15199
|
+
system_message: "No Access: The client does not have access rights to the content.",
|
|
15200
|
+
message: {
|
|
15201
|
+
fi: "Ei oikeuksia lähettää tiedostoja.",
|
|
15202
|
+
sv: "Du har inte rätt åtkomsträttigheter för att ladda upp filer.",
|
|
15203
|
+
en: "You do not have the correct access rights to upload files."
|
|
15204
|
+
}
|
|
15205
|
+
},
|
|
15206
|
+
{
|
|
15207
|
+
type: "413",
|
|
15208
|
+
system_message: "Payload too large",
|
|
15209
|
+
message: {
|
|
15210
|
+
fi: "Tiedosto oli liian vastaanotettavaksi.",
|
|
15211
|
+
sv: "Filen var för stor för servern att hantera.",
|
|
15212
|
+
en: "The file was to large for the server to handle."
|
|
15213
|
+
}
|
|
15214
|
+
},
|
|
15215
|
+
{
|
|
15216
|
+
type: "415",
|
|
15217
|
+
system_message: "Unsupported media type",
|
|
15218
|
+
message: {
|
|
15219
|
+
fi: "Tiedoston tyyppi oli väärä.",
|
|
15220
|
+
sv: "Servern avvisade filen eftersom den hade fel typ.",
|
|
15221
|
+
en: "The server rejected the file because it had the wrong type."
|
|
15222
|
+
}
|
|
15223
|
+
},
|
|
15224
|
+
{
|
|
15225
|
+
type: "429",
|
|
15226
|
+
system_message: "Too many request from same address",
|
|
15227
|
+
message: {
|
|
15228
|
+
fi: "Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",
|
|
15229
|
+
sv: "Servern har fått många förfrågningar från dig, försök igen senare.",
|
|
15230
|
+
en: "The server has received to many request from you, please try again later."
|
|
15231
|
+
}
|
|
15232
|
+
},
|
|
15233
|
+
{
|
|
15234
|
+
type: "500",
|
|
15235
|
+
system_message: "Internal Server Error",
|
|
15236
|
+
message: {
|
|
15237
|
+
fi: "Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",
|
|
15238
|
+
sv: "Servern rapporterade ett okänt fel och uppladdningen misslyckades.",
|
|
15239
|
+
en: "The server reported an unknown error and the upload failed."
|
|
15240
|
+
}
|
|
15241
|
+
},
|
|
15242
|
+
{
|
|
15243
|
+
type: "duet-upload-100",
|
|
15244
|
+
system_message: "File extension not allowed",
|
|
15245
|
+
message: {
|
|
15246
|
+
fi: "Tiedoston tyyppi ei ole sallittu.",
|
|
15247
|
+
sv: "Du kan inte ladda upp filer av den type.",
|
|
15248
|
+
en: "You cannot upload files with that extension."
|
|
15249
|
+
}
|
|
15250
|
+
},
|
|
15251
|
+
{
|
|
15252
|
+
type: "duet-upload-001",
|
|
15253
|
+
system_message: "File transfer failed",
|
|
15254
|
+
message: {
|
|
15255
|
+
fi: "Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",
|
|
15256
|
+
sv: "Din anslutning till servern avbröts, försök igen.",
|
|
15257
|
+
en: "Your connection to the server was interrupted, try again."
|
|
15258
|
+
}
|
|
15259
|
+
},
|
|
15260
|
+
{
|
|
15261
|
+
type: "duet-upload-101",
|
|
15262
|
+
system_message: "File mimetype not allowed",
|
|
15263
|
+
message: {
|
|
15264
|
+
fi: "Tiedoston tyyppi ei ole sallittu.",
|
|
15265
|
+
sv: "Du kan inte ladda upp filer av den typ.",
|
|
15266
|
+
en: "You cannot upload files of that type."
|
|
15267
|
+
}
|
|
15268
|
+
},
|
|
15269
|
+
{
|
|
15270
|
+
type: "duet-upload-201",
|
|
15271
|
+
system_message: "File is too large",
|
|
15272
|
+
message: {
|
|
15273
|
+
fi: "Tiedosto on liian iso.",
|
|
15274
|
+
sv: "Filen är större än tillåtet.",
|
|
15275
|
+
en: "The file is larger than permitted."
|
|
15276
|
+
}
|
|
15277
|
+
},
|
|
15278
|
+
{
|
|
15279
|
+
type: "duet-upload-202",
|
|
15280
|
+
system_message: "The combined size of all files is too large",
|
|
15281
|
+
message: {
|
|
15282
|
+
fi: "Tiedostojen yhteenlaskettu koko on liian iso.",
|
|
15283
|
+
sv: "Du har nått den maximala kombinerade filstorleken.",
|
|
15284
|
+
en: "You have reached the maximum combined filesize."
|
|
15285
|
+
}
|
|
15286
|
+
},
|
|
15287
|
+
{
|
|
15288
|
+
type: "duet-upload-301",
|
|
15289
|
+
system_message: "The maximum file limit has been reached",
|
|
15290
|
+
message: {
|
|
15291
|
+
fi: "Liitteiden maksimimäärä saavutettu.",
|
|
15292
|
+
sv: "Maximalt antal bilagor har uppnåtts.",
|
|
15293
|
+
en: "Maximum number of attachments reached."
|
|
15294
|
+
}
|
|
15295
|
+
}
|
|
15296
|
+
];
|
|
15297
|
+
|
|
15298
|
+
const getError = (code) => {
|
|
15299
|
+
let error = {
|
|
15300
|
+
type: undefined,
|
|
15301
|
+
system_message: undefined,
|
|
15302
|
+
message: undefined,
|
|
15303
|
+
};
|
|
15304
|
+
error = errorCodes.filter(errorItem => {
|
|
15305
|
+
// the == is intentional we may be comparing numbers to strings - and that is ok here
|
|
15306
|
+
return errorItem.type == code;
|
|
15307
|
+
})[0];
|
|
15308
|
+
if (!error) {
|
|
15309
|
+
error = errorCodes.filter(errorItem => {
|
|
15310
|
+
return errorItem.type === "default";
|
|
15311
|
+
})[0];
|
|
15312
|
+
}
|
|
15313
|
+
return error;
|
|
15314
|
+
};
|
|
15315
|
+
const getI18nError = (errorCode) => {
|
|
15316
|
+
const errorFromJson = getError(errorCode);
|
|
15317
|
+
const i18String = getLocaleString(errorFromJson.message);
|
|
15318
|
+
if (i18String === "" || !i18String) {
|
|
15319
|
+
return errorFromJson.system_message;
|
|
15320
|
+
}
|
|
15321
|
+
else {
|
|
15322
|
+
return i18String;
|
|
15323
|
+
}
|
|
15324
|
+
};
|
|
15325
|
+
|
|
15326
|
+
const ErrorItem = ({ data }) => {
|
|
15327
|
+
const { item, error } = data;
|
|
15328
|
+
const { name } = item;
|
|
15329
|
+
const { type } = error;
|
|
15330
|
+
return (hAsync("span", { class: "duet-upload-item-error", role: "status" },
|
|
15331
|
+
hAsync("duet-paragraph", { class: "duet-upload-item-name", color: "danger", margin: "none", weight: "semi-bold" },
|
|
15332
|
+
hAsync("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
|
|
15333
|
+
" ",
|
|
15334
|
+
name),
|
|
15335
|
+
hAsync("duet-paragraph", { class: "duet-upload-item-error-label", size: "small", margin: "none", color: "danger" }, getI18nError(type))));
|
|
15336
|
+
};
|
|
15337
|
+
|
|
15338
|
+
const ProgressItem = ({ progress, name }) => (hAsync("span", null,
|
|
15339
|
+
hAsync("duet-paragraph", { color: "secondary", margin: "none", size: "small" }, name),
|
|
15340
|
+
hAsync("duet-spacer", { size: "xx-small" }),
|
|
15341
|
+
hAsync("duet-progress", { progress: Math.ceil(progress), "aria-hidden": true })));
|
|
15342
|
+
|
|
15343
|
+
const formatBytes = (bytes, decimals = 2) => {
|
|
15344
|
+
if (bytes === 0) {
|
|
15345
|
+
return "0 Bytes";
|
|
15346
|
+
}
|
|
15347
|
+
const k = 1024;
|
|
15348
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
15349
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
15350
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
15351
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
15352
|
+
};
|
|
15353
|
+
|
|
15354
|
+
const SuccessItem = ({ data, showLinks }) => {
|
|
15355
|
+
const { item, size, uploaded, url, meta } = data;
|
|
15356
|
+
const { name } = item;
|
|
15357
|
+
const ContentName = (hAsync("span", { class: "duet-upload-item-name" },
|
|
15358
|
+
hAsync("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
|
|
15359
|
+
hAsync("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
15360
|
+
name));
|
|
15361
|
+
const SizeText = (hAsync("span", { class: "duet-upload-item-size", style: { fontSize: "14px", fontWeight: "400" } },
|
|
15362
|
+
"(",
|
|
15363
|
+
formatBytes(size),
|
|
15364
|
+
")"));
|
|
15365
|
+
const FilenameLine = uploaded && url && showLinks ? (hAsync("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
|
|
15366
|
+
hAsync("duet-link", { url: url, external: true }, ContentName),
|
|
15367
|
+
hAsync("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
15368
|
+
SizeText)) : (hAsync("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
|
|
15369
|
+
ContentName,
|
|
15370
|
+
hAsync("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
15371
|
+
SizeText));
|
|
15372
|
+
const Badges = meta && meta.badges ? (hAsync("span", null,
|
|
15373
|
+
hAsync("duet-spacer", { size: "xx-small" }),
|
|
15374
|
+
meta.badges.map(badgeText => (hAsync("duet-badge", { color: "primary" }, badgeText))))) : undefined;
|
|
15375
|
+
return (hAsync("span", { class: "duet-upload-item-success" },
|
|
15376
|
+
hAsync("div", null, FilenameLine),
|
|
15377
|
+
Badges));
|
|
15378
|
+
};
|
|
15379
|
+
|
|
15380
|
+
const validateFileExtension = (name, allowedExtensions) => {
|
|
15381
|
+
if (!allowedExtensions) {
|
|
15382
|
+
return true;
|
|
15383
|
+
}
|
|
15384
|
+
const ext = name.split(".");
|
|
15385
|
+
const validExtension = allowedExtensions.split(",");
|
|
15386
|
+
const extension = ext[ext.length - 1];
|
|
15387
|
+
return validExtension.includes(extension);
|
|
15388
|
+
};
|
|
15389
|
+
const validateFileMime = (type, allowedMimetypes) => {
|
|
15390
|
+
if (!allowedMimetypes || !type) {
|
|
15391
|
+
return true;
|
|
15392
|
+
}
|
|
15393
|
+
const validMimeTypes = allowedMimetypes.split(",");
|
|
15394
|
+
let valid = false;
|
|
15395
|
+
validMimeTypes.forEach(mimeType => {
|
|
15396
|
+
const allowedTypes = mimeType.split("/");
|
|
15397
|
+
const fileType = type.split("/");
|
|
15398
|
+
if (allowedTypes[0] === fileType[0] && (allowedTypes[1] === fileType[1] || allowedTypes[1] === "*")) {
|
|
15399
|
+
valid = true;
|
|
15400
|
+
}
|
|
15401
|
+
});
|
|
15402
|
+
return valid;
|
|
15403
|
+
};
|
|
15404
|
+
const validateFileSize = (size, maxBytes) => {
|
|
15405
|
+
if (!maxBytes || !size) {
|
|
15406
|
+
return true;
|
|
15407
|
+
}
|
|
15408
|
+
return maxBytes >= size;
|
|
15409
|
+
};
|
|
15410
|
+
const validateFile = (item, validators) => {
|
|
15411
|
+
const { allowedMimetypes, allowedExtensions, maxBytes } = validators;
|
|
15412
|
+
let valid = false;
|
|
15413
|
+
let errorMessage = getError("default");
|
|
15414
|
+
if (item) {
|
|
15415
|
+
const { name, type, size } = item;
|
|
15416
|
+
const mime = validateFileMime(type, allowedMimetypes);
|
|
15417
|
+
const ext = validateFileExtension(name, allowedExtensions);
|
|
15418
|
+
const bytes = validateFileSize(size, maxBytes);
|
|
15419
|
+
if (!mime) {
|
|
15420
|
+
errorMessage = getError("duet-upload-101");
|
|
15421
|
+
}
|
|
15422
|
+
if (!ext) {
|
|
15423
|
+
errorMessage = getError("duet-upload-100");
|
|
15424
|
+
}
|
|
15425
|
+
if (!bytes) {
|
|
15426
|
+
errorMessage = getError("duet-upload-201");
|
|
15427
|
+
}
|
|
15428
|
+
valid = mime && ext && bytes;
|
|
15429
|
+
}
|
|
15430
|
+
else {
|
|
15431
|
+
valid = false;
|
|
15432
|
+
}
|
|
15433
|
+
return {
|
|
15434
|
+
valid,
|
|
15435
|
+
errorMessage: valid ? undefined : getLocaleString(errorMessage.message),
|
|
15436
|
+
errorSystem: valid ? undefined : errorMessage.system_message,
|
|
15437
|
+
errorType: valid ? undefined : errorMessage.type,
|
|
15438
|
+
};
|
|
15439
|
+
};
|
|
15440
|
+
const validateTotalSizeIsAboveMax = (filelist, maxTotalBytes) => {
|
|
15441
|
+
let total = 0;
|
|
15442
|
+
if (maxTotalBytes) {
|
|
15443
|
+
filelist.forEach(item => {
|
|
15444
|
+
if (item.valid && item.size) {
|
|
15445
|
+
total += item.size;
|
|
15446
|
+
}
|
|
15447
|
+
});
|
|
15448
|
+
if (total < maxTotalBytes) {
|
|
15449
|
+
return true;
|
|
15450
|
+
}
|
|
15451
|
+
}
|
|
15452
|
+
return false;
|
|
15453
|
+
};
|
|
15454
|
+
const validateTotalAmountIsAboveMax = (filelist, maxFiles) => {
|
|
15455
|
+
let total = 0;
|
|
15456
|
+
if (maxFiles) {
|
|
15457
|
+
filelist.forEach(item => {
|
|
15458
|
+
if (item.valid) {
|
|
15459
|
+
total++;
|
|
15460
|
+
}
|
|
15461
|
+
});
|
|
15462
|
+
if (total > maxFiles) {
|
|
15463
|
+
return true;
|
|
15464
|
+
}
|
|
15465
|
+
}
|
|
15466
|
+
return false;
|
|
15467
|
+
};
|
|
15468
|
+
|
|
15469
|
+
const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress }) => {
|
|
15470
|
+
const { type = "POST", xhr, uri, argument = null, headers = null } = options;
|
|
15471
|
+
xhr.open(type, `${uri}${argument || ""}`, true);
|
|
15472
|
+
const { data, name } = payload;
|
|
15473
|
+
// headers must be added after open
|
|
15474
|
+
if (headers) {
|
|
15475
|
+
Object.keys(headers).forEach(key => {
|
|
15476
|
+
xhr.setRequestHeader(key, headers[key]);
|
|
15477
|
+
});
|
|
15478
|
+
}
|
|
15479
|
+
if (type === "POST") {
|
|
15480
|
+
xhr.onreadystatechange = () => {
|
|
15481
|
+
// Call a function when the state changes.
|
|
15482
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 200 && xhr.status < 300) {
|
|
15483
|
+
// Request finished without errors
|
|
15484
|
+
onSuccess(xhr, name, xhr.status);
|
|
15485
|
+
}
|
|
15486
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 300 && xhr.status < 999) {
|
|
15487
|
+
// Request finished with errors
|
|
15488
|
+
onFailure(xhr, name, xhr.status);
|
|
15489
|
+
}
|
|
15490
|
+
};
|
|
15491
|
+
onProgress(name);
|
|
15492
|
+
}
|
|
15493
|
+
xhr.send(data);
|
|
15494
|
+
return xhr;
|
|
15495
|
+
};
|
|
15496
|
+
|
|
15497
|
+
const duetUploadCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-upload,*.sc-duet-upload::after,*.sc-duet-upload::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-upload-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@::slotted([slot=header])*/.sc-duet-upload-s>[slot=header]{margin-bottom:16px}/*!@::slotted([slot=fileheader])*/.sc-duet-upload-s>[slot=fileheader]{margin:16px 0 0 0}/*!@::slotted([slot=filefooter])*/.sc-duet-upload-s>[slot=filefooter]{margin-top:16px}/*!@.duet-upload*/.duet-upload.sc-duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-upload-item-size*/.duet-upload-item-size.sc-duet-upload{font-size:0.75rem;font-weight:400}/*!@.duet-upload-filelist*/.duet-upload-filelist.sc-duet-upload{margin-bottom:25px}/*!@.duet-upload-filelist-empty*/.duet-upload-filelist-empty.sc-duet-upload{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";
|
|
15498
|
+
|
|
15499
|
+
/**
|
|
15500
|
+
* @slot header - named slot - to place content after description / caption
|
|
15501
|
+
* @slot fileheader - named slot - to place content above "filelist" (only displayed when "filelist" contains items)
|
|
15502
|
+
* @slot filefooter - named slot - to place content below "filelist" (only displayed when "filelist" contains items)
|
|
15503
|
+
*/
|
|
15504
|
+
class DuetUpload {
|
|
15505
|
+
constructor(hostRef) {
|
|
15506
|
+
registerInstance(this, hostRef);
|
|
15507
|
+
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
15508
|
+
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
15509
|
+
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
15510
|
+
this.duetDone = createEvent$2(this, "duetDone", 3);
|
|
15511
|
+
this.duetState = createEvent$2(this, "duetState", 3);
|
|
15512
|
+
this.duetDelete = createEvent$2(this, "duetDelete", 3);
|
|
15513
|
+
this.duetCancel = createEvent$2(this, "duetCancel", 3);
|
|
15514
|
+
this.duetProgress = createEvent$2(this, "duetProgress", 3);
|
|
15515
|
+
this.duetUpload = createEvent$2(this, "duetUpload", 3);
|
|
15516
|
+
/**
|
|
15517
|
+
* Own Properties
|
|
15518
|
+
*/
|
|
15519
|
+
this.buttonId = createID("DuetButton");
|
|
15520
|
+
this.labelId = createID("DuetLabel");
|
|
15521
|
+
this.uploadId = createID("DuetUpload");
|
|
15522
|
+
this.editableTableId = createID("DuetEditableTable");
|
|
15523
|
+
this.filesInProgress = new Map();
|
|
15524
|
+
this.fileMaxReached = false;
|
|
15525
|
+
this.bytesMaxReached = false;
|
|
15526
|
+
this.internalStatusMessageLabel = undefined;
|
|
15527
|
+
/**
|
|
15528
|
+
* Properties
|
|
15529
|
+
*/
|
|
15530
|
+
this.DefaultGroups = {
|
|
15531
|
+
inprogress: "inprogress",
|
|
15532
|
+
success: "success",
|
|
15533
|
+
failure: "failure",
|
|
15534
|
+
};
|
|
15535
|
+
/**
|
|
15536
|
+
* State() variables
|
|
15537
|
+
*/
|
|
15538
|
+
this.tick = Date.now();
|
|
15539
|
+
/**
|
|
15540
|
+
* If external is set to true, the upload component will not actually upload the files, but only keep states
|
|
15541
|
+
* it will be up to you to handle the upload and return progress information to the upload-component
|
|
15542
|
+
*/
|
|
15543
|
+
this.external = false;
|
|
15544
|
+
/**
|
|
15545
|
+
* If set the upload component will not display an upload button, you will have to create one yourself
|
|
15546
|
+
* and call the exposed method startUpload
|
|
15547
|
+
*/
|
|
15548
|
+
this.hideButton = false;
|
|
15549
|
+
/**
|
|
15550
|
+
* Default actions added to the internally used duet-editable-table
|
|
15551
|
+
*/
|
|
15552
|
+
this.actions = [
|
|
15553
|
+
{
|
|
15554
|
+
icon: "action-delete",
|
|
15555
|
+
color: "color-danger",
|
|
15556
|
+
color_hover: "primary-dark",
|
|
15557
|
+
id: "delete",
|
|
15558
|
+
map: ["success", "failure"],
|
|
15559
|
+
label: {
|
|
15560
|
+
fi: "Poista tiedosto",
|
|
15561
|
+
en: "Poista tiedosto",
|
|
15562
|
+
sv: "Ta bort filen",
|
|
15563
|
+
},
|
|
15564
|
+
},
|
|
15565
|
+
{
|
|
15566
|
+
icon: "navigation-close",
|
|
15567
|
+
color: "primary",
|
|
15568
|
+
color_hover: "primary-dark",
|
|
15569
|
+
id: "cancel",
|
|
15570
|
+
map: ["inprogress"],
|
|
15571
|
+
label: {
|
|
15572
|
+
fi: "Keskeytä lähetys",
|
|
15573
|
+
en: "Cancel the upload",
|
|
15574
|
+
sv: "Stop överföringen",
|
|
15575
|
+
},
|
|
15576
|
+
},
|
|
15577
|
+
];
|
|
15578
|
+
/**
|
|
15579
|
+
* If enabled the editable-table will display links on successfully uploaded items,
|
|
15580
|
+
* this requires the server can respond with link URIs in the correct format
|
|
15581
|
+
* and that the files are accessible to the user
|
|
15582
|
+
*/
|
|
15583
|
+
this.showLinks = false;
|
|
15584
|
+
/**
|
|
15585
|
+
* Property to change the aria upload progress text read aloud by screenreaders
|
|
15586
|
+
* @default {
|
|
15587
|
+
* fi: {
|
|
15588
|
+
* inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
15589
|
+
* inProgressWithErrors:
|
|
15590
|
+
* "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
15591
|
+
* done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
15592
|
+
* doneWithErrors:
|
|
15593
|
+
* "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
15594
|
+
* files: "tiedostot",
|
|
15595
|
+
* file: "tiedosto",
|
|
15596
|
+
* },
|
|
15597
|
+
* sv: {
|
|
15598
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
15599
|
+
* inProgressWithErrors:
|
|
15600
|
+
* "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
15601
|
+
* done: "Alla {filesTotal} har lagts till",
|
|
15602
|
+
* doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
15603
|
+
* files: "filer",
|
|
15604
|
+
* file: "fil",
|
|
15605
|
+
* },
|
|
15606
|
+
* en: {
|
|
15607
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
15608
|
+
* inProgressWithErrors:
|
|
15609
|
+
* "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
15610
|
+
* done: "All {filesTotal} added successfully",
|
|
15611
|
+
* doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
15612
|
+
* files: "tiedostoa",
|
|
15613
|
+
* file: "tiedosto",
|
|
15614
|
+
* },
|
|
15615
|
+
* }
|
|
15616
|
+
*/
|
|
15617
|
+
this.statusLabelDefaults = {
|
|
15618
|
+
fi: {
|
|
15619
|
+
inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
15620
|
+
inProgressWithErrors: "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
15621
|
+
done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
15622
|
+
doneWithErrors: "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
15623
|
+
files: "tiedostot",
|
|
15624
|
+
file: "tiedosto",
|
|
15625
|
+
},
|
|
15626
|
+
sv: {
|
|
15627
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
15628
|
+
inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
15629
|
+
done: "Alla {filesTotal} har lagts till",
|
|
15630
|
+
doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
15631
|
+
files: "filer",
|
|
15632
|
+
file: "fil",
|
|
15633
|
+
},
|
|
15634
|
+
en: {
|
|
15635
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
15636
|
+
inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
15637
|
+
done: "All {filesTotal} added successfully",
|
|
15638
|
+
doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
15639
|
+
files: "tiedostoa",
|
|
15640
|
+
file: "tiedosto",
|
|
15641
|
+
},
|
|
15642
|
+
};
|
|
15643
|
+
/**
|
|
15644
|
+
* Strings used for the status aria-label
|
|
15645
|
+
*/
|
|
15646
|
+
this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
|
|
15647
|
+
/**
|
|
15648
|
+
* Property to change button label defaults on the component.
|
|
15649
|
+
* @default {
|
|
15650
|
+
fi: "Lisää liite",
|
|
15651
|
+
sv: "Lägg till en bilaga",
|
|
15652
|
+
en: "Add an attachment",
|
|
15653
|
+
}
|
|
15654
|
+
*/
|
|
15655
|
+
this.buttonLabelDefaults = {
|
|
15656
|
+
fi: "Lisää liite",
|
|
15657
|
+
sv: "Lägg till en bilaga",
|
|
15658
|
+
en: "Add an attachment",
|
|
15659
|
+
};
|
|
15660
|
+
/**
|
|
15661
|
+
* Label of button
|
|
15662
|
+
* @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment" }
|
|
15663
|
+
*/
|
|
15664
|
+
this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
|
|
15665
|
+
/**
|
|
15666
|
+
* accessible aria-Label of button
|
|
15667
|
+
*/
|
|
15668
|
+
this.accessibleButtonLabel = undefined;
|
|
15669
|
+
/**
|
|
15670
|
+
* Theme of the input.
|
|
15671
|
+
*/
|
|
15672
|
+
this.theme = "";
|
|
15673
|
+
/**
|
|
15674
|
+
* Makes the input component disabled. This prevents users from being able to
|
|
15675
|
+
* interact with the upload component, and conveys its inactive state to assistive technologies.
|
|
15676
|
+
*/
|
|
15677
|
+
this.disabled = false;
|
|
15678
|
+
/**
|
|
15679
|
+
* Controls the margin of the component.
|
|
15680
|
+
*/
|
|
15681
|
+
this.margin = "auto";
|
|
15682
|
+
/**
|
|
15683
|
+
* Set whether the input is required or not. Please note that this is necessary for
|
|
15684
|
+
* accessible inputs when the user is required to fill them. When using this property
|
|
15685
|
+
* you need to also set “novalidate” attribute to your form element to prevent
|
|
15686
|
+
* browser from displaying its own validation errors.
|
|
15687
|
+
*/
|
|
15688
|
+
this.required = false;
|
|
15689
|
+
/**
|
|
15690
|
+
* Key used to set vertical alignment of action buttons
|
|
15691
|
+
*/
|
|
15692
|
+
this.alignment = "middle";
|
|
15693
|
+
/**
|
|
15694
|
+
* Visually hides the groups labels in the editable table list used to display the list of files
|
|
15695
|
+
*/
|
|
15696
|
+
this.hideGroups = false;
|
|
15697
|
+
/**
|
|
15698
|
+
* Map of string that contain list of uploaded files.
|
|
15699
|
+
*/
|
|
15700
|
+
this.files = new Map();
|
|
15701
|
+
/**
|
|
15702
|
+
* Property to read if the internally used editable-table contains errors or not
|
|
15703
|
+
*/
|
|
15704
|
+
this.valid = !this.required;
|
|
15705
|
+
/**
|
|
15706
|
+
* Property to change labelDefaults defaults on the component.
|
|
15707
|
+
* normally you would handle these strings on an application level and override @label when needed
|
|
15708
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
15709
|
+
*/
|
|
15710
|
+
this.labelDefaults = {
|
|
15711
|
+
fi: "Lisää liite",
|
|
15712
|
+
sv: "Lägg till en bilaga",
|
|
15713
|
+
en: "Add attachments",
|
|
15714
|
+
};
|
|
15715
|
+
/**
|
|
15716
|
+
* Label for the input.
|
|
15717
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
15718
|
+
*/
|
|
15719
|
+
this.label = getLocaleString(this.labelDefaults);
|
|
15720
|
+
/**
|
|
15721
|
+
* Property to change descriptionDefaults defaults on the component.
|
|
15722
|
+
* @default {
|
|
15723
|
+
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.",
|
|
15724
|
+
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.",
|
|
15725
|
+
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.",
|
|
15726
|
+
}
|
|
15727
|
+
*/
|
|
15728
|
+
this.descriptionDefaults = {
|
|
15729
|
+
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.",
|
|
15730
|
+
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.",
|
|
15731
|
+
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.",
|
|
15732
|
+
};
|
|
15733
|
+
/**
|
|
15734
|
+
* Description for the upload component.
|
|
15735
|
+
* @default {
|
|
15736
|
+
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.",
|
|
15737
|
+
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.",
|
|
15738
|
+
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.",
|
|
15739
|
+
}
|
|
15740
|
+
*/
|
|
15741
|
+
this.description = getLocaleString(this.descriptionDefaults);
|
|
15742
|
+
/**
|
|
15743
|
+
* Defaults for the filelist's empty state.
|
|
15744
|
+
* @default {
|
|
15745
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
15746
|
+
sv: "Inga filer har lagts till ännu.",
|
|
15747
|
+
en: "No files added yet.",
|
|
15748
|
+
}
|
|
15749
|
+
*/
|
|
15750
|
+
this.fileListEmptyDefaults = {
|
|
15751
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
15752
|
+
sv: "Inga filer har lagts till ännu.",
|
|
15753
|
+
en: "No files added yet.",
|
|
15754
|
+
};
|
|
15755
|
+
/**
|
|
15756
|
+
* Label for the filelist's empty state.
|
|
15757
|
+
* @default { fi: "Ei vielä lisättyjä tiedostoja.",sv: "Inga filer har lagts till ännu.",en: "No files added yet."}
|
|
15758
|
+
*/
|
|
15759
|
+
this.fileListEmpty = getLocaleString(this.fileListEmptyDefaults);
|
|
15760
|
+
/**
|
|
15761
|
+
* Display the input in error state along with an error message.
|
|
15762
|
+
*/
|
|
15763
|
+
this.error = "";
|
|
15764
|
+
/**
|
|
15765
|
+
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
15766
|
+
*/
|
|
15767
|
+
this.maxBytes = 200000000;
|
|
15768
|
+
/**
|
|
15769
|
+
* Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded.
|
|
15770
|
+
*/
|
|
15771
|
+
this.maxBytesTotal = undefined;
|
|
15772
|
+
/**
|
|
15773
|
+
* Use maxFiles to specify the maximum amount of files that can be uploaded
|
|
15774
|
+
*/
|
|
15775
|
+
this.maxFiles = 99;
|
|
15776
|
+
/**
|
|
15777
|
+
* A string of commaseperated file type values that are allowed
|
|
15778
|
+
* @example: .pdf,.doc,.docx
|
|
15779
|
+
*/
|
|
15780
|
+
this.allowedExtensions = "all";
|
|
15781
|
+
/**
|
|
15782
|
+
* A string of commaseperated mime type values that are allowed
|
|
15783
|
+
* @example: image/*,application/msword,
|
|
15784
|
+
*/
|
|
15785
|
+
this.allowedMimetypes = "*";
|
|
15786
|
+
/**
|
|
15787
|
+
* Use multiple to allow the user to select multiple files when uploading
|
|
15788
|
+
*/
|
|
15789
|
+
this.multiple = true;
|
|
15790
|
+
/**
|
|
15791
|
+
* Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,
|
|
15792
|
+
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
15793
|
+
*/
|
|
15794
|
+
this.limitSelection = false;
|
|
15795
|
+
/**
|
|
15796
|
+
* Private functions
|
|
15797
|
+
*/
|
|
15798
|
+
this.listenForActionEvents = () => {
|
|
15799
|
+
this.element.addEventListener("duetEditableItemAction", (e) => {
|
|
15800
|
+
const detail = e.detail;
|
|
15801
|
+
const { action, keyName, originalEvent } = detail;
|
|
15802
|
+
switch (action) {
|
|
15803
|
+
case "delete":
|
|
15804
|
+
this.onDelete(keyName, originalEvent);
|
|
15805
|
+
break;
|
|
15806
|
+
case "cancel":
|
|
15807
|
+
this.onCancel(keyName, originalEvent);
|
|
15808
|
+
break;
|
|
15809
|
+
// code block
|
|
15810
|
+
}
|
|
15811
|
+
});
|
|
15812
|
+
};
|
|
15813
|
+
this.verifyValidity = () => {
|
|
15814
|
+
const { invalid, valid } = this.getFilesAsArray();
|
|
15815
|
+
const oldValid = this.valid;
|
|
15816
|
+
this.valid = invalid.length === 0 && valid.length !== 0;
|
|
15817
|
+
if (this.valid !== oldValid) {
|
|
15818
|
+
this.duetState.emit({
|
|
15819
|
+
originalEvent: undefined,
|
|
15820
|
+
data: { valid: this.valid, from: "componentWillRender" },
|
|
15821
|
+
component: "duet-upload",
|
|
15822
|
+
});
|
|
15823
|
+
}
|
|
15824
|
+
};
|
|
15825
|
+
this.getGroupFromItemData = (item) => {
|
|
15826
|
+
if (item.valid && item.progress === 100) {
|
|
15827
|
+
// if the item has a group, move the file to that group instead
|
|
15828
|
+
// of into the standard success group
|
|
15829
|
+
if (item.group) {
|
|
15830
|
+
return item.group;
|
|
15831
|
+
}
|
|
15832
|
+
return this.DefaultGroups.success;
|
|
15833
|
+
}
|
|
15834
|
+
else if (item.progress > 0 && item.progress !== 100) {
|
|
15835
|
+
return this.DefaultGroups.inprogress;
|
|
15836
|
+
}
|
|
15837
|
+
else if (!item.valid) {
|
|
15838
|
+
return this.DefaultGroups.failure;
|
|
15839
|
+
}
|
|
15840
|
+
else if (item.group) {
|
|
15841
|
+
return item.group;
|
|
15842
|
+
}
|
|
15843
|
+
else {
|
|
15844
|
+
return "none";
|
|
15845
|
+
}
|
|
15846
|
+
};
|
|
15847
|
+
this.getItemHTMLFromItemData = (data, group) => {
|
|
15848
|
+
if (group === this.DefaultGroups.success) {
|
|
15849
|
+
return hAsync(SuccessItem, { data: data, showLinks: this.showLinks });
|
|
15850
|
+
}
|
|
15851
|
+
else if (group === this.DefaultGroups.inprogress) {
|
|
15852
|
+
return hAsync(ProgressItem, { progress: data.progress, name: data.item.name });
|
|
15853
|
+
}
|
|
15854
|
+
else if (group === this.DefaultGroups.failure) {
|
|
15855
|
+
return hAsync(ErrorItem, { data: data });
|
|
15856
|
+
}
|
|
15857
|
+
else if (data.group) {
|
|
15858
|
+
return data.html;
|
|
15859
|
+
}
|
|
15860
|
+
else {
|
|
15861
|
+
return "none";
|
|
15862
|
+
}
|
|
15863
|
+
};
|
|
15864
|
+
this.convertToDuetEditableTableItems = () => {
|
|
15865
|
+
// we're always recreating the map - in order to force an update down stream.
|
|
15866
|
+
const itemData = new Map();
|
|
15867
|
+
//walk the files Map and convert to DuetEditableTableItemData
|
|
15868
|
+
this.files.forEach((data, key, _originalMap) => {
|
|
15869
|
+
const group = this.getGroupFromItemData(data);
|
|
15870
|
+
const item = this.getItemHTMLFromItemData(data, group);
|
|
15871
|
+
itemData.set(key, {
|
|
15872
|
+
uid: data.uid,
|
|
15873
|
+
item,
|
|
15874
|
+
group,
|
|
15875
|
+
});
|
|
15876
|
+
});
|
|
15877
|
+
return itemData;
|
|
15878
|
+
};
|
|
15879
|
+
this.kick = debounce(() => {
|
|
15880
|
+
this.tick = Date.now();
|
|
15881
|
+
}, 30); // will trigger re-render
|
|
15882
|
+
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
15883
|
+
this.updateValueInMap = (item, key, value, kick = true) => {
|
|
15884
|
+
const fileItem = this.files.get(item);
|
|
15885
|
+
fileItem[key] = value;
|
|
15886
|
+
this.files.set(item, fileItem);
|
|
15887
|
+
if (kick) {
|
|
15888
|
+
this.kick();
|
|
15889
|
+
}
|
|
15890
|
+
};
|
|
15891
|
+
this.updateProgress = (ev, name) => {
|
|
15892
|
+
const updateProgressHelper = percentComplete => {
|
|
15893
|
+
this.updateValueInMap(name, "progress", percentComplete);
|
|
15894
|
+
this.onProgress(name, percentComplete, ev);
|
|
15895
|
+
};
|
|
15896
|
+
if (ev.lengthComputable) {
|
|
15897
|
+
const percentComplete = (ev.loaded / ev.total) * 100;
|
|
15898
|
+
updateProgressHelper(percentComplete);
|
|
15899
|
+
}
|
|
15900
|
+
else {
|
|
15901
|
+
console.log("cant read progress");
|
|
15902
|
+
}
|
|
15903
|
+
};
|
|
15904
|
+
this.trackProgress = (name, remove = false) => {
|
|
15905
|
+
if (remove) {
|
|
15906
|
+
this.filesInProgress.delete(name);
|
|
15907
|
+
}
|
|
15908
|
+
else {
|
|
15909
|
+
this.filesInProgress.set(name, "inprogress");
|
|
15910
|
+
}
|
|
15911
|
+
if (this.filesInProgress.size === 0) {
|
|
15912
|
+
this.onDone();
|
|
15913
|
+
}
|
|
15914
|
+
};
|
|
15915
|
+
this.getFilesAsArray = () => {
|
|
15916
|
+
const filesInQueue = [];
|
|
15917
|
+
const filesInError = [];
|
|
15918
|
+
this.files.forEach(value => {
|
|
15919
|
+
if (value.valid && !value.deleted) {
|
|
15920
|
+
filesInQueue.push(value);
|
|
15921
|
+
}
|
|
15922
|
+
else if (!value.valid && !value.deleted) {
|
|
15923
|
+
filesInError.push(value);
|
|
15924
|
+
}
|
|
15925
|
+
});
|
|
15926
|
+
return { valid: filesInQueue, invalid: filesInError };
|
|
15927
|
+
};
|
|
15928
|
+
this.resetFormFields = () => {
|
|
15929
|
+
/**
|
|
15930
|
+
* You cannot modify a FileList, nor remove single items from it
|
|
15931
|
+
* This completely removes all items in the FileList
|
|
15932
|
+
* We reset the form fields to always be able to re-upload files
|
|
15933
|
+
* and because we handle all uploads and states internally in the component (not relying on native form elements)
|
|
15934
|
+
*/
|
|
15935
|
+
/* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
|
|
15936
|
+
* 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
|
|
15937
|
+
* TODO: but for now we'll just reset the form fields
|
|
15938
|
+
*/
|
|
15939
|
+
this.nativeInput.value = "";
|
|
15940
|
+
};
|
|
15941
|
+
this.startUpload = async (ev, metaData = undefined) => {
|
|
15942
|
+
await this.setFocus();
|
|
15943
|
+
this.metaData = metaData;
|
|
15944
|
+
this.nativeInput.click();
|
|
15945
|
+
this.onUpload(ev, metaData);
|
|
15946
|
+
ev.stopPropagation();
|
|
15947
|
+
ev.preventDefault();
|
|
15948
|
+
return;
|
|
15949
|
+
};
|
|
15950
|
+
/**
|
|
15951
|
+
* Eventlisteners for the XHR requests
|
|
15952
|
+
*/
|
|
15953
|
+
this.transferComplete = name => {
|
|
15954
|
+
this.updateValueInMap(name, "progress", 100, false);
|
|
15955
|
+
this.trackProgress(name, true);
|
|
15956
|
+
};
|
|
15957
|
+
this.transferDone = (xhr, name, status) => {
|
|
15958
|
+
this.updateValueInMap(name, "status", status, false);
|
|
15959
|
+
this.updateValueInMap(name, "uploaded", true, false);
|
|
15960
|
+
try {
|
|
15961
|
+
const response = JSON.parse(xhr.response);
|
|
15962
|
+
this.updateValueInMap(name, "url", response.url);
|
|
15963
|
+
}
|
|
15964
|
+
catch (e) {
|
|
15965
|
+
this.updateValueInMap(name, "url", null);
|
|
15966
|
+
console.error("Server did not respond with expected response {url: string}");
|
|
15967
|
+
}
|
|
15968
|
+
return;
|
|
15969
|
+
};
|
|
15970
|
+
this.transferDoneWithFailure = (xhr, name, status) => {
|
|
15971
|
+
try {
|
|
15972
|
+
const { error } = JSON.parse(xhr.response);
|
|
15973
|
+
this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
|
|
15974
|
+
}
|
|
15975
|
+
catch (e) {
|
|
15976
|
+
console.error("Server did not respond with expected response error:{message: string, type: int}");
|
|
15977
|
+
this.updateValueInMap(name, "error", { type: status }, false);
|
|
15978
|
+
}
|
|
15979
|
+
this.updateValueInMap(name, "valid", false, true);
|
|
15980
|
+
};
|
|
15981
|
+
this.transferFailed = name => {
|
|
15982
|
+
this.updateValueInMap(name, "error", getError("duet-upload-001"));
|
|
15983
|
+
};
|
|
15984
|
+
this.transferCanceled = name => {
|
|
15985
|
+
this.files.delete(name);
|
|
15986
|
+
this.validateTotals(name);
|
|
15987
|
+
this.kick();
|
|
15988
|
+
};
|
|
15989
|
+
this.validateTotals = (name) => {
|
|
15990
|
+
const isTotalSizeOverMaxSize = validateTotalSizeIsAboveMax(this.files, this.maxBytesTotal);
|
|
15991
|
+
const isTotalFileAmountAboveMax = validateTotalAmountIsAboveMax(this.files, this.maxFiles);
|
|
15992
|
+
if (isTotalSizeOverMaxSize && name) {
|
|
15993
|
+
this.updateValueInMap(name, "error", getError("duet-upload-202"), false);
|
|
15994
|
+
}
|
|
15995
|
+
if (isTotalFileAmountAboveMax && name) {
|
|
15996
|
+
this.updateValueInMap(name, "error", getError("duet-upload-301"), false);
|
|
15997
|
+
}
|
|
15998
|
+
this.bytesMaxReached = isTotalSizeOverMaxSize;
|
|
15999
|
+
this.fileMaxReached = isTotalFileAmountAboveMax;
|
|
16000
|
+
return {
|
|
16001
|
+
bytesMaxReached: isTotalSizeOverMaxSize,
|
|
16002
|
+
fileMaxReached: isTotalFileAmountAboveMax,
|
|
16003
|
+
};
|
|
16004
|
+
};
|
|
16005
|
+
this.onDelete = (key, ev) => {
|
|
16006
|
+
const deletedItem = this.files.get(key);
|
|
16007
|
+
this.files.delete(key);
|
|
16008
|
+
this.validateTotals();
|
|
16009
|
+
this.kick();
|
|
16010
|
+
this.duetDelete.emit({
|
|
16011
|
+
originalEvent: ev,
|
|
16012
|
+
data: { deletion: deletedItem },
|
|
16013
|
+
component: "duet-upload",
|
|
16014
|
+
});
|
|
16015
|
+
if (!this.external) {
|
|
16016
|
+
this.makeXHRDeleteRequest(deletedItem);
|
|
16017
|
+
}
|
|
16018
|
+
this.resetFormFields();
|
|
16019
|
+
};
|
|
16020
|
+
this.onCancel = (key, ev) => {
|
|
16021
|
+
const cancelledItem = this.files.get(key);
|
|
16022
|
+
this.files.delete(key);
|
|
16023
|
+
if (!this.external) {
|
|
16024
|
+
const { xhr } = cancelledItem;
|
|
16025
|
+
xhr.abort();
|
|
16026
|
+
}
|
|
16027
|
+
else {
|
|
16028
|
+
this.kick();
|
|
16029
|
+
}
|
|
16030
|
+
this.resetFormFields();
|
|
16031
|
+
this.duetCancel.emit({
|
|
16032
|
+
originalEvent: ev,
|
|
16033
|
+
data: { cancelled: cancelledItem },
|
|
16034
|
+
component: "duet-upload",
|
|
16035
|
+
});
|
|
16036
|
+
};
|
|
16037
|
+
this.onUpload = (ev, metaData) => {
|
|
16038
|
+
this.duetUpload.emit({
|
|
16039
|
+
originalEvent: ev,
|
|
16040
|
+
metaData,
|
|
16041
|
+
component: "duet-upload",
|
|
16042
|
+
});
|
|
16043
|
+
};
|
|
16044
|
+
this.onBlur = (ev) => {
|
|
16045
|
+
this.duetBlur.emit({
|
|
16046
|
+
originalEvent: ev,
|
|
16047
|
+
component: "duet-upload",
|
|
16048
|
+
});
|
|
16049
|
+
};
|
|
16050
|
+
this.onProgress = (key, percentComplete, ev) => {
|
|
16051
|
+
this.duetChange.emit({
|
|
16052
|
+
originalEvent: ev,
|
|
16053
|
+
data: {
|
|
16054
|
+
key,
|
|
16055
|
+
percentComplete,
|
|
16056
|
+
},
|
|
16057
|
+
component: "duet-upload",
|
|
16058
|
+
});
|
|
16059
|
+
};
|
|
16060
|
+
this.onFocus = (ev) => {
|
|
16061
|
+
this.duetFocus.emit({
|
|
16062
|
+
originalEvent: ev,
|
|
16063
|
+
component: "duet-upload",
|
|
16064
|
+
});
|
|
16065
|
+
};
|
|
16066
|
+
this.onDone = () => {
|
|
16067
|
+
this.duetDone.emit({
|
|
16068
|
+
component: "duet-upload",
|
|
16069
|
+
data: { files: this.files },
|
|
16070
|
+
});
|
|
16071
|
+
};
|
|
16072
|
+
}
|
|
16073
|
+
watchValidHandler(newValue, oldValue) {
|
|
16074
|
+
if (newValue !== oldValue) {
|
|
16075
|
+
this.kick();
|
|
16076
|
+
}
|
|
16077
|
+
}
|
|
16078
|
+
/**
|
|
16079
|
+
* Component lifecycle events.
|
|
16080
|
+
*/
|
|
16081
|
+
componentWillLoad() {
|
|
16082
|
+
if (typeof this.statusMessageLabel === "string") {
|
|
16083
|
+
this.internalStatusMessageLabel = sanitizeString(this.groups);
|
|
16084
|
+
}
|
|
16085
|
+
else {
|
|
16086
|
+
this.internalStatusMessageLabel = this.statusMessageLabel;
|
|
16087
|
+
}
|
|
16088
|
+
inheritGlobalTheme(this);
|
|
16089
|
+
this.listenForActionEvents();
|
|
16090
|
+
}
|
|
16091
|
+
componentWillRender() {
|
|
16092
|
+
// listen to the events from the component
|
|
16093
|
+
this.verifyValidity();
|
|
16094
|
+
}
|
|
16095
|
+
/**
|
|
16096
|
+
* XHR request utilities
|
|
16097
|
+
*/
|
|
16098
|
+
makeXHRPostRequest(data) {
|
|
16099
|
+
const xhr = new XMLHttpRequest();
|
|
16100
|
+
const name = data.get("name");
|
|
16101
|
+
xhr.upload.addEventListener("progress", ev => {
|
|
16102
|
+
this.updateProgress(ev, name);
|
|
16103
|
+
});
|
|
16104
|
+
xhr.upload.addEventListener("load", () => {
|
|
16105
|
+
this.transferComplete(name);
|
|
16106
|
+
});
|
|
16107
|
+
xhr.upload.addEventListener("error", () => {
|
|
16108
|
+
this.transferFailed(name);
|
|
16109
|
+
});
|
|
16110
|
+
xhr.upload.addEventListener("abort", () => {
|
|
16111
|
+
this.transferCanceled(name);
|
|
16112
|
+
});
|
|
16113
|
+
return makeXhrRequest({
|
|
16114
|
+
payload: { data, name },
|
|
16115
|
+
options: { type: "POST", uri: this.uri, xhr, argument: null, headers: null },
|
|
16116
|
+
onFailure: this.transferDoneWithFailure,
|
|
16117
|
+
onSuccess: this.transferDone,
|
|
16118
|
+
onProgress: this.trackProgress,
|
|
16119
|
+
});
|
|
16120
|
+
}
|
|
16121
|
+
makeXHRDeleteRequest(data) {
|
|
16122
|
+
const { uid, item } = data;
|
|
16123
|
+
const xhr = new XMLHttpRequest();
|
|
16124
|
+
// don't present server issues to user on deletes, just remove them from the visible list
|
|
16125
|
+
return makeXhrRequest({
|
|
16126
|
+
payload: { data: null, name },
|
|
16127
|
+
options: {
|
|
16128
|
+
type: "DELETE",
|
|
16129
|
+
xhr,
|
|
16130
|
+
uri: this.uri,
|
|
16131
|
+
arguments: `?key=${uid}&name=${item.name}`,
|
|
16132
|
+
headers: {
|
|
16133
|
+
"x-fileuid": uid,
|
|
16134
|
+
"x-filename": item.name,
|
|
16135
|
+
},
|
|
16136
|
+
},
|
|
16137
|
+
onFailure: this.transferDoneWithFailure,
|
|
16138
|
+
onSuccess: this.transferDone,
|
|
16139
|
+
onProgress: this.trackProgress,
|
|
16140
|
+
});
|
|
16141
|
+
}
|
|
16142
|
+
/**
|
|
16143
|
+
* Component event handling.
|
|
16144
|
+
*/
|
|
16145
|
+
async onChange(ev) {
|
|
16146
|
+
var _a;
|
|
16147
|
+
const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
|
|
16148
|
+
// FileList is a nice array like structure but
|
|
16149
|
+
// to ensure uniqueness of files we use a mapping structure and
|
|
16150
|
+
// key to the name (makes it easier to delete as well)
|
|
16151
|
+
if (selectedFiles) {
|
|
16152
|
+
for (const item of selectedFiles) {
|
|
16153
|
+
const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
|
|
16154
|
+
maxBytes: this.maxBytes,
|
|
16155
|
+
allowedExtensions: this.allowedExtensions,
|
|
16156
|
+
allowedMimetypes: this.allowedMimetypes,
|
|
16157
|
+
});
|
|
16158
|
+
const uid = this.genHashName();
|
|
16159
|
+
const fileListItem = {
|
|
16160
|
+
uid,
|
|
16161
|
+
item: item,
|
|
16162
|
+
size: item.size,
|
|
16163
|
+
meta: this.metaData,
|
|
16164
|
+
uploaded: false,
|
|
16165
|
+
valid,
|
|
16166
|
+
error: {
|
|
16167
|
+
type: valid ? undefined : errorType,
|
|
16168
|
+
message: valid ? undefined : errorMessage,
|
|
16169
|
+
system_message: valid ? undefined : errorSystem,
|
|
16170
|
+
},
|
|
16171
|
+
progress: 0,
|
|
16172
|
+
deleted: false,
|
|
16173
|
+
xhr: false,
|
|
16174
|
+
url: false,
|
|
16175
|
+
};
|
|
16176
|
+
this.files.set(item.name, fileListItem);
|
|
16177
|
+
// validate that we haven't hit any maxfiles or maxbytes limits before we upload
|
|
16178
|
+
const { bytesMaxReached, fileMaxReached } = this.validateTotals(item.name);
|
|
16179
|
+
if (bytesMaxReached) {
|
|
16180
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
16181
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
16182
|
+
}
|
|
16183
|
+
else if (fileMaxReached) {
|
|
16184
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
16185
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
16186
|
+
}
|
|
16187
|
+
else if (valid && !this.external) {
|
|
16188
|
+
// if all is well AND external file upload handling has not been set, start upload
|
|
16189
|
+
const data = new FormData();
|
|
16190
|
+
data.append("file", item);
|
|
16191
|
+
data.append("uid", uid);
|
|
16192
|
+
data.append("name", item.name);
|
|
16193
|
+
data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size, meta: fileListItem.meta }));
|
|
16194
|
+
try {
|
|
16195
|
+
fileListItem.xhr = await this.makeXHRPostRequest(data);
|
|
16196
|
+
}
|
|
16197
|
+
catch (e) {
|
|
16198
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
16199
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
16200
|
+
}
|
|
16201
|
+
}
|
|
16202
|
+
// kick the stat to force update
|
|
16203
|
+
this.kick();
|
|
16204
|
+
}
|
|
16205
|
+
}
|
|
16206
|
+
// reset the form, so that a user may upload a file again (with the same name)
|
|
16207
|
+
this.resetFormFields();
|
|
16208
|
+
// reset the internal metaData state
|
|
16209
|
+
this.metaData = undefined;
|
|
16210
|
+
this.duetChange.emit({
|
|
16211
|
+
originalEvent: ev,
|
|
16212
|
+
data: { files: this.files },
|
|
16213
|
+
component: "duet-upload",
|
|
16214
|
+
});
|
|
16215
|
+
}
|
|
16216
|
+
/**
|
|
16217
|
+
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
16218
|
+
* `input.focus()`.
|
|
16219
|
+
*/
|
|
16220
|
+
async setFocus(options) {
|
|
16221
|
+
if (this.nativeInput) {
|
|
16222
|
+
this.nativeInput.focus(options);
|
|
16223
|
+
}
|
|
16224
|
+
return;
|
|
16225
|
+
}
|
|
16226
|
+
/**
|
|
16227
|
+
* Method for invoking the upload sequence
|
|
16228
|
+
*/
|
|
16229
|
+
async upload(metaData = undefined) {
|
|
16230
|
+
await this.setFocus();
|
|
16231
|
+
this.metaData = metaData;
|
|
16232
|
+
this.nativeInput.click();
|
|
16233
|
+
return;
|
|
16234
|
+
}
|
|
16235
|
+
/**
|
|
16236
|
+
* Get list of files, divided in errors and valid sections
|
|
16237
|
+
*/
|
|
16238
|
+
async getFiles() {
|
|
16239
|
+
if (!this.files || this.files.size === 0) {
|
|
16240
|
+
return false;
|
|
16241
|
+
}
|
|
16242
|
+
return this.getFilesAsArray();
|
|
16243
|
+
}
|
|
16244
|
+
/**
|
|
16245
|
+
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
16246
|
+
*/
|
|
16247
|
+
async updateValue(item, key, value) {
|
|
16248
|
+
this.updateValueInMap(item, key, value);
|
|
16249
|
+
}
|
|
16250
|
+
/**
|
|
16251
|
+
* render() function
|
|
16252
|
+
* Always the last one in the class.
|
|
16253
|
+
*/
|
|
16254
|
+
render() {
|
|
16255
|
+
const identifier = this.identifier || this.uploadId;
|
|
16256
|
+
let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
|
|
16257
|
+
caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
|
|
16258
|
+
caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
|
|
16259
|
+
return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("duet-fieldset", { label: this.label, caption: caption }, hAsync("slot", { name: "header" }), !this.files.size && (hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
16260
|
+
"duet-upload-filelist-empty": !this.files.size,
|
|
16261
|
+
"duet-upload-filelist": true,
|
|
16262
|
+
"duet-upload-filelist-filled": this.files.size,
|
|
16263
|
+
}, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && hAsync("slot", { name: "fileheader" }), !!this.files.size && (hAsync("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.internalStatusMessageLabel })), !!this.files.size && (hAsync("duet-editable-table", { "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, alignment: this.alignment, items: this.convertToDuetEditableTableItems() })), !!this.files.size && hAsync("slot", { name: "filefooter" }), hAsync("duet-spacer", { size: "large" }), !this.hideButton && (hAsync("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle" }, this.buttonLabel)), hAsync("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (hAsync("duet-alert", null, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), hAsync("duet-spacer", { size: "medium" }), hAsync("duet-visually-hidden", null, hAsync("input", { ref: input => {
|
|
16264
|
+
this.nativeInput = input;
|
|
16265
|
+
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
16266
|
+
"duet-upload": true,
|
|
16267
|
+
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
16268
|
+
}
|
|
16269
|
+
get element() { return getElement(this); }
|
|
16270
|
+
static get watchers() { return {
|
|
16271
|
+
"valid": ["watchValidHandler"]
|
|
16272
|
+
}; }
|
|
16273
|
+
static get style() { return duetUploadCss; }
|
|
16274
|
+
static get cmpMeta() { return {
|
|
16275
|
+
"$flags$": 9,
|
|
16276
|
+
"$tagName$": "duet-upload",
|
|
16277
|
+
"$members$": {
|
|
16278
|
+
"accessibleActiveDescendant": [1, "accessible-active-descendant"],
|
|
16279
|
+
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
16280
|
+
"accessibleControls": [1, "accessible-controls"],
|
|
16281
|
+
"accessibleOwns": [1, "accessible-owns"],
|
|
16282
|
+
"external": [4],
|
|
16283
|
+
"hideButton": [4, "hide-upload-button"],
|
|
16284
|
+
"actions": [1],
|
|
16285
|
+
"uri": [1],
|
|
16286
|
+
"showLinks": [4, "show-links"],
|
|
16287
|
+
"caption": [1],
|
|
16288
|
+
"statusLabelDefaults": [1, "status-label-default"],
|
|
16289
|
+
"statusMessageLabel": [1, "status-message-label"],
|
|
16290
|
+
"buttonLabelDefaults": [1, "button-label-default"],
|
|
16291
|
+
"buttonLabel": [1, "button-label"],
|
|
16292
|
+
"accessibleButtonLabel": [1, "accessible-button-label"],
|
|
16293
|
+
"theme": [1025],
|
|
16294
|
+
"disabled": [516],
|
|
16295
|
+
"identifier": [1],
|
|
16296
|
+
"margin": [1],
|
|
16297
|
+
"required": [4],
|
|
16298
|
+
"groups": [1],
|
|
16299
|
+
"alignment": [1],
|
|
16300
|
+
"hideGroups": [4, "hide-table-labels"],
|
|
16301
|
+
"files": [1040],
|
|
16302
|
+
"valid": [1540],
|
|
16303
|
+
"labelDefaults": [1, "label-default"],
|
|
16304
|
+
"label": [1],
|
|
16305
|
+
"descriptionDefaults": [1, "description-default"],
|
|
16306
|
+
"description": [1],
|
|
16307
|
+
"fileListEmptyDefaults": [1, "list-empty-default"],
|
|
16308
|
+
"fileListEmpty": [1, "file-list-empty"],
|
|
16309
|
+
"error": [1],
|
|
16310
|
+
"name": [1],
|
|
16311
|
+
"maxBytes": [2, "max-bytes"],
|
|
16312
|
+
"maxBytesTotal": [2, "max-bytes-total"],
|
|
16313
|
+
"maxFiles": [2, "max-files"],
|
|
16314
|
+
"allowedExtensions": [1, "allowed-extensions"],
|
|
16315
|
+
"allowedMimetypes": [1, "allowed-mimetypes"],
|
|
16316
|
+
"multiple": [4],
|
|
16317
|
+
"limitSelection": [4, "limit-selection"],
|
|
16318
|
+
"value": [1025],
|
|
16319
|
+
"tick": [32],
|
|
16320
|
+
"setFocus": [64],
|
|
16321
|
+
"upload": [64],
|
|
16322
|
+
"getFiles": [64],
|
|
16323
|
+
"updateValue": [64]
|
|
16324
|
+
},
|
|
16325
|
+
"$listeners$": undefined,
|
|
16326
|
+
"$lazyBundleId$": "-",
|
|
16327
|
+
"$attrsToReflect$": [["disabled", "disabled"], ["valid", "valid"]]
|
|
16328
|
+
}; }
|
|
16329
|
+
}
|
|
16330
|
+
|
|
16331
|
+
class DuetUploadAriaStatus {
|
|
16332
|
+
constructor(hostRef) {
|
|
16333
|
+
registerInstance(this, hostRef);
|
|
16334
|
+
/**
|
|
16335
|
+
* State() variables
|
|
16336
|
+
*/
|
|
16337
|
+
this.statusMessage = null;
|
|
16338
|
+
/**
|
|
16339
|
+
* Status labels used in the component
|
|
16340
|
+
*/
|
|
16341
|
+
this.statusMessageLabel = null;
|
|
16342
|
+
/**
|
|
16343
|
+
* Adds accessible label that is read aloud
|
|
16344
|
+
*/
|
|
16345
|
+
this.accessibleAriaLive = "polite";
|
|
16346
|
+
/**
|
|
16347
|
+
* valid file amount
|
|
16348
|
+
*/
|
|
16349
|
+
this.valid = undefined;
|
|
16350
|
+
/**
|
|
16351
|
+
* total files
|
|
16352
|
+
*/
|
|
16353
|
+
this.total = undefined;
|
|
16354
|
+
/**
|
|
16355
|
+
* invalid file amount
|
|
16356
|
+
*/
|
|
16357
|
+
this.invalid = undefined;
|
|
16358
|
+
/**
|
|
16359
|
+
* valid file amount
|
|
16360
|
+
*/
|
|
16361
|
+
this.inprogress = undefined;
|
|
16362
|
+
/**
|
|
16363
|
+
* Private functions
|
|
16364
|
+
*/
|
|
16365
|
+
this.replacePlaceHolders = (statusString) => {
|
|
16366
|
+
const addFiles = (amount) => {
|
|
16367
|
+
return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
|
|
16368
|
+
};
|
|
16369
|
+
return statusString
|
|
16370
|
+
.replace("{filesUploaded}", addFiles(this.valid))
|
|
16371
|
+
.replace("{filesInProgress}", addFiles(this.inprogress))
|
|
16372
|
+
.replace("{filesTotal}", addFiles(this.total))
|
|
16373
|
+
.replace("{filesWithErrors}", addFiles(this.invalid));
|
|
16374
|
+
};
|
|
16375
|
+
this.getStatusMessage = () => {
|
|
16376
|
+
const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
|
|
16377
|
+
const hasErrors = this.invalid > 0;
|
|
16378
|
+
const isInProgress = this.inprogress > 0;
|
|
16379
|
+
const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
|
|
16380
|
+
const isDone = this.valid === this.total && !isInProgress && !hasErrors;
|
|
16381
|
+
const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
|
|
16382
|
+
if (isDone) {
|
|
16383
|
+
this.statusMessage = this.replacePlaceHolders(done);
|
|
16384
|
+
return;
|
|
16385
|
+
}
|
|
16386
|
+
else if (isInProgressWithErrors) {
|
|
16387
|
+
this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
|
|
16388
|
+
return;
|
|
16389
|
+
}
|
|
16390
|
+
else if (isInProgress) {
|
|
16391
|
+
this.statusMessage = this.replacePlaceHolders(inProgress);
|
|
16392
|
+
return;
|
|
16393
|
+
}
|
|
16394
|
+
else if (isDoneWithErrors) {
|
|
16395
|
+
this.statusMessage = this.replacePlaceHolders(doneWithErrors);
|
|
16396
|
+
return;
|
|
16397
|
+
}
|
|
16398
|
+
return;
|
|
16399
|
+
};
|
|
16400
|
+
}
|
|
16401
|
+
watchHandler(newValue, oldValue) {
|
|
16402
|
+
if (newValue !== oldValue) {
|
|
16403
|
+
this.getStatusMessage();
|
|
16404
|
+
}
|
|
16405
|
+
}
|
|
16406
|
+
/**
|
|
16407
|
+
* render() function
|
|
16408
|
+
* Always the last one in the class.
|
|
16409
|
+
*/
|
|
16410
|
+
render() {
|
|
16411
|
+
return (hAsync(Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, hAsync("duet-visually-hidden", null, this.statusMessage)));
|
|
16412
|
+
}
|
|
16413
|
+
static get watchers() { return {
|
|
16414
|
+
"valid": ["watchHandler"],
|
|
16415
|
+
"invalid": ["watchHandler"],
|
|
16416
|
+
"inprogress": ["watchHandler"],
|
|
16417
|
+
"total": ["watchHandler"]
|
|
16418
|
+
}; }
|
|
16419
|
+
static get cmpMeta() { return {
|
|
16420
|
+
"$flags$": 9,
|
|
16421
|
+
"$tagName$": "duet-upload-aria-status",
|
|
16422
|
+
"$members$": {
|
|
16423
|
+
"statusMessageLabel": [16],
|
|
16424
|
+
"accessibleAriaLive": [1, "accessible-aria-live"],
|
|
16425
|
+
"valid": [2],
|
|
16426
|
+
"total": [2],
|
|
16427
|
+
"invalid": [2],
|
|
16428
|
+
"inprogress": [2],
|
|
16429
|
+
"statusMessage": [32]
|
|
16430
|
+
},
|
|
16431
|
+
"$listeners$": undefined,
|
|
16432
|
+
"$lazyBundleId$": "-",
|
|
16433
|
+
"$attrsToReflect$": []
|
|
16434
|
+
}; }
|
|
16435
|
+
}
|
|
16436
|
+
|
|
14320
16437
|
const duetVisuallyHiddenCss = "/*!@:host*/.sc-duet-visually-hidden-h{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}";
|
|
14321
16438
|
|
|
14322
16439
|
class DuetVisuallyHidden {
|
|
@@ -14354,6 +16471,9 @@ registerComponents([
|
|
|
14354
16471
|
DuetCookieConsent,
|
|
14355
16472
|
DuetDatePicker,
|
|
14356
16473
|
DuetDivider,
|
|
16474
|
+
DuetEditableTable,
|
|
16475
|
+
DuetEditableTableButton,
|
|
16476
|
+
DuetEditableTableItem,
|
|
14357
16477
|
DuetEmptyState,
|
|
14358
16478
|
DuetFieldset,
|
|
14359
16479
|
DuetFooter,
|
|
@@ -14375,6 +16495,7 @@ registerComponents([
|
|
|
14375
16495
|
DuetNotificationDrawer,
|
|
14376
16496
|
DuetNumberInput,
|
|
14377
16497
|
DuetParagraph,
|
|
16498
|
+
DuetProgress,
|
|
14378
16499
|
DuetRadio,
|
|
14379
16500
|
DuetRadioGroup,
|
|
14380
16501
|
DuetRangeSlider,
|
|
@@ -14390,6 +16511,8 @@ registerComponents([
|
|
|
14390
16511
|
DuetToggle,
|
|
14391
16512
|
DuetTooltip,
|
|
14392
16513
|
DuetTray,
|
|
16514
|
+
DuetUpload,
|
|
16515
|
+
DuetUploadAriaStatus,
|
|
14393
16516
|
DuetVisuallyHidden,
|
|
14394
16517
|
]);
|
|
14395
16518
|
|