@duetds/components 9.5.2 → 9.6.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 +263 -217
- package/lib/cjs/{a11y-utils-8e2be21b.js → a11y-utils-285b9770.js} +1 -1
- package/lib/cjs/{app-globals-617d939b.js → app-globals-a643282a.js} +1 -1
- package/lib/cjs/duet-action-button.cjs.entry.js +2 -2
- package/lib/cjs/duet-alert.cjs.entry.js +16 -16
- package/lib/cjs/duet-badge.cjs.entry.js +3 -3
- package/lib/cjs/duet-banner.cjs.entry.js +4 -4
- 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 +9 -9
- package/lib/cjs/duet-callout.cjs.entry.js +4 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +30 -13
- package/lib/cjs/duet-card.cjs.entry.js +5 -5
- 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.cjs.entry.js +3 -3
- 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 +8 -4
- 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 +9 -3
- 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 +11 -11
- 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 +9 -3
- package/lib/cjs/duet-popup-menu_2.cjs.entry.js +8 -8
- 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 +23 -14
- 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 +6 -6
- 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 +9 -9
- package/lib/cjs/duet-status-icon.cjs.entry.js +8 -8
- 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 +7 -7
- 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-a69cd631.js → errorcodes.utils-ffbb3f35.js} +1 -1
- package/lib/cjs/{focus-utils-2a54eb7a.js → focus-utils-2f1ec06b.js} +1 -1
- package/lib/cjs/{index-206506a2.js → index-850a7759.js} +6 -6
- package/lib/cjs/{language-utils-6754f426.js → language-utils-030e2133.js} +1 -1
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{slot-utils-aa13b3a0.js → slot-utils-84ad3d6c.js} +1 -1
- package/lib/cjs/{teleport-c6f8391a.js → teleport-c0eede18.js} +2 -2
- package/lib/collection/components/duet-action-button/duet-action-button.js +2 -2
- package/lib/collection/components/duet-alert/duet-alert.css +72 -27
- package/lib/collection/components/duet-alert/duet-alert.js +37 -16
- package/lib/collection/components/duet-badge/duet-badge.js +2 -2
- package/lib/collection/components/duet-banner/duet-banner.js +3 -3
- 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.js +10 -10
- package/lib/collection/components/duet-callout/duet-callout.js +2 -2
- package/lib/collection/components/duet-caption/duet-caption.js +3 -3
- package/lib/collection/components/duet-card/duet-card.js +6 -6
- package/lib/collection/components/duet-checkbox/duet-checkbox.js +3 -3
- package/lib/collection/components/duet-chip/duet-chip.js +7 -7
- package/lib/collection/components/duet-choice/duet-checkmark.js +2 -2
- package/lib/collection/components/duet-choice/duet-choice.js +3 -3
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +5 -5
- package/lib/collection/components/duet-combobox/duet-combobox.js +8 -4
- package/lib/collection/components/duet-contact-card/duet-contact-card.js +2 -2
- package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +2 -2
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +4 -4
- package/lib/collection/components/duet-divider/duet-divider.js +2 -2
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +5 -5
- package/lib/collection/components/duet-empty-state/duet-empty-state.js +3 -3
- package/lib/collection/components/duet-fieldset/duet-fieldset.js +3 -3
- package/lib/collection/components/duet-file-chooser/duet-file-chooser.js +2 -2
- package/lib/collection/components/duet-footer/duet-footer.js +11 -11
- package/lib/collection/components/duet-grid/duet-grid.js +3 -3
- package/lib/collection/components/duet-header/duet-header.js +15 -15
- package/lib/collection/components/duet-heading/duet-heading.js +3 -3
- package/lib/collection/components/duet-hero/duet-hero.js +10 -10
- package/lib/collection/components/duet-icon/duet-icon.js +3 -3
- package/lib/collection/components/duet-input/duet-input.js +36 -8
- package/lib/collection/components/duet-label/duet-label.js +2 -2
- package/lib/collection/components/duet-layout/duet-layout.js +6 -6
- package/lib/collection/components/duet-link/duet-link.js +25 -4
- package/lib/collection/components/duet-list/duet-list.js +4 -4
- package/lib/collection/components/duet-list-item/duet-list-item.js +2 -2
- package/lib/collection/components/duet-logo/duet-logo.js +2 -2
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +3 -3
- 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 +10 -10
- package/lib/collection/components/duet-multiselect/duet-multiselect.js +11 -11
- 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 +3 -3
- package/lib/collection/components/duet-number-input/duet-number-input.js +4 -4
- package/lib/collection/components/duet-overlay/duet-overlay.js +2 -2
- package/lib/collection/components/duet-page-heading/duet-page-heading.js +2 -2
- package/lib/collection/components/duet-pagination/duet-pagination.js +13 -13
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +5 -5
- package/lib/collection/components/duet-phone-input/duet-phone-input.js +32 -4
- package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +3 -3
- package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +4 -4
- package/lib/collection/components/duet-promo-card/duet-promo-card.js +2 -2
- package/lib/collection/components/duet-radio/duet-radio.js +3 -3
- package/lib/collection/components/duet-range-slider/duet-range-slider.js +2 -2
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +3 -3
- package/lib/collection/components/duet-scrollable/duet-scrollable.css +4 -1
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +30 -5
- package/lib/collection/components/duet-section-layout/duet-section-layout.js +3 -3
- package/lib/collection/components/duet-select/duet-select.js +5 -5
- package/lib/collection/components/duet-shaped-image/duet-shaped-image.js +2 -2
- package/lib/collection/components/duet-show-more/duet-show-more.js +3 -3
- package/lib/collection/components/duet-slideout/duet-slideout.js +5 -5
- package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +1 -1
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +2 -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 +3 -3
- package/lib/collection/components/duet-spinner/duet-spinner.js +3 -3
- package/lib/collection/components/duet-status-icon/duet-status-icon.js +7 -7
- package/lib/collection/components/duet-step/duet-step.js +2 -2
- package/lib/collection/components/duet-stepper/duet-stepper.js +2 -2
- 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.css +57 -1
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +56 -9
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-textarea/duet-textarea.js +4 -4
- package/lib/collection/components/duet-toggle/duet-toggle.js +1 -1
- 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-tooltip/duet-tooltip.js +1 -1
- package/lib/collection/components/duet-tray/duet-tray.js +2 -2
- package/lib/collection/components/duet-upload/duet-upload.js +16 -16
- 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 +4 -4
- package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +1 -1
- package/lib/collection/utils/teleport.js +2 -2
- 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 +5 -5
- 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 +6 -6
- 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 +20 -16
- 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 +15 -15
- 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.js +23 -16
- 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 +4 -4
- 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 +8 -8
- 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 +1 -103
- 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 +21 -12
- 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 +42 -36
- 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-6f36f4f3.js → p-0e2c29a0.js} +5 -5
- package/lib/dist-custom-elements/{p-519df228.js → p-0e3a8465.js} +3 -3
- package/lib/dist-custom-elements/{p-accb4fa9.js → p-1399c239.js} +9 -9
- package/lib/dist-custom-elements/{p-fba92a7b.js → p-17b1f88c.js} +7 -7
- package/lib/dist-custom-elements/{p-79957fa3.js → p-19a2d36f.js} +1 -1
- package/lib/dist-custom-elements/{p-8882b67b.js → p-1ee62209.js} +5 -5
- package/lib/dist-custom-elements/{p-6888c8d6.js → p-246a45c5.js} +3 -3
- package/lib/dist-custom-elements/{p-9f5cc4e3.js → p-24de14ac.js} +3 -3
- package/lib/dist-custom-elements/{p-935c69ca.js → p-2a7b9c7c.js} +4 -4
- package/lib/dist-custom-elements/{p-a317fac9.js → p-2cdc1b0d.js} +2 -2
- package/lib/dist-custom-elements/{p-2bb0877f.js → p-4e00e010.js} +2 -2
- package/lib/dist-custom-elements/{p-a571ab43.js → p-5554d38b.js} +3 -3
- package/lib/dist-custom-elements/{p-495fa25d.js → p-670555eb.js} +1 -1
- package/lib/dist-custom-elements/p-71d24b1e.js +213 -0
- package/lib/dist-custom-elements/{p-d3f39f5e.js → p-744611d2.js} +8 -8
- package/lib/dist-custom-elements/{p-dbea5087.js → p-7a5af4ef.js} +1 -1
- package/lib/dist-custom-elements/{p-9126e8a2.js → p-7da00182.js} +6 -6
- package/lib/dist-custom-elements/p-83dee022.js +108 -0
- package/lib/dist-custom-elements/{p-53b3bd2d.js → p-84a626a1.js} +3 -3
- package/lib/dist-custom-elements/{p-ec26aeea.js → p-859504c9.js} +3 -3
- package/lib/dist-custom-elements/{p-6646e07d.js → p-86431925.js} +2 -2
- package/lib/dist-custom-elements/{p-1cc451fc.js → p-8799d4ad.js} +2 -2
- package/lib/dist-custom-elements/{p-ce7d290f.js → p-88624802.js} +14 -11
- package/lib/dist-custom-elements/{p-6dd74d76.js → p-8aeac44c.js} +2 -2
- package/lib/dist-custom-elements/{p-ca3cb21e.js → p-8cb0e6bd.js} +2 -2
- package/lib/dist-custom-elements/{p-673093b5.js → p-97505489.js} +17 -10
- package/lib/dist-custom-elements/{p-9614cc57.js → p-a202083e.js} +4 -4
- package/lib/dist-custom-elements/{p-b54dea97.js → p-a839bb27.js} +3 -3
- package/lib/dist-custom-elements/{p-69756ccb.js → p-b6a06b4d.js} +1 -1
- package/lib/dist-custom-elements/{p-fd01fff8.js → p-b7e56baf.js} +3 -3
- package/lib/dist-custom-elements/{p-1b7f952f.js → p-c084f5f2.js} +2 -2
- package/lib/dist-custom-elements/{p-320da2a2.js → p-c18fe324.js} +3 -3
- package/lib/dist-custom-elements/{p-1a4430e2.js → p-c45170b0.js} +2 -2
- package/lib/dist-custom-elements/{p-c3d01088.js → p-ca4970b2.js} +15 -15
- package/lib/dist-custom-elements/{p-38cb34bf.js → p-cfa9907a.js} +25 -5
- package/lib/dist-custom-elements/{p-aedaa6be.js → p-dd76e32c.js} +2 -2
- package/lib/dist-custom-elements/{p-136dc3af.js → p-dff748c3.js} +4 -4
- package/lib/dist-custom-elements/{p-ef2dcc5a.js → p-e2468742.js} +4 -4
- package/lib/dist-custom-elements/{p-5a892951.js → p-e88ea44e.js} +12 -12
- package/lib/dist-custom-elements/{p-f7a60dd8.js → p-eff24429.js} +3 -3
- package/lib/dist-custom-elements/{p-1f86efd7.js → p-f22589a4.js} +3 -3
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-8e40c17e.entry.js → p-00213276.entry.js} +1 -1
- package/lib/duet/{p-12b625a8.entry.js → p-01d7ac55.entry.js} +1 -1
- package/lib/duet/{p-1428de02.entry.js → p-023fce1f.entry.js} +1 -1
- package/lib/duet/{p-bf039477.system.entry.js → p-07fed22f.system.entry.js} +1 -1
- package/lib/duet/{p-38487de7.system.entry.js → p-08a47466.system.entry.js} +1 -1
- package/lib/duet/{p-6c6981db.system.entry.js → p-0a11226b.system.entry.js} +1 -1
- package/lib/duet/{p-6d1f93c1.entry.js → p-0a912734.entry.js} +1 -1
- package/lib/duet/{p-70a7f815.entry.js → p-0c5d3a82.entry.js} +1 -1
- package/lib/duet/{p-915e55ec.entry.js → p-0d16c5ae.entry.js} +1 -1
- package/lib/duet/{p-7b5c18ba.system.entry.js → p-0def186e.system.entry.js} +1 -1
- package/lib/duet/{p-9261386e.system.entry.js → p-0e695a6c.system.entry.js} +2 -2
- package/lib/duet/{p-8b353b35.system.entry.js → p-0f087a51.system.entry.js} +2 -2
- package/lib/duet/{p-5c3998b7.entry.js → p-0f568460.entry.js} +1 -1
- package/lib/duet/{p-04dcf198.entry.js → p-13dd00d9.entry.js} +1 -1
- package/lib/duet/{p-4670cbd2.entry.js → p-1585915c.entry.js} +1 -1
- package/lib/duet/{p-5c91da22.entry.js → p-169801e2.entry.js} +1 -1
- package/lib/duet/{p-0c115b39.js → p-1cfacaa0.js} +1 -1
- package/lib/duet/{p-7373389d.entry.js → p-1d1caba8.entry.js} +1 -1
- package/lib/duet/{p-a4650edb.entry.js → p-1df70f01.entry.js} +1 -1
- package/lib/duet/{p-d6f8386e.entry.js → p-1e43f46b.entry.js} +1 -1
- package/lib/duet/{p-31f93fec.system.entry.js → p-1ef91f38.system.entry.js} +1 -1
- package/lib/duet/{p-7c74b0a5.system.entry.js → p-20408f45.system.entry.js} +1 -1
- package/lib/duet/{p-3af95762.system.js → p-225d896f.system.js} +1 -1
- package/lib/duet/{p-ea29ebbb.system.entry.js → p-2686c475.system.entry.js} +1 -1
- package/lib/duet/{p-419bca5b.system.entry.js → p-2724434b.system.entry.js} +1 -1
- package/lib/duet/{p-64542862.entry.js → p-27f623da.entry.js} +1 -1
- package/lib/duet/p-295bc09e.entry.js +4 -0
- package/lib/duet/{p-05e3b483.system.entry.js → p-2b04ef5c.system.entry.js} +1 -1
- package/lib/duet/{p-519297ed.system.entry.js → p-2cee1f9b.system.entry.js} +1 -1
- package/lib/duet/{p-225d100c.entry.js → p-2d7bc4a2.entry.js} +1 -1
- package/lib/duet/p-3051dbbb.entry.js +4 -0
- package/lib/duet/{p-013c9fff.entry.js → p-318bab4d.entry.js} +1 -1
- package/lib/duet/{p-b2a64677.system.entry.js → p-31c2bad0.system.entry.js} +1 -1
- package/lib/duet/{p-8594d015.system.entry.js → p-32234cba.system.entry.js} +1 -1
- package/lib/duet/{p-7e0e5b92.entry.js → p-33ffb428.entry.js} +1 -1
- package/lib/duet/{p-68ab87cc.entry.js → p-36a99082.entry.js} +1 -1
- package/lib/duet/{p-280063be.system.entry.js → p-36afe6cb.system.entry.js} +1 -1
- package/lib/duet/{p-fc4861d9.system.entry.js → p-36de2705.system.entry.js} +1 -1
- package/lib/duet/{p-8bed7caf.entry.js → p-3853498e.entry.js} +1 -1
- package/lib/duet/{p-8c2bc346.system.entry.js → p-3977bdb1.system.entry.js} +1 -1
- package/lib/duet/{p-277c4782.entry.js → p-39c01a70.entry.js} +1 -1
- package/lib/duet/{p-580d4d53.entry.js → p-3b1aa036.entry.js} +1 -1
- package/lib/duet/{p-580978f0.system.entry.js → p-3eae7e96.system.entry.js} +1 -1
- package/lib/duet/{p-8741bd70.entry.js → p-3ec00c51.entry.js} +1 -1
- package/lib/duet/{p-031f13b0.system.entry.js → p-3fbbc8f3.system.entry.js} +1 -1
- package/lib/duet/{p-78b02eb3.system.entry.js → p-409e717a.system.entry.js} +1 -1
- package/lib/duet/{p-53d7ea2c.entry.js → p-40efa103.entry.js} +1 -1
- package/lib/duet/{p-226aa2e9.system.entry.js → p-42a9ae6f.system.entry.js} +1 -1
- package/lib/duet/{p-1370b18f.entry.js → p-433a874a.entry.js} +1 -1
- package/lib/duet/p-447b8180.entry.js +4 -0
- package/lib/duet/{p-43cbc2bf.entry.js → p-464f4b7b.entry.js} +1 -1
- package/lib/duet/{p-430404c6.entry.js → p-488c0e3a.entry.js} +1 -1
- package/lib/duet/{p-cf900c12.system.entry.js → p-4ac80ae7.system.entry.js} +1 -1
- package/lib/duet/{p-94179cd5.system.entry.js → p-5153ffb5.system.entry.js} +1 -1
- package/lib/duet/{p-f3c5e966.system.entry.js → p-520b7deb.system.entry.js} +1 -1
- package/lib/duet/{p-759dca5c.system.entry.js → p-52d47015.system.entry.js} +1 -1
- package/lib/duet/{p-5b86d3c0.entry.js → p-5540127f.entry.js} +1 -1
- package/lib/duet/p-575c30ef.system.js +5 -0
- package/lib/duet/{p-b9231b8e.entry.js → p-584d6a6f.entry.js} +1 -1
- package/lib/duet/{p-07f8adab.entry.js → p-59df0c73.entry.js} +1 -1
- package/lib/duet/{p-f36f2f4b.entry.js → p-5b634ed9.entry.js} +1 -1
- package/lib/duet/{p-72809aec.system.js → p-5b87722f.system.js} +1 -1
- package/lib/duet/p-5b9ead99.entry.js +4 -0
- package/lib/duet/{p-c613e449.system.entry.js → p-5cf8adc4.system.entry.js} +1 -1
- package/lib/duet/{p-d693003b.entry.js → p-5ddbca89.entry.js} +1 -1
- package/lib/duet/p-5e7f679b.system.js +4 -0
- package/lib/duet/{p-6270b097.entry.js → p-5ed3cb90.entry.js} +1 -1
- package/lib/duet/{p-0dcc1a8b.system.entry.js → p-5f96e4e5.system.entry.js} +1 -1
- package/lib/duet/{p-827c2a0d.system.entry.js → p-62190c9b.system.entry.js} +1 -1
- package/lib/duet/{p-8acb2a04.entry.js → p-62641202.entry.js} +1 -1
- package/lib/duet/p-646ef587.entry.js +4 -0
- package/lib/duet/{p-4460ee6c.js → p-64f7e70b.js} +1 -1
- package/lib/duet/{p-318498a5.entry.js → p-66018a44.entry.js} +1 -1
- package/lib/duet/{p-fd7ff8da.system.entry.js → p-66909888.system.entry.js} +1 -1
- package/lib/duet/{p-0b986e9b.entry.js → p-67664a30.entry.js} +1 -1
- package/lib/duet/{p-053ef6d1.system.entry.js → p-676e0083.system.entry.js} +1 -1
- package/lib/duet/{p-cb15af71.entry.js → p-6b88e0e0.entry.js} +1 -1
- package/lib/duet/{p-f248e320.system.entry.js → p-6d945a13.system.entry.js} +1 -1
- package/lib/duet/{p-a9f4cfe4.entry.js → p-6dd4a284.entry.js} +1 -1
- package/lib/duet/{p-b86a869b.entry.js → p-715167d0.entry.js} +1 -1
- package/lib/duet/{p-f91f1fc4.system.entry.js → p-74595c7b.system.entry.js} +1 -1
- package/lib/duet/{p-44e4cc6f.entry.js → p-759159df.entry.js} +1 -1
- package/lib/duet/{p-accd2829.system.entry.js → p-76b521c3.system.entry.js} +1 -1
- package/lib/duet/{p-8beb97fe.system.entry.js → p-76bc7f02.system.entry.js} +1 -1
- package/lib/duet/{p-af55cef5.entry.js → p-78029a8c.entry.js} +1 -1
- package/lib/duet/{p-20b0dacc.system.entry.js → p-78a1c944.system.entry.js} +1 -1
- package/lib/duet/{p-c35a3eb6.system.entry.js → p-7af3685e.system.entry.js} +1 -1
- package/lib/duet/{p-d0edb7b9.system.entry.js → p-7f982bc5.system.entry.js} +1 -1
- package/lib/duet/{p-b4151081.system.entry.js → p-7fafcd70.system.entry.js} +1 -1
- package/lib/duet/{p-35950181.entry.js → p-811e587d.entry.js} +1 -1
- package/lib/duet/{p-3c466cd8.entry.js → p-81ac1fb9.entry.js} +1 -1
- package/lib/duet/{p-32ef55ff.system.entry.js → p-834bb95a.system.entry.js} +2 -2
- package/lib/duet/{p-cb5d825f.system.entry.js → p-8870ff92.system.entry.js} +1 -1
- package/lib/duet/{p-b1db69df.entry.js → p-894af6d5.entry.js} +1 -1
- package/lib/duet/{p-a1c6f370.entry.js → p-898a1eb6.entry.js} +1 -1
- package/lib/duet/{p-0fdf67d6.system.entry.js → p-8c475dea.system.entry.js} +1 -1
- package/lib/duet/p-8cb0e6bd.js +4 -0
- package/lib/duet/{p-7ff034b0.system.entry.js → p-8e1b9c1a.system.entry.js} +2 -2
- package/lib/duet/{p-204e76d3.entry.js → p-8f3d2885.entry.js} +1 -1
- package/lib/duet/p-8fdd5cc7.system.entry.js +4 -0
- package/lib/duet/p-8fde9a1b.js +5 -0
- package/lib/duet/{p-04b258fd.entry.js → p-8fe41782.entry.js} +1 -1
- package/lib/duet/{p-818b5277.entry.js → p-90132584.entry.js} +1 -1
- package/lib/duet/{p-a5fac26c.entry.js → p-908aa11e.entry.js} +1 -1
- package/lib/duet/{p-81e906ff.system.entry.js → p-96415561.system.entry.js} +1 -1
- package/lib/duet/{p-009738f9.entry.js → p-96cb91ac.entry.js} +1 -1
- package/lib/duet/{p-d046f3f0.system.entry.js → p-975e92b7.system.entry.js} +2 -2
- package/lib/duet/{p-d1464455.system.entry.js → p-a112a313.system.entry.js} +1 -1
- package/lib/duet/{p-bd5bc40f.system.entry.js → p-a2f07690.system.entry.js} +1 -1
- package/lib/duet/p-a451ac2a.entry.js +4 -0
- package/lib/duet/p-a4608e97.entry.js +4 -0
- package/lib/duet/{p-42868a02.system.entry.js → p-a5cdb4fb.system.entry.js} +1 -1
- package/lib/duet/{p-f2f75690.entry.js → p-a5d3dd13.entry.js} +1 -1
- package/lib/duet/{p-b92193a6.system.entry.js → p-a62a66ea.system.entry.js} +1 -1
- package/lib/duet/{p-ddd70eeb.system.entry.js → p-a76f07dc.system.entry.js} +1 -1
- package/lib/duet/p-acb77c8b.system.js +4 -0
- package/lib/duet/{p-936b8007.system.entry.js → p-ada4e675.system.entry.js} +2 -2
- package/lib/duet/{p-538e55e5.entry.js → p-ade5c55c.entry.js} +1 -1
- package/lib/duet/p-ae0f8173.system.entry.js +4 -0
- package/lib/duet/p-b1f33063.system.js +4 -0
- package/lib/duet/{p-fb4f24c4.system.entry.js → p-b2f132e7.system.entry.js} +1 -1
- package/lib/duet/{p-12b57efb.entry.js → p-b4bd3b2c.entry.js} +1 -1
- package/lib/duet/{p-5f56c425.system.entry.js → p-b53f51e9.system.entry.js} +1 -1
- package/lib/duet/{p-2100fda2.system.entry.js → p-b5afa22f.system.entry.js} +1 -1
- package/lib/duet/p-b5cf1014.system.entry.js +4 -0
- package/lib/duet/p-b62b1ae8.entry.js +4 -0
- package/lib/duet/p-b87e98f8.system.js +4 -0
- package/lib/duet/p-b88bf0cf.js +4 -0
- package/lib/duet/{p-9936eb61.entry.js → p-b92ebb57.entry.js} +1 -1
- package/lib/duet/{p-ee5c74bc.system.entry.js → p-ba01d549.system.entry.js} +1 -1
- package/lib/duet/{p-d287e564.entry.js → p-ba86d704.entry.js} +1 -1
- package/lib/duet/{p-eab15c94.system.entry.js → p-bc249477.system.entry.js} +1 -1
- package/lib/duet/{p-c46cff2a.system.js → p-bc97e6a8.system.js} +1 -1
- package/lib/duet/{p-d3b2d5de.system.entry.js → p-c00053cb.system.entry.js} +1 -1
- package/lib/duet/{p-b1487aa4.system.entry.js → p-c02998a1.system.entry.js} +1 -1
- package/lib/duet/{p-0d512165.entry.js → p-c3bbb91e.entry.js} +1 -1
- package/lib/duet/{p-24898376.entry.js → p-c5eaf3a1.entry.js} +1 -1
- package/lib/duet/{p-572bf138.entry.js → p-c9459a92.entry.js} +1 -1
- package/lib/duet/{p-d2f008ef.entry.js → p-c9d3f692.entry.js} +1 -1
- package/lib/duet/{p-420817c5.system.entry.js → p-cac48643.system.entry.js} +1 -1
- package/lib/duet/{p-618b1c12.entry.js → p-cb7dccf2.entry.js} +1 -1
- package/lib/duet/p-cbeb7a7f.entry.js +4 -0
- package/lib/duet/{p-6c8361b8.entry.js → p-cda3dd39.entry.js} +1 -1
- package/lib/duet/{p-955ccb5a.system.entry.js → p-cf02b043.system.entry.js} +1 -1
- package/lib/duet/{p-de32ceff.system.entry.js → p-cfa0f78a.system.entry.js} +1 -1
- package/lib/duet/{p-818fd2f6.entry.js → p-d00a1ca7.entry.js} +1 -1
- package/lib/duet/{p-8b2056f0.system.js → p-d1abb9cd.system.js} +1 -1
- package/lib/duet/{p-67ea455b.system.entry.js → p-d55cd34e.system.entry.js} +1 -1
- package/lib/duet/{p-57d70be4.system.entry.js → p-d5df40cf.system.entry.js} +1 -1
- package/lib/duet/{p-679b55fe.entry.js → p-d7ccf5ec.entry.js} +1 -1
- package/lib/duet/{p-426d835f.entry.js → p-d81b6edc.entry.js} +1 -1
- package/lib/duet/{p-caf28e68.system.entry.js → p-db0b77ca.system.entry.js} +1 -1
- package/lib/duet/{p-fb4c1c0a.system.entry.js → p-de2f8904.system.entry.js} +1 -1
- package/lib/duet/{p-fda88cec.system.entry.js → p-de81656a.system.entry.js} +1 -1
- package/lib/duet/p-e1827d9e.system.entry.js +4 -0
- package/lib/duet/{p-591ce092.entry.js → p-e669ce8c.entry.js} +1 -1
- package/lib/duet/{p-aada68bf.entry.js → p-e8b8a3ad.entry.js} +1 -1
- package/lib/duet/{p-74f81150.entry.js → p-e8bc416f.entry.js} +1 -1
- package/lib/duet/{p-dd8cad8a.entry.js → p-e9171ed3.entry.js} +1 -1
- package/lib/duet/{p-c1380dcb.system.entry.js → p-ea790730.system.entry.js} +2 -2
- package/lib/duet/{p-948b038a.system.entry.js → p-ec784e1d.system.entry.js} +1 -1
- package/lib/duet/{p-f57f0b8c.entry.js → p-edbffab0.entry.js} +1 -1
- package/lib/duet/{p-b994aa71.system.entry.js → p-eddd3652.system.entry.js} +1 -1
- package/lib/duet/{p-df82459a.entry.js → p-f1fcaad6.entry.js} +1 -1
- package/lib/duet/{p-4994dbf2.system.entry.js → p-f20ad02b.system.entry.js} +1 -1
- package/lib/duet/p-f27e5ce4.js +4 -0
- package/lib/duet/{p-9db6f107.system.entry.js → p-f2ddfe13.system.entry.js} +1 -1
- package/lib/duet/{p-d98c8e4e.system.entry.js → p-f49a7dd9.system.entry.js} +1 -1
- package/lib/duet/{p-9b702bc1.system.entry.js → p-f583ecaf.system.entry.js} +1 -1
- package/lib/duet/{p-0121cfad.entry.js → p-f6cfa6ea.entry.js} +1 -1
- package/lib/duet/p-f965caf6.entry.js +4 -0
- package/lib/duet/{p-f12a93a9.system.entry.js → p-fa7cdaa4.system.entry.js} +1 -1
- package/lib/duet/{p-5baa6a33.js → p-faed9fef.js} +1 -1
- package/lib/duet/{p-f6c800dd.system.entry.js → p-fb515009.system.entry.js} +1 -1
- package/lib/duet/{p-976918a1.system.entry.js → p-fb574eaf.system.entry.js} +1 -1
- package/lib/duet/{p-530e612b.js → p-fb811193.js} +1 -1
- package/lib/duet/{p-9192b71d.system.entry.js → p-fb98c26d.system.entry.js} +1 -1
- package/lib/duet/{p-82cf9d43.entry.js → p-fba4682d.entry.js} +1 -1
- package/lib/duet/{p-6a689584.system.entry.js → p-fcbcf5d6.system.entry.js} +1 -1
- package/lib/duet/p-fcca7eb3.entry.js +4 -0
- package/lib/duet/{p-6365f418.system.entry.js → p-fd6e9582.system.entry.js} +1 -1
- package/lib/esm/{a11y-utils-d3187c9b.js → a11y-utils-682fc061.js} +1 -1
- package/lib/esm/{app-globals-aa323b86.js → app-globals-5ae3ef64.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +2 -2
- package/lib/esm/duet-alert.entry.js +16 -16
- package/lib/esm/duet-badge.entry.js +3 -3
- package/lib/esm/duet-banner.entry.js +4 -4
- 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 +9 -9
- package/lib/esm/duet-callout.entry.js +4 -4
- package/lib/esm/duet-caption_4.entry.js +30 -13
- package/lib/esm/duet-card.entry.js +5 -5
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-checkmark.entry.js +3 -3
- package/lib/esm/duet-chip.entry.js +3 -3
- 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 +8 -4
- 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 +9 -3
- 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 +11 -11
- 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 +9 -3
- package/lib/esm/duet-popup-menu_2.entry.js +8 -8
- 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 +23 -14
- 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 +6 -6
- 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 +9 -9
- package/lib/esm/duet-status-icon.entry.js +8 -8
- 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 +7 -7
- 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-2a62c871.js → errorcodes.utils-23d19523.js} +1 -1
- package/lib/esm/{focus-utils-27172227.js → focus-utils-b97d6fb5.js} +1 -1
- package/lib/esm/{index-2ab7ff5a.js → index-9b64dfa3.js} +6 -6
- package/lib/esm/{language-utils-579bbfe7.js → language-utils-87dc6eb1.js} +1 -1
- package/lib/esm/loader.js +4 -4
- package/lib/esm/{slot-utils-2fa37472.js → slot-utils-b8cbdf64.js} +1 -1
- package/lib/esm/{teleport-546f382d.js → teleport-aa27d5f9.js} +2 -2
- package/lib/esm-es5/{a11y-utils-d3187c9b.js → a11y-utils-682fc061.js} +1 -1
- package/lib/esm-es5/{app-globals-aa323b86.js → app-globals-5ae3ef64.js} +1 -1
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- package/lib/esm-es5/duet-alert.entry.js +2 -2
- 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 +1 -1
- package/lib/esm-es5/duet-callout.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +2 -2
- package/lib/esm-es5/duet-card.entry.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-button.entry.js +2 -2
- package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
- 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 +1 -1
- package/lib/esm-es5/duet-popup-menu_2.entry.js +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{errorcodes.utils-2a62c871.js → errorcodes.utils-23d19523.js} +1 -1
- package/lib/esm-es5/{focus-utils-27172227.js → focus-utils-b97d6fb5.js} +1 -1
- package/lib/esm-es5/index-9b64dfa3.js +4 -0
- package/lib/esm-es5/{language-utils-579bbfe7.js → language-utils-87dc6eb1.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{slot-utils-2fa37472.js → slot-utils-b8cbdf64.js} +1 -1
- package/lib/esm-es5/teleport-aa27d5f9.js +4 -0
- package/lib/types/components/duet-alert/duet-alert.d.ts +11 -4
- package/lib/types/components/duet-combobox/duet-combobox.d.ts +1 -0
- package/lib/types/components/duet-input/duet-input.d.ts +4 -0
- package/lib/types/components/duet-link/duet-link.d.ts +3 -0
- package/lib/types/components/duet-phone-input/duet-phone-input.d.ts +4 -0
- package/lib/types/components/duet-scrollable/duet-scrollable.d.ts +5 -0
- package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +9 -0
- package/lib/types/components.d.ts +54 -6
- package/package.json +4 -4
- package/lib/dist-custom-elements/p-9fda1d1d.js +0 -205
- package/lib/duet/p-0ac49d24.entry.js +0 -4
- package/lib/duet/p-0f99e898.entry.js +0 -4
- package/lib/duet/p-1219c4af.system.js +0 -4
- package/lib/duet/p-14fe190e.system.js +0 -5
- package/lib/duet/p-1a73d27a.entry.js +0 -4
- package/lib/duet/p-1b269e8b.system.entry.js +0 -4
- package/lib/duet/p-2f8ffc2b.system.entry.js +0 -4
- package/lib/duet/p-336da573.entry.js +0 -4
- package/lib/duet/p-38ff8286.js +0 -4
- package/lib/duet/p-3acc8647.system.js +0 -4
- package/lib/duet/p-43f0aaf5.entry.js +0 -4
- package/lib/duet/p-5e0bfce0.entry.js +0 -4
- package/lib/duet/p-5ff9214f.entry.js +0 -4
- package/lib/duet/p-7d396a31.entry.js +0 -4
- package/lib/duet/p-85c02068.entry.js +0 -4
- package/lib/duet/p-88f046a0.entry.js +0 -4
- package/lib/duet/p-897f21a7.system.js +0 -4
- package/lib/duet/p-98012c62.entry.js +0 -4
- package/lib/duet/p-9eeaf2e9.js +0 -4
- package/lib/duet/p-c936b330.system.entry.js +0 -4
- package/lib/duet/p-ca3cb21e.js +0 -4
- package/lib/duet/p-ecb2aca6.js +0 -5
- package/lib/duet/p-ed82b53d.system.entry.js +0 -4
- package/lib/duet/p-f6b21d17.system.js +0 -4
- package/lib/esm-es5/index-2ab7ff5a.js +0 -4
- package/lib/esm-es5/teleport-546f382d.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function a(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function r(t){try{u(n.next(t))}catch(t){s(t)}}function o(t){try{u(n["throw"](t))}catch(t){s(t)}}function u(t){t.done?i(t.value):a(t.value).then(r,o)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,r;return r={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function o(t){return function(e){return u([t,e])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,o[0]&&(i=0)),i)try{if(n=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;a=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){i.label=o[1];break}if(o[0]===6&&i.label<s[1]){i.label=s[1];s=o;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(o);break}if(s[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(t){o=[6,t];a=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-2ab7ff5a.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{c as createID}from"./create-id-149a1b6d.js";import{d as debounce}from"./js-utils-9b9e0039.js";import{k as isArrowKey,l as isNumber,d as isArrowLeftKey,b as isArrowUpKey,a as isArrowRightKey,c as isArrowDownKey,m as isMinusKey,n as isPlusKey}from"./keyboard-utils-daf80d44.js";import{g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-579bbfe7.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-a32eb753.js";import"./tokens.module-a746651a.js";var shouldDisplayNavigation=function(t,e,i){if(t*2>e/i){return false}return true};var duetPaginationCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}.duet-pagination-nav{position:relative}.duet-pagination ::part(button){border:0}.duet-pagination,.duet-pagination li{display:flex;flex-wrap:wrap;gap:0.1rem;align-items:center}.duet-pagination-item-is-active .duet-pagination-page-number{border-bottom-color:inherit;border-bottom-style:solid;border-bottom-width:2px}.duet-pagination duet-button{width:30px;min-width:36px;font-weight:600;text-decoration:none;border-left-width:0}.duet-pagination-overlay{position:absolute;top:1rem;z-index:300;width:100%;text-align:center}.duet-pagination.duet-pagination-is-dimmed{opacity:0.5}.duet-pagination .duet-pagination-select{margin:0 4px 0 12px !important}.duet-pagination-total-pages{margin:0;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600 !important;line-height:1.25;color:rgb(8, 42, 77);text-align:left}:host(.duet-theme-turva) .duet-pagination-total-pages{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)}';var DuetPaginationStyle0=duetPaginationCss;var DuetPagination=function(){function t(t){var e=this;registerInstance(this,t);this.duetPageChange=createEvent(this,"duetPageChange",3);this.listId=createID("duet-pagination-list");this.firstRenderDone=false;this.handleMediaQueryChange=function(t){e.matchesCompactBreakpoint=breakpointTokensUpTo.includes(e.compactBreakpoint)?t.matches:!t.matches};this.actionChain=function(t,i){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(a){switch(a.label){case 0:if(!(t===0))return[3,1];this.current=1;return[3,4];case 1:if(!(t>this.totalPages))return[3,2];this.current=this.totalPages;return[3,4];case 2:if(!(i!==t))return[3,4];e=Math.ceil(t/this.visibleItems)-1;if(!(e!==this.internalSectionIndex))return[3,4];this.internalSectionIndex=e;return[4,this.setFocus()];case 3:a.sent();a.label=4;case 4:return[2,true]}}))}))};this.emitPageEvent=function(t,i){var a=Number(i||e.current);e.duetPageChange.emit({component:"duet-pagination",from:a*e.take,to:a*e.take+e.take,current:a,take:e.take,type:"page",originalEvent:t})};this.getEnteredNumber=debounce((function(t){e.emitPageEvent(t,e.numbersStore);e.current=Number(e.numbersStore);e.numbersStore="";e.duetPageChange.emit({component:"duet-pagination",from:e.current*e.take,to:e.current*e.take+e.take,current:e.current,take:e.take,type:"jump",originalEvent:t})}),500);this.processedPageLinks=null;this.numbersStore="";this.matchesCompactBreakpoint=false;this.totalPages=10;this.internalSectionIndex=0;this.theme="";this.disabled=false;this.variation="default";this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleLabelsDefaults={en:{next_page:"Next page",previous_page:"Previous page",first_page:"First page",last_page:"Last page",jump_to:"Jump to page",go_to:"Go to page",description:"You may use arrow keys to select page number",pagination_label:"Pagination, choose a number to jump to a page",select_label:"Total pages {0}, choose a number to jump to a page",prev_section:"Show previous {0} page numbers, screen reader user should use arrowkeys to navigate",next_section:"Show next {0} page numbers, screen reader user should use arrowkeys to navigate"},fi:{next_page:"Seuraava sivu",previous_page:"Edellinen sivu",first_page:"Ensimmäinen sivu",last_page:"Viimeinen sivu",jump_to:"Siirry sivulle",go_to:"Siirry sivulle",description:"Voit käyttää nuolinäppäimiä sivunumeron valitsemiseen",pagination_label:"Sivutus, valitse sivunumero siirtyäksesi sivulle",select_label:"Sivuja yhteensä {0}, valitse sivunumero siirtyäksesi sivulle",prev_section:"Näytä edelliset {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",next_section:"Näytä seuraavat {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi"},sv:{next_page:"Nästa sida",previous_page:"Föregående sida",first_page:"Första sidan",last_page:"Sista sidan",jump_to:"Hoppa till sida",go_to:"Hoppa till sida",description:"Du kan använda piltangenterna för att välja sida",pagination_label:"Paginering, välj en siffra för att hoppa till en sida",select_label:"Totalt antal sidor {0}, välj en siffra för att hoppa till en sida",prev_section:"Visa föregående {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",next_section:"Visa nästa {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera"}};this.accessibleLabels=getLocaleString(this.accessibleLabelsDefaults);this.take=5;this.visibleItems=5;this.total=1e3;this.compactBreakpoint="x-small";this.ariaControls="";this.current=1;this.pageLinks=undefined}t.prototype.watchPropTotalHandler=function(){this.calculatePageTake();return true};t.prototype.watchStateHandler=function(t,e){return this.actionChain(t,e)};t.prototype.componentWillLoad=function(){this.internalSectionIndex=Math.ceil(this.current/this.visibleItems)-1;this.calculatePageTake();inheritGlobalTheme(this);this.refresh()};t.prototype.componentDidLoad=function(){this.firstRenderDone=true};t.prototype.componentWillRender=function(){if(this.internalSectionIndex!==0&&this.internalSectionIndex!==this.totalPages){this.calculatePageTake()}};t.prototype.componentDidRender=function(){if(this.firstRenderDone&&!this.processedPageLinks){this.setFocus()}};t.prototype.connectedCallback=function(){var t=this.compactBreakpoint==="none"?"all":breakpointToToken[this.compactBreakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);connectLanguageChangeObserver(this,{prop:"accessibleLabels",defaults:"accessibleLabelsDefaults"})};t.prototype.disconnectedCallback=function(){this.mq.removeEventListener("change",this.handleMediaQueryChange);this.mq=null;this.matchesCompactBreakpoint=false;disconnectLanguageChangeObserver(this)};t.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.processedPageLinks=parsePossibleJSON(this.pageLinks);return[2]}))}))};t.prototype.calculatePageTake=function(){this.totalPages=Math.ceil(this.total/this.take)};t.prototype.onMouseHandler=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.disabled){return[2]}if(!this.processedPageLinks){t.preventDefault();t.stopPropagation();this.current=this.current+e}this.emitPageEvent(t);return[2]}))}))};t.prototype.onKeyboardDown=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){if(this.disabled){return[2]}e=this.current;if(isArrowLeftKey(t)||isArrowUpKey(t)){e--}if(isArrowRightKey(t)||isArrowDownKey(t)){e++}if(isArrowKey(t)){if(e<=this.totalPages){this.current=e;if(this.processedPageLinks){this.emitPageEvent(t,e-1);window.open(this.processedPageLinks[e-1],"_self","")}else{this.emitPageEvent(t)}}}if(isNumber(t)&&this.shouldDisplayNavigation()){this.numbersStore=this.numbersStore+t.key;if(Number(this.numbersStore)>this.totalPages){this.numbersStore=this.totalPages+""}this.getEnteredNumber(t)}return[2]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=this.nativeNav.querySelector("[data-id='".concat(this.current,"']"));e=t;if(!e)return[3,2];return[4,t.setFocus()];case 1:e=i.sent();i.label=2;case 2:e;return[2]}}))}))};t.prototype.pageClickHandler=function(t){var e=Number(t.target.getAttribute("data-id"));if(!this.processedPageLinks){t.preventDefault();this.current=e}this.emitPageEvent(t,e)};t.prototype.selectClickHandler=function(t){t.preventDefault();var e=Number(t.target.value);this.current=e;if(this.processedPageLinks){this.emitPageEvent(t,e-1);window.open(this.processedPageLinks[e-1],"_self","")}else{this.emitPageEvent(t,e)}};t.prototype.sectionClickHandler=function(t,e){t.preventDefault();var i=this.internalSectionIndex+e;var a=this.take*this.visibleItems;if(i*a>this.total){i=this.internalSectionIndex}var n=i;this.internalSectionIndex=n>=0?n:0};t.prototype.jumpToStart=function(t){if(!this.processedPageLinks){t.preventDefault();this.internalSectionIndex=0;this.current=1}this.emitPageEvent(t)};t.prototype.jumpToEnd=function(t){if(!this.processedPageLinks){t.preventDefault();this.internalSectionIndex=Math.ceil(this.totalPages/this.take-1);this.current=this.totalPages}this.emitPageEvent(t)};t.prototype.renderPageButton=function(t){var e=this;return h("duet-button",{disabled:this.disabled,class:{"duet-pagination-link":true},id:"page-".concat(t,"-button"),color:t!==this.current?this.theme!=="turva"?"secondary":"secondary-turva":this.theme!=="turva"?"primary":"primary-turva","data-id":t,"center-text":true,variation:"plain",margin:"none",accessibleLabel:"".concat(this.accessibleLabels.go_to," ").concat(t),onClick:function(t){return e.pageClickHandler(t)},theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[t-1]:undefined},h("div",{class:"duet-pagination-page-number","aria-hidden":true},t))};t.prototype.renderPageNumbers=function(){var t=[];var e=this.internalSectionIndex*this.visibleItems;do{e++;if(e>this.totalPages){break}t.push(h("li",{class:{"duet-pagination-item":true,"duet-pagination-item-is-active":e===this.current},role:"menuitem"},this.renderPageButton(e)))}while(e<this.visibleItems+this.internalSectionIndex*this.visibleItems);return t};t.prototype.renderSelect=function(){var t=this;var e=[];for(var i=1;i<=this.totalPages;i++){e.push({value:i.toString(),label:i.toString()})}var a=h("duet-select",{disabled:this.disabled,theme:this.theme,class:"duet-pagination-select",variation:"compact",items:JSON.stringify(e),value:this.current.toString(),label:this.accessibleLabels.select_label.replace("{0}","".concat(this.totalPages)),labelHidden:true,onDuetChange:function(e){return t.selectClickHandler(e)}});return h("li",null,a,h("span",{class:"duet-pagination-total-pages","aria-hidden":"true"},"/ ",this.totalPages))};t.prototype.shouldDisplayNavigation=function(){if(this.variation!=="compact"&&!this.matchesCompactBreakpoint){return shouldDisplayNavigation(this.visibleItems,this.total,this.take)}return false};t.prototype.render=function(){var t;var e=this;return h(Host,{key:"51f0c1a1d5a16a99b2650f72c7b5fbf118532720",onKeyDown:function(t){return e.onKeyboardDown(t)},class:{"duet-theme-turva":this.theme==="turva"}},h("nav",{key:"60fa85678350ba5b52095f3db11f46864cd5b24f",role:"navigation","aria-labelledby":this.accessibleLabelledBy?"".concat(this.accessibleLabelledBy," ").concat(this.listId):this.listId,"aria-describedby":this.accessibleDescribedBy?"".concat(this.accessibleDescribedBy," ").concat(this.listId):this.listId,"aria-descriptions":this.accessibleDescription,"aria-details":this.accessibleDetails,ref:function(t){return e.nativeNav=t},"aria-controls":this.ariaControls,class:(t={"duet-pagination-nav":true},t["duet-pagination-variation-".concat(this.variation)]=true,t)},this.numbersStore!==""&&h("div",{key:"9085f262dca839c18be2b7798a389e7536dd900c","aria-live":"assertive","aria-relevant":"text",class:"duet-pagination-overlay","aria-label":"".concat(this.accessibleLabels.jump_to," ").concat(this.numbersStore),part:"navigation-overlay"},h("duet-badge",{key:"866869d03bf3a59593b8b3a9b09ae90929dad2b9",theme:this.theme},"jump to page : ",this.numbersStore)),h("ol",{key:"ad8a1c3c60b6f46a631e61fe5c7b7d083526b011",id:this.listId,class:{"duet-pagination":true,"duet-pagination-is-dimmed":this.numbersStore!==""},role:"menubar","aria-label":this.accessibleLabels.pagination_label,"aria-description":this.accessibleLabels.description},(this.variation==="compact"||this.matchesCompactBreakpoint)&&h("li",{key:"13a5f6ae9ca077d056926927c341619e3c421fe4",class:{"duet-pagination-page-button":true,"duet-pagination-button-first":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"847da0bfd22d6d1724e10165397e1957ca3a1a9c",disabled:this.internalSectionIndex===0&&this.current<=1||this.disabled,"data-direction":"back",accessibleLabel:this.accessibleLabels.first_page,title:this.accessibleLabels.first_page,onClick:function(t){return e.jumpToStart(t)},"icon-name":"action-move-to-first",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[0]:undefined})),h("li",{key:"16ea0206eea69bc4c3862cd41fdc3a94db5ccba4",class:{"duet-pagination-page-button":true,"duet-pagination-button-first":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"33ea4c7865120aed99108906a9c4b4ff34a0590d",disabled:!!(this.internalSectionIndex===0&&this.current<=1||this.current<=1&&this.processedPageLinks||this.disabled),"data-direction":"back",onClick:function(t){return e.onMouseHandler(t,-1)},"accessible-label":this.accessibleLabels.previous_page,title:this.accessibleLabels.previous_page,"icon-name":"action-arrow-left-small",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.current-2]:undefined})),this.internalSectionIndex!==0&&this.shouldDisplayNavigation()&&h(Fragment,{key:"c961b452d3cc93a62b3059a4d7f4dfa2c25a23a4"},h("li",{key:"4e36041ee7df9da07287aa58b95ed4b9cb3db160",class:"duet-pagination-item",role:"menuitem",part:"navigation-jump"},h("duet-button",{key:"dd161af51a0de44a42189b538e7c5a11bdf46124",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-jump-back","center-text":"true",variation:"plain",color:this.theme!=="turva"?"secondary":"secondary-turva",margin:"none",accessibleLabel:this.accessibleLabels.first_page,onClick:function(t){return e.jumpToStart(t)},theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[0]:undefined},h("div",{key:"7d8eee43b64756671843213cae0473390014a6ce",class:"duet-pagination-page-number"},"1"))),h("li",{key:"bf0e2dc3f9aca2621718e3d2b31f5fe8136ea0ee",class:"duet-pagination-item",role:"menuitem",part:"navigation-section"},h("duet-button",{key:"e67129a8dcf6bb081d662308040c81e26f89368e",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-dots-back","center-text":"true",color:this.theme!=="turva"?"secondary":"secondary-turva",variation:"plain",margin:"none",accessibleLabel:this.accessibleLabels.prev_section.replace("{0}","".concat(this.visibleItems)),onClick:function(t){return e.sectionClickHandler(t,-1)},theme:this.theme},h("div",{key:"edf800d14122c7a156e2852feaf8292c0f2cb0ba",class:"duet-pagination-page-number","aria-hidden":"true"},"…")))),this.shouldDisplayNavigation()&&this.renderPageNumbers()||this.renderSelect(),(this.internalSectionIndex+1)*this.visibleItems<this.totalPages&&this.shouldDisplayNavigation()&&h(Fragment,{key:"a7ba8fad52c4f52916bbd52cb50b45fcfcb4dc8c"},(this.internalSectionIndex+1)*this.visibleItems!==this.totalPages-1&&h("li",{key:"73f0d4c00ca3e2ab1c28d6d290214e5f5841a869",class:"duet-pagination-item",role:"menuitem",part:"navigation-section"},h("duet-button",{key:"c49588a61cff0248853d27711faaed8ba6e3185c",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-dots-forward","center-text":"true",color:this.theme!=="turva"?"secondary":"secondary-turva",variation:"plain",margin:"none",accessibleLabel:this.accessibleLabels.next_section.replace("{0}","".concat(this.visibleItems)),onClick:function(t){return e.sectionClickHandler(t,1)},theme:this.theme},h("div",{key:"1d3dcae494cc6e91d04099de95e7a338830654ce",class:"duet-pagination-page-number","aria-hidden":"true"},"…"))),h("li",{key:"da984b3aedda5967f12aef6368a5d389c5928d87",class:"duet-pagination-item",role:"menuitem",part:"navigation-jump"},h("duet-button",{key:"af45256868353af59b8d242cee961d7962c96266",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-jump-forward","center-text":"true",color:this.theme!=="turva"?"secondary":"secondary-turva",variation:"plain",margin:"none",accessibleLabel:this.accessibleLabels.last_page,onClick:function(t){return e.jumpToEnd(t)},theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.processedPageLinks.length-1]:undefined},h("div",{key:"52c7db3f203d4bfbaebb844ee3b06fca983c1fd1",class:"duet-pagination-page-number"},this.totalPages)))),h("li",{key:"4c7edb8ca99f3993c4b64ac153112491a72f1d01",class:{"duet-pagination-page-button":true,"duet-pagination-button-last":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"f7909374d12e9e6e7474293cf24f50d4df584e72",disabled:!!(this.current===this.totalPages&&this.internalSectionIndex===Math.ceil(this.totalPages/this.visibleItems)-1||this.current===this.totalPages&&this.processedPageLinks)||this.disabled,class:"duet-date-dialog-next","accessible-label":this.accessibleLabels.next_page,title:this.accessibleLabels.next_page,onClick:function(t){return e.onMouseHandler(t,1)},"icon-name":"action-move-to-next",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.current]:undefined})),(this.variation==="compact"||this.matchesCompactBreakpoint)&&h("li",{key:"951483492689ef3558b55a8a1ee2d77dd2f143c3",class:{"duet-pagination-page-button":true,"duet-pagination-button-last":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"88d890a714833a29323e24a62afbd25bdcfe9a69",disabled:this.current===this.totalPages&&this.internalSectionIndex===Math.ceil(this.totalPages/this.visibleItems)-1||this.disabled,accessibleLabel:this.accessibleLabels.last_page,title:this.accessibleLabels.last_page,onClick:function(t){return e.jumpToEnd(t)},"icon-name":"action-move-to-last",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.totalPages-1]:undefined})))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{total:["watchPropTotalHandler"],current:["watchStateHandler"],pageLinks:["refresh"]}},enumerable:false,configurable:true});return t}();DuetPagination.style=DuetPaginationStyle0;var duetRangeStepperCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}.duet-range-stepper{display:flex;flex-wrap:wrap;gap:0;align-items:baseline;justify-content:center;min-width:30px;min-height:30px;font-weight:600;text-decoration:none;border-left-width:0}.duet-range-stepper{white-space:nowrap}.duet-range-stepper .duet-range-step-counter{font-weight:600;color:rgb(8, 42, 77)}.duet-range-stepper ::part(button){border:0}";var DuetRangeStepperStyle0=duetRangeStepperCss;var DuetRangeStepper=function(){function t(t){var e=this;registerInstance(this,t);this.duetRangeStepUpdate=createEvent(this,"duetRangeStepUpdate",7);this.leftBn=createID("duetRangeStepper-left");this.rightBn=createID("duetRangeStepper-right");this.handleClick=function(t,i){t.preventDefault();e.stepIndex+=i;e.clampStepIndex();e.handleStepClick(t)};this.buttonLeftDisabled=false;this.buttonRightDisabled=false;this.theme="";this.disabled=false;this.stepIndex=1;this.stepSize=50;this.total=1e3;this.ariaLabelsDefaults={en:{next_increment:"Next range increment",previous_increment:"Previous range increment",x_of_y:"{0}–{1} of {2}"},fi:{next_increment:"Seuraava välillä",previous_increment:"Edellinen välillä",x_of_y:"{0}–{1} / {2}"},sv:{next_increment:"Nästa intervall",previous_increment:"Föregående intervall",x_of_y:"{0}–{1} av {2}"}};this.ariaLabels=getLocaleString(this.ariaLabelsDefaults);this.ariaControls=""}t.prototype.watchStepIndexStateHandler=function(t){if(this.leftBnRef&&this.rightBnRef){if(t<=1){if(this.element===document.activeElement){this.rightBnRef.setFocus()}this.buttonLeftDisabled=true}else{this.buttonLeftDisabled=false}if(t>=this.total/this.stepSize){if(this.element===document.activeElement){this.leftBnRef.setFocus()}this.buttonRightDisabled=true}else{this.buttonRightDisabled=false}}};t.prototype.watchStepSizeStateHandler=function(t,e){if(t!==e){if(this.stepIndex*t>this.total){this.stepIndex=Math.ceil(this.total/t)}this.watchStepIndexStateHandler(this.stepIndex)}};t.prototype.handleStepClick=function(t){this.duetRangeStepUpdate.emit({originalEvent:t,component:"duet-range-stepper",from:this.getFrom(),to:this.getTo(),index:this.stepIndex})};t.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.clampStepIndex()};t.prototype.componentDidLoad=function(){this.watchStepIndexStateHandler(this.stepIndex)};t.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"ariaLabels",defaults:"ariaLabelsDefaults"})};t.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};t.prototype.clampStepIndex=function(){if(this.stepIndex<1){this.stepIndex=1}else if(this.stepIndex*this.stepSize>this.total){this.stepIndex=Math.ceil(this.total/this.stepSize)}};t.prototype.getFrom=function(){return Math.floor((this.stepIndex-1)*this.stepSize)+1};t.prototype.getTo=function(){return Math.min(Math.floor(this.stepIndex*this.stepSize),this.total)};t.prototype.generateStepSize=function(){return this.ariaLabels.x_of_y.replace("{0}",String(this.getFrom())).replace("{1}",String(this.getTo())).replace("{2}",String(this.total))};t.prototype.generatePreviousIncrementLabel=function(){if(this.getFrom()===1){return""}return this.ariaLabels.x_of_y.replace("{0}",String(Math.max(this.getFrom()-this.stepSize,1))).replace("{1}",String(Math.min(this.getFrom()-1,this.total))).replace("{2}",String(this.total))};t.prototype.generateNextIncrementLabel=function(){if(this.getTo()===this.total){return""}return this.ariaLabels.x_of_y.replace("{0}",String(this.getTo()+1)).replace("{1}",String(Math.min(this.getTo()+this.stepSize,this.total))).replace("{2}",String(this.total))};t.prototype.onKeyboardDown=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(a){if(this.disabled){return[2]}e=this.stepIndex;i=1;if(isArrowLeftKey(t)||isArrowUpKey(t)||isMinusKey(t)){e--;i=-1;this.leftBnRef.setFocus()}if(isArrowRightKey(t)||isArrowDownKey(t)||isPlusKey(t)){e++;i=1}if(isArrowKey(t)){if(e>0&&e*this.stepSize<=this.total){this.handleClick(t,i)}}return[2]}))}))};t.prototype.render=function(){var t=this;return h("div",{key:"9221b16527b63eb5558cc9422c26fc70e3d44935",class:{"duet-range-stepper":true,"duet-theme-turva":this.theme==="turva"},onKeyDown:function(e){return t.onKeyboardDown(e)},"aria-controls":this.ariaControls},h("span",{key:"301b08e846538f0e5d4da1b205ff27d1fa860075",class:"duet-range-step-counter",part:"range-numbers"},this.generateStepSize()),h("duet-action-button",{key:"8f0a856cff8bf8a66e389c505d1817e2b038a201",disabled:this.disabled||this.buttonLeftDisabled,class:"duet-range-step-button duet-range-step-minus",onClick:function(e){return t.handleClick(e,-1)},id:this.leftBn,"accessible-label":"".concat(this.ariaLabels.previous_increment," ").concat(this.generatePreviousIncrementLabel()),ref:function(e){return t.leftBnRef=e},part:"navigation-arrow",iconName:"action-arrow-left-small",title:""}),h("duet-action-button",{key:"0746ef65ce1181f4975853482470b6064d2d680a",disabled:this.disabled||this.buttonRightDisabled,class:"duet-range-step-button duet-range-step-plus",onClick:function(e){return t.handleClick(e,1)},"accessible-label":"".concat(this.ariaLabels.next_increment," ").concat(this.generateNextIncrementLabel()),id:this.rightBn,ref:function(e){return t.rightBnRef=e},part:"navigation-arrow",iconName:"action-arrow-right-small",title:""}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stepIndex:["watchStepIndexStateHandler"],stepSize:["watchStepSizeStateHandler"]}},enumerable:false,configurable:true});return t}();DuetRangeStepper.style=DuetRangeStepperStyle0;export{DuetPagination as duet_pagination,DuetRangeStepper as duet_range_stepper};
|
|
4
|
+
*/import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-9b64dfa3.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{c as createID}from"./create-id-149a1b6d.js";import{d as debounce}from"./js-utils-9b9e0039.js";import{k as isArrowKey,l as isNumber,d as isArrowLeftKey,b as isArrowUpKey,a as isArrowRightKey,c as isArrowDownKey,m as isMinusKey,n as isPlusKey}from"./keyboard-utils-daf80d44.js";import{g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-87dc6eb1.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-a32eb753.js";import"./tokens.module-a746651a.js";var shouldDisplayNavigation=function(t,e,i){if(t*2>e/i){return false}return true};var duetPaginationCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}.duet-pagination-nav{position:relative}.duet-pagination ::part(button){border:0}.duet-pagination,.duet-pagination li{display:flex;flex-wrap:wrap;gap:0.1rem;align-items:center}.duet-pagination-item-is-active .duet-pagination-page-number{border-bottom-color:inherit;border-bottom-style:solid;border-bottom-width:2px}.duet-pagination duet-button{width:30px;min-width:36px;font-weight:600;text-decoration:none;border-left-width:0}.duet-pagination-overlay{position:absolute;top:1rem;z-index:300;width:100%;text-align:center}.duet-pagination.duet-pagination-is-dimmed{opacity:0.5}.duet-pagination .duet-pagination-select{margin:0 4px 0 12px !important}.duet-pagination-total-pages{margin:0;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600 !important;line-height:1.25;color:rgb(8, 42, 77);text-align:left}:host(.duet-theme-turva) .duet-pagination-total-pages{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)}';var DuetPaginationStyle0=duetPaginationCss;var DuetPagination=function(){function t(t){var e=this;registerInstance(this,t);this.duetPageChange=createEvent(this,"duetPageChange",3);this.listId=createID("duet-pagination-list");this.firstRenderDone=false;this.handleMediaQueryChange=function(t){e.matchesCompactBreakpoint=breakpointTokensUpTo.includes(e.compactBreakpoint)?t.matches:!t.matches};this.actionChain=function(t,i){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:if(!(t===0))return[3,1];this.current=1;return[3,4];case 1:if(!(t>this.totalPages))return[3,2];this.current=this.totalPages;return[3,4];case 2:if(!(i!==t))return[3,4];e=Math.ceil(t/this.visibleItems)-1;if(!(e!==this.internalSectionIndex))return[3,4];this.internalSectionIndex=e;return[4,this.setFocus()];case 3:n.sent();n.label=4;case 4:return[2,true]}}))}))};this.emitPageEvent=function(t,i){var n=Number(i||e.current);e.duetPageChange.emit({component:"duet-pagination",from:n*e.take,to:n*e.take+e.take,current:n,take:e.take,type:"page",originalEvent:t})};this.getEnteredNumber=debounce((function(t){e.emitPageEvent(t,e.numbersStore);e.current=Number(e.numbersStore);e.numbersStore="";e.duetPageChange.emit({component:"duet-pagination",from:e.current*e.take,to:e.current*e.take+e.take,current:e.current,take:e.take,type:"jump",originalEvent:t})}),500);this.processedPageLinks=null;this.numbersStore="";this.matchesCompactBreakpoint=false;this.totalPages=10;this.internalSectionIndex=0;this.theme="";this.disabled=false;this.variation="default";this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleLabelsDefaults={en:{next_page:"Next page",previous_page:"Previous page",first_page:"First page",last_page:"Last page",jump_to:"Jump to page",go_to:"Go to page",description:"You may use arrow keys to select page number",pagination_label:"Pagination, choose a number to jump to a page",select_label:"Total pages {0}, choose a number to jump to a page",prev_section:"Show previous {0} page numbers, screen reader user should use arrowkeys to navigate",next_section:"Show next {0} page numbers, screen reader user should use arrowkeys to navigate"},fi:{next_page:"Seuraava sivu",previous_page:"Edellinen sivu",first_page:"Ensimmäinen sivu",last_page:"Viimeinen sivu",jump_to:"Siirry sivulle",go_to:"Siirry sivulle",description:"Voit käyttää nuolinäppäimiä sivunumeron valitsemiseen",pagination_label:"Sivutus, valitse sivunumero siirtyäksesi sivulle",select_label:"Sivuja yhteensä {0}, valitse sivunumero siirtyäksesi sivulle",prev_section:"Näytä edelliset {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi",next_section:"Näytä seuraavat {0} sivunumerot, käyttäjän pitää käyttää nuolinäppäimiä navigoidaksesi"},sv:{next_page:"Nästa sida",previous_page:"Föregående sida",first_page:"Första sidan",last_page:"Sista sidan",jump_to:"Hoppa till sida",go_to:"Hoppa till sida",description:"Du kan använda piltangenterna för att välja sida",pagination_label:"Paginering, välj en siffra för att hoppa till en sida",select_label:"Totalt antal sidor {0}, välj en siffra för att hoppa till en sida",prev_section:"Visa föregående {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera",next_section:"Visa nästa {0} sidnummer, skrivbordsläsare ska använda piltangenterna för att navigera"}};this.accessibleLabels=getLocaleString(this.accessibleLabelsDefaults);this.take=5;this.visibleItems=5;this.total=1e3;this.compactBreakpoint="x-small";this.ariaControls="";this.current=1;this.pageLinks=undefined}t.prototype.watchPropTotalHandler=function(){this.calculatePageTake();return true};t.prototype.watchStateHandler=function(t,e){return this.actionChain(t,e)};t.prototype.componentWillLoad=function(){this.internalSectionIndex=Math.ceil(this.current/this.visibleItems)-1;this.calculatePageTake();inheritGlobalTheme(this);this.refresh()};t.prototype.componentDidLoad=function(){this.firstRenderDone=true};t.prototype.componentWillRender=function(){if(this.internalSectionIndex!==0&&this.internalSectionIndex!==this.totalPages){this.calculatePageTake()}};t.prototype.componentDidRender=function(){if(this.firstRenderDone&&!this.processedPageLinks){this.setFocus()}};t.prototype.connectedCallback=function(){var t=this.compactBreakpoint==="none"?"all":breakpointToToken[this.compactBreakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);connectLanguageChangeObserver(this,{prop:"accessibleLabels",defaults:"accessibleLabelsDefaults"})};t.prototype.disconnectedCallback=function(){this.mq.removeEventListener("change",this.handleMediaQueryChange);this.mq=null;this.matchesCompactBreakpoint=false;disconnectLanguageChangeObserver(this)};t.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.processedPageLinks=parsePossibleJSON(this.pageLinks);return[2]}))}))};t.prototype.calculatePageTake=function(){this.totalPages=Math.ceil(this.total/this.take)};t.prototype.onMouseHandler=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.disabled){return[2]}if(!this.processedPageLinks){t.preventDefault();t.stopPropagation();this.current=this.current+e}this.emitPageEvent(t);return[2]}))}))};t.prototype.onKeyboardDown=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){if(this.disabled){return[2]}e=this.current;if(isArrowLeftKey(t)||isArrowUpKey(t)){e--}if(isArrowRightKey(t)||isArrowDownKey(t)){e++}if(isArrowKey(t)){if(e<=this.totalPages){this.current=e;if(this.processedPageLinks){this.emitPageEvent(t,e-1);window.open(this.processedPageLinks[e-1],"_self","")}else{this.emitPageEvent(t)}}}if(isNumber(t)&&this.shouldDisplayNavigation()){this.numbersStore=this.numbersStore+t.key;if(Number(this.numbersStore)>this.totalPages){this.numbersStore=this.totalPages+""}this.getEnteredNumber(t)}return[2]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=this.nativeNav.querySelector("[data-id='".concat(this.current,"']"));e=t;if(!e)return[3,2];return[4,t.setFocus()];case 1:e=i.sent();i.label=2;case 2:e;return[2]}}))}))};t.prototype.pageClickHandler=function(t){var e=Number(t.target.getAttribute("data-id"));if(!this.processedPageLinks){t.preventDefault();this.current=e}this.emitPageEvent(t,e)};t.prototype.selectClickHandler=function(t){t.preventDefault();var e=Number(t.target.value);this.current=e;if(this.processedPageLinks){this.emitPageEvent(t,e-1);window.open(this.processedPageLinks[e-1],"_self","")}else{this.emitPageEvent(t,e)}};t.prototype.sectionClickHandler=function(t,e){t.preventDefault();var i=this.internalSectionIndex+e;var n=this.take*this.visibleItems;if(i*n>this.total){i=this.internalSectionIndex}var a=i;this.internalSectionIndex=a>=0?a:0};t.prototype.jumpToStart=function(t){if(!this.processedPageLinks){t.preventDefault();this.internalSectionIndex=0;this.current=1}this.emitPageEvent(t)};t.prototype.jumpToEnd=function(t){if(!this.processedPageLinks){t.preventDefault();this.internalSectionIndex=Math.ceil(this.totalPages/this.take-1);this.current=this.totalPages}this.emitPageEvent(t)};t.prototype.renderPageButton=function(t){var e=this;return h("duet-button",{disabled:this.disabled,class:{"duet-pagination-link":true},id:"page-".concat(t,"-button"),color:t!==this.current?this.theme!=="turva"?"secondary":"secondary-turva":this.theme!=="turva"?"primary":"primary-turva","data-id":t,"center-text":true,variation:"plain",margin:"none",accessibleLabel:"".concat(this.accessibleLabels.go_to," ").concat(t),onClick:function(t){return e.pageClickHandler(t)},theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[t-1]:undefined},h("div",{class:"duet-pagination-page-number","aria-hidden":true},t))};t.prototype.renderPageNumbers=function(){var t=[];var e=this.internalSectionIndex*this.visibleItems;do{e++;if(e>this.totalPages){break}t.push(h("li",{class:{"duet-pagination-item":true,"duet-pagination-item-is-active":e===this.current},role:"menuitem"},this.renderPageButton(e)))}while(e<this.visibleItems+this.internalSectionIndex*this.visibleItems);return t};t.prototype.renderSelect=function(){var t=this;var e=[];for(var i=1;i<=this.totalPages;i++){e.push({value:i.toString(),label:i.toString()})}var n=h("duet-select",{disabled:this.disabled,theme:this.theme,class:"duet-pagination-select",variation:"compact",items:JSON.stringify(e),value:this.current.toString(),label:this.accessibleLabels.select_label.replace("{0}","".concat(this.totalPages)),labelHidden:true,onDuetChange:function(e){return t.selectClickHandler(e)}});return h("li",null,n,h("span",{class:"duet-pagination-total-pages","aria-hidden":"true"},"/ ",this.totalPages))};t.prototype.shouldDisplayNavigation=function(){if(this.variation!=="compact"&&!this.matchesCompactBreakpoint){return shouldDisplayNavigation(this.visibleItems,this.total,this.take)}return false};t.prototype.render=function(){var t;var e=this;return h(Host,{key:"46ed5d4ac7d4f6fd6c8836da58b53d8f6b37e293",onKeyDown:function(t){return e.onKeyboardDown(t)},class:{"duet-theme-turva":this.theme==="turva"}},h("nav",{key:"2d3d82550e80258763d3d358011f79c91dce9539",role:"navigation","aria-labelledby":this.accessibleLabelledBy?"".concat(this.accessibleLabelledBy," ").concat(this.listId):this.listId,"aria-describedby":this.accessibleDescribedBy?"".concat(this.accessibleDescribedBy," ").concat(this.listId):this.listId,"aria-descriptions":this.accessibleDescription,"aria-details":this.accessibleDetails,ref:function(t){return e.nativeNav=t},"aria-controls":this.ariaControls,class:(t={"duet-pagination-nav":true},t["duet-pagination-variation-".concat(this.variation)]=true,t)},this.numbersStore!==""&&h("div",{key:"92e8b40079a47d3bba5058fad86d43bee28aea5a","aria-live":"assertive","aria-relevant":"text",class:"duet-pagination-overlay","aria-label":"".concat(this.accessibleLabels.jump_to," ").concat(this.numbersStore),part:"navigation-overlay"},h("duet-badge",{key:"9b86db811736e7d40fea8e7beef5f8059ed6ed52",theme:this.theme},"jump to page : ",this.numbersStore)),h("ol",{key:"096543ca516822c32c5c6b7c6fa5f87f9e55bfd6",id:this.listId,class:{"duet-pagination":true,"duet-pagination-is-dimmed":this.numbersStore!==""},role:"menubar","aria-label":this.accessibleLabels.pagination_label,"aria-description":this.accessibleLabels.description},(this.variation==="compact"||this.matchesCompactBreakpoint)&&h("li",{key:"04f0c6b6f919e0b683af8eace28aae7ad92e89c5",class:{"duet-pagination-page-button":true,"duet-pagination-button-first":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"ee4222708ce462a8271c2defeae7b1dcccad2335",disabled:this.internalSectionIndex===0&&this.current<=1||this.disabled,"data-direction":"back",accessibleLabel:this.accessibleLabels.first_page,title:this.accessibleLabels.first_page,onClick:function(t){return e.jumpToStart(t)},"icon-name":"action-move-to-first",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[0]:undefined})),h("li",{key:"46c2cae3bf4264558a3e10d787b72f8f24008a56",class:{"duet-pagination-page-button":true,"duet-pagination-button-first":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"eff45547458a5ae69885038d2f9bf70987b2d9b6",disabled:!!(this.internalSectionIndex===0&&this.current<=1||this.current<=1&&this.processedPageLinks||this.disabled),"data-direction":"back",onClick:function(t){return e.onMouseHandler(t,-1)},"accessible-label":this.accessibleLabels.previous_page,title:this.accessibleLabels.previous_page,"icon-name":"action-arrow-left-small",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.current-2]:undefined})),this.internalSectionIndex!==0&&this.shouldDisplayNavigation()&&h(Fragment,{key:"7bb78a6b857a713f8b0538242d7201d2458a4093"},h("li",{key:"ebc516d88071e8a02d454e9b5fa7a4d01fc0978d",class:"duet-pagination-item",role:"menuitem",part:"navigation-jump"},h("duet-button",{key:"711f4e63b30cd5b5a5a3acc677396649d216594c",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-jump-back","center-text":"true",variation:"plain",color:this.theme!=="turva"?"secondary":"secondary-turva",margin:"none",accessibleLabel:this.accessibleLabels.first_page,onClick:function(t){return e.jumpToStart(t)},theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[0]:undefined},h("div",{key:"8c9cc99aa28744c7dc65ed0f8a25517a7bdec304",class:"duet-pagination-page-number"},"1"))),h("li",{key:"bccbbd448eb7ca1f0ce230a28ebdf7da5eed1a9a",class:"duet-pagination-item",role:"menuitem",part:"navigation-section"},h("duet-button",{key:"2a6f5239ed98dcaf74fa063ec037885d6c2b5528",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-dots-back","center-text":"true",color:this.theme!=="turva"?"secondary":"secondary-turva",variation:"plain",margin:"none",accessibleLabel:this.accessibleLabels.prev_section.replace("{0}","".concat(this.visibleItems)),onClick:function(t){return e.sectionClickHandler(t,-1)},theme:this.theme},h("div",{key:"8bc41b81a0b66a8d92d7b20a872b35689d661bde",class:"duet-pagination-page-number","aria-hidden":"true"},"…")))),this.shouldDisplayNavigation()&&this.renderPageNumbers()||this.renderSelect(),(this.internalSectionIndex+1)*this.visibleItems<this.totalPages&&this.shouldDisplayNavigation()&&h(Fragment,{key:"da8bba6fd33f32cbc2e8c4b62ff9e3730cbc314f"},(this.internalSectionIndex+1)*this.visibleItems!==this.totalPages-1&&h("li",{key:"a70996162c6bb74a47035e4d6c302f278c03eaf7",class:"duet-pagination-item",role:"menuitem",part:"navigation-section"},h("duet-button",{key:"3933cb465302e5dedcc28fd9f695872e6e7348ad",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-dots-forward","center-text":"true",color:this.theme!=="turva"?"secondary":"secondary-turva",variation:"plain",margin:"none",accessibleLabel:this.accessibleLabels.next_section.replace("{0}","".concat(this.visibleItems)),onClick:function(t){return e.sectionClickHandler(t,1)},theme:this.theme},h("div",{key:"b0eec227fe7d491ba7e67c7dbbab722ff21df2f3",class:"duet-pagination-page-number","aria-hidden":"true"},"…"))),h("li",{key:"eadf008138f45ae43738c7b12df96dbc07001385",class:"duet-pagination-item",role:"menuitem",part:"navigation-jump"},h("duet-button",{key:"63b691b0400ede1a7ff96f57d0be5e4c1a45f320",disabled:this.disabled,class:"duet-pagination-link duet-pagination-link-jump-forward","center-text":"true",color:this.theme!=="turva"?"secondary":"secondary-turva",variation:"plain",margin:"none",accessibleLabel:this.accessibleLabels.last_page,onClick:function(t){return e.jumpToEnd(t)},theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.processedPageLinks.length-1]:undefined},h("div",{key:"0a75c569fa712029c9bb6520ab684d1b3f4f84d9",class:"duet-pagination-page-number"},this.totalPages)))),h("li",{key:"6185cbd48fc4828a57bc4ba50918fbc5e85f4e02",class:{"duet-pagination-page-button":true,"duet-pagination-button-last":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"baa8819f55e717201ccf55261f96fbf0b937bfc2",disabled:!!(this.current===this.totalPages&&this.internalSectionIndex===Math.ceil(this.totalPages/this.visibleItems)-1||this.current===this.totalPages&&this.processedPageLinks)||this.disabled,class:"duet-date-dialog-next","accessible-label":this.accessibleLabels.next_page,title:this.accessibleLabels.next_page,onClick:function(t){return e.onMouseHandler(t,1)},"icon-name":"action-move-to-next",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.current]:undefined})),(this.variation==="compact"||this.matchesCompactBreakpoint)&&h("li",{key:"a2058bec39076987b90193f0274dc9a9f43741c7",class:{"duet-pagination-page-button":true,"duet-pagination-button-last":true},role:"menuitem",part:"navigation-arrow"},h("duet-action-button",{key:"4b2545937c6cc5f0b88d2d8e57e05fecc1214c7b",disabled:this.current===this.totalPages&&this.internalSectionIndex===Math.ceil(this.totalPages/this.visibleItems)-1||this.disabled,accessibleLabel:this.accessibleLabels.last_page,title:this.accessibleLabels.last_page,onClick:function(t){return e.jumpToEnd(t)},"icon-name":"action-move-to-last",theme:this.theme,url:this.processedPageLinks?this.processedPageLinks[this.totalPages-1]:undefined})))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{total:["watchPropTotalHandler"],current:["watchStateHandler"],pageLinks:["refresh"]}},enumerable:false,configurable:true});return t}();DuetPagination.style=DuetPaginationStyle0;var duetRangeStepperCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}.duet-range-stepper{display:flex;flex-wrap:wrap;gap:0;align-items:baseline;justify-content:center;min-width:30px;min-height:30px;font-weight:600;text-decoration:none;border-left-width:0}.duet-range-stepper{white-space:nowrap}.duet-range-stepper .duet-range-step-counter{font-weight:600;color:rgb(8, 42, 77)}.duet-range-stepper ::part(button){border:0}";var DuetRangeStepperStyle0=duetRangeStepperCss;var DuetRangeStepper=function(){function t(t){var e=this;registerInstance(this,t);this.duetRangeStepUpdate=createEvent(this,"duetRangeStepUpdate",7);this.leftBn=createID("duetRangeStepper-left");this.rightBn=createID("duetRangeStepper-right");this.handleClick=function(t,i){t.preventDefault();e.stepIndex+=i;e.clampStepIndex();e.handleStepClick(t)};this.buttonLeftDisabled=false;this.buttonRightDisabled=false;this.theme="";this.disabled=false;this.stepIndex=1;this.stepSize=50;this.total=1e3;this.ariaLabelsDefaults={en:{next_increment:"Next range increment",previous_increment:"Previous range increment",x_of_y:"{0}–{1} of {2}"},fi:{next_increment:"Seuraava välillä",previous_increment:"Edellinen välillä",x_of_y:"{0}–{1} / {2}"},sv:{next_increment:"Nästa intervall",previous_increment:"Föregående intervall",x_of_y:"{0}–{1} av {2}"}};this.ariaLabels=getLocaleString(this.ariaLabelsDefaults);this.ariaControls=""}t.prototype.watchStepIndexStateHandler=function(t){if(this.leftBnRef&&this.rightBnRef){if(t<=1){if(this.element===document.activeElement){this.rightBnRef.setFocus()}this.buttonLeftDisabled=true}else{this.buttonLeftDisabled=false}if(t>=this.total/this.stepSize){if(this.element===document.activeElement){this.leftBnRef.setFocus()}this.buttonRightDisabled=true}else{this.buttonRightDisabled=false}}};t.prototype.watchStepSizeStateHandler=function(t,e){if(t!==e){if(this.stepIndex*t>this.total){this.stepIndex=Math.ceil(this.total/t)}this.watchStepIndexStateHandler(this.stepIndex)}};t.prototype.handleStepClick=function(t){this.duetRangeStepUpdate.emit({originalEvent:t,component:"duet-range-stepper",from:this.getFrom(),to:this.getTo(),index:this.stepIndex})};t.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.clampStepIndex()};t.prototype.componentDidLoad=function(){this.watchStepIndexStateHandler(this.stepIndex)};t.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"ariaLabels",defaults:"ariaLabelsDefaults"})};t.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};t.prototype.clampStepIndex=function(){if(this.stepIndex<1){this.stepIndex=1}else if(this.stepIndex*this.stepSize>this.total){this.stepIndex=Math.ceil(this.total/this.stepSize)}};t.prototype.getFrom=function(){return Math.floor((this.stepIndex-1)*this.stepSize)+1};t.prototype.getTo=function(){return Math.min(Math.floor(this.stepIndex*this.stepSize),this.total)};t.prototype.generateStepSize=function(){return this.ariaLabels.x_of_y.replace("{0}",String(this.getFrom())).replace("{1}",String(this.getTo())).replace("{2}",String(this.total))};t.prototype.generatePreviousIncrementLabel=function(){if(this.getFrom()===1){return""}return this.ariaLabels.x_of_y.replace("{0}",String(Math.max(this.getFrom()-this.stepSize,1))).replace("{1}",String(Math.min(this.getFrom()-1,this.total))).replace("{2}",String(this.total))};t.prototype.generateNextIncrementLabel=function(){if(this.getTo()===this.total){return""}return this.ariaLabels.x_of_y.replace("{0}",String(this.getTo()+1)).replace("{1}",String(Math.min(this.getTo()+this.stepSize,this.total))).replace("{2}",String(this.total))};t.prototype.onKeyboardDown=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){if(this.disabled){return[2]}e=this.stepIndex;i=1;if(isArrowLeftKey(t)||isArrowUpKey(t)||isMinusKey(t)){e--;i=-1;this.leftBnRef.setFocus()}if(isArrowRightKey(t)||isArrowDownKey(t)||isPlusKey(t)){e++;i=1}if(isArrowKey(t)){if(e>0&&e*this.stepSize<=this.total){this.handleClick(t,i)}}return[2]}))}))};t.prototype.render=function(){var t=this;return h("div",{key:"6c1302b439b78e5cbd65d5f31f653e1e2b2e5035",class:{"duet-range-stepper":true,"duet-theme-turva":this.theme==="turva"},onKeyDown:function(e){return t.onKeyboardDown(e)},"aria-controls":this.ariaControls},h("span",{key:"83962d5374b8fca08337992a067ca0cebe9477d4",class:"duet-range-step-counter",part:"range-numbers"},this.generateStepSize()),h("duet-action-button",{key:"61cb1deef359115cdd2468894b3f492441590ff5",disabled:this.disabled||this.buttonLeftDisabled,class:"duet-range-step-button duet-range-step-minus",onClick:function(e){return t.handleClick(e,-1)},id:this.leftBn,"accessible-label":"".concat(this.ariaLabels.previous_increment," ").concat(this.generatePreviousIncrementLabel()),ref:function(e){return t.leftBnRef=e},part:"navigation-arrow",iconName:"action-arrow-left-small",title:""}),h("duet-action-button",{key:"b647214520907749a3a87e3921f9780e545aa66e",disabled:this.disabled||this.buttonRightDisabled,class:"duet-range-step-button duet-range-step-plus",onClick:function(e){return t.handleClick(e,1)},"accessible-label":"".concat(this.ariaLabels.next_increment," ").concat(this.generateNextIncrementLabel()),id:this.rightBn,ref:function(e){return t.rightBnRef=e},part:"navigation-arrow",iconName:"action-arrow-right-small",title:""}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stepIndex:["watchStepIndexStateHandler"],stepSize:["watchStepSizeStateHandler"]}},enumerable:false,configurable:true});return t}();DuetRangeStepper.style=DuetRangeStepperStyle0;export{DuetPagination as duet_pagination,DuetRangeStepper as duet_range_stepper};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,o,n,i){function a(e){return e instanceof n?e:new n((function(o){o(e)}))}return new(n||(n=Promise))((function(n,t){function r(e){try{C(i.next(e))}catch(e){t(e)}}function s(e){try{C(i["throw"](e))}catch(e){t(e)}}function C(e){e.done?n(e.value):a(e.value).then(r,s)}C((i=i.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var n={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},i,a,t,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(o){return C([e,o])}}function C(s){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,s[0]&&(n=0)),n)try{if(i=1,a&&(t=s[0]&2?a["return"]:s[0]?a["throw"]||((t=a["return"])&&t.call(a),0):a.next)&&!(t=t.call(a,s[1])).done)return t;if(a=0,t)s=[s[0]&2,t.value];switch(s[0]){case 0:case 1:t=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;a=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(t=n.trys,t=t.length>0&&t[t.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!t||s[1]>t[0]&&s[1]<t[3])){n.label=s[1];break}if(s[0]===6&&n.label<t[1]){n.label=t[1];t=s;break}if(t&&n.label<t[2]){n.label=t[2];n.ops.push(s);break}if(t[2])n.ops.pop();n.trys.pop();continue}s=o.call(e,n)}catch(e){s=[6,e];a=0}finally{i=t=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,n){if(n||arguments.length===2)for(var i=0,a=o.length,t;i<a;i++){if(t||!(i in o)){if(!t)t=Array.prototype.slice.call(o,0,i);t[i]=o[i]}}return e.concat(t||Array.prototype.slice.call(o))};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-2ab7ff5a.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{c as createID}from"./create-id-149a1b6d.js";import{s as subscribeTabbingChange,u as unsubscribeTabbingChange}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-579bbfe7.js";import{c as checkNamedSlotElement}from"./slot-utils-2fa37472.js";import"./string-utils-192eb3c8.js";var countries={AF:{isoCode:"AF",en:"Afghanistan",fi:"Afganistan",sv:"Afghanistan",telephoneCountryCode:"93"},AL:{isoCode:"AL",en:"Albania",fi:"Albania",sv:"Albanien",telephoneCountryCode:"355"},DZ:{isoCode:"DZ",en:"Algeria",fi:"Algeria",sv:"Algeriet",telephoneCountryCode:"213"},AS:{isoCode:"AS",en:"American Samoa",fi:"Amerikan Samoa",sv:"Amerikanska Samoa",telephoneCountryCode:"1"},AD:{isoCode:"AD",en:"Andorra",fi:"Andorra",sv:"Andorra",telephoneCountryCode:"376"},AO:{isoCode:"AO",en:"Angola",fi:"Angola",sv:"Angola",telephoneCountryCode:"244"},AI:{isoCode:"AI",en:"Anguilla",fi:"Anguilla",sv:"Anguilla",telephoneCountryCode:"1"},AQ:{isoCode:"AQ",en:"Antarctica",fi:"Antarktis",sv:"Antarktis"},AG:{isoCode:"AG",en:"Antigua and Barbuda",fi:"Antigua ja Barbuda",sv:"Antigua och Barbuda",telephoneCountryCode:"1"},AR:{isoCode:"AR",en:"Argentina",fi:"Argentiina",sv:"Argentina",telephoneCountryCode:"54"},AM:{isoCode:"AM",en:"Armenia",fi:"Armenia",sv:"Armenien",telephoneCountryCode:"374"},AW:{isoCode:"AW",en:"Aruba",fi:"Aruba",sv:"Aruba",telephoneCountryCode:"297"},AU:{isoCode:"AU",en:"Australia",fi:"Australia",sv:"Australien",telephoneCountryCode:"61"},AT:{isoCode:"AT",en:"Austria",fi:"Itävalta",sv:"Österrike",telephoneCountryCode:"43"},AZ:{isoCode:"AZ",en:"Azerbaijan",fi:"Azerbaidžan",sv:"Azerbajdzjan",telephoneCountryCode:"994"},BS:{isoCode:"BS",en:"Bahamas",fi:"Bahama",sv:"Bahamas",telephoneCountryCode:"1"},BH:{isoCode:"BH",en:"Bahrain",fi:"Bahrain",sv:"Bahrain",telephoneCountryCode:"973"},BD:{isoCode:"BD",en:"Bangladesh",fi:"Bangladesh",sv:"Bangladesh",telephoneCountryCode:"880"},BB:{isoCode:"BB",en:"Barbados",fi:"Barbados",sv:"Barbados",telephoneCountryCode:"1"},BY:{isoCode:"BY",en:"Belarus",fi:"Valko-Venäjä",sv:"Belarus",telephoneCountryCode:"375"},BE:{isoCode:"BE",en:"Belgium",fi:"Belgia",sv:"Belgien",telephoneCountryCode:"32"},BZ:{isoCode:"BZ",en:"Belize",fi:"Belize",sv:"Belize",telephoneCountryCode:"501"},BJ:{isoCode:"BJ",en:"Benin",fi:"Benin",sv:"Benin",telephoneCountryCode:"229"},BM:{isoCode:"BM",en:"Bermuda",fi:"Bermuda",sv:"Bermuda",telephoneCountryCode:"1"},BT:{isoCode:"BT",en:"Bhutan",fi:"Bhutan",sv:"Bhutan",telephoneCountryCode:"975"},BO:{isoCode:"BO",en:"Bolivia",fi:"Bolivia",sv:"Bolivia",telephoneCountryCode:"591"},BA:{isoCode:"BA",en:"Bosnia and Herzegovina",fi:"Bosnia ja Hertsegovina",sv:"Bosnien och Hercegovina",telephoneCountryCode:"387"},BW:{isoCode:"BW",en:"Botswana",fi:"Botswana",sv:"Botswana",telephoneCountryCode:"267"},BV:{isoCode:"BV",en:"Bouvet Island",fi:"Bouvet’nsaari",sv:"Bouvetön"},BR:{isoCode:"BR",en:"Brazil",fi:"Brasilia",sv:"Brasilien",telephoneCountryCode:"55"},IO:{isoCode:"IO",en:"British Indian Ocean Territory",fi:"Brittiläinen Intian valtameren alue",sv:"Brittiska territoriet i Indiska Oceanen",telephoneCountryCode:"246"},BN:{isoCode:"BN",en:"Brunei Darussalam",fi:"Brunei",sv:"Brunei",telephoneCountryCode:"673"},BG:{isoCode:"BG",en:"Bulgaria",fi:"Bulgaria",sv:"Bulgarien",telephoneCountryCode:"359"},BF:{isoCode:"BF",en:"Burkina Faso",fi:"Burkina Faso",sv:"Burkina Faso",telephoneCountryCode:"226"},BI:{isoCode:"BI",en:"Burundi",fi:"Burundi",sv:"Burundi",telephoneCountryCode:"257"},KH:{isoCode:"KH",en:"Cambodia",fi:"Kambodža",sv:"Kambodja",telephoneCountryCode:"855"},CM:{isoCode:"CM",en:"Cameroon",fi:"Kamerun",sv:"Kamerun",telephoneCountryCode:"237"},CA:{isoCode:"CA",en:"Canada",fi:"Kanada",sv:"Kanada",telephoneCountryCode:"1"},CV:{isoCode:"CV",en:"Cape Verde",fi:"Kap Verde",sv:"Kap Verde",telephoneCountryCode:"238"},KY:{isoCode:"KY",en:"Cayman Islands",fi:"Caymansaaret",sv:"Caymanöarna",telephoneCountryCode:"1"},CF:{isoCode:"CF",en:"Central African Republic",fi:"Keski-Afrikan tasavalta",sv:"Centralafrikanska republiken",telephoneCountryCode:"236"},TD:{isoCode:"TD",en:"Chad",fi:"Tšad",sv:"Tchad",telephoneCountryCode:"235"},CL:{isoCode:"CL",en:"Chile",fi:"Chile",sv:"Chile",telephoneCountryCode:"56"},CN:{isoCode:"CN",en:"People's Republic of China",fi:"Kiina",sv:"Kina",telephoneCountryCode:"86"},CX:{isoCode:"CX",en:"Christmas Island",fi:"Joulusaari",sv:"Julön",telephoneCountryCode:"61"},CC:{isoCode:"CC",en:"Cocos (Keeling) Islands",fi:"Kookossaaret",sv:"Kokosöarna",telephoneCountryCode:"61"},CO:{isoCode:"CO",en:"Colombia",fi:"Kolumbia",sv:"Colombia",telephoneCountryCode:"57"},KM:{isoCode:"KM",en:"Comoros",fi:"Komorit",sv:"Komorerna",telephoneCountryCode:"269"},CG:{isoCode:"CG",en:"Republic of the Congo",fi:"Kongon tasavalta",sv:"Kongo-Brazzaville",telephoneCountryCode:"242"},CD:{isoCode:"CD",en:"Democratic Republic of the Congo",fi:"Kongon demokraattinen tasavalta",sv:"Demokratiska republiken Kongo",telephoneCountryCode:"243"},CK:{isoCode:"CK",en:"Cook Islands",fi:"Cookinsaaret",sv:"Cooköarna",telephoneCountryCode:"682"},CR:{isoCode:"CR",en:"Costa Rica",fi:"Costa Rica",sv:"Costa Rica",telephoneCountryCode:"506"},CI:{isoCode:"CI",en:"Cote D'Ivoire",fi:"Norsunluurannikko",sv:"Elfenbenskusten",telephoneCountryCode:"225"},HR:{isoCode:"HR",en:"Croatia",fi:"Kroatia",sv:"Kroatien",telephoneCountryCode:"385"},CU:{isoCode:"CU",en:"Cuba",fi:"Kuuba",sv:"Kuba",telephoneCountryCode:"53"},CY:{isoCode:"CY",en:"Cyprus",fi:"Kypros",sv:"Cypern",telephoneCountryCode:"357"},CZ:{isoCode:"CZ",en:"Czech Republic",fi:"Tšekki",sv:"Tjeckien",telephoneCountryCode:"420"},DK:{isoCode:"DK",en:"Denmark",fi:"Tanska",sv:"Danmark",telephoneCountryCode:"45"},DJ:{isoCode:"DJ",en:"Djibouti",fi:"Djibouti",sv:"Djibouti",telephoneCountryCode:"253"},DM:{isoCode:"DM",en:"Dominica",fi:"Dominica",sv:"Dominica",telephoneCountryCode:"1"},DO:{isoCode:"DO",en:"Dominican Republic",fi:"Dominikaaninen tasavalta",sv:"Dominikanska republiken",telephoneCountryCode:"1"},EC:{isoCode:"EC",en:"Ecuador",fi:"Ecuador",sv:"Ecuador",telephoneCountryCode:"593"},EG:{isoCode:"EG",en:"Egypt",fi:"Egypti",sv:"Egypten",telephoneCountryCode:"20"},SV:{isoCode:"SV",en:"El Salvador",fi:"El Salvador",sv:"El Salvador",telephoneCountryCode:"503"},GQ:{isoCode:"GQ",en:"Equatorial Guinea",fi:"Päiväntasaajan Guinea",sv:"Ekvatorialguinea",telephoneCountryCode:"240"},ER:{isoCode:"ER",en:"Eritrea",fi:"Eritrea",sv:"Eritrea",telephoneCountryCode:"291"},EE:{isoCode:"EE",en:"Estonia",fi:"Viro",sv:"Estland",telephoneCountryCode:"372"},ET:{isoCode:"ET",en:"Ethiopia",fi:"Etiopia",sv:"Etiopien",telephoneCountryCode:"251"},FK:{isoCode:"FK",en:"Falkland Islands (Malvinas)",fi:"Falklandinsaaret",sv:"Falklandsöarna",telephoneCountryCode:"500"},FO:{isoCode:"FO",en:"Faroe Islands",fi:"Färsaaret",sv:"Färöarna",telephoneCountryCode:"298"},FJ:{isoCode:"FJ",en:"Fiji",fi:"Fidži",sv:"Fiji",telephoneCountryCode:"679"},FI:{isoCode:"FI",en:"Finland",fi:"Suomi",sv:"Finland",telephoneCountryCode:"358"},FR:{isoCode:"FR",en:"France",fi:"Ranska",sv:"Frankrike",telephoneCountryCode:"33"},GF:{isoCode:"GF",en:"French Guiana",fi:"Ranskan Guayana",sv:"Franska Guyana",telephoneCountryCode:"594"},PF:{isoCode:"PF",en:"French Polynesia",fi:"Ranskan Polynesia",sv:"Franska Polynesien",telephoneCountryCode:"689"},TF:{isoCode:"TF",en:"French Southern Territories",fi:"Ranskan eteläiset alueet",sv:"Franska södra territorierna"},GA:{isoCode:"GA",en:"Gabon",fi:"Gabon",sv:"Gabon",telephoneCountryCode:"241"},GM:{isoCode:"GM",en:"Republic of The Gambia",fi:"Gambia",sv:"Gambia",telephoneCountryCode:"220"},GE:{isoCode:"GE",en:"Georgia",fi:"Georgia",sv:"Georgien",telephoneCountryCode:"995"},DE:{isoCode:"DE",en:"Germany",fi:"Saksa",sv:"Tyskland",telephoneCountryCode:"49"},GH:{isoCode:"GH",en:"Ghana",fi:"Ghana",sv:"Ghana",telephoneCountryCode:"233"},GI:{isoCode:"GI",en:"Gibraltar",fi:"Gibraltar",sv:"Gibraltar",telephoneCountryCode:"350"},GR:{isoCode:"GR",en:"Greece",fi:"Kreikka",sv:"Grekland",telephoneCountryCode:"30"},GL:{isoCode:"GL",en:"Greenland",fi:"Grönlanti",sv:"Grönland",telephoneCountryCode:"299"},GD:{isoCode:"GD",en:"Grenada",fi:"Grenada",sv:"Grenada",telephoneCountryCode:"1"},GP:{isoCode:"GP",en:"Guadeloupe",fi:"Guadeloupe",sv:"Guadeloupe",telephoneCountryCode:"590"},GU:{isoCode:"GU",en:"Guam",fi:"Guam",sv:"Guam",telephoneCountryCode:"1"},GT:{isoCode:"GT",en:"Guatemala",fi:"Guatemala",sv:"Guatemala",telephoneCountryCode:"502"},GN:{isoCode:"GN",en:"Guinea",fi:"Guinea",sv:"Guinea",telephoneCountryCode:"224"},GW:{isoCode:"GW",en:"Guinea-Bissau",fi:"Guinea-Bissau",sv:"Guinea Bissau",telephoneCountryCode:"245"},GY:{isoCode:"GY",en:"Guyana",fi:"Guyana",sv:"Guyana",telephoneCountryCode:"592"},HT:{isoCode:"HT",en:"Haiti",fi:"Haiti",sv:"Haiti",telephoneCountryCode:"509"},HM:{isoCode:"HM",en:"Heard Island and McDonald Islands",fi:"Heard ja McDonaldinsaaret",sv:"Heard- och McDonaldsöarna"},VA:{isoCode:"VA",en:"Holy See (Vatican City State)",fi:"Vatikaanivaltio",sv:"Vatikanstaten",telephoneCountryCode:"39"},HN:{isoCode:"HN",en:"Honduras",fi:"Honduras",sv:"Honduras",telephoneCountryCode:"504"},HK:{isoCode:"HK",en:"Hong Kong",fi:"Hongkong",sv:"Hongkong",telephoneCountryCode:"852"},HU:{isoCode:"HU",en:"Hungary",fi:"Unkari",sv:"Ungern",telephoneCountryCode:"36"},IS:{isoCode:"IS",en:"Iceland",fi:"Islanti",sv:"Island",telephoneCountryCode:"354"},IN:{isoCode:"IN",en:"India",fi:"Intia",sv:"Indien",telephoneCountryCode:"91"},ID:{isoCode:"ID",en:"Indonesia",fi:"Indonesia",sv:"Indonesien",telephoneCountryCode:"62"},IR:{isoCode:"IR",en:"Islamic Republic of Iran",fi:"Iran",sv:"Iran",telephoneCountryCode:"98"},IQ:{isoCode:"IQ",en:"Iraq",fi:"Irak",sv:"Irak",telephoneCountryCode:"964"},IE:{isoCode:"IE",en:"Ireland",fi:"Irlanti",sv:"Irland",telephoneCountryCode:"353"},IL:{isoCode:"IL",en:"Israel",fi:"Israel",sv:"Israel",telephoneCountryCode:"972"},IT:{isoCode:"IT",en:"Italy",fi:"Italia",sv:"Italien",telephoneCountryCode:"39"},JM:{isoCode:"JM",en:"Jamaica",fi:"Jamaika",sv:"Jamaica",telephoneCountryCode:"1"},JP:{isoCode:"JP",en:"Japan",fi:"Japani",sv:"Japan",telephoneCountryCode:"81"},JO:{isoCode:"JO",en:"Jordan",fi:"Jordania",sv:"Jordanien",telephoneCountryCode:"962"},KZ:{isoCode:"KZ",en:"Kazakhstan",fi:"Kazakstan",sv:"Kazakstan",telephoneCountryCode:"7"},KE:{isoCode:"KE",en:"Kenya",fi:"Kenia",sv:"Kenya",telephoneCountryCode:"254"},KI:{isoCode:"KI",en:"Kiribati",fi:"Kiribati",sv:"Kiribati",telephoneCountryCode:"686"},KP:{isoCode:"KP",en:"North Korea",fi:"Korean demokraattinen kansantasavalta",sv:"Nordkorea",telephoneCountryCode:"850"},KR:{isoCode:"KR",en:"South Korea",fi:"Korean tasavalta",sv:"Sydkorea",telephoneCountryCode:"82"},KW:{isoCode:"KW",en:"Kuwait",fi:"Kuwait",sv:"Kuwait",telephoneCountryCode:"965"},KG:{isoCode:"KG",en:"Kyrgyzstan",fi:"Kirgisia",sv:"Kirgizistan",telephoneCountryCode:"996"},LA:{isoCode:"LA",en:"Lao People's Democratic Republic",fi:"Laos",sv:"Laos",telephoneCountryCode:"856"},LV:{isoCode:"LV",en:"Latvia",fi:"Latvia",sv:"Lettland",telephoneCountryCode:"371"},LB:{isoCode:"LB",en:"Lebanon",fi:"Libanon",sv:"Libanon",telephoneCountryCode:"961"},LS:{isoCode:"LS",en:"Lesotho",fi:"Lesotho",sv:"Lesotho",telephoneCountryCode:"266"},LR:{isoCode:"LR",en:"Liberia",fi:"Liberia",sv:"Liberia",telephoneCountryCode:"231"},LY:{isoCode:"LY",en:"Libya",fi:"Libya",sv:"Libyen",telephoneCountryCode:"218"},LI:{isoCode:"LI",en:"Liechtenstein",fi:"Liechtenstein",sv:"Liechtenstein",telephoneCountryCode:"423"},LT:{isoCode:"LT",en:"Lithuania",fi:"Liettua",sv:"Litauen",telephoneCountryCode:"370"},LU:{isoCode:"LU",en:"Luxembourg",fi:"Luxemburg",sv:"Luxemburg",telephoneCountryCode:"352"},MO:{isoCode:"MO",en:"Macao",fi:"Macao",sv:"Macau",telephoneCountryCode:"853"},MG:{isoCode:"MG",en:"Madagascar",fi:"Madagaskar",sv:"Madagaskar",telephoneCountryCode:"261"},MW:{isoCode:"MW",en:"Malawi",fi:"Malawi",sv:"Malawi",telephoneCountryCode:"265"},MY:{isoCode:"MY",en:"Malaysia",fi:"Malesia",sv:"Malaysia",telephoneCountryCode:"60"},MV:{isoCode:"MV",en:"Maldives",fi:"Malediivit",sv:"Maldiverna",telephoneCountryCode:"960"},ML:{isoCode:"ML",en:"Mali",fi:"Mali",sv:"Mali",telephoneCountryCode:"223"},MT:{isoCode:"MT",en:"Malta",fi:"Malta",sv:"Malta",telephoneCountryCode:"356"},MH:{isoCode:"MH",en:"Marshall Islands",fi:"Marshallinsaaret",sv:"Marshallöarna",telephoneCountryCode:"692"},MQ:{isoCode:"MQ",en:"Martinique",fi:"Martinique",sv:"Martinique",telephoneCountryCode:"596"},MR:{isoCode:"MR",en:"Mauritania",fi:"Mauritania",sv:"Mauretanien",telephoneCountryCode:"222"},MU:{isoCode:"MU",en:"Mauritius",fi:"Mauritius",sv:"Mauritius",telephoneCountryCode:"230"},YT:{isoCode:"YT",en:"Mayotte",fi:"Mayotte",sv:"Mayotte",telephoneCountryCode:"262"},MX:{isoCode:"MX",en:"Mexico",fi:"Meksiko",sv:"Mexiko",telephoneCountryCode:"52"},FM:{isoCode:"FM",en:"Micronesia, Federated States of",fi:"Mikronesian liittovaltio",sv:"Mikronesiska federationen",telephoneCountryCode:"691"},MD:{isoCode:"MD",en:"Moldova, Republic of",fi:"Moldova",sv:"Moldavien",telephoneCountryCode:"373"},MC:{isoCode:"MC",en:"Monaco",fi:"Monaco",sv:"Monaco",telephoneCountryCode:"377"},MN:{isoCode:"MN",en:"Mongolia",fi:"Mongolia",sv:"Mongoliet",telephoneCountryCode:"976"},MS:{isoCode:"MS",en:"Montserrat",fi:"Montserrat",sv:"Montserrat",telephoneCountryCode:"1"},MA:{isoCode:"MA",en:"Morocco",fi:"Marokko",sv:"Marocko",telephoneCountryCode:"212"},MZ:{isoCode:"MZ",en:"Mozambique",fi:"Mosambik",sv:"Moçambique",telephoneCountryCode:"258"},MM:{isoCode:"MM",en:"Myanmar",fi:"Myanmar",sv:"Burma",telephoneCountryCode:"95"},NA:{isoCode:"NA",en:"Namibia",fi:"Namibia",sv:"Namibia",telephoneCountryCode:"264"},NR:{isoCode:"NR",en:"Nauru",fi:"Nauru",sv:"Nauru",telephoneCountryCode:"674"},NP:{isoCode:"NP",en:"Nepal",fi:"Nepal",sv:"Nepal",telephoneCountryCode:"977"},NL:{isoCode:"NL",en:"Netherlands",fi:"Alankomaat",sv:"Nederländerna",telephoneCountryCode:"31"},NC:{isoCode:"NC",en:"New Caledonia",fi:"Uusi-Kaledonia",sv:"Nya Kaledonien",telephoneCountryCode:"687"},NZ:{isoCode:"NZ",en:"New Zealand",fi:"Uusi-Seelanti",sv:"Nya Zeeland",telephoneCountryCode:"64"},NI:{isoCode:"NI",en:"Nicaragua",fi:"Nicaragua",sv:"Nicaragua",telephoneCountryCode:"505"},NE:{isoCode:"NE",en:"Niger",fi:"Niger",sv:"Niger",telephoneCountryCode:"227"},NG:{isoCode:"NG",en:"Nigeria",fi:"Nigeria",sv:"Nigeria",telephoneCountryCode:"234"},NU:{isoCode:"NU",en:"Niue",fi:"Niue",sv:"Niue",telephoneCountryCode:"683"},NF:{isoCode:"NF",en:"Norfolk Island",fi:"Norfolkinsaari",sv:"Norfolkön",telephoneCountryCode:"672"},MK:{isoCode:"MK",en:"The Republic of North Macedonia",fi:"Pohjois-Makedonia",sv:"Nordmakedonien",telephoneCountryCode:"389"},MP:{isoCode:"MP",en:"Northern Mariana Islands",fi:"Pohjois-Mariaanit",sv:"Nordmarianerna",telephoneCountryCode:"1"},NO:{isoCode:"NO",en:"Norway",fi:"Norja",sv:"Norge",telephoneCountryCode:"47"},OM:{isoCode:"OM",en:"Oman",fi:"Oman",sv:"Oman",telephoneCountryCode:"968"},PK:{isoCode:"PK",en:"Pakistan",fi:"Pakistan",sv:"Pakistan",telephoneCountryCode:"92"},PW:{isoCode:"PW",en:"Palau",fi:"Palau",sv:"Palau",telephoneCountryCode:"680"},PS:{isoCode:"PS",en:"State of Palestine",fi:"Palestiina",sv:"Palestinska territoriet, ockuperade",telephoneCountryCode:"970"},PA:{isoCode:"PA",en:"Panama",fi:"Panama",sv:"Panama",telephoneCountryCode:"507"},PG:{isoCode:"PG",en:"Papua New Guinea",fi:"Papua-Uusi-Guinea",sv:"Papua Nya Guinea",telephoneCountryCode:"675"},PY:{isoCode:"PY",en:"Paraguay",fi:"Paraguay",sv:"Paraguay",telephoneCountryCode:"595"},PE:{isoCode:"PE",en:"Peru",fi:"Peru",sv:"Peru",telephoneCountryCode:"51"},PH:{isoCode:"PH",en:"Philippines",fi:"Filippiinit",sv:"Filippinerna",telephoneCountryCode:"63"},PN:{isoCode:"PN",en:"Pitcairn",fi:"Pitcairn",sv:"Pitcairnöarna"},PL:{isoCode:"PL",en:"Poland",fi:"Puola",sv:"Polen",telephoneCountryCode:"48"},PT:{isoCode:"PT",en:"Portugal",fi:"Portugali",sv:"Portugal",telephoneCountryCode:"351"},PR:{isoCode:"PR",en:"Puerto Rico",fi:"Puerto Rico",sv:"Puerto Rico",telephoneCountryCode:"1"},QA:{isoCode:"QA",en:"Qatar",fi:"Qatar",sv:"Qatar",telephoneCountryCode:"974"},RE:{isoCode:"RE",en:"Reunion",fi:"Réunion",sv:"Réunion",telephoneCountryCode:"262"},RO:{isoCode:"RO",en:"Romania",fi:"Romania",sv:"Rumänien",telephoneCountryCode:"40"},RU:{isoCode:"RU",en:"Russian Federation",fi:"Venäjä",sv:"Ryssland",telephoneCountryCode:"7"},RW:{isoCode:"RW",en:"Rwanda",fi:"Ruanda",sv:"Rwanda",telephoneCountryCode:"250"},SH:{isoCode:"SH",en:"Saint Helena",fi:"Saint Helena",sv:"Sankta Helena",telephoneCountryCode:"290"},KN:{isoCode:"KN",en:"Saint Kitts and Nevis",fi:"Saint Kitts ja Nevis",sv:"Saint Kitts och Nevis",telephoneCountryCode:"1"},LC:{isoCode:"LC",en:"Saint Lucia",fi:"Saint Lucia",sv:"Saint Lucia",telephoneCountryCode:"1"},PM:{isoCode:"PM",en:"Saint Pierre and Miquelon",fi:"Saint-Pierre ja Miquelon",sv:"Saint-Pierre och Miquelon",telephoneCountryCode:"508"},VC:{isoCode:"VC",en:"Saint Vincent and the Grenadines",fi:"Saint Vincent ja Grenadiinit",sv:"Saint Vincent och Grenadinerna",telephoneCountryCode:"1"},WS:{isoCode:"WS",en:"Samoa",fi:"Samoa",sv:"Samoa",telephoneCountryCode:"685"},SM:{isoCode:"SM",en:"San Marino",fi:"San Marino",sv:"San Marino",telephoneCountryCode:"378"},ST:{isoCode:"ST",en:"Sao Tome and Principe",fi:"São Tomé ja Príncipe",sv:"São Tomé och Príncipe",telephoneCountryCode:"239"},SA:{isoCode:"SA",en:"Saudi Arabia",fi:"Saudi-Arabia",sv:"Saudiarabien",telephoneCountryCode:"966"},SN:{isoCode:"SN",en:"Senegal",fi:"Senegal",sv:"Senegal",telephoneCountryCode:"221"},SC:{isoCode:"SC",en:"Seychelles",fi:"Seychellit",sv:"Seychellerna",telephoneCountryCode:"248"},SL:{isoCode:"SL",en:"Sierra Leone",fi:"Sierra Leone",sv:"Sierra Leone",telephoneCountryCode:"232"},SG:{isoCode:"SG",en:"Singapore",fi:"Singapore",sv:"Singapore",telephoneCountryCode:"65"},SK:{isoCode:"SK",en:"Slovakia",fi:"Slovakia",sv:"Slovakien",telephoneCountryCode:"421"},SI:{isoCode:"SI",en:"Slovenia",fi:"Slovenia",sv:"Slovenien",telephoneCountryCode:"386"},SB:{isoCode:"SB",en:"Solomon Islands",fi:"Salomonsaaret",sv:"Salomonöarna",telephoneCountryCode:"677"},SO:{isoCode:"SO",en:"Somalia",fi:"Somalia",sv:"Somalia",telephoneCountryCode:"252"},ZA:{isoCode:"ZA",en:"South Africa",fi:"Etelä-Afrikka",sv:"Sydafrika",telephoneCountryCode:"27"},GS:{isoCode:"GS",en:"South Georgia and the South Sandwich Islands",fi:"Etelä-Georgia ja Eteläiset Sandwichsaaret",sv:"Sydgeorgien och Sydsandwichöarna"},ES:{isoCode:"ES",en:"Spain",fi:"Espanja",sv:"Spanien",telephoneCountryCode:"34"},LK:{isoCode:"LK",en:"Sri Lanka",fi:"Sri Lanka",sv:"Sri Lanka",telephoneCountryCode:"94"},SD:{isoCode:"SD",en:"Sudan",fi:"Sudan",sv:"Sudan",telephoneCountryCode:"249"},SR:{isoCode:"SR",en:"Suriname",fi:"Suriname",sv:"Surinam",telephoneCountryCode:"597"},SJ:{isoCode:"SJ",en:"Svalbard and Jan Mayen",fi:"Svalbard ja Jan Mayen",sv:"Svalbard och Jan Mayen",telephoneCountryCode:"47"},SZ:{isoCode:"SZ",en:"Eswatini",fi:"Swazimaa",sv:"Eswatini",telephoneCountryCode:"268"},SE:{isoCode:"SE",en:"Sweden",fi:"Ruotsi",sv:"Sverige",telephoneCountryCode:"46"},CH:{isoCode:"CH",en:"Switzerland",fi:"Sveitsi",sv:"Schweiz",telephoneCountryCode:"41"},SY:{isoCode:"SY",en:"Syrian Arab Republic",fi:"Syyria",sv:"Syrien",telephoneCountryCode:"963"},TW:{isoCode:"TW",en:"Taiwan, Province of China",fi:"Taiwan",sv:"Taiwan",telephoneCountryCode:"886"},TJ:{isoCode:"TJ",en:"Tajikistan",fi:"Tadžikistan",sv:"Tadzjikistan",telephoneCountryCode:"992"},TZ:{isoCode:"TZ",en:"United Republic of Tanzania",fi:"Tansania",sv:"Tanzania",telephoneCountryCode:"255"},TH:{isoCode:"TH",en:"Thailand",fi:"Thaimaa",sv:"Thailand",telephoneCountryCode:"66"},TL:{isoCode:"TL",en:"Timor-Leste",fi:"Itä-Timor",sv:"Östtimor",telephoneCountryCode:"670"},TG:{isoCode:"TG",en:"Togo",fi:"Togo",sv:"Togo",telephoneCountryCode:"228"},TK:{isoCode:"TK",en:"Tokelau",fi:"Tokelau",sv:"Tokelauöarna",telephoneCountryCode:"690"},TO:{isoCode:"TO",en:"Tonga",fi:"Tonga",sv:"Tonga",telephoneCountryCode:"676"},TT:{isoCode:"TT",en:"Trinidad and Tobago",fi:"Trinidad ja Tobago",sv:"Trinidad och Tobago",telephoneCountryCode:"1"},TN:{isoCode:"TN",en:"Tunisia",fi:"Tunisia",sv:"Tunisien",telephoneCountryCode:"216"},TR:{isoCode:"TR",en:"Türkiye",fi:"Turkki",sv:"Turkiet",telephoneCountryCode:"90"},TM:{isoCode:"TM",en:"Turkmenistan",fi:"Turkmenistan",sv:"Turkmenistan",telephoneCountryCode:"993"},TC:{isoCode:"TC",en:"Turks and Caicos Islands",fi:"Turks- ja Caicossaaret",sv:"Turks- och Caicosöarna",telephoneCountryCode:"1"},TV:{isoCode:"TV",en:"Tuvalu",fi:"Tuvalu",sv:"Tuvalu",telephoneCountryCode:"688"},UG:{isoCode:"UG",en:"Uganda",fi:"Uganda",sv:"Uganda",telephoneCountryCode:"256"},UA:{isoCode:"UA",en:"Ukraine",fi:"Ukraina",sv:"Ukraina",telephoneCountryCode:"380"},AE:{isoCode:"AE",en:"United Arab Emirates",fi:"Arabiemiirikunnat",sv:"Förenade Arabemiraten",telephoneCountryCode:"971"},GB:{isoCode:"GB",en:"United Kingdom",fi:"Yhdistynyt kuningaskunta",sv:"Storbritannien",telephoneCountryCode:"44"},US:{isoCode:"US",en:"United States of America",fi:"Yhdysvallat",sv:"USA",telephoneCountryCode:"1"},UM:{isoCode:"UM",en:"United States Minor Outlying Islands",fi:"Yhdysvaltain pienet erillissaaret",sv:"USA:s yttre öar"},UY:{isoCode:"UY",en:"Uruguay",fi:"Uruguay",sv:"Uruguay",telephoneCountryCode:"598"},UZ:{isoCode:"UZ",en:"Uzbekistan",fi:"Uzbekistan",sv:"Uzbekistan",telephoneCountryCode:"998"},VU:{isoCode:"VU",en:"Vanuatu",fi:"Vanuatu",sv:"Vanuatu",telephoneCountryCode:"678"},VE:{isoCode:"VE",en:"Venezuela",fi:"Venezuela",sv:"Venezuela",telephoneCountryCode:"58"},VN:{isoCode:"VN",en:"Vietnam",fi:"Vietnam",sv:"Vietnam",telephoneCountryCode:"84"},VG:{isoCode:"VG",en:"Virgin Islands, British",fi:"Brittiläiset Neitsytsaaret",sv:"Brittiska Jungfruöarna",telephoneCountryCode:"1"},VI:{isoCode:"VI",en:"Virgin Islands, U.S.",fi:"Yhdysvaltain Neitsytsaaret",sv:"Amerikanska Jungfruöarna",telephoneCountryCode:"1"},WF:{isoCode:"WF",en:"Wallis and Futuna",fi:"Wallis ja Futunasaaret",sv:"Wallis- och Futunaöarna",telephoneCountryCode:"681"},EH:{isoCode:"EH",en:"Western Sahara",fi:"Länsi-Sahara",sv:"Västsahara",telephoneCountryCode:"212"},YE:{isoCode:"YE",en:"Yemen",fi:"Jemen",sv:"Jemen",telephoneCountryCode:"967"},ZM:{isoCode:"ZM",en:"Zambia",fi:"Sambia",sv:"Zambia",telephoneCountryCode:"260"},ZW:{isoCode:"ZW",en:"Zimbabwe",fi:"Zimbabwe",sv:"Zimbabwe",telephoneCountryCode:"263"},AX:{isoCode:"AX",en:"Åland Islands",fi:"Ahvenanmaa",sv:"Åland",telephoneCountryCode:"358"},BQ:{isoCode:"BQ",en:"Bonaire, Sint Eustatius and Saba",fi:"Bonaire, Sint Eustatius ja Saba",sv:"Bonaire, Saint Eustatius och Saba",telephoneCountryCode:"599"},CW:{isoCode:"CW",en:"Curaçao",fi:"Curaçao",sv:"Curacao",telephoneCountryCode:"599"},GG:{isoCode:"GG",en:"Guernsey",fi:"Guernsey",sv:"Guernsey",telephoneCountryCode:"44"},IM:{isoCode:"IM",en:"Isle of Man",fi:"Mansaari",sv:"Isle of Man",telephoneCountryCode:"44"},JE:{isoCode:"JE",en:"Jersey",fi:"Jersey",sv:"Jersey",telephoneCountryCode:"44"},ME:{isoCode:"ME",en:"Montenegro",fi:"Montenegro",sv:"Montenegro",telephoneCountryCode:"382"},BL:{isoCode:"BL",en:"Saint Barthélemy",fi:"Saint-Barthélemy",sv:"Saint-Barthélemy",telephoneCountryCode:"590"},MF:{isoCode:"MF",en:"Saint Martin (French part)",fi:"Saint-Martin",sv:"Saint Martin (franska delen)",telephoneCountryCode:"590"},RS:{isoCode:"RS",en:"Serbia",fi:"Serbia",sv:"Serbien",telephoneCountryCode:"381"},SX:{isoCode:"SX",en:"Sint Maarten (Dutch part)",fi:"Sint Maarten",sv:"Sint Maarten (nederländska delen)",telephoneCountryCode:"1"},SS:{isoCode:"SS",en:"South Sudan",fi:"Etelä-Sudan",sv:"Sydsudan",telephoneCountryCode:"211"},XK:{isoCode:"XK",en:"Kosovo",fi:"Kosovo",sv:"Kosovo",telephoneCountryCode:"383"}};var primaryCountriesForSharedCountryCodes={1:"US",7:"RU",39:"IT",44:"GB",47:"NO",61:"AU",212:"MA",262:"RE",358:"FI",590:"GP",599:"CW"};var duetPhoneInputCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}span.flag-container{display:flex;align-items:center;justify-content:center;width:30px;height:30px}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}:host:last-child,:host:last-of-type{margin-right:0 !important}@media (min-width: 36em){:host{width:calc(50% - 16px - 3px)}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}.duet-phone-input-container{position:relative;width:100%;height:100%}";var DuetPhoneInputStyle0=duetPhoneInputCss;var DuetPhoneInput=function(){function e(e){var o=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.duetInput=createEvent(this,"duetInput",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.countriesToList=Object.values(countries).filter((function(e){return!!e.telephoneCountryCode}));this.countryFlagCDNUrl="https://cdn.duetds.com/api/assets/country-flags/";this.inputId=createID("DuetInput");this.buttonAriaLabel={en:"Choose country code",fi:"Valitse maatunnus",sv:"Välj landskod"};this.setListFirstCountries=function(){var e=(typeof o.listFirst==="string"?o.listFirst.split(","):o.listFirst).map((function(e){return e.trim().toUpperCase()}));var n=Object.values(countries).filter((function(o){return e.includes(o.isoCode)}));var i=o.countriesToList.filter((function(o){return!e.includes(o.isoCode)}));i.sort((function(e,n){return e[o.language]>n[o.language]?1:-1}));o.countriesToList=__spreadArray(__spreadArray([],n,true),i,true)};this.handleFocus=function(){};this.handleChange=function(){};this.handleBlur=function(){};this.handleInput=function(){var e,n;var i=(e=o.duetInputElement.value)===null||e===void 0?void 0:e.trim();var a=o.currentCountry!=="error"&&((n=o.currentCountry)===null||n===void 0?void 0:n.telephoneCountryCode)||"";var t=o.findCountryCode(i)||"";if(!i){o.currentCountry=undefined;return}if(a===t){return}if(t){o.currentCountry=o.findCountryForCode(t);return}if(a!=="error"){o.currentCountry="error"}return};this.handleCountryCodeSelectorOpen=function(){o.countryCodePopup.controller=o.countryCodeButton;o.countryCodePopup.show()};this.handleCountryCodeSelectorSelect=function(e){var n=e.target.closest("duet-popup-menu-item");var i=countries[n.value];o.currentCountry=i;o.countryCodePopup.hide();o.setInputCountryCode()};this.language=getLanguage();this.currentCountry=undefined;this.theme="";this.margin="auto";this.expand=false;this.identifier=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleDescribedBy=undefined;this.disabled=false;this.required=false;this.labelDefaults={fi:"Puhelinnumero",en:"Phone number",sv:"Telefonnummer"};this.label=getLocaleString(this.labelDefaults,this.language);this.labelHidden=false;this.caption=undefined;this.name=undefined;this.error="";this.tooltip="";this.listFirst=["FI","SE"]}Object.defineProperty(e.prototype,"countries",{get:function(){return this.countriesToList},set:function(e){var o=e;var n="";var i=function(e){var o=["en","fi","sv","isoCode","telephoneCountryCode"];return o.every((function(o){return Object.keys(e).includes(o)}))&&/^[A-Z]{2}$/.test(e["isoCode"])&&/^[1-9][0-9]{0,2}$/.test(e["telephoneCountryCode"])};if(typeof e==="string"){o=JSON.parse(e)}if(Array.isArray(o)){if(o.every((function(e){return typeof e==="string"}))){this.countriesToList=Object.values(countries).filter((function(e){return o.includes(e.isoCode)&&!!e.telephoneCountryCode}))}else if(o.every((function(e){return i(e)}))){this.countriesToList=o}else{n="Invalid array provided for countries in Phone Input"}}else{n="Country list for Phone Input must be an array"}if(n){console.error(n);this.countriesToList=Object.values(countries).filter((function(e){return!!e.telephoneCountryCode}))}this.setListFirstCountries()},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){var e;return(e=this.duetInputElement.value)===null||e===void 0?void 0:e.replace(/\s/g,"")},set:function(e){this._value=e},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);checkNamedSlotElement(this.element,"tooltip","duet-tooltip",1,true);this.setListFirstCountries()};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"label",defaults:"labelDefaults"});subscribeTabbingChange(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this);unsubscribeTabbingChange(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.duetInputElement.setFocus(e);return[2]}))}))};e.prototype.setInputCountryCode=function(){if(this.currentCountry==="error"){return}var e="+".concat(this.currentCountry.telephoneCountryCode," ");var o=this.duetInputElement.value;if(!(o===null||o===void 0?void 0:o.trim().startsWith("+"))){this.duetInputElement.value="".concat(e).concat((o===null||o===void 0?void 0:o.trimStart())||"");return}var n=this.findCountryCode(o);console.log("Old code",n);if(n){this.duetInputElement.value=o.replace("+".concat(n),e).replace(" "," ");return}this.duetInputElement.value=o.replace("+",e)};e.prototype.findCountryCode=function(e){var o=e.trim();if(!o.startsWith("+")){return undefined}var n=Object.values(countries).find((function(e){return o.startsWith("+".concat(e.telephoneCountryCode))}));return n===null||n===void 0?void 0:n.telephoneCountryCode};e.prototype.findCountryForCode=function(e){var o=primaryCountriesForSharedCountryCodes[e]||"";return o?countries[o]:Object.values(countries).find((function(o){return o.telephoneCountryCode===e}))};e.prototype.renderFlag=function(e,o){if(o===void 0){o=false}var n={height:o?"34px":"24px",width:o?"27px":"24px","margin-right":o?"0":"10px","object-fit":"contain","object-position":"center",filter:"drop-shadow(0 0 1px rgba(0, 0, 0, 0.3)) drop-shadow(0 2px 6px rgba(0, 41, 77, 0.1))"};return h("img",{src:"".concat(this.countryFlagCDNUrl).concat(e,".svg"),"aria-hidden":"true",style:n,loading:"lazy"})};e.prototype.getFlagForButton=function(){if(!this.currentCountry||this.currentCountry==="error"){return h("duet-icon",{name:!this.currentCountry?"form-country":"messaging-alert",margin:"none"})}return this.renderFlag(this.currentCountry.isoCode,true)};e.prototype.render=function(){var e=this;var o=(typeof this.listFirst==="string"?this.listFirst.split(","):this.listFirst).map((function(e){return e.trim().toUpperCase()})).pop();var n=this.identifier||this.inputId;return h(Host,{class:{"duet-theme-turva":this.theme==="turva","duet-expand":this.expand,"duet-m-0":this.margin==="none"}},h("div",{class:"duet-phone-input-container"},h("duet-popup-menu",{ref:function(o){return e.countryCodePopup=o},scrollLimit:10,showFilterInput:true},this.countriesToList.map((function(n){return n.isoCode===o?h(Fragment,null,h("duet-popup-menu-item",{value:n.isoCode,onClick:e.handleCountryCodeSelectorSelect},h("duet-grid",{alignment:"center"},e.renderFlag(n.isoCode),h("span",null,n[e.language]," (+",n.telephoneCountryCode,")"))),h("duet-spacer",{size:"x-small"}),h("duet-divider",{margin:"small"})):h("duet-popup-menu-item",{value:n.isoCode,onClick:e.handleCountryCodeSelectorSelect},h("duet-grid",{alignment:"center"},e.renderFlag(n.isoCode),h("span",null,n[e.language]," (+",n.telephoneCountryCode,")")))}))),h("duet-input",{ref:function(o){return e.duetInputElement=o},onDuetChange:this.handleChange,onDuetFocus:this.handleFocus,onDuetBlur:this.handleBlur,onDuetInput:this.handleInput,label:this.label,caption:this.caption,value:this._value,error:this.error,name:this.name,component:"phone",variation:"button-left",type:"tel",disallowPattern:"[^\\+0-9 ]",required:this.required,disabled:this.disabled,labelHidden:this.labelHidden,tooltip:this.tooltip,identifier:n,theme:this.theme,margin:"none",expand:true},h("duet-button",{ref:function(o){return e.countryCodeButton=o},slot:"button-left",variation:"input-button-left-secondary",margin:"none",fixed:true,icon:"action-arrow-down-small",iconSize:"small",iconRight:true,accessibleLabel:this.buttonAriaLabel[this.language],onClick:this.handleCountryCodeSelectorOpen},h("span",{class:"flag-container"},this.getFlagForButton())),h("slot",{name:"tooltip"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetPhoneInput.style=DuetPhoneInputStyle0;export{DuetPhoneInput as duet_phone_input};
|
|
4
|
+
*/import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-9b64dfa3.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{c as createID}from"./create-id-149a1b6d.js";import{s as subscribeTabbingChange,u as unsubscribeTabbingChange}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-87dc6eb1.js";import{c as checkNamedSlotElement}from"./slot-utils-b8cbdf64.js";import"./string-utils-192eb3c8.js";var countries={AF:{isoCode:"AF",en:"Afghanistan",fi:"Afganistan",sv:"Afghanistan",telephoneCountryCode:"93"},AL:{isoCode:"AL",en:"Albania",fi:"Albania",sv:"Albanien",telephoneCountryCode:"355"},DZ:{isoCode:"DZ",en:"Algeria",fi:"Algeria",sv:"Algeriet",telephoneCountryCode:"213"},AS:{isoCode:"AS",en:"American Samoa",fi:"Amerikan Samoa",sv:"Amerikanska Samoa",telephoneCountryCode:"1"},AD:{isoCode:"AD",en:"Andorra",fi:"Andorra",sv:"Andorra",telephoneCountryCode:"376"},AO:{isoCode:"AO",en:"Angola",fi:"Angola",sv:"Angola",telephoneCountryCode:"244"},AI:{isoCode:"AI",en:"Anguilla",fi:"Anguilla",sv:"Anguilla",telephoneCountryCode:"1"},AQ:{isoCode:"AQ",en:"Antarctica",fi:"Antarktis",sv:"Antarktis"},AG:{isoCode:"AG",en:"Antigua and Barbuda",fi:"Antigua ja Barbuda",sv:"Antigua och Barbuda",telephoneCountryCode:"1"},AR:{isoCode:"AR",en:"Argentina",fi:"Argentiina",sv:"Argentina",telephoneCountryCode:"54"},AM:{isoCode:"AM",en:"Armenia",fi:"Armenia",sv:"Armenien",telephoneCountryCode:"374"},AW:{isoCode:"AW",en:"Aruba",fi:"Aruba",sv:"Aruba",telephoneCountryCode:"297"},AU:{isoCode:"AU",en:"Australia",fi:"Australia",sv:"Australien",telephoneCountryCode:"61"},AT:{isoCode:"AT",en:"Austria",fi:"Itävalta",sv:"Österrike",telephoneCountryCode:"43"},AZ:{isoCode:"AZ",en:"Azerbaijan",fi:"Azerbaidžan",sv:"Azerbajdzjan",telephoneCountryCode:"994"},BS:{isoCode:"BS",en:"Bahamas",fi:"Bahama",sv:"Bahamas",telephoneCountryCode:"1"},BH:{isoCode:"BH",en:"Bahrain",fi:"Bahrain",sv:"Bahrain",telephoneCountryCode:"973"},BD:{isoCode:"BD",en:"Bangladesh",fi:"Bangladesh",sv:"Bangladesh",telephoneCountryCode:"880"},BB:{isoCode:"BB",en:"Barbados",fi:"Barbados",sv:"Barbados",telephoneCountryCode:"1"},BY:{isoCode:"BY",en:"Belarus",fi:"Valko-Venäjä",sv:"Belarus",telephoneCountryCode:"375"},BE:{isoCode:"BE",en:"Belgium",fi:"Belgia",sv:"Belgien",telephoneCountryCode:"32"},BZ:{isoCode:"BZ",en:"Belize",fi:"Belize",sv:"Belize",telephoneCountryCode:"501"},BJ:{isoCode:"BJ",en:"Benin",fi:"Benin",sv:"Benin",telephoneCountryCode:"229"},BM:{isoCode:"BM",en:"Bermuda",fi:"Bermuda",sv:"Bermuda",telephoneCountryCode:"1"},BT:{isoCode:"BT",en:"Bhutan",fi:"Bhutan",sv:"Bhutan",telephoneCountryCode:"975"},BO:{isoCode:"BO",en:"Bolivia",fi:"Bolivia",sv:"Bolivia",telephoneCountryCode:"591"},BA:{isoCode:"BA",en:"Bosnia and Herzegovina",fi:"Bosnia ja Hertsegovina",sv:"Bosnien och Hercegovina",telephoneCountryCode:"387"},BW:{isoCode:"BW",en:"Botswana",fi:"Botswana",sv:"Botswana",telephoneCountryCode:"267"},BV:{isoCode:"BV",en:"Bouvet Island",fi:"Bouvet’nsaari",sv:"Bouvetön"},BR:{isoCode:"BR",en:"Brazil",fi:"Brasilia",sv:"Brasilien",telephoneCountryCode:"55"},IO:{isoCode:"IO",en:"British Indian Ocean Territory",fi:"Brittiläinen Intian valtameren alue",sv:"Brittiska territoriet i Indiska Oceanen",telephoneCountryCode:"246"},BN:{isoCode:"BN",en:"Brunei Darussalam",fi:"Brunei",sv:"Brunei",telephoneCountryCode:"673"},BG:{isoCode:"BG",en:"Bulgaria",fi:"Bulgaria",sv:"Bulgarien",telephoneCountryCode:"359"},BF:{isoCode:"BF",en:"Burkina Faso",fi:"Burkina Faso",sv:"Burkina Faso",telephoneCountryCode:"226"},BI:{isoCode:"BI",en:"Burundi",fi:"Burundi",sv:"Burundi",telephoneCountryCode:"257"},KH:{isoCode:"KH",en:"Cambodia",fi:"Kambodža",sv:"Kambodja",telephoneCountryCode:"855"},CM:{isoCode:"CM",en:"Cameroon",fi:"Kamerun",sv:"Kamerun",telephoneCountryCode:"237"},CA:{isoCode:"CA",en:"Canada",fi:"Kanada",sv:"Kanada",telephoneCountryCode:"1"},CV:{isoCode:"CV",en:"Cape Verde",fi:"Kap Verde",sv:"Kap Verde",telephoneCountryCode:"238"},KY:{isoCode:"KY",en:"Cayman Islands",fi:"Caymansaaret",sv:"Caymanöarna",telephoneCountryCode:"1"},CF:{isoCode:"CF",en:"Central African Republic",fi:"Keski-Afrikan tasavalta",sv:"Centralafrikanska republiken",telephoneCountryCode:"236"},TD:{isoCode:"TD",en:"Chad",fi:"Tšad",sv:"Tchad",telephoneCountryCode:"235"},CL:{isoCode:"CL",en:"Chile",fi:"Chile",sv:"Chile",telephoneCountryCode:"56"},CN:{isoCode:"CN",en:"People's Republic of China",fi:"Kiina",sv:"Kina",telephoneCountryCode:"86"},CX:{isoCode:"CX",en:"Christmas Island",fi:"Joulusaari",sv:"Julön",telephoneCountryCode:"61"},CC:{isoCode:"CC",en:"Cocos (Keeling) Islands",fi:"Kookossaaret",sv:"Kokosöarna",telephoneCountryCode:"61"},CO:{isoCode:"CO",en:"Colombia",fi:"Kolumbia",sv:"Colombia",telephoneCountryCode:"57"},KM:{isoCode:"KM",en:"Comoros",fi:"Komorit",sv:"Komorerna",telephoneCountryCode:"269"},CG:{isoCode:"CG",en:"Republic of the Congo",fi:"Kongon tasavalta",sv:"Kongo-Brazzaville",telephoneCountryCode:"242"},CD:{isoCode:"CD",en:"Democratic Republic of the Congo",fi:"Kongon demokraattinen tasavalta",sv:"Demokratiska republiken Kongo",telephoneCountryCode:"243"},CK:{isoCode:"CK",en:"Cook Islands",fi:"Cookinsaaret",sv:"Cooköarna",telephoneCountryCode:"682"},CR:{isoCode:"CR",en:"Costa Rica",fi:"Costa Rica",sv:"Costa Rica",telephoneCountryCode:"506"},CI:{isoCode:"CI",en:"Cote D'Ivoire",fi:"Norsunluurannikko",sv:"Elfenbenskusten",telephoneCountryCode:"225"},HR:{isoCode:"HR",en:"Croatia",fi:"Kroatia",sv:"Kroatien",telephoneCountryCode:"385"},CU:{isoCode:"CU",en:"Cuba",fi:"Kuuba",sv:"Kuba",telephoneCountryCode:"53"},CY:{isoCode:"CY",en:"Cyprus",fi:"Kypros",sv:"Cypern",telephoneCountryCode:"357"},CZ:{isoCode:"CZ",en:"Czech Republic",fi:"Tšekki",sv:"Tjeckien",telephoneCountryCode:"420"},DK:{isoCode:"DK",en:"Denmark",fi:"Tanska",sv:"Danmark",telephoneCountryCode:"45"},DJ:{isoCode:"DJ",en:"Djibouti",fi:"Djibouti",sv:"Djibouti",telephoneCountryCode:"253"},DM:{isoCode:"DM",en:"Dominica",fi:"Dominica",sv:"Dominica",telephoneCountryCode:"1"},DO:{isoCode:"DO",en:"Dominican Republic",fi:"Dominikaaninen tasavalta",sv:"Dominikanska republiken",telephoneCountryCode:"1"},EC:{isoCode:"EC",en:"Ecuador",fi:"Ecuador",sv:"Ecuador",telephoneCountryCode:"593"},EG:{isoCode:"EG",en:"Egypt",fi:"Egypti",sv:"Egypten",telephoneCountryCode:"20"},SV:{isoCode:"SV",en:"El Salvador",fi:"El Salvador",sv:"El Salvador",telephoneCountryCode:"503"},GQ:{isoCode:"GQ",en:"Equatorial Guinea",fi:"Päiväntasaajan Guinea",sv:"Ekvatorialguinea",telephoneCountryCode:"240"},ER:{isoCode:"ER",en:"Eritrea",fi:"Eritrea",sv:"Eritrea",telephoneCountryCode:"291"},EE:{isoCode:"EE",en:"Estonia",fi:"Viro",sv:"Estland",telephoneCountryCode:"372"},ET:{isoCode:"ET",en:"Ethiopia",fi:"Etiopia",sv:"Etiopien",telephoneCountryCode:"251"},FK:{isoCode:"FK",en:"Falkland Islands (Malvinas)",fi:"Falklandinsaaret",sv:"Falklandsöarna",telephoneCountryCode:"500"},FO:{isoCode:"FO",en:"Faroe Islands",fi:"Färsaaret",sv:"Färöarna",telephoneCountryCode:"298"},FJ:{isoCode:"FJ",en:"Fiji",fi:"Fidži",sv:"Fiji",telephoneCountryCode:"679"},FI:{isoCode:"FI",en:"Finland",fi:"Suomi",sv:"Finland",telephoneCountryCode:"358"},FR:{isoCode:"FR",en:"France",fi:"Ranska",sv:"Frankrike",telephoneCountryCode:"33"},GF:{isoCode:"GF",en:"French Guiana",fi:"Ranskan Guayana",sv:"Franska Guyana",telephoneCountryCode:"594"},PF:{isoCode:"PF",en:"French Polynesia",fi:"Ranskan Polynesia",sv:"Franska Polynesien",telephoneCountryCode:"689"},TF:{isoCode:"TF",en:"French Southern Territories",fi:"Ranskan eteläiset alueet",sv:"Franska södra territorierna"},GA:{isoCode:"GA",en:"Gabon",fi:"Gabon",sv:"Gabon",telephoneCountryCode:"241"},GM:{isoCode:"GM",en:"Republic of The Gambia",fi:"Gambia",sv:"Gambia",telephoneCountryCode:"220"},GE:{isoCode:"GE",en:"Georgia",fi:"Georgia",sv:"Georgien",telephoneCountryCode:"995"},DE:{isoCode:"DE",en:"Germany",fi:"Saksa",sv:"Tyskland",telephoneCountryCode:"49"},GH:{isoCode:"GH",en:"Ghana",fi:"Ghana",sv:"Ghana",telephoneCountryCode:"233"},GI:{isoCode:"GI",en:"Gibraltar",fi:"Gibraltar",sv:"Gibraltar",telephoneCountryCode:"350"},GR:{isoCode:"GR",en:"Greece",fi:"Kreikka",sv:"Grekland",telephoneCountryCode:"30"},GL:{isoCode:"GL",en:"Greenland",fi:"Grönlanti",sv:"Grönland",telephoneCountryCode:"299"},GD:{isoCode:"GD",en:"Grenada",fi:"Grenada",sv:"Grenada",telephoneCountryCode:"1"},GP:{isoCode:"GP",en:"Guadeloupe",fi:"Guadeloupe",sv:"Guadeloupe",telephoneCountryCode:"590"},GU:{isoCode:"GU",en:"Guam",fi:"Guam",sv:"Guam",telephoneCountryCode:"1"},GT:{isoCode:"GT",en:"Guatemala",fi:"Guatemala",sv:"Guatemala",telephoneCountryCode:"502"},GN:{isoCode:"GN",en:"Guinea",fi:"Guinea",sv:"Guinea",telephoneCountryCode:"224"},GW:{isoCode:"GW",en:"Guinea-Bissau",fi:"Guinea-Bissau",sv:"Guinea Bissau",telephoneCountryCode:"245"},GY:{isoCode:"GY",en:"Guyana",fi:"Guyana",sv:"Guyana",telephoneCountryCode:"592"},HT:{isoCode:"HT",en:"Haiti",fi:"Haiti",sv:"Haiti",telephoneCountryCode:"509"},HM:{isoCode:"HM",en:"Heard Island and McDonald Islands",fi:"Heard ja McDonaldinsaaret",sv:"Heard- och McDonaldsöarna"},VA:{isoCode:"VA",en:"Holy See (Vatican City State)",fi:"Vatikaanivaltio",sv:"Vatikanstaten",telephoneCountryCode:"39"},HN:{isoCode:"HN",en:"Honduras",fi:"Honduras",sv:"Honduras",telephoneCountryCode:"504"},HK:{isoCode:"HK",en:"Hong Kong",fi:"Hongkong",sv:"Hongkong",telephoneCountryCode:"852"},HU:{isoCode:"HU",en:"Hungary",fi:"Unkari",sv:"Ungern",telephoneCountryCode:"36"},IS:{isoCode:"IS",en:"Iceland",fi:"Islanti",sv:"Island",telephoneCountryCode:"354"},IN:{isoCode:"IN",en:"India",fi:"Intia",sv:"Indien",telephoneCountryCode:"91"},ID:{isoCode:"ID",en:"Indonesia",fi:"Indonesia",sv:"Indonesien",telephoneCountryCode:"62"},IR:{isoCode:"IR",en:"Islamic Republic of Iran",fi:"Iran",sv:"Iran",telephoneCountryCode:"98"},IQ:{isoCode:"IQ",en:"Iraq",fi:"Irak",sv:"Irak",telephoneCountryCode:"964"},IE:{isoCode:"IE",en:"Ireland",fi:"Irlanti",sv:"Irland",telephoneCountryCode:"353"},IL:{isoCode:"IL",en:"Israel",fi:"Israel",sv:"Israel",telephoneCountryCode:"972"},IT:{isoCode:"IT",en:"Italy",fi:"Italia",sv:"Italien",telephoneCountryCode:"39"},JM:{isoCode:"JM",en:"Jamaica",fi:"Jamaika",sv:"Jamaica",telephoneCountryCode:"1"},JP:{isoCode:"JP",en:"Japan",fi:"Japani",sv:"Japan",telephoneCountryCode:"81"},JO:{isoCode:"JO",en:"Jordan",fi:"Jordania",sv:"Jordanien",telephoneCountryCode:"962"},KZ:{isoCode:"KZ",en:"Kazakhstan",fi:"Kazakstan",sv:"Kazakstan",telephoneCountryCode:"7"},KE:{isoCode:"KE",en:"Kenya",fi:"Kenia",sv:"Kenya",telephoneCountryCode:"254"},KI:{isoCode:"KI",en:"Kiribati",fi:"Kiribati",sv:"Kiribati",telephoneCountryCode:"686"},KP:{isoCode:"KP",en:"North Korea",fi:"Korean demokraattinen kansantasavalta",sv:"Nordkorea",telephoneCountryCode:"850"},KR:{isoCode:"KR",en:"South Korea",fi:"Korean tasavalta",sv:"Sydkorea",telephoneCountryCode:"82"},KW:{isoCode:"KW",en:"Kuwait",fi:"Kuwait",sv:"Kuwait",telephoneCountryCode:"965"},KG:{isoCode:"KG",en:"Kyrgyzstan",fi:"Kirgisia",sv:"Kirgizistan",telephoneCountryCode:"996"},LA:{isoCode:"LA",en:"Lao People's Democratic Republic",fi:"Laos",sv:"Laos",telephoneCountryCode:"856"},LV:{isoCode:"LV",en:"Latvia",fi:"Latvia",sv:"Lettland",telephoneCountryCode:"371"},LB:{isoCode:"LB",en:"Lebanon",fi:"Libanon",sv:"Libanon",telephoneCountryCode:"961"},LS:{isoCode:"LS",en:"Lesotho",fi:"Lesotho",sv:"Lesotho",telephoneCountryCode:"266"},LR:{isoCode:"LR",en:"Liberia",fi:"Liberia",sv:"Liberia",telephoneCountryCode:"231"},LY:{isoCode:"LY",en:"Libya",fi:"Libya",sv:"Libyen",telephoneCountryCode:"218"},LI:{isoCode:"LI",en:"Liechtenstein",fi:"Liechtenstein",sv:"Liechtenstein",telephoneCountryCode:"423"},LT:{isoCode:"LT",en:"Lithuania",fi:"Liettua",sv:"Litauen",telephoneCountryCode:"370"},LU:{isoCode:"LU",en:"Luxembourg",fi:"Luxemburg",sv:"Luxemburg",telephoneCountryCode:"352"},MO:{isoCode:"MO",en:"Macao",fi:"Macao",sv:"Macau",telephoneCountryCode:"853"},MG:{isoCode:"MG",en:"Madagascar",fi:"Madagaskar",sv:"Madagaskar",telephoneCountryCode:"261"},MW:{isoCode:"MW",en:"Malawi",fi:"Malawi",sv:"Malawi",telephoneCountryCode:"265"},MY:{isoCode:"MY",en:"Malaysia",fi:"Malesia",sv:"Malaysia",telephoneCountryCode:"60"},MV:{isoCode:"MV",en:"Maldives",fi:"Malediivit",sv:"Maldiverna",telephoneCountryCode:"960"},ML:{isoCode:"ML",en:"Mali",fi:"Mali",sv:"Mali",telephoneCountryCode:"223"},MT:{isoCode:"MT",en:"Malta",fi:"Malta",sv:"Malta",telephoneCountryCode:"356"},MH:{isoCode:"MH",en:"Marshall Islands",fi:"Marshallinsaaret",sv:"Marshallöarna",telephoneCountryCode:"692"},MQ:{isoCode:"MQ",en:"Martinique",fi:"Martinique",sv:"Martinique",telephoneCountryCode:"596"},MR:{isoCode:"MR",en:"Mauritania",fi:"Mauritania",sv:"Mauretanien",telephoneCountryCode:"222"},MU:{isoCode:"MU",en:"Mauritius",fi:"Mauritius",sv:"Mauritius",telephoneCountryCode:"230"},YT:{isoCode:"YT",en:"Mayotte",fi:"Mayotte",sv:"Mayotte",telephoneCountryCode:"262"},MX:{isoCode:"MX",en:"Mexico",fi:"Meksiko",sv:"Mexiko",telephoneCountryCode:"52"},FM:{isoCode:"FM",en:"Micronesia, Federated States of",fi:"Mikronesian liittovaltio",sv:"Mikronesiska federationen",telephoneCountryCode:"691"},MD:{isoCode:"MD",en:"Moldova, Republic of",fi:"Moldova",sv:"Moldavien",telephoneCountryCode:"373"},MC:{isoCode:"MC",en:"Monaco",fi:"Monaco",sv:"Monaco",telephoneCountryCode:"377"},MN:{isoCode:"MN",en:"Mongolia",fi:"Mongolia",sv:"Mongoliet",telephoneCountryCode:"976"},MS:{isoCode:"MS",en:"Montserrat",fi:"Montserrat",sv:"Montserrat",telephoneCountryCode:"1"},MA:{isoCode:"MA",en:"Morocco",fi:"Marokko",sv:"Marocko",telephoneCountryCode:"212"},MZ:{isoCode:"MZ",en:"Mozambique",fi:"Mosambik",sv:"Moçambique",telephoneCountryCode:"258"},MM:{isoCode:"MM",en:"Myanmar",fi:"Myanmar",sv:"Burma",telephoneCountryCode:"95"},NA:{isoCode:"NA",en:"Namibia",fi:"Namibia",sv:"Namibia",telephoneCountryCode:"264"},NR:{isoCode:"NR",en:"Nauru",fi:"Nauru",sv:"Nauru",telephoneCountryCode:"674"},NP:{isoCode:"NP",en:"Nepal",fi:"Nepal",sv:"Nepal",telephoneCountryCode:"977"},NL:{isoCode:"NL",en:"Netherlands",fi:"Alankomaat",sv:"Nederländerna",telephoneCountryCode:"31"},NC:{isoCode:"NC",en:"New Caledonia",fi:"Uusi-Kaledonia",sv:"Nya Kaledonien",telephoneCountryCode:"687"},NZ:{isoCode:"NZ",en:"New Zealand",fi:"Uusi-Seelanti",sv:"Nya Zeeland",telephoneCountryCode:"64"},NI:{isoCode:"NI",en:"Nicaragua",fi:"Nicaragua",sv:"Nicaragua",telephoneCountryCode:"505"},NE:{isoCode:"NE",en:"Niger",fi:"Niger",sv:"Niger",telephoneCountryCode:"227"},NG:{isoCode:"NG",en:"Nigeria",fi:"Nigeria",sv:"Nigeria",telephoneCountryCode:"234"},NU:{isoCode:"NU",en:"Niue",fi:"Niue",sv:"Niue",telephoneCountryCode:"683"},NF:{isoCode:"NF",en:"Norfolk Island",fi:"Norfolkinsaari",sv:"Norfolkön",telephoneCountryCode:"672"},MK:{isoCode:"MK",en:"The Republic of North Macedonia",fi:"Pohjois-Makedonia",sv:"Nordmakedonien",telephoneCountryCode:"389"},MP:{isoCode:"MP",en:"Northern Mariana Islands",fi:"Pohjois-Mariaanit",sv:"Nordmarianerna",telephoneCountryCode:"1"},NO:{isoCode:"NO",en:"Norway",fi:"Norja",sv:"Norge",telephoneCountryCode:"47"},OM:{isoCode:"OM",en:"Oman",fi:"Oman",sv:"Oman",telephoneCountryCode:"968"},PK:{isoCode:"PK",en:"Pakistan",fi:"Pakistan",sv:"Pakistan",telephoneCountryCode:"92"},PW:{isoCode:"PW",en:"Palau",fi:"Palau",sv:"Palau",telephoneCountryCode:"680"},PS:{isoCode:"PS",en:"State of Palestine",fi:"Palestiina",sv:"Palestinska territoriet, ockuperade",telephoneCountryCode:"970"},PA:{isoCode:"PA",en:"Panama",fi:"Panama",sv:"Panama",telephoneCountryCode:"507"},PG:{isoCode:"PG",en:"Papua New Guinea",fi:"Papua-Uusi-Guinea",sv:"Papua Nya Guinea",telephoneCountryCode:"675"},PY:{isoCode:"PY",en:"Paraguay",fi:"Paraguay",sv:"Paraguay",telephoneCountryCode:"595"},PE:{isoCode:"PE",en:"Peru",fi:"Peru",sv:"Peru",telephoneCountryCode:"51"},PH:{isoCode:"PH",en:"Philippines",fi:"Filippiinit",sv:"Filippinerna",telephoneCountryCode:"63"},PN:{isoCode:"PN",en:"Pitcairn",fi:"Pitcairn",sv:"Pitcairnöarna"},PL:{isoCode:"PL",en:"Poland",fi:"Puola",sv:"Polen",telephoneCountryCode:"48"},PT:{isoCode:"PT",en:"Portugal",fi:"Portugali",sv:"Portugal",telephoneCountryCode:"351"},PR:{isoCode:"PR",en:"Puerto Rico",fi:"Puerto Rico",sv:"Puerto Rico",telephoneCountryCode:"1"},QA:{isoCode:"QA",en:"Qatar",fi:"Qatar",sv:"Qatar",telephoneCountryCode:"974"},RE:{isoCode:"RE",en:"Reunion",fi:"Réunion",sv:"Réunion",telephoneCountryCode:"262"},RO:{isoCode:"RO",en:"Romania",fi:"Romania",sv:"Rumänien",telephoneCountryCode:"40"},RU:{isoCode:"RU",en:"Russian Federation",fi:"Venäjä",sv:"Ryssland",telephoneCountryCode:"7"},RW:{isoCode:"RW",en:"Rwanda",fi:"Ruanda",sv:"Rwanda",telephoneCountryCode:"250"},SH:{isoCode:"SH",en:"Saint Helena",fi:"Saint Helena",sv:"Sankta Helena",telephoneCountryCode:"290"},KN:{isoCode:"KN",en:"Saint Kitts and Nevis",fi:"Saint Kitts ja Nevis",sv:"Saint Kitts och Nevis",telephoneCountryCode:"1"},LC:{isoCode:"LC",en:"Saint Lucia",fi:"Saint Lucia",sv:"Saint Lucia",telephoneCountryCode:"1"},PM:{isoCode:"PM",en:"Saint Pierre and Miquelon",fi:"Saint-Pierre ja Miquelon",sv:"Saint-Pierre och Miquelon",telephoneCountryCode:"508"},VC:{isoCode:"VC",en:"Saint Vincent and the Grenadines",fi:"Saint Vincent ja Grenadiinit",sv:"Saint Vincent och Grenadinerna",telephoneCountryCode:"1"},WS:{isoCode:"WS",en:"Samoa",fi:"Samoa",sv:"Samoa",telephoneCountryCode:"685"},SM:{isoCode:"SM",en:"San Marino",fi:"San Marino",sv:"San Marino",telephoneCountryCode:"378"},ST:{isoCode:"ST",en:"Sao Tome and Principe",fi:"São Tomé ja Príncipe",sv:"São Tomé och Príncipe",telephoneCountryCode:"239"},SA:{isoCode:"SA",en:"Saudi Arabia",fi:"Saudi-Arabia",sv:"Saudiarabien",telephoneCountryCode:"966"},SN:{isoCode:"SN",en:"Senegal",fi:"Senegal",sv:"Senegal",telephoneCountryCode:"221"},SC:{isoCode:"SC",en:"Seychelles",fi:"Seychellit",sv:"Seychellerna",telephoneCountryCode:"248"},SL:{isoCode:"SL",en:"Sierra Leone",fi:"Sierra Leone",sv:"Sierra Leone",telephoneCountryCode:"232"},SG:{isoCode:"SG",en:"Singapore",fi:"Singapore",sv:"Singapore",telephoneCountryCode:"65"},SK:{isoCode:"SK",en:"Slovakia",fi:"Slovakia",sv:"Slovakien",telephoneCountryCode:"421"},SI:{isoCode:"SI",en:"Slovenia",fi:"Slovenia",sv:"Slovenien",telephoneCountryCode:"386"},SB:{isoCode:"SB",en:"Solomon Islands",fi:"Salomonsaaret",sv:"Salomonöarna",telephoneCountryCode:"677"},SO:{isoCode:"SO",en:"Somalia",fi:"Somalia",sv:"Somalia",telephoneCountryCode:"252"},ZA:{isoCode:"ZA",en:"South Africa",fi:"Etelä-Afrikka",sv:"Sydafrika",telephoneCountryCode:"27"},GS:{isoCode:"GS",en:"South Georgia and the South Sandwich Islands",fi:"Etelä-Georgia ja Eteläiset Sandwichsaaret",sv:"Sydgeorgien och Sydsandwichöarna"},ES:{isoCode:"ES",en:"Spain",fi:"Espanja",sv:"Spanien",telephoneCountryCode:"34"},LK:{isoCode:"LK",en:"Sri Lanka",fi:"Sri Lanka",sv:"Sri Lanka",telephoneCountryCode:"94"},SD:{isoCode:"SD",en:"Sudan",fi:"Sudan",sv:"Sudan",telephoneCountryCode:"249"},SR:{isoCode:"SR",en:"Suriname",fi:"Suriname",sv:"Surinam",telephoneCountryCode:"597"},SJ:{isoCode:"SJ",en:"Svalbard and Jan Mayen",fi:"Svalbard ja Jan Mayen",sv:"Svalbard och Jan Mayen",telephoneCountryCode:"47"},SZ:{isoCode:"SZ",en:"Eswatini",fi:"Swazimaa",sv:"Eswatini",telephoneCountryCode:"268"},SE:{isoCode:"SE",en:"Sweden",fi:"Ruotsi",sv:"Sverige",telephoneCountryCode:"46"},CH:{isoCode:"CH",en:"Switzerland",fi:"Sveitsi",sv:"Schweiz",telephoneCountryCode:"41"},SY:{isoCode:"SY",en:"Syrian Arab Republic",fi:"Syyria",sv:"Syrien",telephoneCountryCode:"963"},TW:{isoCode:"TW",en:"Taiwan, Province of China",fi:"Taiwan",sv:"Taiwan",telephoneCountryCode:"886"},TJ:{isoCode:"TJ",en:"Tajikistan",fi:"Tadžikistan",sv:"Tadzjikistan",telephoneCountryCode:"992"},TZ:{isoCode:"TZ",en:"United Republic of Tanzania",fi:"Tansania",sv:"Tanzania",telephoneCountryCode:"255"},TH:{isoCode:"TH",en:"Thailand",fi:"Thaimaa",sv:"Thailand",telephoneCountryCode:"66"},TL:{isoCode:"TL",en:"Timor-Leste",fi:"Itä-Timor",sv:"Östtimor",telephoneCountryCode:"670"},TG:{isoCode:"TG",en:"Togo",fi:"Togo",sv:"Togo",telephoneCountryCode:"228"},TK:{isoCode:"TK",en:"Tokelau",fi:"Tokelau",sv:"Tokelauöarna",telephoneCountryCode:"690"},TO:{isoCode:"TO",en:"Tonga",fi:"Tonga",sv:"Tonga",telephoneCountryCode:"676"},TT:{isoCode:"TT",en:"Trinidad and Tobago",fi:"Trinidad ja Tobago",sv:"Trinidad och Tobago",telephoneCountryCode:"1"},TN:{isoCode:"TN",en:"Tunisia",fi:"Tunisia",sv:"Tunisien",telephoneCountryCode:"216"},TR:{isoCode:"TR",en:"Türkiye",fi:"Turkki",sv:"Turkiet",telephoneCountryCode:"90"},TM:{isoCode:"TM",en:"Turkmenistan",fi:"Turkmenistan",sv:"Turkmenistan",telephoneCountryCode:"993"},TC:{isoCode:"TC",en:"Turks and Caicos Islands",fi:"Turks- ja Caicossaaret",sv:"Turks- och Caicosöarna",telephoneCountryCode:"1"},TV:{isoCode:"TV",en:"Tuvalu",fi:"Tuvalu",sv:"Tuvalu",telephoneCountryCode:"688"},UG:{isoCode:"UG",en:"Uganda",fi:"Uganda",sv:"Uganda",telephoneCountryCode:"256"},UA:{isoCode:"UA",en:"Ukraine",fi:"Ukraina",sv:"Ukraina",telephoneCountryCode:"380"},AE:{isoCode:"AE",en:"United Arab Emirates",fi:"Arabiemiirikunnat",sv:"Förenade Arabemiraten",telephoneCountryCode:"971"},GB:{isoCode:"GB",en:"United Kingdom",fi:"Yhdistynyt kuningaskunta",sv:"Storbritannien",telephoneCountryCode:"44"},US:{isoCode:"US",en:"United States of America",fi:"Yhdysvallat",sv:"USA",telephoneCountryCode:"1"},UM:{isoCode:"UM",en:"United States Minor Outlying Islands",fi:"Yhdysvaltain pienet erillissaaret",sv:"USA:s yttre öar"},UY:{isoCode:"UY",en:"Uruguay",fi:"Uruguay",sv:"Uruguay",telephoneCountryCode:"598"},UZ:{isoCode:"UZ",en:"Uzbekistan",fi:"Uzbekistan",sv:"Uzbekistan",telephoneCountryCode:"998"},VU:{isoCode:"VU",en:"Vanuatu",fi:"Vanuatu",sv:"Vanuatu",telephoneCountryCode:"678"},VE:{isoCode:"VE",en:"Venezuela",fi:"Venezuela",sv:"Venezuela",telephoneCountryCode:"58"},VN:{isoCode:"VN",en:"Vietnam",fi:"Vietnam",sv:"Vietnam",telephoneCountryCode:"84"},VG:{isoCode:"VG",en:"Virgin Islands, British",fi:"Brittiläiset Neitsytsaaret",sv:"Brittiska Jungfruöarna",telephoneCountryCode:"1"},VI:{isoCode:"VI",en:"Virgin Islands, U.S.",fi:"Yhdysvaltain Neitsytsaaret",sv:"Amerikanska Jungfruöarna",telephoneCountryCode:"1"},WF:{isoCode:"WF",en:"Wallis and Futuna",fi:"Wallis ja Futunasaaret",sv:"Wallis- och Futunaöarna",telephoneCountryCode:"681"},EH:{isoCode:"EH",en:"Western Sahara",fi:"Länsi-Sahara",sv:"Västsahara",telephoneCountryCode:"212"},YE:{isoCode:"YE",en:"Yemen",fi:"Jemen",sv:"Jemen",telephoneCountryCode:"967"},ZM:{isoCode:"ZM",en:"Zambia",fi:"Sambia",sv:"Zambia",telephoneCountryCode:"260"},ZW:{isoCode:"ZW",en:"Zimbabwe",fi:"Zimbabwe",sv:"Zimbabwe",telephoneCountryCode:"263"},AX:{isoCode:"AX",en:"Åland Islands",fi:"Ahvenanmaa",sv:"Åland",telephoneCountryCode:"358"},BQ:{isoCode:"BQ",en:"Bonaire, Sint Eustatius and Saba",fi:"Bonaire, Sint Eustatius ja Saba",sv:"Bonaire, Saint Eustatius och Saba",telephoneCountryCode:"599"},CW:{isoCode:"CW",en:"Curaçao",fi:"Curaçao",sv:"Curacao",telephoneCountryCode:"599"},GG:{isoCode:"GG",en:"Guernsey",fi:"Guernsey",sv:"Guernsey",telephoneCountryCode:"44"},IM:{isoCode:"IM",en:"Isle of Man",fi:"Mansaari",sv:"Isle of Man",telephoneCountryCode:"44"},JE:{isoCode:"JE",en:"Jersey",fi:"Jersey",sv:"Jersey",telephoneCountryCode:"44"},ME:{isoCode:"ME",en:"Montenegro",fi:"Montenegro",sv:"Montenegro",telephoneCountryCode:"382"},BL:{isoCode:"BL",en:"Saint Barthélemy",fi:"Saint-Barthélemy",sv:"Saint-Barthélemy",telephoneCountryCode:"590"},MF:{isoCode:"MF",en:"Saint Martin (French part)",fi:"Saint-Martin",sv:"Saint Martin (franska delen)",telephoneCountryCode:"590"},RS:{isoCode:"RS",en:"Serbia",fi:"Serbia",sv:"Serbien",telephoneCountryCode:"381"},SX:{isoCode:"SX",en:"Sint Maarten (Dutch part)",fi:"Sint Maarten",sv:"Sint Maarten (nederländska delen)",telephoneCountryCode:"1"},SS:{isoCode:"SS",en:"South Sudan",fi:"Etelä-Sudan",sv:"Sydsudan",telephoneCountryCode:"211"},XK:{isoCode:"XK",en:"Kosovo",fi:"Kosovo",sv:"Kosovo",telephoneCountryCode:"383"}};var primaryCountriesForSharedCountryCodes={1:"US",7:"RU",39:"IT",44:"GB",47:"NO",61:"AU",212:"MA",262:"RE",358:"FI",590:"GP",599:"CW"};var duetPhoneInputCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}span.flag-container{display:flex;align-items:center;justify-content:center;width:30px;height:30px}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}:host:last-child,:host:last-of-type{margin-right:0 !important}@media (min-width: 36em){:host{width:calc(50% - 16px - 3px)}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}.duet-phone-input-container{position:relative;width:100%;height:100%}";var DuetPhoneInputStyle0=duetPhoneInputCss;var DuetPhoneInput=function(){function e(e){var o=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.duetInput=createEvent(this,"duetInput",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.countriesToList=Object.values(countries).filter((function(e){return!!e.telephoneCountryCode}));this.countryFlagCDNUrl="https://cdn.duetds.com/api/assets/country-flags/";this.inputId=createID("DuetInput");this.buttonAriaLabel={en:"Choose country code",fi:"Valitse maatunnus",sv:"Välj landskod"};this.setListFirstCountries=function(){var e=(typeof o.listFirst==="string"?o.listFirst.split(","):o.listFirst).map((function(e){return e.trim().toUpperCase()}));var n=Object.values(countries).filter((function(o){return e.includes(o.isoCode)}));var i=o.countriesToList.filter((function(o){return!e.includes(o.isoCode)}));i.sort((function(e,n){return e[o.language]>n[o.language]?1:-1}));o.countriesToList=__spreadArray(__spreadArray([],n,true),i,true)};this.handleFocus=function(){};this.handleChange=function(){};this.handleBlur=function(){};this.handleInput=function(){var e,n;var i=(e=o.duetInputElement.value)===null||e===void 0?void 0:e.trim();var a=o.currentCountry!=="error"&&((n=o.currentCountry)===null||n===void 0?void 0:n.telephoneCountryCode)||"";var t=o.findCountryCode(i)||"";if(!i){o.currentCountry=undefined;return}if(a===t){return}if(t){o.currentCountry=o.findCountryForCode(t);return}if(a!=="error"){o.currentCountry="error"}return};this.handleCountryCodeSelectorOpen=function(){o.countryCodePopup.controller=o.countryCodeButton;o.countryCodePopup.show()};this.handleCountryCodeSelectorSelect=function(e){var n=e.target.closest("duet-popup-menu-item");var i=countries[n.value];o.currentCountry=i;o.countryCodePopup.hide();o.setInputCountryCode()};this.language=getLanguage();this.currentCountry=undefined;this.theme="";this.margin="auto";this.expand=false;this.identifier=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleDescribedBy=undefined;this.disabled=false;this.required=false;this.labelDefaults={fi:"Puhelinnumero",en:"Phone number",sv:"Telefonnummer"};this.label=getLocaleString(this.labelDefaults,this.language);this.labelHidden=false;this.caption=undefined;this.name=undefined;this.error="";this.tooltip="";this.listFirst=["FI","SE"]}Object.defineProperty(e.prototype,"countries",{get:function(){return this.countriesToList},set:function(e){var o=e;var n="";var i=function(e){var o=["en","fi","sv","isoCode","telephoneCountryCode"];return o.every((function(o){return Object.keys(e).includes(o)}))&&/^[A-Z]{2}$/.test(e["isoCode"])&&/^[1-9][0-9]{0,2}$/.test(e["telephoneCountryCode"])};if(typeof e==="string"){o=JSON.parse(e)}if(Array.isArray(o)){if(o.every((function(e){return typeof e==="string"}))){this.countriesToList=Object.values(countries).filter((function(e){return o.includes(e.isoCode)&&!!e.telephoneCountryCode}))}else if(o.every((function(e){return i(e)}))){this.countriesToList=o}else{n="Invalid array provided for countries in Phone Input"}}else{n="Country list for Phone Input must be an array"}if(n){console.error(n);this.countriesToList=Object.values(countries).filter((function(e){return!!e.telephoneCountryCode}))}this.setListFirstCountries()},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){var e;return(e=this.duetInputElement.value)===null||e===void 0?void 0:e.replace(/\s/g,"")},set:function(e){this._value=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"validity",{get:function(){return this.duetInputElement.validity},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);checkNamedSlotElement(this.element,"tooltip","duet-tooltip",1,true);this.setListFirstCountries()};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"label",defaults:"labelDefaults"});subscribeTabbingChange(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this);unsubscribeTabbingChange(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.duetInputElement.setFocus(e);return[2]}))}))};e.prototype.setInputCountryCode=function(){if(this.currentCountry==="error"){return}var e="+".concat(this.currentCountry.telephoneCountryCode," ");var o=this.duetInputElement.value;if(!(o===null||o===void 0?void 0:o.trim().startsWith("+"))){this.duetInputElement.value="".concat(e).concat((o===null||o===void 0?void 0:o.trimStart())||"");return}var n=this.findCountryCode(o);console.log("Old code",n);if(n){this.duetInputElement.value=o.replace("+".concat(n),e).replace(" "," ");return}this.duetInputElement.value=o.replace("+",e)};e.prototype.findCountryCode=function(e){var o=e.trim();if(!o.startsWith("+")){return undefined}var n=Object.values(countries).find((function(e){return o.startsWith("+".concat(e.telephoneCountryCode))}));return n===null||n===void 0?void 0:n.telephoneCountryCode};e.prototype.findCountryForCode=function(e){var o=primaryCountriesForSharedCountryCodes[e]||"";return o?countries[o]:Object.values(countries).find((function(o){return o.telephoneCountryCode===e}))};e.prototype.renderFlag=function(e,o){if(o===void 0){o=false}var n={height:o?"34px":"24px",width:o?"27px":"24px","margin-right":o?"0":"10px","object-fit":"contain","object-position":"center",filter:"drop-shadow(0 0 1px rgba(0, 0, 0, 0.3)) drop-shadow(0 2px 6px rgba(0, 41, 77, 0.1))"};return h("img",{src:"".concat(this.countryFlagCDNUrl).concat(e,".svg"),"aria-hidden":"true",style:n,loading:"lazy"})};e.prototype.getFlagForButton=function(){if(!this.currentCountry||this.currentCountry==="error"){return h("duet-icon",{name:!this.currentCountry?"form-country":"messaging-alert",margin:"none"})}return this.renderFlag(this.currentCountry.isoCode,true)};e.prototype.render=function(){var e=this;var o=(typeof this.listFirst==="string"?this.listFirst.split(","):this.listFirst).map((function(e){return e.trim().toUpperCase()})).pop();var n=this.identifier||this.inputId;return h(Host,{class:{"duet-theme-turva":this.theme==="turva","duet-expand":this.expand,"duet-m-0":this.margin==="none"}},h("div",{class:"duet-phone-input-container"},h("duet-popup-menu",{ref:function(o){return e.countryCodePopup=o},scrollLimit:10,showFilterInput:true},this.countriesToList.map((function(n){return n.isoCode===o?h(Fragment,null,h("duet-popup-menu-item",{value:n.isoCode,onClick:e.handleCountryCodeSelectorSelect},h("duet-grid",{alignment:"center"},e.renderFlag(n.isoCode),h("span",null,n[e.language]," (+",n.telephoneCountryCode,")"))),h("duet-spacer",{size:"x-small"}),h("duet-divider",{margin:"small"})):h("duet-popup-menu-item",{value:n.isoCode,onClick:e.handleCountryCodeSelectorSelect},h("duet-grid",{alignment:"center"},e.renderFlag(n.isoCode),h("span",null,n[e.language]," (+",n.telephoneCountryCode,")")))}))),h("duet-input",{ref:function(o){return e.duetInputElement=o},onDuetChange:this.handleChange,onDuetFocus:this.handleFocus,onDuetBlur:this.handleBlur,onDuetInput:this.handleInput,label:this.label,caption:this.caption,value:this._value,error:this.error,name:this.name,component:"phone",variation:"button-left",type:"tel",disallowPattern:"[^\\+0-9 ]",required:this.required,disabled:this.disabled,labelHidden:this.labelHidden,tooltip:this.tooltip,identifier:n,theme:this.theme,margin:"none",expand:true},h("duet-button",{ref:function(o){return e.countryCodeButton=o},slot:"button-left",variation:"input-button-left-secondary",margin:"none",fixed:true,icon:"action-arrow-down-small",iconSize:"small",iconRight:true,accessibleLabel:this.buttonAriaLabel[this.language],onClick:this.handleCountryCodeSelectorOpen},h("span",{class:"flag-container"},this.getFlagForButton())),h("slot",{name:"tooltip"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetPhoneInput.style=DuetPhoneInputStyle0;export{DuetPhoneInput as duet_phone_input};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?i(e.value):r(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-2ab7ff5a.js";import{q as spaceXSmall}from"./tokens.module-a746651a.js";import{o as offset,f as flip,s as shift,c as computePosition,b as autoUpdate}from"./floating-ui.dom.esm-ebc91b33.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{f as focusElement}from"./focus-utils-27172227.js";import{c as isArrowDownKey,f as isEscapeKey,b as isArrowUpKey,o as isTabKey}from"./keyboard-utils-daf80d44.js";import{a as getLanguage}from"./language-utils-579bbfe7.js";import{T as Teleport}from"./teleport-546f382d.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import"./string-utils-192eb3c8.js";var duetPopupMenuCss="*,*::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}.duet-popup-menu-list{position:absolute;top:0;left:0;z-index:950;width:max-content;min-width:175px;padding:8px;margin:0;color:rgb(8, 42, 77);list-style:none;visibility:hidden !important;background:rgb(255, 255, 255);border-radius:8px;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.07), 0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:transform 300ms ease, visibility 300ms ease, opacity 300ms ease;transform:scaleY(0);transform-origin:top center}.duet-popup-menu-list.open{visibility:visible !important;opacity:1;transform:scaleY(1)}.duet-popup-menu-list.fixed{position:fixed}.duet-popup-menu-list.scroll-visible{overflow-y:scroll;scroll-margin:20px}.duet-popup-menu-list.duet-theme-turva{color:rgb(23, 28, 58) !important;background:rgb(255, 255, 255)}::slotted(duet-notification){max-width:360px}";var DuetPopupMenuStyle0=duetPopupMenuCss;var DuetPopupMenu=function(){function e(e){var t=this;registerInstance(this,e);this.duetToggle=createEvent(this,"duetToggle",7);this.filterLabel={en:"Filter menu",fi:"Suodata valikkoa",sv:"Filtrera meny"};this.setOpenButton=function(e){if(!e){return}try{var i=e;i.accessiblePopup="true";i.accessibleExpanded=false;if(t.controllerIcon){i.setAttribute("trailing-icon","action-arrow-down-small")}t.openButton=i}catch(e){}};this.openButtonEventListener=function(){t.toggle()};this.updatePlacement=function(){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:if(!this.openButton){return[2]}e=[offset({mainAxis:this.mainAxisOffset,crossAxis:this.crossAxisOffset}),this.allowVerticalFlip&&flip(),shift({padding:5})].filter(Boolean);return[4,computePosition(this.openButton,this.menuElement,{middleware:e,placement:this.placement,strategy:this.position})];case 1:t=i.sent();this.menuY=t.y;this.menuX=t.x;return[2]}}))}))};this.getNonFilteredItems=function(){return t.showFilterInput?t.itemElements.filter((function(e){return e.style.display!=="none"})):t.itemElements};this.filterItems=function(){var e;var i=(e=t.filterInput.value)===null||e===void 0?void 0:e.toLocaleLowerCase();var n=t.itemElements;n.forEach((function(e){e.style.display=!i||e.textContent.toLowerCase().includes(i)||e.value.toLowerCase().includes(i)?"":"none"}))};this.handleKeyDownOnFilter=function(e){var i;if(isArrowDownKey(e)){(i=t.getNonFilteredItems()[0])===null||i===void 0?void 0:i.setFocus()}};this.open=false;this.menuY=undefined;this.menuX=undefined;this.language=getLanguage();this.accessibleLabel=undefined;this.accessibleRole="menu";this.theme="";this.skipTeleport=undefined;this.placement="bottom-start";this.forcePlacement=false;this.allowVerticalFlip=true;this.position="absolute";this.mainAxisOffset=0;this.crossAxisOffset=0;this.controllerIcon="action-arrow-down-small";this.scrollLimit=undefined;this.showFilterInput=undefined}Object.defineProperty(e.prototype,"controller",{get:function(){return this._controller},set:function(e){if(this._controller===e){return}this._controller=e;if(typeof e==="string"){this.setOpenButton(document.getElementById(e));if(this.openButton){this.openButton.addEventListener("click",this.openButtonEventListener)}}else{this.setOpenButton(e)}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"opener",{get:function(){return this._controller},set:function(e){this.controller=e},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.componentDidLoad=function(){{this.updatePlacement()}};e.prototype.connectedCallback=function(){if(!this.teleport){this.teleport=new Teleport(this.element)}if(this.teleport){this.teleport.activate()}};e.prototype.disconnectedCallback=function(){if(this.autoUpdateCleanup){this.autoUpdateCleanup()}if(this.openButton){this.openButton.removeEventListener("click",this.openButtonEventListener);if(this.controllerIcon){this.openButton.removeAttribute("trailing-icon")}}};e.prototype.handleKeyUp=function(e){if(this.open){if(isEscapeKey(e)){this.hide()}}};e.prototype.handleKeyDown=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,i;return __generator(this,(function(n){switch(n.label){case 0:t=this.getNonFilteredItems();if(!this.open)return[3,5];if(!isArrowDownKey(e))return[3,2];e.preventDefault();return[4,this.getFocusedItemIndex()];case 1:i=n.sent();if(i!==-1){if(i<t.length-1){t[i+1].setFocus()}else{t[0].setFocus()}}n.label=2;case 2:if(!isArrowUpKey(e))return[3,4];e.preventDefault();return[4,this.getFocusedItemIndex()];case 3:i=n.sent();if(i!==-1){if(i===0){if(this.showFilterInput){this.filterInput.setFocus()}else{t[t.length-1].setFocus()}}else{t[i-1].setFocus()}}n.label=4;case 4:if(isTabKey(e)&&this.accessibleRole==="menu"){e.preventDefault();this.hide()}n.label=5;case 5:return[2]}}))}))};e.prototype.handleClick=function(e){var t=this;var i=e.composedPath().every((function(e){return e!==t.element&&e!==t.openButton}));if(this.open&&i){this.hide()}};e.prototype.isOpen=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.open]}))}))};e.prototype.show=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.open=true;return[2]}))}))};e.prototype.hide=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.autoUpdateCleanup){this.autoUpdateCleanup()}this.open=false;return[2]}))}))};e.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.open){this.hide()}else{this.show()}return[2]}))}))};e.prototype.handleOpenChange=function(e,t){var i=this;if(!!e===!!t){return}if(this.open&&!t){if(this.openButton){this.openButton.accessibleExpanded=true}if(this.accessibleRole!=="listbox"){this.teleport.makeSiblingsInert()}this.updatePlacement();if(this.menuElement&&this.openButton){this.autoUpdateCleanup=autoUpdate(this.openButton,this.menuElement,this.updatePlacement)}if(this.showFilterInput){this.filterInput.value="";this.filterItems()}setTimeout((function(){if(i.accessibleRole==="menu"){i.itemElements[0].setFocus()}i.duetToggle.emit({open:i.open,component:"duet-popup-menu"})}),200)}else if(!this.open&&t){if(this.openButton){this.openButton.accessibleExpanded=false}if(this.autoUpdateCleanup){this.autoUpdateCleanup()}setTimeout((function(){if(i.accessibleRole==="menu"){focusElement(i.openButton)}i.duetToggle.emit({open:i.open,component:"duet-popup-menu"});if(i.accessibleRole!=="listbox"){i.teleport.removeInertFromSiblings()}}),200)}};Object.defineProperty(e.prototype,"itemElements",{get:function(){return Array.from(this.element.querySelectorAll(":scope duet-popup-menu-item"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"popupMenuStyleHeight",{get:function(){var e=":scope duet-popup-menu-item, :scope duet-notification";var t=Array.from(this.element.querySelectorAll(e));if(t.length>0&&this.scrollLimit){var i=Number(spaceXSmall.replace("px",""))*2;return"".concat(t[0].offsetHeight*this.scrollLimit+i,"px")}else{return"auto"}},enumerable:false,configurable:true});e.prototype.getFocusedItemIndex=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:e=this.getNonFilteredItems();t=0;i.label=1;case 1:if(!(t<e.length))return[3,4];return[4,e[t].isFocused()];case 2:if(i.sent()){return[2,t]}i.label=3;case 3:t++;return[3,1];case 4:return[2,-1]}}))}))};e.prototype.render=function(){var e=this;var t={top:"".concat(this.menuY,"px"),left:"".concat(this.menuX,"px"),position:this.position,overflowY:"auto",height:this.popupMenuStyleHeight};return h(Host,{key:"245da481a4c3ac550648005777f7f7724c8e7806"},h("div",{key:"17069b93e411e4f951dcf4f591aacf90a0fcf7ec",ref:function(t){e.menuElement=t},style:t,class:{open:this.open,"duet-popup-menu-list":true,"duet-theme-turva":this.theme==="turva","scroll-visible":this.scrollLimit<this.itemElements.length},role:this.accessibleRole,"aria-label":this.accessibleLabel},this.showFilterInput&&h("div",{key:"24e126dbabf9089b5d3bed8d20c4a2d727531a0e"},h("duet-input",{key:"719101f79b6678a0e7b28694e2c630e902f58bb2",ref:function(t){return e.filterInput=t},label:this.filterLabel[this.language],"label-hidden":true,expand:true,margin:"none",type:"search",onDuetInput:this.filterItems,onKeyDown:this.handleKeyDownOnFilter}),h("duet-spacer",{key:"c49e9178d065230acbc63f163b9b31dfa53a56ae",size:"xx-small"})),h("slot",{key:"d6e2cbd68cd5f5961d5c486a974b72083f2cbae0"})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}();DuetPopupMenu.style=DuetPopupMenuStyle0;var duetPopupMenuItemCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:flex-start}.duet-popup-menu-item{display:flex;flex-grow:1;gap:12px;align-items:center;height:100%;padding:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(8, 42, 77);text-align:left;text-decoration:none;cursor:pointer}.duet-popup-menu-item:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-popup-menu-item:focus,.duet-popup-menu-item:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-popup-menu-item.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)}.duet-popup-menu-item.active{background:rgb(240, 247, 250)}.duet-popup-menu-item.active.duet-theme-turva{background:rgb(245, 247, 250)}.duet-popup-menu-item:hover{background:rgb(228, 241, 247)}.duet-popup-menu-item:hover.duet-theme-turva{background:rgb(222, 224, 228)}.duet-popup-menu-item .duet-popup-menu-item-label{flex-grow:1}.duet-popup-menu-item .duet-popup-menu-item-trailing{padding-left:20px}.active-descendant{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .active-descendant,.active-descendant.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}';var DuetPopupMenuItemStyle0=duetPopupMenuItemCss;var DuetPopupMenuItem=function(){function e(e){var t=this;registerInstance(this,e);this.duetFocus=createEvent(this,"duetFocus",7);this.duetBlur=createEvent(this,"duetBlur",7);this.onFocus=function(e){t.focus=true;t.duetFocus.emit({originalEvent:e,value:t.value,component:"duet-popup-menu-item"})};this.onBlur=function(e){t.focus=false;t.duetBlur.emit({originalEvent:e,value:t.value,component:"duet-popup-menu-item"})};this.focus=false;this.accessibleLabel=undefined;this.accessibleRole="menuitem";this.theme="";this.url=undefined;this.external=false;this.targetLanguage=undefined;this.value=undefined;this.leadingIcon=undefined;this.leadingIconColor=undefined;this.trailingIcon=undefined;this.trailingText=undefined;this.active=false;this.activeDescendant=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){setTimeout((function(){return t.itemElement.focus(e)}),200);return[2]}))}))};e.prototype.isFocused=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.focus]}))}))};e.prototype.render=function(){var e=this;var t=this.url?"a":"button";var i={"duet-popup-menu-item":true,active:this.active,"duet-theme-turva":this.theme==="turva","active-descendant":this.activeDescendant};return h(Host,{key:"2f4a7fe60bc5938bbcb3b1fbce1b4c7bb6bc1de2",role:this.accessibleRole},h(t,{key:"c9f7fd447bb786217bd8a914167bb908acf66f37",ref:function(t){return e.itemElement=t},tabIndex:this.accessibleRole==="listitem"?0:-1,onFocus:this.onFocus,onBlur:this.onBlur,role:"".concat(t==="a"?"link":"button"),"aria-label":this.accessibleLabel,class:i,value:this.value,href:this.url,target:this.external?"_blank":undefined,rel:this.external?"noopener":undefined,lang:t==="button"?undefined:this.targetLanguage,hreflang:t==="button"?undefined:this.targetLanguage},this.leadingIcon&&h("duet-icon",{key:"dcd75ed8a6b9113d52ffa7525c4356cbb2900bc4",name:this.leadingIcon,size:"x-small",color:this.leadingIconColor?this.leadingIconColor:"currentColor",class:"duet-popup-menu-item-leading",margin:"none"}),h("span",{key:"db792f6c21c039bc1997fe199227a84854623c9d",class:"duet-popup-menu-item-label"},h("slot",{key:"dbe5cfc337cc536811672bfc2240518c230df8d6"})),(this.trailingIcon||this.active||this.url&&this.external)&&h("duet-icon",{key:"dbcb7c7c1fb2a4279aab71c16bf8dfd0505fbe38",name:this.url&&this.external?actionNewWindowSmall.title:this.active?"messaging-checked-small":this.trailingIcon,size:this.url&&this.external||this.active?"xx-small":"x-small",color:"currentColor",class:"duet-popup-menu-item-trailing",margin:"none"}),this.trailingText&&h("span",{key:"e234fa5fd161ad0938c925c4b1fb75b6fbbb37f2",class:"duet-popup-menu-item-trailing"},this.trailingText)))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetPopupMenuItem.style=DuetPopupMenuItemStyle0;export{DuetPopupMenu as duet_popup_menu,DuetPopupMenuItem as duet_popup_menu_item};
|
|
4
|
+
*/import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9b64dfa3.js";import{q as spaceXSmall}from"./tokens.module-a746651a.js";import{o as offset,f as flip,s as shift,c as computePosition,b as autoUpdate}from"./floating-ui.dom.esm-ebc91b33.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{f as focusElement}from"./focus-utils-b97d6fb5.js";import{c as isArrowDownKey,f as isEscapeKey,b as isArrowUpKey,o as isTabKey}from"./keyboard-utils-daf80d44.js";import{a as getLanguage}from"./language-utils-87dc6eb1.js";import{T as Teleport}from"./teleport-aa27d5f9.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import"./string-utils-192eb3c8.js";var duetPopupMenuCss="*,*::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}.duet-popup-menu-list{position:absolute;top:0;left:0;z-index:950;width:max-content;min-width:175px;padding:8px;margin:0;color:rgb(8, 42, 77);list-style:none;visibility:hidden !important;background:rgb(255, 255, 255);border-radius:8px;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.07), 0 4px 10px 0 rgba(0, 41, 77, 0.15);opacity:0;transition:transform 300ms ease, visibility 300ms ease, opacity 300ms ease;transform:scaleY(0);transform-origin:top center}.duet-popup-menu-list.open{visibility:visible !important;opacity:1;transform:scaleY(1)}.duet-popup-menu-list.fixed{position:fixed}.duet-popup-menu-list.scroll-visible{overflow-y:scroll;scroll-margin:20px}.duet-popup-menu-list.duet-theme-turva{color:rgb(23, 28, 58) !important;background:rgb(255, 255, 255)}::slotted(duet-notification){max-width:360px}";var DuetPopupMenuStyle0=duetPopupMenuCss;var DuetPopupMenu=function(){function e(e){var t=this;registerInstance(this,e);this.duetToggle=createEvent(this,"duetToggle",7);this.filterLabel={en:"Filter menu",fi:"Suodata valikkoa",sv:"Filtrera meny"};this.setOpenButton=function(e){if(!e){return}try{var i=e;i.accessiblePopup="true";i.accessibleExpanded=false;if(t.controllerIcon){i.setAttribute("trailing-icon","action-arrow-down-small")}t.openButton=i}catch(e){}};this.openButtonEventListener=function(){t.toggle()};this.updatePlacement=function(){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:if(!this.openButton){return[2]}e=[offset({mainAxis:this.mainAxisOffset,crossAxis:this.crossAxisOffset}),this.allowVerticalFlip&&flip(),shift({padding:5})].filter(Boolean);return[4,computePosition(this.openButton,this.menuElement,{middleware:e,placement:this.placement,strategy:this.position})];case 1:t=i.sent();this.menuY=t.y;this.menuX=t.x;return[2]}}))}))};this.getNonFilteredItems=function(){return t.showFilterInput?t.itemElements.filter((function(e){return e.style.display!=="none"})):t.itemElements};this.filterItems=function(){var e;var i=(e=t.filterInput.value)===null||e===void 0?void 0:e.toLocaleLowerCase();var n=t.itemElements;n.forEach((function(e){e.style.display=!i||e.textContent.toLowerCase().includes(i)||e.value.toLowerCase().includes(i)?"":"none"}))};this.handleKeyDownOnFilter=function(e){var i;if(isArrowDownKey(e)){(i=t.getNonFilteredItems()[0])===null||i===void 0?void 0:i.setFocus()}};this.open=false;this.menuY=undefined;this.menuX=undefined;this.language=getLanguage();this.accessibleLabel=undefined;this.accessibleRole="menu";this.theme="";this.skipTeleport=undefined;this.placement="bottom-start";this.forcePlacement=false;this.allowVerticalFlip=true;this.position="absolute";this.mainAxisOffset=0;this.crossAxisOffset=0;this.controllerIcon="action-arrow-down-small";this.scrollLimit=undefined;this.showFilterInput=undefined}Object.defineProperty(e.prototype,"controller",{get:function(){return this._controller},set:function(e){if(this._controller===e){return}this._controller=e;if(typeof e==="string"){this.setOpenButton(document.getElementById(e));if(this.openButton){this.openButton.addEventListener("click",this.openButtonEventListener)}}else{this.setOpenButton(e)}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"opener",{get:function(){return this._controller},set:function(e){this.controller=e},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.componentDidLoad=function(){{this.updatePlacement()}};e.prototype.connectedCallback=function(){if(!this.teleport){this.teleport=new Teleport(this.element)}if(this.teleport){this.teleport.activate()}};e.prototype.disconnectedCallback=function(){if(this.autoUpdateCleanup){this.autoUpdateCleanup()}if(this.openButton){this.openButton.removeEventListener("click",this.openButtonEventListener);if(this.controllerIcon){this.openButton.removeAttribute("trailing-icon")}}};e.prototype.handleKeyUp=function(e){if(this.open){if(isEscapeKey(e)){this.hide()}}};e.prototype.handleKeyDown=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,i;return __generator(this,(function(n){switch(n.label){case 0:t=this.getNonFilteredItems();if(!this.open)return[3,5];if(!isArrowDownKey(e))return[3,2];e.preventDefault();return[4,this.getFocusedItemIndex()];case 1:i=n.sent();if(i!==-1){if(i<t.length-1){t[i+1].setFocus()}else{t[0].setFocus()}}n.label=2;case 2:if(!isArrowUpKey(e))return[3,4];e.preventDefault();return[4,this.getFocusedItemIndex()];case 3:i=n.sent();if(i!==-1){if(i===0){if(this.showFilterInput){this.filterInput.setFocus()}else{t[t.length-1].setFocus()}}else{t[i-1].setFocus()}}n.label=4;case 4:if(isTabKey(e)&&this.accessibleRole==="menu"){e.preventDefault();this.hide()}n.label=5;case 5:return[2]}}))}))};e.prototype.handleClick=function(e){var t=this;var i=e.composedPath().every((function(e){return e!==t.element&&e!==t.openButton}));if(this.open&&i){this.hide()}};e.prototype.isOpen=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.open]}))}))};e.prototype.show=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.open=true;return[2]}))}))};e.prototype.hide=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.autoUpdateCleanup){this.autoUpdateCleanup()}this.open=false;return[2]}))}))};e.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.open){this.hide()}else{this.show()}return[2]}))}))};e.prototype.handleOpenChange=function(e,t){var i=this;if(!!e===!!t){return}if(this.open&&!t){if(this.openButton){this.openButton.accessibleExpanded=true}if(this.accessibleRole!=="listbox"){this.teleport.makeSiblingsInert()}this.updatePlacement();if(this.menuElement&&this.openButton){this.autoUpdateCleanup=autoUpdate(this.openButton,this.menuElement,this.updatePlacement)}if(this.showFilterInput){this.filterInput.value="";this.filterItems()}setTimeout((function(){if(i.accessibleRole==="menu"){i.itemElements[0].setFocus()}i.duetToggle.emit({open:i.open,component:"duet-popup-menu"})}),200)}else if(!this.open&&t){if(this.openButton){this.openButton.accessibleExpanded=false}if(this.autoUpdateCleanup){this.autoUpdateCleanup()}setTimeout((function(){if(i.accessibleRole==="menu"){focusElement(i.openButton)}i.duetToggle.emit({open:i.open,component:"duet-popup-menu"});if(i.accessibleRole!=="listbox"){i.teleport.removeInertFromSiblings()}}),200)}};Object.defineProperty(e.prototype,"itemElements",{get:function(){return Array.from(this.element.querySelectorAll(":scope duet-popup-menu-item"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"popupMenuStyleHeight",{get:function(){var e=":scope duet-popup-menu-item, :scope duet-notification";var t=Array.from(this.element.querySelectorAll(e));if(t.length>0&&this.scrollLimit){var i=Number(spaceXSmall.replace("px",""))*2;return"".concat(t[0].offsetHeight*this.scrollLimit+i,"px")}else{return"auto"}},enumerable:false,configurable:true});e.prototype.getFocusedItemIndex=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:e=this.getNonFilteredItems();t=0;i.label=1;case 1:if(!(t<e.length))return[3,4];return[4,e[t].isFocused()];case 2:if(i.sent()){return[2,t]}i.label=3;case 3:t++;return[3,1];case 4:return[2,-1]}}))}))};e.prototype.render=function(){var e=this;var t={top:"".concat(this.menuY,"px"),left:"".concat(this.menuX,"px"),position:this.position,overflowY:"auto",height:this.popupMenuStyleHeight};return h(Host,{key:"5bb85676ba5f828c366f50de522256423be04e85"},h("div",{key:"b518597ae6452ccc99331cf6d9b97f209d8837ee",ref:function(t){e.menuElement=t},style:t,class:{open:this.open,"duet-popup-menu-list":true,"duet-theme-turva":this.theme==="turva","scroll-visible":this.scrollLimit<this.itemElements.length},role:this.accessibleRole,"aria-label":this.accessibleLabel},this.showFilterInput&&h("div",{key:"9805d1a455cb8e4c6503b1c4177a5d7a5c1d5d01"},h("duet-input",{key:"a5f49f43c7f8979b9adae13435194e7679bee6c2",ref:function(t){return e.filterInput=t},label:this.filterLabel[this.language],"label-hidden":true,expand:true,margin:"none",type:"search",onDuetInput:this.filterItems,onKeyDown:this.handleKeyDownOnFilter}),h("duet-spacer",{key:"507f2d58077dc27f7096aeb571e78a1b7ba3911f",size:"xx-small"})),h("slot",{key:"0df4eef63e174ee4ff14a23ba819461e30a118c9"})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}();DuetPopupMenu.style=DuetPopupMenuStyle0;var duetPopupMenuItemCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:flex-start}.duet-popup-menu-item{display:flex;flex-grow:1;gap:12px;align-items:center;height:100%;padding:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(8, 42, 77);text-align:left;text-decoration:none;cursor:pointer}.duet-popup-menu-item:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-popup-menu-item:focus,.duet-popup-menu-item:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-popup-menu-item.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)}.duet-popup-menu-item.active{background:rgb(240, 247, 250)}.duet-popup-menu-item.active.duet-theme-turva{background:rgb(245, 247, 250)}.duet-popup-menu-item:hover{background:rgb(228, 241, 247)}.duet-popup-menu-item:hover.duet-theme-turva{background:rgb(222, 224, 228)}.duet-popup-menu-item .duet-popup-menu-item-label{flex-grow:1}.duet-popup-menu-item .duet-popup-menu-item-trailing{padding-left:20px}.active-descendant{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .active-descendant,.active-descendant.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}';var DuetPopupMenuItemStyle0=duetPopupMenuItemCss;var DuetPopupMenuItem=function(){function e(e){var t=this;registerInstance(this,e);this.duetFocus=createEvent(this,"duetFocus",7);this.duetBlur=createEvent(this,"duetBlur",7);this.onFocus=function(e){t.focus=true;t.duetFocus.emit({originalEvent:e,value:t.value,component:"duet-popup-menu-item"})};this.onBlur=function(e){t.focus=false;t.duetBlur.emit({originalEvent:e,value:t.value,component:"duet-popup-menu-item"})};this.focus=false;this.accessibleLabel=undefined;this.accessibleRole="menuitem";this.theme="";this.url=undefined;this.external=false;this.targetLanguage=undefined;this.value=undefined;this.leadingIcon=undefined;this.leadingIconColor=undefined;this.trailingIcon=undefined;this.trailingText=undefined;this.active=false;this.activeDescendant=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){setTimeout((function(){return t.itemElement.focus(e)}),200);return[2]}))}))};e.prototype.isFocused=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.focus]}))}))};e.prototype.render=function(){var e=this;var t=this.url?"a":"button";var i={"duet-popup-menu-item":true,active:this.active,"duet-theme-turva":this.theme==="turva","active-descendant":this.activeDescendant};return h(Host,{key:"ecd69714512d5821c0e558634c25094fae64a925",role:this.accessibleRole},h(t,{key:"13b3dd3ab67cecd24989acf66444b6d0badec52c",ref:function(t){return e.itemElement=t},tabIndex:this.accessibleRole==="listitem"?0:-1,onFocus:this.onFocus,onBlur:this.onBlur,role:"".concat(t==="a"?"link":"button"),"aria-label":this.accessibleLabel,class:i,value:this.value,href:this.url,target:this.external?"_blank":undefined,rel:this.external?"noopener":undefined,lang:t==="button"?undefined:this.targetLanguage,hreflang:t==="button"?undefined:this.targetLanguage},this.leadingIcon&&h("duet-icon",{key:"3bfc02794dbd281e150ea8a0b16abac9b2c38b89",name:this.leadingIcon,size:"x-small",color:this.leadingIconColor?this.leadingIconColor:"currentColor",class:"duet-popup-menu-item-leading",margin:"none"}),h("span",{key:"831b7cbafa3ac23a3b8f75099e6e1e9725b32c2f",class:"duet-popup-menu-item-label"},h("slot",{key:"c460db8d6e2067b8f7e1a2b6cebcf456114db058"})),(this.trailingIcon||this.active||this.url&&this.external)&&h("duet-icon",{key:"f5c2c99a60fa0aa92e0e2530b04559f3260fcd6a",name:this.url&&this.external?actionNewWindowSmall.title:this.active?"messaging-checked-small":this.trailingIcon,size:this.url&&this.external||this.active?"xx-small":"x-small",color:"currentColor",class:"duet-popup-menu-item-trailing",margin:"none"}),this.trailingText&&h("span",{key:"ee9a288b2fcf622e2c1885f4d1be67d5025c23f6",class:"duet-popup-menu-item-trailing"},this.trailingText)))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetPopupMenuItem.style=DuetPopupMenuItemStyle0;export{DuetPopupMenu as duet_popup_menu,DuetPopupMenuItem as duet_popup_menu_item};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-
|
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-9b64dfa3.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{c as createID}from"./create-id-149a1b6d.js";import{g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-87dc6eb1.js";import"./string-utils-192eb3c8.js";var duetProgressCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:inherit}.duet-progress{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;min-height:1px;}.duet-progress .progress-bar{position:relative;display:block;width:100%;height:inherit;min-height:1px;background-color:rgb(240, 247, 250);border-radius:0;box-shadow:none}.duet-theme-turva .duet-progress .progress-bar{background-color:rgb(255, 241, 241)}.duet-progress .progress-bar>span{display:block;height:inherit;text-indent:-9999px;background-color:rgb(0, 119, 179);border-radius:0}.duet-theme-turva .duet-progress .progress-bar>span{background-color:rgb(198, 12, 48)}.duet-progress progress[value]{display:flex;width:100%;height:inherit;min-height:1px;color:rgb(0, 119, 179);border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-progress progress[value]::-webkit-progress-bar{background-color:rgb(240, 247, 250);border-radius:0}.duet-progress progress[value]::-webkit-progress-value{background-color:rgb(0, 119, 179);background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}.duet-progress progress[value] ::-moz-progress-bar{background-color:rgb(240, 247, 250)}.duet-progress.duet-theme-turva progress[value]{color:rgb(198, 12, 48)}.duet-progress.duet-theme-turva progress[value]::-webkit-progress-bar{background-color:rgb(255, 241, 241)}.duet-progress.duet-theme-turva progress[value]::-webkit-progress-value{background-color:rgb(198, 12, 48)}.duet-progress.duet-theme-turva progress[value] ::-moz-progress-bar{background-color:rgb(255, 241, 241)}";var DuetProgressStyle0=duetProgressCss;var DuetProgress=function(){function e(e){registerInstance(this,e);this.progressId=createID("DuetProgress");this.progressLabelId=createID("DuetProgressLabel");this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleLabel=undefined;this.accessibleLabelUploadDefaults={fi:["lähetys valmis","lähetys käynnissä"],sv:["Uppladdningen är klar","Uppladdning pågår"],en:["upload completed","upload in progress"]};this.accessibleLabelUpload=getLocaleString(this.accessibleLabelUploadDefaults);this.progress=0;this.caption=undefined;this.height="10px";this.theme=""}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"accessibleLabelUpload",defaults:"accessibleLabelUploadDefaults"})};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.render=function(){return h(Host,null,h("div",{"aria-live":this.accessibleLabel?"polite":"off","aria-hidden":this.accessibleLabel?"false":"true","aria-atomic":"true",style:{height:this.height},id:this.progressId,class:{"duet-progress":true,"duet-progress-done":this.progress===100,"duet-progress-start":this.progress===0,"duet-progress-inprogress":this.progress<99&&this.progress!==0,"duet-theme-turva":this.theme==="turva"}},h("duet-visually-hidden",null,h("label",{htmlFor:this.progressLabelId},h("span",null,this.accessibleLabel,this.progress!==0&&", ".concat(this.accessibleLabelUpload[this.progress<99?1:0])))),this.caption&&h("div",{class:"duet-progress-caption"},h("span",null,this.caption)),h("progress",{id:this.progressLabelId,"aria-describedby":this.accessibleDescribedBy,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,role:"progressbar",value:this.progress,max:"100","aria-valuemin":"0","aria-valuemax":"100"},h("div",{class:"progress-bar"},h("span",{style:{width:"".concat(this.progress,"%;")}},"Progress: ",this.progress,"%")))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetProgress.style=DuetProgressStyle0;export{DuetProgress as duet_progress};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,a,o){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function i(e){try{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,a,o){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function i(e){try{d(o.next(e))}catch(e){n(e)}}function c(e){try{d(o["throw"](e))}catch(e){n(e)}}function d(e){e.done?a(e.value):r(e.value).then(i,c)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(t){return d([e,t])}}function d(c){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(a=0)),a)try{if(o=1,r&&(n=c[0]&2?r["return"]:c[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;if(r=0,n)c=[c[0]&2,n.value];switch(c[0]){case 0:case 1:n=c;break;case 4:a.label++;return{value:c[1],done:false};case 5:a.label++;r=c[1];c=[0];continue;case 7:c=a.ops.pop();a.trys.pop();continue;default:if(!(n=a.trys,n=n.length>0&&n[n.length-1])&&(c[0]===6||c[0]===2)){a=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(c[0]===6&&a.label<n[1]){a.label=n[1];n=c;break}if(n&&a.label<n[2]){a.label=n[2];a.ops.push(c);break}if(n[2])a.ops.pop();a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e];r=0}finally{o=n=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,h,H as Host,g as getElement}from"./index-
|
|
4
|
+
*/import{r as registerInstance,h,H as Host,g as getElement}from"./index-9b64dfa3.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{h as hasSlot,c as checkNamedSlotElement}from"./slot-utils-b8cbdf64.js";import{g as getColorByName}from"./token-utils-a32eb753.js";import"./tokens.module-a746651a.js";var duetPromoCardCss='*,*::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:block;width:auto}:host:last-child,:host:last-of-type{margin-right:0 !important}:host(.duet-m-0){margin:0 !important}.duet-promo-card{display:flex;flex-direction:column;width:100%;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-style:normal;color:rgb(8, 42, 77);text-align:left;border-radius:20px}.duet-promo-card.duet-p-0{padding:0 !important}.duet-promo-card.duet-m-0{margin:0 !important}.duet-promo-card .content-wrapper{display:flex;flex-direction:column;height:100%;color:inherit;text-decoration:none}.duet-promo-card .content-wrapper:focus{border-radius:20px;outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-promo-card .image{position:relative;width:100%;overflow:hidden;border-top-left-radius:20px;border-top-right-radius:20px;object-fit:cover}.duet-promo-card .content{display:flex;flex-direction:column;flex-grow:1;gap:8px;padding:20px}@media (min-width: 36em){.duet-promo-card .content{padding:28px}}.duet-promo-card .action{display:flex;flex-grow:1;align-items:flex-end;padding-top:16px}.duet-promo-card.no-bg-color .content{padding:20px 0 0}.duet-promo-card.no-bg-color .image{border-radius:16px}.duet-promo-card.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.duet-promo-card.duet-theme-turva .content-wrapper:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-promo-card-link{transition:box-shadow 300ms ease}.duet-promo-card-link:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}.duet-promo-card-link:hover.duet-theme-turva{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}';var DuetPromoCardStyle0=duetPromoCardCss;var DuetPromoCard=function(){function e(e){registerInstance(this,e);this.theme="";this.margin="auto";this.backgroundColor="";this.textColor="secondary";this.image="";this.headingLevel="h3";this.url=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasPreHeadingSlot=hasSlot(this.element,"pre-heading");this.hasHeadingSlot=hasSlot(this.element,"heading");this.hasDescriptionSlot=hasSlot(this.element,"description");this.hasActionSlot=hasSlot(this.element,"action");checkNamedSlotElement(this.element,"heading","span");checkNamedSlotElement(this.element,"description","span")};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.url&&this.aOrDivElement){this.aOrDivElement.focus(e)}return[2]}))}))};e.prototype.render=function(){var e=this;var t=getColorByName(this.backgroundColor,this.theme);var a={backgroundColor:t?t:"none"};var o=this.url?"a":"div";return h(Host,{key:"b4f25c873b15a4a49a932bd545b2b4a127bcb625",class:{"duet-m-0":this.margin==="none"}},h("aside",{key:"a258d491371e320b9f48937a7d6e752e00688890",class:{"duet-promo-card":true,"duet-theme-turva":this.theme==="turva","no-bg-color":!this.backgroundColor,"duet-promo-card-link":!!this.url},style:a},h(o,{key:"28f1b5d2c3df418be9f59c5dc64771f45b0ef179",href:this.url,class:"content-wrapper",ref:function(t){return e.aOrDivElement=t}},h("img",{key:"ed15e3982f37e6b3f8d07cb183a1d26cea36fa4e",class:"image",src:this.image,alt:"",role:"presentation"}),h("div",{key:"bebacca9c33e3e45688c35344e2284bcc104f5be",class:"content"},this.hasPreHeadingSlot&&h("div",{key:"62ab7a65ea395d42ea9cedc5191d20a482d71c00",class:"pre-heading"},h("slot",{key:"9a820fc917ecee6ed03c9bef2bec07721cef8204",name:"pre-heading"})),this.hasHeadingSlot&&h("div",{key:"2447d95b255c7b3b2aec8d0bae851ceb63f87189",class:"heading"},h("duet-heading",{key:"7888fa82727069054b8dac0dccb9e98cf33a6ef6",theme:this.theme,level:this.headingLevel,"visual-level":"h3",margin:"none",color:this.textColor},h("span",{key:"5a051e92591dcf390c94a5a8936b9b9cb1b900b0"},h("slot",{key:"cf12bd24a06e3366ff3e2db5fe72297d96c2355c",name:"heading"})))),this.hasDescriptionSlot&&h("div",{key:"524492cc8044e616df3d68f28f201509a4ed152d",class:"description"},h("duet-paragraph",{key:"b267bd81e032e81b6238915140aa57c5c704f114",theme:this.theme,margin:"none",color:this.textColor},h("span",{key:"52fc68fb4d4a2c43ce5d62e4acad95e8eda460a9"},h("slot",{key:"6573a8c5e6d054c2233c705fa639ea6e3d6cec09",name:"description"})))),this.hasActionSlot&&h("div",{key:"788e42b09b153da16505d3ca579fe430ede78141",class:"action"},h("slot",{key:"5f2be7ebc41c6dec491d1d2b29f6aeeabe5f4b0f",name:"action"}))))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetPromoCard.style=DuetPromoCardStyle0;export{DuetPromoCard as duet_promo_card};
|