@duetds/components 4.30.1 → 4.33.1
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 +1531 -442
- package/lib/cjs/{dom-e89ebf90.js → dom-c850c8d7.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +4 -2
- package/lib/cjs/duet-badge.cjs.entry.js +2 -2
- package/lib/cjs/duet-button_2.cjs.entry.js +6 -5
- package/lib/cjs/duet-caption_4.cjs.entry.js +21 -15
- package/lib/cjs/duet-card.cjs.entry.js +6 -6
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +55 -25
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -2
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +23 -13
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +89 -0
- package/lib/cjs/duet-editable-table_4.cjs.entry.js +1445 -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 +4 -4
- package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +26 -10
- package/lib/cjs/duet-hero.cjs.entry.js +6 -6
- package/lib/cjs/duet-icon.cjs.entry.js +21 -19
- package/lib/cjs/duet-input_2.cjs.entry.js +7 -7
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-modal.cjs.entry.js +8 -7
- package/lib/cjs/duet-notification_2.cjs.entry.js +6 -5
- package/lib/cjs/duet-number-input.cjs.entry.js +36 -15
- 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 +6 -6
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +12 -6
- 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 +21 -10
- package/lib/cjs/duet-tray.cjs.entry.js +21 -10
- 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-7605778f.js → focus-utils-b609a7a5.js} +1 -1
- package/lib/cjs/{index-0c949193.js → index-9a57d969.js} +95 -77
- package/lib/cjs/{language-utils-70d6a9a4.js → language-utils-aa282901.js} +28 -9
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-0c8c175b.js → shadow-css-e3edeed1.js} +9 -10
- package/lib/cjs/{string-utils-a6de43d8.js → string-utils-267e3dbb.js} +7 -0
- package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
- 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 +16 -8
- package/lib/collection/components/duet-alert/duet-alert.js +12 -6
- package/lib/collection/components/duet-badge/duet-badge.css +1 -0
- package/lib/collection/components/duet-button/duet-button.js +17 -15
- package/lib/collection/components/duet-card/duet-card.css +30 -7
- package/lib/collection/components/duet-card/duet-card.js +4 -3
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.css +16 -3
- package/lib/collection/components/duet-choice/duet-choice.js +122 -36
- package/lib/collection/components/duet-choice-group/duet-choice-group.css +1 -0
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +4 -4
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +78 -43
- 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 +218 -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 +203 -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 +348 -0
- package/lib/collection/components/duet-footer/duet-footer.js +17 -15
- package/lib/collection/components/duet-grid/duet-grid.js +57 -6
- package/lib/collection/components/duet-grid-item/duet-grid-item.js +4 -4
- package/lib/collection/components/duet-header/duet-header.js +60 -35
- package/lib/collection/components/duet-heading/duet-heading.css +4 -0
- package/lib/collection/components/duet-heading/duet-heading.js +7 -6
- package/lib/collection/components/duet-hero/duet-hero.js +20 -15
- package/lib/collection/components/duet-icon/duet-icon.js +2 -6
- package/lib/collection/components/duet-icon/icon-utils.js +20 -13
- 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-label/duet-label.css +2 -0
- package/lib/collection/components/duet-link/duet-link.js +18 -19
- package/lib/collection/components/duet-logo/duet-logo.js +4 -4
- package/lib/collection/components/duet-modal/duet-modal.js +22 -17
- package/lib/collection/components/duet-notification/duet-notification.js +8 -8
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +20 -15
- package/lib/collection/components/duet-number-input/duet-number-input.js +153 -29
- 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-radio/duet-radio.js +6 -6
- 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-step/duet-step.js +8 -8
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +43 -12
- 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-tooltip/duet-tooltip.js +82 -20
- package/lib/collection/components/duet-tray/duet-tray.js +79 -17
- package/lib/collection/components/duet-upload/duet-upload.css +17 -86
- package/lib/collection/components/duet-upload/duet-upload.js +587 -164
- package/lib/collection/components/duet-upload/errorcodes.utils.js +16 -4
- 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/{duet-upload-validators.js → upload-validators.js} +0 -0
- package/lib/collection/components/duet-upload/xhr.helpers.js +2 -6
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +217 -0
- package/lib/collection/utils/fixture-utils.js +7 -5
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +26 -9
- package/lib/collection/utils/string-utils.js +6 -0
- package/lib/collection/utils/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +30 -0
- package/lib/custom-elements-bundle/index.js +1651 -730
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/p-00210a63.entry.js +4 -0
- package/lib/duet/{p-66dde4d2.entry.js → p-0205162d.entry.js} +1 -1
- package/lib/duet/{p-3dc9d15d.system.entry.js → p-020a2c42.system.entry.js} +1 -1
- package/lib/duet/{p-59a07cf9.entry.js → p-079795e5.entry.js} +1 -1
- package/lib/duet/p-09013a48.system.entry.js +4 -0
- package/lib/duet/p-0a89315d.entry.js +4 -0
- package/lib/duet/p-0d22396e.system.js +16 -0
- package/lib/duet/p-0e90f075.system.entry.js +4 -0
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/p-19d7d9d5.system.entry.js +4 -0
- package/lib/duet/p-1cbc6269.entry.js +4 -0
- package/lib/duet/p-2297d13f.system.entry.js +4 -0
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/p-2a822e91.system.entry.js +4 -0
- package/lib/duet/{p-f81d8534.entry.js → p-2fdcff82.entry.js} +1 -1
- package/lib/duet/p-3013c9bb.system.entry.js +4 -0
- package/lib/duet/p-3212a556.entry.js +4 -0
- package/lib/duet/{p-dee41056.system.entry.js → p-323643af.system.entry.js} +1 -1
- package/lib/duet/p-32b7397d.entry.js +4 -0
- package/lib/duet/{p-bd9a7d8f.js → p-35a3794e.js} +0 -0
- package/lib/duet/p-360086f8.entry.js +4 -0
- package/lib/duet/{p-f71f12ed.entry.js → p-37cda933.entry.js} +1 -1
- package/lib/duet/{p-62806bb6.system.entry.js → p-3ba62cf1.system.entry.js} +1 -1
- package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
- package/lib/duet/p-3fd9190b.system.entry.js +4 -0
- package/lib/duet/p-43847557.entry.js +4 -0
- package/lib/duet/{p-bbc229d8.system.entry.js → p-4b6e8558.system.entry.js} +1 -1
- package/lib/duet/p-4c5eedf8.entry.js +4 -0
- package/lib/duet/p-4c827f0d.entry.js +4 -0
- package/lib/duet/{p-de2be65b.system.js → p-51955fc0.system.js} +1 -1
- package/lib/duet/p-5cfc53f9.entry.js +4 -0
- package/lib/duet/p-5decc259.system.entry.js +4 -0
- package/lib/duet/p-5e0071d6.js +4 -0
- package/lib/duet/p-5e77432e.system.entry.js +4 -0
- package/lib/duet/{p-ce1374a4.system.entry.js → p-6024e484.system.entry.js} +1 -1
- package/lib/duet/p-68008644.entry.js +4 -0
- package/lib/duet/p-69385972.system.entry.js +4 -0
- package/lib/duet/p-6a4d85ed.system.entry.js +4 -0
- package/lib/duet/{p-f82709ba.entry.js → p-6a5ab3eb.entry.js} +1 -1
- package/lib/duet/p-6e363557.system.js +4 -0
- package/lib/duet/p-6e4b1c0d.entry.js +4 -0
- package/lib/duet/p-6f36f647.system.entry.js +4 -0
- package/lib/duet/p-6fa6c4fb.system.entry.js +4 -0
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/p-71a77368.system.entry.js +4 -0
- package/lib/duet/p-73f9db25.system.entry.js +4 -0
- package/lib/duet/p-74f4a0d8.system.entry.js +4 -0
- package/lib/duet/p-7530be48.system.entry.js +4 -0
- package/lib/duet/{p-36007600.entry.js → p-75edcaed.entry.js} +1 -1
- package/lib/duet/{p-d1817efe.system.entry.js → p-7a8597c2.system.entry.js} +1 -1
- package/lib/duet/{p-1cfe38b1.system.entry.js → p-85ad012a.system.entry.js} +1 -1
- package/lib/duet/{p-a321a98c.entry.js → p-85e52be8.entry.js} +1 -1
- package/lib/duet/p-8aaf3383.entry.js +4 -0
- package/lib/duet/p-986779fb.js +4 -0
- package/lib/duet/p-987edcd0.js +15 -0
- package/lib/duet/{p-35e45c19.system.js → p-9a945278.system.js} +1 -1
- package/lib/duet/p-9e79e033.entry.js +4 -0
- package/lib/duet/{p-7e108b7e.entry.js → p-9f35d682.entry.js} +1 -1
- package/lib/duet/{p-f71e337e.system.entry.js → p-a2a00146.system.entry.js} +1 -1
- package/lib/duet/p-a545398c.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/{p-4a7911fd.entry.js → p-af49d4f9.entry.js} +1 -1
- package/lib/duet/{p-1c41525a.entry.js → p-b25edbbe.entry.js} +1 -1
- package/lib/duet/p-b314348c.system.js +4 -0
- package/lib/duet/p-b4111e88.system.entry.js +4 -0
- package/lib/duet/p-b5c7d304.system.entry.js +4 -0
- package/lib/duet/p-b6e9860a.entry.js +4 -0
- package/lib/duet/p-ba18b56e.entry.js +4 -0
- package/lib/duet/p-bf4596bd.system.entry.js +4 -0
- package/lib/duet/{p-4265de16.system.entry.js → p-bf9f6d80.system.entry.js} +1 -1
- package/lib/duet/{p-fd98468a.system.js → p-c18a599e.system.js} +0 -0
- package/lib/duet/p-c1a1ea1b.js +4 -0
- package/lib/duet/p-c742856b.system.entry.js +4 -0
- package/lib/duet/p-cbdb9e98.system.entry.js +4 -0
- package/lib/duet/{p-27d538f7.system.entry.js → p-cf319832.system.entry.js} +1 -1
- package/lib/duet/p-d67fff56.entry.js +4 -0
- package/lib/duet/{p-031c2cd8.system.entry.js → p-dd76db9b.system.entry.js} +1 -1
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/{p-345ea4f2.system.entry.js → p-de5ec54e.system.entry.js} +1 -1
- package/lib/duet/p-df6f39a3.entry.js +4 -0
- package/lib/duet/p-e1dc86b5.system.js +4 -0
- package/lib/duet/p-e2596ea0.entry.js +4 -0
- package/lib/duet/p-e370c18b.entry.js +4 -0
- package/lib/duet/{p-e26116e0.system.entry.js → p-e48f3a32.system.entry.js} +1 -1
- package/lib/duet/p-e5031543.entry.js +4 -0
- package/lib/duet/p-e60ee8b0.entry.js +4 -0
- package/lib/duet/p-e70088d5.entry.js +4 -0
- package/lib/duet/p-e7b90769.system.entry.js +4 -0
- package/lib/duet/{p-a88df408.entry.js → p-e8123a53.entry.js} +1 -1
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/{p-2d2c45f9.entry.js → p-ef7251bf.entry.js} +1 -1
- package/lib/duet/p-f0cfe033.system.entry.js +4 -0
- package/lib/duet/p-f2a087a8.system.entry.js +4 -0
- package/lib/duet/p-f5a55b3c.entry.js +4 -0
- package/lib/duet/p-fd613733.entry.js +4 -0
- package/lib/esm/{dom-21034390.js → dom-58cd15f6.js} +1 -1
- package/lib/esm/duet-alert.entry.js +4 -2
- package/lib/esm/duet-badge.entry.js +2 -2
- package/lib/esm/duet-button_2.entry.js +6 -5
- package/lib/esm/duet-caption_4.entry.js +21 -15
- package/lib/esm/duet-card.entry.js +6 -6
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +56 -26
- package/lib/esm/duet-collapsible.entry.js +5 -2
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +23 -13
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table-button.entry.js +85 -0
- package/lib/esm/duet-editable-table_4.entry.js +1438 -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 +4 -4
- package/lib/esm/duet-grid_2.entry.js +52 -4
- package/lib/esm/duet-header_2.entry.js +26 -10
- package/lib/esm/duet-hero.entry.js +6 -6
- package/lib/esm/duet-icon.entry.js +21 -19
- package/lib/esm/duet-input_2.entry.js +7 -7
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +2 -2
- package/lib/esm/duet-modal.entry.js +8 -7
- package/lib/esm/duet-notification_2.entry.js +6 -5
- package/lib/esm/duet-number-input.entry.js +36 -15
- 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 +6 -6
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +12 -6
- 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 +21 -10
- package/lib/esm/duet-tray.entry.js +21 -10
- 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-0b12f0df.js → focus-utils-aeb6ca93.js} +1 -1
- package/lib/esm/{index-f70ddc7f.js → index-e8c7d36f.js} +94 -78
- package/lib/esm/{language-utils-ab9c3afc.js → language-utils-344d894c.js} +28 -10
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-31e2d504.js → shadow-css-7c726abb.js} +9 -10
- package/lib/esm/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +7 -1
- package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- 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-21034390.js → dom-58cd15f6.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 +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +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 +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +2 -2
- 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 +2 -2
- 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-aeb6ca93.js +4 -0
- package/lib/esm-es5/index-e8c7d36f.js +4 -0
- package/lib/esm-es5/language-utils-344d894c.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
- package/lib/esm-es5/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +1 -1
- package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
- package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
- package/lib/html.html-data.json +4906 -0
- package/lib/types/components/duet-alert/duet-alert.d.ts +2 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-choice/duet-choice.d.ts +24 -5
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +15 -9
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
- package/lib/types/components/duet-footer/duet-footer.d.ts +1 -1
- package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
- package/lib/types/components/duet-header/duet-header.d.ts +21 -5
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-hero/duet-hero.d.ts +3 -3
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-icon/icon-utils.d.ts +1 -1
- package/lib/types/components/duet-link/duet-link.d.ts +2 -3
- package/lib/types/components/duet-modal/duet-modal.d.ts +3 -3
- package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +3 -3
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +21 -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-tab-group/duet-tab-group.d.ts +6 -0
- package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +11 -0
- package/lib/types/components/duet-tray/duet-tray.d.ts +11 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +124 -31
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +1 -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/{duet-upload-validators.d.ts → upload-validators.d.ts} +0 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +7 -1
- package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +49 -0
- package/lib/types/components.d.ts +619 -87
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +8 -3
- package/lib/types/utils/string-utils.d.ts +1 -0
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +20 -15
- package/lib/cjs/duet-table.cjs.entry.js +0 -132
- package/lib/cjs/duet-upload.cjs.entry.js +0 -866
- package/lib/collection/components/duet-upload/duet-upload-file-list.js +0 -49
- package/lib/duet/p-0733c303.system.entry.js +0 -4
- package/lib/duet/p-095060cc.js +0 -4
- package/lib/duet/p-156864a1.system.entry.js +0 -4
- package/lib/duet/p-15c15c6a.js +0 -15
- package/lib/duet/p-1911dfe7.system.entry.js +0 -4
- package/lib/duet/p-2834a302.entry.js +0 -4
- package/lib/duet/p-28a3d38f.system.entry.js +0 -4
- package/lib/duet/p-2a1a9f9f.entry.js +0 -4
- package/lib/duet/p-2a4d7c5b.system.entry.js +0 -4
- package/lib/duet/p-4095dba5.entry.js +0 -4
- package/lib/duet/p-418b2ce7.system.js +0 -4
- package/lib/duet/p-4289b543.entry.js +0 -4
- package/lib/duet/p-43e39d98.system.js +0 -4
- package/lib/duet/p-46a3ae43.system.js +0 -4
- package/lib/duet/p-4a38cf9d.entry.js +0 -4
- package/lib/duet/p-4be8e814.entry.js +0 -4
- package/lib/duet/p-591b2137.entry.js +0 -4
- package/lib/duet/p-5c5bdb06.system.entry.js +0 -4
- package/lib/duet/p-5f70e318.entry.js +0 -4
- package/lib/duet/p-62c294d6.system.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-6c2729da.js +0 -4
- package/lib/duet/p-6f107847.system.entry.js +0 -4
- package/lib/duet/p-77a5fe4c.system.js +0 -4
- package/lib/duet/p-7809e78b.system.entry.js +0 -4
- package/lib/duet/p-7a36d76f.system.entry.js +0 -4
- package/lib/duet/p-7ee52f58.entry.js +0 -4
- package/lib/duet/p-884693f1.entry.js +0 -4
- package/lib/duet/p-8977b722.entry.js +0 -4
- package/lib/duet/p-89db3b94.entry.js +0 -4
- package/lib/duet/p-8cfce39e.system.entry.js +0 -4
- package/lib/duet/p-8ffe1461.system.entry.js +0 -4
- package/lib/duet/p-9381c2d4.entry.js +0 -4
- package/lib/duet/p-9a450c9a.entry.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-9bbfe606.system.entry.js +0 -4
- package/lib/duet/p-a0a066cb.system.entry.js +0 -4
- package/lib/duet/p-a6096b05.system.entry.js +0 -4
- package/lib/duet/p-a89d5d7c.entry.js +0 -4
- package/lib/duet/p-b07055fd.system.entry.js +0 -4
- package/lib/duet/p-b4374f0e.entry.js +0 -4
- package/lib/duet/p-b456d684.system.entry.js +0 -4
- package/lib/duet/p-bd18c93f.js +0 -4
- package/lib/duet/p-bddb1c15.system.entry.js +0 -4
- package/lib/duet/p-c0b95b58.entry.js +0 -4
- package/lib/duet/p-c3688975.entry.js +0 -4
- package/lib/duet/p-c4d183e6.entry.js +0 -4
- package/lib/duet/p-c9303f9a.entry.js +0 -4
- package/lib/duet/p-cd4e8ccf.js +0 -4
- package/lib/duet/p-ceb75b35.system.entry.js +0 -4
- package/lib/duet/p-cf243bcb.system.entry.js +0 -4
- package/lib/duet/p-d37c8a05.system.js +0 -4
- package/lib/duet/p-d989af11.entry.js +0 -4
- package/lib/duet/p-e58ca7af.system.js +0 -16
- package/lib/duet/p-e6128d82.system.entry.js +0 -4
- package/lib/duet/p-e86cdc17.entry.js +0 -4
- package/lib/duet/p-eadb29c7.entry.js +0 -4
- package/lib/duet/p-f30b14d6.system.entry.js +0 -4
- package/lib/duet/p-f79f8da1.entry.js +0 -4
- package/lib/duet/p-fc397e03.system.entry.js +0 -4
- package/lib/esm/duet-table.entry.js +0 -128
- package/lib/esm/duet-upload.entry.js +0 -862
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-table.entry.js +0 -4
- package/lib/esm-es5/duet-upload.entry.js +0 -4
- package/lib/esm-es5/focus-utils-0b12f0df.js +0 -4
- package/lib/esm-es5/index-f70ddc7f.js +0 -4
- package/lib/esm-es5/language-utils-ab9c3afc.js +0 -4
- package/lib/esm-es5/shadow-css-31e2d504.js +0 -15
- package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
- package/lib/esm-es5/watch-options-de55ea78.js +0 -4
- package/lib/types/components/duet-upload/duet-upload-file-list.d.ts +0 -9
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
const NAMESPACE = 'duet';
|
|
5
|
+
const Env = /* duet */ {"cdnURILocal":"http://0.0.0.0:3334","cdnURIProd":"https://cdn.duetds.com/api","duetIconVersion":"2.2.4"};
|
|
5
6
|
|
|
6
7
|
let scopeId;
|
|
7
8
|
let contentRef;
|
|
@@ -13,6 +14,8 @@ let isSvgMode = false;
|
|
|
13
14
|
let queuePending = false;
|
|
14
15
|
const win = typeof window !== 'undefined' ? window : {};
|
|
15
16
|
const doc = win.document || { head: {} };
|
|
17
|
+
const H = (win.HTMLElement || class {
|
|
18
|
+
});
|
|
16
19
|
const plt = {
|
|
17
20
|
$flags$: 0,
|
|
18
21
|
$resourcesUrl$: '',
|
|
@@ -391,7 +394,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
391
394
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
392
395
|
if (memberName === 'list') {
|
|
393
396
|
isProp = false;
|
|
394
|
-
// tslint:disable-next-line: triple-equals
|
|
395
397
|
}
|
|
396
398
|
else if (oldValue == null || elm[memberName] != n) {
|
|
397
399
|
elm[memberName] = n;
|
|
@@ -1321,14 +1323,14 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1321
1323
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1322
1324
|
plt.jmp(() => {
|
|
1323
1325
|
const propName = attrNameToPropName.get(attrName);
|
|
1324
|
-
// In a
|
|
1326
|
+
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1325
1327
|
// in the case where an attribute was set inline.
|
|
1326
1328
|
// ```html
|
|
1327
1329
|
// <my-component some-attribute="some-value"></my-component>
|
|
1328
1330
|
// ```
|
|
1329
1331
|
//
|
|
1330
|
-
// There is an edge case where a developer sets the attribute inline on a custom element and then
|
|
1331
|
-
// changes it before it has been upgraded as shown below:
|
|
1332
|
+
// There is an edge case where a developer sets the attribute inline on a custom element and then
|
|
1333
|
+
// programmatically changes it before it has been upgraded as shown below:
|
|
1332
1334
|
//
|
|
1333
1335
|
// ```html
|
|
1334
1336
|
// <!-- this component has _not_ been upgraded yet -->
|
|
@@ -1338,13 +1340,13 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1338
1340
|
// el = document.querySelector("#test");
|
|
1339
1341
|
// el.someAttribute = "another-value";
|
|
1340
1342
|
// // upgrade component
|
|
1341
|
-
//
|
|
1343
|
+
// customElements.define('my-component', MyComponent);
|
|
1342
1344
|
// </script>
|
|
1343
1345
|
// ```
|
|
1344
1346
|
// In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1345
1347
|
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1346
1348
|
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1347
|
-
// the connectedCallback attempts to unshadow it will use "some-value" as the
|
|
1349
|
+
// the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
|
|
1348
1350
|
//
|
|
1349
1351
|
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
|
|
1350
1352
|
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
@@ -1358,6 +1360,14 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1358
1360
|
newValue = this[propName];
|
|
1359
1361
|
delete this[propName];
|
|
1360
1362
|
}
|
|
1363
|
+
else if (prototype.hasOwnProperty(propName) &&
|
|
1364
|
+
typeof this[propName] === 'number' &&
|
|
1365
|
+
this[propName] == newValue) {
|
|
1366
|
+
// if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
|
|
1367
|
+
// APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
|
|
1368
|
+
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1369
|
+
return;
|
|
1370
|
+
}
|
|
1361
1371
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1362
1372
|
});
|
|
1363
1373
|
};
|
|
@@ -1407,7 +1417,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1407
1417
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1408
1418
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1409
1419
|
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
1410
|
-
// this is the
|
|
1420
|
+
// this is the initial load and this component it has an ancestor component
|
|
1411
1421
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
1412
1422
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
1413
1423
|
// this will get fired off when the ancestor component
|
|
@@ -1535,18 +1545,23 @@ const proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
1535
1545
|
originalDisconnectedCallback.call(this);
|
|
1536
1546
|
}
|
|
1537
1547
|
},
|
|
1548
|
+
__attachShadow() {
|
|
1549
|
+
if (supportsShadow) {
|
|
1550
|
+
{
|
|
1551
|
+
this.attachShadow({
|
|
1552
|
+
mode: 'open',
|
|
1553
|
+
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
else {
|
|
1558
|
+
this.shadowRoot = this;
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1538
1561
|
});
|
|
1539
1562
|
Cstr.is = cmpMeta.$tagName$;
|
|
1540
1563
|
return proxyComponent(Cstr, cmpMeta);
|
|
1541
1564
|
};
|
|
1542
|
-
const attachShadow = (el) => {
|
|
1543
|
-
if (supportsShadow) {
|
|
1544
|
-
el.attachShadow({ mode: 'open' });
|
|
1545
|
-
}
|
|
1546
|
-
else {
|
|
1547
|
-
el.shadowRoot = el;
|
|
1548
|
-
}
|
|
1549
|
-
};
|
|
1550
1565
|
const setAssetPath = (path) => (plt.$resourcesUrl$ = path);
|
|
1551
1566
|
const setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
1552
1567
|
const Fragment = (_, children) => children;
|
|
@@ -1644,6 +1659,51 @@ const appGlobalScript = () => {
|
|
|
1644
1659
|
|
|
1645
1660
|
const globalScripts = appGlobalScript;
|
|
1646
1661
|
|
|
1662
|
+
function isObject(maybeObj) {
|
|
1663
|
+
return Object.prototype.toString.call(maybeObj) === "[object Object]";
|
|
1664
|
+
}
|
|
1665
|
+
const parsePossibleJSON = (maybeJSON) => {
|
|
1666
|
+
if (Array.isArray(maybeJSON) || isObject(maybeJSON)) {
|
|
1667
|
+
return maybeJSON;
|
|
1668
|
+
}
|
|
1669
|
+
if (typeof maybeJSON === "string") {
|
|
1670
|
+
try {
|
|
1671
|
+
return JSON.parse(maybeJSON);
|
|
1672
|
+
}
|
|
1673
|
+
catch (e) {
|
|
1674
|
+
console.warn(e);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
// undefined is not a type in JSON,
|
|
1678
|
+
// so we use it here to signal invalid input
|
|
1679
|
+
return undefined;
|
|
1680
|
+
};
|
|
1681
|
+
/**
|
|
1682
|
+
* Format string, via simplistic sprintf equivalent
|
|
1683
|
+
* @example String.format('{0} is super, but {1} is best! {{0}}', 'Duet', 'Coffee'); -> "Duet is super, but Coffee ist best! {0}"
|
|
1684
|
+
*
|
|
1685
|
+
*/
|
|
1686
|
+
// @ts-ignore
|
|
1687
|
+
if (!String.format) {
|
|
1688
|
+
// @ts-ignore
|
|
1689
|
+
String.format = function (format) {
|
|
1690
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
1691
|
+
return format.replace(/\{\{|\}\}|\{(\d+)\}/g, function (curlyBrack, index) {
|
|
1692
|
+
return curlyBrack == "{{" ? "{" : curlyBrack == "}}" ? "}" : args[index];
|
|
1693
|
+
});
|
|
1694
|
+
};
|
|
1695
|
+
}
|
|
1696
|
+
const MATCH_DISALLOWED_CHARS = /[^a-z0-9áéíóúñüöäå \.,_-]/gim;
|
|
1697
|
+
function sanitizeString$1(string) {
|
|
1698
|
+
return string.replace(MATCH_DISALLOWED_CHARS, "").trim();
|
|
1699
|
+
}
|
|
1700
|
+
const convertHtmlQuotes = string => {
|
|
1701
|
+
if (typeof string === "string") {
|
|
1702
|
+
return string.replace(/"/g, '"').replace(/'/g, '"');
|
|
1703
|
+
}
|
|
1704
|
+
return string;
|
|
1705
|
+
};
|
|
1706
|
+
|
|
1647
1707
|
const localeLookUpTable = {
|
|
1648
1708
|
fi: "fi-FI",
|
|
1649
1709
|
en: "en-GB",
|
|
@@ -1658,13 +1718,13 @@ const localeMonetarySignifierLookUpTable = {
|
|
|
1658
1718
|
};
|
|
1659
1719
|
const defLanguageArray = ["fi", "en", "sv"];
|
|
1660
1720
|
const defaultLanguage = "fi";
|
|
1661
|
-
const
|
|
1662
|
-
? document.documentElement.lang.toLowerCase()
|
|
1663
|
-
|
|
1721
|
+
const getCurrentLanguage = () => {
|
|
1722
|
+
return document.documentElement.lang ? document.documentElement.lang.toLowerCase() : defaultLanguage;
|
|
1723
|
+
};
|
|
1664
1724
|
const isOfTypeLanguage = (keyInput) => {
|
|
1665
1725
|
return defLanguageArray.includes(keyInput);
|
|
1666
1726
|
};
|
|
1667
|
-
const checkForLanguage = (languageString =
|
|
1727
|
+
const checkForLanguage = (languageString = getCurrentLanguage()) => {
|
|
1668
1728
|
if (isOfTypeLanguage(languageString)) {
|
|
1669
1729
|
return languageString;
|
|
1670
1730
|
}
|
|
@@ -1678,7 +1738,7 @@ const checkForLanguage = (languageString = currentLanguage) => {
|
|
|
1678
1738
|
* @param {string} lang=fi - "fi" | "sv" | "en"
|
|
1679
1739
|
* @default {string} "fi"
|
|
1680
1740
|
*/
|
|
1681
|
-
const getLanguage = (languageString =
|
|
1741
|
+
const getLanguage = (languageString = getCurrentLanguage()) => checkForLanguage(languageString);
|
|
1682
1742
|
/**
|
|
1683
1743
|
* Returns the current language and locale
|
|
1684
1744
|
* If language is not fi|sv|en it will default to "fi"
|
|
@@ -1696,21 +1756,37 @@ const getLocale = (lang) => {
|
|
|
1696
1756
|
}
|
|
1697
1757
|
throw new Error(`Locale for "${lang}" not found`);
|
|
1698
1758
|
};
|
|
1759
|
+
/**
|
|
1760
|
+
* Takes any json object that is passed and/or htmlencoded and converts it to proper json
|
|
1761
|
+
*/
|
|
1762
|
+
const sanitizeString = (string) => {
|
|
1763
|
+
const argIsString = typeof string === "string";
|
|
1764
|
+
if (argIsString) {
|
|
1765
|
+
try {
|
|
1766
|
+
return JSON.parse(convertHtmlQuotes(string));
|
|
1767
|
+
}
|
|
1768
|
+
catch (e) {
|
|
1769
|
+
console.log("sanitizeString received a string, that didnt parse to json object", string, e);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
return string;
|
|
1773
|
+
};
|
|
1699
1774
|
/**
|
|
1700
1775
|
* Returns the current string / object from a given translation object
|
|
1701
1776
|
* If language is not fi|sv|en it will default to "fi"
|
|
1702
1777
|
* special case where lang can be ALSO be "us" in addition to other types - if user decides to override local language
|
|
1703
|
-
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"}
|
|
1778
|
+
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
|
|
1704
1779
|
* @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
|
|
1705
1780
|
* @default {object} {locale: "fi-FI", money: "€"}
|
|
1706
|
-
* @returns {(string|Object)} given example contains {fi:"something"} and
|
|
1781
|
+
* @returns {(string|Object)} given example contains {fi:"something"} and language===fi this will return "something"
|
|
1707
1782
|
*/
|
|
1708
1783
|
const getLocaleString = (langObject, languageOverride) => {
|
|
1784
|
+
const obj = sanitizeString(langObject);
|
|
1709
1785
|
if (languageOverride) {
|
|
1710
|
-
return
|
|
1786
|
+
return obj[checkForLanguage(languageOverride)];
|
|
1711
1787
|
}
|
|
1712
1788
|
else {
|
|
1713
|
-
return
|
|
1789
|
+
return obj[getLanguage()];
|
|
1714
1790
|
}
|
|
1715
1791
|
};
|
|
1716
1792
|
|
|
@@ -1722,11 +1798,11 @@ const inheritGlobalTheme = (component) => {
|
|
|
1722
1798
|
|
|
1723
1799
|
const duetAlertCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;max-height:999px;border-radius:4px;transition:opacity 300ms ease, visibility 300ms ease, transform 300ms ease, max-height 300ms ease}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}:host(.duet-alert-is-dismissed){max-height:0;visibility:hidden;opacity:0;transform:scale(0.98)}:host(.duet-alert-is-dismissed) .duet-alert{margin:0 !important}.duet-alert{margin-bottom:16px !important;position:relative;width:100%;padding:16px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;background:#f2f8fb;border:1px solid #0077b3;border-radius:4px;transition:margin 100ms 300ms ease}.duet-alert.duet-p-0{padding:0 !important}.duet-alert.duet-m-0{margin:0 !important}.duet-alert.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;background:#f3f4f5;border-color:#171c3a}.duet-alert.warning{background:#fffbf4;border-color:#f7b228}.duet-alert.warning.duet-theme-turva{background:#fffaf3;border-color:#faa40f}.duet-alert.danger{background:#fdf4f7;border-color:#de2362}.duet-alert.danger.duet-theme-turva{background:#fdf4f3;border-color:#e02a0d}.duet-alert.success{background:#f2f9f7;border-color:#00875a}.duet-alert.success.duet-theme-turva{background:#f3f9f6;border-color:#08874e}.duet-alert-dismiss{position:absolute;top:2px;right:2px}.duet-alert-container{display:inline-flex;align-items:center;justify-content:center;width:100%;margin:0 auto !important}.duet-alert-container span{width:100%}.duet-alert-has-icon .duet-alert-container{margin-top:2px !important}.duet-alert-icon{display:inline-block;align-self:center;width:20px;min-width:20px;height:20px;margin:0 16px 0 0 !important}.duet-alert-icon duet-icon{width:20px;height:20px}.duet-alert-is-dismissible{padding:16px 48px 16px 16px;text-align:left}.duet-alert-is-dismissible .duet-alert-container{text-align:left}";
|
|
1724
1800
|
|
|
1725
|
-
let DuetAlert$1 = class extends
|
|
1801
|
+
let DuetAlert$1 = class extends H {
|
|
1726
1802
|
constructor() {
|
|
1727
1803
|
super();
|
|
1728
1804
|
this.__registerHost();
|
|
1729
|
-
|
|
1805
|
+
this.__attachShadow();
|
|
1730
1806
|
this.duetDismiss = createEvent$2(this, "duetDismiss", 7);
|
|
1731
1807
|
/**
|
|
1732
1808
|
* Theme of the card.
|
|
@@ -1740,6 +1816,7 @@ let DuetAlert$1 = class extends HTMLElement {
|
|
|
1740
1816
|
/**
|
|
1741
1817
|
* Property to change languageDefaults on the component.
|
|
1742
1818
|
* normally you would handle these strings on an application level and override @accessibleLabel when needed
|
|
1819
|
+
* @default {fi: "Sulje viesti", sv: "Stäng meddelandet", en: "Close the message"}
|
|
1743
1820
|
*/
|
|
1744
1821
|
this.accessibleLabelDefaults = {
|
|
1745
1822
|
fi: "Sulje viesti",
|
|
@@ -1819,13 +1896,13 @@ let DuetAlert$1 = class extends HTMLElement {
|
|
|
1819
1896
|
static get style() { return duetAlertCss; }
|
|
1820
1897
|
};
|
|
1821
1898
|
|
|
1822
|
-
const duetBadgeCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:4px !important;margin-bottom:2px !important;display:inline-block;width:auto;vertical-align:middle}:host:last-child,:host:last-of-type{margin-right:0 !important}:host(.duet-m-0){margin:0 !important}.duet-badge{width:100%;padding:4.4444444444px 12px 5.4444444444px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.75rem;font-style:normal;font-weight:600;line-height:1.25;color:#00294d;text-align:center;vertical-align:middle;background:#e6f1f7;border-radius:20rem}.duet-badge.duet-p-0{padding:0 !important}.duet-badge.duet-m-0{margin:0 !important}.duet-badge.duet-theme-turva{padding:5.4444444444px 12px 4.4444444444px;font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-weight:700;color:#171c3a;background:#e8e8eb}.duet-badge.warning{background:#fef3df}.duet-badge.warning.duet-theme-turva{background:#fef1db}.duet-badge.danger{background:#fce9ef}.duet-badge.danger.duet-theme-turva{background:#fceae7}.duet-badge.success{background:#e6f3ef}.duet-badge.success.duet-theme-turva{background:#e6f3ed}";
|
|
1899
|
+
const duetBadgeCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:4px !important;margin-bottom:2px !important;display:inline-block;width:auto;vertical-align:middle}:host:last-child,:host:last-of-type{margin-right:0 !important}:host(.duet-m-0){margin:0 !important}.duet-badge{width:100%;padding:4.4444444444px 12px 5.4444444444px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.75rem;font-style:normal;font-weight:600;line-height:1.25;color:#00294d;text-align:center;word-break:break-word;vertical-align:middle;background:#e6f1f7;border-radius:20rem}.duet-badge.duet-p-0{padding:0 !important}.duet-badge.duet-m-0{margin:0 !important}.duet-badge.duet-theme-turva{padding:5.4444444444px 12px 4.4444444444px;font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-weight:700;color:#171c3a;background:#e8e8eb}.duet-badge.warning{background:#fef3df}.duet-badge.warning.duet-theme-turva{background:#fef1db}.duet-badge.danger{background:#fce9ef}.duet-badge.danger.duet-theme-turva{background:#fceae7}.duet-badge.success{background:#e6f3ef}.duet-badge.success.duet-theme-turva{background:#e6f3ed}";
|
|
1823
1900
|
|
|
1824
|
-
let DuetBadge$1 = class extends
|
|
1901
|
+
let DuetBadge$1 = class extends H {
|
|
1825
1902
|
constructor() {
|
|
1826
1903
|
super();
|
|
1827
1904
|
this.__registerHost();
|
|
1828
|
-
|
|
1905
|
+
this.__attachShadow();
|
|
1829
1906
|
/**
|
|
1830
1907
|
* Theme of the badge.
|
|
1831
1908
|
*/
|
|
@@ -1980,6 +2057,7 @@ const sizeTappableSquare = "48px";
|
|
|
1980
2057
|
const sizeIconXSmall = "16px";
|
|
1981
2058
|
const sizeIconXxxSmall = "7px";
|
|
1982
2059
|
const sizeButtonBorder = "2px";
|
|
2060
|
+
const sizeButtonTinyBorder = "1px";
|
|
1983
2061
|
const sizeIconMedium = "24px";
|
|
1984
2062
|
const sizeIconSmall = "20px";
|
|
1985
2063
|
const opacity85 = "0.85";
|
|
@@ -2129,6 +2207,7 @@ const tokens$2 = /*#__PURE__*/Object.freeze({
|
|
|
2129
2207
|
sizeIconXSmall: sizeIconXSmall,
|
|
2130
2208
|
sizeIconXxxSmall: sizeIconXxxSmall,
|
|
2131
2209
|
sizeButtonBorder: sizeButtonBorder,
|
|
2210
|
+
sizeButtonTinyBorder: sizeButtonTinyBorder,
|
|
2132
2211
|
sizeIconMedium: sizeIconMedium,
|
|
2133
2212
|
sizeIconSmall: sizeIconSmall,
|
|
2134
2213
|
opacity85: opacity85,
|
|
@@ -2186,11 +2265,11 @@ function getColorByName(name) {
|
|
|
2186
2265
|
|
|
2187
2266
|
const duetButtonCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;position:relative;z-index:1;display:inline-flex;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}:host:last-child,:host:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host{width:100%}}:host(.duet-small){margin-right:2px !important;margin-bottom:8px !important}:host(.duet-small):last-child,:host(.duet-small):last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host(.duet-small){width:auto}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}:host(.duet-fixed){width:auto !important}:host(:last-child){margin-right:0 !important}.duet-button-container{position:relative;width:100%}.duet-button{padding:14px 27px 15px !important;-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;min-width:8rem;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#0077b3 !important;text-align:center;text-decoration:none;cursor:pointer;background:transparent;border-style:solid;border-width:2px;border-radius:20rem;transition:background-color 300ms ease, color 300ms ease, border 300ms ease, box-shadow 300ms ease}.duet-button.duet-p-0{padding:0 !important}.duet-button.duet-m-0{margin:0 !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only){padding:9px 19px 10px !important;min-width:5.3333333333rem;font-size:0.875rem}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon{padding-left:48px !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}.duet-theme-turva .duet-button{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30 !important}.duet-button .duet-button-contents{position:relative;display:inline-block;margin:0 auto;pointer-events:none}.duet-button.duet-no-wrap{white-space:nowrap}.duet-button.icon{padding-left:52px !important}.duet-button.icon-right{padding-right:52px !important;padding-left:28px !important}.duet-button svg{width:100%;min-width:100%;fill:currentColor}.duet-button .duet-button-icon{position:absolute;top:50%;left:-28px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 !important;transform:translateY(-50%)}.duet-button .duet-button-icon duet-icon{width:16px;height:16px}.duet-button .duet-button-icon.right{right:-28px;left:auto}.duet-button .duet-button-icon.large{left:-32px;width:20px;height:20px}.duet-button .duet-button-icon.large duet-icon{width:20px;height:20px}.duet-button .duet-button-icon.large.right{right:-32px;left:auto}.duet-button .duet-button-icon.medium-small{left:-16px;width:10px;height:10px;padding-top:1px}.duet-button .duet-button-icon.medium-small duet-icon{width:10px;height:10px}.duet-button .duet-button-icon.medium-small.right{right:-16px;left:auto}.duet-button .duet-button-icon.small{left:-16px;width:7px;height:7px}.duet-button .duet-button-icon.small duet-icon{width:7px;height:7px}.duet-button .duet-button-icon.small.right{right:-16px;left:auto}.duet-button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-button:active{opacity:0.75;transition:none}.duet-button.default{border-color:#e1e3e6}.duet-theme-turva .duet-button.default{color:#c60c30 !important;border-color:#e4e4e6}.duet-button.default:hover{border-color:#0077b3}.duet-theme-turva .duet-button.default:hover{border-color:#c60c30}.duet-button.default.duet-button-negative{background-color:white}.duet-theme-turva .duet-button.default.duet-button-negative{background-color:#e4e4e6 !important}.duet-button.default.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.default.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.primary{color:white !important;background:#0077b3;border-color:#0077b3}.duet-theme-turva .duet-button.primary{color:white !important;background:#c60c30;border-color:#c60c30}.duet-button.primary:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.primary:hover{background:#940925;border-color:#940925}.duet-button.primary:focus{outline:0;box-shadow:0 0 0 1px white, 0 0 0 4px rgba(0, 119, 179, 0.75)}.duet-theme-turva .duet-button.primary:focus{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}.duet-button.secondary{color:#00294d !important;background:transparent;border-color:#00294d}.duet-theme-turva .duet-button.secondary{color:#171c3a !important;border-color:#171c3a}.duet-button.secondary:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.secondary.duet-button-negative{color:#e1e3e6 !important;border-color:white}.duet-theme-turva .duet-button.secondary.duet-button-negative{color:#e4e4e6 !important}.duet-button.secondary.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.negative{color:#00294d !important;background:white;border-color:white}.duet-theme-turva .duet-button.negative{color:#171c3a !important}.duet-button.negative:hover{color:white !important;background:transparent;border-color:white}.duet-button.negative:focus{outline:0;box-shadow:0 0 0 1px #00294d, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-theme-turva .duet-button.negative:focus{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-button.destructive{color:#de2362 !important;background:white;border-color:#de2362}.duet-theme-turva .duet-button.destructive{color:#e02a0d !important;background:white;border-color:#e02a0d}.duet-button.destructive:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}.duet-theme-turva .duet-button.destructive:hover{color:white !important;background:#b3220a;border-color:#b3220a}.duet-button.plain{min-width:48px;padding-right:0 !important;padding-left:0 !important;line-height:1.5;text-align:left;background:transparent;border:0;border-color:transparent;border-radius:4px}.duet-theme-turva .duet-button.plain{color:#c60c30 !important;background:transparent;border-color:transparent}.duet-button.plain.icon{padding-left:20px !important}.duet-button.plain.icon.icon-right{padding-right:20px !important;padding-left:0 !important}.duet-button.plain.icon.medium{padding-left:24px !important}.duet-button.plain.icon.medium.icon-right{padding-right:24px !important;padding-left:0 !important}.duet-button.plain.icon.large{padding-left:30px !important}.duet-button.plain.icon.large.icon-right{padding-right:30px !important;padding-left:0 !important}.duet-button.plain .duet-button-icon.left{left:-16.6666666667px !important}.duet-button.plain .duet-button-icon.left.medium{left:-24px !important}.duet-button.plain .duet-button-icon.left.large{left:-30px !important}.duet-button.plain .duet-button-icon.right{right:-16.6666666667px !important}.duet-button.plain .duet-button-icon.right.medium{right:-24px !important}.duet-button.plain .duet-button-icon.right.large{right:-30px !important}.duet-button.plain[disabled]{color:#657787 !important;background:transparent !important;border-color:transparent !important}.duet-theme-turva .duet-button.plain[disabled]{color:transparent !important;background:transparent !important;border-color:#e4e4e6 !important}.duet-button.plain:hover{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-button.plain:hover{color:#940925 !important}.duet-button.plain.duet-button-negative{color:white !important}.duet-theme-turva .duet-button.plain.duet-button-negative{color:#e4e4e6 !important}.duet-button.plain.duet-button-negative:hover{color:#0077b3 !important}.duet-theme-turva .duet-button.plain.duet-button-negative:hover{color:#c60c30 !important}.duet-button.duet-button-icon-only{min-width:48px;min-height:48px;padding:0 !important}.duet-button.duet-button-icon-only .duet-button-contents{position:static}.duet-button.duet-button-icon-only .duet-button-icon.left.large,.duet-button.duet-button-icon-only .duet-button-icon.left.medium,.duet-button.duet-button-icon-only .duet-button-icon.left.small{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}.duet-button[disabled],.duet-button[disabled]:hover,.duet-button.duet-button-negative[disabled],.duet-button.duet-button-negative[disabled]:hover{color:#657787 !important;background:#e1e3e6 !important;border-color:#e1e3e6 !important;box-shadow:none !important}.duet-theme-turva .duet-button[disabled],.duet-theme-turva .duet-button[disabled]:hover,.duet-theme-turva .duet-button.duet-button-negative [disabled],.duet-theme-turva .duet-button.duet-button-negative [disabled]:hover{color:#747475 !important;background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-button-is-loading.primary{color:white}.duet-button-is-loading.default{color:#0077b3}.duet-button-is-loading.default.duet-theme-turva{color:#c60c30}.duet-button-is-loading .duet-button-contents{visibility:hidden;opacity:0}";
|
|
2188
2267
|
|
|
2189
|
-
let DuetButton$1 = class extends
|
|
2268
|
+
let DuetButton$1 = class extends H {
|
|
2190
2269
|
constructor() {
|
|
2191
2270
|
super();
|
|
2192
2271
|
this.__registerHost();
|
|
2193
|
-
|
|
2272
|
+
this.__attachShadow();
|
|
2194
2273
|
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
2195
2274
|
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
2196
2275
|
/**
|
|
@@ -2258,7 +2337,7 @@ let DuetButton$1 = class extends HTMLElement {
|
|
|
2258
2337
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
2259
2338
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
2260
2339
|
*/
|
|
2261
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults
|
|
2340
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
2262
2341
|
/**
|
|
2263
2342
|
* Icon to display to the left of the button content.
|
|
2264
2343
|
* This is ignored/overridden when button is used as an external link.
|
|
@@ -2421,11 +2500,11 @@ let DuetButton$1 = class extends HTMLElement {
|
|
|
2421
2500
|
|
|
2422
2501
|
const duetCaptionCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:flex;flex:0 0 100%;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#657787;vertical-align:top}:host.duet-p-0{padding:0 !important}:host.duet-m-0{margin:0 !important}:host(.duet-caption-small){font-size:0.875rem;line-height:1.25}:host(.duet-theme-turva){font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#747475}:host(.duet-caption-selected){color:#0077b3}:host(.duet-caption-selected.duet-theme-turva){color:#171c3a}:host(.duet-m-0){margin:0 !important}";
|
|
2423
2502
|
|
|
2424
|
-
let DuetCaption$1 = class extends
|
|
2503
|
+
let DuetCaption$1 = class extends H {
|
|
2425
2504
|
constructor() {
|
|
2426
2505
|
super();
|
|
2427
2506
|
this.__registerHost();
|
|
2428
|
-
|
|
2507
|
+
this.__attachShadow();
|
|
2429
2508
|
/**
|
|
2430
2509
|
* Theme of the caption.
|
|
2431
2510
|
*/
|
|
@@ -2485,52 +2564,13 @@ const isQuestionKey = (e) => e.key === "?";
|
|
|
2485
2564
|
const isEnterKey = (e) => e.key === "Enter" || e.keyCode === 13;
|
|
2486
2565
|
const isKeyboardClick = (e) => isEnterKey(e) || isSpaceKey(e);
|
|
2487
2566
|
|
|
2488
|
-
|
|
2489
|
-
return Object.prototype.toString.call(maybeObj) === "[object Object]";
|
|
2490
|
-
}
|
|
2491
|
-
const parsePossibleJSON = (maybeJSON) => {
|
|
2492
|
-
if (Array.isArray(maybeJSON) || isObject(maybeJSON)) {
|
|
2493
|
-
return maybeJSON;
|
|
2494
|
-
}
|
|
2495
|
-
if (typeof maybeJSON === "string") {
|
|
2496
|
-
try {
|
|
2497
|
-
return JSON.parse(maybeJSON);
|
|
2498
|
-
}
|
|
2499
|
-
catch (e) {
|
|
2500
|
-
console.warn(e);
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
// undefined is not a type in JSON,
|
|
2504
|
-
// so we use it here to signal invalid input
|
|
2505
|
-
return undefined;
|
|
2506
|
-
};
|
|
2507
|
-
/**
|
|
2508
|
-
* Format string, via simplistic sprintf equivalent
|
|
2509
|
-
* @example String.format('{0} is super, but {1} is best! {{0}}', 'Duet', 'Coffee'); -> "Duet is super, but Coffee ist best! {0}"
|
|
2510
|
-
*
|
|
2511
|
-
*/
|
|
2512
|
-
// @ts-ignore
|
|
2513
|
-
if (!String.format) {
|
|
2514
|
-
// @ts-ignore
|
|
2515
|
-
String.format = function (format) {
|
|
2516
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
2517
|
-
return format.replace(/\{\{|\}\}|\{(\d+)\}/g, function (curlyBrack, index) {
|
|
2518
|
-
return curlyBrack == "{{" ? "{" : curlyBrack == "}}" ? "}" : args[index];
|
|
2519
|
-
});
|
|
2520
|
-
};
|
|
2521
|
-
}
|
|
2522
|
-
const MATCH_DISALLOWED_CHARS = /[^a-z0-9áéíóúñüöäå \.,_-]/gim;
|
|
2523
|
-
function sanitizeString(string) {
|
|
2524
|
-
return string.replace(MATCH_DISALLOWED_CHARS, "").trim();
|
|
2525
|
-
}
|
|
2526
|
-
|
|
2527
|
-
const duetCardCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}:host(.duet-card-info){margin-bottom:16px !important}:host(.duet-m-0){margin:0 !important}.duet-card{padding:20px !important;position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:#00294d;text-decoration:none;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-card.duet-p-0{padding:0 !important}.duet-card.duet-m-0{margin:0 !important}.duet-card:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-card:focus,.duet-card:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 36em){.duet-card{padding:28px !important}}.duet-card.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}@media (min-width: 36em){.duet-card.x-small{padding:20px !important}}@media (min-width: 36em){.duet-card.medium{padding:28px !important}}@media (min-width: 48em){.duet-card.medium{padding:36px !important}}@media (min-width: 36em){.duet-card.large{padding:36px !important}}@media (min-width: 48em){.duet-card.large{padding:48px !important}}@media (min-width: 36em){.duet-card.x-large{padding:48px !important}}@media (min-width: 48em){.duet-card.x-large{padding:72px !important}}.duet-card.duet-card-collapsed{padding-bottom:0 !important}@media (min-width: 36em){.duet-card.duet-card-collapsed{padding-bottom:0 !important}}.duet-card.info{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}.duet-card.info.duet-theme-turva{background:rgba(23, 28, 58, 0.035) !important}.duet-card.plain{box-shadow:none}.duet-card.plain:not(.duet-card-has-bg){background:transparent !important}.duet-card-heading-grid{display:flex;align-items:center}.duet-card-heading-grid .expand{flex:1}.duet-card-heading-text{overflow:hidden;text-overflow:ellipsis}.duet-card-secondary-heading{font-size:1rem;font-weight:600}.duet-card-heading{position:relative;display:block;padding:16px 20px;margin:-20px -20px 20px;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:800;color:#00294d;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #e1e3e6}@media (min-width: 36em){.duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}.duet-card-heading[role=button]{-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:4px;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;appearance:none}.duet-card-heading[role=button]:focus{outline:0}:host(.user-is-tabbing) .duet-card-heading[role=button]:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-card-heading[role=button]:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-card-collapsed .duet-card-heading{margin-bottom:0 !important;border-bottom:0 !important}.duet-theme-turva .duet-card-heading{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6}@media (min-width: 36em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}.medium .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.medium .duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){.medium .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}.large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.large .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){.large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}.x-large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.x-large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){.x-large .duet-card-heading{padding:39px 72px 40px !important;margin:-72px -72px 48px}}.none .duet-card-heading{padding:0 0 20px !important;margin:0 0 20px}.duet-card-footer{padding:20px;margin:20px -20px -20px;font-size:0.875rem;line-height:1.25;background:#f5f8fa;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.duet-theme-turva .duet-card-footer{background:#f5f5f7}@media (min-width: 36em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){.x-small .duet-card-footer{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){.medium .duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.medium .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){.large .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){.large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){.x-large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){.x-large .duet-card-footer{padding:39px 72px 40px !important;margin:48px -72px -72px}}.none .duet-card-footer{padding:12px 0 !important;margin:20px 0 0}.duet-card-content{width:100%}.duet-card-collapsed .duet-card-content{display:none}.duet-card-caret{transition:300ms ease}[aria-expanded=false] .duet-card-caret{transform:rotate(-180deg)}.duet-card-image-mask{position:relative;width:calc(100% + 40px);margin:-20px 0 20px -20px;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.small .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){.medium .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){.medium .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){.large .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){.large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){.x-large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){.x-large .duet-card-image-mask{width:calc(100% + 144px);margin:-72px 0 36px -72px}}.none .duet-card-image-mask{width:100%;margin:0 0 20px}.duet-card-image{display:block;width:102%;min-width:1px;max-width:102%;height:auto;min-height:1px;margin-left:-1%;transition:transform 300ms ease;transform:scale(1.0001)}a.duet-card{transition:box-shadow 300ms ease, background-position 300ms ease}a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}a.duet-card:hover .duet-card-image{transform:scale(1.024)}.duet-theme-turva a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}a.duet-card:active{transition:none;transform:translateY(1px)}";
|
|
2567
|
+
const duetCardCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}:host(.duet-card-info){margin-bottom:16px !important}:host(.duet-m-0){margin:0 !important}.duet-card{padding:20px !important;position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:#00294d;text-decoration:none;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-card.duet-p-0{padding:0 !important}.duet-card.duet-m-0{margin:0 !important}.duet-card:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-card:focus,.duet-card:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 36em){.duet-card{padding:28px !important}}.duet-card.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}@media (min-width: 36em){.duet-card.x-small{padding:20px !important}}@media (min-width: 36em){.duet-card.medium{padding:28px !important}}@media (min-width: 48em){.duet-card.medium{padding:36px !important}}@media (min-width: 36em){.duet-card.large{padding:36px !important}}@media (min-width: 48em){.duet-card.large{padding:48px !important}}@media (min-width: 36em){.duet-card.x-large{padding:48px !important}}@media (min-width: 48em){.duet-card.x-large{padding:72px !important}}.duet-card.duet-card-collapsed{padding-bottom:0 !important}@media (min-width: 36em){.duet-card.duet-card-collapsed{padding-bottom:0 !important}}.duet-card.info{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}.duet-card.info.duet-theme-turva{background:rgba(23, 28, 58, 0.035) !important}.duet-card.plain{box-shadow:none}.duet-card.plain:not(.duet-card-has-bg){background:transparent !important}.duet-card-heading-grid{display:flex;flex-direction:row}.duet-card-icon{align-self:center}.duet-card-heading-text{flex:1;word-break:break-word}.duet-card-secondary-heading{font-size:1rem;font-weight:600;word-break:break-word}.duet-card-secondary-heading--inline{display:block;flex:1;align-self:flex-start;line-height:1.875;text-align:right}@media (max-width: 22.5em){.duet-card-secondary-heading--inline{display:none}}.duet-card-secondary-heading--new-line{display:none}@media (max-width: 22.5em){.duet-card-secondary-heading--new-line{display:block}}.duet-card-heading{position:relative;display:block;padding:16px 20px;margin:-20px -20px 20px;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:800;color:#00294d;border-bottom:1px solid #e1e3e6}@media (min-width: 36em){.duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}.duet-card-heading[role=button]{-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:4px;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;appearance:none}.duet-card-heading[role=button]:focus{outline:0}:host(.user-is-tabbing) .duet-card-heading[role=button]:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-card-heading[role=button]:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-card-collapsed .duet-card-heading{margin-bottom:0 !important;border-bottom:0 !important}.duet-theme-turva .duet-card-heading{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6}@media (min-width: 36em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){.x-small .duet-card-heading{padding:10px 20px 11px !important;margin:-20px -20px 20px}}.medium .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.medium .duet-card-heading{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){.medium .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}.large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.large .duet-card-heading{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){.large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}.x-large .duet-card-heading{margin:-20px -20px 20px}@media (min-width: 36em){.x-large .duet-card-heading{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){.x-large .duet-card-heading{padding:39px 72px 40px !important;margin:-72px -72px 48px}}.none .duet-card-heading{padding:0 0 20px !important;margin:0 0 20px}.duet-card-footer{padding:20px;margin:20px -20px -20px;font-size:0.875rem;line-height:1.25;background:#f5f8fa;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.duet-theme-turva .duet-card-footer{background:#f5f5f7}@media (min-width: 36em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){.x-small .duet-card-footer{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){.medium .duet-card-footer{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){.medium .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){.large .duet-card-footer{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){.large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){.x-large .duet-card-footer{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){.x-large .duet-card-footer{padding:39px 72px 40px !important;margin:48px -72px -72px}}.none .duet-card-footer{padding:12px 0 !important;margin:20px 0 0}.duet-card-content{width:100%}.duet-card-collapsed .duet-card-content{display:none}.duet-card-caret{position:relative;top:6px;align-self:flex-start;transition:300ms ease}[aria-expanded=false] .duet-card-caret{transform:rotate(-180deg)}.duet-card-image-mask{position:relative;width:calc(100% + 40px);margin:-20px 0 20px -20px;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.small .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){.medium .duet-card-image-mask{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){.medium .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){.large .duet-card-image-mask{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){.large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){.x-large .duet-card-image-mask{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){.x-large .duet-card-image-mask{width:calc(100% + 144px);margin:-72px 0 36px -72px}}.none .duet-card-image-mask{width:100%;margin:0 0 20px}.duet-card-image{display:block;width:102%;min-width:1px;max-width:102%;height:auto;min-height:1px;margin-left:-1%;transition:transform 300ms ease;transform:scale(1.0001)}a.duet-card{transition:box-shadow 300ms ease, background-position 300ms ease}a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}a.duet-card:hover .duet-card-image{transform:scale(1.024)}.duet-theme-turva a.duet-card:hover{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}a.duet-card:active{transition:none;transform:translateY(1px)}";
|
|
2528
2568
|
|
|
2529
|
-
let DuetCard$1 = class extends
|
|
2569
|
+
let DuetCard$1 = class extends H {
|
|
2530
2570
|
constructor() {
|
|
2531
2571
|
super();
|
|
2532
2572
|
this.__registerHost();
|
|
2533
|
-
|
|
2573
|
+
this.__attachShadow();
|
|
2534
2574
|
this.duetToggle = createEvent$2(this, "duetToggle", 7);
|
|
2535
2575
|
this.cardId = createID("DuetCard");
|
|
2536
2576
|
/**
|
|
@@ -2607,7 +2647,7 @@ let DuetCard$1 = class extends HTMLElement {
|
|
|
2607
2647
|
this.hasFooter = !!this.element.querySelector("[slot='footer']");
|
|
2608
2648
|
}
|
|
2609
2649
|
renderHeading() {
|
|
2610
|
-
const HeadingTag = sanitizeString(this.headingLevel);
|
|
2650
|
+
const HeadingTag = sanitizeString$1(this.headingLevel);
|
|
2611
2651
|
const headingProps = this.collapsible
|
|
2612
2652
|
? {
|
|
2613
2653
|
role: "button",
|
|
@@ -2618,7 +2658,7 @@ let DuetCard$1 = class extends HTMLElement {
|
|
|
2618
2658
|
onKeyDown: this.handleKeyDown,
|
|
2619
2659
|
}
|
|
2620
2660
|
: {};
|
|
2621
|
-
return (h$1(HeadingTag, Object.assign({ class: "duet-card-heading" }, headingProps), h$1("div", { class: "duet-card-heading-grid" }, this.icon && (h$1(Fragment, null, h$1("duet-icon", { class: "duet-card-icon", name: this.icon, size: "medium", margin: "none", color: "currentColor" }), h$1("duet-spacer", { direction: "horizontal", size: "small" }))), h$1("div", { class: "
|
|
2661
|
+
return (h$1(HeadingTag, Object.assign({ class: "duet-card-heading" }, headingProps), h$1("div", { class: "duet-card-heading-grid" }, this.icon && (h$1(Fragment, null, h$1("duet-icon", { class: "duet-card-icon", name: this.icon, size: "medium", margin: "none", color: "currentColor" }), h$1("duet-spacer", { direction: "horizontal", size: "small" }))), h$1("div", { class: "duet-card-heading-text" }, this.heading), this.secondaryHeading && (h$1(Fragment, null, h$1("duet-spacer", { direction: "horizontal", size: "small" }), h$1("div", { class: "duet-card-secondary-heading duet-card-secondary-heading--inline" }, this.secondaryHeading))), this.collapsible && (h$1(Fragment, null, h$1("duet-spacer", { direction: "horizontal", size: "small" }), h$1("duet-icon", { class: "duet-card-caret", icon: actionArrowUp.svg, size: "small", margin: "none", color: "currentColor" })))), this.secondaryHeading && (h$1("div", { class: "duet-card-secondary-heading duet-card-secondary-heading--new-line" }, this.secondaryHeading))));
|
|
2622
2662
|
}
|
|
2623
2663
|
/**
|
|
2624
2664
|
* Sets focus on the specified `duet-card`. Use this method instead of the global
|
|
@@ -2656,9 +2696,9 @@ let DuetCard$1 = class extends HTMLElement {
|
|
|
2656
2696
|
static get style() { return duetCardCss; }
|
|
2657
2697
|
};
|
|
2658
2698
|
|
|
2659
|
-
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-
|
|
2699
|
+
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}";
|
|
2660
2700
|
|
|
2661
|
-
let DuetCheckbox$1 = class extends
|
|
2701
|
+
let DuetCheckbox$1 = class extends H {
|
|
2662
2702
|
constructor() {
|
|
2663
2703
|
super();
|
|
2664
2704
|
this.__registerHost();
|
|
@@ -2764,18 +2804,171 @@ let DuetCheckbox$1 = class extends HTMLElement {
|
|
|
2764
2804
|
|
|
2765
2805
|
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>"};
|
|
2766
2806
|
|
|
2767
|
-
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-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important;position:relative;z-index:200;display:none;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:100%;height:100%;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);color:transparent}";
|
|
2807
|
+
const isComplexType = (o) => {
|
|
2808
|
+
// https://jsperf.com/typeof-fn-object/5
|
|
2809
|
+
o = typeof o;
|
|
2810
|
+
return o === 'object' || o === 'function';
|
|
2811
|
+
};
|
|
2812
|
+
/**
|
|
2813
|
+
* Production h() function based on Preact by
|
|
2814
|
+
* Jason Miller (@developit)
|
|
2815
|
+
* Licensed under the MIT License
|
|
2816
|
+
* https://github.com/developit/preact/blob/master/LICENSE
|
|
2817
|
+
*
|
|
2818
|
+
* Modified for Stencil's compiler and vdom
|
|
2819
|
+
*/
|
|
2820
|
+
// const stack: any[] = [];
|
|
2821
|
+
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
2822
|
+
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
2823
|
+
const h = (nodeName, vnodeData, ...children) => {
|
|
2824
|
+
let child = null;
|
|
2825
|
+
let key = null;
|
|
2826
|
+
let slotName = null;
|
|
2827
|
+
let simple = false;
|
|
2828
|
+
let lastSimple = false;
|
|
2829
|
+
let vNodeChildren = [];
|
|
2830
|
+
const walk = (c) => {
|
|
2831
|
+
for (let i = 0; i < c.length; i++) {
|
|
2832
|
+
child = c[i];
|
|
2833
|
+
if (Array.isArray(child)) {
|
|
2834
|
+
walk(child);
|
|
2835
|
+
}
|
|
2836
|
+
else if (child != null && typeof child !== 'boolean') {
|
|
2837
|
+
if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
|
|
2838
|
+
child = String(child);
|
|
2839
|
+
}
|
|
2840
|
+
if (simple && lastSimple) {
|
|
2841
|
+
// If the previous child was simple (string), we merge both
|
|
2842
|
+
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
2843
|
+
}
|
|
2844
|
+
else {
|
|
2845
|
+
// Append a new vNode, if it's text, we create a text vNode
|
|
2846
|
+
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
2847
|
+
}
|
|
2848
|
+
lastSimple = simple;
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
};
|
|
2852
|
+
walk(children);
|
|
2853
|
+
if (vnodeData) {
|
|
2854
|
+
// normalize class / classname attributes
|
|
2855
|
+
if (vnodeData.key) {
|
|
2856
|
+
key = vnodeData.key;
|
|
2857
|
+
}
|
|
2858
|
+
if (vnodeData.name) {
|
|
2859
|
+
slotName = vnodeData.name;
|
|
2860
|
+
}
|
|
2861
|
+
{
|
|
2862
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
2863
|
+
if (classData) {
|
|
2864
|
+
vnodeData.class =
|
|
2865
|
+
typeof classData !== 'object'
|
|
2866
|
+
? classData
|
|
2867
|
+
: Object.keys(classData)
|
|
2868
|
+
.filter((k) => classData[k])
|
|
2869
|
+
.join(' ');
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
if (typeof nodeName === 'function') {
|
|
2874
|
+
// nodeName is a functional component
|
|
2875
|
+
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
2876
|
+
}
|
|
2877
|
+
const vnode = newVNode(nodeName, null);
|
|
2878
|
+
vnode.$attrs$ = vnodeData;
|
|
2879
|
+
if (vNodeChildren.length > 0) {
|
|
2880
|
+
vnode.$children$ = vNodeChildren;
|
|
2881
|
+
}
|
|
2882
|
+
{
|
|
2883
|
+
vnode.$key$ = key;
|
|
2884
|
+
}
|
|
2885
|
+
{
|
|
2886
|
+
vnode.$name$ = slotName;
|
|
2887
|
+
}
|
|
2888
|
+
return vnode;
|
|
2889
|
+
};
|
|
2890
|
+
const newVNode = (tag, text) => {
|
|
2891
|
+
const vnode = {
|
|
2892
|
+
$flags$: 0,
|
|
2893
|
+
$tag$: tag,
|
|
2894
|
+
$text$: text,
|
|
2895
|
+
$elm$: null,
|
|
2896
|
+
$children$: null,
|
|
2897
|
+
};
|
|
2898
|
+
{
|
|
2899
|
+
vnode.$attrs$ = null;
|
|
2900
|
+
}
|
|
2901
|
+
{
|
|
2902
|
+
vnode.$key$ = null;
|
|
2903
|
+
}
|
|
2904
|
+
{
|
|
2905
|
+
vnode.$name$ = null;
|
|
2906
|
+
}
|
|
2907
|
+
return vnode;
|
|
2908
|
+
};
|
|
2909
|
+
const vdomFnUtils = {
|
|
2910
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
2911
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
2912
|
+
};
|
|
2913
|
+
const convertToPublic = (node) => ({
|
|
2914
|
+
vattrs: node.$attrs$,
|
|
2915
|
+
vchildren: node.$children$,
|
|
2916
|
+
vkey: node.$key$,
|
|
2917
|
+
vname: node.$name$,
|
|
2918
|
+
vtag: node.$tag$,
|
|
2919
|
+
vtext: node.$text$,
|
|
2920
|
+
});
|
|
2921
|
+
const convertToPrivate = (node) => {
|
|
2922
|
+
if (typeof node.vtag === 'function') {
|
|
2923
|
+
const vnodeData = Object.assign({}, node.vattrs);
|
|
2924
|
+
if (node.vkey) {
|
|
2925
|
+
vnodeData.key = node.vkey;
|
|
2926
|
+
}
|
|
2927
|
+
if (node.vname) {
|
|
2928
|
+
vnodeData.name = node.vname;
|
|
2929
|
+
}
|
|
2930
|
+
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
2931
|
+
}
|
|
2932
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
2933
|
+
vnode.$attrs$ = node.vattrs;
|
|
2934
|
+
vnode.$children$ = node.vchildren;
|
|
2935
|
+
vnode.$key$ = node.vkey;
|
|
2936
|
+
vnode.$name$ = node.vname;
|
|
2937
|
+
return vnode;
|
|
2938
|
+
};
|
|
2939
|
+
const Build = {
|
|
2940
|
+
isDev: false,
|
|
2941
|
+
isBrowser: true,
|
|
2942
|
+
isServer: false,
|
|
2943
|
+
isTesting: false,
|
|
2944
|
+
};
|
|
2945
|
+
|
|
2946
|
+
const focusElement = (element) => {
|
|
2947
|
+
if ("setFocus" in element) {
|
|
2948
|
+
element.setFocus();
|
|
2949
|
+
}
|
|
2950
|
+
else {
|
|
2951
|
+
element.focus();
|
|
2952
|
+
}
|
|
2953
|
+
};
|
|
2954
|
+
const FocusGuard = ({ moveFocusTo }) => {
|
|
2955
|
+
return h("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
|
|
2956
|
+
};
|
|
2957
|
+
|
|
2958
|
+
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}";
|
|
2768
2959
|
|
|
2769
|
-
let DuetChoice$1 = class extends
|
|
2960
|
+
let DuetChoice$1 = class extends H {
|
|
2770
2961
|
constructor() {
|
|
2771
2962
|
super();
|
|
2772
2963
|
this.__registerHost();
|
|
2773
2964
|
this.duetChange = createEvent$2(this, "duetChange", 7);
|
|
2774
2965
|
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
2775
2966
|
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
2967
|
+
this.hasHeader = false;
|
|
2776
2968
|
this.choiceId = createID("DuetChoice");
|
|
2777
|
-
this.
|
|
2778
|
-
this.
|
|
2969
|
+
this.expandId = createID("DuetChoiceExpand");
|
|
2970
|
+
this.headerId = createID("DuetChoiceHeader");
|
|
2971
|
+
this.infoButtonId = createID("DuetChoiceInfoButton");
|
|
2779
2972
|
/**
|
|
2780
2973
|
* State() variables
|
|
2781
2974
|
* Inlined decorator, alphabetical order.
|
|
@@ -2853,6 +3046,24 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2853
3046
|
* browser from displaying its own validation errors.
|
|
2854
3047
|
*/
|
|
2855
3048
|
this.required = false;
|
|
3049
|
+
/**
|
|
3050
|
+
* Placeholder defaults
|
|
3051
|
+
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
3052
|
+
*/
|
|
3053
|
+
this.infoLabelDefaults = {
|
|
3054
|
+
fi: "Lisätietoja",
|
|
3055
|
+
en: "More information about",
|
|
3056
|
+
sv: "Mera information om",
|
|
3057
|
+
};
|
|
3058
|
+
/**
|
|
3059
|
+
* Hint text to display before the user types into the date picker input.
|
|
3060
|
+
* @default {
|
|
3061
|
+
* fi: "Lisätietoja",
|
|
3062
|
+
* en: "More information about",
|
|
3063
|
+
* sv: "Mera information om",
|
|
3064
|
+
* }
|
|
3065
|
+
*/
|
|
3066
|
+
this.infoLabel = getLocaleString(this.infoLabelDefaults, getLanguage());
|
|
2856
3067
|
this.onMouseEnter = () => {
|
|
2857
3068
|
this.isHovering = true;
|
|
2858
3069
|
};
|
|
@@ -2860,7 +3071,6 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2860
3071
|
this.isHovering = false;
|
|
2861
3072
|
};
|
|
2862
3073
|
this.onClick = (ev) => {
|
|
2863
|
-
this.setFocus();
|
|
2864
3074
|
this.toggleChecked(ev);
|
|
2865
3075
|
};
|
|
2866
3076
|
this.handleKeyDown = (ev) => {
|
|
@@ -2868,7 +3078,7 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2868
3078
|
this.toggleChecked(ev);
|
|
2869
3079
|
}
|
|
2870
3080
|
if (isQuestionKey(ev) && this.hasInfo) {
|
|
2871
|
-
this.toggleInfo(
|
|
3081
|
+
this.toggleInfo();
|
|
2872
3082
|
}
|
|
2873
3083
|
};
|
|
2874
3084
|
this.onChange = () => {
|
|
@@ -2902,8 +3112,6 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2902
3112
|
if (this.disabled || this.groupDisabled) {
|
|
2903
3113
|
return;
|
|
2904
3114
|
}
|
|
2905
|
-
ev.stopPropagation();
|
|
2906
|
-
ev.preventDefault();
|
|
2907
3115
|
this.isInfoOpen = false;
|
|
2908
3116
|
// if it's a radio button and it's already checked
|
|
2909
3117
|
// we shouldn't fire an event, so exit early
|
|
@@ -2917,10 +3125,10 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2917
3125
|
value: this.value,
|
|
2918
3126
|
component: "duet-choice",
|
|
2919
3127
|
});
|
|
2920
|
-
};
|
|
2921
|
-
this.toggleInfo = ev => {
|
|
2922
|
-
ev.stopPropagation();
|
|
2923
3128
|
ev.preventDefault();
|
|
3129
|
+
ev.stopPropagation();
|
|
3130
|
+
};
|
|
3131
|
+
this.toggleInfo = () => {
|
|
2924
3132
|
this.isInfoOpen = !this.isInfoOpen;
|
|
2925
3133
|
};
|
|
2926
3134
|
}
|
|
@@ -2930,6 +3138,7 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2930
3138
|
componentWillLoad() {
|
|
2931
3139
|
inheritGlobalTheme(this);
|
|
2932
3140
|
this.hasInfo = !!this.element.querySelector("[slot='info']");
|
|
3141
|
+
this.hasHeader = !!this.element.querySelector('[slot="header"]');
|
|
2933
3142
|
this.hasAdditional = !!this.element.querySelector("[slot='additional']");
|
|
2934
3143
|
}
|
|
2935
3144
|
/**
|
|
@@ -2943,15 +3152,18 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2943
3152
|
// @ts-ignore
|
|
2944
3153
|
const isTargetContainedInHost = this.element.contains(ev === null || ev === void 0 ? void 0 : ev.relatedTarget) || false;
|
|
2945
3154
|
if (!isTargetContainedInHost) {
|
|
2946
|
-
this.toggleInfo(
|
|
3155
|
+
this.toggleInfo();
|
|
2947
3156
|
}
|
|
2948
3157
|
}
|
|
2949
3158
|
}
|
|
2950
3159
|
handleHostKeyDown() {
|
|
2951
3160
|
this.isKeyDown = true;
|
|
2952
3161
|
}
|
|
2953
|
-
handleHostKeyUp() {
|
|
3162
|
+
handleHostKeyUp(ev) {
|
|
2954
3163
|
this.isKeyDown = false;
|
|
3164
|
+
if (isEscapeKey(ev) && this.isInfoOpen) {
|
|
3165
|
+
this.toggleInfo();
|
|
3166
|
+
}
|
|
2955
3167
|
}
|
|
2956
3168
|
/**
|
|
2957
3169
|
* Sets focus on the specified `duet-choice`. Use this method instead of the global
|
|
@@ -2964,11 +3176,13 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2964
3176
|
if (this.accessibleDescribedBy) {
|
|
2965
3177
|
return this.accessibleDescribedBy;
|
|
2966
3178
|
}
|
|
2967
|
-
if (this.collapsible) {
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
3179
|
+
if (this.collapsible || this.hasInfo) {
|
|
3180
|
+
if (this.hasHeader) {
|
|
3181
|
+
return this.headerId;
|
|
3182
|
+
}
|
|
3183
|
+
else {
|
|
3184
|
+
return this.expandId;
|
|
3185
|
+
}
|
|
2972
3186
|
}
|
|
2973
3187
|
return null;
|
|
2974
3188
|
}
|
|
@@ -2977,6 +3191,7 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2977
3191
|
return {
|
|
2978
3192
|
"duet-choice-card-info": true,
|
|
2979
3193
|
"duet-choice-card-info-expanded": this.isInfoOpen,
|
|
3194
|
+
"duet-choice-card-collapsed": !this.isInfoOpen,
|
|
2980
3195
|
"duet-theme-turva": this.theme === "turva",
|
|
2981
3196
|
};
|
|
2982
3197
|
}
|
|
@@ -2984,6 +3199,7 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
2984
3199
|
return {
|
|
2985
3200
|
"duet-choice-card-collapsible": true,
|
|
2986
3201
|
"duet-choice-card-collapsible-expanded": this.checked,
|
|
3202
|
+
"duet-choice-card-collapsed": !this.checked,
|
|
2987
3203
|
"duet-choice-card-collapsible-disabled": this.disabled || this.groupDisabled ? true : false,
|
|
2988
3204
|
"duet-theme-turva": this.theme === "turva",
|
|
2989
3205
|
};
|
|
@@ -3015,28 +3231,53 @@ let DuetChoice$1 = class extends HTMLElement {
|
|
|
3015
3231
|
info: this.isInfoOpen,
|
|
3016
3232
|
collapsible: this.collapsible,
|
|
3017
3233
|
"duet-p-0": this.padding === "none",
|
|
3018
|
-
} }, h$1("input", {
|
|
3234
|
+
} }, h$1("input", { class: "duet-choice-input", type: this.type, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, disabled: this.disabled || this.groupDisabled, required: this.required, id: identifier, name: this.name, value: this.value, checked: this.checked, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.getAriaDescribedby(), onKeyDown: this.handleKeyDown, ref: input => (this.nativeInput = input) }), h$1("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick }, this.icon && (h$1("div", { class: "duet-choice-card-icon" }, h$1("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), this.label, this.caption && (h$1("div", null, h$1("duet-spacer", { size: "xx-small" }), h$1("duet-caption", { margin: "none", selected: this.checked }, this.caption))), this.hasAdditional && (h$1("div", null, h$1("duet-spacer", { size: "xx-small" }), h$1("slot", { name: "additional" }))), h$1("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && h$1("div", { class: "duet-checkmark" })))), this.hasInfo && !this.collapsible && (h$1("button", { ref: button => (this.infoButtonEl = button), id: this.infoButtonId, class: {
|
|
3019
3235
|
"duet-choice-info-toggle": true,
|
|
3020
3236
|
"duet-theme-turva": this.theme === "turva",
|
|
3021
|
-
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-controls": this.
|
|
3237
|
+
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-label": `${this.infoLabel} ${this.label}`, "aria-controls": this.expandId, "aria-flowto": this.expandId, tabindex: this.type === "radio" && !this.checked ? "-1" : "0", type: "button" }, h$1("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton), h$1("div", { class: "duet-choice-info-icon" }, h$1("duet-icon", { icon: messagingInfo.svg, margin: "none", size: "small", color: "currentColor" }))))), this.collapsible || this.hasInfo ? (h$1("div", { class: this.getClassNames(), id: this.expandId }, h$1("span", { class: {
|
|
3238
|
+
"duet-choice-section-visible": this.collapsible ? this.checked : this.isInfoOpen,
|
|
3239
|
+
"duet-choice-section-hidden": this.collapsible ? !this.checked : !this.isInfoOpen,
|
|
3240
|
+
} }, h$1("span", { id: this.headerId }, h$1("slot", { name: "header" })), this.hasInfo ? (h$1("span", null, h$1("span", { "aria-relevant": "all", "aria-atomic": "true", "aria-live": this.isInfoOpen ? "polite" : "off" }, h$1("slot", { name: "info" })), h$1("slot", null))) : (h$1("span", null, h$1("slot", null)))), this.isInfoOpen && h$1(FocusGuard, { moveFocusTo: this.infoButtonEl }))) : null));
|
|
3022
3241
|
}
|
|
3023
3242
|
get element() { return this; }
|
|
3024
3243
|
static get style() { return duetChoiceCss; }
|
|
3025
3244
|
};
|
|
3026
3245
|
|
|
3027
|
-
const
|
|
3246
|
+
const watchFor = (containerEl, tagName, onChange, changeHandler, options = {
|
|
3247
|
+
childList: true,
|
|
3248
|
+
subtree: true,
|
|
3249
|
+
}) => {
|
|
3028
3250
|
let mutation;
|
|
3029
3251
|
if (typeof MutationObserver !== "undefined") {
|
|
3030
3252
|
mutation = new MutationObserver(mutationList => {
|
|
3031
|
-
onChange(
|
|
3032
|
-
});
|
|
3033
|
-
mutation.observe(containerEl, {
|
|
3034
|
-
childList: true,
|
|
3035
|
-
subtree: true,
|
|
3253
|
+
onChange(changeHandler(mutationList, tagName));
|
|
3036
3254
|
});
|
|
3255
|
+
mutation.observe(containerEl, options);
|
|
3037
3256
|
}
|
|
3038
3257
|
return mutation;
|
|
3039
3258
|
};
|
|
3259
|
+
const watchForOptions = (containerEl, tagName, onChange) => {
|
|
3260
|
+
return watchFor(containerEl, tagName, onChange, getSelectedOption);
|
|
3261
|
+
};
|
|
3262
|
+
const watchForElement = (containerEl, tagName, onChange) => {
|
|
3263
|
+
return watchFor(containerEl, tagName, onChange, getElementItem, {
|
|
3264
|
+
childList: true,
|
|
3265
|
+
subtree: true,
|
|
3266
|
+
});
|
|
3267
|
+
};
|
|
3268
|
+
const getElementItem = (mutationList) => {
|
|
3269
|
+
let addedNode = false;
|
|
3270
|
+
let removedNode = false;
|
|
3271
|
+
mutationList.forEach(mut => {
|
|
3272
|
+
if (mut.addedNodes.length) {
|
|
3273
|
+
addedNode = true;
|
|
3274
|
+
}
|
|
3275
|
+
if (mut.removedNodes.length) {
|
|
3276
|
+
removedNode = true;
|
|
3277
|
+
}
|
|
3278
|
+
});
|
|
3279
|
+
return { addedNode, removedNode, mutationList };
|
|
3280
|
+
};
|
|
3040
3281
|
const getSelectedOption = (mutationList, tagName) => {
|
|
3041
3282
|
let newOption;
|
|
3042
3283
|
mutationList.forEach(mut => {
|
|
@@ -3055,9 +3296,9 @@ const findCheckedOption = (el, tagName) => {
|
|
|
3055
3296
|
return options.find((o) => o.checked === true);
|
|
3056
3297
|
};
|
|
3057
3298
|
|
|
3058
|
-
const duetChoiceGroupCss = "*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";
|
|
3299
|
+
const duetChoiceGroupCss = "*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex;margin-bottom:0}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";
|
|
3059
3300
|
|
|
3060
|
-
let DuetChoiceGroup$1 = class extends
|
|
3301
|
+
let DuetChoiceGroup$1 = class extends H {
|
|
3061
3302
|
constructor() {
|
|
3062
3303
|
super();
|
|
3063
3304
|
this.__registerHost();
|
|
@@ -3088,11 +3329,11 @@ let DuetChoiceGroup$1 = class extends HTMLElement {
|
|
|
3088
3329
|
/**
|
|
3089
3330
|
* Additional caption to show inside the label of the choice group.
|
|
3090
3331
|
*/
|
|
3091
|
-
this.caption =
|
|
3332
|
+
this.caption = undefined;
|
|
3092
3333
|
/**
|
|
3093
3334
|
* Tooltip to display next to the label of the choice group.
|
|
3094
3335
|
*/
|
|
3095
|
-
this.tooltip =
|
|
3336
|
+
this.tooltip = undefined;
|
|
3096
3337
|
/**
|
|
3097
3338
|
* With direction setting you can force the tooltip to always open towards left
|
|
3098
3339
|
* or right instead of automatically determining the direction.
|
|
@@ -3323,6 +3564,7 @@ const size_tappable_square = "48px";
|
|
|
3323
3564
|
const size_icon_x_small = "16px";
|
|
3324
3565
|
const size_icon_xxx_small = "7px";
|
|
3325
3566
|
const size_button_border = "2px";
|
|
3567
|
+
const size_button_tiny_border = "1px";
|
|
3326
3568
|
const size_icon_medium = "24px";
|
|
3327
3569
|
const size_icon_small = "20px";
|
|
3328
3570
|
const opacity_85 = "0.85";
|
|
@@ -3470,6 +3712,7 @@ const tokens = {
|
|
|
3470
3712
|
size_icon_x_small: size_icon_x_small,
|
|
3471
3713
|
size_icon_xxx_small: size_icon_xxx_small,
|
|
3472
3714
|
size_button_border: size_button_border,
|
|
3715
|
+
size_button_tiny_border: size_button_tiny_border,
|
|
3473
3716
|
size_icon_medium: size_icon_medium,
|
|
3474
3717
|
size_icon_small: size_icon_small,
|
|
3475
3718
|
opacity_85: opacity_85,
|
|
@@ -3620,6 +3863,7 @@ const tokens$1 = /*#__PURE__*/Object.freeze({
|
|
|
3620
3863
|
size_icon_x_small: size_icon_x_small,
|
|
3621
3864
|
size_icon_xxx_small: size_icon_xxx_small,
|
|
3622
3865
|
size_button_border: size_button_border,
|
|
3866
|
+
size_button_tiny_border: size_button_tiny_border,
|
|
3623
3867
|
size_icon_medium: size_icon_medium,
|
|
3624
3868
|
size_icon_small: size_icon_small,
|
|
3625
3869
|
opacity_85: opacity_85,
|
|
@@ -3656,11 +3900,11 @@ const tokens$1 = /*#__PURE__*/Object.freeze({
|
|
|
3656
3900
|
|
|
3657
3901
|
const duetCollapsibleCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d}:host(.duet-theme-turva){font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}:host(.duet-m-0){margin:0 !important}.duet-collapsible-content{display:none;padding-left:18px;margin-top:8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content{font-size:0.875rem}}.duet-collapsible-content.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}:host([open]) .duet-collapsible-content{display:block}.duet-collapsible-heading{-webkit-user-select:none;user-select:none;display:flex;align-items:center;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight{font-weight:400}.duet-collapsible-heading.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-collapsible-heading .duet-collapsible-heading-content{flex:1}.duet-collapsible-heading:focus{outline:0}:host(.user-is-tabbing) .duet-collapsible-heading:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva) .duet-collapsible-heading:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon:last-child,.duet-collapsible-heading-icon:last-of-type{margin-right:0 !important}[aria-expanded=true] .duet-collapsible-heading-icon{transform:rotate(180deg)}";
|
|
3658
3902
|
|
|
3659
|
-
let DuetCollapsible$1 = class extends
|
|
3903
|
+
let DuetCollapsible$1 = class extends H {
|
|
3660
3904
|
constructor() {
|
|
3661
3905
|
super();
|
|
3662
3906
|
this.__registerHost();
|
|
3663
|
-
|
|
3907
|
+
this.__attachShadow();
|
|
3664
3908
|
this.duetToggle = createEvent$2(this, "duetToggle", 7);
|
|
3665
3909
|
this.id = createID("DuetCollapsible");
|
|
3666
3910
|
/**
|
|
@@ -3771,7 +4015,7 @@ let DuetCollapsible$1 = class extends HTMLElement {
|
|
|
3771
4015
|
* Always the last one in the class.
|
|
3772
4016
|
*/
|
|
3773
4017
|
render() {
|
|
3774
|
-
const HeadingTagName = this.headingLevel ? sanitizeString(this.headingLevel) : "div";
|
|
4018
|
+
const HeadingTagName = this.headingLevel ? sanitizeString$1(this.headingLevel) : "div";
|
|
3775
4019
|
return (h$1(Host, { class: { "duet-m-0": this.margin === "none" } }, h$1(HeadingTagName, { class: {
|
|
3776
4020
|
"duet-collapsible-heading": true,
|
|
3777
4021
|
"duet-theme-turva": this.theme === "turva",
|
|
@@ -3784,11 +4028,11 @@ let DuetCollapsible$1 = class extends HTMLElement {
|
|
|
3784
4028
|
|
|
3785
4029
|
const duetCookieConsentCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:fixed;right:0;bottom:0;left:0;z-index:950;display:block;width:100%;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 48em){:host{right:28px;bottom:28px;left:auto;width:25rem}}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-cookie-consent{padding:20px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;color:white !important;background-color:rgba(0, 21, 39, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent{background:rgba(0, 21, 39, 0.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.duet-cookie-consent.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";background-color:rgba(12, 14, 29, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent.duet-theme-turva{background:rgba(12, 14, 29, 0.8)}}@media (min-width: 48em){.duet-cookie-consent{padding:20px;border-radius:4px}}.duet-cookie-consent-content{display:flex;align-items:center;max-width:1110px;margin:0 auto}.duet-cookie-consent-content .expand{flex:1}::slotted(a){font-weight:600;color:white !important;text-decoration:underline;white-space:nowrap}::slotted(a[target=_blank]){padding-right:16px;background:url(\"data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjUgMmExLjUgMS41IDAgMDEuMTQgM0gzLjc1Yy0uMzggMC0uNy4yOC0uNzQuNjVsLS4wMS4xdjE0LjVjMCAuMzguMjguNy42NS43NGwuMS4wMWgxNC41Yy4zOCAwIC43LS4yOC43NC0uNjVsLjAxLS4xdi02Ljg5YTEuNSAxLjUgMCAwMTMgMHY2Ljg5QTMuNzUgMy43NSAwIDAxMTguMjUgMjRIMy43NUEzLjc1IDMuNzUgMCAwMTAgMjAuMjVWNS43NUEzLjc1IDMuNzUgMCAwMTMuNzUgMnptMTItMmMuNzggMCAxLjQyLjYgMS41IDEuMzZWNy41YTEuNSAxLjUgMCAwMS0zIC4xNFY1LjEybC01LjQ0IDUuNDRhMS41IDEuNSAwIDAxLTIuMjItMmwuMS0uMTJMMTguODggM0gxNi41QTEuNSAxLjUgMCAwMTE1IDEuNjRWMS41YzAtLjc4LjYtMS40MiAxLjM2LTEuNWguMTR6Ii8+PC9zdmc+\") no-repeat right 50%;background-size:12px 10px}::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva ::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}";
|
|
3786
4030
|
|
|
3787
|
-
let DuetCookieConsent$1 = class extends
|
|
4031
|
+
let DuetCookieConsent$1 = class extends H {
|
|
3788
4032
|
constructor() {
|
|
3789
4033
|
super();
|
|
3790
4034
|
this.__registerHost();
|
|
3791
|
-
|
|
4035
|
+
this.__attachShadow();
|
|
3792
4036
|
this.duetCookieConsent = createEvent$2(this, "duetCookieConsent", 7);
|
|
3793
4037
|
/**
|
|
3794
4038
|
* Adds accessible label for the cookie consent ok button.
|
|
@@ -3820,151 +4064,6 @@ let DuetCookieConsent$1 = class extends HTMLElement {
|
|
|
3820
4064
|
static get style() { return duetCookieConsentCss; }
|
|
3821
4065
|
};
|
|
3822
4066
|
|
|
3823
|
-
const isComplexType = (o) => {
|
|
3824
|
-
// https://jsperf.com/typeof-fn-object/5
|
|
3825
|
-
o = typeof o;
|
|
3826
|
-
return o === 'object' || o === 'function';
|
|
3827
|
-
};
|
|
3828
|
-
/**
|
|
3829
|
-
* Production h() function based on Preact by
|
|
3830
|
-
* Jason Miller (@developit)
|
|
3831
|
-
* Licensed under the MIT License
|
|
3832
|
-
* https://github.com/developit/preact/blob/master/LICENSE
|
|
3833
|
-
*
|
|
3834
|
-
* Modified for Stencil's compiler and vdom
|
|
3835
|
-
*/
|
|
3836
|
-
// const stack: any[] = [];
|
|
3837
|
-
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
3838
|
-
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
3839
|
-
const h = (nodeName, vnodeData, ...children) => {
|
|
3840
|
-
let child = null;
|
|
3841
|
-
let key = null;
|
|
3842
|
-
let slotName = null;
|
|
3843
|
-
let simple = false;
|
|
3844
|
-
let lastSimple = false;
|
|
3845
|
-
let vNodeChildren = [];
|
|
3846
|
-
const walk = (c) => {
|
|
3847
|
-
for (let i = 0; i < c.length; i++) {
|
|
3848
|
-
child = c[i];
|
|
3849
|
-
if (Array.isArray(child)) {
|
|
3850
|
-
walk(child);
|
|
3851
|
-
}
|
|
3852
|
-
else if (child != null && typeof child !== 'boolean') {
|
|
3853
|
-
if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
|
|
3854
|
-
child = String(child);
|
|
3855
|
-
}
|
|
3856
|
-
if (simple && lastSimple) {
|
|
3857
|
-
// If the previous child was simple (string), we merge both
|
|
3858
|
-
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
3859
|
-
}
|
|
3860
|
-
else {
|
|
3861
|
-
// Append a new vNode, if it's text, we create a text vNode
|
|
3862
|
-
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
3863
|
-
}
|
|
3864
|
-
lastSimple = simple;
|
|
3865
|
-
}
|
|
3866
|
-
}
|
|
3867
|
-
};
|
|
3868
|
-
walk(children);
|
|
3869
|
-
if (vnodeData) {
|
|
3870
|
-
// normalize class / classname attributes
|
|
3871
|
-
if (vnodeData.key) {
|
|
3872
|
-
key = vnodeData.key;
|
|
3873
|
-
}
|
|
3874
|
-
if (vnodeData.name) {
|
|
3875
|
-
slotName = vnodeData.name;
|
|
3876
|
-
}
|
|
3877
|
-
{
|
|
3878
|
-
const classData = vnodeData.className || vnodeData.class;
|
|
3879
|
-
if (classData) {
|
|
3880
|
-
vnodeData.class =
|
|
3881
|
-
typeof classData !== 'object'
|
|
3882
|
-
? classData
|
|
3883
|
-
: Object.keys(classData)
|
|
3884
|
-
.filter((k) => classData[k])
|
|
3885
|
-
.join(' ');
|
|
3886
|
-
}
|
|
3887
|
-
}
|
|
3888
|
-
}
|
|
3889
|
-
if (typeof nodeName === 'function') {
|
|
3890
|
-
// nodeName is a functional component
|
|
3891
|
-
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
3892
|
-
}
|
|
3893
|
-
const vnode = newVNode(nodeName, null);
|
|
3894
|
-
vnode.$attrs$ = vnodeData;
|
|
3895
|
-
if (vNodeChildren.length > 0) {
|
|
3896
|
-
vnode.$children$ = vNodeChildren;
|
|
3897
|
-
}
|
|
3898
|
-
{
|
|
3899
|
-
vnode.$key$ = key;
|
|
3900
|
-
}
|
|
3901
|
-
{
|
|
3902
|
-
vnode.$name$ = slotName;
|
|
3903
|
-
}
|
|
3904
|
-
return vnode;
|
|
3905
|
-
};
|
|
3906
|
-
const newVNode = (tag, text) => {
|
|
3907
|
-
const vnode = {
|
|
3908
|
-
$flags$: 0,
|
|
3909
|
-
$tag$: tag,
|
|
3910
|
-
$text$: text,
|
|
3911
|
-
$elm$: null,
|
|
3912
|
-
$children$: null,
|
|
3913
|
-
};
|
|
3914
|
-
{
|
|
3915
|
-
vnode.$attrs$ = null;
|
|
3916
|
-
}
|
|
3917
|
-
{
|
|
3918
|
-
vnode.$key$ = null;
|
|
3919
|
-
}
|
|
3920
|
-
{
|
|
3921
|
-
vnode.$name$ = null;
|
|
3922
|
-
}
|
|
3923
|
-
return vnode;
|
|
3924
|
-
};
|
|
3925
|
-
const vdomFnUtils = {
|
|
3926
|
-
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
3927
|
-
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
3928
|
-
};
|
|
3929
|
-
const convertToPublic = (node) => ({
|
|
3930
|
-
vattrs: node.$attrs$,
|
|
3931
|
-
vchildren: node.$children$,
|
|
3932
|
-
vkey: node.$key$,
|
|
3933
|
-
vname: node.$name$,
|
|
3934
|
-
vtag: node.$tag$,
|
|
3935
|
-
vtext: node.$text$,
|
|
3936
|
-
});
|
|
3937
|
-
const convertToPrivate = (node) => {
|
|
3938
|
-
if (typeof node.vtag === 'function') {
|
|
3939
|
-
const vnodeData = Object.assign({}, node.vattrs);
|
|
3940
|
-
if (node.vkey) {
|
|
3941
|
-
vnodeData.key = node.vkey;
|
|
3942
|
-
}
|
|
3943
|
-
if (node.vname) {
|
|
3944
|
-
vnodeData.name = node.vname;
|
|
3945
|
-
}
|
|
3946
|
-
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
3947
|
-
}
|
|
3948
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
|
3949
|
-
vnode.$attrs$ = node.vattrs;
|
|
3950
|
-
vnode.$children$ = node.vchildren;
|
|
3951
|
-
vnode.$key$ = node.vkey;
|
|
3952
|
-
vnode.$name$ = node.vname;
|
|
3953
|
-
return vnode;
|
|
3954
|
-
};
|
|
3955
|
-
|
|
3956
|
-
const focusElement = (element) => {
|
|
3957
|
-
if ("setFocus" in element) {
|
|
3958
|
-
element.setFocus();
|
|
3959
|
-
}
|
|
3960
|
-
else {
|
|
3961
|
-
element.focus();
|
|
3962
|
-
}
|
|
3963
|
-
};
|
|
3964
|
-
const FocusGuard = ({ moveFocusTo }) => {
|
|
3965
|
-
return h("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
|
|
3966
|
-
};
|
|
3967
|
-
|
|
3968
4067
|
const formatOptionsShort = { day: "numeric", month: "long" };
|
|
3969
4068
|
const formatOptionsLong = { day: "numeric", month: "long", year: "numeric" };
|
|
3970
4069
|
const i18n$2 = {
|
|
@@ -4355,9 +4454,9 @@ const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, theme, langu
|
|
|
4355
4454
|
} }))))))))));
|
|
4356
4455
|
};
|
|
4357
4456
|
|
|
4358
|
-
const duetDatePickerCss = "*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{color:#171c3a;background:#f5f5f7}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker duet-icon.sc-duet-date-picker{display:block}@media (max-width: 35.9375em){.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{width:40px;height:40px}}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9ecee !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9e9eb !important}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#dddfe1;box-shadow:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#ddddde}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#747475;background:#f5f5f7}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}";
|
|
4457
|
+
const duetDatePickerCss = "*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{color:#171c3a;background:#f5f5f7}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker duet-icon.sc-duet-date-picker{display:block}@media (max-width: 35.9375em){.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{width:40px;height:40px}}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9ecee !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9e9eb !important}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#dddfe1;box-shadow:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#ddddde}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#747475;background:#f5f5f7}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}";
|
|
4359
4458
|
|
|
4360
|
-
let DuetDatePicker$1 = class extends
|
|
4459
|
+
let DuetDatePicker$1 = class extends H {
|
|
4361
4460
|
constructor() {
|
|
4362
4461
|
super();
|
|
4363
4462
|
this.__registerHost();
|
|
@@ -4397,11 +4496,27 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4397
4496
|
* Controls the margin of the component.
|
|
4398
4497
|
*/
|
|
4399
4498
|
this.margin = "auto";
|
|
4499
|
+
/**
|
|
4500
|
+
* The currently active language. This setting changes the month/year/day.
|
|
4501
|
+
* names and button labels as well as all screen reader labels.
|
|
4502
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing.
|
|
4503
|
+
* @default "fi"
|
|
4504
|
+
*/
|
|
4505
|
+
this.language = getLanguage();
|
|
4506
|
+
/**
|
|
4507
|
+
* Placeholder defaults.
|
|
4508
|
+
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
4509
|
+
*/
|
|
4510
|
+
this.placeholderDefaults = {
|
|
4511
|
+
fi: "pp.kk.vvvv",
|
|
4512
|
+
en: "dd.mm.yyyy",
|
|
4513
|
+
sv: "dd.mm.åååå",
|
|
4514
|
+
};
|
|
4400
4515
|
/**
|
|
4401
4516
|
* Hint text to display before the user types into the date picker input.
|
|
4402
4517
|
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
4403
4518
|
*/
|
|
4404
|
-
this.placeholder = getLocaleString(
|
|
4519
|
+
this.placeholder = getLocaleString(this.placeholderDefaults, this.language);
|
|
4405
4520
|
/**
|
|
4406
4521
|
* If form input field has a placeholder text, and user types anything (causing the text to dissapear),
|
|
4407
4522
|
* settings this to true will "echo" it into the caption slot - this option will be false by default for the next few versions, but will eventually be true by default (scheduled for 4.30.0)
|
|
@@ -4412,13 +4527,6 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4412
4527
|
* interact with the input, and conveys its inactive state to assistive technologies.
|
|
4413
4528
|
*/
|
|
4414
4529
|
this.disabled = false;
|
|
4415
|
-
/**
|
|
4416
|
-
* The currently active language. This setting changes the month/year/day
|
|
4417
|
-
* names and button labels as well as all screen reader labels.
|
|
4418
|
-
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
4419
|
-
* @default "fi"
|
|
4420
|
-
*/
|
|
4421
|
-
this.language = getLanguage();
|
|
4422
4530
|
/**
|
|
4423
4531
|
* Display the date picker input in error state along with an error message.
|
|
4424
4532
|
*/
|
|
@@ -4459,7 +4567,7 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4459
4567
|
*/
|
|
4460
4568
|
this.min = "";
|
|
4461
4569
|
/**
|
|
4462
|
-
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD
|
|
4570
|
+
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.
|
|
4463
4571
|
* This setting can be used alone or together with the min property.
|
|
4464
4572
|
*/
|
|
4465
4573
|
this.max = "";
|
|
@@ -4680,125 +4788,413 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4680
4788
|
valid: !(valueMissing || badInput || rangeUnderflow || rangeOverflow),
|
|
4681
4789
|
};
|
|
4682
4790
|
}
|
|
4683
|
-
setValue(date) {
|
|
4684
|
-
const newValue = printISODate(date);
|
|
4685
|
-
if (newValue === this.value) {
|
|
4686
|
-
return;
|
|
4687
|
-
}
|
|
4688
|
-
this.value = newValue;
|
|
4689
|
-
this.duetChange.emit({
|
|
4690
|
-
component: "duet-date-picker",
|
|
4691
|
-
value: this.value,
|
|
4692
|
-
valueAsDate: date,
|
|
4693
|
-
});
|
|
4791
|
+
setValue(date) {
|
|
4792
|
+
const newValue = printISODate(date);
|
|
4793
|
+
if (newValue === this.value) {
|
|
4794
|
+
return;
|
|
4795
|
+
}
|
|
4796
|
+
this.value = newValue;
|
|
4797
|
+
this.duetChange.emit({
|
|
4798
|
+
component: "duet-date-picker",
|
|
4799
|
+
value: this.value,
|
|
4800
|
+
valueAsDate: date,
|
|
4801
|
+
});
|
|
4802
|
+
}
|
|
4803
|
+
handleDocumentClick(e) {
|
|
4804
|
+
if (!this.open) {
|
|
4805
|
+
return;
|
|
4806
|
+
}
|
|
4807
|
+
// the dialog and the button aren't considered clicks outside.
|
|
4808
|
+
// dialog for obvious reasons, but the button needs to be skipped
|
|
4809
|
+
// so that two things are possible:
|
|
4810
|
+
//
|
|
4811
|
+
// a) clicking again on the button when dialog is open should close the modal.
|
|
4812
|
+
// without skipping the button here, we would see a click outside
|
|
4813
|
+
// _and_ a click on the button, so the `open` state goes
|
|
4814
|
+
// open -> close (click outside) -> open (click button)
|
|
4815
|
+
//
|
|
4816
|
+
// b) clicking another date picker's button should close the current calendar
|
|
4817
|
+
// and open the new one. this means we can't stopPropagation() on the button itself
|
|
4818
|
+
const isClickOutside = e
|
|
4819
|
+
.composedPath()
|
|
4820
|
+
.every(node => node !== this.dialogWrapperNode && node !== this.datePickerButton);
|
|
4821
|
+
if (isClickOutside) {
|
|
4822
|
+
this.hide(false);
|
|
4823
|
+
}
|
|
4824
|
+
}
|
|
4825
|
+
/**
|
|
4826
|
+
* render() function
|
|
4827
|
+
* Always the last one in the class.
|
|
4828
|
+
*/
|
|
4829
|
+
render() {
|
|
4830
|
+
const valueAsDate = parseISODate(this.value);
|
|
4831
|
+
const selectedYear = (valueAsDate || this.focusedDay).getFullYear();
|
|
4832
|
+
const focusedMonth = this.focusedDay.getMonth();
|
|
4833
|
+
const focusedYear = this.focusedDay.getFullYear();
|
|
4834
|
+
const text = i18n$2[this.language];
|
|
4835
|
+
const minDate = parseISODate(this.min);
|
|
4836
|
+
const maxDate = parseISODate(this.max);
|
|
4837
|
+
const prevMonthDisabled = minDate != null && minDate.getMonth() === focusedMonth && minDate.getFullYear() === focusedYear;
|
|
4838
|
+
const nextMonthDisabled = maxDate != null && maxDate.getMonth() === focusedMonth && maxDate.getFullYear() === focusedYear;
|
|
4839
|
+
let minYear = selectedYear - 10;
|
|
4840
|
+
let maxYear = selectedYear + 10;
|
|
4841
|
+
if (minDate) {
|
|
4842
|
+
minYear = Math.max(minYear, minDate.getFullYear());
|
|
4843
|
+
}
|
|
4844
|
+
if (maxDate) {
|
|
4845
|
+
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
4846
|
+
}
|
|
4847
|
+
return (h$1(Host, { class: { "duet-expand": this.expand, "duet-m-0": this.margin === "none" } }, h$1("div", { class: "duet-date" }, h$1(DatePickerInput, { value: this.value, valueAsDate: valueAsDate, formattedValue: this.inputValue, language: this.language, onInput: this.handleInputChange, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.toggleOpen, name: this.name, disabled: this.disabled, error: this.error, role: this.role, required: this.required, theme: this.theme, tooltip: this.tooltip, tooltipDirection: this.tooltipDirection, labelHidden: this.labelHidden, placeholder: this.placeholder, inputLabel: this.label, identifier: this.identifier, buttonRef: element => (this.datePickerButton = element), inputRef: element => (this.datePickerInput = element), accessibleActiveDescendant: this.accessibleActiveDescendant, accessibleControls: this.accessibleControls, accessibleOwns: this.accessibleOwns, accessibleDescribedBy: this.accessibleDescribedBy, echoPlaceholder: this.echoPlaceholder, caption: this.caption })), h$1("div", { class: {
|
|
4848
|
+
"duet-theme-turva": this.theme === "turva",
|
|
4849
|
+
"duet-date-dialog": true,
|
|
4850
|
+
left: this.direction === "left",
|
|
4851
|
+
error: !!this.error,
|
|
4852
|
+
active: this.open,
|
|
4853
|
+
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h$1(FocusGuard, { moveFocusTo: this.focusedDayNode }), h$1("div", { class: "duet-date-dialog-wrapper", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, h$1("duet-visually-hidden", { "aria-live": "polite" }, text.keyboardInstruction), h$1("div", { class: "duet-date-dialog-mobile-header" }, h$1("duet-label", { margin: "none" }, this.label), h$1("button", { class: "duet-date-picker-close", ref: element => (this.closeButtonNode = element), onClick: () => this.hide(), type: "button" }, h$1("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xx-small" }), h$1("duet-visually-hidden", null, text.closeLabel))), h$1("div", { class: "duet-date-dialog-header" }, h$1("div", { class: "duet-date-dialog-dropdowns" }, h$1("duet-visually-hidden", null, h$1("h2", { id: this.dialogLabelId, "aria-live": "polite", "aria-atomic": "true" }, text.monthLabels[focusedMonth], " ", this.focusedDay.getFullYear())), h$1("duet-visually-hidden", null, h$1("label", { htmlFor: this.monthSelectId }, text.monthSelectLabel)), h$1("div", { class: "duet-date-dialog-select" }, h$1("select", { id: this.monthSelectId, class: "duet-date-month-select", ref: element => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, text.monthLabels.map((month, i) => (h$1("option", { key: month, value: i, selected: i === focusedMonth, disabled: !inRange(new Date(focusedYear, i, 1), minDate ? startOfMonth(minDate) : null, maxDate ? endOfMonth(maxDate) : null) }, month)))), h$1("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h$1("span", null, text.monthLabelsShort[focusedMonth]), h$1("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" }))), h$1("duet-visually-hidden", null, h$1("label", { htmlFor: this.yearSelectId }, text.yearSelectLabel)), h$1("div", { class: "duet-date-dialog-select" }, h$1("select", { id: this.yearSelectId, class: "duet-date-year-select", onChange: this.handleYearSelect }, range(minYear, maxYear).map(year => (h$1("option", { key: year, selected: year === focusedYear }, year)))), h$1("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h$1("span", null, this.focusedDay.getFullYear()), h$1("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" })))), h$1("div", { class: "duet-date-dialog-buttons" }, h$1("button", { class: "duet-date-dialog-prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, type: "button" }, h$1("duet-icon", { name: "action-arrow-left-small", color: "currentColor", margin: "none", size: "xx-small" }), h$1("duet-visually-hidden", null, text.prevMonthLabel)), h$1("button", { class: "duet-date-dialog-next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, type: "button" }, h$1("duet-icon", { name: "action-arrow-right-small", color: "currentColor", margin: "none", size: "xx-small" }), h$1("duet-visually-hidden", null, text.nextMonthLabel)))), h$1(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, language: this.language, theme: this.theme, min: minDate, max: maxDate, focusedDayRef: element => (this.focusedDayNode = element), onFocusEnter: this.enableActiveFocus, onFocusExit: this.disableActiveFocus })), h$1(FocusGuard, { moveFocusTo: this.closeButtonNode }))));
|
|
4854
|
+
}
|
|
4855
|
+
get element() { return this; }
|
|
4856
|
+
static get watchers() { return {
|
|
4857
|
+
"min": ["updateValidity"],
|
|
4858
|
+
"max": ["updateValidity"],
|
|
4859
|
+
"value": ["updateValidity", "updateInternalValue"],
|
|
4860
|
+
"required": ["updateValidity"]
|
|
4861
|
+
}; }
|
|
4862
|
+
static get style() { return duetDatePickerCss; }
|
|
4863
|
+
};
|
|
4864
|
+
|
|
4865
|
+
const duetDividerCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-divider{-webkit-user-select:none;user-select:none;display:block;width:100%;height:1px;margin-top:36px !important;margin-bottom:28px;background:#e1e3e6}.duet-divider.duet-p-0{padding:0 !important}.duet-divider.duet-m-0{margin:0 !important}.duet-divider.duet-m-s{margin-bottom:16px !important;margin-top:0 !important}.duet-divider.duet-theme-turva{background:#e4e4e6}";
|
|
4866
|
+
|
|
4867
|
+
let DuetDivider$1 = class extends H {
|
|
4868
|
+
constructor() {
|
|
4869
|
+
super();
|
|
4870
|
+
this.__registerHost();
|
|
4871
|
+
this.__attachShadow();
|
|
4872
|
+
/**
|
|
4873
|
+
* Theme of the divider.
|
|
4874
|
+
*/
|
|
4875
|
+
this.theme = "";
|
|
4876
|
+
/**
|
|
4877
|
+
* Controls the margin of the component.
|
|
4878
|
+
*/
|
|
4879
|
+
this.margin = "auto";
|
|
4880
|
+
}
|
|
4881
|
+
/**
|
|
4882
|
+
* Component lifecycle events.
|
|
4883
|
+
*/
|
|
4884
|
+
componentWillLoad() {
|
|
4885
|
+
inheritGlobalTheme(this);
|
|
4886
|
+
}
|
|
4887
|
+
/**
|
|
4888
|
+
* render() function
|
|
4889
|
+
* Always the last one in the class.
|
|
4890
|
+
*/
|
|
4891
|
+
render() {
|
|
4892
|
+
return (h$1("div", { class: {
|
|
4893
|
+
"duet-m-0": this.margin === "none",
|
|
4894
|
+
"duet-m-s": this.margin === "small",
|
|
4895
|
+
"duet-divider": true,
|
|
4896
|
+
"duet-theme-turva": this.theme === "turva",
|
|
4897
|
+
} }));
|
|
4898
|
+
}
|
|
4899
|
+
get element() { return this; }
|
|
4900
|
+
static get style() { return duetDividerCss; }
|
|
4901
|
+
};
|
|
4902
|
+
|
|
4903
|
+
const debounce = (func, timeout = 50) => {
|
|
4904
|
+
let timer;
|
|
4905
|
+
return (...args) => {
|
|
4906
|
+
clearTimeout(timer);
|
|
4907
|
+
timer = setTimeout(() => {
|
|
4908
|
+
func.apply(undefined, args);
|
|
4909
|
+
}, timeout);
|
|
4910
|
+
};
|
|
4911
|
+
};
|
|
4912
|
+
|
|
4913
|
+
const duetEditableTableCss = "duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";
|
|
4914
|
+
|
|
4915
|
+
let DuetEditableTable$1 = class extends H {
|
|
4916
|
+
constructor() {
|
|
4917
|
+
super();
|
|
4918
|
+
this.__registerHost();
|
|
4919
|
+
this.__attachShadow();
|
|
4920
|
+
/**
|
|
4921
|
+
* State() variables
|
|
4922
|
+
* @internal
|
|
4923
|
+
*/
|
|
4924
|
+
this.tick = Date.now();
|
|
4925
|
+
/**
|
|
4926
|
+
* Map of items that contain list of things.
|
|
4927
|
+
*/
|
|
4928
|
+
this.items = new Map();
|
|
4929
|
+
/**
|
|
4930
|
+
* Array of internationalized defaults for the default groups labels.
|
|
4931
|
+
*/
|
|
4932
|
+
this.groupsLabelDefaults = {
|
|
4933
|
+
fi: "Kaikki",
|
|
4934
|
+
en: "All items",
|
|
4935
|
+
sv: "Alla objekt",
|
|
4936
|
+
};
|
|
4937
|
+
/**
|
|
4938
|
+
* Array of internationalized defaults for the default action labels.
|
|
4939
|
+
*/
|
|
4940
|
+
this.actionLabelDefaults = {
|
|
4941
|
+
fi: "Toiminnot",
|
|
4942
|
+
en: "Actions",
|
|
4943
|
+
sv: "Handlingar",
|
|
4944
|
+
};
|
|
4945
|
+
/**
|
|
4946
|
+
* Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
|
|
4947
|
+
* @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
|
|
4948
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
|
|
4949
|
+
*/
|
|
4950
|
+
this.groups = [
|
|
4951
|
+
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
4952
|
+
];
|
|
4953
|
+
/**
|
|
4954
|
+
* Array of actions that are mapped via the map variable to the various groups defined in group.
|
|
4955
|
+
* @default undefined
|
|
4956
|
+
* @example [{
|
|
4957
|
+
variation: "default",
|
|
4958
|
+
icon: "action-edit-2",
|
|
4959
|
+
id: "edit",
|
|
4960
|
+
map: ["success"],
|
|
4961
|
+
label: {
|
|
4962
|
+
fi: " Label",
|
|
4963
|
+
en: " Label",
|
|
4964
|
+
sv: " Label",
|
|
4965
|
+
}
|
|
4966
|
+
}]
|
|
4967
|
+
*/
|
|
4968
|
+
this.actions = undefined;
|
|
4969
|
+
/**
|
|
4970
|
+
* Shows or hides the table labels.
|
|
4971
|
+
*/
|
|
4972
|
+
this.hideGroups = false;
|
|
4973
|
+
/**
|
|
4974
|
+
* Exposes the aria role for optimizing accessibility.
|
|
4975
|
+
*/
|
|
4976
|
+
this.accessibleRole = undefined;
|
|
4977
|
+
/**
|
|
4978
|
+
* Private methods.
|
|
4979
|
+
*/
|
|
4980
|
+
this.kick = debounce(() => {
|
|
4981
|
+
this.tick = Date.now();
|
|
4982
|
+
}, 100); // will trigger re-render
|
|
4983
|
+
this.filterMap = needle => {
|
|
4984
|
+
if (needle === "all") {
|
|
4985
|
+
return Array.from(this.items);
|
|
4986
|
+
}
|
|
4987
|
+
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
4988
|
+
};
|
|
4989
|
+
}
|
|
4990
|
+
/**
|
|
4991
|
+
* Component lifecycle events.
|
|
4992
|
+
*/
|
|
4993
|
+
componentWillLoad() {
|
|
4994
|
+
if (typeof this.groups === "string") {
|
|
4995
|
+
this.internalGroupArray = sanitizeString(this.groups);
|
|
4996
|
+
}
|
|
4997
|
+
else {
|
|
4998
|
+
this.internalGroupArray = this.groups;
|
|
4999
|
+
}
|
|
5000
|
+
if (typeof this.actions === "string") {
|
|
5001
|
+
this.internalActionsArray = sanitizeString(this.actions);
|
|
5002
|
+
}
|
|
5003
|
+
else {
|
|
5004
|
+
this.internalActionsArray = this.actions;
|
|
5005
|
+
}
|
|
5006
|
+
inheritGlobalTheme(this);
|
|
5007
|
+
}
|
|
5008
|
+
/**
|
|
5009
|
+
* Method to force an update of a tabular data array.
|
|
5010
|
+
* when called the method will rerender the entire tabular structure.
|
|
5011
|
+
*/
|
|
5012
|
+
async updateTable(passedItems = undefined) {
|
|
5013
|
+
this.items = new Map(passedItems || this.items);
|
|
5014
|
+
this.kick();
|
|
5015
|
+
}
|
|
5016
|
+
render() {
|
|
5017
|
+
return (h$1(Host, { class: {
|
|
5018
|
+
"duet-theme-turva": this.theme === "turva",
|
|
5019
|
+
} }, this.internalGroupArray.map(group => {
|
|
5020
|
+
const currentGroup = this.filterMap(group.id);
|
|
5021
|
+
if (!currentGroup.length) {
|
|
5022
|
+
return;
|
|
5023
|
+
}
|
|
5024
|
+
return (h$1("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, h$1("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, h$1("thead", { class: "duet-editable-table-header" }, h$1("tr", null, h$1("th", { class: {
|
|
5025
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
5026
|
+
} }, !this.hideGroups ? (getLocaleString(group.label)) : (h$1("duet-visually-hidden", null, getLocaleString(group.label)))), h$1("th", { class: {
|
|
5027
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
5028
|
+
} }, h$1("duet-visually-hidden", null, group.actionLabel
|
|
5029
|
+
? getLocaleString(group.actionLabel)
|
|
5030
|
+
: getLocaleString(this.actionLabelDefaults))))), h$1("tbody", null, currentGroup.map(dataAsArray => {
|
|
5031
|
+
const [key, value] = dataAsArray;
|
|
5032
|
+
return (h$1("duet-editable-table-item", { keyName: key, data: Object.assign({}, value), groupId: group.id, part: group.id, actions: this.internalActionsArray }));
|
|
5033
|
+
})))));
|
|
5034
|
+
})));
|
|
5035
|
+
}
|
|
5036
|
+
get element() { return this; }
|
|
5037
|
+
static get style() { return duetEditableTableCss; }
|
|
5038
|
+
};
|
|
5039
|
+
|
|
5040
|
+
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}";
|
|
5041
|
+
|
|
5042
|
+
let DuetEditableTableButton$1 = class extends H {
|
|
5043
|
+
constructor() {
|
|
5044
|
+
super();
|
|
5045
|
+
this.__registerHost();
|
|
5046
|
+
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
5047
|
+
this.isHovering = false;
|
|
5048
|
+
/**
|
|
5049
|
+
* Theme of the empty state component.
|
|
5050
|
+
*/
|
|
5051
|
+
this.theme = "";
|
|
5052
|
+
/**
|
|
5053
|
+
* action items passed from host component
|
|
5054
|
+
* @internal
|
|
5055
|
+
*/
|
|
5056
|
+
this.actions = undefined;
|
|
5057
|
+
/**
|
|
5058
|
+
* uid that gets passed along when the action is emitted
|
|
5059
|
+
* @internal
|
|
5060
|
+
*/
|
|
5061
|
+
this.uid = "";
|
|
5062
|
+
/**
|
|
5063
|
+
* group associated with action
|
|
5064
|
+
* @internal
|
|
5065
|
+
*/
|
|
5066
|
+
this.group = "";
|
|
5067
|
+
/**
|
|
5068
|
+
* key of the item in the map
|
|
5069
|
+
* @internal
|
|
5070
|
+
*/
|
|
5071
|
+
this.keyName = "";
|
|
5072
|
+
this.onMouseEnter = () => {
|
|
5073
|
+
this.isHovering = true;
|
|
5074
|
+
};
|
|
5075
|
+
this.onMouseLeave = () => {
|
|
5076
|
+
this.isHovering = false;
|
|
5077
|
+
};
|
|
5078
|
+
}
|
|
5079
|
+
/**
|
|
5080
|
+
/**
|
|
5081
|
+
* Component lifecycle events.
|
|
5082
|
+
*/
|
|
5083
|
+
componentWillLoad() {
|
|
5084
|
+
inheritGlobalTheme(this);
|
|
4694
5085
|
}
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
// b) clicking another date picker's button should close the current calendar
|
|
4709
|
-
// and open the new one. this means we can't stopPropagation() on the button itself
|
|
4710
|
-
const isClickOutside = e
|
|
4711
|
-
.composedPath()
|
|
4712
|
-
.every(node => node !== this.dialogWrapperNode && node !== this.datePickerButton);
|
|
4713
|
-
if (isClickOutside) {
|
|
4714
|
-
this.hide(false);
|
|
4715
|
-
}
|
|
5086
|
+
/**
|
|
5087
|
+
/**
|
|
5088
|
+
* private functions
|
|
5089
|
+
*/
|
|
5090
|
+
emitActionEvent(ev) {
|
|
5091
|
+
this.duetEditableItemAction.emit({
|
|
5092
|
+
originalEvent: ev,
|
|
5093
|
+
uid: this.uid,
|
|
5094
|
+
group: this.group,
|
|
5095
|
+
action: this.actions.id,
|
|
5096
|
+
keyName: this.keyName,
|
|
5097
|
+
component: "duet-editable-table-item",
|
|
5098
|
+
});
|
|
4716
5099
|
}
|
|
4717
5100
|
/**
|
|
4718
5101
|
* render() function
|
|
4719
5102
|
* Always the last one in the class.
|
|
4720
5103
|
*/
|
|
4721
5104
|
render() {
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
const minDate = parseISODate(this.min);
|
|
4728
|
-
const maxDate = parseISODate(this.max);
|
|
4729
|
-
const prevMonthDisabled = minDate != null && minDate.getMonth() === focusedMonth && minDate.getFullYear() === focusedYear;
|
|
4730
|
-
const nextMonthDisabled = maxDate != null && maxDate.getMonth() === focusedMonth && maxDate.getFullYear() === focusedYear;
|
|
4731
|
-
let minYear = selectedYear - 10;
|
|
4732
|
-
let maxYear = selectedYear + 10;
|
|
4733
|
-
if (minDate) {
|
|
4734
|
-
minYear = Math.max(minYear, minDate.getFullYear());
|
|
4735
|
-
}
|
|
4736
|
-
if (maxDate) {
|
|
4737
|
-
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
4738
|
-
}
|
|
4739
|
-
return (h$1(Host, { class: { "duet-expand": this.expand, "duet-m-0": this.margin === "none" } }, h$1("div", { class: "duet-date" }, h$1(DatePickerInput, { value: this.value, valueAsDate: valueAsDate, formattedValue: this.inputValue, language: this.language, onInput: this.handleInputChange, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.toggleOpen, name: this.name, disabled: this.disabled, error: this.error, role: this.role, required: this.required, theme: this.theme, tooltip: this.tooltip, tooltipDirection: this.tooltipDirection, labelHidden: this.labelHidden, placeholder: this.placeholder, inputLabel: this.label, identifier: this.identifier, buttonRef: element => (this.datePickerButton = element), inputRef: element => (this.datePickerInput = element), accessibleActiveDescendant: this.accessibleActiveDescendant, accessibleControls: this.accessibleControls, accessibleOwns: this.accessibleOwns, accessibleDescribedBy: this.accessibleDescribedBy, echoPlaceholder: this.echoPlaceholder, caption: this.caption })), h$1("div", { class: {
|
|
4740
|
-
"duet-theme-turva": this.theme === "turva",
|
|
4741
|
-
"duet-date-dialog": true,
|
|
4742
|
-
left: this.direction === "left",
|
|
4743
|
-
error: !!this.error,
|
|
4744
|
-
active: this.open,
|
|
4745
|
-
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h$1(FocusGuard, { moveFocusTo: this.focusedDayNode }), h$1("div", { class: "duet-date-dialog-wrapper", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, h$1("duet-visually-hidden", { "aria-live": "polite" }, text.keyboardInstruction), h$1("div", { class: "duet-date-dialog-mobile-header" }, h$1("duet-label", { margin: "none" }, this.label), h$1("button", { class: "duet-date-picker-close", ref: element => (this.closeButtonNode = element), onClick: () => this.hide(), type: "button" }, h$1("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xx-small" }), h$1("duet-visually-hidden", null, text.closeLabel))), h$1("div", { class: "duet-date-dialog-header" }, h$1("div", { class: "duet-date-dialog-dropdowns" }, h$1("duet-visually-hidden", null, h$1("h2", { id: this.dialogLabelId, "aria-live": "polite", "aria-atomic": "true" }, text.monthLabels[focusedMonth], " ", this.focusedDay.getFullYear())), h$1("duet-visually-hidden", null, h$1("label", { htmlFor: this.monthSelectId }, text.monthSelectLabel)), h$1("div", { class: "duet-date-dialog-select" }, h$1("select", { id: this.monthSelectId, class: "duet-date-month-select", ref: element => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, text.monthLabels.map((month, i) => (h$1("option", { key: month, value: i, selected: i === focusedMonth, disabled: !inRange(new Date(focusedYear, i, 1), minDate ? startOfMonth(minDate) : null, maxDate ? endOfMonth(maxDate) : null) }, month)))), h$1("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h$1("span", null, text.monthLabelsShort[focusedMonth]), h$1("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" }))), h$1("duet-visually-hidden", null, h$1("label", { htmlFor: this.yearSelectId }, text.yearSelectLabel)), h$1("div", { class: "duet-date-dialog-select" }, h$1("select", { id: this.yearSelectId, class: "duet-date-year-select", onChange: this.handleYearSelect }, range(minYear, maxYear).map(year => (h$1("option", { key: year, selected: year === focusedYear }, year)))), h$1("div", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h$1("span", null, this.focusedDay.getFullYear()), h$1("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" })))), h$1("div", { class: "duet-date-dialog-buttons" }, h$1("button", { class: "duet-date-dialog-prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, type: "button" }, h$1("duet-icon", { name: "action-arrow-left-small", color: "currentColor", margin: "none", size: "xx-small" }), h$1("duet-visually-hidden", null, text.prevMonthLabel)), h$1("button", { class: "duet-date-dialog-next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, type: "button" }, h$1("duet-icon", { name: "action-arrow-right-small", color: "currentColor", margin: "none", size: "xx-small" }), h$1("duet-visually-hidden", null, text.nextMonthLabel)))), h$1(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, language: this.language, theme: this.theme, min: minDate, max: maxDate, focusedDayRef: element => (this.focusedDayNode = element), onFocusEnter: this.enableActiveFocus, onFocusExit: this.disableActiveFocus })), h$1(FocusGuard, { moveFocusTo: this.closeButtonNode }))));
|
|
5105
|
+
return (h$1("button", { style: {
|
|
5106
|
+
"border-color": this.isHovering
|
|
5107
|
+
? getColorByName(this.actions.color_hover)
|
|
5108
|
+
: getColorByName(this.actions.color),
|
|
5109
|
+
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) }, h$1("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.isHovering ? this.actions.color_hover : this.actions.color, margin: "none" })));
|
|
4746
5110
|
}
|
|
4747
|
-
get
|
|
4748
|
-
static get
|
|
4749
|
-
"min": ["updateValidity"],
|
|
4750
|
-
"max": ["updateValidity"],
|
|
4751
|
-
"value": ["updateValidity", "updateInternalValue"],
|
|
4752
|
-
"required": ["updateValidity"]
|
|
4753
|
-
}; }
|
|
4754
|
-
static get style() { return duetDatePickerCss; }
|
|
5111
|
+
get el() { return this; }
|
|
5112
|
+
static get style() { return duetEditableTableButtonCss; }
|
|
4755
5113
|
};
|
|
4756
5114
|
|
|
4757
|
-
|
|
5115
|
+
//simple functional component that renders the data in the table
|
|
5116
|
+
const TableData = ({ data, groupId }, _children) => {
|
|
5117
|
+
if (typeof data === "string") {
|
|
5118
|
+
return h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content` });
|
|
5119
|
+
}
|
|
5120
|
+
else {
|
|
5121
|
+
return (h("td", { class: "duet-editable-table-content", part: `${groupId}content` }, data));
|
|
5122
|
+
}
|
|
5123
|
+
};
|
|
4758
5124
|
|
|
4759
|
-
|
|
5125
|
+
const duetEditableTableItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";
|
|
5126
|
+
|
|
5127
|
+
let DuetEditableTableItem$1 = class extends H {
|
|
4760
5128
|
constructor() {
|
|
4761
5129
|
super();
|
|
4762
5130
|
this.__registerHost();
|
|
4763
|
-
|
|
5131
|
+
this.__attachShadow();
|
|
5132
|
+
this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
|
|
5133
|
+
this.isHovering = false;
|
|
4764
5134
|
/**
|
|
4765
|
-
* Theme of the
|
|
5135
|
+
* Theme of the empty state component.
|
|
4766
5136
|
*/
|
|
4767
5137
|
this.theme = "";
|
|
4768
5138
|
/**
|
|
4769
|
-
*
|
|
5139
|
+
* Actions that can be performed on the element
|
|
4770
5140
|
*/
|
|
4771
|
-
this.
|
|
5141
|
+
this.actions = undefined;
|
|
5142
|
+
/**
|
|
5143
|
+
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
5144
|
+
* @internal
|
|
5145
|
+
*/
|
|
5146
|
+
this.groupId = "";
|
|
5147
|
+
/**
|
|
5148
|
+
* Key used to identify item, when running actions
|
|
5149
|
+
*/
|
|
5150
|
+
this.keyName = "";
|
|
5151
|
+
/**
|
|
5152
|
+
* Object of data itemsused to render the entire row
|
|
5153
|
+
*/
|
|
5154
|
+
this.data = undefined;
|
|
5155
|
+
}
|
|
5156
|
+
watchPropHandler(_newValue, _oldValue) {
|
|
5157
|
+
// console.log("The new value of activated is: ", _newValue)
|
|
4772
5158
|
}
|
|
4773
5159
|
/**
|
|
5160
|
+
/**
|
|
4774
5161
|
* Component lifecycle events.
|
|
4775
5162
|
*/
|
|
4776
5163
|
componentWillLoad() {
|
|
4777
5164
|
inheritGlobalTheme(this);
|
|
4778
5165
|
}
|
|
5166
|
+
/**
|
|
5167
|
+
/**
|
|
5168
|
+
* private functions
|
|
5169
|
+
*/
|
|
4779
5170
|
/**
|
|
4780
5171
|
* render() function
|
|
4781
5172
|
* Always the last one in the class.
|
|
4782
5173
|
*/
|
|
4783
5174
|
render() {
|
|
4784
|
-
return (h$1("div", { class: {
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
}
|
|
5175
|
+
return (h$1(Host, { role: "row" }, h$1(TableData, { data: this.data.item, groupId: this.groupId }), h$1("td", { class: "duet-editable-table-actions" }, h$1("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
5176
|
+
const { map = undefined } = result;
|
|
5177
|
+
// if map has been specified, only show the current action if groupID matches the map array
|
|
5178
|
+
if (map && !map.includes(this.groupId)) {
|
|
5179
|
+
return;
|
|
5180
|
+
}
|
|
5181
|
+
return (h$1("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
5182
|
+
})))));
|
|
4790
5183
|
}
|
|
4791
|
-
get
|
|
4792
|
-
static get
|
|
5184
|
+
get el() { return this; }
|
|
5185
|
+
static get watchers() { return {
|
|
5186
|
+
"data": ["watchPropHandler"]
|
|
5187
|
+
}; }
|
|
5188
|
+
static get style() { return duetEditableTableItemCss; }
|
|
4793
5189
|
};
|
|
4794
5190
|
|
|
4795
5191
|
const duetEmptyStateCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";
|
|
4796
5192
|
|
|
4797
|
-
let DuetEmptyState$1 = class extends
|
|
5193
|
+
let DuetEmptyState$1 = class extends H {
|
|
4798
5194
|
constructor() {
|
|
4799
5195
|
super();
|
|
4800
5196
|
this.__registerHost();
|
|
4801
|
-
|
|
5197
|
+
this.__attachShadow();
|
|
4802
5198
|
/**
|
|
4803
5199
|
* Theme of the empty state component.
|
|
4804
5200
|
*/
|
|
@@ -4834,11 +5230,11 @@ let DuetEmptyState$1 = class extends HTMLElement {
|
|
|
4834
5230
|
|
|
4835
5231
|
const duetFieldsetCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{border:0}legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
4836
5232
|
|
|
4837
|
-
let DuetFieldset$1 = class extends
|
|
5233
|
+
let DuetFieldset$1 = class extends H {
|
|
4838
5234
|
constructor() {
|
|
4839
5235
|
super();
|
|
4840
5236
|
this.__registerHost();
|
|
4841
|
-
|
|
5237
|
+
this.__attachShadow();
|
|
4842
5238
|
this.errorId = createID("DuetError");
|
|
4843
5239
|
this.labelId = createID("DuetLabel");
|
|
4844
5240
|
this.hasTooltip = false;
|
|
@@ -4902,11 +5298,11 @@ const createEvent$1 = (ev, data) => ({
|
|
|
4902
5298
|
data,
|
|
4903
5299
|
originalEvent: ev,
|
|
4904
5300
|
});
|
|
4905
|
-
let DuetFooter$1 = class extends
|
|
5301
|
+
let DuetFooter$1 = class extends H {
|
|
4906
5302
|
constructor() {
|
|
4907
5303
|
super();
|
|
4908
5304
|
this.__registerHost();
|
|
4909
|
-
|
|
5305
|
+
this.__attachShadow();
|
|
4910
5306
|
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
4911
5307
|
this.duetLogoClick = createEvent$2(this, "duetLogoClick", 7);
|
|
4912
5308
|
this.duetMenuClick = createEvent$2(this, "duetMenuClick", 7);
|
|
@@ -4951,7 +5347,7 @@ let DuetFooter$1 = class extends HTMLElement {
|
|
|
4951
5347
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
4952
5348
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
4953
5349
|
*/
|
|
4954
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
5350
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
|
|
4955
5351
|
/**
|
|
4956
5352
|
* Component event handling.
|
|
4957
5353
|
*/
|
|
@@ -5023,10 +5419,11 @@ const duetGridCss = ".sc-duet-grid-h{box-sizing:border-box;padding:0;margin:0;ba
|
|
|
5023
5419
|
function isGridItem(element) {
|
|
5024
5420
|
return element.tagName.toLowerCase() === "duet-grid-item";
|
|
5025
5421
|
}
|
|
5026
|
-
let DuetGrid$1 = class extends
|
|
5422
|
+
let DuetGrid$1 = class extends H {
|
|
5027
5423
|
constructor() {
|
|
5028
5424
|
super();
|
|
5029
5425
|
this.__registerHost();
|
|
5426
|
+
this.distributeFormElement = false;
|
|
5030
5427
|
/**
|
|
5031
5428
|
* Enable or disable the automatic responsive behaviour of the grid component.
|
|
5032
5429
|
* Setting this option to "true" makes sure that contents are stacked vertically
|
|
@@ -5043,7 +5440,9 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5043
5440
|
*/
|
|
5044
5441
|
this.direction = "horizontal";
|
|
5045
5442
|
/**
|
|
5046
|
-
* Adjusts the vertical alignment of the grid items
|
|
5443
|
+
* Adjusts the vertical alignment of the grid items, if set to "form_distribute"
|
|
5444
|
+
* the grid will try to calculate correct paddings for any duet-input fields inside duet-grid-items,
|
|
5445
|
+
* so that they align even when displaying errors.
|
|
5047
5446
|
*/
|
|
5048
5447
|
this.alignment = "top";
|
|
5049
5448
|
/**
|
|
@@ -5055,14 +5454,34 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5055
5454
|
*/
|
|
5056
5455
|
this.mobile = "";
|
|
5057
5456
|
}
|
|
5457
|
+
/**
|
|
5458
|
+
* Private functions
|
|
5459
|
+
*/
|
|
5460
|
+
/**
|
|
5461
|
+
* Returns the element height including margins
|
|
5462
|
+
* @param element - element
|
|
5463
|
+
* @returns {number}
|
|
5464
|
+
*/
|
|
5465
|
+
outerHeight(element) {
|
|
5466
|
+
const height = element.offsetHeight, style = window.getComputedStyle(element);
|
|
5467
|
+
return ["top", "bottom"]
|
|
5468
|
+
.map(side => parseInt(style[`margin-${side}`]))
|
|
5469
|
+
.reduce((total, side) => total + side, height);
|
|
5470
|
+
}
|
|
5058
5471
|
/**
|
|
5059
5472
|
* Component lifecycle events.
|
|
5060
5473
|
*/
|
|
5061
5474
|
async connectedCallback() {
|
|
5062
5475
|
const el = this.element;
|
|
5476
|
+
this.distributeFormElement = this.alignment === "form_distribute";
|
|
5063
5477
|
this.mutationO = watchForOptions(el, "duet-grid-item", () => {
|
|
5064
5478
|
this.updateGridItems();
|
|
5065
5479
|
});
|
|
5480
|
+
if (this.distributeFormElement) {
|
|
5481
|
+
this.mutation1 = watchForElement(el, "duet-input", () => {
|
|
5482
|
+
this.updateGridItemsWithInputFields();
|
|
5483
|
+
});
|
|
5484
|
+
}
|
|
5066
5485
|
this.updateGridItems();
|
|
5067
5486
|
}
|
|
5068
5487
|
disconnectedCallback() {
|
|
@@ -5070,6 +5489,10 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5070
5489
|
this.mutationO.disconnect();
|
|
5071
5490
|
this.mutationO = undefined;
|
|
5072
5491
|
}
|
|
5492
|
+
if (this.mutation1) {
|
|
5493
|
+
this.mutation1.disconnect();
|
|
5494
|
+
this.mutation1 = undefined;
|
|
5495
|
+
}
|
|
5073
5496
|
}
|
|
5074
5497
|
/**
|
|
5075
5498
|
* Local methods
|
|
@@ -5081,6 +5504,27 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5081
5504
|
item.breakpoint = this.breakpoint;
|
|
5082
5505
|
});
|
|
5083
5506
|
}
|
|
5507
|
+
async updateGridItemsWithInputFields() {
|
|
5508
|
+
const items = Array.from(this.element.children).filter(isGridItem);
|
|
5509
|
+
let maxHeight = 0;
|
|
5510
|
+
const sizes = [];
|
|
5511
|
+
items.forEach(item => {
|
|
5512
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
5513
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
5514
|
+
sizes.push(height);
|
|
5515
|
+
});
|
|
5516
|
+
maxHeight = Math.max(...sizes);
|
|
5517
|
+
items.forEach(item => {
|
|
5518
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
5519
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
5520
|
+
if (height < maxHeight) {
|
|
5521
|
+
item.setAttribute("style", `padding-bottom: ${maxHeight - height}px;`);
|
|
5522
|
+
}
|
|
5523
|
+
else if (height === maxHeight) {
|
|
5524
|
+
item.setAttribute("style", `padding-bottom: 0px;`);
|
|
5525
|
+
}
|
|
5526
|
+
});
|
|
5527
|
+
}
|
|
5084
5528
|
/**
|
|
5085
5529
|
* render() function
|
|
5086
5530
|
* Always the last one in the class.
|
|
@@ -5090,7 +5534,7 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5090
5534
|
"duet-grid": true,
|
|
5091
5535
|
"duet-no-stacking": !this.responsive,
|
|
5092
5536
|
"duet-grid-align-top": this.alignment === "top",
|
|
5093
|
-
"duet-grid-align-bottom": this.alignment === "bottom",
|
|
5537
|
+
"duet-grid-align-bottom": this.alignment === "bottom" || this.alignment === "form_distribute",
|
|
5094
5538
|
"duet-grid-align-center": this.alignment === "center",
|
|
5095
5539
|
"duet-grid-align-stretch": this.alignment === "stretch",
|
|
5096
5540
|
"duet-grid-align-baseline": this.alignment === "baseline",
|
|
@@ -5120,7 +5564,7 @@ let DuetGrid$1 = class extends HTMLElement {
|
|
|
5120
5564
|
|
|
5121
5565
|
const duetGridItemCss = ".sc-duet-grid-item-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:#00294d}.sc-duet-grid-item-h:first-child,.sc-duet-grid-item-h:first-of-type{padding-left:0}.sc-duet-grid-item-h:last-child,.sc-duet-grid-item-h:last-of-type{padding-right:0}@media (max-width: 35.9375em){.duet-grid-item-responsive.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){.duet-grid-item-br-medium.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){.duet-grid-item-responsive.duet-grid-item-br-medium.sc-duet-grid-item-h{padding-right:0;padding-left:0}}@media screen and (max-width: 64em){.duet-grid-item-br-x-large.sc-duet-grid-item-h{width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){.duet-grid-item-responsive.duet-grid-item-br-x-large.sc-duet-grid-item-h{padding-right:0;padding-left:0}}.duet-grid-item-fill.sc-duet-grid-item-h{flex:1 1 auto;width:100%}.duet-theme-turva.sc-duet-grid-item-h{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-m-0.sc-duet-grid-item-h{padding:0 !important;margin:0 !important}";
|
|
5122
5566
|
|
|
5123
|
-
let DuetGridItem$1 = class extends
|
|
5567
|
+
let DuetGridItem$1 = class extends H {
|
|
5124
5568
|
constructor() {
|
|
5125
5569
|
super();
|
|
5126
5570
|
this.__registerHost();
|
|
@@ -5373,11 +5817,11 @@ const createEvent = (ev, data) => ({
|
|
|
5373
5817
|
data,
|
|
5374
5818
|
originalEvent: ev,
|
|
5375
5819
|
});
|
|
5376
|
-
let DuetHeader$1 = class extends
|
|
5820
|
+
let DuetHeader$1 = class extends H {
|
|
5377
5821
|
constructor() {
|
|
5378
5822
|
super();
|
|
5379
5823
|
this.__registerHost();
|
|
5380
|
-
|
|
5824
|
+
this.__attachShadow();
|
|
5381
5825
|
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
5382
5826
|
this.duetSessionClick = createEvent$2(this, "duetSessionClick", 7);
|
|
5383
5827
|
this.duetUserClick = createEvent$2(this, "duetUserClick", 7);
|
|
@@ -5414,10 +5858,26 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5414
5858
|
*/
|
|
5415
5859
|
this.language = getLanguage();
|
|
5416
5860
|
/**
|
|
5417
|
-
*
|
|
5418
|
-
*
|
|
5861
|
+
* Default strings for accessibleI18nLabels
|
|
5862
|
+
* @default {
|
|
5863
|
+
fi: {
|
|
5864
|
+
skipLabel: "Siirry pääsisältöön",
|
|
5865
|
+
changeLanguage: "Vaihda kieltä",
|
|
5866
|
+
activeLanguage: "Suomi valittuna",
|
|
5867
|
+
},
|
|
5868
|
+
sv: {
|
|
5869
|
+
skipLabel: "Hoppa till huvudinnehåll",
|
|
5870
|
+
changeLanguage: "Ändra Språk",
|
|
5871
|
+
activeLanguage: "Svenska valt",
|
|
5872
|
+
},
|
|
5873
|
+
en: {
|
|
5874
|
+
skipLabel: "Skip to main content",
|
|
5875
|
+
changeLanguage: "Change language",
|
|
5876
|
+
activeLanguage: "English selected",
|
|
5877
|
+
},
|
|
5878
|
+
}
|
|
5419
5879
|
*/
|
|
5420
|
-
this.
|
|
5880
|
+
this.accessibleI18nLabelsDefaults = {
|
|
5421
5881
|
fi: {
|
|
5422
5882
|
skipLabel: "Siirry pääsisältöön",
|
|
5423
5883
|
changeLanguage: "Vaihda kieltä",
|
|
@@ -5454,7 +5914,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5454
5914
|
},
|
|
5455
5915
|
}
|
|
5456
5916
|
*/
|
|
5457
|
-
this.accessibleI18nLabels = getLocaleString(this.
|
|
5917
|
+
this.accessibleI18nLabels = getLocaleString(this.accessibleI18nLabelsDefaults);
|
|
5458
5918
|
/**
|
|
5459
5919
|
* Property to change accessibleLabelExternal defaults on the component.
|
|
5460
5920
|
* normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
|
|
@@ -5470,7 +5930,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5470
5930
|
* Property to change accessibleLabel defaults on the component.
|
|
5471
5931
|
* normally you would handle these strings on an application level and override @accessibleLabel when needed
|
|
5472
5932
|
*/
|
|
5473
|
-
this.
|
|
5933
|
+
this.accessibleLabelDefaults = {
|
|
5474
5934
|
fi: "Valikko",
|
|
5475
5935
|
sv: "Meny",
|
|
5476
5936
|
en: "Menu",
|
|
@@ -5484,7 +5944,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5484
5944
|
en: "Menu",
|
|
5485
5945
|
}
|
|
5486
5946
|
*/
|
|
5487
|
-
this.accessibleLabel = getLocaleString(this.
|
|
5947
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults);
|
|
5488
5948
|
/**
|
|
5489
5949
|
* URL that the logo link points to.
|
|
5490
5950
|
*/
|
|
@@ -5763,13 +6223,13 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5763
6223
|
static get style() { return duetHeaderCss; }
|
|
5764
6224
|
};
|
|
5765
6225
|
|
|
5766
|
-
const duetHeadingCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.duet-heading{margin-bottom:16px !important;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;letter-spacing:-0.01rem}@media (min-width: 36em){.duet-heading{margin-bottom:20px !important}}.duet-heading.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:italic;font-weight:700;color:#171c3a}.duet-heading.duet-heading-border{padding-bottom:20px;border-bottom:1px solid #e1e3e6}.duet-heading.duet-heading-hyphenate{-webkit-hyphens:auto;hyphens:auto}.duet-heading.h0{font-size:9.4vw}.duet-heading.h0.duet-p-0{padding:0 !important}.duet-heading.h0.duet-m-0{margin:0 !important}@media (max-width: 31.914893617rem){.duet-heading.h0{font-size:3rem}}@media (min-width: 47.8723404255rem){.duet-heading.h0{font-size:4.5rem}}@media (max-width: 22.5em){.duet-heading.h0{font-size:2.25rem}}.duet-heading.h1{font-size:7vw}.duet-heading.h1.duet-p-0{padding:0 !important}.duet-heading.h1.duet-m-0{margin:0 !important}@media (max-width: 32.1428571429rem){.duet-heading.h1{font-size:2.25rem}}@media (min-width: 42.8571428571rem){.duet-heading.h1{font-size:3rem}}@media (max-width: 22.5em){.duet-heading.h1{font-size:1.5rem}}.duet-heading.h2{font-size:5.8vw}.duet-heading.h2.duet-p-0{padding:0 !important}.duet-heading.h2.duet-m-0{margin:0 !important}@media (max-width: 25.8620689655rem){.duet-heading.h2{font-size:1.5rem}}@media (min-width: 38.7931034483rem){.duet-heading.h2{font-size:2.25rem}}@media (max-width: 22.5em){.duet-heading.h2{font-size:1.375rem}}.duet-heading.h3{margin-bottom:12px !important;font-size:4.2vw}.duet-heading.h3.duet-p-0{padding:0 !important}.duet-heading.h3.duet-m-0{margin:0 !important}@media (max-width: 29.7619047619rem){.duet-heading.h3{font-size:1.25rem}}@media (min-width: 35.7142857143rem){.duet-heading.h3{font-size:1.5rem}}.duet-heading.h3.duet-theme-turva{font-style:normal}.duet-heading.h3.duet-heading-border{padding-bottom:20px}.duet-heading.h4{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}.duet-heading.h4.duet-p-0{padding:0 !important}.duet-heading.h4.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h4{font-size:1.1rem}}@media (min-width: 31.25rem){.duet-heading.h4{font-size:1.25rem}}.duet-heading.h4.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h4.duet-heading-border{padding-bottom:20px}.duet-heading.h5{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}.duet-heading.h5.duet-p-0{padding:0 !important}.duet-heading.h5.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h5{font-size:1.1rem}}@media (min-width: 28.4090909091rem){.duet-heading.h5{font-size:1.1363636364rem}}.duet-heading.h5.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h5.duet-heading-border{padding-bottom:16px}.duet-heading.h6{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}.duet-heading.h6.duet-p-0{padding:0 !important}.duet-heading.h6.duet-m-0{margin:0 !important}.duet-heading.h6.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h6.duet-heading-border{padding-bottom:16px}.duet-heading.duet-semibold,.duet-heading.duet-theme-turva.duet-semibold{font-style:normal !important;font-weight:600 !important}";
|
|
6226
|
+
const duetHeadingCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.duet-heading{margin-bottom:16px !important;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;letter-spacing:-0.01rem;word-break:break-word}@media (min-width: 36em){.duet-heading{margin-bottom:20px !important}}.duet-heading.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:italic;font-weight:700;color:#171c3a}.duet-heading.duet-heading-border{padding-bottom:20px;border-bottom:1px solid #e1e3e6}.duet-heading.duet-heading-border.duet-heading-border-solid{border-bottom-color:#657787}.duet-heading.duet-heading-hyphenate{-webkit-hyphens:auto;hyphens:auto}.duet-heading.h0{font-size:9.4vw}.duet-heading.h0.duet-p-0{padding:0 !important}.duet-heading.h0.duet-m-0{margin:0 !important}@media (max-width: 31.914893617rem){.duet-heading.h0{font-size:3rem}}@media (min-width: 47.8723404255rem){.duet-heading.h0{font-size:4.5rem}}@media (max-width: 22.5em){.duet-heading.h0{font-size:2.25rem}}.duet-heading.h1{font-size:7vw}.duet-heading.h1.duet-p-0{padding:0 !important}.duet-heading.h1.duet-m-0{margin:0 !important}@media (max-width: 32.1428571429rem){.duet-heading.h1{font-size:2.25rem}}@media (min-width: 42.8571428571rem){.duet-heading.h1{font-size:3rem}}@media (max-width: 22.5em){.duet-heading.h1{font-size:1.5rem}}.duet-heading.h2{font-size:5.8vw}.duet-heading.h2.duet-p-0{padding:0 !important}.duet-heading.h2.duet-m-0{margin:0 !important}@media (max-width: 25.8620689655rem){.duet-heading.h2{font-size:1.5rem}}@media (min-width: 38.7931034483rem){.duet-heading.h2{font-size:2.25rem}}@media (max-width: 22.5em){.duet-heading.h2{font-size:1.375rem}}.duet-heading.h3{margin-bottom:12px !important;font-size:4.2vw}.duet-heading.h3.duet-p-0{padding:0 !important}.duet-heading.h3.duet-m-0{margin:0 !important}@media (max-width: 29.7619047619rem){.duet-heading.h3{font-size:1.25rem}}@media (min-width: 35.7142857143rem){.duet-heading.h3{font-size:1.5rem}}.duet-heading.h3.duet-theme-turva{font-style:normal}.duet-heading.h3.duet-heading-border{padding-bottom:20px}.duet-heading.h4{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}.duet-heading.h4.duet-p-0{padding:0 !important}.duet-heading.h4.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h4{font-size:1.1rem}}@media (min-width: 31.25rem){.duet-heading.h4{font-size:1.25rem}}.duet-heading.h4.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h4.duet-heading-border{padding-bottom:20px}.duet-heading.h5{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}.duet-heading.h5.duet-p-0{padding:0 !important}.duet-heading.h5.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h5{font-size:1.1rem}}@media (min-width: 28.4090909091rem){.duet-heading.h5{font-size:1.1363636364rem}}.duet-heading.h5.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h5.duet-heading-border{padding-bottom:16px}.duet-heading.h6{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}.duet-heading.h6.duet-p-0{padding:0 !important}.duet-heading.h6.duet-m-0{margin:0 !important}.duet-heading.h6.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h6.duet-heading-border{padding-bottom:16px}.duet-heading.duet-semibold,.duet-heading.duet-theme-turva.duet-semibold{font-style:normal !important;font-weight:600 !important}";
|
|
5767
6227
|
|
|
5768
|
-
let DuetHeading$1 = class extends
|
|
6228
|
+
let DuetHeading$1 = class extends H {
|
|
5769
6229
|
constructor() {
|
|
5770
6230
|
super();
|
|
5771
6231
|
this.__registerHost();
|
|
5772
|
-
|
|
6232
|
+
this.__attachShadow();
|
|
5773
6233
|
/**
|
|
5774
6234
|
* The actual heading level used in the HTML markup.
|
|
5775
6235
|
*/
|
|
@@ -5779,7 +6239,7 @@ let DuetHeading$1 = class extends HTMLElement {
|
|
|
5779
6239
|
*/
|
|
5780
6240
|
this.margin = "auto";
|
|
5781
6241
|
/**
|
|
5782
|
-
* Enable or disable the border underneath the heading
|
|
6242
|
+
* Enable or disable the border underneath the heading, solid will darken the border
|
|
5783
6243
|
*/
|
|
5784
6244
|
this.border = false;
|
|
5785
6245
|
/**
|
|
@@ -5812,11 +6272,12 @@ let DuetHeading$1 = class extends HTMLElement {
|
|
|
5812
6272
|
* Always the last one in the class.
|
|
5813
6273
|
*/
|
|
5814
6274
|
render() {
|
|
5815
|
-
const TagName = sanitizeString(this.level);
|
|
6275
|
+
const TagName = sanitizeString$1(this.level);
|
|
5816
6276
|
const color = getColorByName(this.color);
|
|
5817
6277
|
return (h$1(TagName, { class: {
|
|
5818
6278
|
"duet-heading": true,
|
|
5819
|
-
"duet-heading-border": this.border,
|
|
6279
|
+
"duet-heading-border": this.border !== false,
|
|
6280
|
+
"duet-heading-border-solid": this.border === "solid",
|
|
5820
6281
|
"duet-semibold": this.weight === "semibold",
|
|
5821
6282
|
"duet-heading-hyphenate": this.hyphenate,
|
|
5822
6283
|
"duet-m-0": this.margin === "none",
|
|
@@ -5830,11 +6291,11 @@ let DuetHeading$1 = class extends HTMLElement {
|
|
|
5830
6291
|
|
|
5831
6292
|
const duetHeroCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-hero{position:relative;display:block;width:100%;padding:48px 28px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;text-decoration:none;text-shadow:none;text-transform:none;background:#00294d}.duet-hero.duet-p-0{padding:0 !important}.duet-hero.duet-m-0{margin:0 !important}.duet-hero.duet-hero-text-center{text-align:center !important}.duet-hero.duet-hero-light{padding-bottom:0 !important}@media (min-width: 62em){.duet-hero.duet-hero-light{padding-bottom:28px !important}}.duet-hero.duet-hero-with-image{padding-bottom:20px !important;margin-bottom:-36px}@media (min-width: 48em){.duet-hero.duet-hero-with-image{padding-bottom:28px !important}}@media (min-width: 62em){.duet-hero.duet-hero-with-image{padding-bottom:36px !important;margin-bottom:-20px}}.duet-hero.duet-hero-light,.duet-hero.duet-hero-with-image{color:#00294d;background-color:white;background-image:linear-gradient(#f3f9fc, #f9fcfe)}.duet-hero.duet-hero-light::before,.duet-hero.duet-hero-with-image::before{position:absolute;top:100%;left:0;z-index:-1;width:100%;height:400px;content:\"\";background-image:linear-gradient(#f9fcfe, white)}.duet-hero.duet-hero-light.duet-theme-turva,.duet-hero.duet-hero-with-image.duet-theme-turva{color:#171c3a;background-image:linear-gradient(#f5f5f7, #fafafb)}.duet-hero.duet-hero-light.duet-theme-turva::before,.duet-hero.duet-hero-with-image.duet-theme-turva::before{background-image:linear-gradient(#fafafb, white)}.duet-hero.duet-hero-gray{color:#00294d;background:#f5f8fa}.duet-hero.duet-hero-gray.duet-theme-turva{background:#f5f5f7}@media (min-width: 62em){.duet-hero.duet-hero-gray .duet-hero-text{display:inline-block;vertical-align:top}.duet-hero.duet-hero-gray .duet-hero-icon+.duet-hero-text{margin-left:28px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-actions{padding-bottom:65.4545454545px}}@media (min-width: 62em){.duet-hero.duet-hero-gray-with-back{padding-top:72px}}.duet-hero.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";background:#c60c30}@media (min-width: 62em){.duet-hero{min-height:290px;padding:111.6px 56px;overflow:visible}}.duet-hero-icon{display:inline-block;vertical-align:top}@media (min-width: 62em){.duet-hero-icon{margin-top:-8px}}@media (min-width: 62em){.duet-hero-heading{margin-top:12px}}@media (min-width: 62em){.duet-hero-heading-has-pre{margin-top:0}}.duet-hero-wrapper{position:relative;width:100%;max-width:1110px;margin:0 auto;text-align:center}.duet-hero-left-align .duet-hero-wrapper{text-align:left}.duet-hero-with-image .duet-hero-wrapper{position:static}@media (min-width: 62em){.duet-hero-wrapper{text-align:left}}.duet-hero-text{max-width:50rem;margin:0 auto}.duet-hero-text-center .duet-hero-text{text-align:center !important}@media (min-width: 48em){.duet-hero-text{width:80%}.duet-hero-left-align .duet-hero-text{margin:0}}@media (min-width: 62em){.duet-hero-text{width:52%;max-width:none;margin-top:-10px;margin-left:0}.duet-hero-text-center .duet-hero-text{margin-left:auto}}.duet-hero:not(.duet-hero-with-image) .duet-hero-image{width:100%;max-width:400px;height:0;padding-bottom:50%;margin:28px auto 0;background-repeat:no-repeat;background-position:50% 50%;background-size:contain}@media (min-width: 36em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{padding-bottom:40%}}@media (min-width: 48em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:420px;padding-bottom:34%}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{max-width:540px}}@media (min-width: 62em){.duet-hero:not(.duet-hero-with-image) .duet-hero-image{position:absolute;top:50%;right:0;padding-bottom:30%;margin:0;transform:translateY(-50%)}.duet-hero-light .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-60px;padding-bottom:26%}.duet-hero-gray .duet-hero:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}@media (min-width: 62em){.duet-hero-gray:not(.duet-hero-with-image) .duet-hero-image{right:-34px;padding-bottom:20%}}.duet-hero-image-wrapper{position:relative;width:80%;height:0;padding-bottom:80%;margin:-30px auto 36px;overflow:hidden;border-radius:28%;box-shadow:0 0 20px rgba(255, 255, 255, 0.5);transform:rotate(10deg)}.duet-theme-turva .duet-hero-image-wrapper{padding-bottom:68%;border-radius:44% 47% 38% 54%;transform:none}@media screen and (min-width: 440px){.duet-hero-image-wrapper{width:300px;padding-bottom:300px}.duet-theme-turva .duet-hero-image-wrapper{width:80%;padding-bottom:68%}}@media (min-width: 62em){.duet-hero-image-wrapper{position:absolute;top:-60px;right:-50px;width:470px;padding-bottom:470px;margin:0}.duet-theme-turva .duet-hero-image-wrapper{top:-40px;right:-80px;width:536px;padding-bottom:470px}}@media (min-width: 76.25em){.duet-hero-image-wrapper{top:-70px;right:-60px;width:600px;padding-bottom:600px}.duet-theme-turva .duet-hero-image-wrapper{top:-70px;right:-60px;width:650px;padding-bottom:600px}}@media screen and (min-width: 1450px){.duet-hero-image-wrapper{top:-70px;right:25px}.duet-theme-turva .duet-hero-image-wrapper{right:0}}.duet-hero-image-wrapper .duet-hero-image{position:absolute;top:-5%;left:-5%;width:110%;height:110%;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;transform:rotate(-10deg)}.duet-theme-turva .duet-hero-image-wrapper .duet-hero-image{top:0;left:0;width:100%;height:100%;transform:none}.duet-hero-image-mask{position:relative;margin:-48px auto 0;overflow:hidden}@media (min-width: 62em){.duet-hero-image-mask{position:absolute;top:0;right:0;width:470px;height:460px;margin:0}}@media (min-width: 76.25em){.duet-hero-image-mask{width:650px;height:580px}}@media screen and (min-width: 1450px){.duet-hero-image-mask{right:50%;transform:translateX(110%)}.duet-theme-turva .duet-hero-image-mask{transform:translateX(108%)}}duet-heading+duet-button{margin-top:12px !important}.duet-hero-links{width:calc(100% + 56px);margin-top:48px;margin-left:-28px}.duet-hero-minimal .duet-hero-links{margin-top:28px}@media (min-width: 36em){.duet-hero-links{margin-top:72px}.duet-hero-minimal .duet-hero-links{margin-top:28px}}@media (min-width: 62em){.duet-hero-links{width:auto;margin:36px 0 0}.duet-hero-minimal .duet-hero-links{margin-top:28px}}.duet-hero-link{display:flex;align-items:center;width:100%;padding:16px 16px 8px;font-weight:600;-webkit-hyphens:auto;hyphens:auto;line-height:1.25;color:#0077b3;text-align:left;text-decoration:none;border-bottom:1px solid #e1e3e6;transition:background-color 300ms ease}.duet-hero-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-hero-link:focus,.duet-hero-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-hero-link:hover,.duet-hero-link:hover .duet-hero-action-arrow{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-hero-link:hover,.duet-theme-turva .duet-hero-link:hover .duet-hero-action-arrow{color:#940925 !important}.duet-theme-turva .duet-hero-link{color:#c60c30}@media (min-width: 36em){.duet-hero-link{padding:16px 16px 16px 28px}}@media (min-width: 62em){.duet-hero-link{display:inline-flex;width:auto;max-width:350px;padding:0;margin:0 28px 16px 0;border:0;border-radius:4px}}.duet-hero-link:hover{background:rgba(0, 0, 0, 0.02)}@media (min-width: 62em){.duet-hero-link:hover{background:transparent}}.duet-hero-link:first-of-type{border-top:1px solid #e1e3e6}@media (min-width: 62em){.duet-hero-link:first-of-type{margin-top:0;border:0}}.duet-hero-link:last-of-type{margin-bottom:-48px}@media (min-width: 62em){.duet-hero-link:last-of-type{margin-right:0;margin-bottom:0}}.duet-hero-link span{margin-top:-8px}@media (min-width: 36em){.duet-hero-link span{margin:0}}.duet-hero-action-icon{margin-right:8px}@media (min-width: 36em){.duet-hero-action-icon{margin-right:12px}}.duet-hero-action-arrow{margin:0 0 0 8px;color:#0077b3}@media (max-width: 35.9375em){.duet-hero-action-arrow{margin-top:-9px}}.duet-theme-turva .duet-hero-action-arrow{color:#c60c30}.duet-hero-back{margin-bottom:28px !important;display:flex;align-items:center;justify-content:center}.duet-hero-left-align .duet-hero-back{align-items:self-start;justify-content:flex-start}@media (min-width: 36em){.duet-hero-back{margin-bottom:36px !important}.duet-hero-minimal .duet-hero-back{margin-bottom:28px !important}}@media (min-width: 62em){.duet-hero-back{display:block}}.duet-hero-pre{display:inline-block;width:auto;margin-right:8px}.duet-hero-pre+duet-heading{margin-top:0 !important}";
|
|
5832
6293
|
|
|
5833
|
-
let DuetHero$1 = class extends
|
|
6294
|
+
let DuetHero$1 = class extends H {
|
|
5834
6295
|
constructor() {
|
|
5835
6296
|
super();
|
|
5836
6297
|
this.__registerHost();
|
|
5837
|
-
|
|
6298
|
+
this.__attachShadow();
|
|
5838
6299
|
this.duetClick = createEvent$2(this, "duetClick", 7);
|
|
5839
6300
|
this.duetAnalytics = createEvent$2(this, "duetAnalytics", 7);
|
|
5840
6301
|
/**
|
|
@@ -5899,15 +6360,15 @@ let DuetHero$1 = class extends HTMLElement {
|
|
|
5899
6360
|
*/
|
|
5900
6361
|
this.language = getLanguage();
|
|
5901
6362
|
/**
|
|
5902
|
-
*
|
|
5903
|
-
*
|
|
6363
|
+
* Defaults for accessibleLabelExternal
|
|
6364
|
+
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
5904
6365
|
*/
|
|
5905
6366
|
this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
|
|
5906
6367
|
/**
|
|
5907
6368
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
5908
6369
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
5909
6370
|
*/
|
|
5910
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults
|
|
6371
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
5911
6372
|
/**
|
|
5912
6373
|
* URL that the button links to.
|
|
5913
6374
|
*/
|
|
@@ -6073,31 +6534,33 @@ const isValid = (elm) => {
|
|
|
6073
6534
|
};
|
|
6074
6535
|
const buildIconUrl = (iconName) => {
|
|
6075
6536
|
// under normal operations the Icons should always be loaded from the CDN
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
const localURI = `http://localhost:3334/icons/lib/assets/${iconName}.svg`;
|
|
6079
|
-
const host = window.location.hostname;
|
|
6080
|
-
const re = /(localhost|loca\.lt|127\.0\.0\.1|0\.0\.0\.0)/i;
|
|
6081
|
-
if (host.match(re)) {
|
|
6082
|
-
return localURI;
|
|
6083
|
-
}
|
|
6084
|
-
else {
|
|
6085
|
-
return cdnURI;
|
|
6537
|
+
{
|
|
6538
|
+
return `${Env.cdnURIProd}/icons/${Env.duetIconVersion}/lib/assets/${iconName}.svg`;
|
|
6086
6539
|
}
|
|
6087
6540
|
};
|
|
6088
6541
|
const iconCache = {};
|
|
6089
|
-
function fetchIconByUrl(url) {
|
|
6542
|
+
function fetchIconByUrl(url, isServer = Build.isServer) {
|
|
6090
6543
|
if (iconCache[url]) {
|
|
6091
6544
|
return iconCache[url];
|
|
6092
6545
|
}
|
|
6093
6546
|
// we create a function that covers all the fetching, cleanup, validation etc,
|
|
6094
6547
|
// this way we can perform that work just once, and then return the same promise in future.
|
|
6095
6548
|
async function doFetch() {
|
|
6096
|
-
|
|
6097
|
-
if (
|
|
6098
|
-
|
|
6549
|
+
let responseText = "";
|
|
6550
|
+
if (isServer) {
|
|
6551
|
+
const fs = require("fs");
|
|
6552
|
+
const path = require("path");
|
|
6553
|
+
const iconsPath = `${path.resolve(path.dirname(require.resolve("@duetds/icons")), "..")}/lib/assets`;
|
|
6554
|
+
const filenameFromUrl = url.split("/").pop().split("#")[0].split("?")[0];
|
|
6555
|
+
responseText = fs.readFileSync(`${iconsPath}/${filenameFromUrl}`, "utf-8");
|
|
6556
|
+
}
|
|
6557
|
+
else {
|
|
6558
|
+
const res = await fetch(url);
|
|
6559
|
+
if (!res.ok) {
|
|
6560
|
+
throw new Error(`SVG request failed: ${res.status} ${res.statusText}`);
|
|
6561
|
+
}
|
|
6562
|
+
responseText = await res.text();
|
|
6099
6563
|
}
|
|
6100
|
-
const responseText = await res.text();
|
|
6101
6564
|
const svgElement = cleanupSvg(responseText);
|
|
6102
6565
|
if (!isValid(svgElement)) {
|
|
6103
6566
|
throw new Error("SVG validation failed");
|
|
@@ -6117,11 +6580,11 @@ function fetchIconByUrl(url) {
|
|
|
6117
6580
|
|
|
6118
6581
|
const duetIconCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:inline-block;width:auto;max-width:100%;color:inherit;-webkit-tap-highlight-color:transparent}@media (max-width: 35.9375em){:host(.duet-icon-has-outline){margin-bottom:0 !important}}@media (max-width: 35.9375em){:host(.duet-icon-has-background){margin-bottom:0 !important}}:host(.duet-m-0){margin:0 !important}@media (max-width: 35.9375em){:host(.duet-m-0){margin:0 !important}}.duet-icon{-webkit-user-select:none;user-select:none;width:100%;height:100%;transform-origin:top center}.duet-icon.duet-icon-has-outline{padding:12px;border-style:solid;border-width:1px;border-radius:50%}@media (max-width: 35.9375em){.duet-icon.duet-icon-has-outline{outline:1px solid transparent;transform:scale(0.8)}}.duet-icon.duet-icon-has-background{padding:16px;color:white;border-radius:50%}@media (max-width: 35.9375em){.duet-icon.duet-icon-has-background{outline:1px solid transparent;transform:scale(0.8)}}.duet-icon.duet-icon-has-background.duet-theme-turva,.duet-icon.duet-icon-has-background.duet-theme-default{color:white}.duet-icon.duet-icon-has-background.xxx-small .duet-icon-svg,.duet-icon.duet-icon-has-outline.xxx-small .duet-icon-svg{width:10px;height:10px}.duet-icon.duet-icon-has-background.xx-small .duet-icon-svg,.duet-icon.duet-icon-has-outline.xx-small .duet-icon-svg{width:16px;height:16px}@media (max-width: 35.9375em){.duet-icon.duet-icon-not-responsive{transform:scale(1) !important}}.duet-icon.duet-theme-default{color:#0077b3}.duet-icon.duet-theme-turva{color:#c60c30}.duet-icon.auto .duet-icon-svg{width:100%;height:100%}.duet-icon.xxx-small .duet-icon-svg{width:7px;height:7px}.duet-icon.duet-icon-has-background.xxx-small{padding:6px}.duet-icon.duet-icon-has-outline.xxx-small{padding:4px}.duet-icon.xx-small .duet-icon-svg{width:10px;height:10px}.duet-icon.duet-icon-has-background.xx-small{padding:8px}.duet-icon.duet-icon-has-outline.xx-small{padding:7px}.duet-icon.x-small .duet-icon-svg{width:16px;height:16px}.duet-icon.duet-icon-has-outline.x-small{padding:10px}.duet-icon.duet-icon-has-background.x-small{padding:12px}.duet-icon.small .duet-icon-svg{width:20px;height:20px}.duet-icon.duet-icon-has-background.small{padding:14px}.duet-icon.large .duet-icon-svg{width:30px;height:30px}.duet-icon.x-large .duet-icon-svg{width:36px;height:36px}.duet-icon.xx-large .duet-icon-svg{width:48px;height:48px}.duet-icon.xxx-large .duet-icon-svg{width:48px;height:48px}@media (min-width: 48em){.duet-icon.xxx-large .duet-icon-svg{width:72px;height:72px}}.duet-icon .duet-icon-svg{display:block;width:24px;min-width:100%;height:24px;font-size:0}.duet-icon svg{width:100%;min-width:100%;fill:currentColor}";
|
|
6119
6582
|
|
|
6120
|
-
let DuetIcon$1 = class extends
|
|
6583
|
+
let DuetIcon$1 = class extends H {
|
|
6121
6584
|
constructor() {
|
|
6122
6585
|
super();
|
|
6123
6586
|
this.__registerHost();
|
|
6124
|
-
|
|
6587
|
+
this.__attachShadow();
|
|
6125
6588
|
/**
|
|
6126
6589
|
* Theme of the icon. This setting will be overridden when you set the color
|
|
6127
6590
|
* property
|
|
@@ -6173,7 +6636,7 @@ let DuetIcon$1 = class extends HTMLElement {
|
|
|
6173
6636
|
if (this.src && this.icon) {
|
|
6174
6637
|
console.warn("[DUET COMPONENTS]: <duet-icon> should have either have src or icon attributes, but not both. icon attribute will take precedence", "icon:", this.icon, "src:", this.src);
|
|
6175
6638
|
}
|
|
6176
|
-
this.loadIcon();
|
|
6639
|
+
return this.loadIcon();
|
|
6177
6640
|
}
|
|
6178
6641
|
async loadIcon() {
|
|
6179
6642
|
// static icon known at build-time, so we can set it synchronously
|
|
@@ -6277,13 +6740,13 @@ function cleanValue(input, regex) {
|
|
|
6277
6740
|
return newValue;
|
|
6278
6741
|
}
|
|
6279
6742
|
|
|
6280
|
-
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%}";
|
|
6743
|
+
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%}";
|
|
6281
6744
|
|
|
6282
6745
|
const icons = {
|
|
6283
6746
|
search: formSearch,
|
|
6284
6747
|
email: formEmail,
|
|
6285
6748
|
};
|
|
6286
|
-
let DuetInput$1 = class extends
|
|
6749
|
+
let DuetInput$1 = class extends H {
|
|
6287
6750
|
constructor() {
|
|
6288
6751
|
super();
|
|
6289
6752
|
this.__registerHost();
|
|
@@ -6418,7 +6881,7 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6418
6881
|
// (in webkit based browsers settings value trigger cursor position and will set it to EndOfText)
|
|
6419
6882
|
restoreCursor();
|
|
6420
6883
|
}
|
|
6421
|
-
this.isCaptionVisible = !!
|
|
6884
|
+
this.isCaptionVisible = !!this.caption;
|
|
6422
6885
|
const emitEvent = () => this.duetChange.emit({
|
|
6423
6886
|
value: this.value,
|
|
6424
6887
|
component: "duet-input",
|
|
@@ -6437,7 +6900,7 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6437
6900
|
componentWillLoad() {
|
|
6438
6901
|
inheritGlobalTheme(this);
|
|
6439
6902
|
this.disallowedPatternChange();
|
|
6440
|
-
this.isCaptionVisible = !!
|
|
6903
|
+
this.isCaptionVisible = !!this.caption;
|
|
6441
6904
|
}
|
|
6442
6905
|
/**
|
|
6443
6906
|
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
@@ -6472,12 +6935,12 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6472
6935
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
6473
6936
|
"has-icon": !!this.icon || (this.type !== "text" && this.type !== "tel" && this.type !== "password"),
|
|
6474
6937
|
"has-error": !!this.error,
|
|
6475
|
-
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId,
|
|
6938
|
+
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h$1("div", { class: "duet-input-relative" }, this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-input-placeholder", margin: "none", size: "small" }, this.placeholder)), h$1("input", Object.assign({ ref: input => (this.nativeInput = input), onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, type: this.type, class: {
|
|
6476
6939
|
"duet-input": true,
|
|
6477
6940
|
disabled: this.disabled,
|
|
6478
6941
|
"is-number": this.component === "number",
|
|
6479
6942
|
"is-date": this.component === "date",
|
|
6480
|
-
}, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.autoComplete, required: this.required, role: this.role, name: this.name, id: identifier }, inputProps)), !this.icon && this.type !== "text" && this.type !== "tel" && this.type !== "password" && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), h$1("slot", null)), h$1("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span",
|
|
6943
|
+
}, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.autoComplete, required: this.required, role: this.role, name: this.name, id: identifier }, inputProps)), !this.icon && this.type !== "text" && this.type !== "tel" && this.type !== "password" && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (h$1("div", { class: "duet-input-icon" }, h$1("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), h$1("slot", null)), h$1("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", { class: "duet-input-error" }, this.error)))));
|
|
6481
6944
|
}
|
|
6482
6945
|
get element() { return this; }
|
|
6483
6946
|
static get watchers() { return {
|
|
@@ -6487,9 +6950,9 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6487
6950
|
static get style() { return duetInputCss; }
|
|
6488
6951
|
};
|
|
6489
6952
|
|
|
6490
|
-
const duetLabelCss = "*.sc-duet-label,*.sc-duet-label::after,*.sc-duet-label::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-label-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;line-height:1.25;cursor:default}.duet-p-0.sc-duet-label-h{padding:0 !important}.duet-m-0.sc-duet-label-h{margin:0 !important}.duet-m-0.sc-duet-label-h{margin-bottom:0 !important}.duet-small-margin.sc-duet-label-h{margin-top:8px !important;margin-bottom:4px !important}.duet-has-tooltip.sc-duet-label-h{padding-right:48px}@media (min-width: 48em){.duet-has-tooltip.sc-duet-label-h{padding-right:0}}label.sc-duet-label{margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600 !important;line-height:1.25;color:#00294d;text-align:left}label.sc-duet-label span.sc-duet-label{font-size:1rem;font-weight:600 !important}.duet-label-small.sc-duet-label-h label.sc-duet-label{font-size:0.875rem}.duet-label-small.sc-duet-label-h label.sc-duet-label span.sc-duet-label{font-size:0.875rem}.duet-theme-turva.sc-duet-label-h label.sc-duet-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
|
|
6953
|
+
const duetLabelCss = "*.sc-duet-label,*.sc-duet-label::after,*.sc-duet-label::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-label-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;line-height:1.25;cursor:default}.duet-p-0.sc-duet-label-h{padding:0 !important}.duet-m-0.sc-duet-label-h{margin:0 !important}.duet-m-0.sc-duet-label-h{margin-bottom:0 !important}.duet-small-margin.sc-duet-label-h{margin-top:8px !important;margin-bottom:4px !important}.duet-has-tooltip.sc-duet-label-h{padding-right:48px}@media (min-width: 48em){.duet-has-tooltip.sc-duet-label-h{padding-right:0}}label.sc-duet-label{margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600 !important;line-height:1.25;color:#00294d;text-align:left;word-break:break-word}label.sc-duet-label span.sc-duet-label{font-size:1rem;font-weight:600 !important;word-break:break-word}.duet-label-small.sc-duet-label-h label.sc-duet-label{font-size:0.875rem}.duet-label-small.sc-duet-label-h label.sc-duet-label span.sc-duet-label{font-size:0.875rem}.duet-theme-turva.sc-duet-label-h label.sc-duet-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
|
|
6491
6954
|
|
|
6492
|
-
let DuetLabel$1 = class extends
|
|
6955
|
+
let DuetLabel$1 = class extends H {
|
|
6493
6956
|
constructor() {
|
|
6494
6957
|
super();
|
|
6495
6958
|
this.__registerHost();
|
|
@@ -6535,11 +6998,11 @@ function isInternetExplorer() {
|
|
|
6535
6998
|
|
|
6536
6999
|
const duetLayoutCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-layout-has-top{margin-top:0}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout.duet-center{display:flex;align-items:center;justify-content:center;width:100%;max-width:888px}@media (min-width: 36em){.duet-layout.duet-center{padding:0 48px}}@media (min-width: 48em){.duet-layout.duet-center{padding:0 72px}}@media (min-width: 62em){.duet-layout.duet-center{width:100%}}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main,.duet-sidebar,.duet-layout-top,.duet-layout-bottom{display:block;width:100%}.duet-layout-top{position:relative;display:block;width:100%;margin:72px auto 0}.duet-layout-top.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout-top .duet-layout-top-wrapper{padding:0 20px;margin:0 auto}@media (min-width: 36em){.duet-layout-top .duet-layout-top-wrapper{padding:0 28px}}@media (min-width: 62em){.duet-layout-top .duet-layout-top-wrapper{padding:0 56px}}@media (min-width: 76.25em){.duet-layout-top .duet-layout-top-wrapper{max-width:1110px;padding:0}}.duet-center .duet-layout-top-wrapper{max-width:888px}@media (min-width: 36em){.duet-center .duet-layout-top-wrapper{padding:0 48px}}@media (min-width: 48em){.duet-center .duet-layout-top-wrapper{padding:0 72px}}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}@media (min-width: 62em){.duet-sidebar{min-width:256px;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container{width:auto;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container.has-tabs{margin-top:89px}}@media (min-width: 62em){.duet-sidebar-container.sticky{position:sticky}.duet-sidebar-container.sticky.with-links{top:calc(3rem + 20px)}.duet-sidebar-container.sticky.without-links{top:calc(4rem + 20px)}}";
|
|
6537
7000
|
|
|
6538
|
-
let DuetLayout$1 = class extends
|
|
7001
|
+
let DuetLayout$1 = class extends H {
|
|
6539
7002
|
constructor() {
|
|
6540
7003
|
super();
|
|
6541
7004
|
this.__registerHost();
|
|
6542
|
-
|
|
7005
|
+
this.__attachShadow();
|
|
6543
7006
|
/**
|
|
6544
7007
|
* Own Properties.
|
|
6545
7008
|
*/
|
|
@@ -6612,11 +7075,11 @@ let DuetLayout$1 = class extends HTMLElement {
|
|
|
6612
7075
|
|
|
6613
7076
|
const duetLinkCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline}.duet-link{display:inline;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;border-radius:4px;transition:300ms ease}.duet-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-link:focus,.duet-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-link.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}.duet-link:hover{color:#004d80;text-decoration:none}.duet-link:hover.duet-theme-turva{color:#940925}.duet-link:active{opacity:0.75;transition:none}.duet-link-external{margin-left:4px}";
|
|
6614
7077
|
|
|
6615
|
-
let DuetLink$1 = class extends
|
|
7078
|
+
let DuetLink$1 = class extends H {
|
|
6616
7079
|
constructor() {
|
|
6617
7080
|
super();
|
|
6618
7081
|
this.__registerHost();
|
|
6619
|
-
|
|
7082
|
+
this.__attachShadow();
|
|
6620
7083
|
/**
|
|
6621
7084
|
* The currently active language. This setting changes the external link
|
|
6622
7085
|
* accessible label to match the chosen language.
|
|
@@ -6625,8 +7088,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6625
7088
|
*/
|
|
6626
7089
|
this.language = getLanguage();
|
|
6627
7090
|
/**
|
|
6628
|
-
*
|
|
6629
|
-
* normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
|
|
7091
|
+
* Defaults for accessibleLabelExternal
|
|
6630
7092
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
6631
7093
|
*/
|
|
6632
7094
|
this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
|
|
@@ -6634,7 +7096,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6634
7096
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
6635
7097
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
6636
7098
|
*/
|
|
6637
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults
|
|
7099
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
6638
7100
|
/**
|
|
6639
7101
|
* Theme of the button.
|
|
6640
7102
|
*/
|
|
@@ -6670,7 +7132,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6670
7132
|
"duet-link": true,
|
|
6671
7133
|
"duet-link-is-external": this.external,
|
|
6672
7134
|
"duet-theme-turva": this.theme === "turva",
|
|
6673
|
-
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el) }, h$1("slot", null), this.external && (h$1(Fragment, null, h$1("duet-visually-hidden", null,
|
|
7135
|
+
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el) }, h$1("slot", null), this.external && (h$1(Fragment, null, h$1("duet-visually-hidden", null, this.accessibleLabelExternal), h$1("span", { class: "duet-link-external" }, h$1("duet-icon", { icon: actionNewWindowSmall.svg, size: "xx-small", margin: "none", color: "currentColor" })))))));
|
|
6674
7136
|
}
|
|
6675
7137
|
static get delegatesFocus() { return true; }
|
|
6676
7138
|
static get style() { return duetLinkCss; }
|
|
@@ -6678,11 +7140,11 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6678
7140
|
|
|
6679
7141
|
const duetListCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-list-component{margin-bottom:16px !important;width:100%}.duet-list-component.duet-p-0{padding:0 !important}.duet-list-component.duet-m-0{margin:0 !important}";
|
|
6680
7142
|
|
|
6681
|
-
let DuetList$1 = class extends
|
|
7143
|
+
let DuetList$1 = class extends H {
|
|
6682
7144
|
constructor() {
|
|
6683
7145
|
super();
|
|
6684
7146
|
this.__registerHost();
|
|
6685
|
-
|
|
7147
|
+
this.__attachShadow();
|
|
6686
7148
|
/**
|
|
6687
7149
|
* Theme of the list.
|
|
6688
7150
|
*/
|
|
@@ -6782,11 +7244,11 @@ let DuetList$1 = class extends HTMLElement {
|
|
|
6782
7244
|
|
|
6783
7245
|
const duetListItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex;flex-flow:row;width:100%;overflow:visible;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d}@media (max-width: 35.9375em){:host{flex-wrap:wrap}}:host dt,:host dd{-webkit-hyphens:auto;hyphens:auto;text-align:left;word-break:break-all;word-break:break-word;margin-inline-start:0}@media (max-width: 35.9375em){:host dt,:host dd{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}}:host dt{padding:16px !important;font-weight:600}@media (max-width: 35.9375em){:host dt{padding-bottom:4px !important}}.duet-theme-turva :host dt{font-weight:700}:host dd{padding:16px !important;margin-left:auto;text-align:left}@media (max-width: 35.9375em){:host dd{padding-top:0 !important}}:host(:not(.duet-list-striped)) dt{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){:host(:not(.duet-list-striped)) dt{padding-bottom:4px !important}}:host(:not(.duet-list-striped)) dd{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){:host(:not(.duet-list-striped)) dd{padding-top:0 !important}}:host(.duet-theme-turva){font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}:host(.duet-list-striped:nth-child(odd)) dt,:host(.duet-list-striped:nth-child(odd)) dd{background:#f5f8fa}:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dt,:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dd{background:#f5f5f7}:host(.duet-list-width-30) dt{flex-basis:33%}:host(.duet-list-width-30) dd{flex-basis:67%}:host(.duet-list-width-50) dt{flex-basis:47%}:host(.duet-list-width-50) dd{flex-basis:53%}:host(.duet-list-width-70) dt{flex-basis:65%}:host(.duet-list-width-70) dd{flex-basis:35%}:host(.duet-p-0) dt,:host(.duet-p-0) dd{padding-top:0 !important;padding-bottom:4px !important}@media (max-width: 35.9375em){:host(.duet-list-mobile-center) dt,:host(.duet-list-mobile-center) dd{text-align:center}}@media (max-width: 61.9375em){:host(.duet-list-breakpoint-large){flex-wrap:wrap}:host(.duet-list-breakpoint-large) dt,:host(.duet-list-breakpoint-large) dd{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}:host(.duet-list-breakpoint-large) dd{padding-top:0 !important}}:host(.duet-list-breakpoint-large.duet-list-striped) dd{padding-bottom:16px !important}@media (max-width: 61.9375em){:host(.duet-list-breakpoint-large.duet-list-mobile-center) dt,:host(.duet-list-breakpoint-large.duet-list-mobile-center) dd{text-align:center !important}}";
|
|
6784
7246
|
|
|
6785
|
-
let DuetListItem$1 = class extends
|
|
7247
|
+
let DuetListItem$1 = class extends H {
|
|
6786
7248
|
constructor() {
|
|
6787
7249
|
super();
|
|
6788
7250
|
this.__registerHost();
|
|
6789
|
-
|
|
7251
|
+
this.__attachShadow();
|
|
6790
7252
|
}
|
|
6791
7253
|
/**
|
|
6792
7254
|
* render() function
|
|
@@ -6827,11 +7289,11 @@ const DefaultLogo = ({ inverse, logoId, language }) => {
|
|
|
6827
7289
|
const { title, path, viewBox } = i18n[language];
|
|
6828
7290
|
return (h$1("svg", { role: "img", xmlns: "http://www.w3.org/2000/svg", fill: logoColor, "aria-labelledby": logoId, viewBox: viewBox }, h$1("title", { id: logoId }, title), h$1("path", { d: path })));
|
|
6829
7291
|
};
|
|
6830
|
-
let DuetLogo$1 = class extends
|
|
7292
|
+
let DuetLogo$1 = class extends H {
|
|
6831
7293
|
constructor() {
|
|
6832
7294
|
super();
|
|
6833
7295
|
this.__registerHost();
|
|
6834
|
-
|
|
7296
|
+
this.__attachShadow();
|
|
6835
7297
|
/**
|
|
6836
7298
|
* Own Properties.
|
|
6837
7299
|
*/
|
|
@@ -6902,11 +7364,11 @@ const duetModalCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margi
|
|
|
6902
7364
|
// iOS has otherwise problems moving the focus from modal back to the original element.
|
|
6903
7365
|
// This issue is similar to what we’ve seen in Duet Date Picker + iOS VoiceOver.
|
|
6904
7366
|
const TRANSITION_MS = 600;
|
|
6905
|
-
let DuetModal$1 = class extends
|
|
7367
|
+
let DuetModal$1 = class extends H {
|
|
6906
7368
|
constructor() {
|
|
6907
7369
|
super();
|
|
6908
7370
|
this.__registerHost();
|
|
6909
|
-
|
|
7371
|
+
this.__attachShadow();
|
|
6910
7372
|
this.duetOpen = createEvent$2(this, "duetOpen", 7);
|
|
6911
7373
|
this.duetClose = createEvent$2(this, "duetClose", 7);
|
|
6912
7374
|
this.duetBeforeClose = createEvent$2(this, "duetBeforeClose", 7);
|
|
@@ -6945,10 +7407,10 @@ let DuetModal$1 = class extends HTMLElement {
|
|
|
6945
7407
|
*/
|
|
6946
7408
|
this.language = getLanguage();
|
|
6947
7409
|
/**
|
|
6948
|
-
*
|
|
6949
|
-
*
|
|
7410
|
+
* Defaults for accessibleCloseLabel
|
|
7411
|
+
* @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
|
|
6950
7412
|
*/
|
|
6951
|
-
this.
|
|
7413
|
+
this.accessibleCloseLabelDefaults = {
|
|
6952
7414
|
fi: "Sulje ikkuna",
|
|
6953
7415
|
sv: "Stäng fönstret",
|
|
6954
7416
|
en: "Close the dialog",
|
|
@@ -6959,7 +7421,7 @@ let DuetModal$1 = class extends HTMLElement {
|
|
|
6959
7421
|
* Swedish translation for this property is “Stäng fönstret”.
|
|
6960
7422
|
* @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
|
|
6961
7423
|
*/
|
|
6962
|
-
this.accessibleCloseLabel = getLocaleString(this.
|
|
7424
|
+
this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefaults, this.language);
|
|
6963
7425
|
/**
|
|
6964
7426
|
* Size of the modal window.
|
|
6965
7427
|
*/
|
|
@@ -7125,11 +7587,11 @@ let DuetModal$1 = class extends HTMLElement {
|
|
|
7125
7587
|
|
|
7126
7588
|
const duetNotificationCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-notification{display:block;padding:16px;color:#00294d;cursor:pointer;border-bottom:1px solid #e1e3e6;transition:300ms ease}:host(:last-of-type) .duet-notification{border-bottom:0}.duet-notification.duet-theme-turva{color:#171c3a;border-bottom-color:#e4e4e6}.duet-notification.duet-notification-highlight{font-weight:600;background:#f3f9fc}.duet-notification.duet-notification-highlight.duet-theme-turva{background:#fcf3f4}@media (min-width: 62em){.duet-notification:hover{background:#f3f9fc}.duet-notification:hover.duet-theme-turva{background:#fcf3f4}}.duet-notification a{text-decoration:none}.duet-notification a:focus{outline:0}:host(.user-is-tabbing) .duet-notification:focus-within{z-index:1;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-notification:focus-within.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-notification-container{position:relative;display:flex}.duet-notification-badge-container{position:relative;width:16px}.duet-notification-badge{position:absolute;top:6px;left:-2px;width:8px;height:8px;background:#0077b3;border-radius:50%}.duet-theme-turva .duet-notification-badge{background:#c60c30}.duet-notification-content{flex:1}.duet-notification-date{position:absolute;top:2px;right:0;width:96px;font-size:0.75rem;font-weight:600;line-height:1.25;color:#657787;text-align:right;text-transform:uppercase}@media (max-width: 35.9375em){.duet-notification-date{width:auto}}.duet-theme-turva .duet-notification-date{color:#444445}::slotted(duet-heading){padding-right:80px !important}::slotted(duet-paragraph){margin-bottom:2px !important}";
|
|
7127
7589
|
|
|
7128
|
-
let DuetNotification$1 = class extends
|
|
7590
|
+
let DuetNotification$1 = class extends H {
|
|
7129
7591
|
constructor() {
|
|
7130
7592
|
super();
|
|
7131
7593
|
this.__registerHost();
|
|
7132
|
-
|
|
7594
|
+
this.__attachShadow();
|
|
7133
7595
|
/**
|
|
7134
7596
|
* The currently active language.
|
|
7135
7597
|
* Used for announcing unread notifications to screen readers.
|
|
@@ -7200,11 +7662,11 @@ let DuetNotification$1 = class extends HTMLElement {
|
|
|
7200
7662
|
const duetNotificationDrawerCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-drawer{position:relative}@media (min-width: 62em){.duet-drawer{display:inline-block}}.duet-drawer-toggle{position:relative;display:flex;align-items:center;width:100%;height:48px;padding:0 20px;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:48px;color:#00294d;text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-bottom:1px solid #e1e3e6;border-radius:0;-webkit-appearance:none;appearance:none}@media (min-width: 62em){.duet-drawer-toggle{z-index:200;width:auto;max-width:200px;padding:0 30px 0 12px;overflow:hidden;font-size:0.875rem;line-height:4rem;background-color:white;border:0;border-radius:4px;transition:border 300ms ease}}.duet-theme-turva .duet-drawer-toggle{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6}.duet-drawer-toggle:active{opacity:0.75}.duet-drawer-toggle:focus{outline:0}:host(.user-is-tabbing) .duet-drawer-toggle:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-drawer-toggle:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-drawer-toggle:hover{color:#004d80}.duet-theme-turva .duet-drawer-toggle:hover{color:#444445}.duet-drawer-toggle::after{display:none !important}@media (min-width: 62em){.duet-drawer-toggle::after{position:absolute;top:auto;bottom:0;left:0;display:block !important;width:100%;height:3px;content:\"\";background:#0077b3;transition:300ms ease;transform:translateY(3px)}.duet-theme-turva .duet-drawer-toggle::after{background:#c60c30}}.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{color:#004d80;border-bottom:1px solid #f5f8fa;border-radius:0}.duet-theme-turva .duet-drawer-toggle[aria-expanded=true],.duet-theme-turva .duet-drawer-toggle[aria-expanded=true]:hover{color:#444445;border-color:#f5f5f7}@media (min-width: 62em){.duet-drawer-toggle[aria-expanded=true],.duet-drawer-toggle[aria-expanded=true]:hover{border:0}.duet-drawer-toggle[aria-expanded=true]::after,.duet-drawer-toggle[aria-expanded=true]:hover::after{left:0;width:100%;transform:translateY(0)}}.duet-drawer-icon{position:relative;display:inline-flex;min-width:12px;margin-right:12px;font-size:0;line-height:normal;vertical-align:baseline}@media (min-width: 62em){.duet-drawer-icon{margin-right:8px}}.duet-drawer-label{line-height:1}.duet-drawer-caret{position:absolute;top:50%;right:20px;display:flex;width:10px;height:10px;margin-left:8px;line-height:normal;pointer-events:none;transition:300ms ease;transform:translateY(-50%);transform-origin:50% 50%}@media (min-width: 62em){.duet-drawer-caret{right:16px;width:7px;height:7px}}.duet-drawer-caret duet-icon{width:10px}.duet-drawer-toggle[aria-expanded=true] .duet-drawer-caret{transform:translateY(-50%) rotate(180deg)}.duet-drawer-badge{position:absolute;top:0;right:0;display:inline-block;width:6px;height:6px;background:#f7b228;border-radius:50%;box-shadow:0 0 0 1px #c18b1f}.duet-theme-turva .duet-drawer-badge{background:#faa40f}.duet-drawer-content{display:none;background-color:#f5f8fa;border-bottom:1px solid #e1e3e6}.duet-drawer-content:focus{outline:0}.duet-theme-turva .duet-drawer-content{background-color:#f5f5f7;border-color:#e1e3e6}@media (min-width: 62em){.duet-drawer-content{position:absolute;top:100%;z-index:600;display:block;width:450px;max-height:420px;padding-left:0;overflow-y:auto;visibility:hidden;background-color:white;border:1px solid #e1e3e6;border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:300ms ease;transform:scale(0.95) translateZ(0) translateY(-10px);transform-origin:50% 0;scrollbar-width:none}.duet-drawer-content::-webkit-scrollbar{display:none}.duet-theme-turva .duet-drawer-content{background-color:white}.duet-drawer-content.duet-drawer-left{right:0}.duet-drawer-content.duet-drawer-right{left:0}}.duet-drawer-content.duet-drawer-open{display:block}@media (min-width: 62em){.duet-drawer-content.duet-drawer-open{visibility:visible;opacity:1;transform:scale(1) translateZ(0) translateY(0)}}";
|
|
7201
7663
|
|
|
7202
7664
|
const ESC_KEY = 27;
|
|
7203
|
-
let DuetNotificationDrawer$1 = class extends
|
|
7665
|
+
let DuetNotificationDrawer$1 = class extends H {
|
|
7204
7666
|
constructor() {
|
|
7205
7667
|
super();
|
|
7206
7668
|
this.__registerHost();
|
|
7207
|
-
|
|
7669
|
+
this.__attachShadow();
|
|
7208
7670
|
/**
|
|
7209
7671
|
* State() variables
|
|
7210
7672
|
* Inlined decorator, alphabetical order.
|
|
@@ -7224,8 +7686,8 @@ let DuetNotificationDrawer$1 = class extends HTMLElement {
|
|
|
7224
7686
|
*/
|
|
7225
7687
|
this.language = getLanguage();
|
|
7226
7688
|
/**
|
|
7227
|
-
*
|
|
7228
|
-
*
|
|
7689
|
+
* Defaults for accessibleLabelNotifications
|
|
7690
|
+
* @default {en: "No notifications", fi: "Ei ilmoituksia", sv: "Inga notifikationer"}
|
|
7229
7691
|
*/
|
|
7230
7692
|
this.accessibleLabelNotificationsDefaults = {
|
|
7231
7693
|
en: "No notifications",
|
|
@@ -7236,7 +7698,7 @@ let DuetNotificationDrawer$1 = class extends HTMLElement {
|
|
|
7236
7698
|
* Adds accessible label for tooltip that is shown for notifications
|
|
7237
7699
|
* @default {en: "No notifications", fi: "Ei ilmoituksia", sv: "Inga notifikationer"}
|
|
7238
7700
|
*/
|
|
7239
|
-
this.accessibleLabelNotifications = getLocaleString(this.accessibleLabelNotificationsDefaults
|
|
7701
|
+
this.accessibleLabelNotifications = getLocaleString(this.accessibleLabelNotificationsDefaults);
|
|
7240
7702
|
/**
|
|
7241
7703
|
* Show a badge that indicates something has changed.
|
|
7242
7704
|
*/
|
|
@@ -7364,7 +7826,7 @@ const clamp = (val, min, max) => Math.min(Math.max(val, min), max);
|
|
|
7364
7826
|
|
|
7365
7827
|
const duetNumberInputCss = "*.sc-duet-number-input,*.sc-duet-number-input::after,*.sc-duet-number-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-number-input-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;line-height:1.25;text-align:left;vertical-align:bottom}.sc-duet-number-input-h:last-child,.sc-duet-number-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-number-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-number-input-h{width:100% !important}.duet-m-0.sc-duet-number-input-h{margin:0 !important}.duet-number-container.sc-duet-number-input{position:relative;width:100%}.duet-number-buttons.sc-duet-number-input{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;width:96px;height:calc(100% - 2px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50%;height:100%;text-align:center;cursor:pointer;background:transparent;-webkit-appearance:none;appearance:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled{pointer-events:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input duet-icon.sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled duet-icon.sc-duet-number-input{opacity:0.4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:active duet-icon.sc-duet-number-input{transform:translateY(1px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{outline:0}.user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{z-index:2;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{box-shadow:0 0 0 2px #171c3a}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type{border-left:1px solid #cfd2d4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{position:absolute;top:20%;left:0;width:1px;height:60%;content:\"\";background:#e1e3e6}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{background:linear-gradient(to left, rgba(207, 207, 209, 0.2) 0%, rgba(207, 207, 209, 0.2) 1px, rgba(207, 207, 209, 0.1) 1px, rgba(207, 207, 209, 0) 100%)}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{background:#e4e4e6}";
|
|
7366
7828
|
|
|
7367
|
-
let DuetNumberInput$1 = class extends
|
|
7829
|
+
let DuetNumberInput$1 = class extends H {
|
|
7368
7830
|
constructor() {
|
|
7369
7831
|
super();
|
|
7370
7832
|
this.__registerHost();
|
|
@@ -7389,37 +7851,52 @@ let DuetNumberInput$1 = class extends HTMLElement {
|
|
|
7389
7851
|
*/
|
|
7390
7852
|
this.unit = getLocale(this.language).money;
|
|
7391
7853
|
/**
|
|
7392
|
-
*
|
|
7393
|
-
* The string {current} is replaced with the current amount.
|
|
7854
|
+
* Defaults for accessibleLive
|
|
7394
7855
|
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
7395
7856
|
*/
|
|
7396
|
-
this.
|
|
7857
|
+
this.accessibleLiveDefaults = {
|
|
7397
7858
|
fi: "{current} euroa valittuna",
|
|
7398
7859
|
en: "{current} euros selected",
|
|
7399
7860
|
sv: "{current} euro valt",
|
|
7400
|
-
}
|
|
7861
|
+
};
|
|
7862
|
+
/**
|
|
7863
|
+
* Format of message used to announce current amount when switching between amounts.
|
|
7864
|
+
* The string {current} is replaced with the current amount.
|
|
7865
|
+
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
7866
|
+
*/
|
|
7867
|
+
this.accessibleLive = getLocaleString(this.accessibleLiveDefaults, this.language);
|
|
7401
7868
|
/**
|
|
7402
7869
|
* Disables the aria-live messaging used internally in this component. This could be useful when you want to use custom aria-live messages instead.
|
|
7403
7870
|
*/
|
|
7404
7871
|
this.accessibleLiveEnabled = true;
|
|
7405
7872
|
/**
|
|
7406
|
-
*
|
|
7873
|
+
* Defaults for accessibleAdd
|
|
7407
7874
|
* @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
|
|
7408
7875
|
*/
|
|
7409
|
-
this.
|
|
7876
|
+
this.accessibleAddDefaults = {
|
|
7410
7877
|
fi: "Lisää summaan",
|
|
7411
7878
|
en: "Add to the amount",
|
|
7412
7879
|
sv: "Lägg till beloppet",
|
|
7413
|
-
}
|
|
7880
|
+
};
|
|
7414
7881
|
/**
|
|
7415
|
-
* Accessible label for the
|
|
7882
|
+
* Accessible label for the add button that is read for screen reader users.
|
|
7883
|
+
* @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
|
|
7884
|
+
*/
|
|
7885
|
+
this.accessibleAdd = getLocaleString(this.accessibleAddDefaults, this.language);
|
|
7886
|
+
/**
|
|
7887
|
+
* Defaults for accessibleSubtract
|
|
7416
7888
|
* @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
|
|
7417
7889
|
*/
|
|
7418
|
-
this.
|
|
7890
|
+
this.accessibleSubtractDefaults = {
|
|
7419
7891
|
fi: "Vähennä summasta",
|
|
7420
7892
|
en: "Subtract from the amount",
|
|
7421
7893
|
sv: "Dra från beloppet",
|
|
7422
|
-
}
|
|
7894
|
+
};
|
|
7895
|
+
/**
|
|
7896
|
+
* Accessible label for the subtract button that is read for screen reader users.
|
|
7897
|
+
* @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
|
|
7898
|
+
*/
|
|
7899
|
+
this.accessibleSubtract = getLocaleString(this.accessibleSubtractDefaults, this.language);
|
|
7423
7900
|
/**
|
|
7424
7901
|
* Theme of the input.
|
|
7425
7902
|
*/
|
|
@@ -7437,14 +7914,19 @@ let DuetNumberInput$1 = class extends HTMLElement {
|
|
|
7437
7914
|
*/
|
|
7438
7915
|
this.min = 0;
|
|
7439
7916
|
/**
|
|
7440
|
-
*
|
|
7917
|
+
* Defaults for Label
|
|
7441
7918
|
* @default {fi: "Etiketti", en: "Label", sv: "Märka"}
|
|
7442
7919
|
*/
|
|
7443
|
-
this.
|
|
7920
|
+
this.labelDefaults = {
|
|
7444
7921
|
fi: "Nimilappu",
|
|
7445
7922
|
en: "Label",
|
|
7446
7923
|
sv: "Etikett",
|
|
7447
|
-
}
|
|
7924
|
+
};
|
|
7925
|
+
/**
|
|
7926
|
+
* Label for the number input.
|
|
7927
|
+
* @default {fi: "Etiketti", en: "Label", sv: "Märka"}
|
|
7928
|
+
*/
|
|
7929
|
+
this.label = getLocaleString(this.labelDefaults, this.language);
|
|
7448
7930
|
/**
|
|
7449
7931
|
* Visually hide the label, but still show it to screen readers.
|
|
7450
7932
|
*/
|
|
@@ -7673,34 +8155,101 @@ let DuetNumberInput$1 = class extends HTMLElement {
|
|
|
7673
8155
|
static get style() { return duetNumberInputCss; }
|
|
7674
8156
|
};
|
|
7675
8157
|
|
|
7676
|
-
const duetParagraphCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.duet-paragraph{margin-bottom:16px !important;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}.duet-paragraph.duet-p-0{padding:0 !important}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-paragraph.duet-paragraph-small{font-size:0.875rem}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.intro{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){.duet-paragraph.intro{font-size:1rem}}@media (min-width: 46.2962962963rem){.duet-paragraph.intro{font-size:1.25rem}}.duet-paragraph.intro.duet-m-0{margin:0 !important}::slotted(a){font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;transition:300ms ease}::slotted(a).duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}::slotted(a):hover{color:#004d80;text-decoration:none}::slotted(a):hover.duet-theme-turva{color:#940925}::slotted(a):active{opacity:0.75;transition:none}";
|
|
8158
|
+
const duetParagraphCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.duet-paragraph{margin-bottom:16px !important;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}.duet-paragraph.duet-p-0{padding:0 !important}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-paragraph.duet-paragraph-small{font-size:0.875rem}.duet-paragraph.duet-paragraph-semi-bold{font-weight:600}.duet-paragraph.duet-paragraph-bold{font-weight:700}.duet-paragraph.duet-m-0{margin:0 !important}.duet-paragraph.intro{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){.duet-paragraph.intro{font-size:1rem}}@media (min-width: 46.2962962963rem){.duet-paragraph.intro{font-size:1.25rem}}.duet-paragraph.intro.duet-m-0{margin:0 !important}::slotted(a){font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;transition:300ms ease}::slotted(a).duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}::slotted(a):hover{color:#004d80;text-decoration:none}::slotted(a):hover.duet-theme-turva{color:#940925}::slotted(a):active{opacity:0.75;transition:none}";
|
|
7677
8159
|
|
|
7678
|
-
let DuetParagraph$1 = class extends
|
|
8160
|
+
let DuetParagraph$1 = class extends H {
|
|
7679
8161
|
constructor() {
|
|
7680
8162
|
super();
|
|
7681
8163
|
this.__registerHost();
|
|
7682
|
-
|
|
8164
|
+
this.__attachShadow();
|
|
7683
8165
|
/**
|
|
7684
|
-
* Theme of the
|
|
8166
|
+
* Theme of the paragraph.
|
|
7685
8167
|
*/
|
|
7686
8168
|
this.theme = "";
|
|
7687
8169
|
/**
|
|
7688
|
-
* Controls the margin of the component.
|
|
8170
|
+
* Controls the margin of the component.
|
|
8171
|
+
*/
|
|
8172
|
+
this.margin = "auto";
|
|
8173
|
+
/**
|
|
8174
|
+
* Controls the size of the paragraph.
|
|
8175
|
+
*/
|
|
8176
|
+
this.size = "medium";
|
|
8177
|
+
/**
|
|
8178
|
+
* Controls the Font-Weight of the paragraph.
|
|
8179
|
+
*/
|
|
8180
|
+
this.weight = undefined;
|
|
8181
|
+
/**
|
|
8182
|
+
* Style variation of the paragraph.
|
|
8183
|
+
*/
|
|
8184
|
+
this.variation = "default";
|
|
8185
|
+
/**
|
|
8186
|
+
* Custom color to be used for text, as a design token entered in camelCase or kebab-case.
|
|
8187
|
+
* Example: "color-primary".
|
|
8188
|
+
*/
|
|
8189
|
+
this.color = "";
|
|
8190
|
+
}
|
|
8191
|
+
/**
|
|
8192
|
+
* Component lifecycle events.
|
|
8193
|
+
*/
|
|
8194
|
+
componentWillLoad() {
|
|
8195
|
+
inheritGlobalTheme(this);
|
|
8196
|
+
}
|
|
8197
|
+
/**
|
|
8198
|
+
* render() function
|
|
8199
|
+
* Always the last one in the class.
|
|
8200
|
+
*/
|
|
8201
|
+
render() {
|
|
8202
|
+
const color = getColorByName(this.color);
|
|
8203
|
+
return (h$1("p", { class: {
|
|
8204
|
+
"duet-paragraph": true,
|
|
8205
|
+
"duet-paragraph-small": this.size === "small",
|
|
8206
|
+
"duet-paragraph-semi-bold": this.weight === "semi-bold",
|
|
8207
|
+
"duet-paragraph-bold": this.weight === "bold",
|
|
8208
|
+
"duet-m-0": this.margin === "none",
|
|
8209
|
+
[this.variation]: true,
|
|
8210
|
+
"duet-theme-turva": this.theme === "turva",
|
|
8211
|
+
}, style: { color }, part: "duet-paragraph" }, h$1("slot", null)));
|
|
8212
|
+
}
|
|
8213
|
+
get element() { return this; }
|
|
8214
|
+
static get style() { return duetParagraphCss; }
|
|
8215
|
+
};
|
|
8216
|
+
|
|
8217
|
+
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}";
|
|
8218
|
+
|
|
8219
|
+
let DuetProgress$1 = class extends H {
|
|
8220
|
+
constructor() {
|
|
8221
|
+
super();
|
|
8222
|
+
this.__registerHost();
|
|
8223
|
+
/**
|
|
8224
|
+
* Own Properties
|
|
8225
|
+
*/
|
|
8226
|
+
this.progressId = createID("DuetProgress");
|
|
8227
|
+
this.progressLabelId = createID("DuetProgressLabel");
|
|
8228
|
+
/**
|
|
8229
|
+
* Defaults for accessibleLabel
|
|
8230
|
+
*/
|
|
8231
|
+
this.accessibleLabelUploadDefaults = {
|
|
8232
|
+
fi: ["lähetys valmis", "lähetys käynnissä"],
|
|
8233
|
+
sv: ["Uppladdningen är klar", "Uppladdning pågår"],
|
|
8234
|
+
en: ["upload completed", "upload in progress"],
|
|
8235
|
+
};
|
|
8236
|
+
/**
|
|
8237
|
+
* Adds accessible label for upload in progress and upload complete states
|
|
8238
|
+
* @default {fi: ["lähetys valmis", "lähetys käynnissä"],sv: ["Uppladdningen är klar", "Uppladdning pågår"], en: ["completed", "in progress"]}
|
|
7689
8239
|
*/
|
|
7690
|
-
this.
|
|
8240
|
+
this.accessibleLabelUpload = getLocaleString(this.accessibleLabelUploadDefaults);
|
|
7691
8241
|
/**
|
|
7692
|
-
*
|
|
8242
|
+
* Progress of the bar, a value from 0-100
|
|
7693
8243
|
*/
|
|
7694
|
-
this.
|
|
8244
|
+
this.progress = 0;
|
|
7695
8245
|
/**
|
|
7696
|
-
*
|
|
8246
|
+
* Height of progressbar
|
|
7697
8247
|
*/
|
|
7698
|
-
this.
|
|
8248
|
+
this.height = "10px";
|
|
7699
8249
|
/**
|
|
7700
|
-
*
|
|
7701
|
-
* Example: "color-primary".
|
|
8250
|
+
* Theme of the input.
|
|
7702
8251
|
*/
|
|
7703
|
-
this.
|
|
8252
|
+
this.theme = "";
|
|
7704
8253
|
}
|
|
7705
8254
|
/**
|
|
7706
8255
|
* Component lifecycle events.
|
|
@@ -7713,22 +8262,23 @@ let DuetParagraph$1 = class extends HTMLElement {
|
|
|
7713
8262
|
* Always the last one in the class.
|
|
7714
8263
|
*/
|
|
7715
8264
|
render() {
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
"duet-
|
|
7720
|
-
"duet-
|
|
7721
|
-
|
|
8265
|
+
return (h$1(Host, null, h$1("div", { "aria-live": this.accessibleLabel ? "polite" : "off", "aria-hidden": this.accessibleLabel ? "false" : "true", "aria-atomic": "true", style: {
|
|
8266
|
+
height: this.height,
|
|
8267
|
+
}, id: this.progressId, class: {
|
|
8268
|
+
"duet-progress": true,
|
|
8269
|
+
"duet-progress-done": this.progress === 100,
|
|
8270
|
+
"duet-progress-start": this.progress === 0,
|
|
8271
|
+
"duet-progress-inprogress": this.progress < 99 && this.progress !== 0,
|
|
7722
8272
|
"duet-theme-turva": this.theme === "turva",
|
|
7723
|
-
},
|
|
8273
|
+
} }, h$1("duet-visually-hidden", null, h$1("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (h$1("span", null, this.accessibleLabel, ", ", this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))), this.caption && (h$1("div", { class: "duet-progress-caption" }, h$1("span", null, this.caption))), h$1("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" }, h$1("div", { class: "progress-bar" }, h$1("span", { style: { width: `${this.progress}%;` } }, "Progress: ", this.progress, "%"))))));
|
|
7724
8274
|
}
|
|
7725
8275
|
get element() { return this; }
|
|
7726
|
-
static get style() { return
|
|
8276
|
+
static get style() { return duetProgressCss; }
|
|
7727
8277
|
};
|
|
7728
8278
|
|
|
7729
8279
|
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}";
|
|
7730
8280
|
|
|
7731
|
-
let DuetRadio$1 = class extends
|
|
8281
|
+
let DuetRadio$1 = class extends H {
|
|
7732
8282
|
constructor() {
|
|
7733
8283
|
super();
|
|
7734
8284
|
this.__registerHost();
|
|
@@ -7835,7 +8385,7 @@ let DuetRadio$1 = class extends HTMLElement {
|
|
|
7835
8385
|
|
|
7836
8386
|
const duetRadioGroupCss = "*.sc-duet-radio-group,*.sc-duet-radio-group::after,*.sc-duet-radio-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-radio-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-radio-group-h .duet-radio-group.sc-duet-radio-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-radio-group-h .duet-radio-group.sc-duet-radio-group{display:flex}}.horizontal.sc-duet-radio-group-h .duet-radio-group.duet-no-stacking.sc-duet-radio-group{display:flex}.deut-radio-group.sc-duet-radio-group{width:100%}";
|
|
7837
8387
|
|
|
7838
|
-
let DuetRadioGroup$1 = class extends
|
|
8388
|
+
let DuetRadioGroup$1 = class extends H {
|
|
7839
8389
|
constructor() {
|
|
7840
8390
|
super();
|
|
7841
8391
|
this.__registerHost();
|
|
@@ -7993,7 +8543,7 @@ const colors = {
|
|
|
7993
8543
|
inactive: colorGray,
|
|
7994
8544
|
},
|
|
7995
8545
|
};
|
|
7996
|
-
let DuetRangeSlider$1 = class extends
|
|
8546
|
+
let DuetRangeSlider$1 = class extends H {
|
|
7997
8547
|
constructor() {
|
|
7998
8548
|
super();
|
|
7999
8549
|
this.__registerHost();
|
|
@@ -8136,7 +8686,7 @@ let DuetRangeSlider$1 = class extends HTMLElement {
|
|
|
8136
8686
|
static get style() { return duetRangeSliderCss; }
|
|
8137
8687
|
};
|
|
8138
8688
|
|
|
8139
|
-
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}";
|
|
8689
|
+
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}";
|
|
8140
8690
|
|
|
8141
8691
|
function isOptionGroup(item) {
|
|
8142
8692
|
return "options" in item;
|
|
@@ -8152,7 +8702,7 @@ function findOptionByValue(items, value) {
|
|
|
8152
8702
|
}
|
|
8153
8703
|
}
|
|
8154
8704
|
}
|
|
8155
|
-
let DuetSelect$1 = class extends
|
|
8705
|
+
let DuetSelect$1 = class extends H {
|
|
8156
8706
|
constructor() {
|
|
8157
8707
|
super();
|
|
8158
8708
|
this.__registerHost();
|
|
@@ -8259,14 +8809,14 @@ let DuetSelect$1 = class extends HTMLElement {
|
|
|
8259
8809
|
if (this.nativeSelect) {
|
|
8260
8810
|
this.nativeSelect.value = this.value;
|
|
8261
8811
|
}
|
|
8262
|
-
this.isCaptionVisible = !!
|
|
8812
|
+
this.isCaptionVisible = !!this.caption;
|
|
8263
8813
|
}
|
|
8264
8814
|
/**
|
|
8265
8815
|
* Component lifecycle events.
|
|
8266
8816
|
*/
|
|
8267
8817
|
componentWillLoad() {
|
|
8268
8818
|
inheritGlobalTheme(this);
|
|
8269
|
-
this.isCaptionVisible = !!
|
|
8819
|
+
this.isCaptionVisible = !!this.caption;
|
|
8270
8820
|
this.refresh();
|
|
8271
8821
|
}
|
|
8272
8822
|
/**
|
|
@@ -8309,7 +8859,7 @@ let DuetSelect$1 = class extends HTMLElement {
|
|
|
8309
8859
|
"duet-theme-turva": this.theme === "turva",
|
|
8310
8860
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
8311
8861
|
"has-error": !!this.error,
|
|
8312
|
-
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), h$1("
|
|
8862
|
+
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h$1("div", { class: "duet-select-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-select-placeholder", size: "small" }, this.placeholder)), h$1("select", { ref: select => (this.nativeSelect = select), disabled: this.disabled, name: this.name, id: identifier, role: this.role, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, required: this.required, "aria-describedby": this.accessibleDescribedBy }, this.placeholder && (h$1("option", { disabled: true, selected: true, value: "" }, this.placeholder)), !this.processedItems ? (h$1("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
|
|
8313
8863
|
return isOptionGroup(item) ? this.renderOptionGroup(item) : this.renderOption(item);
|
|
8314
8864
|
}))), h$1("div", { class: "duet-select", "aria-hidden": "true" }, h$1("span", { key: this.value }, this.getSelectedItemLabel()), h$1("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h$1("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" })))), h$1("span", { class: "duet-select-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", null, this.error)))));
|
|
8315
8865
|
}
|
|
@@ -8323,11 +8873,11 @@ let DuetSelect$1 = class extends HTMLElement {
|
|
|
8323
8873
|
|
|
8324
8874
|
const duetSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";
|
|
8325
8875
|
|
|
8326
|
-
let DuetSpacer$1 = class extends
|
|
8876
|
+
let DuetSpacer$1 = class extends H {
|
|
8327
8877
|
constructor() {
|
|
8328
8878
|
super();
|
|
8329
8879
|
this.__registerHost();
|
|
8330
|
-
|
|
8880
|
+
this.__attachShadow();
|
|
8331
8881
|
/**
|
|
8332
8882
|
* Size variation of the spacer. Can be any of the spacing tokens.
|
|
8333
8883
|
*/
|
|
@@ -8365,11 +8915,11 @@ let DuetSpacer$1 = class extends HTMLElement {
|
|
|
8365
8915
|
|
|
8366
8916
|
const duetSpinnerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute;top:50%;left:50%;z-index:800;max-width:100%}:host(.duet-theme-default) .duet-spinner{color:#0077b3 !important}:host(.duet-theme-turva) .duet-spinner{color:#c60c30 !important}:host(.duet-custom-color){color:inherit}*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-spinner{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:800;width:24px;height:24px;color:#0077b3;border:2px solid transparent;border-left:2px solid currentColor;border-radius:50%;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%;animation:duetRotate 0.6s linear infinite}.duet-spinner::after{position:absolute;top:50%;left:50%;z-index:200;box-sizing:content-box;width:100%;height:100%;overflow:hidden;content:\"\";border:2px solid currentColor;border-radius:50%;opacity:0.3;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%}.duet-spinner.medium{width:36px;height:36px;border-width:4px}.duet-spinner.medium::after{border-width:4px}.duet-spinner.large{width:72px;height:72px;border-width:8px}.duet-spinner.large::after{border-width:8px}@keyframes duetRotate{0%{transform:translateZ(0) rotate(0deg) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}";
|
|
8367
8917
|
|
|
8368
|
-
let DuetSpinner$1 = class extends
|
|
8918
|
+
let DuetSpinner$1 = class extends H {
|
|
8369
8919
|
constructor() {
|
|
8370
8920
|
super();
|
|
8371
8921
|
this.__registerHost();
|
|
8372
|
-
|
|
8922
|
+
this.__attachShadow();
|
|
8373
8923
|
/**
|
|
8374
8924
|
* Color of the spinner, as a design token entered in camelCase or kebab-case.
|
|
8375
8925
|
* Example: "color-primary". This property can also be set to "currentColor"
|
|
@@ -8416,7 +8966,7 @@ var actionEdit2={"title":"action-edit-2","tags":"action edit 2 pen pencil","svg"
|
|
|
8416
8966
|
|
|
8417
8967
|
const duetStepCss = "*.sc-duet-step,*.sc-duet-step::after,*.sc-duet-step::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-step-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block}.duet-step.sc-duet-step{padding:20px !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;background:white;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-step.duet-theme-turva.sc-duet-step{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}.duet-step.rounded-top.sc-duet-step{border-top-left-radius:4px;border-top-right-radius:4px}.duet-step.rounded-bottom.sc-duet-step{margin-bottom:20px !important;border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){.duet-step.rounded-bottom.sc-duet-step{margin-bottom:0 !important}}@media (min-width: 36em){.duet-step.sc-duet-step{padding:0 20px 0 0 !important;margin:0 !important;font-size:1.25rem;box-shadow:none !important}}.duet-step-heading.sc-duet-step{display:flex;align-items:center;border-radius:4px}.duet-step-heading[aria-disabled=false].sc-duet-step{cursor:pointer}.duet-step-heading.sc-duet-step:focus{outline:0}.duet-step-heading.sc-duet-step:active{opacity:0.75}.user-is-tabbing.sc-duet-step-h .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.sc-duet-step-h .duet-theme-turva.sc-duet-step .duet-step-heading.sc-duet-step:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#005f8f}.duet-theme-turva.is-complete.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-heading.sc-duet-step:hover .duet-step-counter.sc-duet-step{background-color:#9e0a26}.is-current.sc-duet-step .duet-step-heading.sc-duet-step{margin-bottom:20px}@media (min-width: 36em){.duet-step-heading.sc-duet-step{margin-top:8px;margin-bottom:8px !important}.sc-duet-step-h:first-of-type .duet-step-heading.sc-duet-step{margin-top:0}.sc-duet-step-h:last-of-type .duet-step-heading.sc-duet-step{margin-bottom:0 !important}}.duet-step-counter.sc-duet-step{-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;line-height:30px;color:white;text-align:center;border-radius:50%;transition:background-color 300ms ease}@media (min-width: 36em){.duet-step-counter.sc-duet-step{width:40px;height:40px;line-height:40px}}.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#0077b3}.duet-theme-turva.is-complete.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-current.sc-duet-step .duet-step-counter.sc-duet-step,.duet-theme-turva.is-disabled.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#c60c30}.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#657787}.duet-theme-turva.is-incomplete.sc-duet-step .duet-step-counter.sc-duet-step{background-color:#747475}.duet-step-icon.sc-duet-step{display:flex;align-items:center;justify-content:center;width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step{width:20px;height:20px}}.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:16px;height:16px}@media (min-width: 36em){.duet-step-icon.sc-duet-step duet-icon.sc-duet-step{width:20px;height:20px}}@media (min-width: 36em){.duet-step-content-wrapper.sc-duet-step{min-height:20px;padding-left:40px;margin-left:19px;border-left:2px solid #e1e3e6}.duet-theme-turva.sc-duet-step .duet-step-content-wrapper.sc-duet-step{border-color:#e4e4e6}.sc-duet-step-h:last-of-type .duet-step-content-wrapper.sc-duet-step{min-height:0;border:transparent}}.duet-step-content.sc-duet-step{display:none;padding-bottom:16px}@media (min-width: 36em){.duet-step-content.sc-duet-step{padding-bottom:28px}}.is-current.sc-duet-step .duet-step-content.sc-duet-step{display:block}.duet-step-heading-slot.sc-duet-step{display:none;margin-top:2px}@media (min-width: 48em){.duet-step-heading-slot.sc-duet-step{display:block}}";
|
|
8418
8968
|
|
|
8419
|
-
let DuetStep$1 = class extends
|
|
8969
|
+
let DuetStep$1 = class extends H {
|
|
8420
8970
|
constructor() {
|
|
8421
8971
|
super();
|
|
8422
8972
|
this.__registerHost();
|
|
@@ -8524,11 +9074,11 @@ function groupBy(prop, items) {
|
|
|
8524
9074
|
|
|
8525
9075
|
const duetStepperCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}.duet-stepper{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-stepper{padding:28px !important;padding-top:36px !important;padding-bottom:36px !important;background:white;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}}";
|
|
8526
9076
|
|
|
8527
|
-
let DuetStepper$1 = class extends
|
|
9077
|
+
let DuetStepper$1 = class extends H {
|
|
8528
9078
|
constructor() {
|
|
8529
9079
|
super();
|
|
8530
9080
|
this.__registerHost();
|
|
8531
|
-
|
|
9081
|
+
this.__attachShadow();
|
|
8532
9082
|
this.duetStepChange = createEvent$2(this, "duetStepChange", 7);
|
|
8533
9083
|
/**
|
|
8534
9084
|
* Theme of the component.
|
|
@@ -8641,7 +9191,7 @@ let DuetStepper$1 = class extends HTMLElement {
|
|
|
8641
9191
|
|
|
8642
9192
|
const duetTabCss = ".sc-duet-tab-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-tab.sc-duet-tab{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:none;width:100%}.duet-tab.selected.sc-duet-tab{display:block}";
|
|
8643
9193
|
|
|
8644
|
-
let DuetTab$1 = class extends
|
|
9194
|
+
let DuetTab$1 = class extends H {
|
|
8645
9195
|
constructor() {
|
|
8646
9196
|
super();
|
|
8647
9197
|
this.__registerHost();
|
|
@@ -8658,9 +9208,9 @@ let DuetTab$1 = class extends HTMLElement {
|
|
|
8658
9208
|
static get style() { return duetTabCss; }
|
|
8659
9209
|
};
|
|
8660
9210
|
|
|
8661
|
-
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:#
|
|
9211
|
+
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}";
|
|
8662
9212
|
|
|
8663
|
-
let DuetTabGroup$1 = class extends
|
|
9213
|
+
let DuetTabGroup$1 = class extends H {
|
|
8664
9214
|
constructor() {
|
|
8665
9215
|
super();
|
|
8666
9216
|
this.__registerHost();
|
|
@@ -8689,14 +9239,19 @@ let DuetTabGroup$1 = class extends HTMLElement {
|
|
|
8689
9239
|
*/
|
|
8690
9240
|
this.language = getLanguage();
|
|
8691
9241
|
/**
|
|
8692
|
-
*
|
|
9242
|
+
* Defaults for Label
|
|
8693
9243
|
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
8694
9244
|
*/
|
|
8695
|
-
this.
|
|
9245
|
+
this.labelDefaults = {
|
|
8696
9246
|
fi: "Valitse",
|
|
8697
9247
|
en: "Choose",
|
|
8698
9248
|
sv: "Välj",
|
|
8699
|
-
}
|
|
9249
|
+
};
|
|
9250
|
+
/**
|
|
9251
|
+
* Label for the select element which gets shown on mobile.
|
|
9252
|
+
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
9253
|
+
*/
|
|
9254
|
+
this.label = getLocaleString(this.labelDefaults, this.language);
|
|
8700
9255
|
/**
|
|
8701
9256
|
* Determines whether the label for the select element shown on mobile is visually hidden.
|
|
8702
9257
|
*/
|
|
@@ -8854,7 +9409,7 @@ const stickyTopValues = {
|
|
|
8854
9409
|
"with-links": parseFloat(sizeNavigation) * 16,
|
|
8855
9410
|
"without-links": parseFloat(sizeHeader) * 16,
|
|
8856
9411
|
};
|
|
8857
|
-
let DuetTable$1 = class extends
|
|
9412
|
+
let DuetTable$1 = class extends H {
|
|
8858
9413
|
constructor() {
|
|
8859
9414
|
super();
|
|
8860
9415
|
this.__registerHost();
|
|
@@ -8954,7 +9509,7 @@ let DuetTable$1 = class extends HTMLElement {
|
|
|
8954
9509
|
static get style() { return duetTableCss; }
|
|
8955
9510
|
};
|
|
8956
9511
|
|
|
8957
|
-
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}";
|
|
9512
|
+
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}";
|
|
8958
9513
|
|
|
8959
9514
|
const CharacterCount = ({ value, maxlength, label, theme }) => {
|
|
8960
9515
|
if (maxlength == null) {
|
|
@@ -8965,7 +9520,7 @@ const CharacterCount = ({ value, maxlength, label, theme }) => {
|
|
|
8965
9520
|
const isApproachingLimit = remainder / maxlength <= 0.1; // <= 10% chars remaining
|
|
8966
9521
|
return (h$1("div", { class: "duet-character-count" }, h$1("duet-caption", { margin: "none", theme: theme, size: "small" }, h$1("duet-visually-hidden", { "aria-live": "polite", "aria-atomic": "true", class: "duet-textarea-counter-remaining" }, isApproachingLimit && `${remainder} ${label}`), h$1("span", { "aria-hidden": "true" }, length, "/", maxlength))));
|
|
8967
9522
|
};
|
|
8968
|
-
let DuetTextarea$1 = class extends
|
|
9523
|
+
let DuetTextarea$1 = class extends H {
|
|
8969
9524
|
constructor() {
|
|
8970
9525
|
super();
|
|
8971
9526
|
this.__registerHost();
|
|
@@ -9056,7 +9611,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9056
9611
|
cleanValue(this.nativeInput, this.disallowPatternRegex);
|
|
9057
9612
|
}
|
|
9058
9613
|
this.value = this.nativeInput.value;
|
|
9059
|
-
this.isCaptionVisible = !!
|
|
9614
|
+
this.isCaptionVisible = !!this.caption;
|
|
9060
9615
|
this.duetInput.emit({
|
|
9061
9616
|
originalEvent: ev,
|
|
9062
9617
|
value: this.value,
|
|
@@ -9095,7 +9650,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9095
9650
|
componentWillLoad() {
|
|
9096
9651
|
inheritGlobalTheme(this);
|
|
9097
9652
|
this.disallowedPatternChange();
|
|
9098
|
-
this.isCaptionVisible = !!
|
|
9653
|
+
this.isCaptionVisible = !!this.caption;
|
|
9099
9654
|
if (this.counter && this.maxlength == null) {
|
|
9100
9655
|
console.warn("[DUET WARNING]: counter will only take effect if maxlength is set");
|
|
9101
9656
|
}
|
|
@@ -9129,7 +9684,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9129
9684
|
"duet-label-hidden": this.labelHidden,
|
|
9130
9685
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
9131
9686
|
"has-error": !!this.error,
|
|
9132
|
-
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), h$1("textarea", { onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, ref: input => (this.nativeInput = input), class: { "duet-textarea": true, disabled: this.disabled }, value: this.value, disabled: this.disabled, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", required: this.required, minlength: this.minlength, maxlength: this.maxlength, role: this.role, name: this.name, id: identifier }), h$1("duet-grid", { alignment: "stretch" }, h$1("duet-grid-item", { margin: "none", fill: true }, h$1("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", null, this.error))), h$1("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (h$1(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
|
|
9687
|
+
} }, h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label), this.tooltip && (h$1("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h$1("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h$1("div", { class: "duet-textarea-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (h$1("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-textarea-placeholder", size: "small" }, this.placeholder)), h$1("textarea", { onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, ref: input => (this.nativeInput = input), class: { "duet-textarea": true, disabled: this.disabled }, value: this.value, disabled: this.disabled, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", required: this.required, minlength: this.minlength, maxlength: this.maxlength, role: this.role, name: this.name, id: identifier })), h$1("duet-grid", { alignment: "stretch" }, h$1("duet-grid-item", { margin: "none", fill: true }, h$1("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h$1("span", null, this.error))), h$1("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (h$1(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
|
|
9133
9688
|
}
|
|
9134
9689
|
get element() { return this; }
|
|
9135
9690
|
static get watchers() { return {
|
|
@@ -9140,7 +9695,7 @@ let DuetTextarea$1 = class extends HTMLElement {
|
|
|
9140
9695
|
|
|
9141
9696
|
const duetToggleCss = "*.sc-duet-toggle,*.sc-duet-toggle::after,*.sc-duet-toggle::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-toggle-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;-webkit-user-select:none;user-select:none;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-toggle-h:last-child,.sc-duet-toggle-h:last-of-type{margin-right:0 !important}.duet-m-0.sc-duet-toggle-h{margin:0 !important}duet-label.sc-duet-toggle{display:block !important;width:100% !important}.duet-switch.sc-duet-toggle{position:relative;display:block;width:48px;height:28px}.duet-switch.sc-duet-toggle input.sc-duet-toggle{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-switch.sc-duet-toggle input.sc-duet-toggle:checked+.duet-slider.sc-duet-toggle{background-color:#0077b3;box-shadow:none}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:checked+.duet-slider.sc-duet-toggle{background-color:#c60c30}.duet-switch.sc-duet-toggle input.sc-duet-toggle:checked+.duet-slider.sc-duet-toggle::before{background-color:white;box-shadow:none;transform:translateX(20px)}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled+.duet-slider.sc-duet-toggle{cursor:default}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle{box-shadow:inset 0 0 0 1px #cfd2d4}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle{box-shadow:inset 0 0 0 1px #cfcfd1}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle::before{background:#cfd2d4}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:not(:checked)+.duet-slider.sc-duet-toggle::before{background:#cfcfd1}.duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:checked+.duet-slider.sc-duet-toggle{background:#cfd2d4}.duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:disabled:checked+.duet-slider.sc-duet-toggle{background:#cfcfd1}.user-is-tabbing.sc-duet-toggle-h .duet-switch.sc-duet-toggle input.sc-duet-toggle:focus+.duet-slider.sc-duet-toggle{box-shadow:0 0 0 1px white, 0 0 0 3px rgba(0, 119, 179, 0.75)}.user-is-tabbing.sc-duet-toggle-h .duet-theme-turva.sc-duet-toggle .duet-switch.sc-duet-toggle input.sc-duet-toggle:focus+.duet-slider.sc-duet-toggle{box-shadow:0 0 0 1px white, 0 0 0 3px #171c3a}.duet-slider.sc-duet-toggle{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer;background-color:white;border-radius:20px;box-shadow:inset 0 0 0 1px #00294d;transition:background-color 300ms ease}.duet-theme-turva.sc-duet-toggle .duet-slider.sc-duet-toggle{box-shadow:inset 0 0 0 1px #171c3a}.duet-slider.sc-duet-toggle::before{position:absolute;bottom:4px;left:4px;width:20px;height:20px;content:\"\";background-color:#00294d;border-radius:50%;transition:300ms ease}.duet-theme-turva.sc-duet-toggle .duet-slider.sc-duet-toggle::before{background-color:#171c3a}";
|
|
9142
9697
|
|
|
9143
|
-
let DuetToggle$1 = class extends
|
|
9698
|
+
let DuetToggle$1 = class extends H {
|
|
9144
9699
|
constructor() {
|
|
9145
9700
|
super();
|
|
9146
9701
|
this.__registerHost();
|
|
@@ -9229,11 +9784,11 @@ let DuetToggle$1 = class extends HTMLElement {
|
|
|
9229
9784
|
|
|
9230
9785
|
const duetTooltipCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;z-index:200;display:inline-flex;width:auto;margin-top:-16px !important;margin-left:-3px !important;-webkit-tap-highlight-color:transparent}.duet-tooltip{position:absolute;right:-21px;bottom:100%;z-index:950;display:block;width:282px;min-height:48px;max-height:340px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#00294d;visibility:hidden;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:300ms ease;transform:scale(0.9) translateZ(0) translateY(20px);transform-origin:100% 100%}.duet-tooltip.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6;box-shadow:0 2px 10px 0 rgba(117, 117, 117, 0.13)}.duet-tooltip::after{position:absolute;right:22px;bottom:-20px;z-index:200;width:0;height:0;content:\"\";border:10px solid transparent;border-top:10px solid white}.duet-tooltip::before{position:absolute;right:21px;bottom:-22px;z-index:100;width:0;height:0;content:\"\";border:11px solid transparent;border-top:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip::before{border-top:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-down{top:100%;bottom:auto;transform:scale(0.9) translateZ(0) translateY(-20px);transform-origin:100% 0}.duet-tooltip.duet-tooltip-down::after{top:-20px;bottom:auto;border:10px solid transparent;border-bottom:10px solid white}.duet-tooltip.duet-tooltip-down::before{top:-22px;bottom:auto;border:11px solid transparent;border-bottom:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip.duet-tooltip-down::before{border-bottom:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-left{right:-21px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-left::after{right:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-left::before{right:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-right{right:auto !important;left:-9px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-right::after{right:auto !important;left:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-right::before{right:auto !important;left:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label{right:auto !important;left:0;width:282px !important;transform-origin:0 0 !important}.duet-tooltip.duet-tooltip-has-label::after{right:auto !important;left:1px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label::before{right:auto !important;left:0 !important;transform:none !important}.duet-tooltip.duet-tooltip-active{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(-8px)}.duet-tooltip.duet-tooltip-active.duet-tooltip-down{transform:scale(1.0001) translateZ(0) translateY(8px)}.duet-tooltip-button{z-index:100;display:inline-block;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 !important;margin-right:-12px;line-height:normal !important;color:#0077b3;white-space:nowrap;cursor:pointer;background:transparent !important;border-radius:4px}.duet-tooltip-button.duet-theme-turva{color:#c60c30}.duet-tooltip-button:hover{color:#004d80}.duet-tooltip-button:hover.duet-theme-turva{color:#940925}.duet-tooltip-button:focus{background:transparent !important;outline:0}:host(.user-is-tabbing) .duet-tooltip-button:focus{background:transparent !important;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}:host(.user-is-tabbing) .duet-tooltip-button.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tooltip-button svg{width:20px;height:20px;pointer-events:none}.duet-tooltip-button-has-label{margin-right:0}.duet-tooltip-scrollable{padding:20px !important;width:100%;max-height:250px;padding-right:25px !important;overflow-y:auto;-webkit-hyphens:auto;hyphens:auto;border-radius:4px;-webkit-overflow-scrolling:touch}.duet-tooltip-scrollable:focus{outline:none}:host(.user-is-tabbing) .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tooltip-scrollable::-webkit-scrollbar{width:4px}.duet-tooltip-scrollable::-webkit-scrollbar-track{border-radius:4px}.duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e1e3e6;border-radius:4px}.duet-theme-turva .duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e4e4e6}.duet-tooltip-label{position:relative;z-index:100;display:inline-block;max-width:calc(100% - 30px);margin-left:12px !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.25;text-align:left;white-space:normal;vertical-align:top}.duet-theme-turva .duet-tooltip-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-tooltip-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0 !important;padding:0 !important;margin:0 !important;line-height:normal;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;-webkit-appearance:none;appearance:none}.duet-tooltip-close:focus{outline:none;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .duet-tooltip-close:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}@media (min-width: 48em){.duet-tooltip.duet-mq-medium{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-medium::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium.duet-tooltip-down{transform-origin:50% 0}}@media (min-width: 62em){.duet-tooltip.duet-mq-large{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-large::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large.duet-tooltip-down{transform-origin:50% 0}}";
|
|
9231
9786
|
|
|
9232
|
-
let DuetTooltip$1 = class extends
|
|
9787
|
+
let DuetTooltip$1 = class extends H {
|
|
9233
9788
|
constructor() {
|
|
9234
9789
|
super();
|
|
9235
9790
|
this.__registerHost();
|
|
9236
|
-
|
|
9791
|
+
this.__attachShadow();
|
|
9237
9792
|
/**
|
|
9238
9793
|
* Own Properties.
|
|
9239
9794
|
*/
|
|
@@ -9256,25 +9811,35 @@ let DuetTooltip$1 = class extends HTMLElement {
|
|
|
9256
9811
|
*/
|
|
9257
9812
|
this.language = getLanguage();
|
|
9258
9813
|
/**
|
|
9259
|
-
*
|
|
9260
|
-
* readers. This property is always required to create an accessible interface!
|
|
9814
|
+
* Default language strings for the accessibleLabel
|
|
9261
9815
|
* @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
|
|
9262
9816
|
*/
|
|
9263
|
-
this.
|
|
9817
|
+
this.accessibleLabelDefault = {
|
|
9264
9818
|
fi: "Näytä lisätietoja",
|
|
9265
9819
|
en: "Show more information",
|
|
9266
9820
|
sv: "Visa mer tilläggsuppgifter",
|
|
9267
|
-
}
|
|
9821
|
+
};
|
|
9268
9822
|
/**
|
|
9269
|
-
* Adds accessible label for the
|
|
9270
|
-
* readers. This property is always required to create an
|
|
9823
|
+
* Adds accessible label for the info icon that is only shown for screen
|
|
9824
|
+
* readers. This property is always required to create an accessible interface!
|
|
9825
|
+
* @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
|
|
9826
|
+
*/
|
|
9827
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefault, this.language);
|
|
9828
|
+
/**
|
|
9829
|
+
* Default language strings for the accessibleCloseLabel
|
|
9271
9830
|
* @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
|
|
9272
9831
|
*/
|
|
9273
|
-
this.
|
|
9832
|
+
this.accessibleCloseLabelDefault = {
|
|
9274
9833
|
fi: "Sulje lisätiedot",
|
|
9275
9834
|
en: "Close details",
|
|
9276
9835
|
sv: "Stäng tilläggsuppgifter",
|
|
9277
|
-
}
|
|
9836
|
+
};
|
|
9837
|
+
/**
|
|
9838
|
+
* Adds accessible label for the close icon that is only shown for screen
|
|
9839
|
+
* readers. This property is always required to create an accessibly interface!
|
|
9840
|
+
* @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
|
|
9841
|
+
*/
|
|
9842
|
+
this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefault, this.language);
|
|
9278
9843
|
/**
|
|
9279
9844
|
* Label of the tooltip. If used, replaces the accessibleLabel option.
|
|
9280
9845
|
*/
|
|
@@ -9446,11 +10011,11 @@ let DuetTooltip$1 = class extends HTMLElement {
|
|
|
9446
10011
|
const duetTrayCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-tray{position:fixed;top:4rem;right:0;left:0;z-index:399;display:flex;flex-direction:column;max-height:calc(100% - 8rem);padding:16px 20px 16px 24px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;visibility:hidden;background:#f3f9fc;border-bottom:1px solid #e1e3e6;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:opacity 600ms ease, visibility 600ms ease, transform 600ms ease;transform:translateY(-4rem)}@media (min-width: 62em){.duet-tray{padding:16px 36px}}@media (min-width: 106.25em){.duet-tray{padding:16px 52px 16px 60px}}.duet-tray:focus{outline:0}:host(.user-is-tabbing) .duet-tray:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-tray.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tray.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;background:#f5f5f7;border-color:#e4e4e6}.duet-tray.duet-tray-is-active{visibility:visible;opacity:1;transform:translateY(0)}.duet-tray.duet-tray-is-hidden{visibility:hidden;opacity:0;transform:translateY(-4rem)}@media (min-width: 62em){.duet-tray.duet-tray-is-responsive{display:none !important}}.duet-tray.duet-tray-is-expandable{padding-right:66px}@media (min-width: 62em){.duet-tray.duet-tray-is-expandable{padding-right:78px}}@media (min-width: 106.25em){.duet-tray.duet-tray-is-expandable{padding-right:94px}}.duet-tray-expandable{position:relative;z-index:100;width:calc(100% + 46px);max-height:0;overflow-y:auto;visibility:hidden;opacity:0;transition:opacity 600ms ease, visibility 600ms ease, max-height 600ms ease;scrollbar-width:none}.duet-tray-expandable::-webkit-scrollbar{display:none}.duet-tray-expandable.active{max-height:500px;visibility:visible;opacity:1}.duet-tray-expandable-content{width:100%;margin-top:16px;border-top:1px solid #e1e3e6}.duet-theme-turva .duet-tray-expandable-content{border-color:#e4e4e6}.duet-tray-button{-webkit-user-select:none;user-select:none;padding:20px !important;position:absolute;top:-2px;right:0;z-index:200;color:#00294d;text-align:center;cursor:pointer;border-radius:4px;transition:transform 300ms ease;-webkit-tap-highlight-color:transparent}@media (min-width: 62em){.duet-tray-button{margin-right:16px}}@media (min-width: 106.25em){.duet-tray-button{margin-right:36px}}.duet-theme-turva .duet-tray-button{color:#171c3a}.duet-tray-button.duet-tray-is-expanded{transform:rotate(-180deg)}.duet-tray-button:focus{outline:0}:host(.user-is-tabbing) .duet-tray-button:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-tray-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tray-button:active{box-shadow:none;opacity:0.75}";
|
|
9447
10012
|
|
|
9448
10013
|
const topOffset = parseFloat(sizeHeader) * 2 * 16; // convert rem -> px
|
|
9449
|
-
let DuetTray$1 = class extends
|
|
10014
|
+
let DuetTray$1 = class extends H {
|
|
9450
10015
|
constructor() {
|
|
9451
10016
|
super();
|
|
9452
10017
|
this.__registerHost();
|
|
9453
|
-
|
|
10018
|
+
this.__attachShadow();
|
|
9454
10019
|
/**
|
|
9455
10020
|
* Own Properties.
|
|
9456
10021
|
*/
|
|
@@ -9469,25 +10034,35 @@ let DuetTray$1 = class extends HTMLElement {
|
|
|
9469
10034
|
*/
|
|
9470
10035
|
this.language = getLanguage();
|
|
9471
10036
|
/**
|
|
9472
|
-
*
|
|
9473
|
-
* close toggle. Not visible for normal users.
|
|
10037
|
+
* Defaults for accessibleCloseLabel
|
|
9474
10038
|
* @default {fi: "Sulje", en: "Close", sv: "Stänga"}
|
|
9475
10039
|
*/
|
|
9476
|
-
this.
|
|
10040
|
+
this.accessibleCloseLabelDefaults = {
|
|
9477
10041
|
fi: "Sulje",
|
|
9478
10042
|
en: "Close",
|
|
9479
10043
|
sv: "Stäng",
|
|
9480
|
-
}
|
|
10044
|
+
};
|
|
9481
10045
|
/**
|
|
9482
10046
|
* Accessible label that is shown for screen reader users in the expandable
|
|
9483
|
-
*
|
|
10047
|
+
* close toggle. Not visible for normal users.
|
|
10048
|
+
* @default {fi: "Sulje", en: "Close", sv: "Stänga"}
|
|
10049
|
+
*/
|
|
10050
|
+
this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefaults, this.language);
|
|
10051
|
+
/**
|
|
10052
|
+
* Defaults for accessibleOpenLabel
|
|
9484
10053
|
* @default {fi: "Avaa", en: "Open", sv: "Öppen"}
|
|
9485
10054
|
*/
|
|
9486
|
-
this.
|
|
10055
|
+
this.accessibleOpenLabelDefaults = {
|
|
9487
10056
|
fi: "Avaa",
|
|
9488
10057
|
en: "Open",
|
|
9489
10058
|
sv: "Öppna",
|
|
9490
|
-
}
|
|
10059
|
+
};
|
|
10060
|
+
/**
|
|
10061
|
+
* Accessible label that is shown for screen reader users in the expandable
|
|
10062
|
+
* open toggle. Not visible for normal users.
|
|
10063
|
+
* @default {fi: "Avaa", en: "Open", sv: "Öppen"}
|
|
10064
|
+
*/
|
|
10065
|
+
this.accessibleOpenLabel = getLocaleString(this.accessibleOpenLabelDefaults, this.language);
|
|
9491
10066
|
/**
|
|
9492
10067
|
* Theme of the info panel.
|
|
9493
10068
|
*/
|
|
@@ -9558,178 +10133,122 @@ let DuetTray$1 = class extends HTMLElement {
|
|
|
9558
10133
|
static get style() { return duetTrayCss; }
|
|
9559
10134
|
};
|
|
9560
10135
|
|
|
9561
|
-
const
|
|
9562
|
-
if (bytes === 0) {
|
|
9563
|
-
return "0 Bytes";
|
|
9564
|
-
}
|
|
9565
|
-
const k = 1024;
|
|
9566
|
-
const dm = decimals < 0 ? 0 : decimals;
|
|
9567
|
-
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
9568
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
9569
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
9570
|
-
};
|
|
9571
|
-
|
|
9572
|
-
const DuetUploadFileList = ({ data, onDelete, onCancel, getError }) => {
|
|
9573
|
-
if (data.invalid.length === 0 && data.valid.length === 0) {
|
|
9574
|
-
return;
|
|
9575
|
-
}
|
|
9576
|
-
return (h("ol", { class: "duet-upload-filelist" },
|
|
9577
|
-
data.valid.length !== 0 && (h("li", null,
|
|
9578
|
-
h("duet-visually-hidden", null, "Files"),
|
|
9579
|
-
h("ul", null, data.valid.length !== 0 &&
|
|
9580
|
-
data.valid.map(e => (h("li", { class: "duet-upload-file" },
|
|
9581
|
-
h("div", { class: "duet-upload-file-container" },
|
|
9582
|
-
h("div", { class: "duet-upload-file-link" }, e.url ? (h("duet-button", { variation: "plain", icon: "messaging-attachment", url: e.url },
|
|
9583
|
-
e.item.name,
|
|
9584
|
-
" (",
|
|
9585
|
-
formatBytes(e.item.size),
|
|
9586
|
-
")")) : (`${e.item.name} (${formatBytes(e.item.size)})`)),
|
|
9587
|
-
h("ul", { class: "duet-upload-file-actions", role: "menubar", "aria-label": "file actions" },
|
|
9588
|
-
e.progress < 100 && (h("li", { role: "none" },
|
|
9589
|
-
h("duet-button", { role: "menuitem", variation: "plain", icon: "messaging-declined", "icon-only": true, "icon-size": "large", margin: "none", onClick: ev => onCancel(e.item.name, ev) }))),
|
|
9590
|
-
e.progress === 100 && (h("li", { role: "none" },
|
|
9591
|
-
h("duet-button", { role: "menuitem", variation: "destructive", icon: "action-delete", "icon-only": true, "icon-size": "large", margin: "none", onClick: ev => onDelete(e.item.name, ev) }))))),
|
|
9592
|
-
e.progress < 100 && (h("div", { class: "duet-upload-file-progress" },
|
|
9593
|
-
h("progress", { value: e.progress, max: "100" },
|
|
9594
|
-
h("div", { class: "progress-bar" },
|
|
9595
|
-
h("span", { style: { width: `${e.progress}%;` } },
|
|
9596
|
-
"Progress: ",
|
|
9597
|
-
e.progress,
|
|
9598
|
-
"%"))))))))))),
|
|
9599
|
-
data.invalid.length !== 0 && (h("li", null,
|
|
9600
|
-
h("duet-visually-hidden", null, "Files with Errors"),
|
|
9601
|
-
h("ul", null, data.invalid.map(e => {
|
|
9602
|
-
return (h("li", { class: "duet-upload-file duet-upload-file-errors" },
|
|
9603
|
-
h("div", { class: "duet-upload-file-container" },
|
|
9604
|
-
h("div", { class: "duet-upload-file-link duet-upload-file-link-error" },
|
|
9605
|
-
h("div", null,
|
|
9606
|
-
e.item.name,
|
|
9607
|
-
" (",
|
|
9608
|
-
formatBytes(e.item.size),
|
|
9609
|
-
")"),
|
|
9610
|
-
h("div", { "data-error-type": e.error.type, "data-error-message": e.error.system_message }, getError(e.error.type))),
|
|
9611
|
-
h("ul", { class: "duet-upload-file-actions", role: "menubar", "aria-label": "file actions" },
|
|
9612
|
-
h("li", { role: "none" },
|
|
9613
|
-
h("duet-button", { role: "menuitem", variation: "destructive", icon: "action-delete", "icon-only": true, "icon-size": "large", margin: "none", onClick: ev => onDelete(e.item.name, ev) }))))));
|
|
9614
|
-
}))))));
|
|
9615
|
-
};
|
|
9616
|
-
|
|
9617
|
-
const errorcodes = [
|
|
10136
|
+
const errorCodes = [
|
|
9618
10137
|
{
|
|
9619
10138
|
type: "default",
|
|
9620
10139
|
system_message: "unknown error",
|
|
9621
10140
|
message: {
|
|
9622
|
-
fi: "",
|
|
9623
|
-
sv: "",
|
|
9624
|
-
en: "An unknown error occured, please try again"
|
|
10141
|
+
fi: "Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",
|
|
10142
|
+
sv: "Ett okänt fel uppstod, försök igen.",
|
|
10143
|
+
en: "An unknown error occured, please try again."
|
|
9625
10144
|
}
|
|
9626
10145
|
},
|
|
9627
10146
|
{
|
|
9628
10147
|
type: "400",
|
|
9629
10148
|
system_message: "Bad Request: The server could not understand the request due to invalid syntax.",
|
|
9630
10149
|
message: {
|
|
9631
|
-
fi: "",
|
|
9632
|
-
sv: "",
|
|
9633
|
-
en: "The server rejected your file"
|
|
10150
|
+
fi: "Tiedostoa ei hyväksytty.",
|
|
10151
|
+
sv: "Servern avvisade din fil.",
|
|
10152
|
+
en: "The server rejected your file."
|
|
9634
10153
|
}
|
|
9635
10154
|
},
|
|
9636
10155
|
{
|
|
9637
10156
|
type: "401",
|
|
9638
|
-
system_message: "Not Authenticated: The client must authenticate itself to get the requested response
|
|
10157
|
+
system_message: "Not Authenticated: The client must authenticate itself to get the requested response...",
|
|
9639
10158
|
message: {
|
|
9640
|
-
fi: "",
|
|
9641
|
-
sv: "",
|
|
9642
|
-
en: "You need to be logged in to upload files"
|
|
10159
|
+
fi: "Vain kirjautunut käyttäjä voi lähettää tiedostoja.",
|
|
10160
|
+
sv: "Du måste vara inloggad för att ladda upp filer.",
|
|
10161
|
+
en: "You need to be logged in to upload files."
|
|
9643
10162
|
}
|
|
9644
10163
|
},
|
|
9645
10164
|
{
|
|
9646
10165
|
type: "403",
|
|
9647
|
-
system_message: "No Access: The client does not have access rights to the content
|
|
10166
|
+
system_message: "No Access: The client does not have access rights to the content.",
|
|
9648
10167
|
message: {
|
|
9649
|
-
fi: "",
|
|
9650
|
-
sv: "",
|
|
9651
|
-
en: "You do not have the correct access rights to upload files"
|
|
10168
|
+
fi: "Ei oikeuksia lähettää tiedostoja.",
|
|
10169
|
+
sv: "Du har inte rätt åtkomsträttigheter för att ladda upp filer.",
|
|
10170
|
+
en: "You do not have the correct access rights to upload files."
|
|
9652
10171
|
}
|
|
9653
10172
|
},
|
|
9654
10173
|
{
|
|
9655
10174
|
type: "413",
|
|
9656
10175
|
system_message: "Payload too large",
|
|
9657
10176
|
message: {
|
|
9658
|
-
fi: "",
|
|
9659
|
-
sv: "",
|
|
9660
|
-
en: "The file was to large for the server to handle"
|
|
10177
|
+
fi: "Tiedosto oli liian vastaanotettavaksi.",
|
|
10178
|
+
sv: "Filen var för stor för servern att hantera.",
|
|
10179
|
+
en: "The file was to large for the server to handle."
|
|
9661
10180
|
}
|
|
9662
10181
|
},
|
|
9663
10182
|
{
|
|
9664
10183
|
type: "415",
|
|
9665
10184
|
system_message: "Unsupported media type",
|
|
9666
10185
|
message: {
|
|
9667
|
-
fi: "",
|
|
9668
|
-
sv: "",
|
|
9669
|
-
en: "The server rejected the file because it had the wrong type"
|
|
10186
|
+
fi: "Tiedoston tyyppi oli väärä.",
|
|
10187
|
+
sv: "Servern avvisade filen eftersom den hade fel typ.",
|
|
10188
|
+
en: "The server rejected the file because it had the wrong type."
|
|
9670
10189
|
}
|
|
9671
10190
|
},
|
|
9672
10191
|
{
|
|
9673
10192
|
type: "429",
|
|
9674
10193
|
system_message: "Too many request from same address",
|
|
9675
10194
|
message: {
|
|
9676
|
-
fi: "",
|
|
9677
|
-
sv: "",
|
|
9678
|
-
en: "The server has received to many request from you, please try again later"
|
|
10195
|
+
fi: "Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",
|
|
10196
|
+
sv: "Servern har fått många förfrågningar från dig, försök igen senare.",
|
|
10197
|
+
en: "The server has received to many request from you, please try again later."
|
|
9679
10198
|
}
|
|
9680
10199
|
},
|
|
9681
10200
|
{
|
|
9682
10201
|
type: "500",
|
|
9683
10202
|
system_message: "Internal Server Error",
|
|
9684
10203
|
message: {
|
|
9685
|
-
fi: "",
|
|
9686
|
-
sv: "",
|
|
9687
|
-
en: "The server reported an unknown error and the upload failed"
|
|
10204
|
+
fi: "Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",
|
|
10205
|
+
sv: "Servern rapporterade ett okänt fel och uppladdningen misslyckades.",
|
|
10206
|
+
en: "The server reported an unknown error and the upload failed."
|
|
9688
10207
|
}
|
|
9689
10208
|
},
|
|
9690
10209
|
{
|
|
9691
10210
|
type: "duet-upload-100",
|
|
9692
10211
|
system_message: "File extension not allowed",
|
|
9693
10212
|
message: {
|
|
9694
|
-
fi: "",
|
|
9695
|
-
sv: "",
|
|
9696
|
-
en: "You cannot upload files with that extension"
|
|
10213
|
+
fi: "Tiedoston tyyppi ei ole sallittu.",
|
|
10214
|
+
sv: "Du kan inte ladda upp filer av den type.",
|
|
10215
|
+
en: "You cannot upload files with that extension."
|
|
9697
10216
|
}
|
|
9698
10217
|
},
|
|
9699
10218
|
{
|
|
9700
10219
|
type: "duet-upload-001",
|
|
9701
10220
|
system_message: "File transfer failed",
|
|
9702
10221
|
message: {
|
|
9703
|
-
fi: "",
|
|
9704
|
-
sv: "",
|
|
9705
|
-
en: "Your connection to the server was interrupted, try again"
|
|
10222
|
+
fi: "Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",
|
|
10223
|
+
sv: "Din anslutning till servern avbröts, försök igen.",
|
|
10224
|
+
en: "Your connection to the server was interrupted, try again."
|
|
9706
10225
|
}
|
|
9707
10226
|
},
|
|
9708
10227
|
{
|
|
9709
10228
|
type: "duet-upload-101",
|
|
9710
10229
|
system_message: "File mimetype not allowed",
|
|
9711
10230
|
message: {
|
|
9712
|
-
fi: "",
|
|
9713
|
-
sv: "",
|
|
9714
|
-
en: "You cannot upload files of that type"
|
|
10231
|
+
fi: "Tiedoston tyyppi ei ole sallittu.",
|
|
10232
|
+
sv: "Du kan inte ladda upp filer av den typ.",
|
|
10233
|
+
en: "You cannot upload files of that type."
|
|
9715
10234
|
}
|
|
9716
10235
|
},
|
|
9717
10236
|
{
|
|
9718
10237
|
type: "duet-upload-201",
|
|
9719
10238
|
system_message: "File is too large",
|
|
9720
10239
|
message: {
|
|
9721
|
-
fi: "",
|
|
9722
|
-
sv: "",
|
|
9723
|
-
en: "The file is larger than permitted"
|
|
10240
|
+
fi: "Tiedosto on liian iso.",
|
|
10241
|
+
sv: "Filen är större än tillåtet.",
|
|
10242
|
+
en: "The file is larger than permitted."
|
|
9724
10243
|
}
|
|
9725
10244
|
},
|
|
9726
10245
|
{
|
|
9727
10246
|
type: "duet-upload-202",
|
|
9728
10247
|
system_message: "The combined size of all files is too large",
|
|
9729
10248
|
message: {
|
|
9730
|
-
fi: "",
|
|
9731
|
-
sv: "",
|
|
9732
|
-
en: "You have reached the maximum combined filesize"
|
|
10249
|
+
fi: "Tiedostojen yhteenlaskettu koko on liian iso.",
|
|
10250
|
+
sv: "Du har nått den maximala kombinerade filstorleken.",
|
|
10251
|
+
en: "You have reached the maximum combined filesize."
|
|
9733
10252
|
}
|
|
9734
10253
|
},
|
|
9735
10254
|
{
|
|
@@ -9737,7 +10256,7 @@ const errorcodes = [
|
|
|
9737
10256
|
system_message: "The maximum file limit has been reached",
|
|
9738
10257
|
message: {
|
|
9739
10258
|
fi: "Liitteiden maksimimäärä saavutettu.",
|
|
9740
|
-
sv: "",
|
|
10259
|
+
sv: "Maximalt antal bilagor har uppnåtts.",
|
|
9741
10260
|
en: "Maximum number of attachments reached."
|
|
9742
10261
|
}
|
|
9743
10262
|
}
|
|
@@ -9749,16 +10268,81 @@ const getError = (code) => {
|
|
|
9749
10268
|
system_message: undefined,
|
|
9750
10269
|
message: undefined,
|
|
9751
10270
|
};
|
|
9752
|
-
error =
|
|
9753
|
-
|
|
10271
|
+
error = errorCodes.filter(errorItem => {
|
|
10272
|
+
// the == is intentional we may be comparing numbers to strings - and that is ok here
|
|
10273
|
+
return errorItem.type == code;
|
|
9754
10274
|
})[0];
|
|
9755
10275
|
if (!error) {
|
|
9756
|
-
error =
|
|
10276
|
+
error = errorCodes.filter(errorItem => {
|
|
9757
10277
|
return errorItem.type === "default";
|
|
9758
10278
|
})[0];
|
|
9759
10279
|
}
|
|
9760
10280
|
return error;
|
|
9761
10281
|
};
|
|
10282
|
+
const getI18nError = (errorCode) => {
|
|
10283
|
+
const errorFromJson = getError(errorCode);
|
|
10284
|
+
const i18String = getLocaleString(errorFromJson.message);
|
|
10285
|
+
if (i18String === "" || !i18String) {
|
|
10286
|
+
return errorFromJson.system_message;
|
|
10287
|
+
}
|
|
10288
|
+
else {
|
|
10289
|
+
return i18String;
|
|
10290
|
+
}
|
|
10291
|
+
};
|
|
10292
|
+
|
|
10293
|
+
const ErrorItem = ({ data }) => {
|
|
10294
|
+
const { item, error } = data;
|
|
10295
|
+
const { name } = item;
|
|
10296
|
+
const { type } = error;
|
|
10297
|
+
return (h("span", { class: "duet-upload-item-error", role: "status" },
|
|
10298
|
+
h("duet-paragraph", { class: "duet-upload-item-name", color: "danger", margin: "none", weight: "semi-bold" },
|
|
10299
|
+
h("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
|
|
10300
|
+
" ",
|
|
10301
|
+
name),
|
|
10302
|
+
h("duet-paragraph", { class: "duet-upload-item-error-label", size: "small", margin: "none", color: "danger" }, getI18nError(type))));
|
|
10303
|
+
};
|
|
10304
|
+
|
|
10305
|
+
const ProgressItem = ({ progress, name }) => (h("span", null,
|
|
10306
|
+
h("duet-paragraph", { color: "secondary", margin: "none", size: "small" }, name),
|
|
10307
|
+
h("duet-spacer", { size: "xx-small" }),
|
|
10308
|
+
h("duet-progress", { progress: Math.ceil(progress), "aria-hidden": true })));
|
|
10309
|
+
|
|
10310
|
+
const formatBytes = (bytes, decimals = 2) => {
|
|
10311
|
+
if (bytes === 0) {
|
|
10312
|
+
return "0 Bytes";
|
|
10313
|
+
}
|
|
10314
|
+
const k = 1024;
|
|
10315
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
10316
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
10317
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
10318
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
10319
|
+
};
|
|
10320
|
+
|
|
10321
|
+
const SuccessItem = ({ data, showLinks }) => {
|
|
10322
|
+
const { item, size, uploaded, url, meta } = data;
|
|
10323
|
+
const { name } = item;
|
|
10324
|
+
const ContentName = (h("span", { class: "duet-upload-item-name" },
|
|
10325
|
+
h("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
|
|
10326
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
10327
|
+
name));
|
|
10328
|
+
const SizeText = (h("span", { class: "duet-upload-item-size", style: { fontSize: "14px", fontWeight: "400" } },
|
|
10329
|
+
"(",
|
|
10330
|
+
formatBytes(size),
|
|
10331
|
+
")"));
|
|
10332
|
+
const FilenameLine = uploaded && url && showLinks ? (h("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
|
|
10333
|
+
h("duet-link", { url: url, external: true }, ContentName),
|
|
10334
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
10335
|
+
SizeText)) : (h("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
|
|
10336
|
+
ContentName,
|
|
10337
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
10338
|
+
SizeText));
|
|
10339
|
+
const Badges = meta && meta.badges ? (h("span", null,
|
|
10340
|
+
h("duet-spacer", { size: "xx-small" }),
|
|
10341
|
+
meta.badges.map(badgeText => (h("duet-badge", { color: "primary" }, badgeText))))) : undefined;
|
|
10342
|
+
return (h("span", { class: "duet-upload-item-success" },
|
|
10343
|
+
h("div", null, FilenameLine),
|
|
10344
|
+
Badges));
|
|
10345
|
+
};
|
|
9762
10346
|
|
|
9763
10347
|
const validateFileExtension = (name, allowedExtensions) => {
|
|
9764
10348
|
if (!allowedExtensions) {
|
|
@@ -9849,12 +10433,8 @@ const validateTotalAmountIsAboveMax = (filelist, maxFiles) => {
|
|
|
9849
10433
|
return false;
|
|
9850
10434
|
};
|
|
9851
10435
|
|
|
9852
|
-
const makeXhrRequest = (payload, options, onFailure, onSuccess, onProgress) => {
|
|
9853
|
-
const { type, xhr, uri, argument, headers } =
|
|
9854
|
-
type: "POST",
|
|
9855
|
-
argument: null,
|
|
9856
|
-
headers: null,
|
|
9857
|
-
}, options);
|
|
10436
|
+
const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress }) => {
|
|
10437
|
+
const { type = "POST", xhr, uri, argument = null, headers = null } = options;
|
|
9858
10438
|
xhr.open(type, `${uri}${argument || ""}`, true);
|
|
9859
10439
|
const { data, name } = payload;
|
|
9860
10440
|
// headers must be added after open
|
|
@@ -9881,13 +10461,13 @@ const makeXhrRequest = (payload, options, onFailure, onSuccess, onProgress) => {
|
|
|
9881
10461
|
return xhr;
|
|
9882
10462
|
};
|
|
9883
10463
|
|
|
9884
|
-
const duetUploadCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:
|
|
10464
|
+
const duetUploadCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";
|
|
9885
10465
|
|
|
9886
|
-
let DuetUpload$1 = class extends
|
|
10466
|
+
let DuetUpload$1 = class extends H {
|
|
9887
10467
|
constructor() {
|
|
9888
10468
|
super();
|
|
9889
10469
|
this.__registerHost();
|
|
9890
|
-
|
|
10470
|
+
this.__attachShadow();
|
|
9891
10471
|
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
9892
10472
|
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
9893
10473
|
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
@@ -9903,9 +10483,19 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
9903
10483
|
this.buttonId = createID("DuetButton");
|
|
9904
10484
|
this.labelId = createID("DuetLabel");
|
|
9905
10485
|
this.uploadId = createID("DuetUpload");
|
|
10486
|
+
this.editableTableId = createID("DuetEditableTable");
|
|
9906
10487
|
this.filesInProgress = new Map();
|
|
9907
10488
|
this.fileMaxReached = false;
|
|
9908
10489
|
this.bytesMaxReached = false;
|
|
10490
|
+
this.internalStatusMessageLabel = undefined;
|
|
10491
|
+
/**
|
|
10492
|
+
* Properties
|
|
10493
|
+
*/
|
|
10494
|
+
this.DefaultGroups = {
|
|
10495
|
+
inprogress: "inprogress",
|
|
10496
|
+
success: "success",
|
|
10497
|
+
failure: "failure",
|
|
10498
|
+
};
|
|
9909
10499
|
/**
|
|
9910
10500
|
* State() variables
|
|
9911
10501
|
*/
|
|
@@ -9916,8 +10506,115 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
9916
10506
|
*/
|
|
9917
10507
|
this.external = false;
|
|
9918
10508
|
/**
|
|
9919
|
-
*
|
|
9920
|
-
*
|
|
10509
|
+
* If set the upload component will not display an upload button, you will have to create one yourself
|
|
10510
|
+
* and call the exposed method startUpload
|
|
10511
|
+
*/
|
|
10512
|
+
this.hideButton = false;
|
|
10513
|
+
/**
|
|
10514
|
+
* Default actions added to the internally used duet-editable-table
|
|
10515
|
+
*/
|
|
10516
|
+
this.actions = [
|
|
10517
|
+
{
|
|
10518
|
+
icon: "action-delete",
|
|
10519
|
+
color: "color-danger",
|
|
10520
|
+
color_hover: "category-home",
|
|
10521
|
+
id: "delete",
|
|
10522
|
+
map: ["success", "failure"],
|
|
10523
|
+
label: {
|
|
10524
|
+
fi: "Poista tiedosto",
|
|
10525
|
+
en: "Poista tiedosto",
|
|
10526
|
+
sv: "Ta bort filen",
|
|
10527
|
+
},
|
|
10528
|
+
},
|
|
10529
|
+
{
|
|
10530
|
+
icon: "navigation-close",
|
|
10531
|
+
color: "primary",
|
|
10532
|
+
color_hover: "category-home",
|
|
10533
|
+
id: "cancel",
|
|
10534
|
+
map: ["inprogress"],
|
|
10535
|
+
label: {
|
|
10536
|
+
fi: "Keskeytä lähetys",
|
|
10537
|
+
en: "Cancel the upload",
|
|
10538
|
+
sv: "Stop överföringen",
|
|
10539
|
+
},
|
|
10540
|
+
},
|
|
10541
|
+
];
|
|
10542
|
+
/**
|
|
10543
|
+
* If enabled the editable-table will display links on successfully uploaded items,
|
|
10544
|
+
* this requires the server can respond with link URIs in the correct format
|
|
10545
|
+
* and that the files are accessible to the user
|
|
10546
|
+
*/
|
|
10547
|
+
this.showLinks = false;
|
|
10548
|
+
/**
|
|
10549
|
+
* Property to change the aria upload progress text read aloud by screenreaders
|
|
10550
|
+
* @default {
|
|
10551
|
+
* fi: {
|
|
10552
|
+
* inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
10553
|
+
* inProgressWithErrors:
|
|
10554
|
+
* "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
10555
|
+
* done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
10556
|
+
* doneWithErrors:
|
|
10557
|
+
* "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
10558
|
+
* files: "tiedostot",
|
|
10559
|
+
* file: "tiedosto",
|
|
10560
|
+
* },
|
|
10561
|
+
* sv: {
|
|
10562
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10563
|
+
* inProgressWithErrors:
|
|
10564
|
+
* "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
10565
|
+
* done: "Alla {filesTotal} har lagts till",
|
|
10566
|
+
* doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
10567
|
+
* files: "filer",
|
|
10568
|
+
* file: "fil",
|
|
10569
|
+
* },
|
|
10570
|
+
* en: {
|
|
10571
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10572
|
+
* inProgressWithErrors:
|
|
10573
|
+
* "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
10574
|
+
* done: "All {filesTotal} added successfully",
|
|
10575
|
+
* doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
10576
|
+
* files: "tiedostoa",
|
|
10577
|
+
* file: "tiedosto",
|
|
10578
|
+
* },
|
|
10579
|
+
* }
|
|
10580
|
+
*/
|
|
10581
|
+
this.statusLabelDefaults = {
|
|
10582
|
+
fi: {
|
|
10583
|
+
inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
10584
|
+
inProgressWithErrors: "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
10585
|
+
done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
10586
|
+
doneWithErrors: "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
10587
|
+
files: "tiedostot",
|
|
10588
|
+
file: "tiedosto",
|
|
10589
|
+
},
|
|
10590
|
+
sv: {
|
|
10591
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10592
|
+
inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
10593
|
+
done: "Alla {filesTotal} har lagts till",
|
|
10594
|
+
doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
10595
|
+
files: "filer",
|
|
10596
|
+
file: "fil",
|
|
10597
|
+
},
|
|
10598
|
+
en: {
|
|
10599
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
10600
|
+
inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
10601
|
+
done: "All {filesTotal} added successfully",
|
|
10602
|
+
doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
10603
|
+
files: "tiedostoa",
|
|
10604
|
+
file: "tiedosto",
|
|
10605
|
+
},
|
|
10606
|
+
};
|
|
10607
|
+
/**
|
|
10608
|
+
* Strings used for the status aria-label
|
|
10609
|
+
*/
|
|
10610
|
+
this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
|
|
10611
|
+
/**
|
|
10612
|
+
* Property to change button label defaults on the component.
|
|
10613
|
+
* @default {
|
|
10614
|
+
fi: "Lisää liite",
|
|
10615
|
+
sv: "Lägg till en bilaga",
|
|
10616
|
+
en: "Add an attachment",
|
|
10617
|
+
}
|
|
9921
10618
|
*/
|
|
9922
10619
|
this.buttonLabelDefaults = {
|
|
9923
10620
|
fi: "Lisää liite",
|
|
@@ -9930,7 +10627,7 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
9930
10627
|
*/
|
|
9931
10628
|
this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
|
|
9932
10629
|
/**
|
|
9933
|
-
* accessible Label of button
|
|
10630
|
+
* accessible aria-Label of button
|
|
9934
10631
|
*/
|
|
9935
10632
|
this.accessibleButtonLabel = undefined;
|
|
9936
10633
|
/**
|
|
@@ -9953,17 +10650,22 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
9953
10650
|
* browser from displaying its own validation errors.
|
|
9954
10651
|
*/
|
|
9955
10652
|
this.required = false;
|
|
10653
|
+
/**
|
|
10654
|
+
* Visually hides the groups labels in the editable table list used to display the list of files
|
|
10655
|
+
*/
|
|
10656
|
+
this.hideGroups = false;
|
|
9956
10657
|
/**
|
|
9957
10658
|
* Map of string that contain list of uploaded files.
|
|
9958
10659
|
*/
|
|
9959
10660
|
this.files = new Map();
|
|
9960
10661
|
/**
|
|
9961
|
-
* Property to read if
|
|
10662
|
+
* Property to read if the internally used editable-table contains errors or not
|
|
9962
10663
|
*/
|
|
9963
10664
|
this.valid = !this.required;
|
|
9964
10665
|
/**
|
|
9965
10666
|
* Property to change labelDefaults defaults on the component.
|
|
9966
10667
|
* normally you would handle these strings on an application level and override @label when needed
|
|
10668
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
9967
10669
|
*/
|
|
9968
10670
|
this.labelDefaults = {
|
|
9969
10671
|
fi: "Lisää liite",
|
|
@@ -9977,7 +10679,11 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
9977
10679
|
this.label = getLocaleString(this.labelDefaults);
|
|
9978
10680
|
/**
|
|
9979
10681
|
* Property to change descriptionDefaults defaults on the component.
|
|
9980
|
-
*
|
|
10682
|
+
* @default {
|
|
10683
|
+
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.",
|
|
10684
|
+
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.",
|
|
10685
|
+
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.",
|
|
10686
|
+
}
|
|
9981
10687
|
*/
|
|
9982
10688
|
this.descriptionDefaults = {
|
|
9983
10689
|
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.",
|
|
@@ -9986,12 +10692,20 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
9986
10692
|
};
|
|
9987
10693
|
/**
|
|
9988
10694
|
* Description for the upload component.
|
|
9989
|
-
* @default
|
|
10695
|
+
* @default {
|
|
10696
|
+
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.",
|
|
10697
|
+
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.",
|
|
10698
|
+
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.",
|
|
10699
|
+
}
|
|
9990
10700
|
*/
|
|
9991
10701
|
this.description = getLocaleString(this.descriptionDefaults);
|
|
9992
10702
|
/**
|
|
9993
10703
|
* Defaults for the filelist's empty state.
|
|
9994
|
-
* @default {
|
|
10704
|
+
* @default {
|
|
10705
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
10706
|
+
sv: "Inga filer har lagts till ännu.",
|
|
10707
|
+
en: "No files added yet.",
|
|
10708
|
+
}
|
|
9995
10709
|
*/
|
|
9996
10710
|
this.fileListEmptyDefaults = {
|
|
9997
10711
|
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
@@ -10007,21 +10721,6 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10007
10721
|
* Display the input in error state along with an error message.
|
|
10008
10722
|
*/
|
|
10009
10723
|
this.error = "";
|
|
10010
|
-
/**
|
|
10011
|
-
* Visually hide the label, but still show it to screen readers.
|
|
10012
|
-
*/
|
|
10013
|
-
this.labelHidden = false;
|
|
10014
|
-
/**
|
|
10015
|
-
* if set, allows capture of media from user camera / microphone
|
|
10016
|
-
* The capture attribute value is a string that specifies which camera to use for capture
|
|
10017
|
-
* of image or video data, if the accept attribute indicates that the input should be of
|
|
10018
|
-
* one of those types. A value of user indicates that the user-facing camera and/or
|
|
10019
|
-
* microphone should be used. A value of environment specifies that the outward-facing
|
|
10020
|
-
* camera and/or microphone should be used. If this attribute is missing, the user agent
|
|
10021
|
-
* is free to decide on its own what to do. If the requested facing mode isn't available,
|
|
10022
|
-
* the user agent may fall back to its preferred default mode.
|
|
10023
|
-
*/
|
|
10024
|
-
this.capture = undefined;
|
|
10025
10724
|
/**
|
|
10026
10725
|
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
10027
10726
|
*/
|
|
@@ -10056,7 +10755,90 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10056
10755
|
/**
|
|
10057
10756
|
* Private functions
|
|
10058
10757
|
*/
|
|
10059
|
-
this.
|
|
10758
|
+
this.listenForActionEvents = () => {
|
|
10759
|
+
this.element.addEventListener("duetEditableItemAction", (e) => {
|
|
10760
|
+
const detail = e.detail;
|
|
10761
|
+
const { action, keyName, originalEvent } = detail;
|
|
10762
|
+
switch (action) {
|
|
10763
|
+
case "delete":
|
|
10764
|
+
this.onDelete(keyName, originalEvent);
|
|
10765
|
+
break;
|
|
10766
|
+
case "cancel":
|
|
10767
|
+
this.onCancel(keyName, originalEvent);
|
|
10768
|
+
break;
|
|
10769
|
+
// code block
|
|
10770
|
+
}
|
|
10771
|
+
});
|
|
10772
|
+
};
|
|
10773
|
+
this.verifyValidity = () => {
|
|
10774
|
+
const { invalid, valid } = this.getFilesAsArray();
|
|
10775
|
+
const oldValid = this.valid;
|
|
10776
|
+
this.valid = invalid.length === 0 && valid.length !== 0;
|
|
10777
|
+
if (this.valid !== oldValid) {
|
|
10778
|
+
this.duetState.emit({
|
|
10779
|
+
originalEvent: undefined,
|
|
10780
|
+
data: { valid: this.valid, from: "componentWillRender" },
|
|
10781
|
+
component: "duet-upload",
|
|
10782
|
+
});
|
|
10783
|
+
}
|
|
10784
|
+
};
|
|
10785
|
+
this.getGroupFromItemData = (item) => {
|
|
10786
|
+
if (item.valid && item.progress === 100) {
|
|
10787
|
+
// if the item has a group, move the file to that group instead
|
|
10788
|
+
// of into the standard success group
|
|
10789
|
+
if (item.group) {
|
|
10790
|
+
return item.group;
|
|
10791
|
+
}
|
|
10792
|
+
return this.DefaultGroups.success;
|
|
10793
|
+
}
|
|
10794
|
+
else if (item.progress > 0 && item.progress !== 100) {
|
|
10795
|
+
return this.DefaultGroups.inprogress;
|
|
10796
|
+
}
|
|
10797
|
+
else if (!item.valid) {
|
|
10798
|
+
return this.DefaultGroups.failure;
|
|
10799
|
+
}
|
|
10800
|
+
else if (item.group) {
|
|
10801
|
+
return item.group;
|
|
10802
|
+
}
|
|
10803
|
+
else {
|
|
10804
|
+
return "none";
|
|
10805
|
+
}
|
|
10806
|
+
};
|
|
10807
|
+
this.getItemHTMLFromItemData = (data, group) => {
|
|
10808
|
+
if (group === this.DefaultGroups.success) {
|
|
10809
|
+
return h$1(SuccessItem, { data: data, showLinks: this.showLinks });
|
|
10810
|
+
}
|
|
10811
|
+
else if (group === this.DefaultGroups.inprogress) {
|
|
10812
|
+
return h$1(ProgressItem, { progress: data.progress, name: data.item.name });
|
|
10813
|
+
}
|
|
10814
|
+
else if (group === this.DefaultGroups.failure) {
|
|
10815
|
+
return h$1(ErrorItem, { data: data });
|
|
10816
|
+
}
|
|
10817
|
+
else if (data.group) {
|
|
10818
|
+
return data.html;
|
|
10819
|
+
}
|
|
10820
|
+
else {
|
|
10821
|
+
return "none";
|
|
10822
|
+
}
|
|
10823
|
+
};
|
|
10824
|
+
this.convertToDuetEditableTableItems = () => {
|
|
10825
|
+
// we're always recreating the map - in order to force an update down stream.
|
|
10826
|
+
const itemData = new Map();
|
|
10827
|
+
//walk the files Map and convert to DuetEditableTableItemData
|
|
10828
|
+
this.files.forEach((data, key, _originalMap) => {
|
|
10829
|
+
const group = this.getGroupFromItemData(data);
|
|
10830
|
+
const item = this.getItemHTMLFromItemData(data, group);
|
|
10831
|
+
itemData.set(key, {
|
|
10832
|
+
uid: data.uid,
|
|
10833
|
+
item,
|
|
10834
|
+
group,
|
|
10835
|
+
});
|
|
10836
|
+
});
|
|
10837
|
+
return itemData;
|
|
10838
|
+
};
|
|
10839
|
+
this.kick = debounce(() => {
|
|
10840
|
+
this.tick = Date.now();
|
|
10841
|
+
}, 30); // will trigger re-render
|
|
10060
10842
|
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
10061
10843
|
this.updateValueInMap = (item, key, value, kick = true) => {
|
|
10062
10844
|
const fileItem = this.files.get(item);
|
|
@@ -10067,10 +10849,13 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10067
10849
|
}
|
|
10068
10850
|
};
|
|
10069
10851
|
this.updateProgress = (ev, name) => {
|
|
10070
|
-
|
|
10071
|
-
const percentComplete = (ev.loaded / ev.total) * 100;
|
|
10852
|
+
const updateProgressHelper = percentComplete => {
|
|
10072
10853
|
this.updateValueInMap(name, "progress", percentComplete);
|
|
10073
10854
|
this.onProgress(name, percentComplete, ev);
|
|
10855
|
+
};
|
|
10856
|
+
if (ev.lengthComputable) {
|
|
10857
|
+
const percentComplete = (ev.loaded / ev.total) * 100;
|
|
10858
|
+
updateProgressHelper(percentComplete);
|
|
10074
10859
|
}
|
|
10075
10860
|
else {
|
|
10076
10861
|
console.log("cant read progress");
|
|
@@ -10107,17 +10892,20 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10107
10892
|
* We reset the form fields to always be able to re-upload files
|
|
10108
10893
|
* and because we handle all uploads and states internally in the component (not relying on native form elements)
|
|
10109
10894
|
*/
|
|
10895
|
+
/* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
|
|
10896
|
+
* 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
|
|
10897
|
+
* TODO: but for now we'll just reset the form fields
|
|
10898
|
+
*/
|
|
10110
10899
|
this.nativeInput.value = "";
|
|
10111
10900
|
};
|
|
10112
|
-
this.
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
}
|
|
10901
|
+
this.startUpload = async (ev, metaData = undefined) => {
|
|
10902
|
+
await this.setFocus();
|
|
10903
|
+
this.metaData = metaData;
|
|
10904
|
+
this.nativeInput.click();
|
|
10905
|
+
this.onUpload(ev, metaData);
|
|
10906
|
+
ev.stopPropagation();
|
|
10907
|
+
ev.preventDefault();
|
|
10908
|
+
return;
|
|
10121
10909
|
};
|
|
10122
10910
|
/**
|
|
10123
10911
|
* Eventlisteners for the XHR requests
|
|
@@ -10128,6 +10916,7 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10128
10916
|
};
|
|
10129
10917
|
this.transferDone = (xhr, name, status) => {
|
|
10130
10918
|
this.updateValueInMap(name, "status", status, false);
|
|
10919
|
+
this.updateValueInMap(name, "uploaded", true, false);
|
|
10131
10920
|
try {
|
|
10132
10921
|
const response = JSON.parse(xhr.response);
|
|
10133
10922
|
this.updateValueInMap(name, "url", response.url);
|
|
@@ -10141,12 +10930,13 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10141
10930
|
this.transferDoneWithFailure = (xhr, name, status) => {
|
|
10142
10931
|
try {
|
|
10143
10932
|
const { error } = JSON.parse(xhr.response);
|
|
10144
|
-
this.updateValueInMap(name, "error", { message: error.message, type: error.type });
|
|
10933
|
+
this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
|
|
10145
10934
|
}
|
|
10146
10935
|
catch (e) {
|
|
10147
10936
|
console.error("Server did not respond with expected response error:{message: string, type: int}");
|
|
10148
|
-
this.updateValueInMap(name, "error", { type: status });
|
|
10937
|
+
this.updateValueInMap(name, "error", { type: status }, false);
|
|
10149
10938
|
}
|
|
10939
|
+
this.updateValueInMap(name, "valid", false, true);
|
|
10150
10940
|
};
|
|
10151
10941
|
this.transferFailed = name => {
|
|
10152
10942
|
this.updateValueInMap(name, "error", getError("duet-upload-001"));
|
|
@@ -10177,15 +10967,15 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10177
10967
|
this.files.delete(key);
|
|
10178
10968
|
this.validateTotals();
|
|
10179
10969
|
this.kick();
|
|
10180
|
-
if (!this.external) {
|
|
10181
|
-
this.makeXHRDeleteRequest(deletedItem);
|
|
10182
|
-
}
|
|
10183
|
-
this.resetFormFields();
|
|
10184
10970
|
this.duetDelete.emit({
|
|
10185
10971
|
originalEvent: ev,
|
|
10186
10972
|
data: { deletion: deletedItem },
|
|
10187
10973
|
component: "duet-upload",
|
|
10188
10974
|
});
|
|
10975
|
+
if (!this.external) {
|
|
10976
|
+
this.makeXHRDeleteRequest(deletedItem);
|
|
10977
|
+
}
|
|
10978
|
+
this.resetFormFields();
|
|
10189
10979
|
};
|
|
10190
10980
|
this.onCancel = (key, ev) => {
|
|
10191
10981
|
const cancelledItem = this.files.get(key);
|
|
@@ -10204,9 +10994,10 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10204
10994
|
component: "duet-upload",
|
|
10205
10995
|
});
|
|
10206
10996
|
};
|
|
10207
|
-
this.onUpload = (ev) => {
|
|
10997
|
+
this.onUpload = (ev, metaData) => {
|
|
10208
10998
|
this.duetUpload.emit({
|
|
10209
10999
|
originalEvent: ev,
|
|
11000
|
+
metaData,
|
|
10210
11001
|
component: "duet-upload",
|
|
10211
11002
|
});
|
|
10212
11003
|
};
|
|
@@ -10238,13 +11029,6 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10238
11029
|
data: { files: this.files },
|
|
10239
11030
|
});
|
|
10240
11031
|
};
|
|
10241
|
-
this.startUpload = async (ev) => {
|
|
10242
|
-
await this.setFocus();
|
|
10243
|
-
this.nativeInput.click();
|
|
10244
|
-
this.onUpload(ev);
|
|
10245
|
-
ev.stopPropagation();
|
|
10246
|
-
ev.preventDefault();
|
|
10247
|
-
};
|
|
10248
11032
|
}
|
|
10249
11033
|
watchValidHandler(newValue, oldValue) {
|
|
10250
11034
|
if (newValue !== oldValue) {
|
|
@@ -10255,19 +11039,18 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10255
11039
|
* Component lifecycle events.
|
|
10256
11040
|
*/
|
|
10257
11041
|
componentWillLoad() {
|
|
11042
|
+
if (typeof this.statusMessageLabel === "string") {
|
|
11043
|
+
this.internalStatusMessageLabel = sanitizeString(this.groups);
|
|
11044
|
+
}
|
|
11045
|
+
else {
|
|
11046
|
+
this.internalStatusMessageLabel = this.statusMessageLabel;
|
|
11047
|
+
}
|
|
10258
11048
|
inheritGlobalTheme(this);
|
|
11049
|
+
this.listenForActionEvents();
|
|
10259
11050
|
}
|
|
10260
11051
|
componentWillRender() {
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
this.valid = invalid.length === 0 && valid.length !== 0;
|
|
10264
|
-
if (this.valid !== oldValid) {
|
|
10265
|
-
this.duetState.emit({
|
|
10266
|
-
originalEvent: undefined,
|
|
10267
|
-
data: { valid: this.valid, from: "componentWillRender" },
|
|
10268
|
-
component: "duet-upload",
|
|
10269
|
-
});
|
|
10270
|
-
}
|
|
11052
|
+
// listen to the events from the component
|
|
11053
|
+
this.verifyValidity();
|
|
10271
11054
|
}
|
|
10272
11055
|
/**
|
|
10273
11056
|
* XHR request utilities
|
|
@@ -10287,22 +11070,34 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10287
11070
|
xhr.upload.addEventListener("abort", () => {
|
|
10288
11071
|
this.transferCanceled(name);
|
|
10289
11072
|
});
|
|
10290
|
-
return makeXhrRequest({
|
|
11073
|
+
return makeXhrRequest({
|
|
11074
|
+
payload: { data, name },
|
|
11075
|
+
options: { type: "POST", uri: this.uri, xhr, argument: null, headers: null },
|
|
11076
|
+
onFailure: this.transferDoneWithFailure,
|
|
11077
|
+
onSuccess: this.transferDone,
|
|
11078
|
+
onProgress: this.trackProgress,
|
|
11079
|
+
});
|
|
10291
11080
|
}
|
|
10292
11081
|
makeXHRDeleteRequest(data) {
|
|
10293
11082
|
const { uid, item } = data;
|
|
10294
11083
|
const xhr = new XMLHttpRequest();
|
|
10295
11084
|
// don't present server issues to user on deletes, just remove them from the visible list
|
|
10296
|
-
return makeXhrRequest({
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
11085
|
+
return makeXhrRequest({
|
|
11086
|
+
payload: { data: null, name },
|
|
11087
|
+
options: {
|
|
11088
|
+
type: "DELETE",
|
|
11089
|
+
xhr,
|
|
11090
|
+
uri: this.uri,
|
|
11091
|
+
arguments: `?key=${uid}&name=${item.name}`,
|
|
11092
|
+
headers: {
|
|
11093
|
+
"x-fileuid": uid,
|
|
11094
|
+
"x-filename": item.name,
|
|
11095
|
+
},
|
|
10304
11096
|
},
|
|
10305
|
-
|
|
11097
|
+
onFailure: this.transferDoneWithFailure,
|
|
11098
|
+
onSuccess: this.transferDone,
|
|
11099
|
+
onProgress: this.trackProgress,
|
|
11100
|
+
});
|
|
10306
11101
|
}
|
|
10307
11102
|
/**
|
|
10308
11103
|
* Component event handling.
|
|
@@ -10312,7 +11107,7 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10312
11107
|
const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
|
|
10313
11108
|
// FileList is a nice array like structure but
|
|
10314
11109
|
// to ensure uniqueness of files we use a mapping structure and
|
|
10315
|
-
// key to the name (makes it easier to delete)
|
|
11110
|
+
// key to the name (makes it easier to delete as well)
|
|
10316
11111
|
if (selectedFiles) {
|
|
10317
11112
|
for (const item of selectedFiles) {
|
|
10318
11113
|
const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
|
|
@@ -10325,6 +11120,8 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10325
11120
|
uid,
|
|
10326
11121
|
item: item,
|
|
10327
11122
|
size: item.size,
|
|
11123
|
+
meta: this.metaData,
|
|
11124
|
+
uploaded: false,
|
|
10328
11125
|
valid,
|
|
10329
11126
|
error: {
|
|
10330
11127
|
type: valid ? undefined : errorType,
|
|
@@ -10353,8 +11150,14 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10353
11150
|
data.append("file", item);
|
|
10354
11151
|
data.append("uid", uid);
|
|
10355
11152
|
data.append("name", item.name);
|
|
10356
|
-
data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size }));
|
|
10357
|
-
|
|
11153
|
+
data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size, meta: fileListItem.meta }));
|
|
11154
|
+
try {
|
|
11155
|
+
fileListItem.xhr = await this.makeXHRPostRequest(data);
|
|
11156
|
+
}
|
|
11157
|
+
catch (e) {
|
|
11158
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
11159
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
11160
|
+
}
|
|
10358
11161
|
}
|
|
10359
11162
|
// kick the stat to force update
|
|
10360
11163
|
this.kick();
|
|
@@ -10362,6 +11165,8 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10362
11165
|
}
|
|
10363
11166
|
// reset the form, so that a user may upload a file again (with the same name)
|
|
10364
11167
|
this.resetFormFields();
|
|
11168
|
+
// reset the internal metaData state
|
|
11169
|
+
this.metaData = undefined;
|
|
10365
11170
|
this.duetChange.emit({
|
|
10366
11171
|
originalEvent: ev,
|
|
10367
11172
|
data: { files: this.files },
|
|
@@ -10378,6 +11183,15 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10378
11183
|
}
|
|
10379
11184
|
return;
|
|
10380
11185
|
}
|
|
11186
|
+
/**
|
|
11187
|
+
* Method for invoking the upload sequence
|
|
11188
|
+
*/
|
|
11189
|
+
async upload(metaData = undefined) {
|
|
11190
|
+
await this.setFocus();
|
|
11191
|
+
this.metaData = metaData;
|
|
11192
|
+
this.nativeInput.click();
|
|
11193
|
+
return;
|
|
11194
|
+
}
|
|
10381
11195
|
/**
|
|
10382
11196
|
* Get list of files, divided in errors and valid sections
|
|
10383
11197
|
*/
|
|
@@ -10387,6 +11201,12 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10387
11201
|
}
|
|
10388
11202
|
return this.getFilesAsArray();
|
|
10389
11203
|
}
|
|
11204
|
+
/**
|
|
11205
|
+
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
11206
|
+
*/
|
|
11207
|
+
async updateValue(item, key, value) {
|
|
11208
|
+
this.updateValueInMap(item, key, value);
|
|
11209
|
+
}
|
|
10390
11210
|
/**
|
|
10391
11211
|
* render() function
|
|
10392
11212
|
* Always the last one in the class.
|
|
@@ -10396,13 +11216,13 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10396
11216
|
let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
|
|
10397
11217
|
caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
|
|
10398
11218
|
caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
|
|
10399
|
-
return (h$1(Host, { class: { "duet-m-0": this.margin === "none" } }, h$1("duet-fieldset", { label: this.label, caption: caption }, h$1("slot", { name: "header" }), h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
11219
|
+
return (h$1(Host, { class: { "duet-m-0": this.margin === "none" } }, h$1("duet-fieldset", { label: this.label, caption: caption }, h$1("slot", { name: "header" }), !this.files.size && (h$1("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
10400
11220
|
"duet-upload-filelist-empty": !this.files.size,
|
|
10401
11221
|
"duet-upload-filelist": true,
|
|
10402
11222
|
"duet-upload-filelist-filled": this.files.size,
|
|
10403
|
-
}, id: this.labelId, for: identifier },
|
|
11223
|
+
}, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && h$1("slot", { name: "fileheader" }), !!this.files.size && (h$1("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.internalStatusMessageLabel })), !!this.files.size && (h$1("duet-editable-table", { "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, items: this.convertToDuetEditableTableItems() })), !!this.files.size && h$1("slot", { name: "filefooter" }), h$1("duet-spacer", { size: "large" }), !this.hideButton && (h$1("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle" }, this.buttonLabel)), h$1("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (h$1("duet-alert", null, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), h$1("duet-spacer", { size: "medium" }), h$1("duet-visually-hidden", null, h$1("input", { ref: input => {
|
|
10404
11224
|
this.nativeInput = input;
|
|
10405
|
-
}, accept: this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
11225
|
+
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
10406
11226
|
"duet-upload": true,
|
|
10407
11227
|
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
10408
11228
|
}
|
|
@@ -10413,13 +11233,105 @@ let DuetUpload$1 = class extends HTMLElement {
|
|
|
10413
11233
|
static get style() { return duetUploadCss; }
|
|
10414
11234
|
};
|
|
10415
11235
|
|
|
11236
|
+
let DuetUploadAriaStatus$1 = class extends H {
|
|
11237
|
+
constructor() {
|
|
11238
|
+
super();
|
|
11239
|
+
this.__registerHost();
|
|
11240
|
+
this.__attachShadow();
|
|
11241
|
+
/**
|
|
11242
|
+
* State() variables
|
|
11243
|
+
*/
|
|
11244
|
+
this.statusMessage = null;
|
|
11245
|
+
/**
|
|
11246
|
+
* Status labels used in the component
|
|
11247
|
+
*/
|
|
11248
|
+
this.statusMessageLabel = null;
|
|
11249
|
+
/**
|
|
11250
|
+
* Adds accessible label that is read aloud
|
|
11251
|
+
*/
|
|
11252
|
+
this.accessibleAriaLive = "polite";
|
|
11253
|
+
/**
|
|
11254
|
+
* valid file amount
|
|
11255
|
+
*/
|
|
11256
|
+
this.valid = undefined;
|
|
11257
|
+
/**
|
|
11258
|
+
* total files
|
|
11259
|
+
*/
|
|
11260
|
+
this.total = undefined;
|
|
11261
|
+
/**
|
|
11262
|
+
* invalid file amount
|
|
11263
|
+
*/
|
|
11264
|
+
this.invalid = undefined;
|
|
11265
|
+
/**
|
|
11266
|
+
* valid file amount
|
|
11267
|
+
*/
|
|
11268
|
+
this.inprogress = undefined;
|
|
11269
|
+
/**
|
|
11270
|
+
* Private functions
|
|
11271
|
+
*/
|
|
11272
|
+
this.replacePlaceHolders = (statusString) => {
|
|
11273
|
+
const addFiles = (amount) => {
|
|
11274
|
+
return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
|
|
11275
|
+
};
|
|
11276
|
+
return statusString
|
|
11277
|
+
.replace("{filesUploaded}", addFiles(this.valid))
|
|
11278
|
+
.replace("{filesInProgress}", addFiles(this.inprogress))
|
|
11279
|
+
.replace("{filesTotal}", addFiles(this.total))
|
|
11280
|
+
.replace("{filesWithErrors}", addFiles(this.invalid));
|
|
11281
|
+
};
|
|
11282
|
+
this.getStatusMessage = () => {
|
|
11283
|
+
const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
|
|
11284
|
+
const hasErrors = this.invalid > 0;
|
|
11285
|
+
const isInProgress = this.inprogress > 0;
|
|
11286
|
+
const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
|
|
11287
|
+
const isDone = this.valid === this.total && !isInProgress && !hasErrors;
|
|
11288
|
+
const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
|
|
11289
|
+
if (isDone) {
|
|
11290
|
+
this.statusMessage = this.replacePlaceHolders(done);
|
|
11291
|
+
return;
|
|
11292
|
+
}
|
|
11293
|
+
else if (isInProgressWithErrors) {
|
|
11294
|
+
this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
|
|
11295
|
+
return;
|
|
11296
|
+
}
|
|
11297
|
+
else if (isInProgress) {
|
|
11298
|
+
this.statusMessage = this.replacePlaceHolders(inProgress);
|
|
11299
|
+
return;
|
|
11300
|
+
}
|
|
11301
|
+
else if (isDoneWithErrors) {
|
|
11302
|
+
this.statusMessage = this.replacePlaceHolders(doneWithErrors);
|
|
11303
|
+
return;
|
|
11304
|
+
}
|
|
11305
|
+
return;
|
|
11306
|
+
};
|
|
11307
|
+
}
|
|
11308
|
+
watchHandler(newValue, oldValue) {
|
|
11309
|
+
if (newValue !== oldValue) {
|
|
11310
|
+
this.getStatusMessage();
|
|
11311
|
+
}
|
|
11312
|
+
}
|
|
11313
|
+
/**
|
|
11314
|
+
* render() function
|
|
11315
|
+
* Always the last one in the class.
|
|
11316
|
+
*/
|
|
11317
|
+
render() {
|
|
11318
|
+
return (h$1(Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, h$1("duet-visually-hidden", null, this.statusMessage)));
|
|
11319
|
+
}
|
|
11320
|
+
static get watchers() { return {
|
|
11321
|
+
"valid": ["watchHandler"],
|
|
11322
|
+
"invalid": ["watchHandler"],
|
|
11323
|
+
"inprogress": ["watchHandler"],
|
|
11324
|
+
"total": ["watchHandler"]
|
|
11325
|
+
}; }
|
|
11326
|
+
};
|
|
11327
|
+
|
|
10416
11328
|
const duetVisuallyHiddenCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}";
|
|
10417
11329
|
|
|
10418
|
-
let DuetVisuallyHidden$1 = class extends
|
|
11330
|
+
let DuetVisuallyHidden$1 = class extends H {
|
|
10419
11331
|
constructor() {
|
|
10420
11332
|
super();
|
|
10421
11333
|
this.__registerHost();
|
|
10422
|
-
|
|
11334
|
+
this.__attachShadow();
|
|
10423
11335
|
}
|
|
10424
11336
|
/**
|
|
10425
11337
|
* render() function
|
|
@@ -10432,39 +11344,43 @@ let DuetVisuallyHidden$1 = class extends HTMLElement {
|
|
|
10432
11344
|
};
|
|
10433
11345
|
|
|
10434
11346
|
globalScripts();
|
|
10435
|
-
const DuetAlert = /*@__PURE__*/proxyCustomElement(DuetAlert$1, [1,"duet-alert",{"theme":[1025],"accessibleLabelDefaults":[
|
|
11347
|
+
const DuetAlert = /*@__PURE__*/proxyCustomElement(DuetAlert$1, [1,"duet-alert",{"theme":[1025],"accessibleLabelDefaults":[1,"accessible-label-default"],"accessibleLabel":[1,"accessible-label"],"announcements":[4],"icon":[1],"autoDismiss":[2,"auto-dismiss"],"margin":[1],"padding":[1],"variation":[1],"dismissible":[4],"isDismissed":[32],"timeoutID":[32]}]);
|
|
10436
11348
|
const DuetBadge = /*@__PURE__*/proxyCustomElement(DuetBadge$1, [1,"duet-badge",{"theme":[1025],"variation":[1],"margin":[1]}]);
|
|
10437
|
-
const DuetButton = /*@__PURE__*/proxyCustomElement(DuetButton$1, [1,"duet-button",{"accessibleLabel":[1,"accessible-label"],"accessibleControls":[1,"accessible-controls"],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleExpanded":[4,"accessible-expanded"],"accessiblePressed":[4,"accessible-pressed"],"loading":[4],"variation":[1],"negative":[4],"theme":[1025],"margin":[1],"padding":[1],"wrapping":[1],"expand":[4],"fixed":[4],"disabled":[516],"name":[1],"value":[1],"identifier":[1],"submit":[516],"external":[4],"language":[1],"accessibleLabelExternalDefaults":[
|
|
11349
|
+
const DuetButton = /*@__PURE__*/proxyCustomElement(DuetButton$1, [1,"duet-button",{"accessibleLabel":[1,"accessible-label"],"accessibleControls":[1,"accessible-controls"],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleExpanded":[4,"accessible-expanded"],"accessiblePressed":[4,"accessible-pressed"],"loading":[4],"variation":[1],"negative":[4],"theme":[1025],"margin":[1],"padding":[1],"wrapping":[1],"expand":[4],"fixed":[4],"disabled":[516],"name":[1],"value":[1],"identifier":[1],"submit":[516],"external":[4],"language":[1],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"icon":[1],"color":[1],"iconRight":[4,"icon-right"],"iconSize":[1,"icon-size"],"size":[1],"iconOnly":[4,"icon-only"],"url":[513]}]);
|
|
10438
11350
|
const DuetCaption = /*@__PURE__*/proxyCustomElement(DuetCaption$1, [1,"duet-caption",{"theme":[1025],"margin":[1],"selected":[4],"size":[1]}]);
|
|
10439
11351
|
const DuetCard = /*@__PURE__*/proxyCustomElement(DuetCard$1, [1,"duet-card",{"accessibleLabel":[1,"accessible-label"],"heading":[1],"secondaryHeading":[1,"secondary-heading"],"variation":[1],"collapsible":[4],"open":[1540],"headingLevel":[1,"heading-level"],"icon":[1],"image":[1],"background":[1],"padding":[1],"margin":[1],"theme":[1025],"url":[1]}]);
|
|
10440
11352
|
const DuetCheckbox = /*@__PURE__*/proxyCustomElement(DuetCheckbox$1, [2,"duet-checkbox",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"margin":[1],"accessibleControls":[1,"accessible-controls"],"accessibleIndex":[1,"accessible-index"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"required":[4],"theme":[1025],"disabled":[516],"identifier":[1],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"role":[1],"checked":[1540],"value":[1537]}]);
|
|
10441
|
-
const DuetChoice = /*@__PURE__*/proxyCustomElement(DuetChoice$1, [6,"duet-choice",{"theme":[1025],"label":[1],"accessibleLabelInfoButtonDefaults":[
|
|
11353
|
+
const DuetChoice = /*@__PURE__*/proxyCustomElement(DuetChoice$1, [6,"duet-choice",{"theme":[1025],"label":[1],"accessibleLabelInfoButtonDefaults":[1,"accessible-label-info-default"],"accessibleLabelInfoButton":[1,"accessible-label-info-button"],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"caption":[1],"value":[1537],"type":[513],"name":[1],"checked":[1540],"collapsible":[4],"margin":[1],"icon":[1],"expand":[4],"padding":[1],"identifier":[1],"groupDirection":[1,"group-direction"],"groupDisabled":[4,"group-disabled"],"groupResponsive":[4,"group-responsive"],"disabled":[516],"required":[4],"infoLabelDefaults":[1,"accessible-label-info-default"],"infoLabel":[1,"info-label"],"isHovering":[32],"isInfoOpen":[32],"isBlurred":[32]},[[2,"blur","handleHostBlur"],[2,"keydown","handleHostKeyDown"],[2,"keyup","handleHostKeyUp"]]]);
|
|
10442
11354
|
const DuetChoiceGroup = /*@__PURE__*/proxyCustomElement(DuetChoiceGroup$1, [6,"duet-choice-group",{"direction":[1],"margin":[1],"theme":[1025],"error":[1],"name":[1],"label":[1],"labelHidden":[4,"label-hidden"],"caption":[1],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"],"responsive":[4],"value":[1537],"disabled":[4]}]);
|
|
10443
11355
|
const DuetCollapsible = /*@__PURE__*/proxyCustomElement(DuetCollapsible$1, [1,"duet-collapsible",{"theme":[1025],"heading":[1],"headingWeight":[1,"heading-weight"],"headingSize":[1,"heading-size"],"headingLevel":[1,"heading-level"],"margin":[1],"open":[1540]}]);
|
|
10444
11356
|
const DuetCookieConsent = /*@__PURE__*/proxyCustomElement(DuetCookieConsent$1, [1,"duet-cookie-consent",{"accessibleLabel":[1,"accessible-label"],"theme":[1025]}]);
|
|
10445
|
-
const DuetDatePicker = /*@__PURE__*/proxyCustomElement(DuetDatePicker$1, [2,"duet-date-picker",{"theme":[1025],"expand":[4],"name":[1],"identifier":[1],"label":[1],"caption":[1],"margin":[1],"placeholder":[1],"echoPlaceholder":[1540,"echo-placeholder"],"disabled":[516],"
|
|
11357
|
+
const DuetDatePicker = /*@__PURE__*/proxyCustomElement(DuetDatePicker$1, [2,"duet-date-picker",{"theme":[1025],"expand":[4],"name":[1],"identifier":[1],"label":[1],"caption":[1],"margin":[1],"language":[1],"placeholderDefaults":[1,"placeholder-default"],"placeholder":[1],"echoPlaceholder":[1540,"echo-placeholder"],"disabled":[516],"error":[1],"labelHidden":[4,"label-hidden"],"role":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"required":[4],"direction":[1],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"],"value":[1537],"min":[1],"max":[1],"validity":[1040],"open":[32],"focusedDay":[32],"inputValue":[32]},[[4,"click","handleDocumentClick"]]]);
|
|
10446
11358
|
const DuetDivider = /*@__PURE__*/proxyCustomElement(DuetDivider$1, [1,"duet-divider",{"theme":[1025],"margin":[1]}]);
|
|
11359
|
+
const DuetEditableTable = /*@__PURE__*/proxyCustomElement(DuetEditableTable$1, [1,"duet-editable-table",{"items":[1040],"groupsLabelDefaults":[16],"actionLabelDefaults":[16],"groups":[1],"actions":[1],"hideGroups":[4,"hide-table-labels"],"accessibleRole":[1,"accessible-role"],"theme":[1025],"tick":[32]}]);
|
|
11360
|
+
const DuetEditableTableButton = /*@__PURE__*/proxyCustomElement(DuetEditableTableButton$1, [2,"duet-editable-table-button",{"theme":[1025],"actions":[16],"uid":[1],"group":[1],"keyName":[1,"key-name"],"isHovering":[32]}]);
|
|
11361
|
+
const DuetEditableTableItem = /*@__PURE__*/proxyCustomElement(DuetEditableTableItem$1, [1,"duet-editable-table-item",{"theme":[1025],"actions":[16],"groupId":[1,"group-id"],"keyName":[1,"key-name"],"data":[1040],"isHovering":[32]}]);
|
|
10447
11362
|
const DuetEmptyState = /*@__PURE__*/proxyCustomElement(DuetEmptyState$1, [1,"duet-empty-state",{"theme":[1025],"icon":[1],"size":[1]}]);
|
|
10448
11363
|
const DuetFieldset = /*@__PURE__*/proxyCustomElement(DuetFieldset$1, [1,"duet-fieldset",{"theme":[1025],"margin":[1],"caption":[1],"label":[1],"error":[1],"labelHidden":[4,"label-hidden"],"hasTooltip":[32]}]);
|
|
10449
|
-
const DuetFooter = /*@__PURE__*/proxyCustomElement(DuetFooter$1, [1,"duet-footer",{"theme":[1025],"variation":[1],"margin":[1],"logoHref":[1,"logo-href"],"language":[1025],"items":[8],"accessibleLabelExternalDefaults":[
|
|
10450
|
-
const DuetGrid = /*@__PURE__*/proxyCustomElement(DuetGrid$1, [2,"duet-grid",{"responsive":[4],"breakpoint":[1],"direction":[1],"alignment":[1],"distribution":[1],"mobile":[1]}]);
|
|
11364
|
+
const DuetFooter = /*@__PURE__*/proxyCustomElement(DuetFooter$1, [1,"duet-footer",{"theme":[1025],"variation":[1],"margin":[1],"logoHref":[1,"logo-href"],"language":[1025],"items":[8],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"menu":[8],"processedItems":[32],"processedMenu":[32]}]);
|
|
11365
|
+
const DuetGrid = /*@__PURE__*/proxyCustomElement(DuetGrid$1, [2,"duet-grid",{"responsive":[4],"breakpoint":[1],"direction":[1],"alignment":[1],"distribution":[1],"mobile":[1],"distributeFormElement":[32]}]);
|
|
10451
11366
|
const DuetGridItem = /*@__PURE__*/proxyCustomElement(DuetGridItem$1, [2,"duet-grid-item",{"fill":[4],"maxWidth":[1,"max-width"],"minWidth":[1,"min-width"],"theme":[1025],"margin":[1],"responsive":[4],"breakpoint":[1]}]);
|
|
10452
|
-
const DuetHeader = /*@__PURE__*/proxyCustomElement(DuetHeader$1, [1,"duet-header",{"theme":[1025],"language":[1025],"
|
|
10453
|
-
const DuetHeading = /*@__PURE__*/proxyCustomElement(DuetHeading$1, [1,"duet-heading",{"level":[513],"margin":[1],"visualLevel":[1,"visual-level"],"border":[
|
|
10454
|
-
const DuetHero = /*@__PURE__*/proxyCustomElement(DuetHero$1, [1,"duet-hero",{"theme":[1025],"heading":[1],"preHeading":[1,"pre-heading"],"level":[1],"description":[1],"icon":[1],"iconSize":[1,"icon-size"],"iconRight":[4,"icon-right"],"categoryIcon":[1,"category-icon"],"categoryIconColor":[1,"category-icon-color"],"buttonLabel":[1,"button-label"],"language":[1025],"accessibleLabelExternalDefaults":[
|
|
11367
|
+
const DuetHeader = /*@__PURE__*/proxyCustomElement(DuetHeader$1, [1,"duet-header",{"theme":[1025],"language":[1025],"accessibleI18nLabelsDefaults":[1,"accessible-labels-default"],"accessibleI18nLabels":[16],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"accessibleLabelDefaults":[1,"accessible-label-default"],"accessibleLabel":[1,"accessible-label"],"user":[8],"logoHref":[1,"logo-href"],"currentHref":[1025,"current-href"],"skipToId":[1,"skip-to-id"],"items":[8],"region":[1],"session":[8],"back":[8],"contact":[1],"contactItems":[8,"contact-items"],"languageItems":[8,"language-items"],"isContactOpen":[32],"isLanguageOpen":[32],"isSlideOutOpen":[32],"processedItems":[32],"processedLanguageItems":[32],"processedContactItems":[32],"processedSession":[32],"processedUser":[32],"processedBack":[32]},[[8,"keyup","handleKeyUp"],[8,"keydown","handleKeyDown"],[4,"focus","handleDocumentClick"],[4,"click","handleDocumentClick"]]]);
|
|
11368
|
+
const DuetHeading = /*@__PURE__*/proxyCustomElement(DuetHeading$1, [1,"duet-heading",{"level":[513],"margin":[1],"visualLevel":[1,"visual-level"],"border":[8],"weight":[1],"color":[1],"theme":[1025],"hyphenate":[4]}]);
|
|
11369
|
+
const DuetHero = /*@__PURE__*/proxyCustomElement(DuetHero$1, [1,"duet-hero",{"theme":[1025],"heading":[1],"preHeading":[1,"pre-heading"],"level":[1],"description":[1],"icon":[1],"iconSize":[1,"icon-size"],"iconRight":[4,"icon-right"],"categoryIcon":[1,"category-icon"],"categoryIconColor":[1,"category-icon-color"],"buttonLabel":[1,"button-label"],"language":[1025],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"buttonUrl":[1,"button-url"],"buttonId":[1,"button-id"],"buttonData":[16],"textCenter":[4,"text-center"],"leftAlign":[4,"left-align"],"image":[1],"variation":[1],"back":[8],"listItems":[8,"list-items"],"actions":[8],"processedListItems":[32],"processedActions":[32],"processedBack":[32]}]);
|
|
10455
11370
|
const DuetIcon = /*@__PURE__*/proxyCustomElement(DuetIcon$1, [1,"duet-icon",{"theme":[1025],"icon":[1],"src":[1],"name":[1],"margin":[1],"responsive":[4],"color":[513],"background":[1],"size":[1],"outline":[1],"svgContent":[32]}]);
|
|
10456
11371
|
const DuetInput = /*@__PURE__*/proxyCustomElement(DuetInput$1, [6,"duet-input",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleAutocomplete":[1,"accessible-autocomplete"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"debounce":[2],"caption":[1],"echoPlaceholder":[4,"echo-placeholder"],"theme":[1025],"expand":[4],"disabled":[516],"identifier":[1],"margin":[1],"required":[4],"type":[1],"label":[1],"error":[1],"labelHidden":[4,"label-hidden"],"numericKeyboard":[4,"numeric-keyboard"],"name":[1],"pattern":[1],"maxlength":[2],"minlength":[2],"placeholder":[1],"component":[1],"role":[1],"icon":[1],"autoComplete":[1,"auto-complete"],"disallowPattern":[1,"disallow-pattern"],"value":[1025],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"]}]);
|
|
10457
11372
|
const DuetLabel = /*@__PURE__*/proxyCustomElement(DuetLabel$1, [6,"duet-label",{"theme":[1025],"for":[1],"margin":[1],"size":[1]}]);
|
|
10458
11373
|
const DuetLayout = /*@__PURE__*/proxyCustomElement(DuetLayout$1, [1,"duet-layout",{"sticky":[4],"margin":[1],"stickyDistance":[1,"sticky-distance"],"center":[4],"tabs":[4],"middle":[4]}]);
|
|
10459
|
-
const DuetLink = /*@__PURE__*/proxyCustomElement(DuetLink$1, [17,"duet-link",{"accessibleLabel":[1,"accessible-label"],"language":[1025],"accessibleLabelExternalDefaults":[
|
|
11374
|
+
const DuetLink = /*@__PURE__*/proxyCustomElement(DuetLink$1, [17,"duet-link",{"accessibleLabel":[1,"accessible-label"],"language":[1025],"accessibleLabelExternalDefaults":[1,"accessible-label-external-default"],"accessibleLabelExternal":[1,"accessible-label-external"],"identifier":[1],"theme":[1025],"url":[513],"external":[4]}]);
|
|
10460
11375
|
const DuetList = /*@__PURE__*/proxyCustomElement(DuetList$1, [1,"duet-list",{"theme":[1025],"margin":[1],"padding":[1],"mobile":[1],"breakpoint":[1],"variation":[1],"labelWidth":[1,"label-width"]}]);
|
|
10461
11376
|
const DuetListItem = /*@__PURE__*/proxyCustomElement(DuetListItem$1, [1,"duet-list-item"]);
|
|
10462
11377
|
const DuetLogo = /*@__PURE__*/proxyCustomElement(DuetLogo$1, [1,"duet-logo",{"theme":[1025],"margin":[1],"inverse":[4],"size":[1],"href":[1537],"language":[1537]}]);
|
|
10463
|
-
const DuetModal = /*@__PURE__*/proxyCustomElement(DuetModal$1, [1,"duet-modal",{"language":[1025],"
|
|
11378
|
+
const DuetModal = /*@__PURE__*/proxyCustomElement(DuetModal$1, [1,"duet-modal",{"language":[1025],"accessibleCloseLabelDefaults":[1,"accessible-close-label-default"],"accessibleCloseLabel":[1,"accessible-close-label"],"size":[1],"gutterSize":[1,"gutter-size"],"theme":[1025],"heading":[1],"headingLevel":[1,"heading-level"],"icon":[1],"color":[1],"active":[1540],"open":[32]},[[8,"keyup","handleKeyUp"]]]);
|
|
10464
11379
|
const DuetNotification = /*@__PURE__*/proxyCustomElement(DuetNotification$1, [1,"duet-notification",{"language":[1],"accessibleLabelUnreadDefaults":[16],"accessibleLabelUnread":[1,"accessible-label-unread"],"url":[1],"date":[1],"highlight":[4],"external":[4],"theme":[1025]}]);
|
|
10465
|
-
const DuetNotificationDrawer = /*@__PURE__*/proxyCustomElement(DuetNotificationDrawer$1, [1,"duet-notification-drawer",{"icon":[1],"label":[1],"language":[1],"accessibleLabelNotificationsDefaults":[
|
|
10466
|
-
const DuetNumberInput = /*@__PURE__*/proxyCustomElement(DuetNumberInput$1, [2,"duet-number-input",{"language":[1025],"locale":[1],"unit":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleLive":[1,"accessible-live"],"accessibleLiveEnabled":[4,"accessible-live-enabled"],"accessibleAdd":[1,"accessible-add"],"accessibleSubtract":[1,"accessible-subtract"],"theme":[1025],"margin":[1],"expand":[4],"identifier":[1],"min":[2],"label":[1],"labelHidden":[4,"label-hidden"],"max":[2],"name":[1],"error":[1],"tooltip":[1],"step":[2],"rounding":[4],"role":[1],"disabled":[516],"required":[4],"value":[1025],"focusedValue":[32]}]);
|
|
10467
|
-
const DuetParagraph = /*@__PURE__*/proxyCustomElement(DuetParagraph$1, [1,"duet-paragraph",{"theme":[1025],"margin":[1],"size":[1],"variation":[1],"color":[1]}]);
|
|
11380
|
+
const DuetNotificationDrawer = /*@__PURE__*/proxyCustomElement(DuetNotificationDrawer$1, [1,"duet-notification-drawer",{"icon":[1],"label":[1],"language":[1],"accessibleLabelNotificationsDefaults":[1,"accessible-label-notification-default"],"accessibleLabelNotifications":[1,"accessible-label-notifications"],"badge":[4],"theme":[1025],"direction":[1],"isOpen":[32],"hasNotifications":[32]},[[6,"focus","handleClickFocusOutside"],[6,"click","handleClickFocusOutside"]]]);
|
|
11381
|
+
const DuetNumberInput = /*@__PURE__*/proxyCustomElement(DuetNumberInput$1, [2,"duet-number-input",{"language":[1025],"locale":[1],"unit":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleLiveDefaults":[1,"accessible-live-default"],"accessibleLive":[1,"accessible-live"],"accessibleLiveEnabled":[4,"accessible-live-enabled"],"accessibleAddDefaults":[1,"accessible-add-default"],"accessibleAdd":[1,"accessible-add"],"accessibleSubtractDefaults":[1,"accessible-subtract-defaults"],"accessibleSubtract":[1,"accessible-subtract"],"theme":[1025],"margin":[1],"expand":[4],"identifier":[1],"min":[2],"labelDefaults":[1,"label-default"],"label":[1],"labelHidden":[4,"label-hidden"],"max":[2],"name":[1],"error":[1],"tooltip":[1],"step":[2],"rounding":[4],"role":[1],"disabled":[516],"required":[4],"value":[1025],"focusedValue":[32]}]);
|
|
11382
|
+
const DuetParagraph = /*@__PURE__*/proxyCustomElement(DuetParagraph$1, [1,"duet-paragraph",{"theme":[1025],"margin":[1],"size":[1],"weight":[1],"variation":[1],"color":[1]}]);
|
|
11383
|
+
const DuetProgress = /*@__PURE__*/proxyCustomElement(DuetProgress$1, [0,"duet-progress",{"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleLabel":[1,"accessible-label"],"accessibleLabelUploadDefaults":[1,"accessible-label-upload-defaults"],"accessibleLabelUpload":[1,"accessible-label-upload"],"progress":[1538],"caption":[1],"height":[1],"theme":[1025]}]);
|
|
10468
11384
|
const DuetRadio = /*@__PURE__*/proxyCustomElement(DuetRadio$1, [2,"duet-radio",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleIndex":[1,"accessible-index"],"margin":[1],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"theme":[1025],"disabled":[516],"required":[4],"blockEvents":[4,"block-events"],"identifier":[1],"label":[1],"name":[1],"role":[1],"groupDisabled":[4,"group-disabled"],"groupDirection":[1,"group-direction"],"groupResponsive":[4,"group-responsive"],"checked":[1540],"value":[1537]}]);
|
|
10469
11385
|
const DuetRadioGroup = /*@__PURE__*/proxyCustomElement(DuetRadioGroup$1, [6,"duet-radio-group",{"direction":[1],"margin":[1],"theme":[1025],"error":[1],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"],"name":[1],"label":[1],"labelHidden":[4,"label-hidden"],"caption":[1],"responsive":[4],"value":[1537],"disabled":[4]}]);
|
|
10470
11386
|
const DuetRangeSlider = /*@__PURE__*/proxyCustomElement(DuetRangeSlider$1, [2,"duet-range-slider",{"theme":[1025],"margin":[1],"expand":[4],"identifier":[1],"name":[1],"required":[4],"disabled":[516],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"min":[2],"label":[1],"labelHidden":[4,"label-hidden"],"unit":[1],"max":[2],"step":[2],"locale":[1],"value":[1026],"debounce":[2]}]);
|
|
@@ -10474,13 +11390,14 @@ const DuetSpinner = /*@__PURE__*/proxyCustomElement(DuetSpinner$1, [1,"duet-spin
|
|
|
10474
11390
|
const DuetStep = /*@__PURE__*/proxyCustomElement(DuetStep$1, [6,"duet-step",{"theme":[1025],"heading":[1],"headingLevel":[1,"heading-level"],"stepIndex":[2,"step-index"],"state":[1],"roundedTop":[4,"rounded-top"],"roundedBottom":[4,"rounded-bottom"]}]);
|
|
10475
11391
|
const DuetStepper = /*@__PURE__*/proxyCustomElement(DuetStepper$1, [1,"duet-stepper",{"theme":[1025],"accessibleLive":[1,"accessible-live"],"margin":[1],"backDisabled":[4,"back-disabled"],"selected":[514]},[[0,"duetStepClick","onDuetStepClick"]]]);
|
|
10476
11392
|
const DuetTab = /*@__PURE__*/proxyCustomElement(DuetTab$1, [6,"duet-tab",{"label":[513],"selected":[516]}]);
|
|
10477
|
-
const DuetTabGroup = /*@__PURE__*/proxyCustomElement(DuetTabGroup$1, [6,"duet-tab-group",{"theme":[1025],"variation":[1],"language":[1025],"label":[1],"labelHidden":[4,"label-hidden"],"margin":[1],"padding":[1],"tabs":[32],"selected":[32]}]);
|
|
11393
|
+
const DuetTabGroup = /*@__PURE__*/proxyCustomElement(DuetTabGroup$1, [6,"duet-tab-group",{"theme":[1025],"variation":[1],"language":[1025],"labelDefaults":[1,"label-default"],"label":[1],"labelHidden":[4,"label-hidden"],"margin":[1],"padding":[1],"tabs":[32],"selected":[32]}]);
|
|
10478
11394
|
const DuetTable = /*@__PURE__*/proxyCustomElement(DuetTable$1, [4,"duet-table",{"theme":[1025],"margin":[1],"variation":[1],"sticky":[4],"stickyDistance":[1,"sticky-distance"],"breakpoint":[1],"matchesBreakpoint":[32]}]);
|
|
10479
11395
|
const DuetTextarea = /*@__PURE__*/proxyCustomElement(DuetTextarea$1, [2,"duet-textarea",{"margin":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleAutocomplete":[1,"accessible-autocomplete"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"theme":[1025],"expand":[4],"disabled":[516],"identifier":[1],"required":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"placeholder":[1],"caption":[1],"echoPlaceholder":[4,"echo-placeholder"],"maxlength":[2],"minlength":[2],"error":[1],"role":[1],"tooltip":[1],"tooltipDirection":[1,"tooltip-direction"],"value":[1025],"disallowPattern":[1,"disallow-pattern"],"counter":[4],"counterLabel":[1,"counter-label"]}]);
|
|
10480
11396
|
const DuetToggle = /*@__PURE__*/proxyCustomElement(DuetToggle$1, [2,"duet-toggle",{"theme":[1025],"margin":[1],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"label":[1],"required":[4],"disabled":[516],"checked":[1540],"value":[1537],"identifier":[1],"name":[1],"role":[1]}]);
|
|
10481
|
-
const DuetTooltip = /*@__PURE__*/proxyCustomElement(DuetTooltip$1, [1,"duet-tooltip",{"theme":[1025],"language":[1025],"accessibleLabel":[1,"accessible-label"],"accessibleInputLabel":[1,"accessible-input-label"],"accessibleCloseLabel":[1,"accessible-close-label"],"label":[1],"breakpoint":[1],"direction":[1],"positionVertical":[513,"position-vertical"],"positionHorizontal":[513,"position-horizontal"],"active":[1540],"openDown":[32]},[[9,"scroll","onScroll"],[4,"click","handleDocumentClick"]]]);
|
|
10482
|
-
const DuetTray = /*@__PURE__*/proxyCustomElement(DuetTray$1, [1,"duet-tray",{"language":[1025],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleOpenLabel":[1,"accessible-open-label"],"theme":[1025],"active":[516],"autoHide":[4,"auto-hide"],"responsive":[4],"expanded":[32],"hiddenState":[32]},[[9,"scroll","getFrame"],[16,"click","handleBodyClick"]]]);
|
|
10483
|
-
const DuetUpload = /*@__PURE__*/proxyCustomElement(DuetUpload$1, [1,"duet-upload",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"external":[4],"uri":[1],"caption":[1],"buttonLabelDefaults":[
|
|
11397
|
+
const DuetTooltip = /*@__PURE__*/proxyCustomElement(DuetTooltip$1, [1,"duet-tooltip",{"theme":[1025],"language":[1025],"accessibleLabelDefault":[1,"accessible-label-default"],"accessibleLabel":[1,"accessible-label"],"accessibleInputLabel":[1,"accessible-input-label"],"accessibleCloseLabelDefault":[1,"accessible-close-label-default"],"accessibleCloseLabel":[1,"accessible-close-label"],"label":[1],"breakpoint":[1],"direction":[1],"positionVertical":[513,"position-vertical"],"positionHorizontal":[513,"position-horizontal"],"active":[1540],"openDown":[32]},[[9,"scroll","onScroll"],[4,"click","handleDocumentClick"]]]);
|
|
11398
|
+
const DuetTray = /*@__PURE__*/proxyCustomElement(DuetTray$1, [1,"duet-tray",{"language":[1025],"accessibleCloseLabelDefaults":[1,"accessible-close-label-default"],"accessibleCloseLabel":[1,"accessible-close-label"],"accessibleOpenLabelDefaults":[1,"accessible-open-label-default"],"accessibleOpenLabel":[1,"accessible-open-label"],"theme":[1025],"active":[516],"autoHide":[4,"auto-hide"],"responsive":[4],"expanded":[32],"hiddenState":[32]},[[9,"scroll","getFrame"],[16,"click","handleBodyClick"]]]);
|
|
11399
|
+
const DuetUpload = /*@__PURE__*/proxyCustomElement(DuetUpload$1, [1,"duet-upload",{"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleDescribedBy":[1,"accessible-described-by"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"external":[4],"hideButton":[4,"hide-upload-button"],"actions":[1],"uri":[1],"showLinks":[4,"show-links"],"caption":[1],"statusLabelDefaults":[1,"status-label-default"],"statusMessageLabel":[1,"status-message-label"],"buttonLabelDefaults":[1,"button-label-default"],"buttonLabel":[1,"button-label"],"accessibleButtonLabel":[1,"accessible-button-label"],"theme":[1025],"disabled":[516],"identifier":[1],"margin":[1],"required":[4],"groups":[1],"hideGroups":[4,"hide-table-labels"],"files":[1040],"valid":[1540],"labelDefaults":[1,"label-default"],"label":[1],"descriptionDefaults":[1,"description-default"],"description":[1],"fileListEmptyDefaults":[1,"list-empty-default"],"fileListEmpty":[1,"file-list-empty"],"error":[1],"name":[1],"maxBytes":[2,"max-bytes"],"maxBytesTotal":[2,"max-bytes-total"],"maxFiles":[2,"max-files"],"allowedExtensions":[1,"allowed-extensions"],"allowedMimetypes":[1,"allowed-mimetypes"],"multiple":[4],"limitSelection":[4,"limit-selection"],"value":[1025],"tick":[32]}]);
|
|
11400
|
+
const DuetUploadAriaStatus = /*@__PURE__*/proxyCustomElement(DuetUploadAriaStatus$1, [1,"duet-upload-aria-status",{"statusMessageLabel":[16],"accessibleAriaLive":[1,"accessible-aria-live"],"valid":[2],"total":[2],"invalid":[2],"inprogress":[2],"statusMessage":[32]}]);
|
|
10484
11401
|
const DuetVisuallyHidden = /*@__PURE__*/proxyCustomElement(DuetVisuallyHidden$1, [1,"duet-visually-hidden"]);
|
|
10485
11402
|
const defineCustomElements = (opts) => {
|
|
10486
11403
|
if (typeof customElements !== 'undefined') {
|
|
@@ -10497,6 +11414,9 @@ const defineCustomElements = (opts) => {
|
|
|
10497
11414
|
DuetCookieConsent,
|
|
10498
11415
|
DuetDatePicker,
|
|
10499
11416
|
DuetDivider,
|
|
11417
|
+
DuetEditableTable,
|
|
11418
|
+
DuetEditableTableButton,
|
|
11419
|
+
DuetEditableTableItem,
|
|
10500
11420
|
DuetEmptyState,
|
|
10501
11421
|
DuetFieldset,
|
|
10502
11422
|
DuetFooter,
|
|
@@ -10518,6 +11438,7 @@ const defineCustomElements = (opts) => {
|
|
|
10518
11438
|
DuetNotificationDrawer,
|
|
10519
11439
|
DuetNumberInput,
|
|
10520
11440
|
DuetParagraph,
|
|
11441
|
+
DuetProgress,
|
|
10521
11442
|
DuetRadio,
|
|
10522
11443
|
DuetRadioGroup,
|
|
10523
11444
|
DuetRangeSlider,
|
|
@@ -10534,6 +11455,7 @@ const defineCustomElements = (opts) => {
|
|
|
10534
11455
|
DuetTooltip,
|
|
10535
11456
|
DuetTray,
|
|
10536
11457
|
DuetUpload,
|
|
11458
|
+
DuetUploadAriaStatus,
|
|
10537
11459
|
DuetVisuallyHidden
|
|
10538
11460
|
].forEach(cmp => {
|
|
10539
11461
|
if (!customElements.get(cmp.is)) {
|
|
@@ -10544,7 +11466,7 @@ const defineCustomElements = (opts) => {
|
|
|
10544
11466
|
};
|
|
10545
11467
|
|
|
10546
11468
|
/*
|
|
10547
|
-
Stencil Client Platform v2.
|
|
11469
|
+
Stencil Client Platform v2.11.0 | MIT Licensed | https://stenciljs.com
|
|
10548
11470
|
*/
|
|
10549
11471
|
/**
|
|
10550
11472
|
* @license
|
|
@@ -10612,6 +11534,7 @@ const extractCommentsWithHash = (input) => {
|
|
|
10612
11534
|
};
|
|
10613
11535
|
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
|
10614
11536
|
const _curlyRe = /([{}])/g;
|
|
11537
|
+
const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
|
|
10615
11538
|
const OPEN_CURLY = '{';
|
|
10616
11539
|
const CLOSE_CURLY = '}';
|
|
10617
11540
|
const BLOCK_PLACEHOLDER = '%BLOCK%';
|
|
@@ -10764,17 +11687,18 @@ const selectorNeedsScoping = (selector, scopeSelector) => {
|
|
|
10764
11687
|
const re = makeScopeMatcher(scopeSelector);
|
|
10765
11688
|
return !re.test(selector);
|
|
10766
11689
|
};
|
|
11690
|
+
const injectScopingSelector = (selector, scopingSelector) => {
|
|
11691
|
+
return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
|
|
11692
|
+
return before + scopingSelector + colon + after;
|
|
11693
|
+
});
|
|
11694
|
+
};
|
|
10767
11695
|
const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
10768
11696
|
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
|
10769
11697
|
_polyfillHostRe.lastIndex = 0;
|
|
10770
11698
|
if (_polyfillHostRe.test(selector)) {
|
|
10771
11699
|
const replaceBy = `.${hostSelector}`;
|
|
10772
11700
|
return selector
|
|
10773
|
-
.replace(_polyfillHostNoCombinatorRe, (_, selector) =>
|
|
10774
|
-
return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
10775
|
-
return before + replaceBy + colon + after;
|
|
10776
|
-
});
|
|
10777
|
-
})
|
|
11701
|
+
.replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
|
|
10778
11702
|
.replace(_polyfillHostRe, replaceBy + ' ');
|
|
10779
11703
|
}
|
|
10780
11704
|
return scopeSelector + ' ' + selector;
|
|
@@ -10795,10 +11719,7 @@ const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
|
10795
11719
|
// remove :host since it should be unnecessary
|
|
10796
11720
|
const t = p.replace(_polyfillHostRe, '');
|
|
10797
11721
|
if (t.length > 0) {
|
|
10798
|
-
|
|
10799
|
-
if (matches) {
|
|
10800
|
-
scopedP = matches[1] + className + matches[2] + matches[3];
|
|
10801
|
-
}
|
|
11722
|
+
scopedP = injectScopingSelector(t, className);
|
|
10802
11723
|
}
|
|
10803
11724
|
}
|
|
10804
11725
|
return scopedP;
|
|
@@ -10936,4 +11857,4 @@ const shadowCss = /*#__PURE__*/Object.freeze({
|
|
|
10936
11857
|
scopeCss: scopeCss
|
|
10937
11858
|
});
|
|
10938
11859
|
|
|
10939
|
-
export { DuetAlert, DuetBadge, DuetButton, DuetCaption, DuetCard, DuetCheckbox, DuetChoice, DuetChoiceGroup, DuetCollapsible, DuetCookieConsent, DuetDatePicker, DuetDivider, DuetEmptyState, DuetFieldset, DuetFooter, DuetGrid, DuetGridItem, DuetHeader, DuetHeading, DuetHero, DuetIcon, DuetInput, DuetLabel, DuetLayout, DuetLink, DuetList, DuetListItem, DuetLogo, DuetModal, DuetNotification, DuetNotificationDrawer, DuetNumberInput, DuetParagraph, DuetRadio, DuetRadioGroup, DuetRangeSlider, DuetSelect, DuetSpacer, DuetSpinner, DuetStep, DuetStepper, DuetTab, DuetTabGroup, DuetTable, DuetTextarea, DuetToggle, DuetTooltip, DuetTray, DuetUpload, DuetVisuallyHidden, defineCustomElements, setAssetPath, setPlatformOptions };
|
|
11860
|
+
export { DuetAlert, DuetBadge, DuetButton, DuetCaption, DuetCard, DuetCheckbox, DuetChoice, DuetChoiceGroup, DuetCollapsible, DuetCookieConsent, DuetDatePicker, DuetDivider, DuetEditableTable, DuetEditableTableButton, DuetEditableTableItem, DuetEmptyState, DuetFieldset, DuetFooter, DuetGrid, DuetGridItem, DuetHeader, DuetHeading, DuetHero, DuetIcon, DuetInput, DuetLabel, DuetLayout, DuetLink, DuetList, DuetListItem, DuetLogo, DuetModal, DuetNotification, DuetNotificationDrawer, DuetNumberInput, DuetParagraph, DuetProgress, DuetRadio, DuetRadioGroup, DuetRangeSlider, DuetSelect, DuetSpacer, DuetSpinner, DuetStep, DuetStepper, DuetTab, DuetTabGroup, DuetTable, DuetTextarea, DuetToggle, DuetTooltip, DuetTray, DuetUpload, DuetUploadAriaStatus, DuetVisuallyHidden, defineCustomElements, setAssetPath, setPlatformOptions };
|