@duetds/components 4.30.1 → 4.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hydrate/index.js +230 -1038
- 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 +4 -3
- package/lib/cjs/duet-caption_4.cjs.entry.js +7 -8
- package/lib/cjs/duet-card.cjs.entry.js +4 -4
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +4 -3
- package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +22 -12
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- 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 +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +25 -9
- package/lib/cjs/duet-hero.cjs.entry.js +6 -6
- package/lib/cjs/duet-icon.cjs.entry.js +3 -3
- package/lib/cjs/duet-input_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +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-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +2 -2
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +11 -5
- package/lib/cjs/duet-table.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +21 -10
- package/lib/cjs/duet-tray.cjs.entry.js +20 -9
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +2 -2
- package/lib/cjs/{focus-utils-7605778f.js → focus-utils-bd331feb.js} +1 -1
- package/lib/cjs/{index-0c949193.js → index-113c2add.js} +0 -3
- package/lib/cjs/{language-utils-70d6a9a4.js → language-utils-48b8860b.js} +23 -8
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{string-utils-a6de43d8.js → string-utils-267e3dbb.js} +7 -0
- package/lib/collection/collection-manifest.json +0 -6
- package/lib/collection/components/duet-alert/duet-alert.js +10 -4
- package/lib/collection/components/duet-badge/duet-badge.css +1 -0
- package/lib/collection/components/duet-button/duet-button.js +7 -5
- package/lib/collection/components/duet-card/duet-card.css +10 -7
- package/lib/collection/components/duet-card/duet-card.js +3 -5
- package/lib/collection/components/duet-choice/duet-choice.js +5 -3
- package/lib/collection/components/duet-choice-group/duet-choice-group.css +1 -0
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +73 -38
- package/lib/collection/components/duet-footer/duet-footer.js +7 -5
- package/lib/collection/components/duet-header/duet-header.js +46 -21
- package/lib/collection/components/duet-heading/duet-heading.css +1 -0
- package/lib/collection/components/duet-hero/duet-hero.js +14 -9
- package/lib/collection/components/duet-icon/icon-utils.js +1 -1
- package/lib/collection/components/duet-label/duet-label.css +2 -0
- package/lib/collection/components/duet-link/duet-link.js +10 -11
- package/lib/collection/components/duet-modal/duet-modal.js +16 -11
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +14 -9
- package/lib/collection/components/duet-number-input/duet-number-input.js +141 -17
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +35 -4
- package/lib/collection/components/duet-tooltip/duet-tooltip.js +72 -10
- package/lib/collection/components/duet-tray/duet-tray.js +71 -9
- package/lib/collection/utils/fixture-utils.js +7 -5
- package/lib/collection/utils/language-utils.js +22 -8
- package/lib/collection/utils/string-utils.js +6 -0
- package/lib/custom-elements-bundle/index.d.ts +0 -6
- package/lib/custom-elements-bundle/index.js +224 -995
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/p-0058512b.js +4 -0
- package/lib/duet/p-0224db45.entry.js +4 -0
- package/lib/duet/{p-345ea4f2.system.entry.js → p-02ad46a0.system.entry.js} +1 -1
- package/lib/duet/{p-62806bb6.system.entry.js → p-07263910.system.entry.js} +1 -1
- package/lib/duet/{p-f82709ba.entry.js → p-1bfbc988.entry.js} +1 -1
- package/lib/duet/p-1cd7177f.entry.js +4 -0
- package/lib/duet/p-1cec5a70.system.entry.js +4 -0
- package/lib/duet/p-1e7222c2.entry.js +4 -0
- package/lib/duet/{p-c0b95b58.entry.js → p-202bbd70.entry.js} +1 -1
- package/lib/duet/{p-d1817efe.system.entry.js → p-22f56356.system.entry.js} +1 -1
- package/lib/duet/{p-f81d8534.entry.js → p-28b67b94.entry.js} +1 -1
- package/lib/duet/{p-b4374f0e.entry.js → p-33426ddc.entry.js} +1 -1
- package/lib/duet/p-33cf6ed1.entry.js +4 -0
- package/lib/duet/p-3d3f773d.system.entry.js +4 -0
- package/lib/duet/p-3e1ef509.system.entry.js +4 -0
- package/lib/duet/p-3f78a826.system.js +4 -0
- package/lib/duet/{p-2a1a9f9f.entry.js → p-44ffb960.entry.js} +1 -1
- package/lib/duet/{p-dee41056.system.entry.js → p-453955cc.system.entry.js} +1 -1
- package/lib/duet/{p-66dde4d2.entry.js → p-4670a654.entry.js} +1 -1
- package/lib/duet/p-47645ea8.system.entry.js +4 -0
- package/lib/duet/p-504dbf8f.system.entry.js +4 -0
- package/lib/duet/{p-62c294d6.system.entry.js → p-5230ee3c.system.entry.js} +1 -1
- package/lib/duet/{p-bbc229d8.system.entry.js → p-56e172f5.system.entry.js} +1 -1
- package/lib/duet/{p-de2be65b.system.js → p-57ea2576.system.js} +1 -1
- package/lib/duet/p-5aa0d34d.entry.js +4 -0
- package/lib/duet/p-5fc7e1f7.system.entry.js +4 -0
- package/lib/duet/{p-3dc9d15d.system.entry.js → p-605bc214.system.entry.js} +1 -1
- package/lib/duet/{p-4a7911fd.entry.js → p-60ab57d4.entry.js} +1 -1
- package/lib/duet/p-64109493.entry.js +4 -0
- package/lib/duet/{p-7e108b7e.entry.js → p-69a5dc6b.entry.js} +1 -1
- package/lib/duet/{p-8cfce39e.system.entry.js → p-6a230911.system.entry.js} +1 -1
- package/lib/duet/p-6a760b8a.entry.js +4 -0
- package/lib/duet/{p-c9303f9a.entry.js → p-6d2da245.entry.js} +1 -1
- package/lib/duet/{p-ceb75b35.system.entry.js → p-712e7dde.system.entry.js} +1 -1
- package/lib/duet/{p-f71f12ed.entry.js → p-746655ba.entry.js} +1 -1
- package/lib/duet/p-7b6db837.system.entry.js +4 -0
- package/lib/duet/p-7d080785.system.entry.js +4 -0
- package/lib/duet/{p-4095dba5.entry.js → p-82dc2e0b.entry.js} +1 -1
- package/lib/duet/p-8c8e82aa.system.js +4 -0
- package/lib/duet/{p-fc397e03.system.entry.js → p-8c980350.system.entry.js} +1 -1
- package/lib/duet/{p-1cfe38b1.system.entry.js → p-8cb47a70.system.entry.js} +1 -1
- package/lib/duet/{p-7ee52f58.entry.js → p-8f03c3eb.entry.js} +1 -1
- package/lib/duet/p-91fa68a5.js +4 -0
- package/lib/duet/{p-e26116e0.system.entry.js → p-92d38668.system.entry.js} +1 -1
- package/lib/duet/p-95626e7e.system.entry.js +4 -0
- package/lib/duet/p-96808a2e.system.entry.js +4 -0
- package/lib/duet/{p-8ffe1461.system.entry.js → p-96c103b2.system.entry.js} +1 -1
- package/lib/duet/p-986779fb.js +4 -0
- package/lib/duet/{p-35e45c19.system.js → p-9a945278.system.js} +1 -1
- package/lib/duet/{p-2d2c45f9.entry.js → p-9c94be45.entry.js} +1 -1
- package/lib/duet/p-9ce1baab.system.entry.js +4 -0
- package/lib/duet/p-9ff25646.entry.js +4 -0
- package/lib/duet/p-a1d12e94.system.entry.js +4 -0
- package/lib/duet/p-b03a46b6.entry.js +4 -0
- package/lib/duet/{p-a88df408.entry.js → p-b1b8e510.entry.js} +1 -1
- package/lib/duet/p-b694cbf5.system.js +4 -0
- package/lib/duet/p-b7e50cfa.entry.js +4 -0
- package/lib/duet/p-b82927b0.system.entry.js +4 -0
- package/lib/duet/{p-c3688975.entry.js → p-ba205dca.entry.js} +1 -1
- package/lib/duet/{p-f71e337e.system.entry.js → p-bcae23fc.system.entry.js} +1 -1
- package/lib/duet/{p-5c5bdb06.system.entry.js → p-be19c57b.system.entry.js} +1 -1
- package/lib/duet/{p-a321a98c.entry.js → p-c4737f88.entry.js} +1 -1
- package/lib/duet/p-c5beceed.js +4 -0
- package/lib/duet/{p-27d538f7.system.entry.js → p-c5f10483.system.entry.js} +1 -1
- package/lib/duet/{p-a6096b05.system.entry.js → p-d35fd913.system.entry.js} +1 -1
- package/lib/duet/p-d4b4bfa6.entry.js +4 -0
- package/lib/duet/p-d7623eb8.system.entry.js +4 -0
- package/lib/duet/{p-36007600.entry.js → p-dc85d2a4.entry.js} +1 -1
- package/lib/duet/p-de093c16.entry.js +4 -0
- package/lib/duet/p-de842863.entry.js +4 -0
- package/lib/duet/{p-59a07cf9.entry.js → p-e08b8909.entry.js} +1 -1
- package/lib/duet/p-e39471b6.entry.js +4 -0
- package/lib/duet/p-e834c8d5.system.entry.js +4 -0
- package/lib/duet/{p-ce1374a4.system.entry.js → p-ef45cfe9.system.entry.js} +1 -1
- package/lib/duet/{p-031c2cd8.system.entry.js → p-f0b1850a.system.entry.js} +1 -1
- package/lib/duet/p-f53c8019.entry.js +4 -0
- package/lib/duet/{p-4265de16.system.entry.js → p-f96c4093.system.entry.js} +1 -1
- package/lib/duet/p-fbd83d67.entry.js +4 -0
- package/lib/duet/{p-1c41525a.entry.js → p-fdecaf46.entry.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 +4 -3
- package/lib/esm/duet-caption_4.entry.js +7 -8
- package/lib/esm/duet-card.entry.js +4 -4
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +4 -3
- package/lib/esm/duet-collapsible.entry.js +2 -2
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +22 -12
- package/lib/esm/duet-divider_2.entry.js +1 -1
- 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 +1 -1
- package/lib/esm/duet-header_2.entry.js +25 -9
- package/lib/esm/duet-hero.entry.js +6 -6
- package/lib/esm/duet-icon.entry.js +3 -3
- package/lib/esm/duet-input_2.entry.js +2 -2
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +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-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +2 -2
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +11 -5
- package/lib/esm/duet-table.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +21 -10
- package/lib/esm/duet-tray.entry.js +20 -9
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +2 -2
- package/lib/esm/{focus-utils-0b12f0df.js → focus-utils-1995e5a9.js} +1 -1
- package/lib/esm/{index-f70ddc7f.js → index-6e246691.js} +0 -3
- package/lib/esm/{language-utils-ab9c3afc.js → language-utils-d5c38f65.js} +23 -8
- package/lib/esm/loader.js +2 -2
- package/lib/esm/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +7 -1
- 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 +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +2 -2
- 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 +1 -1
- package/lib/esm-es5/duet-table.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/focus-utils-1995e5a9.js +4 -0
- package/lib/esm-es5/{index-f70ddc7f.js → index-6e246691.js} +1 -1
- package/lib/esm-es5/language-utils-d5c38f65.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +1 -1
- package/lib/html.html-data.json +4489 -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 +1 -1
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +13 -7
- package/lib/types/components/duet-footer/duet-footer.d.ts +1 -1
- package/lib/types/components/duet-header/duet-header.d.ts +21 -5
- package/lib/types/components/duet-hero/duet-hero.d.ts +3 -3
- 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-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.d.ts +146 -384
- package/lib/types/utils/language-utils.d.ts +3 -2
- package/lib/types/utils/string-utils.d.ts +1 -0
- package/package.json +18 -14
- 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/collection/components/duet-upload/duet-upload-validators.js +0 -93
- package/lib/collection/components/duet-upload/duet-upload.css +0 -133
- package/lib/collection/components/duet-upload/duet-upload.js +0 -1440
- package/lib/collection/components/duet-upload/errorcodes.utils.js +0 -20
- package/lib/collection/components/duet-upload/mock.helpers.js +0 -91
- package/lib/collection/components/duet-upload/upload.helpers.js +0 -13
- package/lib/collection/components/duet-upload/xhr.helpers.js +0 -34
- 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-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-2a4d7c5b.system.entry.js +0 -4
- package/lib/duet/p-4289b543.entry.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-5f70e318.entry.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-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-9381c2d4.entry.js +0 -4
- package/lib/duet/p-9a450c9a.entry.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-a89d5d7c.entry.js +0 -4
- package/lib/duet/p-b07055fd.system.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-c4d183e6.entry.js +0 -4
- package/lib/duet/p-cd4e8ccf.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-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/esm/duet-upload.entry.js +0 -862
- package/lib/esm-es5/duet-upload.entry.js +0 -4
- package/lib/esm-es5/focus-utils-0b12f0df.js +0 -4
- package/lib/esm-es5/language-utils-ab9c3afc.js +0 -4
- package/lib/types/components/duet-upload/duet-upload-file-list.d.ts +0 -9
- package/lib/types/components/duet-upload/duet-upload-validators.d.ts +0 -12
- package/lib/types/components/duet-upload/duet-upload.d.ts +0 -311
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +0 -7
- package/lib/types/components/duet-upload/mock.helpers.d.ts +0 -2
- package/lib/types/components/duet-upload/upload.helpers.d.ts +0 -1
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +0 -12
|
@@ -1091,9 +1091,6 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1091
1091
|
promise = safeCall(instance, 'componentWillLoad');
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
{
|
|
1095
|
-
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
1096
|
-
}
|
|
1097
1094
|
endSchedule();
|
|
1098
1095
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1099
1096
|
};
|
|
@@ -1644,6 +1641,51 @@ const appGlobalScript = () => {
|
|
|
1644
1641
|
|
|
1645
1642
|
const globalScripts = appGlobalScript;
|
|
1646
1643
|
|
|
1644
|
+
function isObject(maybeObj) {
|
|
1645
|
+
return Object.prototype.toString.call(maybeObj) === "[object Object]";
|
|
1646
|
+
}
|
|
1647
|
+
const parsePossibleJSON = (maybeJSON) => {
|
|
1648
|
+
if (Array.isArray(maybeJSON) || isObject(maybeJSON)) {
|
|
1649
|
+
return maybeJSON;
|
|
1650
|
+
}
|
|
1651
|
+
if (typeof maybeJSON === "string") {
|
|
1652
|
+
try {
|
|
1653
|
+
return JSON.parse(maybeJSON);
|
|
1654
|
+
}
|
|
1655
|
+
catch (e) {
|
|
1656
|
+
console.warn(e);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
// undefined is not a type in JSON,
|
|
1660
|
+
// so we use it here to signal invalid input
|
|
1661
|
+
return undefined;
|
|
1662
|
+
};
|
|
1663
|
+
/**
|
|
1664
|
+
* Format string, via simplistic sprintf equivalent
|
|
1665
|
+
* @example String.format('{0} is super, but {1} is best! {{0}}', 'Duet', 'Coffee'); -> "Duet is super, but Coffee ist best! {0}"
|
|
1666
|
+
*
|
|
1667
|
+
*/
|
|
1668
|
+
// @ts-ignore
|
|
1669
|
+
if (!String.format) {
|
|
1670
|
+
// @ts-ignore
|
|
1671
|
+
String.format = function (format) {
|
|
1672
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
1673
|
+
return format.replace(/\{\{|\}\}|\{(\d+)\}/g, function (curlyBrack, index) {
|
|
1674
|
+
return curlyBrack == "{{" ? "{" : curlyBrack == "}}" ? "}" : args[index];
|
|
1675
|
+
});
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
const MATCH_DISALLOWED_CHARS = /[^a-z0-9áéíóúñüöäå \.,_-]/gim;
|
|
1679
|
+
function sanitizeString$1(string) {
|
|
1680
|
+
return string.replace(MATCH_DISALLOWED_CHARS, "").trim();
|
|
1681
|
+
}
|
|
1682
|
+
const convertHtmlQuotes = string => {
|
|
1683
|
+
if (typeof string === "string") {
|
|
1684
|
+
return string.replace(/"/g, '"').replace(/'/g, '"');
|
|
1685
|
+
}
|
|
1686
|
+
return string;
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1647
1689
|
const localeLookUpTable = {
|
|
1648
1690
|
fi: "fi-FI",
|
|
1649
1691
|
en: "en-GB",
|
|
@@ -1658,13 +1700,13 @@ const localeMonetarySignifierLookUpTable = {
|
|
|
1658
1700
|
};
|
|
1659
1701
|
const defLanguageArray = ["fi", "en", "sv"];
|
|
1660
1702
|
const defaultLanguage = "fi";
|
|
1661
|
-
const
|
|
1662
|
-
? document.documentElement.lang.toLowerCase()
|
|
1663
|
-
|
|
1703
|
+
const getCurrentLanguage = () => {
|
|
1704
|
+
return document.documentElement.lang ? document.documentElement.lang.toLowerCase() : defaultLanguage;
|
|
1705
|
+
};
|
|
1664
1706
|
const isOfTypeLanguage = (keyInput) => {
|
|
1665
1707
|
return defLanguageArray.includes(keyInput);
|
|
1666
1708
|
};
|
|
1667
|
-
const checkForLanguage = (languageString =
|
|
1709
|
+
const checkForLanguage = (languageString = getCurrentLanguage()) => {
|
|
1668
1710
|
if (isOfTypeLanguage(languageString)) {
|
|
1669
1711
|
return languageString;
|
|
1670
1712
|
}
|
|
@@ -1678,7 +1720,7 @@ const checkForLanguage = (languageString = currentLanguage) => {
|
|
|
1678
1720
|
* @param {string} lang=fi - "fi" | "sv" | "en"
|
|
1679
1721
|
* @default {string} "fi"
|
|
1680
1722
|
*/
|
|
1681
|
-
const getLanguage = (languageString =
|
|
1723
|
+
const getLanguage = (languageString = getCurrentLanguage()) => checkForLanguage(languageString);
|
|
1682
1724
|
/**
|
|
1683
1725
|
* Returns the current language and locale
|
|
1684
1726
|
* If language is not fi|sv|en it will default to "fi"
|
|
@@ -1696,21 +1738,34 @@ const getLocale = (lang) => {
|
|
|
1696
1738
|
}
|
|
1697
1739
|
throw new Error(`Locale for "${lang}" not found`);
|
|
1698
1740
|
};
|
|
1741
|
+
const sanitizeString = (string) => {
|
|
1742
|
+
const argIsString = typeof string === "string";
|
|
1743
|
+
if (argIsString) {
|
|
1744
|
+
try {
|
|
1745
|
+
return JSON.parse(convertHtmlQuotes(string));
|
|
1746
|
+
}
|
|
1747
|
+
catch (e) {
|
|
1748
|
+
console.log("getLocaleString received a string, that didnt parse to json object", string, e);
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
return string;
|
|
1752
|
+
};
|
|
1699
1753
|
/**
|
|
1700
1754
|
* Returns the current string / object from a given translation object
|
|
1701
1755
|
* If language is not fi|sv|en it will default to "fi"
|
|
1702
1756
|
* 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"}
|
|
1757
|
+
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
|
|
1704
1758
|
* @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
|
|
1705
1759
|
* @default {object} {locale: "fi-FI", money: "€"}
|
|
1706
1760
|
* @returns {(string|Object)} given example contains {fi:"something"} and langua===fi this will return "something"
|
|
1707
1761
|
*/
|
|
1708
1762
|
const getLocaleString = (langObject, languageOverride) => {
|
|
1763
|
+
const obj = sanitizeString(langObject);
|
|
1709
1764
|
if (languageOverride) {
|
|
1710
|
-
return
|
|
1765
|
+
return obj[checkForLanguage(languageOverride)];
|
|
1711
1766
|
}
|
|
1712
1767
|
else {
|
|
1713
|
-
return
|
|
1768
|
+
return obj[getLanguage()];
|
|
1714
1769
|
}
|
|
1715
1770
|
};
|
|
1716
1771
|
|
|
@@ -1740,6 +1795,7 @@ let DuetAlert$1 = class extends HTMLElement {
|
|
|
1740
1795
|
/**
|
|
1741
1796
|
* Property to change languageDefaults on the component.
|
|
1742
1797
|
* normally you would handle these strings on an application level and override @accessibleLabel when needed
|
|
1798
|
+
* @default {fi: "Sulje viesti", sv: "Stäng meddelandet", en: "Close the message"}
|
|
1743
1799
|
*/
|
|
1744
1800
|
this.accessibleLabelDefaults = {
|
|
1745
1801
|
fi: "Sulje viesti",
|
|
@@ -1819,7 +1875,7 @@ let DuetAlert$1 = class extends HTMLElement {
|
|
|
1819
1875
|
static get style() { return duetAlertCss; }
|
|
1820
1876
|
};
|
|
1821
1877
|
|
|
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}";
|
|
1878
|
+
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
1879
|
|
|
1824
1880
|
let DuetBadge$1 = class extends HTMLElement {
|
|
1825
1881
|
constructor() {
|
|
@@ -2258,7 +2314,7 @@ let DuetButton$1 = class extends HTMLElement {
|
|
|
2258
2314
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
2259
2315
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
2260
2316
|
*/
|
|
2261
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults
|
|
2317
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
2262
2318
|
/**
|
|
2263
2319
|
* Icon to display to the left of the button content.
|
|
2264
2320
|
* This is ignored/overridden when button is used as an external link.
|
|
@@ -2485,46 +2541,7 @@ const isQuestionKey = (e) => e.key === "?";
|
|
|
2485
2541
|
const isEnterKey = (e) => e.key === "Enter" || e.keyCode === 13;
|
|
2486
2542
|
const isKeyboardClick = (e) => isEnterKey(e) || isSpaceKey(e);
|
|
2487
2543
|
|
|
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)}";
|
|
2544
|
+
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-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
2545
|
|
|
2529
2546
|
let DuetCard$1 = class extends HTMLElement {
|
|
2530
2547
|
constructor() {
|
|
@@ -2607,7 +2624,7 @@ let DuetCard$1 = class extends HTMLElement {
|
|
|
2607
2624
|
this.hasFooter = !!this.element.querySelector("[slot='footer']");
|
|
2608
2625
|
}
|
|
2609
2626
|
renderHeading() {
|
|
2610
|
-
const HeadingTag = sanitizeString(this.headingLevel);
|
|
2627
|
+
const HeadingTag = sanitizeString$1(this.headingLevel);
|
|
2611
2628
|
const headingProps = this.collapsible
|
|
2612
2629
|
? {
|
|
2613
2630
|
role: "button",
|
|
@@ -2618,7 +2635,7 @@ let DuetCard$1 = class extends HTMLElement {
|
|
|
2618
2635
|
onKeyDown: this.handleKeyDown,
|
|
2619
2636
|
}
|
|
2620
2637
|
: {};
|
|
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: "
|
|
2638
|
+
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.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" }, this.secondaryHeading)));
|
|
2622
2639
|
}
|
|
2623
2640
|
/**
|
|
2624
2641
|
* Sets focus on the specified `duet-card`. Use this method instead of the global
|
|
@@ -3055,7 +3072,7 @@ const findCheckedOption = (el, tagName) => {
|
|
|
3055
3072
|
return options.find((o) => o.checked === true);
|
|
3056
3073
|
};
|
|
3057
3074
|
|
|
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}";
|
|
3075
|
+
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
3076
|
|
|
3060
3077
|
let DuetChoiceGroup$1 = class extends HTMLElement {
|
|
3061
3078
|
constructor() {
|
|
@@ -3771,7 +3788,7 @@ let DuetCollapsible$1 = class extends HTMLElement {
|
|
|
3771
3788
|
* Always the last one in the class.
|
|
3772
3789
|
*/
|
|
3773
3790
|
render() {
|
|
3774
|
-
const HeadingTagName = this.headingLevel ? sanitizeString(this.headingLevel) : "div";
|
|
3791
|
+
const HeadingTagName = this.headingLevel ? sanitizeString$1(this.headingLevel) : "div";
|
|
3775
3792
|
return (h$1(Host, { class: { "duet-m-0": this.margin === "none" } }, h$1(HeadingTagName, { class: {
|
|
3776
3793
|
"duet-collapsible-heading": true,
|
|
3777
3794
|
"duet-theme-turva": this.theme === "turva",
|
|
@@ -4355,7 +4372,7 @@ const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, theme, langu
|
|
|
4355
4372
|
} }))))))))));
|
|
4356
4373
|
};
|
|
4357
4374
|
|
|
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}";
|
|
4375
|
+
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
4376
|
|
|
4360
4377
|
let DuetDatePicker$1 = class extends HTMLElement {
|
|
4361
4378
|
constructor() {
|
|
@@ -4397,11 +4414,27 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4397
4414
|
* Controls the margin of the component.
|
|
4398
4415
|
*/
|
|
4399
4416
|
this.margin = "auto";
|
|
4417
|
+
/**
|
|
4418
|
+
* The currently active language. This setting changes the month/year/day
|
|
4419
|
+
* names and button labels as well as all screen reader labels.
|
|
4420
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
4421
|
+
* @default "fi"
|
|
4422
|
+
*/
|
|
4423
|
+
this.language = getLanguage();
|
|
4424
|
+
/**
|
|
4425
|
+
* Placeholder defaults
|
|
4426
|
+
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
4427
|
+
*/
|
|
4428
|
+
this.placeholderDefaults = {
|
|
4429
|
+
fi: "pp.kk.vvvv",
|
|
4430
|
+
en: "dd.mm.yyyy",
|
|
4431
|
+
sv: "dd.mm.åååå",
|
|
4432
|
+
};
|
|
4400
4433
|
/**
|
|
4401
4434
|
* Hint text to display before the user types into the date picker input.
|
|
4402
4435
|
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
4403
4436
|
*/
|
|
4404
|
-
this.placeholder = getLocaleString(
|
|
4437
|
+
this.placeholder = getLocaleString(this.placeholderDefaults, this.language);
|
|
4405
4438
|
/**
|
|
4406
4439
|
* If form input field has a placeholder text, and user types anything (causing the text to dissapear),
|
|
4407
4440
|
* 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 +4445,6 @@ let DuetDatePicker$1 = class extends HTMLElement {
|
|
|
4412
4445
|
* interact with the input, and conveys its inactive state to assistive technologies.
|
|
4413
4446
|
*/
|
|
4414
4447
|
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
4448
|
/**
|
|
4423
4449
|
* Display the date picker input in error state along with an error message.
|
|
4424
4450
|
*/
|
|
@@ -4951,7 +4977,7 @@ let DuetFooter$1 = class extends HTMLElement {
|
|
|
4951
4977
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
4952
4978
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
4953
4979
|
*/
|
|
4954
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
4980
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
|
|
4955
4981
|
/**
|
|
4956
4982
|
* Component event handling.
|
|
4957
4983
|
*/
|
|
@@ -5414,10 +5440,26 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5414
5440
|
*/
|
|
5415
5441
|
this.language = getLanguage();
|
|
5416
5442
|
/**
|
|
5417
|
-
*
|
|
5418
|
-
*
|
|
5443
|
+
* Default strings for accessibleI18nLabels
|
|
5444
|
+
* @default {
|
|
5445
|
+
fi: {
|
|
5446
|
+
skipLabel: "Siirry pääsisältöön",
|
|
5447
|
+
changeLanguage: "Vaihda kieltä",
|
|
5448
|
+
activeLanguage: "Suomi valittuna",
|
|
5449
|
+
},
|
|
5450
|
+
sv: {
|
|
5451
|
+
skipLabel: "Hoppa till huvudinnehåll",
|
|
5452
|
+
changeLanguage: "Ändra Språk",
|
|
5453
|
+
activeLanguage: "Svenska valt",
|
|
5454
|
+
},
|
|
5455
|
+
en: {
|
|
5456
|
+
skipLabel: "Skip to main content",
|
|
5457
|
+
changeLanguage: "Change language",
|
|
5458
|
+
activeLanguage: "English selected",
|
|
5459
|
+
},
|
|
5460
|
+
}
|
|
5419
5461
|
*/
|
|
5420
|
-
this.
|
|
5462
|
+
this.accessibleI18nLabelsDefaults = {
|
|
5421
5463
|
fi: {
|
|
5422
5464
|
skipLabel: "Siirry pääsisältöön",
|
|
5423
5465
|
changeLanguage: "Vaihda kieltä",
|
|
@@ -5454,7 +5496,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5454
5496
|
},
|
|
5455
5497
|
}
|
|
5456
5498
|
*/
|
|
5457
|
-
this.accessibleI18nLabels = getLocaleString(this.
|
|
5499
|
+
this.accessibleI18nLabels = getLocaleString(this.accessibleI18nLabelsDefaults);
|
|
5458
5500
|
/**
|
|
5459
5501
|
* Property to change accessibleLabelExternal defaults on the component.
|
|
5460
5502
|
* normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
|
|
@@ -5470,7 +5512,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5470
5512
|
* Property to change accessibleLabel defaults on the component.
|
|
5471
5513
|
* normally you would handle these strings on an application level and override @accessibleLabel when needed
|
|
5472
5514
|
*/
|
|
5473
|
-
this.
|
|
5515
|
+
this.accessibleLabelDefaults = {
|
|
5474
5516
|
fi: "Valikko",
|
|
5475
5517
|
sv: "Meny",
|
|
5476
5518
|
en: "Menu",
|
|
@@ -5484,7 +5526,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5484
5526
|
en: "Menu",
|
|
5485
5527
|
}
|
|
5486
5528
|
*/
|
|
5487
|
-
this.accessibleLabel = getLocaleString(this.
|
|
5529
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults);
|
|
5488
5530
|
/**
|
|
5489
5531
|
* URL that the logo link points to.
|
|
5490
5532
|
*/
|
|
@@ -5763,7 +5805,7 @@ let DuetHeader$1 = class extends HTMLElement {
|
|
|
5763
5805
|
static get style() { return duetHeaderCss; }
|
|
5764
5806
|
};
|
|
5765
5807
|
|
|
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}";
|
|
5808
|
+
const duetHeadingCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}.duet-heading{margin-bottom:16px !important;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;letter-spacing:-0.01rem;word-break:break-word}@media (min-width: 36em){.duet-heading{margin-bottom:20px !important}}.duet-heading.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:italic;font-weight:700;color:#171c3a}.duet-heading.duet-heading-border{padding-bottom:20px;border-bottom:1px solid #e1e3e6}.duet-heading.duet-heading-hyphenate{-webkit-hyphens:auto;hyphens:auto}.duet-heading.h0{font-size:9.4vw}.duet-heading.h0.duet-p-0{padding:0 !important}.duet-heading.h0.duet-m-0{margin:0 !important}@media (max-width: 31.914893617rem){.duet-heading.h0{font-size:3rem}}@media (min-width: 47.8723404255rem){.duet-heading.h0{font-size:4.5rem}}@media (max-width: 22.5em){.duet-heading.h0{font-size:2.25rem}}.duet-heading.h1{font-size:7vw}.duet-heading.h1.duet-p-0{padding:0 !important}.duet-heading.h1.duet-m-0{margin:0 !important}@media (max-width: 32.1428571429rem){.duet-heading.h1{font-size:2.25rem}}@media (min-width: 42.8571428571rem){.duet-heading.h1{font-size:3rem}}@media (max-width: 22.5em){.duet-heading.h1{font-size:1.5rem}}.duet-heading.h2{font-size:5.8vw}.duet-heading.h2.duet-p-0{padding:0 !important}.duet-heading.h2.duet-m-0{margin:0 !important}@media (max-width: 25.8620689655rem){.duet-heading.h2{font-size:1.5rem}}@media (min-width: 38.7931034483rem){.duet-heading.h2{font-size:2.25rem}}@media (max-width: 22.5em){.duet-heading.h2{font-size:1.375rem}}.duet-heading.h3{margin-bottom:12px !important;font-size:4.2vw}.duet-heading.h3.duet-p-0{padding:0 !important}.duet-heading.h3.duet-m-0{margin:0 !important}@media (max-width: 29.7619047619rem){.duet-heading.h3{font-size:1.25rem}}@media (min-width: 35.7142857143rem){.duet-heading.h3{font-size:1.5rem}}.duet-heading.h3.duet-theme-turva{font-style:normal}.duet-heading.h3.duet-heading-border{padding-bottom:20px}.duet-heading.h4{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}.duet-heading.h4.duet-p-0{padding:0 !important}.duet-heading.h4.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h4{font-size:1.1rem}}@media (min-width: 31.25rem){.duet-heading.h4{font-size:1.25rem}}.duet-heading.h4.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h4.duet-heading-border{padding-bottom:20px}.duet-heading.h5{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}.duet-heading.h5.duet-p-0{padding:0 !important}.duet-heading.h5.duet-m-0{margin:0 !important}@media (max-width: 27.5rem){.duet-heading.h5{font-size:1.1rem}}@media (min-width: 28.4090909091rem){.duet-heading.h5{font-size:1.1363636364rem}}.duet-heading.h5.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h5.duet-heading-border{padding-bottom:16px}.duet-heading.h6{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}.duet-heading.h6.duet-p-0{padding:0 !important}.duet-heading.h6.duet-m-0{margin:0 !important}.duet-heading.h6.duet-theme-turva{font-style:normal;font-weight:700}.duet-heading.h6.duet-heading-border{padding-bottom:16px}.duet-heading.duet-semibold,.duet-heading.duet-theme-turva.duet-semibold{font-style:normal !important;font-weight:600 !important}";
|
|
5767
5809
|
|
|
5768
5810
|
let DuetHeading$1 = class extends HTMLElement {
|
|
5769
5811
|
constructor() {
|
|
@@ -5812,7 +5854,7 @@ let DuetHeading$1 = class extends HTMLElement {
|
|
|
5812
5854
|
* Always the last one in the class.
|
|
5813
5855
|
*/
|
|
5814
5856
|
render() {
|
|
5815
|
-
const TagName = sanitizeString(this.level);
|
|
5857
|
+
const TagName = sanitizeString$1(this.level);
|
|
5816
5858
|
const color = getColorByName(this.color);
|
|
5817
5859
|
return (h$1(TagName, { class: {
|
|
5818
5860
|
"duet-heading": true,
|
|
@@ -5899,15 +5941,15 @@ let DuetHero$1 = class extends HTMLElement {
|
|
|
5899
5941
|
*/
|
|
5900
5942
|
this.language = getLanguage();
|
|
5901
5943
|
/**
|
|
5902
|
-
*
|
|
5903
|
-
*
|
|
5944
|
+
* Defaults for accessibleLabelExternal
|
|
5945
|
+
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
5904
5946
|
*/
|
|
5905
5947
|
this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
|
|
5906
5948
|
/**
|
|
5907
5949
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
5908
5950
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
5909
5951
|
*/
|
|
5910
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults
|
|
5952
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
5911
5953
|
/**
|
|
5912
5954
|
* URL that the button links to.
|
|
5913
5955
|
*/
|
|
@@ -6073,9 +6115,9 @@ const isValid = (elm) => {
|
|
|
6073
6115
|
};
|
|
6074
6116
|
const buildIconUrl = (iconName) => {
|
|
6075
6117
|
// under normal operations the Icons should always be loaded from the CDN
|
|
6076
|
-
const cdnURI = `https://cdn.duetds.com/api/icons/${"2.2.
|
|
6118
|
+
const cdnURI = `https://cdn.duetds.com/api/icons/${"2.2.1"}/lib/assets/${iconName}.svg`;
|
|
6077
6119
|
// however for vizdiffing and local development / testing we need to be able to access the raw images
|
|
6078
|
-
const localURI = `http://
|
|
6120
|
+
const localURI = `http://0.0.0.0:3334/icons/lib/assets/${iconName}.svg`;
|
|
6079
6121
|
const host = window.location.hostname;
|
|
6080
6122
|
const re = /(localhost|loca\.lt|127\.0\.0\.1|0\.0\.0\.0)/i;
|
|
6081
6123
|
if (host.match(re)) {
|
|
@@ -6487,7 +6529,7 @@ let DuetInput$1 = class extends HTMLElement {
|
|
|
6487
6529
|
static get style() { return duetInputCss; }
|
|
6488
6530
|
};
|
|
6489
6531
|
|
|
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}";
|
|
6532
|
+
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
6533
|
|
|
6492
6534
|
let DuetLabel$1 = class extends HTMLElement {
|
|
6493
6535
|
constructor() {
|
|
@@ -6625,8 +6667,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6625
6667
|
*/
|
|
6626
6668
|
this.language = getLanguage();
|
|
6627
6669
|
/**
|
|
6628
|
-
*
|
|
6629
|
-
* normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
|
|
6670
|
+
* Defaults for accessibleLabelExternal
|
|
6630
6671
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
6631
6672
|
*/
|
|
6632
6673
|
this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
|
|
@@ -6634,7 +6675,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6634
6675
|
* Adds accessible label for tooltip that is shown in external link (url & external have both been set)
|
|
6635
6676
|
* @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
|
|
6636
6677
|
*/
|
|
6637
|
-
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults
|
|
6678
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
|
|
6638
6679
|
/**
|
|
6639
6680
|
* Theme of the button.
|
|
6640
6681
|
*/
|
|
@@ -6670,7 +6711,7 @@ let DuetLink$1 = class extends HTMLElement {
|
|
|
6670
6711
|
"duet-link": true,
|
|
6671
6712
|
"duet-link-is-external": this.external,
|
|
6672
6713
|
"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,
|
|
6714
|
+
}, 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
6715
|
}
|
|
6675
6716
|
static get delegatesFocus() { return true; }
|
|
6676
6717
|
static get style() { return duetLinkCss; }
|
|
@@ -6945,10 +6986,10 @@ let DuetModal$1 = class extends HTMLElement {
|
|
|
6945
6986
|
*/
|
|
6946
6987
|
this.language = getLanguage();
|
|
6947
6988
|
/**
|
|
6948
|
-
*
|
|
6949
|
-
*
|
|
6989
|
+
* Defaults for accessibleCloseLabel
|
|
6990
|
+
* @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
|
|
6950
6991
|
*/
|
|
6951
|
-
this.
|
|
6992
|
+
this.accessibleCloseLabelDefaults = {
|
|
6952
6993
|
fi: "Sulje ikkuna",
|
|
6953
6994
|
sv: "Stäng fönstret",
|
|
6954
6995
|
en: "Close the dialog",
|
|
@@ -6959,7 +7000,7 @@ let DuetModal$1 = class extends HTMLElement {
|
|
|
6959
7000
|
* Swedish translation for this property is “Stäng fönstret”.
|
|
6960
7001
|
* @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
|
|
6961
7002
|
*/
|
|
6962
|
-
this.accessibleCloseLabel = getLocaleString(this.
|
|
7003
|
+
this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefaults, this.language);
|
|
6963
7004
|
/**
|
|
6964
7005
|
* Size of the modal window.
|
|
6965
7006
|
*/
|
|
@@ -7224,8 +7265,8 @@ let DuetNotificationDrawer$1 = class extends HTMLElement {
|
|
|
7224
7265
|
*/
|
|
7225
7266
|
this.language = getLanguage();
|
|
7226
7267
|
/**
|
|
7227
|
-
*
|
|
7228
|
-
*
|
|
7268
|
+
* Defaults for accessibleLabelNotifications
|
|
7269
|
+
* @default {en: "No notifications", fi: "Ei ilmoituksia", sv: "Inga notifikationer"}
|
|
7229
7270
|
*/
|
|
7230
7271
|
this.accessibleLabelNotificationsDefaults = {
|
|
7231
7272
|
en: "No notifications",
|
|
@@ -7236,7 +7277,7 @@ let DuetNotificationDrawer$1 = class extends HTMLElement {
|
|
|
7236
7277
|
* Adds accessible label for tooltip that is shown for notifications
|
|
7237
7278
|
* @default {en: "No notifications", fi: "Ei ilmoituksia", sv: "Inga notifikationer"}
|
|
7238
7279
|
*/
|
|
7239
|
-
this.accessibleLabelNotifications = getLocaleString(this.accessibleLabelNotificationsDefaults
|
|
7280
|
+
this.accessibleLabelNotifications = getLocaleString(this.accessibleLabelNotificationsDefaults);
|
|
7240
7281
|
/**
|
|
7241
7282
|
* Show a badge that indicates something has changed.
|
|
7242
7283
|
*/
|
|
@@ -7389,37 +7430,52 @@ let DuetNumberInput$1 = class extends HTMLElement {
|
|
|
7389
7430
|
*/
|
|
7390
7431
|
this.unit = getLocale(this.language).money;
|
|
7391
7432
|
/**
|
|
7392
|
-
*
|
|
7393
|
-
* The string {current} is replaced with the current amount.
|
|
7433
|
+
* Defaults for accessibleLive
|
|
7394
7434
|
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
7395
7435
|
*/
|
|
7396
|
-
this.
|
|
7436
|
+
this.accessibleLiveDefaults = {
|
|
7397
7437
|
fi: "{current} euroa valittuna",
|
|
7398
7438
|
en: "{current} euros selected",
|
|
7399
7439
|
sv: "{current} euro valt",
|
|
7400
|
-
}
|
|
7440
|
+
};
|
|
7441
|
+
/**
|
|
7442
|
+
* Format of message used to announce current amount when switching between amounts.
|
|
7443
|
+
* The string {current} is replaced with the current amount.
|
|
7444
|
+
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
7445
|
+
*/
|
|
7446
|
+
this.accessibleLive = getLocaleString(this.accessibleLiveDefaults, this.language);
|
|
7401
7447
|
/**
|
|
7402
7448
|
* 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
7449
|
*/
|
|
7404
7450
|
this.accessibleLiveEnabled = true;
|
|
7405
7451
|
/**
|
|
7406
|
-
*
|
|
7452
|
+
* Defaults for accessibleAdd
|
|
7407
7453
|
* @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
|
|
7408
7454
|
*/
|
|
7409
|
-
this.
|
|
7455
|
+
this.accessibleAddDefaults = {
|
|
7410
7456
|
fi: "Lisää summaan",
|
|
7411
7457
|
en: "Add to the amount",
|
|
7412
7458
|
sv: "Lägg till beloppet",
|
|
7413
|
-
}
|
|
7459
|
+
};
|
|
7414
7460
|
/**
|
|
7415
|
-
* Accessible label for the
|
|
7461
|
+
* Accessible label for the add button that is read for screen reader users.
|
|
7462
|
+
* @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
|
|
7463
|
+
*/
|
|
7464
|
+
this.accessibleAdd = getLocaleString(this.accessibleAddDefaults, this.language);
|
|
7465
|
+
/**
|
|
7466
|
+
* Defaults for accessibleSubtract
|
|
7416
7467
|
* @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
|
|
7417
7468
|
*/
|
|
7418
|
-
this.
|
|
7469
|
+
this.accessibleSubtractDefaults = {
|
|
7419
7470
|
fi: "Vähennä summasta",
|
|
7420
7471
|
en: "Subtract from the amount",
|
|
7421
7472
|
sv: "Dra från beloppet",
|
|
7422
|
-
}
|
|
7473
|
+
};
|
|
7474
|
+
/**
|
|
7475
|
+
* Accessible label for the subtract button that is read for screen reader users.
|
|
7476
|
+
* @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
|
|
7477
|
+
*/
|
|
7478
|
+
this.accessibleSubtract = getLocaleString(this.accessibleSubtractDefaults, this.language);
|
|
7423
7479
|
/**
|
|
7424
7480
|
* Theme of the input.
|
|
7425
7481
|
*/
|
|
@@ -7437,14 +7493,19 @@ let DuetNumberInput$1 = class extends HTMLElement {
|
|
|
7437
7493
|
*/
|
|
7438
7494
|
this.min = 0;
|
|
7439
7495
|
/**
|
|
7440
|
-
*
|
|
7496
|
+
* Defaults for Label
|
|
7441
7497
|
* @default {fi: "Etiketti", en: "Label", sv: "Märka"}
|
|
7442
7498
|
*/
|
|
7443
|
-
this.
|
|
7499
|
+
this.labelDefaults = {
|
|
7444
7500
|
fi: "Nimilappu",
|
|
7445
7501
|
en: "Label",
|
|
7446
7502
|
sv: "Etikett",
|
|
7447
|
-
}
|
|
7503
|
+
};
|
|
7504
|
+
/**
|
|
7505
|
+
* Label for the number input.
|
|
7506
|
+
* @default {fi: "Etiketti", en: "Label", sv: "Märka"}
|
|
7507
|
+
*/
|
|
7508
|
+
this.label = getLocaleString(this.labelDefaults, this.language);
|
|
7448
7509
|
/**
|
|
7449
7510
|
* Visually hide the label, but still show it to screen readers.
|
|
7450
7511
|
*/
|
|
@@ -8689,14 +8750,19 @@ let DuetTabGroup$1 = class extends HTMLElement {
|
|
|
8689
8750
|
*/
|
|
8690
8751
|
this.language = getLanguage();
|
|
8691
8752
|
/**
|
|
8692
|
-
*
|
|
8753
|
+
* Defaults for Label
|
|
8693
8754
|
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
8694
8755
|
*/
|
|
8695
|
-
this.
|
|
8756
|
+
this.labelDefaults = {
|
|
8696
8757
|
fi: "Valitse",
|
|
8697
8758
|
en: "Choose",
|
|
8698
8759
|
sv: "Välj",
|
|
8699
|
-
}
|
|
8760
|
+
};
|
|
8761
|
+
/**
|
|
8762
|
+
* Label for the select element which gets shown on mobile.
|
|
8763
|
+
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
8764
|
+
*/
|
|
8765
|
+
this.label = getLocaleString(this.labelDefaults, this.language);
|
|
8700
8766
|
/**
|
|
8701
8767
|
* Determines whether the label for the select element shown on mobile is visually hidden.
|
|
8702
8768
|
*/
|
|
@@ -9256,25 +9322,35 @@ let DuetTooltip$1 = class extends HTMLElement {
|
|
|
9256
9322
|
*/
|
|
9257
9323
|
this.language = getLanguage();
|
|
9258
9324
|
/**
|
|
9259
|
-
*
|
|
9260
|
-
* readers. This property is always required to create an accessible interface!
|
|
9325
|
+
* Default language strings for the accessibleLabel
|
|
9261
9326
|
* @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
|
|
9262
9327
|
*/
|
|
9263
|
-
this.
|
|
9328
|
+
this.accessibleLabelDefault = {
|
|
9264
9329
|
fi: "Näytä lisätietoja",
|
|
9265
9330
|
en: "Show more information",
|
|
9266
9331
|
sv: "Visa mer tilläggsuppgifter",
|
|
9267
|
-
}
|
|
9332
|
+
};
|
|
9268
9333
|
/**
|
|
9269
|
-
* Adds accessible label for the
|
|
9270
|
-
* readers. This property is always required to create an
|
|
9334
|
+
* Adds accessible label for the info icon that is only shown for screen
|
|
9335
|
+
* readers. This property is always required to create an accessible interface!
|
|
9336
|
+
* @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
|
|
9337
|
+
*/
|
|
9338
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefault, this.language);
|
|
9339
|
+
/**
|
|
9340
|
+
* Default language strings for the accessibleCloseLabel
|
|
9271
9341
|
* @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
|
|
9272
9342
|
*/
|
|
9273
|
-
this.
|
|
9343
|
+
this.accessibleCloseLabelDefault = {
|
|
9274
9344
|
fi: "Sulje lisätiedot",
|
|
9275
9345
|
en: "Close details",
|
|
9276
9346
|
sv: "Stäng tilläggsuppgifter",
|
|
9277
|
-
}
|
|
9347
|
+
};
|
|
9348
|
+
/**
|
|
9349
|
+
* Adds accessible label for the close icon that is only shown for screen
|
|
9350
|
+
* readers. This property is always required to create an accessibly interface!
|
|
9351
|
+
* @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
|
|
9352
|
+
*/
|
|
9353
|
+
this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefault, this.language);
|
|
9278
9354
|
/**
|
|
9279
9355
|
* Label of the tooltip. If used, replaces the accessibleLabel option.
|
|
9280
9356
|
*/
|
|
@@ -9469,25 +9545,35 @@ let DuetTray$1 = class extends HTMLElement {
|
|
|
9469
9545
|
*/
|
|
9470
9546
|
this.language = getLanguage();
|
|
9471
9547
|
/**
|
|
9472
|
-
*
|
|
9473
|
-
* close toggle. Not visible for normal users.
|
|
9548
|
+
* Defaults for accessibleCloseLabel
|
|
9474
9549
|
* @default {fi: "Sulje", en: "Close", sv: "Stänga"}
|
|
9475
9550
|
*/
|
|
9476
|
-
this.
|
|
9551
|
+
this.accessibleCloseLabelDefaults = {
|
|
9477
9552
|
fi: "Sulje",
|
|
9478
9553
|
en: "Close",
|
|
9479
9554
|
sv: "Stäng",
|
|
9480
|
-
}
|
|
9555
|
+
};
|
|
9481
9556
|
/**
|
|
9482
9557
|
* Accessible label that is shown for screen reader users in the expandable
|
|
9483
|
-
*
|
|
9558
|
+
* close toggle. Not visible for normal users.
|
|
9559
|
+
* @default {fi: "Sulje", en: "Close", sv: "Stänga"}
|
|
9560
|
+
*/
|
|
9561
|
+
this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefaults, this.language);
|
|
9562
|
+
/**
|
|
9563
|
+
* Defaults for accessibleOpenLabel
|
|
9484
9564
|
* @default {fi: "Avaa", en: "Open", sv: "Öppen"}
|
|
9485
9565
|
*/
|
|
9486
|
-
this.
|
|
9566
|
+
this.accessibleOpenLabelDefaults = {
|
|
9487
9567
|
fi: "Avaa",
|
|
9488
9568
|
en: "Open",
|
|
9489
9569
|
sv: "Öppna",
|
|
9490
|
-
}
|
|
9570
|
+
};
|
|
9571
|
+
/**
|
|
9572
|
+
* Accessible label that is shown for screen reader users in the expandable
|
|
9573
|
+
* open toggle. Not visible for normal users.
|
|
9574
|
+
* @default {fi: "Avaa", en: "Open", sv: "Öppen"}
|
|
9575
|
+
*/
|
|
9576
|
+
this.accessibleOpenLabel = getLocaleString(this.accessibleOpenLabelDefaults, this.language);
|
|
9491
9577
|
/**
|
|
9492
9578
|
* Theme of the info panel.
|
|
9493
9579
|
*/
|
|
@@ -9558,861 +9644,6 @@ let DuetTray$1 = class extends HTMLElement {
|
|
|
9558
9644
|
static get style() { return duetTrayCss; }
|
|
9559
9645
|
};
|
|
9560
9646
|
|
|
9561
|
-
const formatBytes = (bytes, decimals = 2) => {
|
|
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 = [
|
|
9618
|
-
{
|
|
9619
|
-
type: "default",
|
|
9620
|
-
system_message: "unknown error",
|
|
9621
|
-
message: {
|
|
9622
|
-
fi: "",
|
|
9623
|
-
sv: "",
|
|
9624
|
-
en: "An unknown error occured, please try again"
|
|
9625
|
-
}
|
|
9626
|
-
},
|
|
9627
|
-
{
|
|
9628
|
-
type: "400",
|
|
9629
|
-
system_message: "Bad Request: The server could not understand the request due to invalid syntax.",
|
|
9630
|
-
message: {
|
|
9631
|
-
fi: "",
|
|
9632
|
-
sv: "",
|
|
9633
|
-
en: "The server rejected your file"
|
|
9634
|
-
}
|
|
9635
|
-
},
|
|
9636
|
-
{
|
|
9637
|
-
type: "401",
|
|
9638
|
-
system_message: "Not Authenticated: The client must authenticate itself to get the requested response..",
|
|
9639
|
-
message: {
|
|
9640
|
-
fi: "",
|
|
9641
|
-
sv: "",
|
|
9642
|
-
en: "You need to be logged in to upload files"
|
|
9643
|
-
}
|
|
9644
|
-
},
|
|
9645
|
-
{
|
|
9646
|
-
type: "403",
|
|
9647
|
-
system_message: "No Access: The client does not have access rights to the content;",
|
|
9648
|
-
message: {
|
|
9649
|
-
fi: "",
|
|
9650
|
-
sv: "",
|
|
9651
|
-
en: "You do not have the correct access rights to upload files"
|
|
9652
|
-
}
|
|
9653
|
-
},
|
|
9654
|
-
{
|
|
9655
|
-
type: "413",
|
|
9656
|
-
system_message: "Payload too large",
|
|
9657
|
-
message: {
|
|
9658
|
-
fi: "",
|
|
9659
|
-
sv: "",
|
|
9660
|
-
en: "The file was to large for the server to handle"
|
|
9661
|
-
}
|
|
9662
|
-
},
|
|
9663
|
-
{
|
|
9664
|
-
type: "415",
|
|
9665
|
-
system_message: "Unsupported media type",
|
|
9666
|
-
message: {
|
|
9667
|
-
fi: "",
|
|
9668
|
-
sv: "",
|
|
9669
|
-
en: "The server rejected the file because it had the wrong type"
|
|
9670
|
-
}
|
|
9671
|
-
},
|
|
9672
|
-
{
|
|
9673
|
-
type: "429",
|
|
9674
|
-
system_message: "Too many request from same address",
|
|
9675
|
-
message: {
|
|
9676
|
-
fi: "",
|
|
9677
|
-
sv: "",
|
|
9678
|
-
en: "The server has received to many request from you, please try again later"
|
|
9679
|
-
}
|
|
9680
|
-
},
|
|
9681
|
-
{
|
|
9682
|
-
type: "500",
|
|
9683
|
-
system_message: "Internal Server Error",
|
|
9684
|
-
message: {
|
|
9685
|
-
fi: "",
|
|
9686
|
-
sv: "",
|
|
9687
|
-
en: "The server reported an unknown error and the upload failed"
|
|
9688
|
-
}
|
|
9689
|
-
},
|
|
9690
|
-
{
|
|
9691
|
-
type: "duet-upload-100",
|
|
9692
|
-
system_message: "File extension not allowed",
|
|
9693
|
-
message: {
|
|
9694
|
-
fi: "",
|
|
9695
|
-
sv: "",
|
|
9696
|
-
en: "You cannot upload files with that extension"
|
|
9697
|
-
}
|
|
9698
|
-
},
|
|
9699
|
-
{
|
|
9700
|
-
type: "duet-upload-001",
|
|
9701
|
-
system_message: "File transfer failed",
|
|
9702
|
-
message: {
|
|
9703
|
-
fi: "",
|
|
9704
|
-
sv: "",
|
|
9705
|
-
en: "Your connection to the server was interrupted, try again"
|
|
9706
|
-
}
|
|
9707
|
-
},
|
|
9708
|
-
{
|
|
9709
|
-
type: "duet-upload-101",
|
|
9710
|
-
system_message: "File mimetype not allowed",
|
|
9711
|
-
message: {
|
|
9712
|
-
fi: "",
|
|
9713
|
-
sv: "",
|
|
9714
|
-
en: "You cannot upload files of that type"
|
|
9715
|
-
}
|
|
9716
|
-
},
|
|
9717
|
-
{
|
|
9718
|
-
type: "duet-upload-201",
|
|
9719
|
-
system_message: "File is too large",
|
|
9720
|
-
message: {
|
|
9721
|
-
fi: "",
|
|
9722
|
-
sv: "",
|
|
9723
|
-
en: "The file is larger than permitted"
|
|
9724
|
-
}
|
|
9725
|
-
},
|
|
9726
|
-
{
|
|
9727
|
-
type: "duet-upload-202",
|
|
9728
|
-
system_message: "The combined size of all files is too large",
|
|
9729
|
-
message: {
|
|
9730
|
-
fi: "",
|
|
9731
|
-
sv: "",
|
|
9732
|
-
en: "You have reached the maximum combined filesize"
|
|
9733
|
-
}
|
|
9734
|
-
},
|
|
9735
|
-
{
|
|
9736
|
-
type: "duet-upload-301",
|
|
9737
|
-
system_message: "The maximum file limit has been reached",
|
|
9738
|
-
message: {
|
|
9739
|
-
fi: "Liitteiden maksimimäärä saavutettu.",
|
|
9740
|
-
sv: "",
|
|
9741
|
-
en: "Maximum number of attachments reached."
|
|
9742
|
-
}
|
|
9743
|
-
}
|
|
9744
|
-
];
|
|
9745
|
-
|
|
9746
|
-
const getError = (code) => {
|
|
9747
|
-
let error = {
|
|
9748
|
-
type: undefined,
|
|
9749
|
-
system_message: undefined,
|
|
9750
|
-
message: undefined,
|
|
9751
|
-
};
|
|
9752
|
-
error = errorcodes.filter(errorItem => {
|
|
9753
|
-
return errorItem.type === code;
|
|
9754
|
-
})[0];
|
|
9755
|
-
if (!error) {
|
|
9756
|
-
error = errorcodes.filter(errorItem => {
|
|
9757
|
-
return errorItem.type === "default";
|
|
9758
|
-
})[0];
|
|
9759
|
-
}
|
|
9760
|
-
return error;
|
|
9761
|
-
};
|
|
9762
|
-
|
|
9763
|
-
const validateFileExtension = (name, allowedExtensions) => {
|
|
9764
|
-
if (!allowedExtensions) {
|
|
9765
|
-
return true;
|
|
9766
|
-
}
|
|
9767
|
-
const ext = name.split(".");
|
|
9768
|
-
const validExtension = allowedExtensions.split(",");
|
|
9769
|
-
const extension = ext[ext.length - 1];
|
|
9770
|
-
return validExtension.includes(extension);
|
|
9771
|
-
};
|
|
9772
|
-
const validateFileMime = (type, allowedMimetypes) => {
|
|
9773
|
-
if (!allowedMimetypes || !type) {
|
|
9774
|
-
return true;
|
|
9775
|
-
}
|
|
9776
|
-
const validMimeTypes = allowedMimetypes.split(",");
|
|
9777
|
-
let valid = false;
|
|
9778
|
-
validMimeTypes.forEach(mimeType => {
|
|
9779
|
-
const allowedTypes = mimeType.split("/");
|
|
9780
|
-
const fileType = type.split("/");
|
|
9781
|
-
if (allowedTypes[0] === fileType[0] && (allowedTypes[1] === fileType[1] || allowedTypes[1] === "*")) {
|
|
9782
|
-
valid = true;
|
|
9783
|
-
}
|
|
9784
|
-
});
|
|
9785
|
-
return valid;
|
|
9786
|
-
};
|
|
9787
|
-
const validateFileSize = (size, maxBytes) => {
|
|
9788
|
-
if (!maxBytes || !size) {
|
|
9789
|
-
return true;
|
|
9790
|
-
}
|
|
9791
|
-
return maxBytes >= size;
|
|
9792
|
-
};
|
|
9793
|
-
const validateFile = (item, validators) => {
|
|
9794
|
-
const { allowedMimetypes, allowedExtensions, maxBytes } = validators;
|
|
9795
|
-
let valid = false;
|
|
9796
|
-
let errorMessage = getError("default");
|
|
9797
|
-
if (item) {
|
|
9798
|
-
const { name, type, size } = item;
|
|
9799
|
-
const mime = validateFileMime(type, allowedMimetypes);
|
|
9800
|
-
const ext = validateFileExtension(name, allowedExtensions);
|
|
9801
|
-
const bytes = validateFileSize(size, maxBytes);
|
|
9802
|
-
if (!mime) {
|
|
9803
|
-
errorMessage = getError("duet-upload-101");
|
|
9804
|
-
}
|
|
9805
|
-
if (!ext) {
|
|
9806
|
-
errorMessage = getError("duet-upload-100");
|
|
9807
|
-
}
|
|
9808
|
-
if (!bytes) {
|
|
9809
|
-
errorMessage = getError("duet-upload-201");
|
|
9810
|
-
}
|
|
9811
|
-
valid = mime && ext && bytes;
|
|
9812
|
-
}
|
|
9813
|
-
else {
|
|
9814
|
-
valid = false;
|
|
9815
|
-
}
|
|
9816
|
-
return {
|
|
9817
|
-
valid,
|
|
9818
|
-
errorMessage: valid ? undefined : getLocaleString(errorMessage.message),
|
|
9819
|
-
errorSystem: valid ? undefined : errorMessage.system_message,
|
|
9820
|
-
errorType: valid ? undefined : errorMessage.type,
|
|
9821
|
-
};
|
|
9822
|
-
};
|
|
9823
|
-
const validateTotalSizeIsAboveMax = (filelist, maxTotalBytes) => {
|
|
9824
|
-
let total = 0;
|
|
9825
|
-
if (maxTotalBytes) {
|
|
9826
|
-
filelist.forEach(item => {
|
|
9827
|
-
if (item.valid && item.size) {
|
|
9828
|
-
total += item.size;
|
|
9829
|
-
}
|
|
9830
|
-
});
|
|
9831
|
-
if (total < maxTotalBytes) {
|
|
9832
|
-
return true;
|
|
9833
|
-
}
|
|
9834
|
-
}
|
|
9835
|
-
return false;
|
|
9836
|
-
};
|
|
9837
|
-
const validateTotalAmountIsAboveMax = (filelist, maxFiles) => {
|
|
9838
|
-
let total = 0;
|
|
9839
|
-
if (maxFiles) {
|
|
9840
|
-
filelist.forEach(item => {
|
|
9841
|
-
if (item.valid) {
|
|
9842
|
-
total++;
|
|
9843
|
-
}
|
|
9844
|
-
});
|
|
9845
|
-
if (total > maxFiles) {
|
|
9846
|
-
return true;
|
|
9847
|
-
}
|
|
9848
|
-
}
|
|
9849
|
-
return false;
|
|
9850
|
-
};
|
|
9851
|
-
|
|
9852
|
-
const makeXhrRequest = (payload, options, onFailure, onSuccess, onProgress) => {
|
|
9853
|
-
const { type, xhr, uri, argument, headers } = Object.assign({
|
|
9854
|
-
type: "POST",
|
|
9855
|
-
argument: null,
|
|
9856
|
-
headers: null,
|
|
9857
|
-
}, options);
|
|
9858
|
-
xhr.open(type, `${uri}${argument || ""}`, true);
|
|
9859
|
-
const { data, name } = payload;
|
|
9860
|
-
// headers must be added after open
|
|
9861
|
-
if (headers) {
|
|
9862
|
-
Object.keys(headers).forEach(key => {
|
|
9863
|
-
xhr.setRequestHeader(key, headers[key]);
|
|
9864
|
-
});
|
|
9865
|
-
}
|
|
9866
|
-
if (type === "POST") {
|
|
9867
|
-
xhr.onreadystatechange = () => {
|
|
9868
|
-
// Call a function when the state changes.
|
|
9869
|
-
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 200 && xhr.status < 300) {
|
|
9870
|
-
// Request finished without errors
|
|
9871
|
-
onSuccess(xhr, name, xhr.status);
|
|
9872
|
-
}
|
|
9873
|
-
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 300 && xhr.status < 999) {
|
|
9874
|
-
// Request finished with errors
|
|
9875
|
-
onFailure(xhr, name, xhr.status);
|
|
9876
|
-
}
|
|
9877
|
-
};
|
|
9878
|
-
onProgress(name);
|
|
9879
|
-
}
|
|
9880
|
-
xhr.send(data);
|
|
9881
|
-
return xhr;
|
|
9882
|
-
};
|
|
9883
|
-
|
|
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}:host li{list-style:none}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload li{list-style:none}.duet-upload-file-errors{padding:20px 0;color:#de2362}.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;background-color:#f3f9fc}.duet-upload-file{display:flex;flex-flow:column;justify-content:center;min-height:50px;border-bottom:1px solid #e1e3e6}.duet-upload-file:first-of-type:not(.duet-upload-file-errors){border-top:1px solid #e1e3e6}.duet-upload-file-container{display:flex;place-items:center;width:100%}.duet-upload-file-link{display:flex;flex-grow:2;place-items:center}.duet-upload-file-link-error{flex-direction:column;place-items:flex-start}.duet-upload-file-link duet-button{position:relative;top:6px}.duet-upload-file-actions{display:flex;transform:scale(0.8)}.duet-upload-file-progress{}.duet-upload-file-progress .progress-bar{position:relative;display:block;width:100%;height:15px;background-color:#f3f9fc;border-radius:0;box-shadow:none}.duet-upload-file-progress .progress-bar>span{display:block;text-indent:-9999px;background-color:#0077b3;border-radius:0}.duet-upload-file-progress progress[value]{display:flex;width:100%;height:15px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-upload-file-progress progress[value]::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}.duet-upload-file-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-upload-file-progress progress[value] ::-moz-progress-bar{background-color:#f3f9fc}";
|
|
9885
|
-
|
|
9886
|
-
let DuetUpload$1 = class extends HTMLElement {
|
|
9887
|
-
constructor() {
|
|
9888
|
-
super();
|
|
9889
|
-
this.__registerHost();
|
|
9890
|
-
attachShadow(this);
|
|
9891
|
-
this.duetChange = createEvent$2(this, "duetChange", 3);
|
|
9892
|
-
this.duetBlur = createEvent$2(this, "duetBlur", 7);
|
|
9893
|
-
this.duetFocus = createEvent$2(this, "duetFocus", 7);
|
|
9894
|
-
this.duetDone = createEvent$2(this, "duetDone", 3);
|
|
9895
|
-
this.duetState = createEvent$2(this, "duetState", 3);
|
|
9896
|
-
this.duetDelete = createEvent$2(this, "duetDelete", 3);
|
|
9897
|
-
this.duetCancel = createEvent$2(this, "duetCancel", 3);
|
|
9898
|
-
this.duetProgress = createEvent$2(this, "duetProgress", 3);
|
|
9899
|
-
this.duetUpload = createEvent$2(this, "duetUpload", 3);
|
|
9900
|
-
/**
|
|
9901
|
-
* Own Properties
|
|
9902
|
-
*/
|
|
9903
|
-
this.buttonId = createID("DuetButton");
|
|
9904
|
-
this.labelId = createID("DuetLabel");
|
|
9905
|
-
this.uploadId = createID("DuetUpload");
|
|
9906
|
-
this.filesInProgress = new Map();
|
|
9907
|
-
this.fileMaxReached = false;
|
|
9908
|
-
this.bytesMaxReached = false;
|
|
9909
|
-
/**
|
|
9910
|
-
* State() variables
|
|
9911
|
-
*/
|
|
9912
|
-
this.tick = Date.now();
|
|
9913
|
-
/**
|
|
9914
|
-
* If external is set to true, the upload component will not actually upload the files, but only keep states
|
|
9915
|
-
* it will be up to you to handle the upload and return progress information to the upload-component
|
|
9916
|
-
*/
|
|
9917
|
-
this.external = false;
|
|
9918
|
-
/**
|
|
9919
|
-
* Property to change descriptionDefaults defaults on the component.
|
|
9920
|
-
* normally you would handle these strings on an application level and override @label when needed
|
|
9921
|
-
*/
|
|
9922
|
-
this.buttonLabelDefaults = {
|
|
9923
|
-
fi: "Lisää liite",
|
|
9924
|
-
sv: "Lägg till en bilaga",
|
|
9925
|
-
en: "Add an attachment",
|
|
9926
|
-
};
|
|
9927
|
-
/**
|
|
9928
|
-
* Label of button
|
|
9929
|
-
* @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment" }
|
|
9930
|
-
*/
|
|
9931
|
-
this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
|
|
9932
|
-
/**
|
|
9933
|
-
* accessible Label of button
|
|
9934
|
-
*/
|
|
9935
|
-
this.accessibleButtonLabel = undefined;
|
|
9936
|
-
/**
|
|
9937
|
-
* Theme of the input.
|
|
9938
|
-
*/
|
|
9939
|
-
this.theme = "";
|
|
9940
|
-
/**
|
|
9941
|
-
* Makes the input component disabled. This prevents users from being able to
|
|
9942
|
-
* interact with the upload component, and conveys its inactive state to assistive technologies.
|
|
9943
|
-
*/
|
|
9944
|
-
this.disabled = false;
|
|
9945
|
-
/**
|
|
9946
|
-
* Controls the margin of the component.
|
|
9947
|
-
*/
|
|
9948
|
-
this.margin = "auto";
|
|
9949
|
-
/**
|
|
9950
|
-
* Set whether the input is required or not. Please note that this is necessary for
|
|
9951
|
-
* accessible inputs when the user is required to fill them. When using this property
|
|
9952
|
-
* you need to also set “novalidate” attribute to your form element to prevent
|
|
9953
|
-
* browser from displaying its own validation errors.
|
|
9954
|
-
*/
|
|
9955
|
-
this.required = false;
|
|
9956
|
-
/**
|
|
9957
|
-
* Map of string that contain list of uploaded files.
|
|
9958
|
-
*/
|
|
9959
|
-
this.files = new Map();
|
|
9960
|
-
/**
|
|
9961
|
-
* Property to read if filelist contains errors or not
|
|
9962
|
-
*/
|
|
9963
|
-
this.valid = !this.required;
|
|
9964
|
-
/**
|
|
9965
|
-
* Property to change labelDefaults defaults on the component.
|
|
9966
|
-
* normally you would handle these strings on an application level and override @label when needed
|
|
9967
|
-
*/
|
|
9968
|
-
this.labelDefaults = {
|
|
9969
|
-
fi: "Lisää liite",
|
|
9970
|
-
sv: "Lägg till en bilaga",
|
|
9971
|
-
en: "Add attachments",
|
|
9972
|
-
};
|
|
9973
|
-
/**
|
|
9974
|
-
* Label for the input.
|
|
9975
|
-
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
9976
|
-
*/
|
|
9977
|
-
this.label = getLocaleString(this.labelDefaults);
|
|
9978
|
-
/**
|
|
9979
|
-
* Property to change descriptionDefaults defaults on the component.
|
|
9980
|
-
* normally you would handle these strings on an application level and override @label when needed
|
|
9981
|
-
*/
|
|
9982
|
-
this.descriptionDefaults = {
|
|
9983
|
-
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.",
|
|
9984
|
-
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.",
|
|
9985
|
-
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.",
|
|
9986
|
-
};
|
|
9987
|
-
/**
|
|
9988
|
-
* Description for the upload component.
|
|
9989
|
-
* @default ...
|
|
9990
|
-
*/
|
|
9991
|
-
this.description = getLocaleString(this.descriptionDefaults);
|
|
9992
|
-
/**
|
|
9993
|
-
* Defaults for the filelist's empty state.
|
|
9994
|
-
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
9995
|
-
*/
|
|
9996
|
-
this.fileListEmptyDefaults = {
|
|
9997
|
-
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
9998
|
-
sv: "Inga filer har lagts till ännu.",
|
|
9999
|
-
en: "No files added yet.",
|
|
10000
|
-
};
|
|
10001
|
-
/**
|
|
10002
|
-
* Label for the filelist's empty state.
|
|
10003
|
-
* @default { fi: "Ei vielä lisättyjä tiedostoja.",sv: "Inga filer har lagts till ännu.",en: "No files added yet."}
|
|
10004
|
-
*/
|
|
10005
|
-
this.fileListEmpty = getLocaleString(this.fileListEmptyDefaults);
|
|
10006
|
-
/**
|
|
10007
|
-
* Display the input in error state along with an error message.
|
|
10008
|
-
*/
|
|
10009
|
-
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
|
-
/**
|
|
10026
|
-
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
10027
|
-
*/
|
|
10028
|
-
this.maxBytes = 200000000;
|
|
10029
|
-
/**
|
|
10030
|
-
* Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded.
|
|
10031
|
-
*/
|
|
10032
|
-
this.maxBytesTotal = undefined;
|
|
10033
|
-
/**
|
|
10034
|
-
* Use maxFiles to specify the maximum amount of files that can be uploaded
|
|
10035
|
-
*/
|
|
10036
|
-
this.maxFiles = 99;
|
|
10037
|
-
/**
|
|
10038
|
-
* A string of commaseperated file type values that are allowed
|
|
10039
|
-
* @example: .pdf,.doc,.docx
|
|
10040
|
-
*/
|
|
10041
|
-
this.allowedExtensions = "all";
|
|
10042
|
-
/**
|
|
10043
|
-
* A string of commaseperated mime type values that are allowed
|
|
10044
|
-
* @example: image/*,application/msword,
|
|
10045
|
-
*/
|
|
10046
|
-
this.allowedMimetypes = "*";
|
|
10047
|
-
/**
|
|
10048
|
-
* Use multiple to allow the user to select multiple files when uploading
|
|
10049
|
-
*/
|
|
10050
|
-
this.multiple = true;
|
|
10051
|
-
/**
|
|
10052
|
-
* Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,
|
|
10053
|
-
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
10054
|
-
*/
|
|
10055
|
-
this.limitSelection = false;
|
|
10056
|
-
/**
|
|
10057
|
-
* Private functions
|
|
10058
|
-
*/
|
|
10059
|
-
this.kick = () => (this.tick = Date.now()); // will trigger re-render
|
|
10060
|
-
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
10061
|
-
this.updateValueInMap = (item, key, value, kick = true) => {
|
|
10062
|
-
const fileItem = this.files.get(item);
|
|
10063
|
-
fileItem[key] = value;
|
|
10064
|
-
this.files.set(item, fileItem);
|
|
10065
|
-
if (kick) {
|
|
10066
|
-
this.kick();
|
|
10067
|
-
}
|
|
10068
|
-
};
|
|
10069
|
-
this.updateProgress = (ev, name) => {
|
|
10070
|
-
if (ev.lengthComputable) {
|
|
10071
|
-
const percentComplete = (ev.loaded / ev.total) * 100;
|
|
10072
|
-
this.updateValueInMap(name, "progress", percentComplete);
|
|
10073
|
-
this.onProgress(name, percentComplete, ev);
|
|
10074
|
-
}
|
|
10075
|
-
else {
|
|
10076
|
-
console.log("cant read progress");
|
|
10077
|
-
}
|
|
10078
|
-
};
|
|
10079
|
-
this.trackProgress = (name, remove = false) => {
|
|
10080
|
-
if (remove) {
|
|
10081
|
-
this.filesInProgress.delete(name);
|
|
10082
|
-
}
|
|
10083
|
-
else {
|
|
10084
|
-
this.filesInProgress.set(name, "inprogress");
|
|
10085
|
-
}
|
|
10086
|
-
if (this.filesInProgress.size === 0) {
|
|
10087
|
-
this.onDone();
|
|
10088
|
-
}
|
|
10089
|
-
};
|
|
10090
|
-
this.getFilesAsArray = () => {
|
|
10091
|
-
const filesInQueue = [];
|
|
10092
|
-
const filesInError = [];
|
|
10093
|
-
this.files.forEach(value => {
|
|
10094
|
-
if (value.valid && !value.deleted) {
|
|
10095
|
-
filesInQueue.push(value);
|
|
10096
|
-
}
|
|
10097
|
-
else if (!value.valid && !value.deleted) {
|
|
10098
|
-
filesInError.push(value);
|
|
10099
|
-
}
|
|
10100
|
-
});
|
|
10101
|
-
return { valid: filesInQueue, invalid: filesInError };
|
|
10102
|
-
};
|
|
10103
|
-
this.resetFormFields = () => {
|
|
10104
|
-
/**
|
|
10105
|
-
* You cannot modify a FileList, nor remove single items from it
|
|
10106
|
-
* This completely removes all items in the FileList
|
|
10107
|
-
* We reset the form fields to always be able to re-upload files
|
|
10108
|
-
* and because we handle all uploads and states internally in the component (not relying on native form elements)
|
|
10109
|
-
*/
|
|
10110
|
-
this.nativeInput.value = "";
|
|
10111
|
-
};
|
|
10112
|
-
this.getI18nError = (errorCode) => {
|
|
10113
|
-
const errorFromJson = getError(errorCode);
|
|
10114
|
-
const i18String = getLocaleString(errorFromJson.message);
|
|
10115
|
-
if (i18String === "" || !i18String) {
|
|
10116
|
-
return errorFromJson.system_message;
|
|
10117
|
-
}
|
|
10118
|
-
else {
|
|
10119
|
-
return i18String;
|
|
10120
|
-
}
|
|
10121
|
-
};
|
|
10122
|
-
/**
|
|
10123
|
-
* Eventlisteners for the XHR requests
|
|
10124
|
-
*/
|
|
10125
|
-
this.transferComplete = name => {
|
|
10126
|
-
this.updateValueInMap(name, "progress", 100, false);
|
|
10127
|
-
this.trackProgress(name, true);
|
|
10128
|
-
};
|
|
10129
|
-
this.transferDone = (xhr, name, status) => {
|
|
10130
|
-
this.updateValueInMap(name, "status", status, false);
|
|
10131
|
-
try {
|
|
10132
|
-
const response = JSON.parse(xhr.response);
|
|
10133
|
-
this.updateValueInMap(name, "url", response.url);
|
|
10134
|
-
}
|
|
10135
|
-
catch (e) {
|
|
10136
|
-
this.updateValueInMap(name, "url", null);
|
|
10137
|
-
console.error("Server did not respond with expected response {url: string}");
|
|
10138
|
-
}
|
|
10139
|
-
return;
|
|
10140
|
-
};
|
|
10141
|
-
this.transferDoneWithFailure = (xhr, name, status) => {
|
|
10142
|
-
try {
|
|
10143
|
-
const { error } = JSON.parse(xhr.response);
|
|
10144
|
-
this.updateValueInMap(name, "error", { message: error.message, type: error.type });
|
|
10145
|
-
}
|
|
10146
|
-
catch (e) {
|
|
10147
|
-
console.error("Server did not respond with expected response error:{message: string, type: int}");
|
|
10148
|
-
this.updateValueInMap(name, "error", { type: status });
|
|
10149
|
-
}
|
|
10150
|
-
};
|
|
10151
|
-
this.transferFailed = name => {
|
|
10152
|
-
this.updateValueInMap(name, "error", getError("duet-upload-001"));
|
|
10153
|
-
};
|
|
10154
|
-
this.transferCanceled = name => {
|
|
10155
|
-
this.files.delete(name);
|
|
10156
|
-
this.validateTotals(name);
|
|
10157
|
-
this.kick();
|
|
10158
|
-
};
|
|
10159
|
-
this.validateTotals = (name) => {
|
|
10160
|
-
const isTotalSizeOverMaxSize = validateTotalSizeIsAboveMax(this.files, this.maxBytesTotal);
|
|
10161
|
-
const isTotalFileAmountAboveMax = validateTotalAmountIsAboveMax(this.files, this.maxFiles);
|
|
10162
|
-
if (isTotalSizeOverMaxSize && name) {
|
|
10163
|
-
this.updateValueInMap(name, "error", getError("duet-upload-202"), false);
|
|
10164
|
-
}
|
|
10165
|
-
if (isTotalFileAmountAboveMax && name) {
|
|
10166
|
-
this.updateValueInMap(name, "error", getError("duet-upload-301"), false);
|
|
10167
|
-
}
|
|
10168
|
-
this.bytesMaxReached = isTotalSizeOverMaxSize;
|
|
10169
|
-
this.fileMaxReached = isTotalFileAmountAboveMax;
|
|
10170
|
-
return {
|
|
10171
|
-
bytesMaxReached: isTotalSizeOverMaxSize,
|
|
10172
|
-
fileMaxReached: isTotalFileAmountAboveMax,
|
|
10173
|
-
};
|
|
10174
|
-
};
|
|
10175
|
-
this.onDelete = (key, ev) => {
|
|
10176
|
-
const deletedItem = this.files.get(key);
|
|
10177
|
-
this.files.delete(key);
|
|
10178
|
-
this.validateTotals();
|
|
10179
|
-
this.kick();
|
|
10180
|
-
if (!this.external) {
|
|
10181
|
-
this.makeXHRDeleteRequest(deletedItem);
|
|
10182
|
-
}
|
|
10183
|
-
this.resetFormFields();
|
|
10184
|
-
this.duetDelete.emit({
|
|
10185
|
-
originalEvent: ev,
|
|
10186
|
-
data: { deletion: deletedItem },
|
|
10187
|
-
component: "duet-upload",
|
|
10188
|
-
});
|
|
10189
|
-
};
|
|
10190
|
-
this.onCancel = (key, ev) => {
|
|
10191
|
-
const cancelledItem = this.files.get(key);
|
|
10192
|
-
this.files.delete(key);
|
|
10193
|
-
if (!this.external) {
|
|
10194
|
-
const { xhr } = cancelledItem;
|
|
10195
|
-
xhr.abort();
|
|
10196
|
-
}
|
|
10197
|
-
else {
|
|
10198
|
-
this.kick();
|
|
10199
|
-
}
|
|
10200
|
-
this.resetFormFields();
|
|
10201
|
-
this.duetCancel.emit({
|
|
10202
|
-
originalEvent: ev,
|
|
10203
|
-
data: { cancelled: cancelledItem },
|
|
10204
|
-
component: "duet-upload",
|
|
10205
|
-
});
|
|
10206
|
-
};
|
|
10207
|
-
this.onUpload = (ev) => {
|
|
10208
|
-
this.duetUpload.emit({
|
|
10209
|
-
originalEvent: ev,
|
|
10210
|
-
component: "duet-upload",
|
|
10211
|
-
});
|
|
10212
|
-
};
|
|
10213
|
-
this.onBlur = (ev) => {
|
|
10214
|
-
this.duetBlur.emit({
|
|
10215
|
-
originalEvent: ev,
|
|
10216
|
-
component: "duet-upload",
|
|
10217
|
-
});
|
|
10218
|
-
};
|
|
10219
|
-
this.onProgress = (key, percentComplete, ev) => {
|
|
10220
|
-
this.duetChange.emit({
|
|
10221
|
-
originalEvent: ev,
|
|
10222
|
-
data: {
|
|
10223
|
-
key,
|
|
10224
|
-
percentComplete,
|
|
10225
|
-
},
|
|
10226
|
-
component: "duet-upload",
|
|
10227
|
-
});
|
|
10228
|
-
};
|
|
10229
|
-
this.onFocus = (ev) => {
|
|
10230
|
-
this.duetFocus.emit({
|
|
10231
|
-
originalEvent: ev,
|
|
10232
|
-
component: "duet-upload",
|
|
10233
|
-
});
|
|
10234
|
-
};
|
|
10235
|
-
this.onDone = () => {
|
|
10236
|
-
this.duetDone.emit({
|
|
10237
|
-
component: "duet-upload",
|
|
10238
|
-
data: { files: this.files },
|
|
10239
|
-
});
|
|
10240
|
-
};
|
|
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
|
-
}
|
|
10249
|
-
watchValidHandler(newValue, oldValue) {
|
|
10250
|
-
if (newValue !== oldValue) {
|
|
10251
|
-
this.kick();
|
|
10252
|
-
}
|
|
10253
|
-
}
|
|
10254
|
-
/**
|
|
10255
|
-
* Component lifecycle events.
|
|
10256
|
-
*/
|
|
10257
|
-
componentWillLoad() {
|
|
10258
|
-
inheritGlobalTheme(this);
|
|
10259
|
-
}
|
|
10260
|
-
componentWillRender() {
|
|
10261
|
-
const { invalid, valid } = this.getFilesAsArray();
|
|
10262
|
-
const oldValid = this.valid;
|
|
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
|
-
}
|
|
10271
|
-
}
|
|
10272
|
-
/**
|
|
10273
|
-
* XHR request utilities
|
|
10274
|
-
*/
|
|
10275
|
-
makeXHRPostRequest(data) {
|
|
10276
|
-
const xhr = new XMLHttpRequest();
|
|
10277
|
-
const name = data.get("name");
|
|
10278
|
-
xhr.upload.addEventListener("progress", ev => {
|
|
10279
|
-
this.updateProgress(ev, name);
|
|
10280
|
-
});
|
|
10281
|
-
xhr.upload.addEventListener("load", () => {
|
|
10282
|
-
this.transferComplete(name);
|
|
10283
|
-
});
|
|
10284
|
-
xhr.upload.addEventListener("error", () => {
|
|
10285
|
-
this.transferFailed(name);
|
|
10286
|
-
});
|
|
10287
|
-
xhr.upload.addEventListener("abort", () => {
|
|
10288
|
-
this.transferCanceled(name);
|
|
10289
|
-
});
|
|
10290
|
-
return makeXhrRequest({ data, name }, { type: "POST", uri: this.uri, xhr, argument: null, headers: null }, this.transferDoneWithFailure, this.transferDone, this.trackProgress);
|
|
10291
|
-
}
|
|
10292
|
-
makeXHRDeleteRequest(data) {
|
|
10293
|
-
const { uid, item } = data;
|
|
10294
|
-
const xhr = new XMLHttpRequest();
|
|
10295
|
-
// don't present server issues to user on deletes, just remove them from the visible list
|
|
10296
|
-
return makeXhrRequest({ data: null, name }, {
|
|
10297
|
-
type: "DELETE",
|
|
10298
|
-
xhr,
|
|
10299
|
-
uri: this.uri,
|
|
10300
|
-
arguments: `?key=${uid}&name=${item.name}`,
|
|
10301
|
-
headers: {
|
|
10302
|
-
"x-fileuid": uid,
|
|
10303
|
-
"x-filename": item.name,
|
|
10304
|
-
},
|
|
10305
|
-
}, this.transferDoneWithFailure, this.transferDone, this.trackProgress);
|
|
10306
|
-
}
|
|
10307
|
-
/**
|
|
10308
|
-
* Component event handling.
|
|
10309
|
-
*/
|
|
10310
|
-
async onChange(ev) {
|
|
10311
|
-
var _a;
|
|
10312
|
-
const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
|
|
10313
|
-
// FileList is a nice array like structure but
|
|
10314
|
-
// to ensure uniqueness of files we use a mapping structure and
|
|
10315
|
-
// key to the name (makes it easier to delete)
|
|
10316
|
-
if (selectedFiles) {
|
|
10317
|
-
for (const item of selectedFiles) {
|
|
10318
|
-
const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
|
|
10319
|
-
maxBytes: this.maxBytes,
|
|
10320
|
-
allowedExtensions: this.allowedExtensions,
|
|
10321
|
-
allowedMimetypes: this.allowedMimetypes,
|
|
10322
|
-
});
|
|
10323
|
-
const uid = this.genHashName();
|
|
10324
|
-
const fileListItem = {
|
|
10325
|
-
uid,
|
|
10326
|
-
item: item,
|
|
10327
|
-
size: item.size,
|
|
10328
|
-
valid,
|
|
10329
|
-
error: {
|
|
10330
|
-
type: valid ? undefined : errorType,
|
|
10331
|
-
message: valid ? undefined : errorMessage,
|
|
10332
|
-
system_message: valid ? undefined : errorSystem,
|
|
10333
|
-
},
|
|
10334
|
-
progress: 0,
|
|
10335
|
-
deleted: false,
|
|
10336
|
-
xhr: false,
|
|
10337
|
-
url: false,
|
|
10338
|
-
};
|
|
10339
|
-
this.files.set(item.name, fileListItem);
|
|
10340
|
-
// validate that we haven't hit any maxfiles or maxbytes limits before we upload
|
|
10341
|
-
const { bytesMaxReached, fileMaxReached } = this.validateTotals(item.name);
|
|
10342
|
-
if (bytesMaxReached) {
|
|
10343
|
-
// in case one of the global maxes have been reached, invalidate the file
|
|
10344
|
-
this.updateValueInMap(item.name, "valid", false, false);
|
|
10345
|
-
}
|
|
10346
|
-
else if (fileMaxReached) {
|
|
10347
|
-
// in case one of the global maxes have been reached, invalidate the file
|
|
10348
|
-
this.updateValueInMap(item.name, "valid", false, false);
|
|
10349
|
-
}
|
|
10350
|
-
else if (valid && !this.external) {
|
|
10351
|
-
// if all is well AND external file upload handling has not been set, start upload
|
|
10352
|
-
const data = new FormData();
|
|
10353
|
-
data.append("file", item);
|
|
10354
|
-
data.append("uid", uid);
|
|
10355
|
-
data.append("name", item.name);
|
|
10356
|
-
data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size }));
|
|
10357
|
-
fileListItem.xhr = await this.makeXHRPostRequest(data);
|
|
10358
|
-
}
|
|
10359
|
-
// kick the stat to force update
|
|
10360
|
-
this.kick();
|
|
10361
|
-
}
|
|
10362
|
-
}
|
|
10363
|
-
// reset the form, so that a user may upload a file again (with the same name)
|
|
10364
|
-
this.resetFormFields();
|
|
10365
|
-
this.duetChange.emit({
|
|
10366
|
-
originalEvent: ev,
|
|
10367
|
-
data: { files: this.files },
|
|
10368
|
-
component: "duet-upload",
|
|
10369
|
-
});
|
|
10370
|
-
}
|
|
10371
|
-
/**
|
|
10372
|
-
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
10373
|
-
* `input.focus()`.
|
|
10374
|
-
*/
|
|
10375
|
-
async setFocus(options) {
|
|
10376
|
-
if (this.nativeInput) {
|
|
10377
|
-
this.nativeInput.focus(options);
|
|
10378
|
-
}
|
|
10379
|
-
return;
|
|
10380
|
-
}
|
|
10381
|
-
/**
|
|
10382
|
-
* Get list of files, divided in errors and valid sections
|
|
10383
|
-
*/
|
|
10384
|
-
async getFiles() {
|
|
10385
|
-
if (!this.files || this.files.size === 0) {
|
|
10386
|
-
return false;
|
|
10387
|
-
}
|
|
10388
|
-
return this.getFilesAsArray();
|
|
10389
|
-
}
|
|
10390
|
-
/**
|
|
10391
|
-
* render() function
|
|
10392
|
-
* Always the last one in the class.
|
|
10393
|
-
*/
|
|
10394
|
-
render() {
|
|
10395
|
-
const identifier = this.identifier || this.uploadId;
|
|
10396
|
-
let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
|
|
10397
|
-
caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
|
|
10398
|
-
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: {
|
|
10400
|
-
"duet-upload-filelist-empty": !this.files.size,
|
|
10401
|
-
"duet-upload-filelist": true,
|
|
10402
|
-
"duet-upload-filelist-filled": this.files.size,
|
|
10403
|
-
}, id: this.labelId, for: identifier }, !this.files.size && this.fileListEmpty), !!this.files.size && h$1("slot", { name: "fileheader" }), h$1(DuetUploadFileList, { data: this.getFilesAsArray(), onDelete: this.onDelete, onCancel: this.onCancel, getError: this.getI18nError }, h$1("li", null, "testing something")), !!this.files.size && h$1("slot", { name: "filefooter" }), h$1("duet-spacer", { size: "large" }), 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 && this.getI18nError("duet-upload-301"), this.bytesMaxReached && this.getI18nError("duet-upload-202"))), h$1("duet-spacer", { size: "medium" }), h$1("duet-visually-hidden", null, h$1("input", { ref: input => {
|
|
10404
|
-
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: {
|
|
10406
|
-
"duet-upload": true,
|
|
10407
|
-
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
10408
|
-
}
|
|
10409
|
-
get element() { return this; }
|
|
10410
|
-
static get watchers() { return {
|
|
10411
|
-
"valid": ["watchValidHandler"]
|
|
10412
|
-
}; }
|
|
10413
|
-
static get style() { return duetUploadCss; }
|
|
10414
|
-
};
|
|
10415
|
-
|
|
10416
9647
|
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
9648
|
|
|
10418
9649
|
let DuetVisuallyHidden$1 = class extends HTMLElement {
|
|
@@ -10432,38 +9663,38 @@ let DuetVisuallyHidden$1 = class extends HTMLElement {
|
|
|
10432
9663
|
};
|
|
10433
9664
|
|
|
10434
9665
|
globalScripts();
|
|
10435
|
-
const DuetAlert = /*@__PURE__*/proxyCustomElement(DuetAlert$1, [1,"duet-alert",{"theme":[1025],"accessibleLabelDefaults":[
|
|
9666
|
+
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
9667
|
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":[
|
|
9668
|
+
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
9669
|
const DuetCaption = /*@__PURE__*/proxyCustomElement(DuetCaption$1, [1,"duet-caption",{"theme":[1025],"margin":[1],"selected":[4],"size":[1]}]);
|
|
10439
9670
|
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
9671
|
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":[
|
|
9672
|
+
const DuetChoice = /*@__PURE__*/proxyCustomElement(DuetChoice$1, [6,"duet-choice",{"theme":[1025],"label":[1],"accessibleLabelInfoButtonDefaults":[1,"accessible-label-info-default"],"accessibleLabelInfoButton":[1,"accessible-label-info-button"],"accessibleActiveDescendant":[1,"accessible-active-descendant"],"accessibleControls":[1,"accessible-controls"],"accessibleOwns":[1,"accessible-owns"],"accessibleDescribedBy":[1,"accessible-described-by"],"caption":[1],"value":[1537],"type":[513],"name":[1],"checked":[1540],"collapsible":[4],"margin":[1],"icon":[1],"expand":[4],"padding":[1],"identifier":[1],"groupDirection":[1,"group-direction"],"groupDisabled":[4,"group-disabled"],"groupResponsive":[4,"group-responsive"],"disabled":[516],"required":[4],"isHovering":[32],"isInfoOpen":[32],"isBlurred":[32]},[[2,"blur","handleHostBlur"],[2,"keydown","handleHostKeyDown"],[2,"keyup","handleHostKeyUp"]]]);
|
|
10442
9673
|
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
9674
|
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
9675
|
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],"
|
|
9676
|
+
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
9677
|
const DuetDivider = /*@__PURE__*/proxyCustomElement(DuetDivider$1, [1,"duet-divider",{"theme":[1025],"margin":[1]}]);
|
|
10447
9678
|
const DuetEmptyState = /*@__PURE__*/proxyCustomElement(DuetEmptyState$1, [1,"duet-empty-state",{"theme":[1025],"icon":[1],"size":[1]}]);
|
|
10448
9679
|
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":[
|
|
9680
|
+
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]}]);
|
|
10450
9681
|
const DuetGrid = /*@__PURE__*/proxyCustomElement(DuetGrid$1, [2,"duet-grid",{"responsive":[4],"breakpoint":[1],"direction":[1],"alignment":[1],"distribution":[1],"mobile":[1]}]);
|
|
10451
9682
|
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],"
|
|
9683
|
+
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"]]]);
|
|
10453
9684
|
const DuetHeading = /*@__PURE__*/proxyCustomElement(DuetHeading$1, [1,"duet-heading",{"level":[513],"margin":[1],"visualLevel":[1,"visual-level"],"border":[4],"weight":[1],"color":[1],"theme":[1025],"hyphenate":[4]}]);
|
|
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":[
|
|
9685
|
+
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
9686
|
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
9687
|
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
9688
|
const DuetLabel = /*@__PURE__*/proxyCustomElement(DuetLabel$1, [6,"duet-label",{"theme":[1025],"for":[1],"margin":[1],"size":[1]}]);
|
|
10458
9689
|
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":[
|
|
9690
|
+
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
9691
|
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
9692
|
const DuetListItem = /*@__PURE__*/proxyCustomElement(DuetListItem$1, [1,"duet-list-item"]);
|
|
10462
9693
|
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],"
|
|
9694
|
+
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
9695
|
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]}]);
|
|
9696
|
+
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"]]]);
|
|
9697
|
+
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]}]);
|
|
10467
9698
|
const DuetParagraph = /*@__PURE__*/proxyCustomElement(DuetParagraph$1, [1,"duet-paragraph",{"theme":[1025],"margin":[1],"size":[1],"variation":[1],"color":[1]}]);
|
|
10468
9699
|
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
9700
|
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]}]);
|
|
@@ -10474,13 +9705,12 @@ const DuetSpinner = /*@__PURE__*/proxyCustomElement(DuetSpinner$1, [1,"duet-spin
|
|
|
10474
9705
|
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
9706
|
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
9707
|
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]}]);
|
|
9708
|
+
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
9709
|
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
9710
|
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
9711
|
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":[16],"buttonLabel":[1,"button-label"],"accessibleButtonLabel":[1,"accessible-button-label"],"theme":[1025],"disabled":[516],"identifier":[1],"margin":[1],"required":[4],"files":[1040],"valid":[1540],"labelDefaults":[16],"label":[1],"descriptionDefaults":[16],"description":[1],"fileListEmptyDefaults":[16],"fileListEmpty":[1,"file-list-empty"],"error":[1],"labelHidden":[4,"label-hidden"],"name":[1],"capture":[8],"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]}]);
|
|
9712
|
+
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"]]]);
|
|
9713
|
+
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"]]]);
|
|
10484
9714
|
const DuetVisuallyHidden = /*@__PURE__*/proxyCustomElement(DuetVisuallyHidden$1, [1,"duet-visually-hidden"]);
|
|
10485
9715
|
const defineCustomElements = (opts) => {
|
|
10486
9716
|
if (typeof customElements !== 'undefined') {
|
|
@@ -10533,7 +9763,6 @@ const defineCustomElements = (opts) => {
|
|
|
10533
9763
|
DuetToggle,
|
|
10534
9764
|
DuetTooltip,
|
|
10535
9765
|
DuetTray,
|
|
10536
|
-
DuetUpload,
|
|
10537
9766
|
DuetVisuallyHidden
|
|
10538
9767
|
].forEach(cmp => {
|
|
10539
9768
|
if (!customElements.get(cmp.is)) {
|
|
@@ -10936,4 +10165,4 @@ const shadowCss = /*#__PURE__*/Object.freeze({
|
|
|
10936
10165
|
scopeCss: scopeCss
|
|
10937
10166
|
});
|
|
10938
10167
|
|
|
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,
|
|
10168
|
+
export { DuetAlert, DuetBadge, DuetButton, DuetCaption, DuetCard, DuetCheckbox, DuetChoice, DuetChoiceGroup, DuetCollapsible, DuetCookieConsent, DuetDatePicker, DuetDivider, DuetEmptyState, DuetFieldset, DuetFooter, DuetGrid, DuetGridItem, DuetHeader, DuetHeading, DuetHero, DuetIcon, DuetInput, DuetLabel, DuetLayout, DuetLink, DuetList, DuetListItem, DuetLogo, DuetModal, DuetNotification, DuetNotificationDrawer, DuetNumberInput, DuetParagraph, DuetRadio, DuetRadioGroup, DuetRangeSlider, DuetSelect, DuetSpacer, DuetSpinner, DuetStep, DuetStepper, DuetTab, DuetTabGroup, DuetTable, DuetTextarea, DuetToggle, DuetTooltip, DuetTray, DuetVisuallyHidden, defineCustomElements, setAssetPath, setPlatformOptions };
|