@duetds/components 9.4.2 → 9.5.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 +2269 -199
- package/lib/cjs/{a11y-utils-821a2919.js → a11y-utils-103b327e.js} +1 -1
- package/lib/cjs/{app-globals-b8946136.js → app-globals-2b7fff72.js} +1 -1
- package/lib/cjs/duet-action-button.cjs.entry.js +2 -2
- package/lib/cjs/duet-alert.cjs.entry.js +3 -3
- package/lib/cjs/duet-badge.cjs.entry.js +3 -3
- package/lib/cjs/duet-banner.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +6 -6
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +4 -4
- package/lib/cjs/duet-button_2.cjs.entry.js +10 -10
- package/lib/cjs/duet-callout.cjs.entry.js +4 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +11 -10
- package/lib/cjs/duet-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkmark.cjs.entry.js +3 -3
- package/lib/cjs/{duet-chip_3.cjs.entry.js → duet-chip.cjs.entry.js} +3 -377
- package/lib/cjs/duet-choice_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-collapsible.cjs.entry.js +4 -4
- package/lib/cjs/duet-combobox.cjs.entry.js +3 -3
- package/lib/cjs/duet-contact-card.cjs.entry.js +4 -4
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +2 -2
- package/lib/cjs/duet-date-picker.cjs.entry.js +4 -4
- package/lib/cjs/duet-divider_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +7 -7
- package/lib/cjs/duet-empty-state.cjs.entry.js +3 -3
- package/lib/cjs/duet-fieldset.cjs.entry.js +5 -5
- package/lib/cjs/duet-file-chooser.cjs.entry.js +2 -2
- package/lib/cjs/duet-footer.cjs.entry.js +7 -7
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +8 -8
- package/lib/cjs/duet-icon.cjs.entry.js +4 -4
- package/lib/cjs/duet-input_2.cjs.entry.js +5 -5
- package/lib/cjs/duet-layout.cjs.entry.js +7 -7
- package/lib/cjs/duet-list_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +3 -3
- package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-menu-bar-item.cjs.entry.js +6 -6
- package/lib/cjs/duet-menu-bar-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-menu-bar.cjs.entry.js +4 -4
- package/lib/cjs/duet-modal.cjs.entry.js +10 -10
- package/lib/cjs/duet-multiselect.cjs.entry.js +8 -8
- package/lib/cjs/duet-nav.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +6 -6
- package/lib/cjs/duet-number-input.cjs.entry.js +3 -3
- package/lib/cjs/duet-overlay.cjs.entry.js +2 -2
- package/lib/cjs/duet-page-heading.cjs.entry.js +3 -3
- package/lib/cjs/duet-pagination_2.cjs.entry.js +15 -15
- package/lib/cjs/duet-phone-input.cjs.entry.js +2002 -0
- package/lib/cjs/duet-popup-menu_2.cjs.entry.js +426 -0
- package/lib/cjs/duet-progress.cjs.entry.js +2 -2
- package/lib/cjs/duet-promo-card.cjs.entry.js +4 -4
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +12 -12
- package/lib/cjs/duet-section-layout.cjs.entry.js +4 -4
- package/lib/cjs/duet-select.cjs.entry.js +2 -2
- package/lib/cjs/duet-shaped-image.cjs.entry.js +3 -3
- package/lib/cjs/duet-show-more.cjs.entry.js +4 -4
- package/lib/cjs/duet-slideout-lang.cjs.entry.js +3 -3
- package/lib/cjs/duet-slideout-link.cjs.entry.js +22 -4
- package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +10 -10
- package/lib/cjs/duet-slideout.cjs.entry.js +8 -8
- package/lib/cjs/duet-status-icon.cjs.entry.js +3 -3
- package/lib/cjs/duet-step_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +5 -5
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +2 -2
- package/lib/cjs/duet-submenu-bar.cjs.entry.js +6 -6
- package/lib/cjs/duet-textarea.cjs.entry.js +3 -3
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-toolbar-item.cjs.entry.js +7 -7
- package/lib/cjs/duet-toolbar-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar.cjs.entry.js +3 -3
- package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +6 -6
- package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
- package/lib/cjs/duet-tray.cjs.entry.js +4 -4
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +2 -2
- package/lib/cjs/duet-upload-item.cjs.entry.js +5 -5
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +2 -2
- package/lib/cjs/duet.cjs.js +3 -3
- package/lib/cjs/{errorcodes.utils-4059c3de.js → errorcodes.utils-e3a0f607.js} +1 -1
- package/lib/cjs/{focus-utils-b50cfb47.js → focus-utils-47d23c45.js} +1 -1
- package/lib/cjs/{index-ae9c685d.js → index-7b1d76ef.js} +11 -3
- package/lib/cjs/{language-utils-eb134c64.js → language-utils-a6a152b8.js} +1 -1
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{slot-utils-66b2afa4.js → slot-utils-6864011f.js} +1 -1
- package/lib/collection/collection-manifest.json +1 -0
- package/lib/collection/components/duet-badge/duet-badge.js +2 -2
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.js +4 -4
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.js +2 -2
- package/lib/collection/components/duet-button/duet-button.css +32 -18
- package/lib/collection/components/duet-button/duet-button.js +6 -6
- package/lib/collection/components/duet-callout/duet-callout.js +2 -2
- package/lib/collection/components/duet-chip/duet-chip.js +1 -1
- package/lib/collection/components/duet-choice/duet-checkmark.js +2 -2
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +2 -2
- package/lib/collection/components/duet-contact-card/duet-contact-card.js +2 -2
- package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +1 -1
- package/lib/collection/components/duet-divider/duet-divider.js +1 -1
- package/lib/collection/components/duet-empty-state/duet-empty-state.js +2 -2
- package/lib/collection/components/duet-fieldset/duet-fieldset.js +3 -3
- package/lib/collection/components/duet-file-chooser/duet-file-chooser.js +1 -1
- package/lib/collection/components/duet-footer/duet-footer.js +4 -4
- package/lib/collection/components/duet-heading/duet-heading.js +22 -2
- package/lib/collection/components/duet-hero/duet-hero.js +5 -5
- package/lib/collection/components/duet-icon/duet-icon.js +3 -3
- package/lib/collection/components/duet-input/duet-input.css +34 -3
- package/lib/collection/components/duet-input/duet-input.js +4 -4
- package/lib/collection/components/duet-layout/duet-layout.js +5 -5
- package/lib/collection/components/duet-link/duet-link.js +2 -2
- package/lib/collection/components/duet-list/duet-list.js +1 -1
- package/lib/collection/components/duet-list-item/duet-list-item.js +2 -2
- package/lib/collection/components/duet-logo/duet-logo.js +1 -1
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +2 -2
- package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +2 -2
- package/lib/collection/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.js +4 -4
- package/lib/collection/components/duet-menu-bar-dropdown-link/duet-menu-bar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-menu-bar-item/duet-menu-bar-item.js +2 -2
- package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +2 -2
- package/lib/collection/components/duet-modal/duet-modal.js +6 -6
- package/lib/collection/components/duet-multiselect/duet-multiselect.js +5 -5
- package/lib/collection/components/duet-nav/duet-nav.js +1 -1
- package/lib/collection/components/duet-notification/duet-notification.js +2 -2
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +2 -2
- package/lib/collection/components/duet-overlay/duet-overlay.js +1 -1
- package/lib/collection/components/duet-page-heading/duet-page-heading.js +2 -2
- package/lib/collection/components/duet-pagination/duet-pagination.js +11 -11
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +2 -2
- package/lib/collection/components/duet-phone-input/duet-phone-input.css +20 -0
- package/lib/collection/components/duet-phone-input/duet-phone-input.js +777 -0
- package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +69 -9
- package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +2 -2
- package/lib/collection/components/duet-promo-card/duet-promo-card.js +2 -2
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +2 -2
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +5 -5
- package/lib/collection/components/duet-section-layout/duet-section-layout.js +3 -3
- package/lib/collection/components/duet-shaped-image/duet-shaped-image.js +2 -2
- package/lib/collection/components/duet-show-more/duet-show-more.js +2 -2
- package/lib/collection/components/duet-slideout/duet-slideout.js +4 -4
- package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +1 -1
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.css +17 -2
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +90 -2
- package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +6 -6
- package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.js +4 -4
- package/lib/collection/components/duet-spacer/duet-spacer.js +1 -1
- package/lib/collection/components/duet-spinner/duet-spinner.js +2 -2
- package/lib/collection/components/duet-status-icon/duet-status-icon.js +2 -2
- package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
- package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.js +5 -5
- package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.js +4 -4
- package/lib/collection/components/duet-submenu-bar-dropdown-link/duet-submenu-bar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-submenu-bar-item/duet-submenu-bar-item.js +1 -1
- package/lib/collection/components/duet-submenu-bar-link/duet-submenu-bar-link.js +1 -1
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +4 -4
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-toolbar/duet-toolbar.js +2 -2
- package/lib/collection/components/duet-toolbar-dropdown/duet-toolbar-dropdown.js +4 -4
- package/lib/collection/components/duet-toolbar-dropdown-link/duet-toolbar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-toolbar-item/duet-toolbar-item.js +3 -3
- package/lib/collection/components/duet-toolbar-link/duet-toolbar-link.js +2 -2
- package/lib/collection/components/duet-tooltip/duet-tooltip-button.js +2 -2
- package/lib/collection/components/duet-tooltip/duet-tooltip-popup.js +2 -2
- package/lib/collection/components/duet-tray/duet-tray.js +2 -2
- package/lib/collection/components/duet-upload/duet-upload.js +2 -2
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +1 -1
- package/lib/collection/components/duet-upload-item/duet-upload-item.js +2 -2
- package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +1 -1
- package/lib/collection/data/countries.js +1762 -0
- package/lib/dist-custom-elements/duet-action-button.js +1 -1
- package/lib/dist-custom-elements/duet-alert.js +1 -1
- package/lib/dist-custom-elements/duet-badge.js +1 -1
- package/lib/dist-custom-elements/duet-banner.js +3 -3
- package/lib/dist-custom-elements/duet-breadcrumb.js +7 -7
- package/lib/dist-custom-elements/duet-breadcrumbs.js +3 -3
- package/lib/dist-custom-elements/duet-button.js +1 -1
- package/lib/dist-custom-elements/duet-callout.js +4 -4
- package/lib/dist-custom-elements/duet-caption.js +1 -1
- package/lib/dist-custom-elements/duet-card.js +3 -3
- package/lib/dist-custom-elements/duet-checkbox.js +1 -1
- package/lib/dist-custom-elements/duet-checkmark.js +1 -1
- package/lib/dist-custom-elements/duet-chip.js +1 -1
- package/lib/dist-custom-elements/duet-choice-group.js +8 -8
- package/lib/dist-custom-elements/duet-choice.js +4 -4
- package/lib/dist-custom-elements/duet-collapsible.js +5 -5
- package/lib/dist-custom-elements/duet-combobox.js +15 -15
- package/lib/dist-custom-elements/duet-contact-card.js +10 -10
- package/lib/dist-custom-elements/duet-cookie-consent.js +7 -7
- package/lib/dist-custom-elements/duet-date-picker.js +13 -13
- package/lib/dist-custom-elements/duet-divider.js +1 -1
- package/lib/dist-custom-elements/duet-editable-table.js +7 -7
- package/lib/dist-custom-elements/duet-empty-state.js +1 -1
- package/lib/dist-custom-elements/duet-fieldset.js +1 -1
- package/lib/dist-custom-elements/duet-file-chooser.js +3 -3
- package/lib/dist-custom-elements/duet-footer.js +11 -11
- package/lib/dist-custom-elements/duet-grid-item.js +1 -1
- package/lib/dist-custom-elements/duet-grid.js +1 -1
- package/lib/dist-custom-elements/duet-header.js +8 -8
- package/lib/dist-custom-elements/duet-heading.js +1 -1
- package/lib/dist-custom-elements/duet-hero.js +14 -14
- package/lib/dist-custom-elements/duet-icon.js +1 -1
- package/lib/dist-custom-elements/duet-input.js +1 -1
- package/lib/dist-custom-elements/duet-label.js +1 -1
- package/lib/dist-custom-elements/duet-layout.js +6 -6
- package/lib/dist-custom-elements/duet-link.js +1 -1
- package/lib/dist-custom-elements/duet-list-item.js +1 -1
- package/lib/dist-custom-elements/duet-list.js +1 -1
- package/lib/dist-custom-elements/duet-logo.js +1 -1
- package/lib/dist-custom-elements/duet-menu-bar-button.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-menu-bar-item.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar-link.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar.js +4 -4
- package/lib/dist-custom-elements/duet-modal.js +14 -14
- package/lib/dist-custom-elements/duet-multiselect.js +14 -14
- package/lib/dist-custom-elements/duet-nav.js +2 -2
- package/lib/dist-custom-elements/duet-notification-drawer.js +6 -6
- package/lib/dist-custom-elements/duet-notification.js +4 -4
- package/lib/dist-custom-elements/duet-number-input.js +11 -11
- package/lib/dist-custom-elements/duet-overlay.js +1 -1
- package/lib/dist-custom-elements/duet-page-heading.js +5 -5
- package/lib/dist-custom-elements/duet-pagination.js +24 -24
- package/lib/dist-custom-elements/duet-paragraph.js +1 -1
- package/lib/dist-custom-elements/duet-phone-input.d.ts +11 -0
- package/lib/dist-custom-elements/duet-phone-input.js +2128 -0
- package/lib/dist-custom-elements/duet-popup-menu-item.js +1 -1
- package/lib/dist-custom-elements/duet-popup-menu.js +1 -1
- package/lib/dist-custom-elements/duet-progress.js +1 -1
- package/lib/dist-custom-elements/duet-promo-card.js +5 -5
- package/lib/dist-custom-elements/duet-radio-group.js +8 -8
- package/lib/dist-custom-elements/duet-radio.js +1 -1
- package/lib/dist-custom-elements/duet-range-slider.js +2 -2
- package/lib/dist-custom-elements/duet-range-stepper.js +6 -6
- package/lib/dist-custom-elements/duet-scrollable.js +1 -1
- package/lib/dist-custom-elements/duet-section-layout.js +4 -4
- package/lib/dist-custom-elements/duet-select.js +1 -1
- package/lib/dist-custom-elements/duet-shaped-image.js +3 -3
- package/lib/dist-custom-elements/duet-show-more.js +1 -1
- package/lib/dist-custom-elements/duet-slideout-lang.js +3 -3
- package/lib/dist-custom-elements/duet-slideout-link.js +25 -6
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-slideout-panel.js +8 -8
- package/lib/dist-custom-elements/duet-slideout.js +7 -7
- package/lib/dist-custom-elements/duet-spacer.js +1 -1
- package/lib/dist-custom-elements/duet-spinner.js +1 -1
- package/lib/dist-custom-elements/duet-status-icon.js +4 -4
- package/lib/dist-custom-elements/duet-step.js +4 -4
- package/lib/dist-custom-elements/duet-stepper.js +3 -3
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +4 -4
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-submenu-bar-item.js +3 -3
- package/lib/dist-custom-elements/duet-submenu-bar-link.js +3 -3
- package/lib/dist-custom-elements/duet-submenu-bar.js +8 -8
- package/lib/dist-custom-elements/duet-tab-group.js +11 -11
- package/lib/dist-custom-elements/duet-tab.js +1 -1
- package/lib/dist-custom-elements/duet-table.js +1 -1
- package/lib/dist-custom-elements/duet-textarea.js +10 -10
- package/lib/dist-custom-elements/duet-toggle.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +4 -4
- package/lib/dist-custom-elements/duet-toolbar-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-toolbar-item.js +5 -5
- package/lib/dist-custom-elements/duet-toolbar-link.js +4 -4
- package/lib/dist-custom-elements/duet-toolbar.js +3 -3
- package/lib/dist-custom-elements/duet-tooltip-button.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip.js +1 -1
- package/lib/dist-custom-elements/duet-tray.js +5 -5
- package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
- package/lib/dist-custom-elements/duet-upload-item.js +1 -1
- package/lib/dist-custom-elements/duet-upload.js +21 -21
- package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
- package/lib/dist-custom-elements/index.js +1 -1
- package/lib/dist-custom-elements/{p-e7837082.js → p-18bc63f3.js} +3 -3
- package/lib/dist-custom-elements/{p-919a3f56.js → p-19b9ead1.js} +7 -7
- package/lib/dist-custom-elements/{p-3cebc38f.js → p-26c7e23f.js} +1 -1
- package/lib/dist-custom-elements/{p-6c512deb.js → p-2ecca38c.js} +3 -3
- package/lib/dist-custom-elements/{p-12afa6a9.js → p-2f6cc198.js} +4 -4
- package/lib/dist-custom-elements/{p-ea1b9fd2.js → p-32ca7625.js} +1 -1
- package/lib/dist-custom-elements/{p-2218a02d.js → p-39b87412.js} +2 -2
- package/lib/dist-custom-elements/{p-8bb33e70.js → p-41403f71.js} +3 -3
- package/lib/dist-custom-elements/{p-e40f6f72.js → p-4ccd7bcc.js} +4 -4
- package/lib/dist-custom-elements/{p-fa1cdac3.js → p-4d6f6627.js} +3 -3
- package/lib/dist-custom-elements/{p-20670f23.js → p-4ed8da23.js} +6 -4
- package/lib/dist-custom-elements/{p-84a16ba6.js → p-52df4164.js} +1 -1
- package/lib/dist-custom-elements/{p-682759c1.js → p-548610a6.js} +1 -1
- package/lib/dist-custom-elements/{p-81287261.js → p-7327e3d5.js} +264 -1
- package/lib/dist-custom-elements/{p-eb8c49d0.js → p-76415eb2.js} +4 -4
- package/lib/dist-custom-elements/{p-43578452.js → p-76f76fab.js} +119 -12
- package/lib/dist-custom-elements/{p-8c206875.js → p-7b74fee9.js} +3 -3
- package/lib/dist-custom-elements/{p-7bd61001.js → p-87df2d6e.js} +10 -10
- package/lib/dist-custom-elements/{p-32dde064.js → p-8ad5e64f.js} +3 -3
- package/lib/dist-custom-elements/{p-b1d9f172.js → p-8f1394dd.js} +2 -2
- package/lib/dist-custom-elements/{p-fc719f13.js → p-9cb035b0.js} +5 -5
- package/lib/dist-custom-elements/{p-cf7ebeca.js → p-a013e7b0.js} +10 -10
- package/lib/dist-custom-elements/{p-2bba9071.js → p-a201b49f.js} +12 -12
- package/lib/dist-custom-elements/{p-5f69b1a3.js → p-ad89064b.js} +6 -6
- package/lib/dist-custom-elements/{p-9613c7ae.js → p-b2599bdb.js} +2 -2
- package/lib/dist-custom-elements/{p-64e2d3ca.js → p-b3a6e82a.js} +8 -8
- package/lib/dist-custom-elements/{p-3e337443.js → p-b8bae8c7.js} +2 -2
- package/lib/dist-custom-elements/{p-db63d729.js → p-c577fbfe.js} +2 -2
- package/lib/dist-custom-elements/{p-57b14f14.js → p-c69401c2.js} +4 -4
- package/lib/dist-custom-elements/{p-a8105585.js → p-cf1df71c.js} +1 -1
- package/lib/dist-custom-elements/{p-96198aec.js → p-d01a8307.js} +5 -5
- package/lib/dist-custom-elements/{p-0ead9c70.js → p-d05c6565.js} +2 -2
- package/lib/dist-custom-elements/{p-55baf5dc.js → p-d5859ccf.js} +3 -3
- package/lib/dist-custom-elements/{p-996b724b.js → p-da60c00a.js} +4 -4
- package/lib/dist-custom-elements/{p-9d6b2f72.js → p-db1f42f3.js} +3 -3
- package/lib/dist-custom-elements/{p-95bf575a.js → p-dce51f6d.js} +2 -2
- package/lib/dist-custom-elements/{p-f904de26.js → p-eb768545.js} +3 -3
- package/lib/dist-custom-elements/{p-792db7b0.js → p-ed6a907e.js} +1 -1
- package/lib/dist-custom-elements/{p-1783819b.js → p-fc9e69ed.js} +12 -12
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-a220b676.entry.js → p-00ab909e.entry.js} +1 -1
- package/lib/duet/{p-fa03d3b3.system.entry.js → p-00dd59e4.system.entry.js} +1 -1
- package/lib/duet/{p-472dab44.system.entry.js → p-033947e4.system.entry.js} +1 -1
- package/lib/duet/{p-7b39ff48.entry.js → p-03abf8be.entry.js} +1 -1
- package/lib/duet/{p-31fcb811.entry.js → p-04090a71.entry.js} +1 -1
- package/lib/duet/{p-3b03ad48.js → p-083bbc28.js} +1 -1
- package/lib/duet/{p-2b8d5ebf.system.entry.js → p-0c5d595b.system.entry.js} +1 -1
- package/lib/duet/{p-d3ba2b21.entry.js → p-0d1c524e.entry.js} +1 -1
- package/lib/duet/{p-da4d3c61.js → p-0d443be5.js} +1 -1
- package/lib/duet/{p-9b6794b3.entry.js → p-0d626d2e.entry.js} +1 -1
- package/lib/duet/{p-242c72b4.entry.js → p-0e2727b2.entry.js} +1 -1
- package/lib/duet/{p-5b8b0f3b.entry.js → p-0e3a6d04.entry.js} +1 -1
- package/lib/duet/p-1052f050.entry.js +4 -0
- package/lib/duet/{p-f8cda4cb.entry.js → p-1057eeaa.entry.js} +1 -1
- package/lib/duet/{p-03d1fe77.entry.js → p-1275c867.entry.js} +1 -1
- package/lib/duet/{p-2a4b6723.system.entry.js → p-1317da1c.system.entry.js} +1 -1
- package/lib/duet/{p-3a0a60fb.system.entry.js → p-1364a715.system.entry.js} +1 -1
- package/lib/duet/{p-373e1b99.entry.js → p-148be53e.entry.js} +1 -1
- package/lib/duet/{p-49cddce5.system.entry.js → p-15bd06bb.system.entry.js} +1 -1
- package/lib/duet/{p-53c14a6d.system.entry.js → p-1744b916.system.entry.js} +1 -1
- package/lib/duet/{p-243553ce.entry.js → p-17592731.entry.js} +1 -1
- package/lib/duet/{p-ad2f0283.system.entry.js → p-17d11f8c.system.entry.js} +1 -1
- package/lib/duet/{p-b2f48572.entry.js → p-19625473.entry.js} +1 -1
- package/lib/duet/{p-d1274fac.entry.js → p-1b1d98b4.entry.js} +1 -1
- package/lib/duet/{p-6791795c.entry.js → p-1c0ace6c.entry.js} +1 -1
- package/lib/duet/{p-7ae20674.system.entry.js → p-1ea716c1.system.entry.js} +1 -1
- package/lib/duet/{p-c1030c78.entry.js → p-1fc48a8d.entry.js} +1 -1
- package/lib/duet/{p-b77c2cc1.entry.js → p-202f526f.entry.js} +1 -1
- package/lib/duet/{p-67b77e1a.system.entry.js → p-207e46dc.system.entry.js} +1 -1
- package/lib/duet/{p-f3e0a76f.system.entry.js → p-26df85b3.system.entry.js} +1 -1
- package/lib/duet/{p-53a07476.system.entry.js → p-28cc13b6.system.entry.js} +1 -1
- package/lib/duet/{p-05bd5fc1.system.entry.js → p-28ef1aaf.system.entry.js} +1 -1
- package/lib/duet/{p-b2fbe44f.entry.js → p-295396cd.entry.js} +1 -1
- package/lib/duet/{p-23c363ea.system.entry.js → p-2a0c7157.system.entry.js} +1 -1
- package/lib/duet/{p-f12da4d6.system.entry.js → p-2a0e1cd2.system.entry.js} +1 -1
- package/lib/duet/{p-0620d479.system.entry.js → p-2a4f4522.system.entry.js} +1 -1
- package/lib/duet/{p-5c6fa752.entry.js → p-2b082283.entry.js} +1 -1
- package/lib/duet/{p-7abde534.system.js → p-2bb44297.system.js} +1 -1
- package/lib/duet/{p-e9d69dba.entry.js → p-2c64554e.entry.js} +1 -1
- package/lib/duet/{p-3945d323.system.entry.js → p-2efdf39c.system.entry.js} +1 -1
- package/lib/duet/{p-f2a5e96f.entry.js → p-3072addc.entry.js} +1 -1
- package/lib/duet/{p-d451ec53.entry.js → p-345ac2e1.entry.js} +1 -1
- package/lib/duet/{p-93c4d3c3.system.entry.js → p-346f8340.system.entry.js} +1 -1
- package/lib/duet/{p-968c2680.entry.js → p-35600b76.entry.js} +1 -1
- package/lib/duet/{p-72b3dc7c.entry.js → p-35c49132.entry.js} +1 -1
- package/lib/duet/{p-e9d570bf.entry.js → p-37c469ec.entry.js} +1 -1
- package/lib/duet/{p-ab2b67ab.entry.js → p-3ac058e8.entry.js} +1 -1
- package/lib/duet/{p-5e98b366.system.entry.js → p-3bcc4ed9.system.entry.js} +1 -1
- package/lib/duet/p-42a1b0f0.system.js +4 -0
- package/lib/duet/{p-4aa4bece.system.entry.js → p-433fad0d.system.entry.js} +1 -1
- package/lib/duet/{p-c06b8830.system.entry.js → p-435f700f.system.entry.js} +1 -1
- package/lib/duet/{p-d5a1fea0.entry.js → p-45beef6d.entry.js} +1 -1
- package/lib/duet/{p-b7393278.entry.js → p-477e39b0.entry.js} +1 -1
- package/lib/duet/{p-b99e40e7.entry.js → p-48bb29d2.entry.js} +1 -1
- package/lib/duet/{p-3a495087.entry.js → p-497fe0b1.entry.js} +1 -1
- package/lib/duet/p-4a2ccec7.entry.js +4 -0
- package/lib/duet/{p-ef16cf2f.system.entry.js → p-4af9bc5f.system.entry.js} +1 -1
- package/lib/duet/{p-8c8f2565.entry.js → p-4ebb368b.entry.js} +1 -1
- package/lib/duet/{p-e64cdc3b.system.entry.js → p-4f2c25a0.system.entry.js} +1 -1
- package/lib/duet/{p-dc807a5c.system.js → p-4f945200.system.js} +1 -1
- package/lib/duet/{p-ddc04775.entry.js → p-4fc8517e.entry.js} +1 -1
- package/lib/duet/{p-3677dc32.entry.js → p-4fc945d4.entry.js} +1 -1
- package/lib/duet/{p-d72393c6.entry.js → p-52829324.entry.js} +1 -1
- package/lib/duet/{p-9a1ede4b.system.entry.js → p-53b9b442.system.entry.js} +1 -1
- package/lib/duet/p-55bafbde.system.entry.js +4 -0
- package/lib/duet/{p-8d66d9ff.entry.js → p-56b48e3d.entry.js} +1 -1
- package/lib/duet/{p-42ed9cf5.entry.js → p-580a6591.entry.js} +1 -1
- package/lib/duet/p-587a9d58.system.entry.js +4 -0
- package/lib/duet/{p-7e67797a.system.entry.js → p-5ab4313d.system.entry.js} +1 -1
- package/lib/duet/{p-75e262dd.system.entry.js → p-5c561b82.system.entry.js} +1 -1
- package/lib/duet/{p-4261665d.system.entry.js → p-5d5ba6ed.system.entry.js} +1 -1
- package/lib/duet/{p-a6f485ce.system.entry.js → p-5e01a303.system.entry.js} +1 -1
- package/lib/duet/{p-f1f562bb.entry.js → p-5e2d4a51.entry.js} +1 -1
- package/lib/duet/{p-07be03a5.system.js → p-61173f11.system.js} +1 -1
- package/lib/duet/p-622e1ffc.js +4 -0
- package/lib/duet/{p-a488b792.system.entry.js → p-64651bff.system.entry.js} +1 -1
- package/lib/duet/p-64853b73.entry.js +4 -0
- package/lib/duet/{p-772f84d7.system.entry.js → p-66021b00.system.entry.js} +2 -2
- package/lib/duet/{p-05673dd4.system.entry.js → p-68cbc985.system.entry.js} +1 -1
- package/lib/duet/{p-c05be5e1.entry.js → p-6c36ad85.entry.js} +1 -1
- package/lib/duet/p-6eb279dd.system.entry.js +4 -0
- package/lib/duet/{p-e1d6e640.system.entry.js → p-6fb72847.system.entry.js} +1 -1
- package/lib/duet/{p-f2a35fdd.entry.js → p-71ec5b28.entry.js} +1 -1
- package/lib/duet/{p-849a093c.system.entry.js → p-73853b36.system.entry.js} +1 -1
- package/lib/duet/{p-457a2d83.system.entry.js → p-7567fef0.system.entry.js} +1 -1
- package/lib/duet/{p-fe63ab87.system.entry.js → p-76361fed.system.entry.js} +2 -2
- package/lib/duet/p-7638da3f.entry.js +4 -0
- package/lib/duet/{p-75e12142.js → p-76927493.js} +1 -1
- package/lib/duet/{p-f89203db.entry.js → p-7ac466a3.entry.js} +1 -1
- package/lib/duet/{p-2822c55e.system.entry.js → p-7b5541e9.system.entry.js} +1 -1
- package/lib/duet/p-7be5b9a7.js +4 -0
- package/lib/duet/{p-c6564753.system.entry.js → p-7cad68ea.system.entry.js} +1 -1
- package/lib/duet/{p-e51fe789.entry.js → p-7fceb8c8.entry.js} +1 -1
- package/lib/duet/{p-3215139d.system.entry.js → p-84b24dcc.system.entry.js} +1 -1
- package/lib/duet/{p-e39b4df9.system.entry.js → p-84c02ce1.system.entry.js} +1 -1
- package/lib/duet/p-84f2cc6b.entry.js +4 -0
- package/lib/duet/p-85261a28.entry.js +4 -0
- package/lib/duet/p-85a38287.system.entry.js +4 -0
- package/lib/duet/{p-1a045554.entry.js → p-88e0e42c.entry.js} +1 -1
- package/lib/duet/p-89cf1a91.system.js +4 -0
- package/lib/duet/p-8b59d885.entry.js +4 -0
- package/lib/duet/{p-042e2fe8.entry.js → p-8bfb6649.entry.js} +1 -1
- package/lib/duet/{p-6460ecdd.entry.js → p-8d6e249b.entry.js} +1 -1
- package/lib/duet/{p-15b3553c.system.entry.js → p-8ecbac63.system.entry.js} +1 -1
- package/lib/duet/{p-d1219b00.system.entry.js → p-8f698359.system.entry.js} +1 -1
- package/lib/duet/{p-9c4c9249.system.entry.js → p-91a98b52.system.entry.js} +1 -1
- package/lib/duet/{p-2f333676.system.entry.js → p-91f7ae75.system.entry.js} +1 -1
- package/lib/duet/{p-fae62327.system.entry.js → p-925da010.system.entry.js} +1 -1
- package/lib/duet/{p-758432df.entry.js → p-943edeef.entry.js} +1 -1
- package/lib/duet/{p-1f521358.system.entry.js → p-9525c31e.system.entry.js} +1 -1
- package/lib/duet/{p-1e4e0a4d.entry.js → p-95f1b9a1.entry.js} +1 -1
- package/lib/duet/{p-d681c210.entry.js → p-96a6cca2.entry.js} +1 -1
- package/lib/duet/{p-97b9b2ae.entry.js → p-98fd263d.entry.js} +1 -1
- package/lib/duet/{p-7df5aaf6.system.entry.js → p-9d3e0050.system.entry.js} +2 -2
- package/lib/duet/{p-b5c7f8cd.entry.js → p-9f377238.entry.js} +1 -1
- package/lib/duet/p-9f3a5506.entry.js +4 -0
- package/lib/duet/{p-6b4ca314.entry.js → p-9f9e4b5a.entry.js} +1 -1
- package/lib/duet/{p-7b249d64.system.entry.js → p-a0229b56.system.entry.js} +1 -1
- package/lib/duet/{p-d2a5a09f.js → p-a083b91a.js} +1 -1
- package/lib/duet/p-a331ae6e.system.js +4 -0
- package/lib/duet/{p-1dbbe6df.system.entry.js → p-a637d6a7.system.entry.js} +1 -1
- package/lib/duet/{p-b6e4d58e.system.entry.js → p-a90243df.system.entry.js} +1 -1
- package/lib/duet/{p-f5e1a0cc.entry.js → p-afc011e1.entry.js} +1 -1
- package/lib/duet/p-aff748c3.entry.js +4 -0
- package/lib/duet/{p-dfe8ce73.system.entry.js → p-b1c2ab61.system.entry.js} +1 -1
- package/lib/duet/p-b3076f6c.system.entry.js +4 -0
- package/lib/duet/{p-2c565a29.entry.js → p-b327a269.entry.js} +1 -1
- package/lib/duet/{p-3e9b5b6f.entry.js → p-b32dcb86.entry.js} +1 -1
- package/lib/duet/{p-ee3b1868.system.entry.js → p-b336e3fb.system.entry.js} +1 -1
- package/lib/duet/{p-9f5a2024.entry.js → p-b410d85d.entry.js} +1 -1
- package/lib/duet/p-b56915bb.system.entry.js +4 -0
- package/lib/duet/{p-89a86ebc.system.entry.js → p-b642d349.system.entry.js} +1 -1
- package/lib/duet/{p-ee268c5a.entry.js → p-b79ca71d.entry.js} +1 -1
- package/lib/duet/{p-e5ef5e89.entry.js → p-baf88ca9.entry.js} +1 -1
- package/lib/duet/{p-714399a1.system.entry.js → p-bbb9a30a.system.entry.js} +1 -1
- package/lib/duet/{p-5b2030f6.entry.js → p-bcd14101.entry.js} +1 -1
- package/lib/duet/{p-d8a7a6eb.entry.js → p-bcfd5746.entry.js} +1 -1
- package/lib/duet/{p-bca6125e.entry.js → p-bfb897ab.entry.js} +1 -1
- package/lib/duet/{p-709882f3.system.entry.js → p-c2befbf1.system.entry.js} +1 -1
- package/lib/duet/{p-27aab6b1.entry.js → p-c2d61f47.entry.js} +1 -1
- package/lib/duet/{p-9ea49d85.system.entry.js → p-c3d6433f.system.entry.js} +1 -1
- package/lib/duet/{p-f409cd1f.system.entry.js → p-c50c0b02.system.entry.js} +2 -2
- package/lib/duet/{p-05fcbe8e.system.entry.js → p-c5117f90.system.entry.js} +1 -1
- package/lib/duet/{p-2bb74e72.entry.js → p-c56c0b41.entry.js} +1 -1
- package/lib/duet/{p-52d6efa6.system.entry.js → p-c581e6d3.system.entry.js} +1 -1
- package/lib/duet/{p-59339a3e.system.entry.js → p-c734cff9.system.entry.js} +1 -1
- package/lib/duet/p-ca29569e.system.js +4 -0
- package/lib/duet/{p-3f8677ac.system.js → p-cdba12cc.system.js} +1 -1
- package/lib/duet/{p-6e1b9c32.system.entry.js → p-ce8d83cf.system.entry.js} +2 -2
- package/lib/duet/{p-5817c9a6.entry.js → p-d2059383.entry.js} +1 -1
- package/lib/duet/{p-653c75c3.system.entry.js → p-d2e9bcdf.system.entry.js} +1 -1
- package/lib/duet/{p-3b88a791.system.entry.js → p-d3e906da.system.entry.js} +1 -1
- package/lib/duet/{p-f6f21b70.entry.js → p-d49076b6.entry.js} +1 -1
- package/lib/duet/{p-df67d91b.system.entry.js → p-d66a0251.system.entry.js} +1 -1
- package/lib/duet/{p-fd38377e.system.entry.js → p-d8c356eb.system.entry.js} +1 -1
- package/lib/duet/{p-09fea5ea.system.entry.js → p-d915362b.system.entry.js} +1 -1
- package/lib/duet/{p-73f5d7d3.system.entry.js → p-da49ab05.system.entry.js} +2 -2
- package/lib/duet/{p-edda0b76.system.entry.js → p-dc186a2f.system.entry.js} +1 -1
- package/lib/duet/p-dcb8b2e2.entry.js +4 -0
- package/lib/duet/{p-37631fb0.system.entry.js → p-dd3fff16.system.entry.js} +1 -1
- package/lib/duet/{p-e8334ed1.entry.js → p-dd7ec171.entry.js} +1 -1
- package/lib/duet/{p-c71a58da.js → p-e3857119.js} +1 -1
- package/lib/duet/p-e67910bf.system.entry.js +4 -0
- package/lib/duet/{p-3ee0e7a2.system.entry.js → p-e81eade0.system.entry.js} +1 -1
- package/lib/duet/{p-e8eed1e6.entry.js → p-e8b5235d.entry.js} +1 -1
- package/lib/duet/{p-bca39a19.system.entry.js → p-eaff90e5.system.entry.js} +1 -1
- package/lib/duet/{p-87cc03bb.system.entry.js → p-ed4e9cd6.system.entry.js} +1 -1
- package/lib/duet/{p-99110a93.entry.js → p-edd39bb2.entry.js} +1 -1
- package/lib/duet/p-ef7b1342.entry.js +4 -0
- package/lib/duet/{p-2590f7b0.system.entry.js → p-f268a161.system.entry.js} +1 -1
- package/lib/duet/p-f3737a2b.entry.js +4 -0
- package/lib/duet/{p-b2a5f5d0.entry.js → p-f38a5f44.entry.js} +1 -1
- package/lib/duet/{p-475672d1.entry.js → p-f631a689.entry.js} +1 -1
- package/lib/duet/{p-5e988172.system.entry.js → p-f7d083c5.system.entry.js} +1 -1
- package/lib/duet/p-f89d7751.entry.js +4 -0
- package/lib/duet/{p-58f49211.system.entry.js → p-f8f56a8e.system.entry.js} +1 -1
- package/lib/duet/{p-829f18ac.entry.js → p-fb9b0a2f.entry.js} +1 -1
- package/lib/duet/p-fce0a87d.entry.js +4 -0
- package/lib/duet/{p-d46c21c3.system.entry.js → p-ff2aca13.system.entry.js} +2 -2
- package/lib/esm/{a11y-utils-47ea468e.js → a11y-utils-9dbc7c3d.js} +1 -1
- package/lib/esm/{app-globals-52a8e9e5.js → app-globals-e00fbe9c.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +2 -2
- package/lib/esm/duet-alert.entry.js +3 -3
- package/lib/esm/duet-badge.entry.js +3 -3
- package/lib/esm/duet-banner.entry.js +2 -2
- package/lib/esm/duet-breadcrumb.entry.js +6 -6
- package/lib/esm/duet-breadcrumbs.entry.js +4 -4
- package/lib/esm/duet-button_2.entry.js +10 -10
- package/lib/esm/duet-callout.entry.js +4 -4
- package/lib/esm/duet-caption_4.entry.js +11 -10
- package/lib/esm/duet-card.entry.js +2 -2
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-checkmark.entry.js +3 -3
- package/lib/esm/{duet-chip_3.entry.js → duet-chip.entry.js} +5 -377
- package/lib/esm/duet-choice_2.entry.js +3 -3
- package/lib/esm/duet-collapsible.entry.js +4 -4
- package/lib/esm/duet-combobox.entry.js +3 -3
- package/lib/esm/duet-contact-card.entry.js +4 -4
- package/lib/esm/duet-cookie-consent.entry.js +2 -2
- package/lib/esm/duet-date-picker.entry.js +4 -4
- package/lib/esm/duet-divider_2.entry.js +3 -3
- package/lib/esm/duet-editable-table_3.entry.js +7 -7
- package/lib/esm/duet-empty-state.entry.js +3 -3
- package/lib/esm/duet-fieldset.entry.js +5 -5
- package/lib/esm/duet-file-chooser.entry.js +2 -2
- package/lib/esm/duet-footer.entry.js +7 -7
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +8 -8
- package/lib/esm/duet-icon.entry.js +4 -4
- package/lib/esm/duet-input_2.entry.js +5 -5
- package/lib/esm/duet-layout.entry.js +7 -7
- package/lib/esm/duet-list_2.entry.js +4 -4
- package/lib/esm/duet-menu-bar-button.entry.js +3 -3
- package/lib/esm/duet-menu-bar-dropdown-link.entry.js +3 -3
- package/lib/esm/duet-menu-bar-dropdown.entry.js +5 -5
- package/lib/esm/duet-menu-bar-item.entry.js +6 -6
- package/lib/esm/duet-menu-bar-link.entry.js +3 -3
- package/lib/esm/duet-menu-bar.entry.js +4 -4
- package/lib/esm/duet-modal.entry.js +10 -10
- package/lib/esm/duet-multiselect.entry.js +8 -8
- package/lib/esm/duet-nav.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +6 -6
- package/lib/esm/duet-number-input.entry.js +3 -3
- package/lib/esm/duet-overlay.entry.js +2 -2
- package/lib/esm/duet-page-heading.entry.js +3 -3
- package/lib/esm/duet-pagination_2.entry.js +15 -15
- package/lib/esm/duet-phone-input.entry.js +1998 -0
- package/lib/esm/duet-popup-menu_2.entry.js +421 -0
- package/lib/esm/duet-progress.entry.js +2 -2
- package/lib/esm/duet-promo-card.entry.js +4 -4
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +12 -12
- package/lib/esm/duet-section-layout.entry.js +4 -4
- package/lib/esm/duet-select.entry.js +2 -2
- package/lib/esm/duet-shaped-image.entry.js +3 -3
- package/lib/esm/duet-show-more.entry.js +4 -4
- package/lib/esm/duet-slideout-lang.entry.js +3 -3
- package/lib/esm/duet-slideout-link.entry.js +22 -4
- package/lib/esm/duet-slideout-panel-dropdown.entry.js +5 -5
- package/lib/esm/duet-slideout-panel.entry.js +10 -10
- package/lib/esm/duet-slideout.entry.js +8 -8
- package/lib/esm/duet-status-icon.entry.js +3 -3
- package/lib/esm/duet-step_2.entry.js +2 -2
- package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +3 -3
- package/lib/esm/duet-submenu-bar-dropdown.entry.js +5 -5
- package/lib/esm/duet-submenu-bar-item.entry.js +5 -5
- package/lib/esm/duet-submenu-bar-link.entry.js +2 -2
- package/lib/esm/duet-submenu-bar.entry.js +6 -6
- package/lib/esm/duet-textarea.entry.js +3 -3
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-toolbar-dropdown-link.entry.js +3 -3
- package/lib/esm/duet-toolbar-dropdown.entry.js +5 -5
- package/lib/esm/duet-toolbar-item.entry.js +7 -7
- package/lib/esm/duet-toolbar-link.entry.js +3 -3
- package/lib/esm/duet-toolbar.entry.js +3 -3
- package/lib/esm/duet-tooltip-button_2.entry.js +6 -6
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +4 -4
- package/lib/esm/duet-upload-aria-status.entry.js +2 -2
- package/lib/esm/duet-upload-item.entry.js +5 -5
- package/lib/esm/duet-visually-hidden.entry.js +2 -2
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{errorcodes.utils-e55da25d.js → errorcodes.utils-416994cc.js} +1 -1
- package/lib/esm/{focus-utils-b09f6029.js → focus-utils-7bc146cd.js} +1 -1
- package/lib/esm/{index-ed83a687.js → index-1a6cee61.js} +11 -3
- package/lib/esm/{language-utils-d2c8afdc.js → language-utils-8a9d5323.js} +1 -1
- package/lib/esm/loader.js +4 -4
- package/lib/esm/{slot-utils-035ffb1f.js → slot-utils-9633ef1e.js} +1 -1
- package/lib/esm-es5/{a11y-utils-47ea468e.js → a11y-utils-9dbc7c3d.js} +1 -1
- package/lib/esm-es5/{app-globals-52a8e9e5.js → app-globals-e00fbe9c.js} +1 -1
- package/lib/esm-es5/duet-action-button.entry.js +1 -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-banner.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +2 -2
- package/lib/esm-es5/duet-callout.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-checkmark.entry.js +1 -1
- package/lib/esm-es5/duet-chip.entry.js +4 -0
- 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-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-contact-card.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.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-file-chooser.entry.js +2 -2
- 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 +2 -2
- 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-menu-bar-button.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +2 -2
- package/lib/esm-es5/duet-menu-bar-item.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-multiselect.entry.js +1 -1
- package/lib/esm-es5/duet-nav.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +2 -2
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-overlay.entry.js +1 -1
- package/lib/esm-es5/duet-page-heading.entry.js +1 -1
- package/lib/esm-es5/duet-pagination_2.entry.js +2 -2
- package/lib/esm-es5/duet-phone-input.entry.js +4 -0
- package/lib/esm-es5/duet-popup-menu_2.entry.js +4 -0
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-promo-card.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-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-section-layout.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-shaped-image.entry.js +1 -1
- package/lib/esm-es5/duet-show-more.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
- package/lib/esm-es5/duet-slideout.entry.js +2 -2
- package/lib/esm-es5/duet-status-icon.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-item.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +2 -2
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-item.entry.js +2 -2
- package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-upload-item.entry.js +2 -2
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{errorcodes.utils-e55da25d.js → errorcodes.utils-416994cc.js} +1 -1
- package/lib/esm-es5/{focus-utils-b09f6029.js → focus-utils-7bc146cd.js} +1 -1
- package/lib/esm-es5/index-1a6cee61.js +4 -0
- package/lib/esm-es5/{language-utils-d2c8afdc.js → language-utils-8a9d5323.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{slot-utils-035ffb1f.js → slot-utils-9633ef1e.js} +1 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-heading/duet-heading.d.ts +6 -0
- package/lib/types/components/duet-input/duet-input.d.ts +4 -3
- package/lib/types/components/duet-phone-input/duet-phone-input.d.ts +156 -0
- package/lib/types/components/duet-popup-menu/duet-popup-menu.d.ts +11 -1
- package/lib/types/components/duet-slideout-link/duet-slideout-link.d.ts +17 -0
- package/lib/types/components.d.ts +259 -2
- package/lib/types/data/countries.d.ts +22 -0
- package/package.json +4 -4
- package/lib/dist-custom-elements/p-b48eb919.js +0 -268
- package/lib/duet/p-05744ea4.entry.js +0 -4
- package/lib/duet/p-0dee442d.system.entry.js +0 -4
- package/lib/duet/p-0f354fb2.system.entry.js +0 -4
- package/lib/duet/p-254f4171.entry.js +0 -4
- package/lib/duet/p-2f769f52.system.entry.js +0 -4
- package/lib/duet/p-3a5017af.entry.js +0 -4
- package/lib/duet/p-46d7ebac.js +0 -4
- package/lib/duet/p-4ec25d4a.system.js +0 -4
- package/lib/duet/p-55d318e7.entry.js +0 -4
- package/lib/duet/p-571bc7a8.js +0 -4
- package/lib/duet/p-59cbcc2e.system.js +0 -4
- package/lib/duet/p-5bb1c4b6.entry.js +0 -4
- package/lib/duet/p-6044fe21.entry.js +0 -4
- package/lib/duet/p-7e0c5458.entry.js +0 -4
- package/lib/duet/p-8396cd14.entry.js +0 -4
- package/lib/duet/p-96ba9bdb.system.entry.js +0 -4
- package/lib/duet/p-a1f1645c.system.entry.js +0 -4
- package/lib/duet/p-a4bab4d8.entry.js +0 -4
- package/lib/duet/p-bf4d22d5.system.js +0 -4
- package/lib/duet/p-c4fc305d.entry.js +0 -4
- package/lib/duet/p-ceb3a8ca.entry.js +0 -4
- package/lib/duet/p-f1bb265f.entry.js +0 -4
- package/lib/duet/p-f872ec26.system.js +0 -4
- package/lib/esm-es5/duet-chip_3.entry.js +0 -4
- package/lib/esm-es5/index-ed83a687.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
4
|
+
System.register(["./p-61173f11.system.js","./p-e216bea4.system.js"],(function(e){"use strict";var t,r,a,o,n;return{setters:[function(e){t=e.r;r=e.h;a=e.H;o=e.g},function(e){n=e.i}],execute:function(){var d='*,*::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{display:inline-block;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:rgb(8, 42, 77);text-align:center;word-break:break-word;vertical-align:middle;background:#d9ebf4;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:rgb(23, 28, 58);background:#e8e8eb}.duet-badge.warning{background:#fdecc9}.duet-badge.warning.duet-theme-turva{background:#fdecc9}.duet-badge.danger{background:#f7d2dc}.duet-badge.danger.duet-theme-turva{background:#f7d2dc}.duet-badge.success{background:#d6e6e1}.duet-badge.success.duet-theme-turva{background:#d6e6e1}.duet-badge.subtle{color:rgb(98, 121, 138);background:none;outline:1px solid rgb(212, 223, 229);outline-offset:-1px}.duet-badge.subtle.duet-theme-turva{color:rgb(113, 118, 132);background:none;outline-color:rgb(222, 224, 228)}.duet-badge.background-strong.default{color:rgb(255, 255, 255);background:rgb(0, 119, 179)}.duet-badge.background-strong.default.duet-theme-turva{color:rgb(255, 255, 255);background:rgb(23, 28, 58)}.duet-badge.background-strong.warning{background:#f9c153}.duet-badge.background-strong.warning.duet-theme-turva{background:#f9c153}.duet-badge.background-strong.danger{color:rgb(255, 255, 255);background:rgb(214, 28, 82)}.duet-badge.background-strong.danger.duet-theme-turva{color:rgb(255, 255, 255);background:rgb(214, 28, 82)}.duet-badge.background-strong.success{color:rgb(255, 255, 255);background:rgb(48, 131, 105)}.duet-badge.background-strong.success.duet-theme-turva{color:rgb(255, 255, 255);background:rgb(48, 131, 105)}.duet-badge.background-strong.subtle{border-color:rgb(181, 198, 208);outline-color:rgb(8, 42, 77)}.duet-badge.background-strong.subtle.duet-theme-turva{border-color:rgb(199, 202, 207);outline-color:rgb(23, 28, 58)}';var g=d;var b=e("duet_badge",function(){function e(e){t(this,e);this.theme="";this.variation="default";this.background="normal";this.margin="auto"}e.prototype.componentWillLoad=function(){n(this)};e.prototype.render=function(){var e;var t="background-".concat(this.background);return r(a,{key:"cb78bbf707726afa6370adc12ad150bf355b6859",class:{"duet-m-0":this.margin==="none"}},r("span",{key:"84a4bcb3eae5bad6cbb54c1196ecd7c601910b04",class:(e={"duet-badge":true},e[this.variation]=true,e[t]=true,e["duet-theme-turva"]=this.theme==="turva",e)},r("slot",{key:"47192a702299c359b51b2b904363fc8a90fc50a5"})))};Object.defineProperty(e.prototype,"element",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());b.style=g}}}));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as e,h as i,H as o,g as s}from"./p-a083b91a.js";import{i as a}from"./p-aaa7a7bd.js";import{e as d,d as n}from"./p-fc09c464.js";import{f as l,F as r}from"./p-083bbc28.js";import{f as h}from"./p-a45e3f8b.js";import{a as u,c,d as p,g as b}from"./p-e3857119.js";import{h as g}from"./p-0d443be5.js";import{T as m}from"./p-ca3cb21e.js";import{g as f}from"./p-10c530d1.js";import"./p-9c3c64b9.js";import"./p-1004af75.js";const y=class{constructor(i){t(this,i),this.duetSlideoutEvent=e(this,"duetSlideoutEvent",7),this.exitLangObject={en:"Exit the menu",fi:"Poistu valikosta",sv:"Avsluta menyn"},this.topLevelOpenMenuBarLangObject={en:"Exit this menu to find top level items",fi:"Poistu tästä valikosta löytääksesi ylätason kohteet",sv:"Stäng den här menyn för att hitta objekt på toppnivå"},this.isSafariBrowser=/^((?!chrome|android).)*safari/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent),this.hasStickyHeaderSlot=!1,this.disconnectController=new AbortController,this.eventListenerController=new AbortController,this.setOpenButton=(t,e=!1)=>{if(this.eventListenerController&&this.eventListenerController.abort(),t)try{const i=t;i.accessiblePopup="true",i.accessibleExpanded=!1,this.openButton=i,e&&!this.disconnectController.signal.aborted&&(this.eventListenerController=new AbortController,this.openButton.addEventListener("click",this.openButtonEventListener,{signal:this.eventListenerController.signal}))}catch(t){console.error(t)}else this.openButton=void 0},this.setStickHeaderStyleMutations=(t=!1)=>{this.element.querySelectorAll('[slot="sticky-header"] duet-tab-group').forEach((e=>{e.style.position=t?null:"relative",e.style.top=t?null:"1px",e.switchLargeBreakpoint="always"}))},this.openButtonEventListener=t=>{this.onClick(t)},this.getOpenPanel=()=>this.element.querySelector("duet-slideout-panel[open]"),this.toggleMenu=t=>{this.open=!this.open,this.duetSlideoutEvent.emit({originalEvent:t,data:{element:this.element,open:this.open},component:"duet-slideout"})},this.onClick=t=>{this.toggleMenu(t)},this.language=u(),this.displaying=!1,this.openPanel=!1,this.theme="",this.accessibleRole="menubar",this.open=!1,this.backgroundColor="gray-lightest",this.modal=!0}get opener(){return this._opener}set opener(t){const e="string"==typeof t,i=e?document.getElementById(t):t;this.openButton!==i&&(this._opener=t,this.setOpenButton(i,e))}get controller(){return this._opener}set controller(t){this.opener=t}componentWillLoad(){a(this),this.hasStickyHeaderSlot=g(this.element,"sticky-header")}connectedCallback(){c(this),this.disconnectController&&this.disconnectController.signal.aborted&&(this.disconnectController=new AbortController),this.teleport||(this.teleport=new m(this.element)),this.teleport&&this.teleport.activate(),this.setStickHeaderStyleMutations(),this.mutationObserver||(this.mutationObserver=new MutationObserver((()=>{this.openPanel=!!this.getOpenPanel()}))),this.mutationObserver&&this.mutationObserver.observe(this.element,{childList:!0,attributeFilter:["open"],subtree:!0})}disconnectedCallback(){p(this),this.dialog&&this.modal&&d(this.dialog),this.mutationObserver&&this.mutationObserver.disconnect(),this.disconnectController&&this.disconnectController.abort(),this.setOpenButton(void 0),this.setStickHeaderStyleMutations(!0)}handleOpenChange(t,e){if(!!t!=!!e)if(this.open&&!e){this.openButton&&(this.openButton.accessibleExpanded=!0);const t=this.getOpenPanel();this.teleport.makeSiblingsInert(),this.modal&&n(this.dialog,{reserveScrollBarGap:!0}),t?t.setFocus():setTimeout((()=>{this.closeButton.focus()}),200)}else!this.open&&e&&(this.openButton&&(this.openButton.accessibleExpanded=!1),setTimeout((()=>{l(this.openButton),this.modal&&d(this.dialog),this.teleport.removeInertFromSiblings()}),200))}handleKeyUp(t){h(t)&&this.open&&this.toggleMenu(t)}handleDocumentClick(t){if(!this.open)return;const e=t.composedPath();e.includes(this.dialog)||e.includes(this.openButton)||this.toggleMenu(t)}async setFocus(t){var e;null===(e=this.openButton)||void 0===e||e.focus(t)}async toggle(){const t=new CustomEvent("toggle");this.toggleMenu(t),setTimeout((()=>{this.closeButton.focus()}),200)}async show(){this.open||(this.setOpenButton(document.activeElement),this.toggleMenu(new CustomEvent("toggle")))}async hide(){this.open&&this.toggleMenu(new CustomEvent("toggle"))}render(){const t={background:f(this.backgroundColor,this.theme)},e=b(this.topLevelOpenMenuBarLangObject),s=b(this.exitLangObject);return i(o,{key:"4adf7d99cbc333b181e8fd4866d08855eb6a6d1c"},i("div",{key:"78f45ec446655208a7bf17cfe3be6a4aebc5c181",class:{"duet-slideout":!0,"duet-theme-turva":"turva"===this.theme}},this.modal&&i("duet-overlay",{key:"278b3a9e1823ab3650f7fc705d3d7d41a676b70f",visible:this.open,"display-device":"large",zIndex:"600"}),i("div",{key:"c5fd8e77aa37a4e5106dafcc83a4b07098fc5695",ref:t=>this.dialog=t,tabindex:"-1",role:"dialog",id:"dialog","aria-labelledby":"button","aria-modal":!this.isSafariBrowser,"aria-flowto":"slot-container",class:{dialog:!0,hidden:!this.open,modal:this.modal},style:t},i(r,{key:"3d629c66c8376aec3febe6c9c0818b8a45df56a2",moveFocusTo:this.closeButton}),i("div",{key:"7792e9afa44d5ff99e1350e99f0ec4cf0a570067",class:{"top-container":!0,"has-sticky-header-slot":this.hasStickyHeaderSlot}},i("div",{key:"b1849e638fe366a073e2d247695ed828259f385a",class:"top"},i("button",{key:"cfd4aaf534427596f9fe01415e42bf355608798a",ref:t=>this.closeButton=t,"aria-haspopup":"dialog","aria-controls":"dialog","aria-expanded":this.open?"true":"false","aria-label":`${s}`,type:"button",class:{"slideout-close":!0,active:this.open},onClick:this.onClick,inert:this.openPanel},i("duet-icon",{key:"410f3f0ce0f8e66791f998f3fb9169ddcd6723c7",name:"navigation-close",size:"small",margin:"none",color:"secondary"}))),i("div",{key:"6341b9c23dd91454d7e8bb38201578a02906cb15",class:"sticky-header"},i("slot",{key:"a9128943f3767198b7b3602dd242ab35ee7fc104",name:"sticky-header"}))),i("div",{key:"53aa0fd6b0097f061b2d5767b8a0b4a360a78040",id:"slot-container",role:this.accessibleRole,"aria-label":this.openPanel?e:null,class:{items:!0}},i("slot",{key:"d0bb2bfede05aae54cd56e487fb7a69b124b84ce"})),i(r,{key:"73d243e3a801c30a7706edac7d87a78a7750a4f1",moveFocusTo:this.closeButton}))))}get element(){return s(this)}static get watchers(){return{open:["handleOpenChange"]}}};y.style='*,*::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:absolute;height:100%}::slotted(*){position:relative;width:100%;visibility:hidden;opacity:0}:host([open]:not([open=false])) ::slotted(*){visibility:visible;opacity:1}:host(:not([open])) ::slotted(duet-slideout-panel){display:none}.duet-slideout{display:flex;align-items:center;height:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(8, 42, 77)}.duet-slideout.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:rgb(23, 28, 58)}@media (min-width: 62em){.duet-slideout.duet-theme-turva .desktop-bg{background:rgb(23, 28, 58)}}.duet-slideout .dialog{position:fixed;top:0;bottom:0;left:0;z-index:600;width:100%;height:100%;padding-bottom:75px;overflow-y:auto;box-shadow:0 3px 6px 0 rgba(0, 41, 77, 0.1) inset}.duet-slideout .dialog:not(.modal){box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 62em){.duet-slideout .dialog{right:0;left:auto;width:500px;padding-bottom:0;transition:right 300ms ease;transition-delay:0s}}.duet-slideout .dialog .top-container.has-sticky-header-slot{position:sticky;top:0;z-index:200}.duet-slideout .dialog .top-container.has-sticky-header-slot .top{background:rgb(240, 247, 250)}.duet-slideout .dialog .top-container.has-sticky-header-slot .sticky-header{display:block}.duet-slideout .dialog .top{position:relative;z-index:1;display:flex;align-items:center;justify-content:flex-end;padding:4px}.duet-slideout .dialog .top button{cursor:pointer}.duet-slideout .dialog .top button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-slideout .dialog .top duet-icon{padding:16px}.duet-slideout .dialog .sticky-header{display:none;width:100%;padding:0 1.5rem;margin-bottom:20px;background:rgb(240, 247, 250);border-bottom:1px solid rgb(212, 223, 229)}.duet-slideout .dialog .items{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;padding:0 1.5rem}.duet-slideout .dialog.hidden{pointer-events:none;visibility:hidden}@media (min-width: 62em){.duet-slideout .dialog.hidden{right:-500px;transition:300ms ease}}.duet-slideout.duet-theme-turva .dialog{box-shadow:0 3px 6px 0 rgba(23, 28, 58, 0.1) inset}.duet-slideout.duet-theme-turva .dialog:not(.modal){box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}.duet-slideout.duet-theme-turva button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-slideout.duet-theme-turva button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-slideout.duet-theme-turva button.active{color:rgb(198, 12, 48)}.duet-slideout.duet-theme-turva button.active::after{background:rgb(198, 12, 48)}.duet-slideout.duet-theme-turva .has-sticky-header-slot .top{background:rgb(245, 247, 250)}.duet-slideout.duet-theme-turva .has-sticky-header-slot .sticky-header{background:rgb(245, 247, 250);border-bottom:1px solid rgb(222, 224, 228)}.duet-slideout.duet-theme-turva .dialog .top button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}slot{color:rgb(8, 42, 77)}.duet-theme-turva slot{color:rgb(23, 28, 58)}';export{y as duet_slideout}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,r as e,c as i,H as a,g as d,F as s}from"./p-d2a5a09f.js";import{i as l}from"./p-aaa7a7bd.js";import{f as o,d as n}from"./p-9e371678.js";import{i as r}from"./p-a45e3f8b.js";import{a as h,c as u,d as b,g as p,s as c}from"./p-c71a58da.js";import{p as m,s as f}from"./p-1004af75.js";import{b as g,a as y}from"./p-10c530d1.js";import{c as v}from"./p-5e59e970.js";import{p as x}from"./p-9c3c64b9.js";import{g as k,a as w}from"./p-571bc7a8.js";const T=({data:e,groupId:i,alignment:a})=>{const d=`duet-editable-table duet-editable-table-content-${i}`;return"string"==typeof e?t("td",{innerHTML:e,class:d,part:`${i}content`,style:{verticalAlign:a}}):t("td",{class:d,part:`${i}content`,style:{verticalAlign:a}},e)},L=class{constructor(t){e(this,t),this.duetTableToggle=i(this,"duetTableToggle",7),this.duetMenuClick=i(this,"duetMenuClick",7),this.hasHeadSlotFirst=!1,this.hasHeadSlotLast=!1,this.hasFootSlot=!1,this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"},this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"},this.toggleColumn=(t,e)=>{e.preventDefault();const{sort_order:i,direction:a,index:d,key:s}=t;this.duetTableToggle.emit({sort_order:i,index:d,direction:a,key:s,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{r(e)&&this.toggleColumn(t,e)},this.language=h(),this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.actions=void 0,this.columns=void 0,this.rows=void 0,this.sortable=!1,this.groupId="",this.theme="",this.accessibleRole=void 0,this.hideHeadVisually=!1}componentWillLoad(){l(this),this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']"),this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']"),this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")}connectedCallback(){u(this)}disconnectedCallback(){b(this)}createLabel(e){const{sort_order:i,direction:a,index:d,label:s}=e,l=p(s);return this.sortable?t("span",{class:"duet-table-label","data-index":d},t("duet-button",{size:"small",icon:i&&1===a?"action-arrow-down-small":i&&-1===a?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":!0,onClick:t=>this.toggleColumn(e,t),onKeyDown:t=>this.handleKeyDown(e,t)},l)):l}getSortedColumns(){return[...this.columns].sort(o(["index"]))}getRowSortOrder(){return[...this.columns].sort(o(["sort_order"])).filter((t=>t.sort_order)).map((t=>-1===t.direction?`-${t.key}`:t.key))}renderTableHeader(){if(!this.columns)return;const e=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((e=>{if(!1!==e.display){const i=this.createLabel(e);return""!==i?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,this.actionColumnLabel[this.language])))}renderActions(e,i){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((a=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:i}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:a.name,theme:this.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":`${e.actionDescription||""} ${p(a.label)} `}))))}renderTableBody(){const e=this.getSortedColumns(),i=this.getRowSortOrder();return[...this.rows].sort(o(i)).map(((i,a)=>t("tr",{class:{"duet-table-action-row":!!this.actions,"duet-editable-table-row":!0,[`duet-editable-table-row-${this.groupId}`]:!0},"data-meta":JSON.stringify(i.meta)},e.map((e=>{if(!1!==e.display)return t(T,{data:i[e.key]?i[e.key]:i.item,groupId:this.groupId})})),this.actions&&this.renderActions(i,a))))}render(){return t(a,{class:{[`duet-editable-table-${this.variation}`]:!0,"duet-editable-table":!0,[`duet-editable-table-${this.theme}`]:!0,"duet-editable-table-scrollable":"none-scrollable"===this.breakpoint,"duet-editable-table-sortable":this.sortable,"duet-editable-table-actions":!!this.actions,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,this.hasHeadSlotFirst&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),this.hasFootSlot&&t("tfoot",null,t("tr",null,t("td",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return d(this)}};L.style=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";const S={none:0,"with-links":16*parseFloat(m),"without-links":16*parseFloat(f)},E=class{constructor(t){e(this,t),this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=g.includes(this.breakpoint)?!t.matches:t.matches},this.matchesBreakpoint=!0,this.language=h(),this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.hideHeadVisually=!1}watchLanguageStateHandler(t,e){t!==e&&setTimeout((()=>this.copyHeadingsToCells()),50)}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":y[this.breakpoint]),this.mq.addEventListener("change",n(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>n(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(l(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=S[this.stickyDistance];this.element.querySelectorAll(this.headingSelector).forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords(),u(this)}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0,b(this)}copyHeadingsToCells(){const t=this.element.querySelectorAll(this.headingSelector),e=this.element.querySelectorAll("tbody tr"),i=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{if(i[e]){const a=t.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==i[e]){null==a||a.remove();const d=document.createElement("span");d.textContent=i[e],d.classList.add("duet-table-cell-heading"),d.setAttribute("aria-hidden","true"),d.inert=!0,t.prepend(d)}}}))}))}render(){return t(a,{key:"26ab3b66d99bdff07554198125e8867b84051c9f",class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-table-hide-head-visually":this.hideHeadVisually}},t("slot",{key:"1df61c45d1faa92385e24949ff773ec71852e0a5"}))}get element(){return d(this)}static get watchers(){return{language:["watchLanguageStateHandler"]}}};E.style='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(8, 42, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}duet-table.duet-theme-turva th{color:rgb(143, 147, 158)}duet-table tbody th{font-weight:600;color:rgb(8, 42, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}duet-table span.duet-table-cell-heading{display:none}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(8, 42, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(222, 224, 228)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(222, 224, 228)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(222, 224, 228)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(98, 121, 138)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(113, 118, 132)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(222, 224, 228)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(222, 224, 228)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(222, 224, 228)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(113, 118, 132, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';const j=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}],$={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"},M=({label:e,categoryLabel:i})=>t("div",{class:"items-header",tabindex:"-1","aria-label":p($)},i&&t("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(i)),t("duet-heading",{class:{"filename-header":!0,"no-category":!i},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(e))),z=(t,e,i)=>{const{allowedMimetypes:a,allowedExtensions:d,maxBytes:s}=e;let l=!1,o=k("default",i);if(t){const{name:e,type:n,size:r}=t,h=((t,e)=>{if(!e||!t)return!0;const i=e.split(",");let a=!1;return i.forEach((e=>{const i=e.split("/"),d=t.split("/");i[0]!==d[0]||i[1]!==d[1]&&"*"!==i[1]||(a=!0)})),a})(n,a),u="all"===d||""===d||" "===d||void 0===d||((t,e)=>{if(!e)return!0;const i=t.split(".");return e.split(",").includes(i[i.length-1])})(e.toLowerCase(),d),b=((t,e)=>!e||!t||e>=t)(r,s);h||(o=k("duet-upload-101",i)),u||(o=k("duet-upload-100",i)),b||(o=k("duet-upload-201",i)),l=h&&u&&b}else l=!1;return{valid:l,errorMessage:l?void 0:p(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},F=({payload:t,options:e,onFailure:i,onSuccess:a,onProgress:d})=>{const{type:s="POST",xhr:l,uri:o,argument:n=null,headers:r=null}=e;l.open(s,`${o}${n||""}`,!0);const{data:h,name:u}=t;return r&&Object.keys(r).forEach((t=>{l.setRequestHeader(t,r[t])})),"POST"===s&&(l.onreadystatechange=()=>{l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300&&a(l,u,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&i(l,u,l.status)},d(u)),l.send(h),l},C=class{constructor(a){e(this,a),this.duetChange=i(this,"duetChange",3),this.duetBlur=i(this,"duetBlur",7),this.duetFocus=i(this,"duetFocus",7),this.duetReady=i(this,"duetReady",7),this.duetDone=i(this,"duetDone",3),this.duetState=i(this,"duetState",3),this.duetDelete=i(this,"duetDelete",3),this.duetCancel=i(this,"duetCancel",3),this.duetProgress=i(this,"duetProgress",3),this.duetUpload=i(this,"duetUpload",3),this.linkClick=i(this,"linkClick",3),this.buttonId=v("DuetButton"),this.labelId=v("DuetLabel"),this.uploadId=v("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.filesToUploadExceedsLimit=!1,this.filesToUploadTotalSizeIsAboveMax=!1,this.internalStatusMessageLabel=void 0,this.itemRefs=new Map,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=n((()=>{this.tick=Date.now()}),30),this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"},this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:i,id:a,originalEvent:d}=e;switch(i){case"delete":this.onDelete(a,d);break;case"cancel":this.onCancel(a,d)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),i=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==i&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.pending?this.DefaultGroups.pending:t.group?t.group:"none":this.DefaultGroups.failure,this.mapFilesToUploadItems=(e,i,a,d)=>i===this.DefaultGroups.success?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,d),type:"success",data:e,showLinks:this.showLinks,linkClickEvent:this.emitEvent?this.linkClick:void 0,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.inprogress?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,d),type:"inprogress",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.pending?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,d),type:"pending",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.failure?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,d),type:"failure",data:e,showLinks:this.showLinks,errorCodes:this.errorCodes,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,i,a=!0)=>{try{const a=this.files.get(t);a[e]=i,this.files.set(t,a),this.external&&"url"!==e&&this.trackProgress(t,"uploaded"===e)}catch(t){}a&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(i=>{this.updateValueInMap(e,"progress",i),this.onProgress(e,i,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((i=>{i.valid&&!i.deleted?t.push(i):i.valid||i.deleted||e.push(i)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{const{bytesMaxReached:i,fileMaxReached:a}=this.validateTotals();i||a?this.kick():(this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault())},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,i)=>{this.updateValueInMap(e,"status",i,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const i=JSON.parse(t.response);this.updateValueInMap(e,"url",i.url)}catch(t){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,i)=>{try{const{error:i}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:i.message,type:i.type},!1)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:i},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",w("duet-upload-001",this.errorCodes))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(i+=t.size)})),i>=e))})(0,this.maxBytesTotal),i=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&i++})),i>=e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),i&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=i,{bytesMaxReached:e,fileMaxReached:i}},this.uploadFile=async(t,e=!1,i)=>{!e&&this.deferUpload?(this.updateValueInMap(t.item.name,"pending",!0,!1),this.updateValueInMap(t.item.name,"group","pending",!0)):e&&(this.updateValueInMap(t.item.name,"pending",!1,!1),this.updateValueInMap(t.item.name,"group",void 0,!0));try{if(!this.deferUpload||e){const e=new FormData;e.append("file",t.item),i&&e.append("key",i),e.append("uid",t.uid),e.append("name",t.item.name),e.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta})),t.xhr=await this.makeXHRPostRequest(e)}}catch(e){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of Array.from(this.files.entries()))"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,i]of Array.from(this.files.entries()))if(i.uid===t)return{value:i,key:e};return null},this.handleExternalUploadButton=(t,e)=>{this.externalUploadButton&&(this.externalUploadButton.disabled=!(!t&&!e))},this.onDelete=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:d,fileMaxReached:s}=this.validateTotals();this.handleExternalUploadButton(d,s),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:a},component:"duet-upload"}),this.external||a.pending||this.makeXHRDeleteRequest(a),this.resetFormFields()},this.onCancel=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:d,fileMaxReached:s}=this.validateTotals();if(this.handleExternalUploadButton(d,s),!this.external){const{xhr:t}=a;t&&t.abort()}this.kick(),this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:a},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,i)=>{this.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onReady=()=>{this.duetReady.emit({component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})},this.filterMap=()=>{const t=Array.from(this.files.values()),e=[],i=[],a=[],d=[];let s=!1;return t.forEach((t=>{const l=this.getGroupFromItemData(t);t.meta&&t.meta.badges&&(s=!0),l===this.DefaultGroups.success?d.push({uid:t.uid,data:t}):l===this.DefaultGroups.inprogress?e.push({uid:t.uid,data:t}):l===this.DefaultGroups.pending?a.push({uid:t.uid,data:t}):l===this.DefaultGroups.failure?i.push({uid:t.uid,data:t}):t.group&&e.push({uid:t.uid,data:t})})),{pending:a,failure:i,success:d,inprogress:e,hasCategory:s}},this.getActions=(t,e)=>e.filter((e=>e.map.includes(t))),this.renderUploadedItems=()=>{this.itemRefs.clear();const e=this.filterMap(),i=e.hasCategory,a=this.hideCancelButton?this.actions.filter((t=>"cancel"!==t.name)):this.actions,d=this.groups.map((d=>{const l=e[d.id];if(null==l?void 0:l.length)return t(s,null,!this.hideGroups&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:d.label}),l.map((t=>this.mapFilesToUploadItems(t.data,d.id,i,a))))}));return t(s,null,this.showUploadedItemsHeader&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:this.uploadedItemsHeaderLabel}),d)},this.tick=Date.now(),this.accessibleActiveDescendant=void 0,this.accessibleDescribedBy=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.external=!1,this.middleware=null,this.deferUpload=!1,this.hideButton=!1,this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}],this.uri=void 0,this.showLinks=!1,this.caption=void 0,this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}},this.statusMessageLabel=p(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=p(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.identifier=void 0,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=p(this.labelDefaults),this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."},this.description=p(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=p(this.fileListEmptyDefaults),this.error="",this.errorCodes=j,this.name=void 0,this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="",this.multiple=!0,this.limitSelection=!1,this.hideCancelButton=!1,this.value=void 0,this.externalUploadButtonId=void 0,this.captionOnBottom=!1,this.showUploadedItemsHeader=!1,this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"},this.headerHeadingLevel="h3",this.hideHeader=!1,this.emitEvent=!1,this.actionButtonTitles={cancel:!1,delete:!1},this.renameDuplicates=!1,this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?c(this.groups):this.statusMessageLabel,l(this),this.listenForActionEvents(),this.onReady(),this.externalUploadButton=document.querySelector(`#${this.externalUploadButtonId}`),this.processedButtonTitles=x(this.actionButtonTitles)}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){const{bytesMaxReached:e,fileMaxReached:i}=this.validateTotals();if(e||i)return this.handleExternalUploadButton(e,i),void this.kick();this.metaData=t,this.nativeInput.click()}async uploadPending(){this.uploadPendingFiles()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,i){this.updateValueInMap(t,e,i)}async focusActionButton(t){var e;await(null===(e=this.itemRefs.get(t))||void 0===e?void 0:e.focusActionButton())}render(){const e=this.identifier||this.uploadId,i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),d=Math.round(this.maxBytes/1024/1024);let l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return l=l.replace(/{maxbytes}/g,`${d.toString()} MB`),l=l.replace(/{maxbytestotal}/g,`${i.toString()} MB`),l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),this.externalUploadButton&&(this.externalUploadButton.accessibleLabel=`${this.externalUploadButton.innerText}. ${l}`),t(a,{key:"7f8970727b44bee3669b221659dd1f5a72df4ee2",class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{key:"074fc7ec948f6d0ab5c89c7d2d3d3ec3358343f4","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},t("slot",{key:"84797a77942534e80a641d8a2ce9badef0e77937",name:"header"}),!this.files.size&&t("duet-empty-state",{key:"224610821155dae048fd126b8d517486fa6efd38",id:this.labelId,part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",icon:"messaging-attachment"},t("duet-paragraph",{key:"6d01352482dd687520dd26d8d7c0d3863b61d4a4",margin:"none"},this.fileListEmpty)),!!this.files.size&&t("slot",{key:"328346632314eb8a8d0ae41de9761a488fc0bc1c",name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{key:"cab1390fc0ff3a6eb197be8e7ea16d719c2b6dc4",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&t("slot",{key:"26051e329900efc2b29e6d8ebb6b2f1184ec547c",name:"filefooter"}),t("slot",{key:"c9018b5e95065813d29ee08ce924794e1ee476ff",name:"uploadfooter"}),this.captionOnBottom&&t("duet-caption",{key:"8fffcc2935df87ccfa5bd89d3df773b9810d2f63",margin:"none",size:"small"},t("div",{key:"17c320b6eeefbd2b5f047b77eb613aa4e912cbdb",class:"upload-bottom-caption"},l)),t("slot",{key:"ada6f8c46784788c5900ad5a6dddfebed8a70e39",name:"afterfooter"}),!this.hideButton&&t(s,{key:"f352401910296a33c56ef5bb2e3f0b7e4be0594a"},t("duet-spacer",{key:"ae4ae0b0490a4e88dab0a7319fd2dde20f05e400",size:"large"}),t("duet-button",{key:"ded36c705e15f44936844d057962cb731d47941c",id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||`${this.buttonLabel}. ${l}`,"accessible-owns":e,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&t(s,{key:"385520d7dc48477cea039a0c71f1bcd5e1730cca"},t("duet-spacer",{key:"79ea5d94a4eda84e3f8328a2ac1e42890e0bbde2",size:"medium"}),t("duet-alert",{key:"33e5de19e511439a04deeb8478e167558946c4a7",part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&w("duet-upload-301",this.errorCodes),this.bytesMaxReached&&w("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&w("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&w("duet-upload-203",this.errorCodes))),t("duet-visually-hidden",{key:"2fc08bb48c1f47113399c63fd1a81dcef85fc0cf","aria-hidden":"true"},t("input",{key:"81268132202065717f2e21b1f8dc4ef3e2173394",ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))}makeXHRPostRequest(t){const e=new XMLHttpRequest,i=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,i)})),e.upload.addEventListener("load",(()=>{this.transferComplete(i)})),e.upload.addEventListener("error",(()=>{this.transferFailed(i)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(i)}));let a={payload:{data:t,name:i},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:void 0},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(a=this.middleware(a)),F(a)}makeXHRDeleteRequest(t){const{uid:e,item:i}=t,a=new XMLHttpRequest;let d={payload:{data:null,name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:`?key=${e}&name=${i.name}`,headers:{"x-fileuid":e,"x-filename":i.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(d=this.middleware(d)),F(d)}escapeSpecialCharacters(t){return(t+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")}getRenamedFileName(t,e){const i=new RegExp(`${this.escapeSpecialCharacters(t)} \\(\\d+\\).${e}`),a=Array.from(this.files.entries()).map((t=>{const[e,i]=t;return e})).filter((a=>i.test(a)||a===`${t}.${e}`)).sort(((t,e)=>t.split(".").slice(0,-1).join(".")>e.split(".").slice(0,-1).join(".")?1:-1)).pop().split(".").slice(0,-1).join(".");if(a===t)return`${t} (1).${e}`;const d=parseInt(a.split("(").pop().slice(0,-1));return`${t} (${d+1}).${e}`}renameFiles(t){return t.map((t=>{if(this.files.get(t.name)){const e=t.name.split("."),i=e.pop(),a=e.join("."),d=this.getRenamedFileName(a,i);return new File([t],d,{type:t.type,lastModified:t.lastModified})}return t}))}async onChange(t){var e;let i=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(this.filesToUploadExceedsLimit=!1,this.files.size+i.length>this.maxFiles)return this.filesToUploadExceedsLimit=!0,void this.kick();if(this.filesToUploadTotalSizeIsAboveMax=!1,((t,e,i)=>{let a=0;return!!(i&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),e.forEach((t=>{t.size&&(a+=t.size)})),a>=i))})(0,i,this.maxBytesTotal))return this.filesToUploadTotalSizeIsAboveMax=!0,void this.kick();if(i){this.renameDuplicates&&(i=this.renameFiles(i));for(const t of i){const{valid:e,errorMessage:i,errorType:a,errorSystem:d}=z(t,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),s={uid:this.genHashName(),item:t,size:t.size,meta:this.metaData,uploaded:!1,valid:e,error:{type:e?void 0:a,message:e?void 0:i,system_message:e?void 0:d},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(t.name,s),e&&!this.external?await this.uploadFile(s):e&&this.external?(this.updateValueInMap(s.item.name,"pending",!0,!1),this.updateValueInMap(s.item.name,"group","pending",!0)):e||this.updateValueInMap(t.name,"valid",!1,!0),this.kick()}}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}get element(){return d(this)}static get watchers(){return{valid:["watchValidHandler"]}}};C.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";export{L as duet_editable_table,E as duet_table,C as duet_upload}
|
|
4
|
+
import{h as t,r as e,c as i,H as a,g as s,F as d}from"./p-a083b91a.js";import{i as l}from"./p-aaa7a7bd.js";import{f as o,d as n}from"./p-9e371678.js";import{i as r}from"./p-a45e3f8b.js";import{a as h,c as u,d as b,g as p,s as c}from"./p-e3857119.js";import{p as m,s as f}from"./p-1004af75.js";import{b as g,a as y}from"./p-10c530d1.js";import{c as v}from"./p-5e59e970.js";import{p as x}from"./p-9c3c64b9.js";import{g as k,a as w}from"./p-7be5b9a7.js";const T=({data:e,groupId:i,alignment:a})=>{const s=`duet-editable-table duet-editable-table-content-${i}`;return"string"==typeof e?t("td",{innerHTML:e,class:s,part:`${i}content`,style:{verticalAlign:a}}):t("td",{class:s,part:`${i}content`,style:{verticalAlign:a}},e)},L=class{constructor(t){e(this,t),this.duetTableToggle=i(this,"duetTableToggle",7),this.duetMenuClick=i(this,"duetMenuClick",7),this.hasHeadSlotFirst=!1,this.hasHeadSlotLast=!1,this.hasFootSlot=!1,this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"},this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"},this.toggleColumn=(t,e)=>{e.preventDefault();const{sort_order:i,direction:a,index:s,key:d}=t;this.duetTableToggle.emit({sort_order:i,index:s,direction:a,key:d,component:"duet-editable-table",originalEvent:e})},this.handleKeyDown=(t,e)=>{r(e)&&this.toggleColumn(t,e)},this.language=h(),this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.actions=void 0,this.columns=void 0,this.rows=void 0,this.sortable=!1,this.groupId="",this.theme="",this.accessibleRole=void 0,this.hideHeadVisually=!1}componentWillLoad(){l(this),this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']"),this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']"),this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")}connectedCallback(){u(this)}disconnectedCallback(){b(this)}createLabel(e){const{sort_order:i,direction:a,index:s,label:d}=e,l=p(d);return this.sortable?t("span",{class:"duet-table-label","data-index":s},t("duet-button",{size:"small",icon:i&&1===a?"action-arrow-down-small":i&&-1===a?"action-arrow-up-small":"action-subtract-small","icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":!0,onClick:t=>this.toggleColumn(e,t),onKeyDown:t=>this.handleKeyDown(e,t)},l)):l}getSortedColumns(){return[...this.columns].sort(o(["index"]))}getRowSortOrder(){return[...this.columns].sort(o(["sort_order"])).filter((t=>t.sort_order)).map((t=>-1===t.direction?`-${t.key}`:t.key))}renderTableHeader(){if(!this.columns)return;const e=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((e=>{if(!1!==e.display){const i=this.createLabel(e);return""!==i?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,this.actionColumnLabel[this.language])))}renderActions(e,i){if(this.actions)return t("td",{class:"duet-text-right"},this.actions.map((a=>t("duet-action-button",{actionMeta:Object.assign({},(null==e?void 0:e.meta)||{},{index:i}),actionId:(null==e?void 0:e.uid)||(null==e?void 0:e.id)||null,actionName:a.name,theme:this.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":`${e.actionDescription||""} ${p(a.label)} `}))))}renderTableBody(){const e=this.getSortedColumns(),i=this.getRowSortOrder();return[...this.rows].sort(o(i)).map(((i,a)=>t("tr",{class:{"duet-table-action-row":!!this.actions,"duet-editable-table-row":!0,[`duet-editable-table-row-${this.groupId}`]:!0},"data-meta":JSON.stringify(i.meta)},e.map((e=>{if(!1!==e.display)return t(T,{data:i[e.key]?i[e.key]:i.item,groupId:this.groupId})})),this.actions&&this.renderActions(i,a))))}render(){return t(a,{class:{[`duet-editable-table-${this.variation}`]:!0,"duet-editable-table":!0,[`duet-editable-table-${this.theme}`]:!0,"duet-editable-table-scrollable":"none-scrollable"===this.breakpoint,"duet-editable-table-sortable":this.sortable,"duet-editable-table-actions":!!this.actions,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,this.hasHeadSlotFirst&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),this.hasFootSlot&&t("tfoot",null,t("tr",null,t("td",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))}get element(){return s(this)}};L.style=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";const S={none:0,"with-links":16*parseFloat(m),"without-links":16*parseFloat(f)},E=class{constructor(t){e(this,t),this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=g.includes(this.breakpoint)?!t.matches:t.matches},this.matchesBreakpoint=!0,this.language=h(),this.theme=void 0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.hideHeadVisually=!1}watchLanguageStateHandler(t,e){t!==e&&setTimeout((()=>this.copyHeadingsToCells()),50)}connectedCallback(){this.mq=matchMedia("none"===this.breakpoint||"none-scrollable"===this.breakpoint?"all":y[this.breakpoint]),this.mq.addEventListener("change",n(this.handleMediaQueryChange,50)),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>n(this.copyHeadingsToCells(),50))),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(l(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=S[this.stickyDistance];this.element.querySelectorAll(this.headingSelector).forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer&&this.observer.takeRecords(),u(this)}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0,b(this)}copyHeadingsToCells(){const t=this.element.querySelectorAll(this.headingSelector),e=this.element.querySelectorAll("tbody tr"),i=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{if(i[e]){const a=t.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==i[e]){null==a||a.remove();const s=document.createElement("span");s.textContent=i[e],s.classList.add("duet-table-cell-heading"),s.setAttribute("aria-hidden","true"),s.inert=!0,t.prepend(s)}}}))}))}render(){return t(a,{key:"b3ed604b2b5f0b8e31f7b90abc64693662bfef3d",class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-table-hide-head-visually":this.hideHeadVisually}},t("slot",{key:"29df6d3c640fbf3a7fa51b73323c3628246d3095"}))}get element(){return s(this)}static get watchers(){return{language:["watchLanguageStateHandler"]}}};E.style='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(8, 42, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}duet-table.duet-theme-turva th{color:rgb(143, 147, 158)}duet-table tbody th{font-weight:600;color:rgb(8, 42, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}duet-table span.duet-table-cell-heading{display:none}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(8, 42, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(222, 224, 228)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(222, 224, 228)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(222, 224, 228)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(98, 121, 138)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(113, 118, 132)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(222, 224, 228)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(222, 224, 228)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(222, 224, 228)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(113, 118, 132, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';const j=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}],$={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"},M=({label:e,categoryLabel:i})=>t("div",{class:"items-header",tabindex:"-1","aria-label":p($)},i&&t("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(i)),t("duet-heading",{class:{"filename-header":!0,"no-category":!i},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},p(e))),z=(t,e,i)=>{const{allowedMimetypes:a,allowedExtensions:s,maxBytes:d}=e;let l=!1,o=k("default",i);if(t){const{name:e,type:n,size:r}=t,h=((t,e)=>{if(!e||!t)return!0;const i=e.split(",");let a=!1;return i.forEach((e=>{const i=e.split("/"),s=t.split("/");i[0]!==s[0]||i[1]!==s[1]&&"*"!==i[1]||(a=!0)})),a})(n,a),u="all"===s||""===s||" "===s||void 0===s||((t,e)=>{if(!e)return!0;const i=t.split(".");return e.split(",").includes(i[i.length-1])})(e.toLowerCase(),s),b=((t,e)=>!e||!t||e>=t)(r,d);h||(o=k("duet-upload-101",i)),u||(o=k("duet-upload-100",i)),b||(o=k("duet-upload-201",i)),l=h&&u&&b}else l=!1;return{valid:l,errorMessage:l?void 0:p(o.message),errorSystem:l?void 0:o.system_message,errorType:l?void 0:o.type}},F=({payload:t,options:e,onFailure:i,onSuccess:a,onProgress:s})=>{const{type:d="POST",xhr:l,uri:o,argument:n=null,headers:r=null}=e;l.open(d,`${o}${n||""}`,!0);const{data:h,name:u}=t;return r&&Object.keys(r).forEach((t=>{l.setRequestHeader(t,r[t])})),"POST"===d&&(l.onreadystatechange=()=>{l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300&&a(l,u,l.status),l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999&&i(l,u,l.status)},s(u)),l.send(h),l},C=class{constructor(a){e(this,a),this.duetChange=i(this,"duetChange",3),this.duetBlur=i(this,"duetBlur",7),this.duetFocus=i(this,"duetFocus",7),this.duetReady=i(this,"duetReady",7),this.duetDone=i(this,"duetDone",3),this.duetState=i(this,"duetState",3),this.duetDelete=i(this,"duetDelete",3),this.duetCancel=i(this,"duetCancel",3),this.duetProgress=i(this,"duetProgress",3),this.duetUpload=i(this,"duetUpload",3),this.linkClick=i(this,"linkClick",3),this.buttonId=v("DuetButton"),this.labelId=v("DuetLabel"),this.uploadId=v("DuetUpload"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.filesToUploadExceedsLimit=!1,this.filesToUploadTotalSizeIsAboveMax=!1,this.internalStatusMessageLabel=void 0,this.itemRefs=new Map,this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"},this.kick=n((()=>{this.tick=Date.now()}),30),this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"},this.listenForActionEvents=()=>{this.element.addEventListener("duetActionEvent",(t=>{const e=t.detail,{action:i,id:a,originalEvent:s}=e;switch(i){case"delete":this.onDelete(a,s);break;case"cancel":this.onCancel(a,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),i=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==i&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.pending?this.DefaultGroups.pending:t.group?t.group:"none":this.DefaultGroups.failure,this.mapFilesToUploadItems=(e,i,a,s)=>i===this.DefaultGroups.success?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"success",data:e,showLinks:this.showLinks,linkClickEvent:this.emitEvent?this.linkClick:void 0,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.inprogress?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"inprogress",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.pending?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"pending",data:e,showLinks:this.showLinks,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):i===this.DefaultGroups.failure?t("duet-upload-item",{theme:this.theme,actions:this.getActions(i,s),type:"failure",data:e,showLinks:this.showLinks,errorCodes:this.errorCodes,categoryLabel:this.categoryLabel,label:this.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:this.processedButtonTitles,ref:t=>{this.itemRefs.set(e.uid,t)}}):e.group?e.html:"none",this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,i,a=!0)=>{try{const a=this.files.get(t);a[e]=i,this.files.set(t,a),this.external&&"url"!==e&&this.trackProgress(t,"uploaded"===e)}catch(t){}a&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(i=>{this.updateValueInMap(e,"progress",i),this.onProgress(e,i,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((i=>{i.valid&&!i.deleted?t.push(i):i.valid||i.deleted||e.push(i)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{const{bytesMaxReached:i,fileMaxReached:a}=this.validateTotals();i||a?this.kick():(this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault())},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,i)=>{this.updateValueInMap(e,"status",i,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const i=JSON.parse(t.response);this.updateValueInMap(e,"url",i.url)}catch(t){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,i)=>{try{const{error:i}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:i.message,type:i.type},!1)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:i},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",w("duet-upload-001",this.errorCodes))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(i+=t.size)})),i>=e))})(0,this.maxBytesTotal),i=((t,e)=>{let i=0;return!!(e&&(this.files.forEach((t=>{t.valid&&i++})),i>=e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",w("duet-upload-202",this.errorCodes),!1),i&&t&&this.updateValueInMap(t,"error",w("duet-upload-301",this.errorCodes),!1),this.bytesMaxReached=e,this.fileMaxReached=i,{bytesMaxReached:e,fileMaxReached:i}},this.uploadFile=async(t,e=!1,i)=>{!e&&this.deferUpload?(this.updateValueInMap(t.item.name,"pending",!0,!1),this.updateValueInMap(t.item.name,"group","pending",!0)):e&&(this.updateValueInMap(t.item.name,"pending",!1,!1),this.updateValueInMap(t.item.name,"group",void 0,!0));try{if(!this.deferUpload||e){const e=new FormData;e.append("file",t.item),i&&e.append("key",i),e.append("uid",t.uid),e.append("name",t.item.name),e.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta})),t.xhr=await this.makeXHRPostRequest(e)}}catch(e){this.updateValueInMap(t.item.name,"valid",!1,!1)}},this.uploadPendingFiles=()=>{for(const[t,e]of Array.from(this.files.entries()))"pending"===e.group&&!0===e.pending&&this.uploadFile(e,!0,t)},this.getItemFromUID=t=>{for(const[e,i]of Array.from(this.files.entries()))if(i.uid===t)return{value:i,key:e};return null},this.handleExternalUploadButton=(t,e)=>{this.externalUploadButton&&(this.externalUploadButton.disabled=!(!t&&!e))},this.onDelete=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();this.handleExternalUploadButton(s,d),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:a},component:"duet-upload"}),this.external||a.pending||this.makeXHRDeleteRequest(a),this.resetFormFields()},this.onCancel=(t,e)=>{const i=this.getItemFromUID(t).key,a=this.files.get(i);this.files.delete(i);const{bytesMaxReached:s,fileMaxReached:d}=this.validateTotals();if(this.handleExternalUploadButton(s,d),!this.external){const{xhr:t}=a;t&&t.abort()}this.kick(),this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:a},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,i)=>{this.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onReady=()=>{this.duetReady.emit({component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})},this.filterMap=()=>{const t=Array.from(this.files.values()),e=[],i=[],a=[],s=[];let d=!1;return t.forEach((t=>{const l=this.getGroupFromItemData(t);t.meta&&t.meta.badges&&(d=!0),l===this.DefaultGroups.success?s.push({uid:t.uid,data:t}):l===this.DefaultGroups.inprogress?e.push({uid:t.uid,data:t}):l===this.DefaultGroups.pending?a.push({uid:t.uid,data:t}):l===this.DefaultGroups.failure?i.push({uid:t.uid,data:t}):t.group&&e.push({uid:t.uid,data:t})})),{pending:a,failure:i,success:s,inprogress:e,hasCategory:d}},this.getActions=(t,e)=>e.filter((e=>e.map.includes(t))),this.renderUploadedItems=()=>{this.itemRefs.clear();const e=this.filterMap(),i=e.hasCategory,a=this.hideCancelButton?this.actions.filter((t=>"cancel"!==t.name)):this.actions,s=this.groups.map((s=>{const l=e[s.id];if(null==l?void 0:l.length)return t(d,null,!this.hideGroups&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:s.label}),l.map((t=>this.mapFilesToUploadItems(t.data,s.id,i,a))))}));return t(d,null,this.showUploadedItemsHeader&&t(M,{categoryLabel:i?this.categoryLabel:void 0,label:this.uploadedItemsHeaderLabel}),s)},this.tick=Date.now(),this.accessibleActiveDescendant=void 0,this.accessibleDescribedBy=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.external=!1,this.middleware=null,this.deferUpload=!1,this.hideButton=!1,this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}],this.uri=void 0,this.showLinks=!1,this.caption=void 0,this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}},this.statusMessageLabel=p(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=p(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.identifier=void 0,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=p(this.labelDefaults),this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."},this.description=p(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=p(this.fileListEmptyDefaults),this.error="",this.errorCodes=j,this.name=void 0,this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="",this.multiple=!0,this.limitSelection=!1,this.hideCancelButton=!1,this.value=void 0,this.externalUploadButtonId=void 0,this.captionOnBottom=!1,this.showUploadedItemsHeader=!1,this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"},this.headerHeadingLevel="h3",this.hideHeader=!1,this.emitEvent=!1,this.actionButtonTitles={cancel:!1,delete:!1},this.renameDuplicates=!1,this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?c(this.groups):this.statusMessageLabel,l(this),this.listenForActionEvents(),this.onReady(),this.externalUploadButton=document.querySelector(`#${this.externalUploadButtonId}`),this.processedButtonTitles=x(this.actionButtonTitles)}componentWillRender(){this.verifyValidity()}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){const{bytesMaxReached:e,fileMaxReached:i}=this.validateTotals();if(e||i)return this.handleExternalUploadButton(e,i),void this.kick();this.metaData=t,this.nativeInput.click()}async uploadPending(){this.uploadPendingFiles()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,i){this.updateValueInMap(t,e,i)}async focusActionButton(t){var e;await(null===(e=this.itemRefs.get(t))||void 0===e?void 0:e.focusActionButton())}render(){const e=this.identifier||this.uploadId,i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024),s=Math.round(this.maxBytes/1024/1024);let l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return l=l.replace(/{maxbytes}/g,`${s.toString()} MB`),l=l.replace(/{maxbytestotal}/g,`${i.toString()} MB`),l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),this.externalUploadButton&&(this.externalUploadButton.accessibleLabel=`${this.externalUploadButton.innerText}. ${l}`),t(a,{key:"38feaf3413c255e5602a19102a388d6711488a96",class:{"duet-m-0":"none"===this.margin}},t("duet-fieldset",{key:"f9d0d2c774f44f358468d0e4ce6f782cbcbf3154","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},t("slot",{key:"842fd73d7a52c84756eb16f16fd7adc45a04e85b",name:"header"}),!this.files.size&&t("duet-empty-state",{key:"a6395aad02057aee59a1bf6e4c003409c93c3022",id:this.labelId,part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",icon:"messaging-attachment"},t("duet-paragraph",{key:"d918e8f0dc3e5259a79f29d32636f53c15be18c9",margin:"none"},this.fileListEmpty)),!!this.files.size&&t("slot",{key:"2404442011955d90a1f97a9c10156de9ef34ca71",name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{key:"904339cf1df017bbd912a030102b9fc834c3ffd1",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&t("slot",{key:"0ae4715f3f753a29fc05173d5322d9c3cc44c90d",name:"filefooter"}),t("slot",{key:"4d803341b66718656b31b5f934fb8d93eca9788d",name:"uploadfooter"}),this.captionOnBottom&&t("duet-caption",{key:"8037c4c708dafbf143d6af166d53f6671722bc7c",margin:"none",size:"small"},t("div",{key:"e428fa5083174ad4b33d1563d6650743b06a9c10",class:"upload-bottom-caption"},l)),t("slot",{key:"3566dfc4ec670a6d9ac643c86b677c51a4c2af2b",name:"afterfooter"}),!this.hideButton&&t(d,{key:"f28ec47277260bd20ca1edf2337028cc1f3e80a1"},t("duet-spacer",{key:"0224d4006036fac15971565b81ef29b0f9ae001d",size:"large"}),t("duet-button",{key:"4e8a7a0ad1861117d45c36d3150d5ff3208bea12",id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||`${this.buttonLabel}. ${l}`,"accessible-owns":e,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&t(d,{key:"864de6deba948873fe7ada428e1af73106320c47"},t("duet-spacer",{key:"6540680972c8d28ef7f699cce9eb0440e3c913b5",size:"medium"}),t("duet-alert",{key:"0c566f6e55449a1e9067a749f937827b0935ab3d",part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&w("duet-upload-301",this.errorCodes),this.bytesMaxReached&&w("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&w("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&w("duet-upload-203",this.errorCodes))),t("duet-visually-hidden",{key:"36e20ff69c0ec8eb36ccd907ef1cf87453ce4815","aria-hidden":"true"},t("input",{key:"d567ddb0ef056f02ac40e2595ecf97bfaded35d7",ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))}makeXHRPostRequest(t){const e=new XMLHttpRequest,i=t.get("name");e.upload.addEventListener("progress",(t=>{this.updateProgress(t,i)})),e.upload.addEventListener("load",(()=>{this.transferComplete(i)})),e.upload.addEventListener("error",(()=>{this.transferFailed(i)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(i)}));let a={payload:{data:t,name:i},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:void 0},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(a=this.middleware(a)),F(a)}makeXHRDeleteRequest(t){const{uid:e,item:i}=t,a=new XMLHttpRequest;let s={payload:{data:null,name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:`?key=${e}&name=${i.name}`,headers:{"x-fileuid":e,"x-filename":i.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};return this.middleware&&(s=this.middleware(s)),F(s)}escapeSpecialCharacters(t){return(t+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")}getRenamedFileName(t,e){const i=new RegExp(`${this.escapeSpecialCharacters(t)} \\(\\d+\\).${e}`),a=Array.from(this.files.entries()).map((t=>{const[e,i]=t;return e})).filter((a=>i.test(a)||a===`${t}.${e}`)).sort(((t,e)=>t.split(".").slice(0,-1).join(".")>e.split(".").slice(0,-1).join(".")?1:-1)).pop().split(".").slice(0,-1).join(".");if(a===t)return`${t} (1).${e}`;const s=parseInt(a.split("(").pop().slice(0,-1));return`${t} (${s+1}).${e}`}renameFiles(t){return t.map((t=>{if(this.files.get(t.name)){const e=t.name.split("."),i=e.pop(),a=e.join("."),s=this.getRenamedFileName(a,i);return new File([t],s,{type:t.type,lastModified:t.lastModified})}return t}))}async onChange(t){var e;let i=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(this.filesToUploadExceedsLimit=!1,this.files.size+i.length>this.maxFiles)return this.filesToUploadExceedsLimit=!0,void this.kick();if(this.filesToUploadTotalSizeIsAboveMax=!1,((t,e,i)=>{let a=0;return!!(i&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),e.forEach((t=>{t.size&&(a+=t.size)})),a>=i))})(0,i,this.maxBytesTotal))return this.filesToUploadTotalSizeIsAboveMax=!0,void this.kick();if(i){this.renameDuplicates&&(i=this.renameFiles(i));for(const t of i){const{valid:e,errorMessage:i,errorType:a,errorSystem:s}=z(t,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),d={uid:this.genHashName(),item:t,size:t.size,meta:this.metaData,uploaded:!1,valid:e,error:{type:e?void 0:a,message:e?void 0:i,system_message:e?void 0:s},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(t.name,d),e&&!this.external?await this.uploadFile(d):e&&this.external?(this.updateValueInMap(d.item.name,"pending",!0,!1),this.updateValueInMap(d.item.name,"group","pending",!0)):e||this.updateValueInMap(t.name,"valid",!1,!0),this.kick()}}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}get element(){return s(this)}static get watchers(){return{valid:["watchValidHandler"]}}};C.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";export{L as duet_editable_table,E as duet_table,C as duet_upload}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as i,H as n,g as e}from"./p-d2a5a09f.js";import{a as d,m as r,b as a}from"./p-f6000a03.js";import{w as o,a as m}from"./p-7d8a2628.js";import{i as l}from"./p-aaa7a7bd.js";function g(t){return"duet-grid-item"===t.tagName.toLowerCase()}const s=class{constructor(i){t(this,i),this.mql=[window.matchMedia(d.replace(/'/g,"")),window.matchMedia(r.replace(/'/g,"")),window.matchMedia(a.replace(/'/g,""))],this.distributeFormElement=!1,this.responsive=!1,this.breakpoint="small",this.direction="horizontal",this.rowReverse=!1,this.alignment="top",this.distribution="default",this.mobile="",this.gridTemplate=null}outerHeight(t){const i=t.offsetHeight,n=window.getComputedStyle(t);return["top","bottom"].map((t=>parseInt(n[`margin-${t}`]))).reduce(((t,i)=>t+i),i)}async connectedCallback(){const t=this.element;if(this.distributeFormElement="form_distribute"===this.alignment,this.mutationO=o(t,"duet-grid-item",(()=>{this.updateGridItems()})),this.distributeFormElement){this.mutation1=m(t,"duet-input",(()=>{this.updateGridItemsWithInputFields()}));for(let t=0;t<this.mql.length;t++)this.mql[t].addEventListener&&this.mql[t].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}this.updateGridItems()}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.mutation1&&(this.mutation1.disconnect(),this.mutation1=void 0);for(let t=0;t<this.mql.length;t++)this.mql[t].removeEventListener&&this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}async updateGridItems(){Array.from(this.element.children).filter(g).forEach((t=>{t.responsive=this.responsive,t.breakpoint=this.breakpoint,t.direction=this.direction,t.rowReverse=this.rowReverse}))}async updateGridItemsWithInputFields(){const t=Array.from(this.element.children).filter(g),i=!!window&&"column"===window.getComputedStyle(this.element).flexDirection;let n=0;const e=[];t.forEach((t=>{const i=t.querySelector("span.duet-input-error"),n=i?this.outerHeight(i):0;e.push(n)})),n=Math.max(...e),t.forEach((t=>{const e=t.querySelector("span.duet-input-error"),d=e?this.outerHeight(e):0;d<n&&!i?t.setAttribute("style",`padding-bottom: ${n-d}px;`):(d===n||i)&&t.setAttribute("style","padding-bottom: 0px;")}))}render(){return i(n,{class:{"duet-grid":!0,"duet-no-stacking":!this.responsive,"duet-grid-align-top":"top"===this.alignment,"duet-grid-align-bottom":"bottom"===this.alignment||"form_distribute"===this.alignment,"duet-grid-align-center":"center"===this.alignment,"duet-grid-align-stretch":"stretch"===this.alignment,"duet-grid-align-baseline":"baseline"===this.alignment,"duet-grid-distribution-left":"left"===this.distribution,"duet-grid-distribution-right":"right"===this.distribution,"duet-grid-distribution-center":"center"===this.distribution,"duet-grid-distribution-between":"space-between"===this.distribution,"duet-grid-distribution-around":"space-around"===this.distribution,"duet-grid-distribution-evenly":"space-evenly"===this.distribution,"duet-grid-mobile-left":"left"===this.mobile,"duet-grid-mobile-center":"center"===this.mobile,"duet-grid-mobile-right":"right"===this.mobile,"duet-grid-direction-horizontal":"horizontal"===this.direction,"duet-grid-direction-vertical":"vertical"===this.direction,"duet-grid-breakpoint-x-small":"x-small"===this.breakpoint,"duet-grid-breakpoint-small":"small"===this.breakpoint,"duet-grid-breakpoint-medium":"medium"===this.breakpoint,"duet-grid-breakpoint-large":"large"===this.breakpoint,"duet-grid-breakpoint-x-large":"x-large"===this.breakpoint,"duet-grid-row-reverse":this.rowReverse,["duet-grid-variation-"+(this.gridTemplate?"grid":"flex")]:!0,[`duet-grid-template-${this.gridTemplate}`]:!0}},i("slot",null))}get element(){return e(this)}static get watchers(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"],direction:["updateGridItems"]}}};s.style=":host {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n}\n\n:host(.duet-grid-variation-flex) {\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n width: 100%;\n max-width: 100%;\n height: auto;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: row !important;\n}\n@media (max-width: 22.5em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-wrap) {\n flex-wrap: wrap !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking) {\n flex-direction: row !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n}\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n}\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-no-stacking) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-no-stacking) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-no-stacking) {\n align-items: center !important;\n}\n\n.duet-grid-align-stretch.duet-no-stacking {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-no-stacking) {\n align-items: baseline !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-small) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-small) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-small) {\n align-items: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-small) {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-small) {\n align-items: baseline !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-small) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-small) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-small) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-small) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-small) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-medium) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-medium) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-medium) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-medium) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-medium) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-large) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-large) {\n align-items: baseline !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-left) {\n justify-content: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-right) {\n justify-content: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-center) {\n justify-content: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-between) {\n justify-content: space-between !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-around) {\n justify-content: space-around !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-evenly) {\n justify-content: space-evenly !important;\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-left) {\n align-items: flex-start !important;\n justify-content: flex-start !important;\n text-align: left !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) {\n align-items: center !important;\n justify-content: center !important;\n text-align: center !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) * {\n text-align: center !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) {\n align-items: flex-end !important;\n justify-content: flex-end !important;\n text-align: right !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) * {\n text-align: right !important;\n }\n}\n\n:host(.duet-grid-variation-grid) {\n display: grid;\n grid-template-rows: repeat(1, 1fr);\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 16px;\n align-items: flex-start;\n justify-content: center;\n padding: 0 20px;\n container-type: inline-size;\n overflow-x: clip;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid) {\n gap: 24px;\n padding: 0 40px;\n }\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(8, 55px);\n gap: 24px 32px;\n padding: 0;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, minmax(0, 1fr));\n padding: 0 64px;\n }\n}\n@media (min-width: 76.25em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, 55px);\n gap: 40px;\n padding: 0;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 3/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 2/span 10;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 12;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 5/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 6;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 5/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 7/span 6;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 5/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n grid-template-columns: minmax(0, 1fr);\n gap: 12px;\n padding: 0;\n /* stylelint-disable */\n /* stylelint-disable */\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n gap: 16px;\n }\n}\n@container (min-width: 664px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n@container (min-width: 1100px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n}";const u=class{constructor(i){t(this,i),this.fill=!1,this.maxWidth=void 0,this.minWidth=void 0,this.theme="",this.margin="auto",this.responsive=!1,this.direction="horizontal",this.breakpoint="small",this.rowReverse=!1}componentWillLoad(){l(this)}render(){return i(n,{style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-grid-item":!0,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-row-reverse":this.rowReverse,"duet-grid-direction-horizontal":"horizontal"===this.direction,"duet-grid-direction-vertical":"vertical"===this.direction,"duet-grid-item-br-x-small":"x-small"===this.breakpoint,"duet-grid-item-br-small":"small"===this.breakpoint,"duet-grid-item-br-medium":"medium"===this.breakpoint,"duet-grid-item-br-large":"large"===this.breakpoint,"duet-grid-item-br-x-large":"x-large"===this.breakpoint}},i("slot",null))}};u.style=':host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:rgb(8, 42, 77)}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-child){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-of-type){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-child){padding-right:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-child){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-child){padding-left:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-of-type){padding-left:0}@media (max-width: 35.9375em){:host(.duet-grid-item-responsive){width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-br-medium){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-responsive.duet-grid-item-br-medium){padding-right:0;padding-left:0}}@media screen and (max-width: 64em){:host(.duet-grid-item-br-x-large){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){:host(.duet-grid-item-responsive.duet-grid-item-br-x-large){padding-right:0;padding-left:0}}:host(.duet-grid-item-fill){flex:1 1 auto;width:100%}:host(.duet-theme-turva){font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}:host(.duet-m-0){padding:0 !important;margin:0 !important}';export{s as duet_grid,u as duet_grid_item}
|
|
4
|
+
import{r as t,h as i,H as n,g as e}from"./p-a083b91a.js";import{a as d,m as r,b as a}from"./p-f6000a03.js";import{w as o,a as m}from"./p-7d8a2628.js";import{i as l}from"./p-aaa7a7bd.js";function g(t){return"duet-grid-item"===t.tagName.toLowerCase()}const s=class{constructor(i){t(this,i),this.mql=[window.matchMedia(d.replace(/'/g,"")),window.matchMedia(r.replace(/'/g,"")),window.matchMedia(a.replace(/'/g,""))],this.distributeFormElement=!1,this.responsive=!1,this.breakpoint="small",this.direction="horizontal",this.rowReverse=!1,this.alignment="top",this.distribution="default",this.mobile="",this.gridTemplate=null}outerHeight(t){const i=t.offsetHeight,n=window.getComputedStyle(t);return["top","bottom"].map((t=>parseInt(n[`margin-${t}`]))).reduce(((t,i)=>t+i),i)}async connectedCallback(){const t=this.element;if(this.distributeFormElement="form_distribute"===this.alignment,this.mutationO=o(t,"duet-grid-item",(()=>{this.updateGridItems()})),this.distributeFormElement){this.mutation1=m(t,"duet-input",(()=>{this.updateGridItemsWithInputFields()}));for(let t=0;t<this.mql.length;t++)this.mql[t].addEventListener&&this.mql[t].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}this.updateGridItems()}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.mutation1&&(this.mutation1.disconnect(),this.mutation1=void 0);for(let t=0;t<this.mql.length;t++)this.mql[t].removeEventListener&&this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}async updateGridItems(){Array.from(this.element.children).filter(g).forEach((t=>{t.responsive=this.responsive,t.breakpoint=this.breakpoint,t.direction=this.direction,t.rowReverse=this.rowReverse}))}async updateGridItemsWithInputFields(){const t=Array.from(this.element.children).filter(g),i=!!window&&"column"===window.getComputedStyle(this.element).flexDirection;let n=0;const e=[];t.forEach((t=>{const i=t.querySelector("span.duet-input-error"),n=i?this.outerHeight(i):0;e.push(n)})),n=Math.max(...e),t.forEach((t=>{const e=t.querySelector("span.duet-input-error"),d=e?this.outerHeight(e):0;d<n&&!i?t.setAttribute("style",`padding-bottom: ${n-d}px;`):(d===n||i)&&t.setAttribute("style","padding-bottom: 0px;")}))}render(){return i(n,{class:{"duet-grid":!0,"duet-no-stacking":!this.responsive,"duet-grid-align-top":"top"===this.alignment,"duet-grid-align-bottom":"bottom"===this.alignment||"form_distribute"===this.alignment,"duet-grid-align-center":"center"===this.alignment,"duet-grid-align-stretch":"stretch"===this.alignment,"duet-grid-align-baseline":"baseline"===this.alignment,"duet-grid-distribution-left":"left"===this.distribution,"duet-grid-distribution-right":"right"===this.distribution,"duet-grid-distribution-center":"center"===this.distribution,"duet-grid-distribution-between":"space-between"===this.distribution,"duet-grid-distribution-around":"space-around"===this.distribution,"duet-grid-distribution-evenly":"space-evenly"===this.distribution,"duet-grid-mobile-left":"left"===this.mobile,"duet-grid-mobile-center":"center"===this.mobile,"duet-grid-mobile-right":"right"===this.mobile,"duet-grid-direction-horizontal":"horizontal"===this.direction,"duet-grid-direction-vertical":"vertical"===this.direction,"duet-grid-breakpoint-x-small":"x-small"===this.breakpoint,"duet-grid-breakpoint-small":"small"===this.breakpoint,"duet-grid-breakpoint-medium":"medium"===this.breakpoint,"duet-grid-breakpoint-large":"large"===this.breakpoint,"duet-grid-breakpoint-x-large":"x-large"===this.breakpoint,"duet-grid-row-reverse":this.rowReverse,["duet-grid-variation-"+(this.gridTemplate?"grid":"flex")]:!0,[`duet-grid-template-${this.gridTemplate}`]:!0}},i("slot",null))}get element(){return e(this)}static get watchers(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"],direction:["updateGridItems"]}}};s.style=":host {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n}\n\n:host(.duet-grid-variation-flex) {\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n width: 100%;\n max-width: 100%;\n height: auto;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: row !important;\n}\n@media (max-width: 22.5em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-wrap) {\n flex-wrap: wrap !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking) {\n flex-direction: row !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n}\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n}\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-no-stacking) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-no-stacking) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-no-stacking) {\n align-items: center !important;\n}\n\n.duet-grid-align-stretch.duet-no-stacking {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-no-stacking) {\n align-items: baseline !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-small) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-small) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-small) {\n align-items: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-small) {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-small) {\n align-items: baseline !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-small) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-small) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-small) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-small) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-small) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-medium) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-medium) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-medium) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-medium) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-medium) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-large) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-large) {\n align-items: baseline !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-left) {\n justify-content: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-right) {\n justify-content: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-center) {\n justify-content: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-between) {\n justify-content: space-between !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-around) {\n justify-content: space-around !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-evenly) {\n justify-content: space-evenly !important;\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-left) {\n align-items: flex-start !important;\n justify-content: flex-start !important;\n text-align: left !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) {\n align-items: center !important;\n justify-content: center !important;\n text-align: center !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) * {\n text-align: center !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) {\n align-items: flex-end !important;\n justify-content: flex-end !important;\n text-align: right !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) * {\n text-align: right !important;\n }\n}\n\n:host(.duet-grid-variation-grid) {\n display: grid;\n grid-template-rows: repeat(1, 1fr);\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 16px;\n align-items: flex-start;\n justify-content: center;\n padding: 0 20px;\n container-type: inline-size;\n overflow-x: clip;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid) {\n gap: 24px;\n padding: 0 40px;\n }\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(8, 55px);\n gap: 24px 32px;\n padding: 0;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, minmax(0, 1fr));\n padding: 0 64px;\n }\n}\n@media (min-width: 76.25em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, 55px);\n gap: 40px;\n padding: 0;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 3/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 2/span 10;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 12;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 5/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 6;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 5/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 7/span 6;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 5/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n grid-template-columns: minmax(0, 1fr);\n gap: 12px;\n padding: 0;\n /* stylelint-disable */\n /* stylelint-disable */\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n gap: 16px;\n }\n}\n@container (min-width: 664px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n@container (min-width: 1100px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n}";const u=class{constructor(i){t(this,i),this.fill=!1,this.maxWidth=void 0,this.minWidth=void 0,this.theme="",this.margin="auto",this.responsive=!1,this.direction="horizontal",this.breakpoint="small",this.rowReverse=!1}componentWillLoad(){l(this)}render(){return i(n,{style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme,"duet-grid-item":!0,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-row-reverse":this.rowReverse,"duet-grid-direction-horizontal":"horizontal"===this.direction,"duet-grid-direction-vertical":"vertical"===this.direction,"duet-grid-item-br-x-small":"x-small"===this.breakpoint,"duet-grid-item-br-small":"small"===this.breakpoint,"duet-grid-item-br-medium":"medium"===this.breakpoint,"duet-grid-item-br-large":"large"===this.breakpoint,"duet-grid-item-br-x-large":"x-large"===this.breakpoint}},i("slot",null))}};u.style=':host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:rgb(8, 42, 77)}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-child){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-of-type){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-child){padding-right:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-child){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-child){padding-left:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-of-type){padding-left:0}@media (max-width: 35.9375em){:host(.duet-grid-item-responsive){width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-br-medium){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-responsive.duet-grid-item-br-medium){padding-right:0;padding-left:0}}@media screen and (max-width: 64em){:host(.duet-grid-item-br-x-large){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){:host(.duet-grid-item-responsive.duet-grid-item-br-x-large){padding-right:0;padding-left:0}}:host(.duet-grid-item-fill){flex:1 1 auto;width:100%}:host(.duet-theme-turva){font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}:host(.duet-m-0){padding:0 !important;margin:0 !important}';export{s as duet_grid,u as duet_grid_item}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function r(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,s){function o(t){try{a(n.next(t))}catch(t){s(t)}}function u(t){try{a(n["throw"](t))}catch(t){s(t)}}function a(t){t.done?e(t.value):r(t.value).then(o,u)}a((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(i){return a([t,i])}}function a(u){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(e=0)),e)try{if(n=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){e.label=u[1];break}if(u[0]===6&&e.label<s[1]){e.label=s[1];s=u;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(u);break}if(s[2])e.ops.pop();e.trys.pop();continue}u=i.call(t,e)}catch(t){u=[6,t];r=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,i,e){if(e||arguments.length===2)for(var n=0,r=i.length,s;n<r;n++){if(s||!(n in i)){if(!s)s=Array.prototype.slice.call(i,0,n);s[n]=i[n]}}return t.concat(s||Array.prototype.slice.call(i))};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/System.register(["./p-07be03a5.system.js","./p-e216bea4.system.js","./p-e6b5a1c7.system.js","./p-41982d26.system.js","./p-752fa0fc.system.js","./p-7abde534.system.js","./p-59cbcc2e.system.js","./p-98636086.system.js"],(function(t){"use strict";var i,e,n,r,s,o,u,a,h,c,f,d,l,v,m,p,b,g,_,y;return{setters:[function(t){i=t.h;e=t.r;n=t.c;r=t.H;s=t.g},function(t){o=t.i},function(t){u=t.c},function(t){a=t.d},function(t){h=t.j;c=t.f;f=t.o;d=t.b;l=t.c},function(t){v=t.g;m=t.a;p=t.c;b=t.d},function(t){g=t.a},function(t){_=t.r;y=t.p}],execute:function(){var w=function(t){var e=t.item,n=t.activeDescendant,r=t.selected,s=t.label,o=s===void 0?undefined:s,u=t.clickHandler,a=u===void 0?function(t){t.preventDefault()}:u,h=t.keyHandler,c=h===void 0?function(t){t.preventDefault()}:h,f=t.search,d=t.isAndroidDevice,l=t.id;var v=f.split(" ").filter((function(t){return!!t.trim()})).map((function(t){return _(t)}));var m=f!==""?new RegExp("(".concat(v.join("|"),")"),"i"):undefined;var p="text-decoration: underline";return i("duet-popup-menu-item",{id:n?l:"",active:r,"data-index":e.id,"aria-selected":n?"true":undefined,"aria-current":r?"true":undefined,role:"option","aria-label":o,tabindex:d?"-1":null,onClick:function(t){return a(t)},onKeyUp:function(t){return c(t)},accessibleRole:"option",activeDescendant:n},m?i("span",{class:"option-container","aria-hidden":"true"},i("span",{innerHTML:e.name.replace(m,'<span style="'.concat(p,'">$&</span>'))})):e.name,e.tags&&i("span",{class:"option-tags"},e.tags.join(", ")))};var x='.sc-duet-combobox-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:inline-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";color:rgb(8, 42, 77)}.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(8, 42, 77);transition:none}.duet-theme-turva.sc-duet-combobox-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(23, 28, 58)}.combobox-menu-container.sc-duet-combobox{width:var(--popup-width);max-height:200px}';var S=x;var k=t("duet_combobox",function(){function t(t){var i=this;e(this,t);this.duetChange=n(this,"duetChange",3);var r,s;this.listBoxId=u("duet-combobox-list-element");this.inputId=u("duet-combobox-input-id");this.activeDescendantId=u("duet-combobox-active-descendant");this.isAndroidDevice=((s=(r=navigator===null||navigator===void 0?void 0:navigator.userAgent)===null||r===void 0?void 0:r.toLowerCase())===null||s===void 0?void 0:s.indexOf("android"))>-1||null;this.resizeObserver=new ResizeObserver(a((function(t){var e,n,r;if((t===null||t===void 0?void 0:t.length)===1){var s=(n=(e=t[0])===null||e===void 0?void 0:e.target)===null||n===void 0?void 0:n.getBoundingClientRect().width;var o=parseInt((r=getComputedStyle(i.listContainer.shadowRoot.querySelector(".duet-popup-menu-list")))===null||r===void 0?void 0:r.padding);i.listContainer.style.setProperty("--popup-width","".concat(s-2*o,"px"))}}),100));this.onInputChange=function(t){return __awaiter(i,void 0,void 0,(function(){var i;return __generator(this,(function(e){i=t.detail.value;this.inputValue=i;return[2]}))}))};this.onInputClick=function(){var t,e;if(i.openListOnClick){i.listOpen=!i.listOpen}else{i.listOpen=((t=i.inputValue)===null||t===void 0?void 0:t.length)>=i.minCharacters}if(!((e=i.getFilteredItems())===null||e===void 0?void 0:e.length)){i.listOpen=false}};this.onInputTyping=function(t){return __awaiter(i,void 0,void 0,(function(){var i,e;return __generator(this,(function(n){e=t.detail.value;if(!this.force&&!this.multiple&&this.selectedItems.size>0&&e!==this.getSelectedItemLabel()){this.selectedItems.clear()}if(!this.force&&!this.multiple&&e===""){this.value=undefined}this.listOpen=String(e).length>=this.minCharacters&&((i=this.getFilteredItems())===null||i===void 0?void 0:i.length)>0;return[2]}))}))};this.onKeyDown=function(t){var e,n,r;var s=i.returnFilteredOrNonFiltered();var o=s.filter((function(t){return!i.selectedItems.has(t.id)}));i.input.accessibleActiveDescendant=undefined;if(h(t)){t.preventDefault();if(i.listOpen&&i.activeItem!==undefined&&s[i.activeItem]&&!i.selectedItems.has(s[i.activeItem].id)){if(i.multiple){i.addSelectedItem(s[i.activeItem].id,true)}else{i.updateSelectedItem(s[i.activeItem].id,true)}}else if(!i.multiple&&i.listOpen&&o.length===1&&o[0].name.toLowerCase()===i.input.value.toLowerCase()){i.updateSelectedItem(o[0].id,true)}i.activeItem=undefined;i.listOpen=false;return}if(c(t)||f(t)){if(i.listOpen){t.preventDefault()}i.updateInputText(true);i.activeItem=undefined;i.listOpen=false;return}var u=i.activeItem;if(d(t)){t.preventDefault();u=i.activeItem-1}else if(l(t)){if(((r=(n=(e=i.input)===null||e===void 0?void 0:e.value)===null||n===void 0?void 0:n.length)!==null&&r!==void 0?r:0)<i.minCharacters){return}t.preventDefault();u=i.listOpen?i.activeItem+1:i.activeItem;i.listOpen=true}if(l(t)||d(t)){if(u<0||!u){u=0}if(u>=s.length){u=s.length-1}i.input.accessibleActiveDescendant=i.activeDescendantId;i.activeItem=u;i.scrollToActive()}return};this.processedItems=null;this.inputValue="";this.listOpen=false;this.selectedItems=new Set;this.activeItem=undefined;this.accessibleLabelDefaults={en:{heading:"Select:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtered"},fi:{heading:"Valitse:",item:"{name}",itemFiltered:"{name}, {hiddenItems} suodatettu"},sv:{heading:"Välj:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtrerade"}};this.accessibleLabels=v(this.accessibleLabelDefaults,m());this.label="";this.caption="";this.theme="";this.force=false;this.multiple=false;this.items=undefined;this.formatter=function(t){return t&&t.name?t.name:""};this.value=undefined;this.minCharacters=0;this.openListOnClick=false;this.filterType="startsWith"}t.prototype.popupMenuOpenHandler=function(){if(this.listOpen){this.listContainer.show()}else{this.listContainer.hide()}};t.prototype.activeItemHandler=function(t){this.input.accessibleActiveDescendant=this.listOpen&&(t||t===0)?this.activeDescendantId:""};t.prototype.inputValueHandler=function(){var t=this;setTimeout((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.getSelectedItemLabel()];case 1:t=i.sent();if(this.input.value==""&&t){this.input.value="";this.value=undefined}return[2]}}))}))}),200)};t.prototype.handleDocumentClick=function(t){var i=this;var e=t.composedPath();var n=e.every((function(t){return t!==i.element}));if(n){this.updateInputText(true);this.listOpen=false}};t.prototype.formatItem=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.formatter(t)]}))}))};t.prototype.processItems=function(){var t=this;var i=[];this.processedItems=y(this.items);if(!Array.isArray(this.processedItems)){console.error("DuetCombobox: Items should be an array");return}if(this.processedItems.length!==new Set(__spreadArray([],this.processedItems,true)).size){console.warn("DuetCombobox: Duplicate item values found in the list")}this.processedItems=this.processedItems.map((function(t,e){if(typeof t==="string"){t={name:t,value:t}}if(t.id!==undefined){t.id=String(t.id)}else{t.id="".concat(JSON.stringify(t.value),"-").concat(t.name)}if(i.includes(t.id)){console.warn("DuetCombobox: Duplicate item id found in the list, postfixed with index");t.id="".concat(t.id,"-").concat(e)}i.push(t.id);return t}));var e=Array.from(this.selectedItems).filter((function(i){return!t.processedItems.find((function(t){return t.id===i}))}));if(e.length){if(this.multiple){e.forEach((function(i){return t.removeSelectedItem(i)}))}else{this.updateSelectedItem(e[0],true)}}};t.prototype.processValue=function(){var t=this;if(this.value!==""&&!this.value){this.selectedItems.clear();return}var i=Array.isArray(this.value)?this.value:[this.value];var e=this.processedItems.filter((function(t){return i.includes(t.value)})).map((function(t){return t.id}));if(e.length===this.selectedItems.size&&e.every((function(i){return t.selectedItems.has(i)}))){return}if(this.multiple){this.selectedItems.clear();this.input.clearChips();e.forEach((function(i){return t.addSelectedItem(i)}))}else{var n=this.processedItems.find((function(i){return i.value===t.value}));this.updateSelectedItem(n.id)}};t.prototype.processListOpenChange=function(){if(this.openListOnClick){this.input.icon=this.listOpen?"action-arrow-up":"action-arrow-down"}this.input.accessibleExpanded=this.listOpen?"true":"false"};t.prototype.componentWillLoad=function(){o(this)};t.prototype.connectedCallback=function(){if(this.items){this.processItems()}var t=g(this.element);if(t.length){this.input=t[0]}else{this.input=document.createElement("duet-input");this.input.label=this.label;this.input.caption=this.caption;this.input.expand=true;this.element.prepend(this.input)}this.input.chips=this.multiple;this.input.addEventListener("duetChange",this.onInputChange);this.input.addEventListener("duetInput",this.onInputTyping);this.input.addEventListener("click",this.onInputClick);this.input.role="combobox";this.input.accessibleExpanded=this.listOpen?"true":"false";this.input.accessibleAutocomplete="list";this.input.accessibleControls=this.listBoxId;this.input.id=this.inputId;this.element.addEventListener("keydown",this.onKeyDown);p(this,{prop:"accessibleLabels",defaults:"accessibleLabelDefaults"});this.processListOpenChange()};t.prototype.disconnectedCallback=function(){this.input.removeEventListener("duetChange",this.onInputChange);this.input.removeEventListener("click",this.onInputClick);this.element.removeEventListener("keydown",this.onKeyDown);this.resizeObserver.disconnect();b(this)};t.prototype.componentDidLoad=function(){this.resizeObserver.observe(this.input);this.processValue()};t.prototype.shouldListBeFiltered=function(){var t=this;var i;if(!this.multiple&&this.selectedItems.size&&this.input.value===this.inputValue&&((i=this.inputValue)===null||i===void 0?void 0:i.length)<this.minCharacters){var e=this.processedItems.find((function(i){return t.selectedItems.has(i.id)}));return!(this.formatter(e).toLowerCase()===this.input.value.toLowerCase())}return true};t.prototype.returnFilteredOrNonFiltered=function(){return this.processedItems?this.shouldListBeFiltered()?this.getFilteredItems():this.sortFilteredItems(this.processedItems):[]};t.prototype.emitChangeEvent=function(t){var i=this.processedItems.find((function(i){return i.id===t}));this.duetChange.emit({item:i,value:this.value,component:"duet-combobox"})};t.prototype.updateMultipleValue=function(){var t=this;this.value=this.processedItems.filter((function(i){return t.selectedItems.has(i.id)})).map((function(t){return t.value}));this.input.value="";this.updateChips();this.input.setFocus()};t.prototype.addSelectedItem=function(t,i){if(this.selectedItems.has(t)){return}this.selectedItems.add(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.removeSelectedItem=function(t,i){if(!this.selectedItems.has(t)){return}this.selectedItems.delete(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.updateSelectedItem=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.selectedItems.clear();this.selectedItems.add(t);this.value=this.processedItems.find((function(i){return i.id===t})).value;if(i){this.emitChangeEvent(this.value&&t)}return[4,this.updateInputText()];case 1:e.sent();return[2]}}))}))};t.prototype.updateChips=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var e=this;return __generator(this,(function(n){switch(n.label){case 0:t=Array.from(this.selectedItems);return[4,this.input.getChips()];case 1:i=n.sent();t.forEach((function(t){return __awaiter(e,void 0,void 0,(function(){var i,e,n,r;var s=this;return __generator(this,(function(o){switch(o.label){case 0:i=this.processedItems.find((function(i){return i.id===t}));return[4,this.formatItem(i)];case 1:e=o.sent();return[4,this.input.hasChip({value:"".concat(t),text:e})];case 2:n=o.sent();if(!n){r=document.createElement("duet-chip");r.variation="input";r.role="option";r.value="".concat(t);r.textContent=e;r.addEventListener("duetRemove",(function(t){var i=t.detail.value;s.removeSelectedItem(i,true)}));this.input.addChip(r)}return[2]}}))}))}));i.forEach((function(i){if(!t.includes(i.value)){i.remove()}}));return[2]}}))}))};t.prototype.getSelectedItemLabel=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;var n=this;return __generator(this,(function(r){switch(r.label){case 0:t=this.processedItems.find((function(t){return n.selectedItems.has(t.id)}));if(!t)return[3,2];return[4,this.formatItem(t)];case 1:e=r.sent();return[3,3];case 2:e="";r.label=3;case 3:i=e;return[2,i]}}))}))};t.prototype.updateInputText=function(){return __awaiter(this,arguments,void 0,(function(t){var i,e,n;if(t===void 0){t=false}return __generator(this,(function(r){switch(r.label){case 0:if(t&&this.multiple){this.input.value="";return[2]}if(!(t&&this.force))return[3,3];i=this.returnFilteredOrNonFiltered();if(!this.multiple&&this.listOpen&&i.length===1&&i[0].name.toLowerCase()===this.input.value.toLowerCase()){this.updateSelectedItem(i[0].id,true)}if(!(this.selectedItems.size===0))return[3,1];this.input.value="";return[3,3];case 1:e=this.input;return[4,this.getSelectedItemLabel()];case 2:e.value=r.sent();r.label=3;case 3:if(!(!t&&this.selectedItems.size>0))return[3,6];this.input.value="";n=this.input;return[4,this.getSelectedItemLabel()];case 4:n.value=r.sent();this.input.scrollLeft=this.input.scrollWidth;return[4,this.input.setFocus()];case 5:r.sent();r.label=6;case 6:return[2]}}))}))};t.prototype.onListClick=function(t,i){t.preventDefault();t.stopPropagation();if(this.multiple){this.addSelectedItem(i.id,true)}else{this.updateSelectedItem(i.id,true)}this.activeItem=undefined;this.listOpen=false;return this.listOpen};t.prototype.scrollToActive=function(){var t=document.getElementById("".concat(this.activeDescendantId));if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.formatLabel=function(t,i,e,n){if(!t||n===undefined){return""}var r=e===n?this.accessibleLabels.item:this.accessibleLabels.itemFiltered;return r.replace("{name}",String(t.name)).replace("{current}",String(i+1)).replace("{total}",String(e)).replace("{hiddenItems}",String(n-e))};t.prototype.getFilteredItems=function(){var t=this;var i=this.processedItems.filter((function(i){var e,n,r,s,o;return((e=String(i.value))===null||e===void 0?void 0:e.toLowerCase()[t.filterType]((n=t.inputValue)===null||n===void 0?void 0:n.toLowerCase()))||((r=String(i.name))===null||r===void 0?void 0:r.toLowerCase()[t.filterType]((s=t.inputValue)===null||s===void 0?void 0:s.toLowerCase()))||t.formatter(i).toLowerCase()[t.filterType]((o=t.inputValue)===null||o===void 0?void 0:o.toLowerCase())||t.selectedItems.has(i.id)})).filter((function(i){var e=true;if(t.multiple&&t.selectedItems.has(i.id)){e=false}return e}));return this.sortFilteredItems(i)};t.prototype.sortFilteredItems=function(t){var i=this;if(t.length>0){t.filter((function(t){return i.selectedItems.has(t.id)})).forEach((function(i){var e=t.indexOf(i);t.splice(e,1);t.unshift(i)}))}return t};t.prototype.render=function(){var t;var e=this;var n=this.returnFilteredOrNonFiltered();return i(r,{class:(t={"duet-combobox":true},t["duet-theme-".concat(this.theme)]=true,t)},i("slot",null),i("div",null,i("duet-popup-menu",{id:this.listBoxId,controller:this.input,ref:function(t){return e.listContainer=t},accessibleRole:"listbox",allowVerticalFlip:false},i("div",{class:"combobox-menu-container"},this.listOpen&&n.map((function(t,r){return i(w,{id:e.activeDescendantId,item:t,activeDescendant:r===e.activeItem,selected:e.selectedItems.has(t.id),search:e.inputValue,clickHandler:function(i){return e.onListClick(i,t)},label:e.formatLabel(t,r,n.length,e.processedItems.length),isAndroidDevice:e.isAndroidDevice})})),i("duet-spacer",{size:"x-small"})))))};Object.defineProperty(t.prototype,"element",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{listOpen:["popupMenuOpenHandler","processListOpenChange"],activeItem:["activeItemHandler"],inputValue:["inputValueHandler"],items:["processItems"],value:["processValue"]}},enumerable:false,configurable:true});return t}());k.style=S}}}));
|
|
4
|
+
*/System.register(["./p-61173f11.system.js","./p-e216bea4.system.js","./p-e6b5a1c7.system.js","./p-41982d26.system.js","./p-752fa0fc.system.js","./p-2bb44297.system.js","./p-a331ae6e.system.js","./p-98636086.system.js"],(function(t){"use strict";var i,e,n,r,s,o,u,a,h,c,f,d,l,v,m,p,b,g,_,y;return{setters:[function(t){i=t.h;e=t.r;n=t.c;r=t.H;s=t.g},function(t){o=t.i},function(t){u=t.c},function(t){a=t.d},function(t){h=t.j;c=t.f;f=t.o;d=t.b;l=t.c},function(t){v=t.g;m=t.a;p=t.c;b=t.d},function(t){g=t.a},function(t){_=t.r;y=t.p}],execute:function(){var w=function(t){var e=t.item,n=t.activeDescendant,r=t.selected,s=t.label,o=s===void 0?undefined:s,u=t.clickHandler,a=u===void 0?function(t){t.preventDefault()}:u,h=t.keyHandler,c=h===void 0?function(t){t.preventDefault()}:h,f=t.search,d=t.isAndroidDevice,l=t.id;var v=f.split(" ").filter((function(t){return!!t.trim()})).map((function(t){return _(t)}));var m=f!==""?new RegExp("(".concat(v.join("|"),")"),"i"):undefined;var p="text-decoration: underline";return i("duet-popup-menu-item",{id:n?l:"",active:r,"data-index":e.id,"aria-selected":n?"true":undefined,"aria-current":r?"true":undefined,role:"option","aria-label":o,tabindex:d?"-1":null,onClick:function(t){return a(t)},onKeyUp:function(t){return c(t)},accessibleRole:"option",activeDescendant:n},m?i("span",{class:"option-container","aria-hidden":"true"},i("span",{innerHTML:e.name.replace(m,'<span style="'.concat(p,'">$&</span>'))})):e.name,e.tags&&i("span",{class:"option-tags"},e.tags.join(", ")))};var x='.sc-duet-combobox-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:inline-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";color:rgb(8, 42, 77)}.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(8, 42, 77);transition:none}.duet-theme-turva.sc-duet-combobox-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(23, 28, 58)}.combobox-menu-container.sc-duet-combobox{width:var(--popup-width);max-height:200px}';var S=x;var k=t("duet_combobox",function(){function t(t){var i=this;e(this,t);this.duetChange=n(this,"duetChange",3);var r,s;this.listBoxId=u("duet-combobox-list-element");this.inputId=u("duet-combobox-input-id");this.activeDescendantId=u("duet-combobox-active-descendant");this.isAndroidDevice=((s=(r=navigator===null||navigator===void 0?void 0:navigator.userAgent)===null||r===void 0?void 0:r.toLowerCase())===null||s===void 0?void 0:s.indexOf("android"))>-1||null;this.resizeObserver=new ResizeObserver(a((function(t){var e,n,r;if((t===null||t===void 0?void 0:t.length)===1){var s=(n=(e=t[0])===null||e===void 0?void 0:e.target)===null||n===void 0?void 0:n.getBoundingClientRect().width;var o=parseInt((r=getComputedStyle(i.listContainer.shadowRoot.querySelector(".duet-popup-menu-list")))===null||r===void 0?void 0:r.padding);i.listContainer.style.setProperty("--popup-width","".concat(s-2*o,"px"))}}),100));this.onInputChange=function(t){return __awaiter(i,void 0,void 0,(function(){var i;return __generator(this,(function(e){i=t.detail.value;this.inputValue=i;return[2]}))}))};this.onInputClick=function(){var t,e;if(i.openListOnClick){i.listOpen=!i.listOpen}else{i.listOpen=((t=i.inputValue)===null||t===void 0?void 0:t.length)>=i.minCharacters}if(!((e=i.getFilteredItems())===null||e===void 0?void 0:e.length)){i.listOpen=false}};this.onInputTyping=function(t){return __awaiter(i,void 0,void 0,(function(){var i,e;return __generator(this,(function(n){e=t.detail.value;if(!this.force&&!this.multiple&&this.selectedItems.size>0&&e!==this.getSelectedItemLabel()){this.selectedItems.clear()}if(!this.force&&!this.multiple&&e===""){this.value=undefined}this.listOpen=String(e).length>=this.minCharacters&&((i=this.getFilteredItems())===null||i===void 0?void 0:i.length)>0;return[2]}))}))};this.onKeyDown=function(t){var e,n,r;var s=i.returnFilteredOrNonFiltered();var o=s.filter((function(t){return!i.selectedItems.has(t.id)}));i.input.accessibleActiveDescendant=undefined;if(h(t)){t.preventDefault();if(i.listOpen&&i.activeItem!==undefined&&s[i.activeItem]&&!i.selectedItems.has(s[i.activeItem].id)){if(i.multiple){i.addSelectedItem(s[i.activeItem].id,true)}else{i.updateSelectedItem(s[i.activeItem].id,true)}}else if(!i.multiple&&i.listOpen&&o.length===1&&o[0].name.toLowerCase()===i.input.value.toLowerCase()){i.updateSelectedItem(o[0].id,true)}i.activeItem=undefined;i.listOpen=false;return}if(c(t)||f(t)){if(i.listOpen){t.preventDefault()}i.updateInputText(true);i.activeItem=undefined;i.listOpen=false;return}var u=i.activeItem;if(d(t)){t.preventDefault();u=i.activeItem-1}else if(l(t)){if(((r=(n=(e=i.input)===null||e===void 0?void 0:e.value)===null||n===void 0?void 0:n.length)!==null&&r!==void 0?r:0)<i.minCharacters){return}t.preventDefault();u=i.listOpen?i.activeItem+1:i.activeItem;i.listOpen=true}if(l(t)||d(t)){if(u<0||!u){u=0}if(u>=s.length){u=s.length-1}i.input.accessibleActiveDescendant=i.activeDescendantId;i.activeItem=u;i.scrollToActive()}return};this.processedItems=null;this.inputValue="";this.listOpen=false;this.selectedItems=new Set;this.activeItem=undefined;this.accessibleLabelDefaults={en:{heading:"Select:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtered"},fi:{heading:"Valitse:",item:"{name}",itemFiltered:"{name}, {hiddenItems} suodatettu"},sv:{heading:"Välj:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtrerade"}};this.accessibleLabels=v(this.accessibleLabelDefaults,m());this.label="";this.caption="";this.theme="";this.force=false;this.multiple=false;this.items=undefined;this.formatter=function(t){return t&&t.name?t.name:""};this.value=undefined;this.minCharacters=0;this.openListOnClick=false;this.filterType="startsWith"}t.prototype.popupMenuOpenHandler=function(){if(this.listOpen){this.listContainer.show()}else{this.listContainer.hide()}};t.prototype.activeItemHandler=function(t){this.input.accessibleActiveDescendant=this.listOpen&&(t||t===0)?this.activeDescendantId:""};t.prototype.inputValueHandler=function(){var t=this;setTimeout((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.getSelectedItemLabel()];case 1:t=i.sent();if(this.input.value==""&&t){this.input.value="";this.value=undefined}return[2]}}))}))}),200)};t.prototype.handleDocumentClick=function(t){var i=this;var e=t.composedPath();var n=e.every((function(t){return t!==i.element}));if(n){this.updateInputText(true);this.listOpen=false}};t.prototype.formatItem=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.formatter(t)]}))}))};t.prototype.processItems=function(){var t=this;var i=[];this.processedItems=y(this.items);if(!Array.isArray(this.processedItems)){console.error("DuetCombobox: Items should be an array");return}if(this.processedItems.length!==new Set(__spreadArray([],this.processedItems,true)).size){console.warn("DuetCombobox: Duplicate item values found in the list")}this.processedItems=this.processedItems.map((function(t,e){if(typeof t==="string"){t={name:t,value:t}}if(t.id!==undefined){t.id=String(t.id)}else{t.id="".concat(JSON.stringify(t.value),"-").concat(t.name)}if(i.includes(t.id)){console.warn("DuetCombobox: Duplicate item id found in the list, postfixed with index");t.id="".concat(t.id,"-").concat(e)}i.push(t.id);return t}));var e=Array.from(this.selectedItems).filter((function(i){return!t.processedItems.find((function(t){return t.id===i}))}));if(e.length){if(this.multiple){e.forEach((function(i){return t.removeSelectedItem(i)}))}else{this.updateSelectedItem(e[0],true)}}};t.prototype.processValue=function(){var t=this;if(this.value!==""&&!this.value){this.selectedItems.clear();return}var i=Array.isArray(this.value)?this.value:[this.value];var e=this.processedItems.filter((function(t){return i.includes(t.value)})).map((function(t){return t.id}));if(e.length===this.selectedItems.size&&e.every((function(i){return t.selectedItems.has(i)}))){return}if(this.multiple){this.selectedItems.clear();this.input.clearChips();e.forEach((function(i){return t.addSelectedItem(i)}))}else{var n=this.processedItems.find((function(i){return i.value===t.value}));this.updateSelectedItem(n.id)}};t.prototype.processListOpenChange=function(){if(this.openListOnClick){this.input.icon=this.listOpen?"action-arrow-up":"action-arrow-down"}this.input.accessibleExpanded=this.listOpen?"true":"false"};t.prototype.componentWillLoad=function(){o(this)};t.prototype.connectedCallback=function(){if(this.items){this.processItems()}var t=g(this.element);if(t.length){this.input=t[0]}else{this.input=document.createElement("duet-input");this.input.label=this.label;this.input.caption=this.caption;this.input.expand=true;this.element.prepend(this.input)}this.input.chips=this.multiple;this.input.addEventListener("duetChange",this.onInputChange);this.input.addEventListener("duetInput",this.onInputTyping);this.input.addEventListener("click",this.onInputClick);this.input.role="combobox";this.input.accessibleExpanded=this.listOpen?"true":"false";this.input.accessibleAutocomplete="list";this.input.accessibleControls=this.listBoxId;this.input.id=this.inputId;this.element.addEventListener("keydown",this.onKeyDown);p(this,{prop:"accessibleLabels",defaults:"accessibleLabelDefaults"});this.processListOpenChange()};t.prototype.disconnectedCallback=function(){this.input.removeEventListener("duetChange",this.onInputChange);this.input.removeEventListener("click",this.onInputClick);this.element.removeEventListener("keydown",this.onKeyDown);this.resizeObserver.disconnect();b(this)};t.prototype.componentDidLoad=function(){this.resizeObserver.observe(this.input);this.processValue()};t.prototype.shouldListBeFiltered=function(){var t=this;var i;if(!this.multiple&&this.selectedItems.size&&this.input.value===this.inputValue&&((i=this.inputValue)===null||i===void 0?void 0:i.length)<this.minCharacters){var e=this.processedItems.find((function(i){return t.selectedItems.has(i.id)}));return!(this.formatter(e).toLowerCase()===this.input.value.toLowerCase())}return true};t.prototype.returnFilteredOrNonFiltered=function(){return this.processedItems?this.shouldListBeFiltered()?this.getFilteredItems():this.sortFilteredItems(this.processedItems):[]};t.prototype.emitChangeEvent=function(t){var i=this.processedItems.find((function(i){return i.id===t}));this.duetChange.emit({item:i,value:this.value,component:"duet-combobox"})};t.prototype.updateMultipleValue=function(){var t=this;this.value=this.processedItems.filter((function(i){return t.selectedItems.has(i.id)})).map((function(t){return t.value}));this.input.value="";this.updateChips();this.input.setFocus()};t.prototype.addSelectedItem=function(t,i){if(this.selectedItems.has(t)){return}this.selectedItems.add(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.removeSelectedItem=function(t,i){if(!this.selectedItems.has(t)){return}this.selectedItems.delete(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.updateSelectedItem=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.selectedItems.clear();this.selectedItems.add(t);this.value=this.processedItems.find((function(i){return i.id===t})).value;if(i){this.emitChangeEvent(this.value&&t)}return[4,this.updateInputText()];case 1:e.sent();return[2]}}))}))};t.prototype.updateChips=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var e=this;return __generator(this,(function(n){switch(n.label){case 0:t=Array.from(this.selectedItems);return[4,this.input.getChips()];case 1:i=n.sent();t.forEach((function(t){return __awaiter(e,void 0,void 0,(function(){var i,e,n,r;var s=this;return __generator(this,(function(o){switch(o.label){case 0:i=this.processedItems.find((function(i){return i.id===t}));return[4,this.formatItem(i)];case 1:e=o.sent();return[4,this.input.hasChip({value:"".concat(t),text:e})];case 2:n=o.sent();if(!n){r=document.createElement("duet-chip");r.variation="input";r.role="option";r.value="".concat(t);r.textContent=e;r.addEventListener("duetRemove",(function(t){var i=t.detail.value;s.removeSelectedItem(i,true)}));this.input.addChip(r)}return[2]}}))}))}));i.forEach((function(i){if(!t.includes(i.value)){i.remove()}}));return[2]}}))}))};t.prototype.getSelectedItemLabel=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;var n=this;return __generator(this,(function(r){switch(r.label){case 0:t=this.processedItems.find((function(t){return n.selectedItems.has(t.id)}));if(!t)return[3,2];return[4,this.formatItem(t)];case 1:e=r.sent();return[3,3];case 2:e="";r.label=3;case 3:i=e;return[2,i]}}))}))};t.prototype.updateInputText=function(){return __awaiter(this,arguments,void 0,(function(t){var i,e,n;if(t===void 0){t=false}return __generator(this,(function(r){switch(r.label){case 0:if(t&&this.multiple){this.input.value="";return[2]}if(!(t&&this.force))return[3,3];i=this.returnFilteredOrNonFiltered();if(!this.multiple&&this.listOpen&&i.length===1&&i[0].name.toLowerCase()===this.input.value.toLowerCase()){this.updateSelectedItem(i[0].id,true)}if(!(this.selectedItems.size===0))return[3,1];this.input.value="";return[3,3];case 1:e=this.input;return[4,this.getSelectedItemLabel()];case 2:e.value=r.sent();r.label=3;case 3:if(!(!t&&this.selectedItems.size>0))return[3,6];this.input.value="";n=this.input;return[4,this.getSelectedItemLabel()];case 4:n.value=r.sent();this.input.scrollLeft=this.input.scrollWidth;return[4,this.input.setFocus()];case 5:r.sent();r.label=6;case 6:return[2]}}))}))};t.prototype.onListClick=function(t,i){t.preventDefault();t.stopPropagation();if(this.multiple){this.addSelectedItem(i.id,true)}else{this.updateSelectedItem(i.id,true)}this.activeItem=undefined;this.listOpen=false;return this.listOpen};t.prototype.scrollToActive=function(){var t=document.getElementById("".concat(this.activeDescendantId));if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.formatLabel=function(t,i,e,n){if(!t||n===undefined){return""}var r=e===n?this.accessibleLabels.item:this.accessibleLabels.itemFiltered;return r.replace("{name}",String(t.name)).replace("{current}",String(i+1)).replace("{total}",String(e)).replace("{hiddenItems}",String(n-e))};t.prototype.getFilteredItems=function(){var t=this;var i=this.processedItems.filter((function(i){var e,n,r,s,o;return((e=String(i.value))===null||e===void 0?void 0:e.toLowerCase()[t.filterType]((n=t.inputValue)===null||n===void 0?void 0:n.toLowerCase()))||((r=String(i.name))===null||r===void 0?void 0:r.toLowerCase()[t.filterType]((s=t.inputValue)===null||s===void 0?void 0:s.toLowerCase()))||t.formatter(i).toLowerCase()[t.filterType]((o=t.inputValue)===null||o===void 0?void 0:o.toLowerCase())||t.selectedItems.has(i.id)})).filter((function(i){var e=true;if(t.multiple&&t.selectedItems.has(i.id)){e=false}return e}));return this.sortFilteredItems(i)};t.prototype.sortFilteredItems=function(t){var i=this;if(t.length>0){t.filter((function(t){return i.selectedItems.has(t.id)})).forEach((function(i){var e=t.indexOf(i);t.splice(e,1);t.unshift(i)}))}return t};t.prototype.render=function(){var t;var e=this;var n=this.returnFilteredOrNonFiltered();return i(r,{class:(t={"duet-combobox":true},t["duet-theme-".concat(this.theme)]=true,t)},i("slot",null),i("div",null,i("duet-popup-menu",{id:this.listBoxId,controller:this.input,ref:function(t){return e.listContainer=t},accessibleRole:"listbox",allowVerticalFlip:false},i("div",{class:"combobox-menu-container"},this.listOpen&&n.map((function(t,r){return i(w,{id:e.activeDescendantId,item:t,activeDescendant:r===e.activeItem,selected:e.selectedItems.has(t.id),search:e.inputValue,clickHandler:function(i){return e.onListClick(i,t)},label:e.formatLabel(t,r,n.length,e.processedItems.length),isAndroidDevice:e.isAndroidDevice})})),i("duet-spacer",{size:"x-small"})))))};Object.defineProperty(t.prototype,"element",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{listOpen:["popupMenuOpenHandler","processListOpenChange"],activeItem:["activeItemHandler"],inputValue:["inputValueHandler"],items:["processItems"],value:["processValue"]}},enumerable:false,configurable:true});return t}());k.style=S}}}));
|