@duetds/components 9.19.0 → 9.20.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 +237 -135
- package/lib/cjs/a11y-utils-13737afd.js +46 -0
- package/lib/cjs/{app-globals-a6c4e8f5.js → app-globals-dbb64a81.js} +1 -1
- package/lib/cjs/{common-strings-92c2f034.js → common-strings-ed188f52.js} +5 -4
- package/lib/cjs/duet-action-button.cjs.entry.js +5 -5
- package/lib/cjs/duet-alert.cjs.entry.js +15 -12
- package/lib/cjs/duet-badge.cjs.entry.js +5 -5
- package/lib/cjs/duet-banner.cjs.entry.js +6 -6
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +5 -5
- package/lib/cjs/duet-button_2.cjs.entry.js +7 -7
- package/lib/cjs/duet-callout.cjs.entry.js +3 -3
- package/lib/cjs/duet-caption_4.cjs.entry.js +12 -12
- package/lib/cjs/duet-card.cjs.entry.js +5 -5
- package/lib/cjs/duet-checkbox.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkmark.cjs.entry.js +2 -2
- package/lib/cjs/duet-chip.cjs.entry.js +4 -4
- package/lib/cjs/duet-choice_2.cjs.entry.js +9 -8
- package/lib/cjs/duet-collapsible.cjs.entry.js +15 -10
- package/lib/cjs/duet-combobox.cjs.entry.js +20 -15
- package/lib/cjs/duet-contact-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +2 -2
- package/lib/cjs/duet-date-picker.cjs.entry.js +6 -6
- package/lib/cjs/duet-divider_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +11 -8
- package/lib/cjs/duet-empty-state.cjs.entry.js +2 -2
- package/lib/cjs/duet-fieldset.cjs.entry.js +3 -3
- package/lib/cjs/duet-file-chooser.cjs.entry.js +2 -2
- package/lib/cjs/duet-footer.cjs.entry.js +5 -5
- package/lib/cjs/duet-grid_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-header_2.cjs.entry.js +8 -8
- package/lib/cjs/duet-hero.cjs.entry.js +18 -17
- package/lib/cjs/duet-icon.cjs.entry.js +4 -4
- package/lib/cjs/duet-indicator.cjs.entry.js +3 -3
- package/lib/cjs/duet-input_2.cjs.entry.js +32 -8
- package/lib/cjs/duet-layout.cjs.entry.js +2 -2
- package/lib/cjs/duet-list_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +2 -2
- package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +2 -2
- package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +2 -2
- package/lib/cjs/duet-menu-bar-item.cjs.entry.js +6 -6
- package/lib/cjs/duet-menu-bar-link.cjs.entry.js +2 -2
- package/lib/cjs/duet-menu-bar.cjs.entry.js +3 -3
- package/lib/cjs/duet-modal.cjs.entry.js +8 -8
- package/lib/cjs/duet-multiselect.cjs.entry.js +5 -5
- package/lib/cjs/duet-nav.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-number-input.cjs.entry.js +16 -12
- package/lib/cjs/duet-overlay.cjs.entry.js +2 -2
- package/lib/cjs/duet-page-heading.cjs.entry.js +2 -2
- package/lib/cjs/duet-pagination_2.cjs.entry.js +5 -5
- package/lib/cjs/duet-panel.cjs.entry.js +5 -6
- package/lib/cjs/duet-phone-input.cjs.entry.js +7 -7
- package/lib/cjs/duet-popup-menu_2.cjs.entry.js +14 -16
- package/lib/cjs/duet-progress.cjs.entry.js +3 -3
- package/lib/cjs/duet-promo-card.cjs.entry.js +6 -6
- package/lib/cjs/duet-radio_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-range-slider.cjs.entry.js +4 -4
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +31 -12
- package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +5 -8
- package/lib/cjs/duet-shaped-image.cjs.entry.js +2 -2
- package/lib/cjs/duet-share-chart-item.cjs.entry.js +1 -1
- package/lib/cjs/duet-share-chart.cjs.entry.js +6 -6
- package/lib/cjs/duet-show-more.cjs.entry.js +3 -3
- 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 +2 -2
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +7 -7
- package/lib/cjs/duet-slideout.cjs.entry.js +15 -15
- package/lib/cjs/duet-status-icon.cjs.entry.js +2 -2
- package/lib/cjs/duet-step_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +2 -2
- package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +3 -3
- package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +6 -6
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +2 -2
- package/lib/cjs/duet-submenu-bar.cjs.entry.js +3 -3
- package/lib/cjs/duet-textarea.cjs.entry.js +48 -29
- package/lib/cjs/duet-toggle.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +2 -2
- package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar-item.cjs.entry.js +6 -6
- package/lib/cjs/duet-toolbar-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar.cjs.entry.js +2 -2
- package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-tooltip.cjs.entry.js +4 -4
- package/lib/cjs/duet-tray.cjs.entry.js +4 -4
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-item.cjs.entry.js +4 -4
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +3 -3
- package/lib/cjs/{errorcodes.utils-7e221216.js → errorcodes.utils-081cbf12.js} +1 -1
- package/lib/cjs/{focus-utils-6d8d093e.js → focus-utils-30936141.js} +1 -1
- package/lib/cjs/{index-1044eab0.js → index-3e2cb13d.js} +1 -1
- package/lib/cjs/{language-utils-b3314f13.js → language-utils-577f9daf.js} +1 -1
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{slot-utils-0ce4686e.js → slot-utils-1e7a8d85.js} +1 -1
- package/lib/cjs/{themeable-component-3f7d616d.js → themeable-component-32848c09.js} +1 -1
- package/lib/cjs/{token-utils-955dd258.js → token-utils-3cc1c517.js} +1 -1
- package/lib/cjs/{tokens-bdaa8818.js → tokens-62c31e5d.js} +3 -3
- package/lib/cjs/{tokens.module-2358195b.js → tokens.module-db9df617.js} +3 -3
- package/lib/collection/common-strings.js +5 -4
- package/lib/collection/components/duet-alert/duet-alert.css +15 -6
- package/lib/collection/components/duet-alert/duet-alert.js +9 -6
- package/lib/collection/components/duet-badge/duet-badge.css +1 -1
- package/lib/collection/components/duet-banner/duet-banner.css +2 -1
- package/lib/collection/components/duet-button/duet-button.css +11 -7
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-chip/duet-chip.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.css +66 -4
- package/lib/collection/components/duet-choice/duet-choice.js +13 -6
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +1 -1
- package/lib/collection/components/duet-collapsible/duet-collapsible.css +1 -1
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +12 -7
- package/lib/collection/components/duet-combobox/duet-combobox.js +17 -11
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
- package/lib/collection/components/duet-hero/duet-hero.js +13 -12
- package/lib/collection/components/duet-input/duet-input.css +1 -1
- package/lib/collection/components/duet-input/duet-input.js +78 -5
- package/lib/collection/components/duet-link/duet-link.css +27 -13
- package/lib/collection/components/duet-link/duet-link.js +3 -3
- package/lib/collection/components/duet-list-item/duet-list-item.css +6 -6
- package/lib/collection/components/duet-logo/duet-logo.css +1 -1
- package/lib/collection/components/duet-multiselect/duet-multiselect.css +1 -1
- package/lib/collection/components/duet-number-input/duet-number-input.css +1 -1
- package/lib/collection/components/duet-number-input/duet-number-input.js +19 -15
- package/lib/collection/components/duet-panel/duet-panel.css +3 -2
- package/lib/collection/components/duet-panel/duet-panel.js +2 -3
- package/lib/collection/components/duet-phone-input/duet-phone-input.css +1 -1
- package/lib/collection/components/duet-phone-input/duet-phone-input.js +3 -3
- package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +20 -23
- package/lib/collection/components/duet-promo-card/duet-promo-card.css +1 -1
- package/lib/collection/components/duet-radio/duet-radio.css +2 -2
- package/lib/collection/components/duet-range-slider/duet-range-slider.css +1 -1
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +87 -6
- package/lib/collection/components/duet-select/duet-select.css +1 -1
- package/lib/collection/components/duet-select/duet-select.js +1 -4
- package/lib/collection/components/duet-slideout/duet-slideout.js +12 -12
- package/lib/collection/components/duet-table/duet-table.js +3 -3
- package/lib/collection/components/duet-textarea/duet-textarea.css +4 -1
- package/lib/collection/components/duet-textarea/duet-textarea.js +75 -29
- package/lib/collection/components/duet-toggle/duet-toggle.css +1 -1
- package/lib/collection/components/duet-toolbar-dropdown/duet-toolbar-dropdown.css +6 -0
- package/lib/collection/components/duet-toolbar-link/duet-toolbar-link.css +18 -0
- package/lib/collection/utils/a11y-utils.js +20 -0
- package/lib/dist-custom-elements/duet-action-button.js +1 -1
- package/lib/dist-custom-elements/duet-alert.js +1 -1
- package/lib/dist-custom-elements/duet-badge.js +1 -1
- package/lib/dist-custom-elements/duet-banner.js +5 -5
- package/lib/dist-custom-elements/duet-breadcrumb.js +3 -3
- package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
- package/lib/dist-custom-elements/duet-button.js +1 -1
- package/lib/dist-custom-elements/duet-callout.js +2 -2
- package/lib/dist-custom-elements/duet-caption.js +1 -1
- package/lib/dist-custom-elements/duet-card.js +4 -4
- 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 +9 -9
- package/lib/dist-custom-elements/duet-choice.js +9 -8
- package/lib/dist-custom-elements/duet-collapsible.js +17 -12
- package/lib/dist-custom-elements/duet-combobox.js +32 -26
- package/lib/dist-custom-elements/duet-contact-card.js +8 -8
- package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
- package/lib/dist-custom-elements/duet-date-picker.js +14 -14
- 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 +2 -2
- package/lib/dist-custom-elements/duet-footer.js +8 -8
- 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 +11 -11
- package/lib/dist-custom-elements/duet-heading.js +1 -1
- package/lib/dist-custom-elements/duet-hero.js +23 -22
- package/lib/dist-custom-elements/duet-icon.js +1 -1
- package/lib/dist-custom-elements/duet-indicator.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 +1 -1
- 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 +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-item.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar.js +2 -2
- package/lib/dist-custom-elements/duet-modal.js +10 -10
- package/lib/dist-custom-elements/duet-multiselect.js +10 -10
- package/lib/dist-custom-elements/duet-nav.js +1 -1
- package/lib/dist-custom-elements/duet-notification-drawer.js +6 -6
- package/lib/dist-custom-elements/duet-notification.js +3 -3
- package/lib/dist-custom-elements/duet-number-input.js +23 -19
- package/lib/dist-custom-elements/duet-overlay.js +1 -1
- package/lib/dist-custom-elements/duet-page-heading.js +3 -3
- package/lib/dist-custom-elements/duet-pagination.js +14 -14
- package/lib/dist-custom-elements/duet-panel.js +4 -5
- package/lib/dist-custom-elements/duet-paragraph.js +1 -1
- package/lib/dist-custom-elements/duet-phone-input.js +20 -20
- 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 +2 -2
- package/lib/dist-custom-elements/duet-range-slider.js +4 -4
- package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
- package/lib/dist-custom-elements/duet-scrollable.js +1 -1
- package/lib/dist-custom-elements/duet-section-layout.js +1 -1
- package/lib/dist-custom-elements/duet-select.js +1 -1
- package/lib/dist-custom-elements/duet-shaped-image.js +1 -1
- package/lib/dist-custom-elements/duet-share-chart-item.js +1 -1
- package/lib/dist-custom-elements/duet-share-chart.js +3 -3
- package/lib/dist-custom-elements/duet-show-more.js +1 -1
- package/lib/dist-custom-elements/duet-slideout-lang.js +2 -2
- package/lib/dist-custom-elements/duet-slideout-link.js +4 -4
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-slideout-panel.js +5 -5
- package/lib/dist-custom-elements/duet-slideout.js +12 -12
- 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 -1
- 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 +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +3 -3
- package/lib/dist-custom-elements/duet-submenu-bar-item.js +4 -4
- package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar.js +4 -4
- package/lib/dist-custom-elements/duet-tab-group.js +8 -8
- package/lib/dist-custom-elements/duet-tab.js +2 -2
- package/lib/dist-custom-elements/duet-table.js +1 -1
- package/lib/dist-custom-elements/duet-textarea.js +59 -36
- package/lib/dist-custom-elements/duet-toggle.js +3 -3
- package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-dropdown.js +3 -3
- package/lib/dist-custom-elements/duet-toolbar-item.js +6 -6
- package/lib/dist-custom-elements/duet-toolbar-link.js +3 -3
- package/lib/dist-custom-elements/duet-toolbar.js +1 -1
- 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 +4 -4
- 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 +20 -20
- 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-6b642a0f.js → p-04819623.js} +2 -2
- package/lib/dist-custom-elements/{p-822a3658.js → p-05128e11.js} +18 -15
- package/lib/dist-custom-elements/{p-e3318f50.js → p-06deb63a.js} +3 -3
- package/lib/dist-custom-elements/{p-36daddcc.js → p-0af6662f.js} +10 -13
- package/lib/dist-custom-elements/p-0d607aa5.js +43 -0
- package/lib/dist-custom-elements/{p-ed52e0d3.js → p-0dca88bc.js} +2 -2
- package/lib/dist-custom-elements/{p-0b65a85b.js → p-13d994c2.js} +40 -13
- package/lib/dist-custom-elements/{p-f407268e.js → p-1a349415.js} +5 -5
- package/lib/dist-custom-elements/{p-caaa84e9.js → p-20af19f0.js} +2 -2
- package/lib/dist-custom-elements/{p-b7a93f1c.js → p-2fc2a0b6.js} +5 -4
- package/lib/dist-custom-elements/{p-67617261.js → p-32b35eb2.js} +4 -4
- package/lib/dist-custom-elements/{p-a5acdbd1.js → p-3b89d7ab.js} +8 -5
- package/lib/dist-custom-elements/{p-27b0790d.js → p-46206871.js} +1 -1
- package/lib/dist-custom-elements/{p-738df69f.js → p-509dca55.js} +1 -1
- package/lib/dist-custom-elements/{p-71176ae5.js → p-515dedd9.js} +2 -2
- package/lib/dist-custom-elements/{p-59668efb.js → p-575b998e.js} +2 -2
- package/lib/dist-custom-elements/{p-1f32b9fd.js → p-5957bf62.js} +3 -3
- package/lib/dist-custom-elements/{p-370b0653.js → p-5a5372db.js} +1 -1
- package/lib/dist-custom-elements/{p-6ca748e5.js → p-659b46dc.js} +2 -2
- package/lib/dist-custom-elements/{p-bebe4e35.js → p-6d3db687.js} +1 -1
- package/lib/dist-custom-elements/{p-b3c2ecbc.js → p-721934fb.js} +2 -2
- package/lib/dist-custom-elements/{p-c972a96e.js → p-7ac368f3.js} +3 -3
- package/lib/dist-custom-elements/{p-de31461b.js → p-7f5a8d4f.js} +10 -10
- package/lib/dist-custom-elements/p-7fae118b.js +318 -0
- package/lib/dist-custom-elements/{p-586d4e77.js → p-856877ce.js} +1 -1
- package/lib/dist-custom-elements/{p-c224f527.js → p-856c21c2.js} +1 -1
- package/lib/dist-custom-elements/{p-c936343b.js → p-87838af5.js} +3 -3
- package/lib/dist-custom-elements/{p-388d3f27.js → p-92614803.js} +2 -2
- package/lib/dist-custom-elements/{p-e14bb6cb.js → p-94bcb496.js} +2 -2
- package/lib/dist-custom-elements/{p-0c92061d.js → p-9c152299.js} +2 -2
- package/lib/dist-custom-elements/{p-58dd40d8.js → p-9cc4be6b.js} +1 -1
- package/lib/dist-custom-elements/{p-0ba28ed9.js → p-9ff3d312.js} +4 -4
- package/lib/dist-custom-elements/{p-6e61da36.js → p-a2165a78.js} +2 -2
- package/lib/dist-custom-elements/p-a9d05a66.js +58 -0
- package/lib/dist-custom-elements/{p-a10e2105.js → p-af66a878.js} +2 -2
- package/lib/dist-custom-elements/{p-6bde0f88.js → p-b1dab6b7.js} +1 -1
- package/lib/dist-custom-elements/{p-4e7c6547.js → p-b5757906.js} +3 -3
- package/lib/dist-custom-elements/{p-d62457b3.js → p-b9dfe8fb.js} +2 -2
- package/lib/dist-custom-elements/{p-6611bb3c.js → p-c00e6485.js} +34 -12
- package/lib/dist-custom-elements/{p-da422056.js → p-c9b0406e.js} +2 -2
- package/lib/dist-custom-elements/{p-318f7157.js → p-cd6aad6d.js} +9 -9
- package/lib/dist-custom-elements/{p-9ee646c7.js → p-d2461d13.js} +1 -1
- package/lib/dist-custom-elements/{p-4d81562b.js → p-e8f9e11c.js} +6 -6
- package/lib/dist-custom-elements/{p-73cfbf89.js → p-f6889d60.js} +3 -3
- package/lib/dist-custom-elements/{p-bc5d9435.js → p-fc39349f.js} +21 -24
- package/lib/dist-custom-elements/{p-6cc7b04f.js → p-ffd3c3bf.js} +1 -1
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-801de8a1.js → p-0117fffd.js} +1 -1
- package/lib/duet/p-0196e419.system.entry.js +4 -0
- package/lib/duet/{p-fe1ac373.entry.js → p-01bfa80a.entry.js} +1 -1
- package/lib/duet/{p-20da5e5e.entry.js → p-01c4784d.entry.js} +1 -1
- package/lib/duet/{p-62065bae.entry.js → p-021aad93.entry.js} +1 -1
- package/lib/duet/{p-568074aa.system.entry.js → p-02b0b46e.system.entry.js} +1 -1
- package/lib/duet/{p-f1cd0117.entry.js → p-08a6fe81.entry.js} +1 -1
- package/lib/duet/p-08bafedd.entry.js +4 -0
- package/lib/duet/{p-5173ee52.system.entry.js → p-0a04f223.system.entry.js} +1 -1
- package/lib/duet/{p-d9a48ce2.system.entry.js → p-0a55a31e.system.entry.js} +1 -1
- package/lib/duet/{p-42fc2f19.entry.js → p-0a5bad04.entry.js} +1 -1
- package/lib/duet/{p-0353b07b.entry.js → p-0b393b45.entry.js} +1 -1
- package/lib/duet/{p-5b3f7cac.system.entry.js → p-0b4d95a3.system.entry.js} +1 -1
- package/lib/duet/{p-4f10a6a2.entry.js → p-0d93d5d6.entry.js} +1 -1
- package/lib/duet/{p-975a3215.system.entry.js → p-0dd9cb8f.system.entry.js} +1 -1
- package/lib/duet/{p-f051365a.system.entry.js → p-0ea89bc3.system.entry.js} +1 -1
- package/lib/duet/{p-f67270bc.entry.js → p-108a8449.entry.js} +1 -1
- package/lib/duet/{p-14ac8312.entry.js → p-11484af4.entry.js} +1 -1
- package/lib/duet/{p-cbe272ff.system.entry.js → p-1188bd88.system.entry.js} +1 -1
- package/lib/duet/p-1255ca3c.entry.js +4 -0
- package/lib/duet/{p-96c0a423.system.entry.js → p-147036df.system.entry.js} +2 -2
- package/lib/duet/p-1640e9ef.system.entry.js +4 -0
- package/lib/duet/p-171fef9f.entry.js +4 -0
- package/lib/duet/{p-22b9e7b9.system.js → p-17b4723d.system.js} +1 -1
- package/lib/duet/{p-6b3b79fe.system.entry.js → p-1c7c636b.system.entry.js} +1 -1
- package/lib/duet/{p-343ed54b.system.entry.js → p-1ca77377.system.entry.js} +1 -1
- package/lib/duet/{p-da0d4e53.system.entry.js → p-1e748fe7.system.entry.js} +1 -1
- package/lib/duet/{p-a8e575f2.entry.js → p-1fc499eb.entry.js} +1 -1
- package/lib/duet/{p-22a0d711.entry.js → p-2072e2e3.entry.js} +1 -1
- package/lib/duet/p-218f197d.entry.js +4 -0
- package/lib/duet/{p-654d2c52.entry.js → p-295d819b.entry.js} +1 -1
- package/lib/duet/{p-3c009b49.entry.js → p-29620cb8.entry.js} +1 -1
- package/lib/duet/{p-e6f0be75.entry.js → p-2bbce6ff.entry.js} +1 -1
- package/lib/duet/{p-5e747ef8.system.entry.js → p-2d09e690.system.entry.js} +1 -1
- package/lib/duet/p-2dad2417.system.entry.js +4 -0
- package/lib/duet/{p-b8789b13.system.entry.js → p-2ed33090.system.entry.js} +1 -1
- package/lib/duet/{p-c311a973.entry.js → p-2f4670b2.entry.js} +1 -1
- package/lib/duet/p-2f938e05.js +4 -0
- package/lib/duet/{p-d838a9ab.system.entry.js → p-32672a70.system.entry.js} +1 -1
- package/lib/duet/{p-ef3c6cfe.system.entry.js → p-32c11792.system.entry.js} +1 -1
- package/lib/duet/{p-04608f57.system.entry.js → p-34679792.system.entry.js} +1 -1
- package/lib/duet/p-3639064f.entry.js +4 -0
- package/lib/duet/{p-30528008.system.entry.js → p-364bf8a5.system.entry.js} +1 -1
- package/lib/duet/p-3682e272.entry.js +4 -0
- package/lib/duet/{p-3164c809.system.entry.js → p-3707f843.system.entry.js} +1 -1
- package/lib/duet/{p-e4695812.entry.js → p-37558e94.entry.js} +1 -1
- package/lib/duet/p-37a2bf8f.system.entry.js +4 -0
- package/lib/duet/p-38209530.system.entry.js +4 -0
- package/lib/duet/{p-d0799d89.entry.js → p-3aa1dda7.entry.js} +1 -1
- package/lib/duet/{p-f0a6103e.js → p-3aa7b734.js} +1 -1
- package/lib/duet/p-3ae93bdc.entry.js +4 -0
- package/lib/duet/{p-0834979e.entry.js → p-3e04b125.entry.js} +1 -1
- package/lib/duet/{p-31dc3df9.entry.js → p-3f51641e.entry.js} +1 -1
- package/lib/duet/p-430e0441.entry.js +4 -0
- package/lib/duet/p-442b1388.system.entry.js +4 -0
- package/lib/duet/p-453db857.system.js +4 -0
- package/lib/duet/{p-f8a583d7.system.entry.js → p-47ae2ce5.system.entry.js} +1 -1
- package/lib/duet/{p-94421fff.entry.js → p-488d5317.entry.js} +1 -1
- package/lib/duet/p-4b688090.js +4 -0
- package/lib/duet/{p-8e150d9e.entry.js → p-4c3e8006.entry.js} +1 -1
- package/lib/duet/p-4cfffc05.system.js +4 -0
- package/lib/duet/{p-370d2601.system.entry.js → p-4d3b8094.system.entry.js} +1 -1
- package/lib/duet/p-4d584eba.entry.js +4 -0
- package/lib/duet/{p-fa878282.entry.js → p-5075f682.entry.js} +1 -1
- package/lib/duet/{p-cd94ea4d.entry.js → p-528f9e22.entry.js} +1 -1
- package/lib/duet/{p-0dda51a5.system.entry.js → p-5298d270.system.entry.js} +1 -1
- package/lib/duet/{p-9fe69b29.js → p-56def387.js} +1 -1
- package/lib/duet/p-57e55fe5.system.entry.js +4 -0
- package/lib/duet/{p-2a2a7f85.js → p-59cee476.js} +1 -1
- package/lib/duet/{p-d51bbbc5.entry.js → p-5b094a81.entry.js} +1 -1
- package/lib/duet/{p-52ea64b7.entry.js → p-5b7b0c49.entry.js} +1 -1
- package/lib/duet/{p-5bdebddc.system.entry.js → p-5d078192.system.entry.js} +1 -1
- package/lib/duet/p-620790ec.entry.js +4 -0
- package/lib/duet/{p-3b2e4c1d.js → p-6251429e.js} +1 -1
- package/lib/duet/{p-8f38dd1f.entry.js → p-62d45619.entry.js} +1 -1
- package/lib/duet/{p-087cfec4.system.entry.js → p-646fb027.system.entry.js} +1 -1
- package/lib/duet/p-64714348.system.entry.js +4 -0
- package/lib/duet/{p-454d2e52.entry.js → p-67150100.entry.js} +1 -1
- package/lib/duet/{p-1f5071fd.system.js → p-6746f86c.system.js} +1 -1
- package/lib/duet/{p-0932bf00.system.entry.js → p-68b94462.system.entry.js} +1 -1
- package/lib/duet/{p-3fbd1e41.entry.js → p-693c2594.entry.js} +1 -1
- package/lib/duet/{p-e42f6025.system.entry.js → p-69a0ce45.system.entry.js} +1 -1
- package/lib/duet/{p-0eff2032.system.entry.js → p-6f677d93.system.entry.js} +1 -1
- package/lib/duet/{p-5f1353eb.system.entry.js → p-6fe0a923.system.entry.js} +1 -1
- package/lib/duet/{p-1a8ef4df.system.entry.js → p-7013d95e.system.entry.js} +1 -1
- package/lib/duet/{p-e4819f63.entry.js → p-71be2ee6.entry.js} +1 -1
- package/lib/duet/{p-083738b6.system.js → p-7231eb9d.system.js} +1 -1
- package/lib/duet/{p-614797cd.system.entry.js → p-742e23f2.system.entry.js} +1 -1
- package/lib/duet/p-743372d1.system.entry.js +4 -0
- package/lib/duet/{p-6ec70ae7.system.entry.js → p-74a10d90.system.entry.js} +1 -1
- package/lib/duet/{p-4af8fdc9.entry.js → p-765ce7e2.entry.js} +1 -1
- package/lib/duet/{p-67acb8a1.entry.js → p-76f86b9a.entry.js} +1 -1
- package/lib/duet/{p-1122796e.entry.js → p-77b52060.entry.js} +1 -1
- package/lib/duet/{p-074c91c7.entry.js → p-7948f709.entry.js} +1 -1
- package/lib/duet/p-7ac368f3.js +4 -0
- package/lib/duet/{p-31492c23.system.entry.js → p-7d56359b.system.entry.js} +1 -1
- package/lib/duet/p-81dc0c8c.system.js +4 -0
- package/lib/duet/{p-87633fff.system.js → p-83cfc05d.system.js} +1 -1
- package/lib/duet/{p-7a9b2555.system.entry.js → p-850c54b0.system.entry.js} +1 -1
- package/lib/duet/p-88c60955.entry.js +4 -0
- package/lib/duet/p-8a10a26e.entry.js +4 -0
- package/lib/duet/{p-9718c106.js → p-8b34b6a1.js} +1 -1
- package/lib/duet/{p-544af526.entry.js → p-8cb64ea1.entry.js} +1 -1
- package/lib/duet/{p-1853a8d1.system.entry.js → p-8ccbbbc7.system.entry.js} +1 -1
- package/lib/duet/{p-a081ba40.system.entry.js → p-8d28efb9.system.entry.js} +1 -1
- package/lib/duet/{p-f8ca9352.entry.js → p-8e21ea72.entry.js} +1 -1
- package/lib/duet/{p-9f79df76.system.entry.js → p-8e6085d1.system.entry.js} +1 -1
- package/lib/duet/{p-ab5a725f.system.entry.js → p-8f7fcfb5.system.entry.js} +1 -1
- package/lib/duet/p-8fe2a9bf.entry.js +4 -0
- package/lib/duet/p-8fe65a80.system.entry.js +4 -0
- package/lib/duet/{p-3f85b6e1.system.entry.js → p-90157004.system.entry.js} +1 -1
- package/lib/duet/p-90fcd0a4.system.entry.js +4 -0
- package/lib/duet/{p-522ea2bc.system.entry.js → p-9220dbb1.system.entry.js} +1 -1
- package/lib/duet/{p-912d1e35.entry.js → p-9277533c.entry.js} +1 -1
- package/lib/duet/{p-b259aa2e.entry.js → p-94341565.entry.js} +1 -1
- package/lib/duet/{p-f744061c.system.entry.js → p-9453fcb3.system.entry.js} +1 -1
- package/lib/duet/{p-10190357.entry.js → p-97d956fb.entry.js} +1 -1
- package/lib/duet/{p-a723ed36.entry.js → p-9bfd9d0e.entry.js} +1 -1
- package/lib/duet/p-9f3b0efe.entry.js +4 -0
- package/lib/duet/{p-396f0210.system.entry.js → p-9f6855fa.system.entry.js} +1 -1
- package/lib/duet/{p-9309d30f.system.entry.js → p-a2173e10.system.entry.js} +2 -2
- package/lib/duet/p-a44268b2.system.entry.js +4 -0
- package/lib/duet/{p-8fe4c3f3.entry.js → p-a579ae4d.entry.js} +1 -1
- package/lib/duet/{p-9d6c1403.system.js → p-a71f0bcb.system.js} +1 -1
- package/lib/duet/{p-f428124a.entry.js → p-a744d677.entry.js} +1 -1
- package/lib/duet/{p-de665458.entry.js → p-a9d0200d.entry.js} +1 -1
- package/lib/duet/p-ab79bc5b.system.entry.js +4 -0
- package/lib/duet/{p-a44bb8ed.system.entry.js → p-ae03cb6d.system.entry.js} +1 -1
- package/lib/duet/{p-ae0f818b.entry.js → p-ae220bba.entry.js} +1 -1
- package/lib/duet/p-af9c927e.system.entry.js +4 -0
- package/lib/duet/p-b0af0dbc.js +4 -0
- package/lib/duet/{p-d647ee04.system.entry.js → p-b0b59b81.system.entry.js} +1 -1
- package/lib/duet/p-b1e60f97.system.js +4 -0
- package/lib/duet/p-b52a7760.entry.js +4 -0
- package/lib/duet/p-b9aec534.js +4 -0
- package/lib/duet/{p-0db56130.system.js → p-bb332c66.system.js} +1 -1
- package/lib/duet/{p-47853cbb.entry.js → p-bb8ae835.entry.js} +1 -1
- package/lib/duet/{p-d40c555f.system.entry.js → p-bd56c1a2.system.entry.js} +1 -1
- package/lib/duet/p-c2040676.entry.js +4 -0
- package/lib/duet/p-c33b42c3.entry.js +4 -0
- package/lib/duet/p-c38c24d6.entry.js +4 -0
- package/lib/duet/{p-6a74bdc7.entry.js → p-c3c20651.entry.js} +1 -1
- package/lib/duet/{p-33c2b5bc.system.entry.js → p-c3dc699e.system.entry.js} +1 -1
- package/lib/duet/p-c4b5fabf.system.entry.js +4 -0
- package/lib/duet/p-c5415db0.system.entry.js +4 -0
- package/lib/duet/{p-696e260a.system.entry.js → p-c6e2ee1a.system.entry.js} +1 -1
- package/lib/duet/{p-8f63f345.entry.js → p-c754edc5.entry.js} +1 -1
- package/lib/duet/{p-e59c5a32.system.js → p-c801dc04.system.js} +1 -1
- package/lib/duet/{p-e7ee0ec6.entry.js → p-c842f2d4.entry.js} +1 -1
- package/lib/duet/{p-dbe544da.system.entry.js → p-c908691b.system.entry.js} +1 -1
- package/lib/duet/{p-3ebd766d.entry.js → p-c9d80470.entry.js} +1 -1
- package/lib/duet/{p-df475aba.entry.js → p-cb31529a.entry.js} +1 -1
- package/lib/duet/p-cb9b90ca.system.entry.js +4 -0
- package/lib/duet/{p-9b7e8ab5.system.entry.js → p-cd2b9ea5.system.entry.js} +1 -1
- package/lib/duet/{p-78fd95ce.system.entry.js → p-cda010aa.system.entry.js} +1 -1
- package/lib/duet/{p-dc52f8b3.entry.js → p-ce1092fb.entry.js} +1 -1
- package/lib/duet/{p-567e98c3.system.entry.js → p-ceb72dbf.system.entry.js} +1 -1
- package/lib/duet/p-cec33ac2.entry.js +4 -0
- package/lib/duet/{p-db94518e.entry.js → p-ceef0aa6.entry.js} +1 -1
- package/lib/duet/p-cf597b70.js +4 -0
- package/lib/duet/{p-73c92818.system.entry.js → p-cf7c7b31.system.entry.js} +2 -2
- package/lib/duet/{p-ebb705ea.entry.js → p-d049d71c.entry.js} +1 -1
- package/lib/duet/{p-c45a6eb5.entry.js → p-d1b57119.entry.js} +1 -1
- package/lib/duet/{p-74a07533.system.entry.js → p-d2bbf06d.system.entry.js} +1 -1
- package/lib/duet/{p-27e23edc.system.entry.js → p-d402bc88.system.entry.js} +1 -1
- package/lib/duet/p-d8c928d7.system.entry.js +4 -0
- package/lib/duet/p-da78c7c2.system.entry.js +4 -0
- package/lib/duet/{p-ff1d5ca4.system.entry.js → p-db051207.system.entry.js} +1 -1
- package/lib/duet/{p-c6b3efe7.system.entry.js → p-dbd06bd8.system.entry.js} +1 -1
- package/lib/duet/p-dcfc4c0f.system.entry.js +4 -0
- package/lib/duet/{p-ba9b82ac.entry.js → p-deb9517b.entry.js} +1 -1
- package/lib/duet/{p-7a2bb47e.system.entry.js → p-df506bc2.system.entry.js} +1 -1
- package/lib/duet/{p-5a366583.entry.js → p-e06917a1.entry.js} +1 -1
- package/lib/duet/p-e124a98d.system.entry.js +4 -0
- package/lib/duet/{p-0738c052.system.entry.js → p-e32bf9f7.system.entry.js} +1 -1
- package/lib/duet/{p-d5fca58a.entry.js → p-e57b46d9.entry.js} +1 -1
- package/lib/duet/{p-b2121bec.entry.js → p-e5e9d602.entry.js} +1 -1
- package/lib/duet/p-e68bc090.system.entry.js +4 -0
- package/lib/duet/p-e6ea7449.entry.js +4 -0
- package/lib/duet/p-ed178fc9.system.entry.js +4 -0
- package/lib/duet/{p-5d338cf8.entry.js → p-ed7e4450.entry.js} +1 -1
- package/lib/duet/{p-858e5593.entry.js → p-edb2b160.entry.js} +1 -1
- package/lib/duet/{p-3a134c72.entry.js → p-ef15807a.entry.js} +1 -1
- package/lib/duet/{p-f8a8bf99.system.entry.js → p-f0ae8c0f.system.entry.js} +2 -2
- package/lib/duet/p-f3098989.entry.js +4 -0
- package/lib/duet/p-f37dae2f.system.entry.js +4 -0
- package/lib/duet/{p-8e1def15.system.js → p-f392387c.system.js} +1 -1
- package/lib/duet/{p-fc8f1bed.system.entry.js → p-f3f34fe0.system.entry.js} +1 -1
- package/lib/duet/p-f4939b4a.system.entry.js +4 -0
- package/lib/duet/{p-b786f573.entry.js → p-f49c6050.entry.js} +1 -1
- package/lib/duet/{p-43bbba35.system.js → p-f6e20b20.system.js} +1 -1
- package/lib/duet/p-f8bfbd2d.entry.js +4 -0
- package/lib/duet/p-f8c7cc95.entry.js +4 -0
- package/lib/duet/{p-94f50cf0.system.entry.js → p-fa06e91a.system.entry.js} +1 -1
- package/lib/duet/{p-ff5f3e09.system.entry.js → p-fe0a02b8.system.entry.js} +1 -1
- package/lib/duet/{p-3c312b08.entry.js → p-fe5a2b41.entry.js} +1 -1
- package/lib/duet/{p-457b0314.entry.js → p-fedc902d.entry.js} +1 -1
- package/lib/esm/a11y-utils-04e1285d.js +43 -0
- package/lib/esm/{app-globals-143619f5.js → app-globals-1de03b2e.js} +1 -1
- package/lib/esm/{common-strings-1274857d.js → common-strings-5f78fe4e.js} +5 -4
- package/lib/esm/duet-action-button.entry.js +5 -5
- package/lib/esm/duet-alert.entry.js +15 -12
- package/lib/esm/duet-badge.entry.js +5 -5
- package/lib/esm/duet-banner.entry.js +6 -6
- package/lib/esm/duet-breadcrumb.entry.js +2 -2
- package/lib/esm/duet-breadcrumbs.entry.js +5 -5
- package/lib/esm/duet-button_2.entry.js +7 -7
- package/lib/esm/duet-callout.entry.js +3 -3
- package/lib/esm/duet-caption_4.entry.js +12 -12
- package/lib/esm/duet-card.entry.js +5 -5
- package/lib/esm/duet-checkbox.entry.js +3 -3
- package/lib/esm/duet-checkmark.entry.js +2 -2
- package/lib/esm/duet-chip.entry.js +4 -4
- package/lib/esm/duet-choice_2.entry.js +9 -8
- package/lib/esm/duet-collapsible.entry.js +15 -10
- package/lib/esm/duet-combobox.entry.js +20 -15
- package/lib/esm/duet-contact-card.entry.js +3 -3
- package/lib/esm/duet-cookie-consent.entry.js +2 -2
- package/lib/esm/duet-date-picker.entry.js +6 -6
- package/lib/esm/duet-divider_2.entry.js +4 -4
- package/lib/esm/duet-editable-table_3.entry.js +11 -8
- package/lib/esm/duet-empty-state.entry.js +2 -2
- package/lib/esm/duet-fieldset.entry.js +3 -3
- package/lib/esm/duet-file-chooser.entry.js +2 -2
- package/lib/esm/duet-footer.entry.js +5 -5
- package/lib/esm/duet-grid_2.entry.js +2 -2
- package/lib/esm/duet-header_2.entry.js +8 -8
- package/lib/esm/duet-hero.entry.js +18 -17
- package/lib/esm/duet-icon.entry.js +4 -4
- package/lib/esm/duet-indicator.entry.js +3 -3
- package/lib/esm/duet-input_2.entry.js +32 -8
- package/lib/esm/duet-layout.entry.js +2 -2
- package/lib/esm/duet-list_2.entry.js +3 -3
- package/lib/esm/duet-menu-bar-button.entry.js +2 -2
- package/lib/esm/duet-menu-bar-dropdown-link.entry.js +2 -2
- package/lib/esm/duet-menu-bar-dropdown.entry.js +2 -2
- package/lib/esm/duet-menu-bar-item.entry.js +6 -6
- package/lib/esm/duet-menu-bar-link.entry.js +2 -2
- package/lib/esm/duet-menu-bar.entry.js +3 -3
- package/lib/esm/duet-modal.entry.js +8 -8
- package/lib/esm/duet-multiselect.entry.js +5 -5
- package/lib/esm/duet-nav.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +4 -4
- package/lib/esm/duet-number-input.entry.js +16 -12
- package/lib/esm/duet-overlay.entry.js +2 -2
- package/lib/esm/duet-page-heading.entry.js +2 -2
- package/lib/esm/duet-pagination_2.entry.js +5 -5
- package/lib/esm/duet-panel.entry.js +5 -6
- package/lib/esm/duet-phone-input.entry.js +7 -7
- package/lib/esm/duet-popup-menu_2.entry.js +14 -16
- package/lib/esm/duet-progress.entry.js +3 -3
- package/lib/esm/duet-promo-card.entry.js +6 -6
- package/lib/esm/duet-radio_2.entry.js +4 -4
- package/lib/esm/duet-range-slider.entry.js +4 -4
- package/lib/esm/duet-scrollable_3.entry.js +31 -12
- package/lib/esm/duet-section-layout.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +5 -8
- package/lib/esm/duet-shaped-image.entry.js +2 -2
- package/lib/esm/duet-share-chart-item.entry.js +1 -1
- package/lib/esm/duet-share-chart.entry.js +6 -6
- package/lib/esm/duet-show-more.entry.js +3 -3
- 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 +2 -2
- package/lib/esm/duet-slideout-panel.entry.js +7 -7
- package/lib/esm/duet-slideout.entry.js +15 -15
- package/lib/esm/duet-status-icon.entry.js +2 -2
- package/lib/esm/duet-step_2.entry.js +4 -4
- package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +2 -2
- package/lib/esm/duet-submenu-bar-dropdown.entry.js +3 -3
- package/lib/esm/duet-submenu-bar-item.entry.js +6 -6
- package/lib/esm/duet-submenu-bar-link.entry.js +2 -2
- package/lib/esm/duet-submenu-bar.entry.js +3 -3
- package/lib/esm/duet-textarea.entry.js +48 -29
- package/lib/esm/duet-toggle.entry.js +3 -3
- package/lib/esm/duet-toolbar-dropdown-link.entry.js +2 -2
- package/lib/esm/duet-toolbar-dropdown.entry.js +3 -3
- package/lib/esm/duet-toolbar-item.entry.js +6 -6
- package/lib/esm/duet-toolbar-link.entry.js +3 -3
- package/lib/esm/duet-toolbar.entry.js +2 -2
- package/lib/esm/duet-tooltip-button_2.entry.js +3 -3
- package/lib/esm/duet-tooltip.entry.js +4 -4
- package/lib/esm/duet-tray.entry.js +4 -4
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-upload-item.entry.js +4 -4
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{errorcodes.utils-1e9af184.js → errorcodes.utils-e3c3fbe7.js} +1 -1
- package/lib/esm/{focus-utils-d80e0fff.js → focus-utils-8dcbe898.js} +1 -1
- package/lib/esm/{index-8edff080.js → index-e0645409.js} +1 -1
- package/lib/esm/{language-utils-da0a98a7.js → language-utils-5c6108e9.js} +1 -1
- package/lib/esm/loader.js +4 -4
- package/lib/esm/{slot-utils-86873bd2.js → slot-utils-0bb6f129.js} +1 -1
- package/lib/esm/{themeable-component-19d01405.js → themeable-component-f1c77a5d.js} +1 -1
- package/lib/esm/{token-utils-d02c20ff.js → token-utils-0d5e28a7.js} +1 -1
- package/lib/esm/{tokens-1fd83076.js → tokens-1702323a.js} +3 -3
- package/lib/esm/{tokens.module-7b07911f.js → tokens.module-7ae22e26.js} +3 -3
- package/lib/esm-es5/a11y-utils-04e1285d.js +4 -0
- package/lib/esm-es5/{app-globals-143619f5.js → app-globals-1de03b2e.js} +1 -1
- package/lib/esm-es5/{common-strings-1274857d.js → common-strings-5f78fe4e.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 +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-checkmark.entry.js +1 -1
- package/lib/esm-es5/duet-chip.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-contact-card.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-file-chooser.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-indicator.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 +2 -2
- package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +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 +1 -1
- 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 +1 -1
- package/lib/esm-es5/duet-panel.entry.js +1 -1
- package/lib/esm-es5/duet-phone-input.entry.js +1 -1
- package/lib/esm-es5/duet-popup-menu_2.entry.js +2 -2
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-promo-card.entry.js +2 -2
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-section-layout.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +2 -2
- package/lib/esm-es5/duet-shaped-image.entry.js +1 -1
- package/lib/esm-es5/duet-share-chart-item.entry.js +1 -1
- package/lib/esm-es5/duet-share-chart.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 +1 -1
- package/lib/esm-es5/duet-status-icon.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-item.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +2 -2
- package/lib/esm-es5/duet-toggle.entry.js +2 -2
- 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 +1 -1
- package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-upload-item.entry.js +2 -2
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{errorcodes.utils-1e9af184.js → errorcodes.utils-e3c3fbe7.js} +1 -1
- package/lib/esm-es5/{focus-utils-d80e0fff.js → focus-utils-8dcbe898.js} +1 -1
- package/lib/esm-es5/{index-8edff080.js → index-e0645409.js} +1 -1
- package/lib/esm-es5/{language-utils-da0a98a7.js → language-utils-5c6108e9.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{slot-utils-86873bd2.js → slot-utils-0bb6f129.js} +1 -1
- package/lib/esm-es5/{themeable-component-19d01405.js → themeable-component-f1c77a5d.js} +1 -1
- package/lib/esm-es5/{token-utils-d02c20ff.js → token-utils-0d5e28a7.js} +1 -1
- package/lib/esm-es5/tokens-1702323a.js +4 -0
- package/lib/esm-es5/tokens.module-7ae22e26.js +4 -0
- package/lib/types/components/duet-choice/duet-choice.d.ts +3 -3
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +1 -0
- package/lib/types/components/duet-combobox/duet-combobox.d.ts +1 -0
- package/lib/types/components/duet-input/duet-input.d.ts +12 -1
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +8 -6
- package/lib/types/components/duet-popup-menu/duet-popup-menu.d.ts +4 -4
- package/lib/types/components/duet-scrollable/duet-scrollable.d.ts +13 -0
- package/lib/types/components/duet-select/duet-select.d.ts +0 -1
- package/lib/types/components/duet-slideout/duet-slideout.d.ts +4 -4
- package/lib/types/components/duet-textarea/duet-textarea.d.ts +17 -7
- package/lib/types/components.d.ts +58 -27
- package/lib/types/utils/a11y-utils.d.ts +11 -0
- package/package.json +5 -5
- package/lib/cjs/a11y-utils-27715462.js +0 -25
- package/lib/dist-custom-elements/p-6b2617d7.js +0 -58
- package/lib/dist-custom-elements/p-e89676de.js +0 -318
- package/lib/dist-custom-elements/p-f8d1e874.js +0 -23
- package/lib/duet/p-00fdc8a5.entry.js +0 -4
- package/lib/duet/p-0407196d.system.entry.js +0 -4
- package/lib/duet/p-06317021.system.entry.js +0 -4
- package/lib/duet/p-0fb9f963.system.entry.js +0 -4
- package/lib/duet/p-0fd2949d.entry.js +0 -4
- package/lib/duet/p-117a0379.system.entry.js +0 -4
- package/lib/duet/p-1aabfaed.entry.js +0 -4
- package/lib/duet/p-23a14a5a.system.entry.js +0 -4
- package/lib/duet/p-24954951.js +0 -4
- package/lib/duet/p-2e209e01.system.entry.js +0 -4
- package/lib/duet/p-342c967e.system.entry.js +0 -4
- package/lib/duet/p-36678b00.entry.js +0 -4
- package/lib/duet/p-36f85144.entry.js +0 -4
- package/lib/duet/p-3815b0dd.system.entry.js +0 -4
- package/lib/duet/p-38fb1743.entry.js +0 -4
- package/lib/duet/p-3c8067bd.entry.js +0 -4
- package/lib/duet/p-403c3143.system.entry.js +0 -4
- package/lib/duet/p-44a37072.entry.js +0 -4
- package/lib/duet/p-451c3aab.system.entry.js +0 -4
- package/lib/duet/p-47387024.system.entry.js +0 -4
- package/lib/duet/p-4d6d92ad.system.entry.js +0 -4
- package/lib/duet/p-5162f6cd.entry.js +0 -4
- package/lib/duet/p-52a20f17.entry.js +0 -4
- package/lib/duet/p-542e6df7.system.entry.js +0 -4
- package/lib/duet/p-55bbe82e.system.entry.js +0 -4
- package/lib/duet/p-5a8d14bf.system.entry.js +0 -4
- package/lib/duet/p-5fc75c92.entry.js +0 -4
- package/lib/duet/p-64766118.js +0 -4
- package/lib/duet/p-6daf8a1b.js +0 -4
- package/lib/duet/p-799ca114.entry.js +0 -4
- package/lib/duet/p-8693fac0.system.entry.js +0 -4
- package/lib/duet/p-9148808e.entry.js +0 -4
- package/lib/duet/p-9461adf1.system.entry.js +0 -4
- package/lib/duet/p-987df55c.system.entry.js +0 -4
- package/lib/duet/p-9d8ac94e.entry.js +0 -4
- package/lib/duet/p-9d9457bf.js +0 -4
- package/lib/duet/p-9e34f749.system.entry.js +0 -4
- package/lib/duet/p-a4a80b80.system.entry.js +0 -4
- package/lib/duet/p-ac04269e.entry.js +0 -4
- package/lib/duet/p-ae0fd651.entry.js +0 -4
- package/lib/duet/p-b111d93d.system.entry.js +0 -4
- package/lib/duet/p-b70a5218.system.entry.js +0 -4
- package/lib/duet/p-b81ac5ae.system.js +0 -4
- package/lib/duet/p-b8688298.entry.js +0 -4
- package/lib/duet/p-bb6c5d9b.entry.js +0 -4
- package/lib/duet/p-c88bd45b.system.js +0 -4
- package/lib/duet/p-c972a96e.js +0 -4
- package/lib/duet/p-cc300171.system.entry.js +0 -4
- package/lib/duet/p-d0dbbd18.entry.js +0 -4
- package/lib/duet/p-d20c3b70.entry.js +0 -4
- package/lib/duet/p-d21f9230.system.js +0 -4
- package/lib/duet/p-db0ba7b6.system.js +0 -4
- package/lib/duet/p-e919fa07.entry.js +0 -4
- package/lib/duet/p-ebfbee15.system.entry.js +0 -4
- package/lib/duet/p-f856fc6d.system.entry.js +0 -4
- package/lib/duet/p-f9051bab.js +0 -4
- package/lib/duet/p-fc9aafe5.entry.js +0 -4
- package/lib/duet/p-fd34a664.entry.js +0 -4
- package/lib/esm/a11y-utils-35c2f182.js +0 -23
- package/lib/esm-es5/a11y-utils-35c2f182.js +0 -4
- package/lib/esm-es5/tokens-1fd83076.js +0 -4
- package/lib/esm-es5/tokens.module-7b07911f.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function r(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,s){function o(t){try{a(n.next(t))}catch(t){s(t)}}function u(t){try{a(n["throw"](t))}catch(t){s(t)}}function a(t){t.done?e(t.value):r(t.value).then(o,u)}a((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(i){return a([t,i])}}function a(u){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(e=0)),e)try{if(n=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){e.label=u[1];break}if(u[0]===6&&e.label<s[1]){e.label=s[1];s=u;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(u);break}if(s[2])e.ops.pop();e.trys.pop();continue}u=i.call(t,e)}catch(t){u=[6,t];r=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,i,e){if(e||arguments.length===2)for(var n=0,r=i.length,s;n<r;n++){if(s||!(n in i)){if(!s)s=Array.prototype.slice.call(i,0,n);s[n]=i[n]}}return t.concat(s||Array.prototype.slice.call(i))};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-8edff080.js";import{i as inheritGlobalTheme}from"./themeable-component-19d01405.js";import{c as createID}from"./create-id-149a1b6d.js";import{d as debounce}from"./js-utils-9b9e0039.js";import{j as isEnterKey,f as isEscapeKey,o as isTabKey,b as isArrowUpKey,c as isArrowDownKey}from"./keyboard-utils-daf80d44.js";import{g as getLocaleString,a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-da0a98a7.js";import{b as getElementsFromDefaultSlot}from"./slot-utils-86873bd2.js";import{r as regexEscape,p as parsePossibleJSON}from"./string-utils-192eb3c8.js";var DuetComboBoxSelect=function(t){var i=t.item,e=t.activeDescendant,n=t.selected,r=t.label,s=r===void 0?undefined:r,o=t.clickHandler,u=o===void 0?function(t){t.preventDefault()}:o,a=t.keyHandler,c=a===void 0?function(t){t.preventDefault()}:a,f=t.search,l=t.isAndroidDevice,d=t.id;var v=f.split(" ").filter((function(t){return!!t.trim()})).map((function(t){return regexEscape(t)}));var m=f!==""?new RegExp("(".concat(v.join("|"),")"),"i"):undefined;var b="text-decoration: underline";return h("duet-popup-menu-item",{id:e?d:"",active:n,"data-index":i.id,"aria-selected":e?"true":undefined,"aria-current":n?"true":undefined,role:"option","aria-label":s,tabindex:l?"-1":null,onClick:function(t){return u(t)},onKeyUp:function(t){return c(t)},accessibleRole:"option",activeDescendant:e},m?h("span",{class:"option-container","aria-hidden":"true"},h("span",{innerHTML:i.name.replace(m,'<span style="'.concat(b,'">$&</span>'))})):i.name,i.tags&&h("span",{class:"option-tags"},i.tags.join(", ")))};var duetComboboxCss='.sc-duet-combobox-h{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;position:relative;display:inline-block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(8, 42, 77)}.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(8, 42, 77);transition:none}.duet-theme-turva.sc-duet-combobox-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(23, 28, 58)}.combobox-menu-container.sc-duet-combobox{width:var(--popup-width);max-height:200px}.duet-theme-turva2.duet-theme-turva.sc-duet-combobox-h{color:rgb(23, 42, 59)}.duet-theme-turva2.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(23, 42, 59)}';var DuetComboboxStyle0=duetComboboxCss;var DuetCombobox=function(){function t(t){var i=this;registerInstance(this,t);this.duetChange=createEvent(this,"duetChange",3);var e,n;this.listBoxId=createID("duet-combobox-list-element");this.inputId=createID("duet-combobox-input-id");this.activeDescendantId=createID("duet-combobox-active-descendant");this.isAndroidDevice=((n=(e=navigator===null||navigator===void 0?void 0:navigator.userAgent)===null||e===void 0?void 0:e.toLowerCase())===null||n===void 0?void 0:n.indexOf("android"))>-1||null;this.isInsideModal=false;this.resizeObserver=new ResizeObserver(debounce((function(t){var e,n,r;if((t===null||t===void 0?void 0:t.length)===1){var s=(n=(e=t[0])===null||e===void 0?void 0:e.target)===null||n===void 0?void 0:n.getBoundingClientRect().width;var o=parseInt((r=getComputedStyle(i.listContainer.shadowRoot.querySelector(".duet-popup-menu-list")))===null||r===void 0?void 0:r.padding);i.listContainer.style.setProperty("--popup-width","".concat(s-2*o,"px"))}}),100));this.onInputChange=function(t){return __awaiter(i,void 0,void 0,(function(){var i;return __generator(this,(function(e){i=t.detail.value;this.inputValue=i;return[2]}))}))};this.onInputClick=function(){var t,e;if(i.openListOnClick){i.listOpen=!i.listOpen}else{i.listOpen=((t=i.inputValue)===null||t===void 0?void 0:t.length)>=i.minCharacters}if(!((e=i.getFilteredItems())===null||e===void 0?void 0:e.length)){i.listOpen=false}};this.onInputTyping=function(t){return __awaiter(i,void 0,void 0,(function(){var i,e;return __generator(this,(function(n){e=t.detail.value;if(!this.force&&!this.multiple&&this.selectedItems.size>0&&e!==this.getSelectedItemLabel()){this.selectedItems.clear()}if(!this.force&&!this.multiple&&e===""){this.value=undefined}this.listOpen=String(e).length>=this.minCharacters&&((i=this.getFilteredItems())===null||i===void 0?void 0:i.length)>0;return[2]}))}))};this.onKeyDown=function(t){var e,n,r;var s=i.returnFilteredOrNonFiltered();var o=s.filter((function(t){return!i.selectedItems.has(t.id)}));i.input.accessibleActiveDescendant=undefined;if(isEnterKey(t)){t.preventDefault();if(i.listOpen&&i.activeItem!==undefined&&s[i.activeItem]&&!i.selectedItems.has(s[i.activeItem].id)){if(i.multiple){i.addSelectedItem(s[i.activeItem].id,true)}else{i.updateSelectedItem(s[i.activeItem].id,true)}}else if(!i.multiple&&i.listOpen&&o.length===1&&o[0].name.toLowerCase()===i.input.value.toLowerCase()){i.updateSelectedItem(o[0].id,true)}i.activeItem=undefined;i.listOpen=false;return}if(isEscapeKey(t)||isTabKey(t)){if(i.listOpen){t.preventDefault()}i.updateInputText(true);i.activeItem=undefined;i.listOpen=false;return}var u=i.activeItem;if(isArrowUpKey(t)){t.preventDefault();u=i.activeItem-1}else if(isArrowDownKey(t)){if(((r=(n=(e=i.input)===null||e===void 0?void 0:e.value)===null||n===void 0?void 0:n.length)!==null&&r!==void 0?r:0)<i.minCharacters){return}t.preventDefault();u=i.listOpen?i.activeItem+1:i.activeItem;i.listOpen=true}if(isArrowDownKey(t)||isArrowUpKey(t)){if(u<0||!u){u=0}if(u>=s.length){u=s.length-1}i.input.accessibleActiveDescendant=i.activeDescendantId;i.activeItem=u;i.scrollToActive()}return};this.processedItems=null;this.inputValue="";this.listOpen=false;this.selectedItems=new Set;this.activeItem=undefined;this.accessibleLabelDefaults={en:{heading:"Select:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtered"},fi:{heading:"Valitse:",item:"{name}",itemFiltered:"{name}, {hiddenItems} suodatettu"},sv:{heading:"Välj:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtrerade"}};this.accessibleLabels=getLocaleString(this.accessibleLabelDefaults,getLanguage());this.label="";this.caption="";this.theme="";this.force=false;this.multiple=false;this.items=undefined;this.formatter=function(t){return t&&t.name?t.name:""};this.value=undefined;this.minCharacters=0;this.openListOnClick=false;this.filterType="startsWith"}t.prototype.popupMenuOpenHandler=function(){if(this.listOpen){this.listContainer.show()}else{this.listContainer.hide()}};t.prototype.activeItemHandler=function(t){this.input.accessibleActiveDescendant=this.listOpen&&(t||t===0)?this.activeDescendantId:""};t.prototype.inputValueHandler=function(){var t=this;setTimeout((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.getSelectedItemLabel()];case 1:t=i.sent();if(this.input.value==""&&t){this.input.value="";this.value=undefined}return[2]}}))}))}),200)};t.prototype.handleDocumentClick=function(t){var i=this;var e=t.composedPath();var n=e.every((function(t){return t!==i.element}));if(n){this.updateInputText(true);this.listOpen=false}};t.prototype.formatItem=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.formatter(t)]}))}))};t.prototype.processItems=function(){var t=this;var i=[];this.processedItems=parsePossibleJSON(this.items);if(!Array.isArray(this.processedItems)){console.error("DuetCombobox: Items should be an array");return}if(this.processedItems.length!==new Set(__spreadArray([],this.processedItems,true)).size){console.warn("DuetCombobox: Duplicate item values found in the list")}this.processedItems=this.processedItems.map((function(t,e){if(typeof t==="string"){t={name:t,value:t}}if(t.id!==undefined){t.id=String(t.id)}else{t.id="".concat(JSON.stringify(t.value),"-").concat(t.name)}if(i.includes(t.id)){console.warn("DuetCombobox: Duplicate item id found in the list, postfixed with index");t.id="".concat(t.id,"-").concat(e)}i.push(t.id);return t}));var e=Array.from(this.selectedItems).filter((function(i){return!t.processedItems.find((function(t){return t.id===i}))}));if(e.length){if(this.multiple){e.forEach((function(i){return t.removeSelectedItem(i)}))}else{this.updateSelectedItem(e[0],true)}}};t.prototype.processValue=function(){var t=this;if(this.value!==""&&!this.value){this.selectedItems.clear();return}var i=Array.isArray(this.value)?this.value:[this.value];var e=this.processedItems.filter((function(t){return i.includes(t.value)})).map((function(t){return t.id}));if(e.length===this.selectedItems.size&&e.every((function(i){return t.selectedItems.has(i)}))){return}if(this.multiple){this.selectedItems.clear();this.input.clearChips();e.forEach((function(i){return t.addSelectedItem(i)}))}else{var n=this.processedItems.find((function(i){return i.value===t.value}));this.updateSelectedItem(n.id)}};t.prototype.processListOpenChange=function(){if(this.openListOnClick){this.input.icon=this.listOpen?"action-arrow-up":"action-arrow-down"}this.input.accessibleExpanded=this.listOpen?"true":"false"};t.prototype.componentWillLoad=function(){if(this.element.closest("duet-modal")){this.isInsideModal=true}inheritGlobalTheme(this)};t.prototype.connectedCallback=function(){if(this.items){this.processItems()}var t=getElementsFromDefaultSlot(this.element);if(t.length){this.input=t[0]}else{this.input=document.createElement("duet-input");this.input.label=this.label;this.input.caption=this.caption;this.input.expand=true;this.element.prepend(this.input)}this.input.chips=this.multiple;this.input.addEventListener("duetChange",this.onInputChange);this.input.addEventListener("duetInput",this.onInputTyping);this.input.addEventListener("click",this.onInputClick);this.input.role="combobox";this.input.accessibleExpanded=this.listOpen?"true":"false";this.input.accessibleAutocomplete="list";this.input.accessibleControls=this.listBoxId;this.input.id=this.inputId;this.element.addEventListener("keydown",this.onKeyDown);connectLanguageChangeObserver(this,{prop:"accessibleLabels",defaults:"accessibleLabelDefaults"});this.processListOpenChange()};t.prototype.disconnectedCallback=function(){this.input.removeEventListener("duetChange",this.onInputChange);this.input.removeEventListener("click",this.onInputClick);this.element.removeEventListener("keydown",this.onKeyDown);this.resizeObserver.disconnect();disconnectLanguageChangeObserver(this)};t.prototype.componentDidLoad=function(){this.resizeObserver.observe(this.input);this.processValue()};t.prototype.shouldListBeFiltered=function(){var t=this;var i;if(!this.multiple&&this.selectedItems.size&&this.input.value===this.inputValue&&((i=this.inputValue)===null||i===void 0?void 0:i.length)<this.minCharacters){var e=this.processedItems.find((function(i){return t.selectedItems.has(i.id)}));return!(this.formatter(e).toLowerCase()===this.input.value.toLowerCase())}return true};t.prototype.returnFilteredOrNonFiltered=function(){return this.processedItems?this.shouldListBeFiltered()?this.getFilteredItems():this.sortFilteredItems(this.processedItems):[]};t.prototype.emitChangeEvent=function(t){var i=this.processedItems.find((function(i){return i.id===t}));this.duetChange.emit({item:i,value:this.value,component:"duet-combobox"})};t.prototype.updateMultipleValue=function(){var t=this;this.value=this.processedItems.filter((function(i){return t.selectedItems.has(i.id)})).map((function(t){return t.value}));this.input.value="";this.updateChips();this.input.setFocus()};t.prototype.addSelectedItem=function(t,i){if(this.selectedItems.has(t)){return}this.selectedItems.add(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.removeSelectedItem=function(t,i){if(!this.selectedItems.has(t)){return}this.selectedItems.delete(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.updateSelectedItem=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.selectedItems.clear();this.selectedItems.add(t);this.value=this.processedItems.find((function(i){return i.id===t})).value;if(i){this.emitChangeEvent(this.value&&t)}return[4,this.updateInputText()];case 1:e.sent();return[2]}}))}))};t.prototype.updateChips=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var e=this;return __generator(this,(function(n){switch(n.label){case 0:t=Array.from(this.selectedItems);return[4,this.input.getChips()];case 1:i=n.sent();t.forEach((function(t){return __awaiter(e,void 0,void 0,(function(){var i,e,n,r;var s=this;return __generator(this,(function(o){switch(o.label){case 0:i=this.processedItems.find((function(i){return i.id===t}));return[4,this.formatItem(i)];case 1:e=o.sent();return[4,this.input.hasChip({value:"".concat(t),text:e})];case 2:n=o.sent();if(!n){r=document.createElement("duet-chip");r.variation="input";r.role="option";r.value="".concat(t);r.textContent=e;r.addEventListener("duetRemove",(function(t){var i=t.detail.value;s.removeSelectedItem(i,true)}));this.input.addChip(r)}return[2]}}))}))}));i.forEach((function(i){if(!t.includes(i.value)){i.remove()}}));return[2]}}))}))};t.prototype.getSelectedItemLabel=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;var n=this;return __generator(this,(function(r){switch(r.label){case 0:t=this.processedItems.find((function(t){return n.selectedItems.has(t.id)}));if(!t)return[3,2];return[4,this.formatItem(t)];case 1:e=r.sent();return[3,3];case 2:e="";r.label=3;case 3:i=e;return[2,i]}}))}))};t.prototype.updateInputText=function(){return __awaiter(this,arguments,void 0,(function(t){var i,e,n;if(t===void 0){t=false}return __generator(this,(function(r){switch(r.label){case 0:if(t&&this.multiple){this.input.value="";return[2]}if(!(t&&this.force))return[3,3];i=this.returnFilteredOrNonFiltered();if(!this.multiple&&this.listOpen&&i.length===1&&i[0].name.toLowerCase()===this.input.value.toLowerCase()){this.updateSelectedItem(i[0].id,true)}if(!(this.selectedItems.size===0))return[3,1];this.input.value="";return[3,3];case 1:e=this.input;return[4,this.getSelectedItemLabel()];case 2:e.value=r.sent();r.label=3;case 3:if(!(!t&&this.selectedItems.size>0))return[3,6];this.input.value="";n=this.input;return[4,this.getSelectedItemLabel()];case 4:n.value=r.sent();this.input.scrollLeft=this.input.scrollWidth;return[4,this.input.setFocus()];case 5:r.sent();r.label=6;case 6:return[2]}}))}))};t.prototype.onListClick=function(t,i){t.preventDefault();t.stopPropagation();if(this.multiple){this.addSelectedItem(i.id,true)}else{this.updateSelectedItem(i.id,true)}this.activeItem=undefined;this.listOpen=false;return this.listOpen};t.prototype.scrollToActive=function(){var t=document.getElementById("".concat(this.activeDescendantId));if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.formatLabel=function(t,i,e,n){if(!t||n===undefined){return""}var r=e===n?this.accessibleLabels.item:this.accessibleLabels.itemFiltered;return r.replace("{name}",String(t.name)).replace("{current}",String(i+1)).replace("{total}",String(e)).replace("{hiddenItems}",String(n-e))};t.prototype.getFilteredItems=function(){var t=this;var i=this.processedItems.filter((function(i){var e,n,r,s,o;return((e=String(i.value))===null||e===void 0?void 0:e.toLowerCase()[t.filterType]((n=t.inputValue)===null||n===void 0?void 0:n.toLowerCase()))||((r=String(i.name))===null||r===void 0?void 0:r.toLowerCase()[t.filterType]((s=t.inputValue)===null||s===void 0?void 0:s.toLowerCase()))||t.formatter(i).toLowerCase()[t.filterType]((o=t.inputValue)===null||o===void 0?void 0:o.toLowerCase())||t.selectedItems.has(i.id)})).filter((function(i){var e=true;if(t.multiple&&t.selectedItems.has(i.id)){e=false}return e}));return this.sortFilteredItems(i)};t.prototype.sortFilteredItems=function(t){var i=this;if(t.length>0){t.filter((function(t){return i.selectedItems.has(t.id)})).forEach((function(i){var e=t.indexOf(i);t.splice(e,1);t.unshift(i)}))}return t};t.prototype.render=function(){var t;var i=this;var e=this.returnFilteredOrNonFiltered();return h(Host,{class:(t={"duet-combobox":true},t["duet-theme-".concat(this.theme)]=true,t)},h("slot",null),h("div",null,h("duet-popup-menu",{id:this.listBoxId,controller:this.input,ref:function(t){return i.listContainer=t},accessibleRole:"listbox",allowVerticalFlip:false,class:{"duet-skip-teleport-inert":this.isInsideModal}},h("div",{class:"combobox-menu-container"},this.listOpen&&e.map((function(t,n){return h(DuetComboBoxSelect,{id:i.activeDescendantId,item:t,activeDescendant:n===i.activeItem,selected:i.selectedItems.has(t.id),search:i.inputValue,clickHandler:function(e){return i.onListClick(e,t)},label:i.formatLabel(t,n,e.length,i.processedItems.length),isAndroidDevice:i.isAndroidDevice})})),h("duet-spacer",{size:"x-small"})))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{listOpen:["popupMenuOpenHandler","processListOpenChange"],activeItem:["activeItemHandler"],inputValue:["inputValueHandler"],items:["processItems"],value:["processValue"]}},enumerable:false,configurable:true});return t}();DuetCombobox.style=DuetComboboxStyle0;export{DuetCombobox as duet_combobox};
|
|
4
|
+
*/import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-e0645409.js";import{i as inheritGlobalTheme}from"./themeable-component-f1c77a5d.js";import{c as createID}from"./create-id-149a1b6d.js";import{d as debounce}from"./js-utils-9b9e0039.js";import{j as isEnterKey,f as isEscapeKey,o as isTabKey,b as isArrowUpKey,c as isArrowDownKey}from"./keyboard-utils-daf80d44.js";import{g as getLocaleString,a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-5c6108e9.js";import{b as getElementsFromDefaultSlot}from"./slot-utils-0bb6f129.js";import{r as regexEscape,p as parsePossibleJSON}from"./string-utils-192eb3c8.js";var DuetComboBoxSelect=function(t){var i=t.item,e=t.activeDescendant,n=t.selected,r=t.label,s=r===void 0?undefined:r,o=t.clickHandler,u=o===void 0?function(t){t.preventDefault()}:o,a=t.keyHandler,c=a===void 0?function(t){t.preventDefault()}:a,f=t.search,l=t.isAndroidDevice,d=t.id;var v=f.split(" ").filter((function(t){return!!t.trim()})).map((function(t){return regexEscape(t)}));var m=f!==""?new RegExp("(".concat(v.join("|"),")"),"i"):undefined;var b="text-decoration: underline";return h("duet-popup-menu-item",{id:e?d:"",active:n,"data-index":i.id,"aria-selected":e?"true":undefined,"aria-current":n?"true":undefined,role:"option","aria-label":s,tabindex:l?"-1":null,onClick:function(t){return u(t)},onKeyUp:function(t){return c(t)},accessibleRole:"option",activeDescendant:e},m?h("span",{class:"option-container","aria-hidden":"true"},h("span",{innerHTML:i.name.replace(m,'<span style="'.concat(b,'">$&</span>'))})):i.name,i.tags&&h("span",{class:"option-tags"},i.tags.join(", ")))};var duetComboboxCss='.sc-duet-combobox-h{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;position:relative;display:inline-block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(8, 42, 77)}.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(8, 42, 77);transition:none}.duet-theme-turva.sc-duet-combobox-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(23, 28, 58)}.combobox-menu-container.sc-duet-combobox{width:var(--popup-width);max-height:200px}.duet-theme-turva2.duet-theme-turva.sc-duet-combobox-h{color:rgb(23, 42, 59)}.duet-theme-turva2.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:rgb(23, 42, 59)}';var DuetComboboxStyle0=duetComboboxCss;var DuetCombobox=function(){function t(t){var i=this;registerInstance(this,t);this.duetChange=createEvent(this,"duetChange",3);var e,n;this.listBoxId=createID("duet-combobox-list-element");this.inputId=createID("duet-combobox-input-id");this.activeDescendantId=createID("duet-combobox-active-descendant");this.isAndroidDevice=((n=(e=navigator===null||navigator===void 0?void 0:navigator.userAgent)===null||e===void 0?void 0:e.toLowerCase())===null||n===void 0?void 0:n.indexOf("android"))>-1||null;this.isInsideModal=false;this.resizeObserver=new ResizeObserver(debounce((function(t){var e,n,r;if((t===null||t===void 0?void 0:t.length)===1){var s=(n=(e=t[0])===null||e===void 0?void 0:e.target)===null||n===void 0?void 0:n.getBoundingClientRect().width;var o=parseInt((r=getComputedStyle(i.listContainer.shadowRoot.querySelector(".duet-popup-menu-list")))===null||r===void 0?void 0:r.padding);i.listContainer.style.setProperty("--popup-width","".concat(s-2*o,"px"))}}),100));this.onInputChange=function(t){return __awaiter(i,void 0,void 0,(function(){var i;return __generator(this,(function(e){i=t.detail.value;this.inputValue=i;return[2]}))}))};this.onInputClick=function(){i.popupMenuController=i.input.nativeInputElement;setTimeout((function(){var t,e;if(i.openListOnClick){i.listOpen=!i.listOpen}else{i.listOpen=((t=i.inputValue)===null||t===void 0?void 0:t.length)>=i.minCharacters}if(!((e=i.getFilteredItems())===null||e===void 0?void 0:e.length)){i.listOpen=false}}))};this.onInputTyping=function(t){return __awaiter(i,void 0,void 0,(function(){var i,e;return __generator(this,(function(n){e=t.detail.value;if(!this.force&&!this.multiple&&this.selectedItems.size>0&&e!==this.getSelectedItemLabel()){this.selectedItems.clear()}if(!this.force&&!this.multiple&&e===""){this.value=undefined}this.listOpen=String(e).length>=this.minCharacters&&((i=this.getFilteredItems())===null||i===void 0?void 0:i.length)>0;return[2]}))}))};this.onKeyDown=function(t){var e,n,r;var s=i.returnFilteredOrNonFiltered();var o=s.filter((function(t){return!i.selectedItems.has(t.id)}));i.input.accessibleActiveDescendant=undefined;if(isEnterKey(t)){t.preventDefault();if(i.listOpen&&i.activeItem!==undefined&&s[i.activeItem]&&!i.selectedItems.has(s[i.activeItem].id)){if(i.multiple){i.addSelectedItem(s[i.activeItem].id,true)}else{i.updateSelectedItem(s[i.activeItem].id,true)}}else if(!i.multiple&&i.listOpen&&o.length===1&&o[0].name.toLowerCase()===i.input.value.toLowerCase()){i.updateSelectedItem(o[0].id,true)}i.activeItem=undefined;i.listOpen=false;return}if(isEscapeKey(t)||isTabKey(t)){if(i.listOpen){t.preventDefault()}i.updateInputText(true);i.activeItem=undefined;i.listOpen=false;return}var u=i.activeItem;if(isArrowUpKey(t)){t.preventDefault();u=i.activeItem-1}else if(isArrowDownKey(t)){if(((r=(n=(e=i.input)===null||e===void 0?void 0:e.value)===null||n===void 0?void 0:n.length)!==null&&r!==void 0?r:0)<i.minCharacters){return}t.preventDefault();u=i.listOpen?i.activeItem+1:i.activeItem;i.listOpen=true}if(isArrowDownKey(t)||isArrowUpKey(t)){if(u<0||!u){u=0}if(u>=s.length){u=s.length-1}i.input.accessibleActiveDescendant=i.activeDescendantId;i.activeItem=u;i.scrollToActive()}return};this.processedItems=null;this.inputValue="";this.listOpen=false;this.popupMenuController=undefined;this.selectedItems=new Set;this.activeItem=undefined;this.accessibleLabelDefaults={en:{heading:"Select:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtered"},fi:{heading:"Valitse:",item:"{name}",itemFiltered:"{name}, {hiddenItems} suodatettu"},sv:{heading:"Välj:",item:"{name}",itemFiltered:"{name}, {hiddenItems} filtrerade"}};this.accessibleLabels=getLocaleString(this.accessibleLabelDefaults,getLanguage());this.label="";this.caption="";this.theme="";this.force=false;this.multiple=false;this.items=undefined;this.formatter=function(t){return t&&t.name?t.name:""};this.value=undefined;this.minCharacters=0;this.openListOnClick=false;this.filterType="startsWith"}t.prototype.popupMenuOpenHandler=function(){if(this.listOpen){this.listContainer.show()}else{this.listContainer.hide()}};t.prototype.activeItemHandler=function(t){this.input.accessibleActiveDescendant=this.listOpen&&(t||t===0)?this.activeDescendantId:""};t.prototype.inputValueHandler=function(){var t=this;setTimeout((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.getSelectedItemLabel()];case 1:t=i.sent();if(this.input.value==""&&t){this.input.value="";this.value=undefined}return[2]}}))}))}),200)};t.prototype.handleDocumentClick=function(t){var i=this;var e=t.composedPath();var n=e.every((function(t){return t!==i.element}));if(n){this.updateInputText(true);this.listOpen=false}};t.prototype.formatItem=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.formatter(t)]}))}))};t.prototype.processItems=function(){var t=this;var i=[];this.processedItems=parsePossibleJSON(this.items);if(!Array.isArray(this.processedItems)){console.error("DuetCombobox: Items should be an array");return}if(this.processedItems.length!==new Set(__spreadArray([],this.processedItems,true)).size){console.warn("DuetCombobox: Duplicate item values found in the list")}this.processedItems=this.processedItems.map((function(t,e){if(typeof t==="string"){t={name:t,value:t}}if(t.id!==undefined){t.id=String(t.id)}else{t.id="".concat(JSON.stringify(t.value),"-").concat(t.name)}if(i.includes(t.id)){console.warn("DuetCombobox: Duplicate item id found in the list, postfixed with index");t.id="".concat(t.id,"-").concat(e)}i.push(t.id);return t}));var e=Array.from(this.selectedItems).filter((function(i){return!t.processedItems.find((function(t){return t.id===i}))}));if(e.length){if(this.multiple){e.forEach((function(i){return t.removeSelectedItem(i)}))}else{this.updateSelectedItem(e[0],true)}}};t.prototype.processValue=function(){var t=this;if(this.value!==""&&!this.value){this.selectedItems.clear();return}var i=Array.isArray(this.value)?this.value:[this.value];var e=this.processedItems.filter((function(t){return i.includes(t.value)})).map((function(t){return t.id}));if(e.length===this.selectedItems.size&&e.every((function(i){return t.selectedItems.has(i)}))){return}if(this.multiple){this.selectedItems.clear();this.input.clearChips();e.forEach((function(i){return t.addSelectedItem(i)}))}else{var n=this.processedItems.find((function(i){return i.value===t.value}));this.updateSelectedItem(n.id)}};t.prototype.processListOpenChange=function(){if(this.openListOnClick){this.input.icon=this.listOpen?"action-arrow-up":"action-arrow-down"}this.input.accessibleExpanded=this.listOpen?"true":"false"};t.prototype.componentWillLoad=function(){if(this.element.closest("duet-modal")){this.isInsideModal=true}inheritGlobalTheme(this)};t.prototype.connectedCallback=function(){if(this.items){this.processItems()}var t=getElementsFromDefaultSlot(this.element);if(t.length){this.input=t[0]}else{this.input=document.createElement("duet-input");this.input.label=this.label;this.input.caption=this.caption;this.input.expand=true;this.element.prepend(this.input)}this.input.chips=this.multiple;this.input.addEventListener("duetChange",this.onInputChange);this.input.addEventListener("duetInput",this.onInputTyping);this.input.addEventListener("click",this.onInputClick);this.input.role="combobox";this.input.accessibleExpanded=this.listOpen?"true":"false";this.input.accessibleAutocomplete="list";this.input.accessibleControls=this.listBoxId;this.input.id=this.inputId;this.element.addEventListener("keydown",this.onKeyDown);connectLanguageChangeObserver(this,{prop:"accessibleLabels",defaults:"accessibleLabelDefaults"});this.processListOpenChange()};t.prototype.disconnectedCallback=function(){this.input.removeEventListener("duetChange",this.onInputChange);this.input.removeEventListener("click",this.onInputClick);this.element.removeEventListener("keydown",this.onKeyDown);this.resizeObserver.disconnect();disconnectLanguageChangeObserver(this)};t.prototype.componentDidLoad=function(){this.resizeObserver.observe(this.input);this.processValue()};t.prototype.shouldListBeFiltered=function(){var t=this;var i;if(!this.multiple&&this.selectedItems.size&&this.input.value===this.inputValue&&((i=this.inputValue)===null||i===void 0?void 0:i.length)<this.minCharacters){var e=this.processedItems.find((function(i){return t.selectedItems.has(i.id)}));return!(this.formatter(e).toLowerCase()===this.input.value.toLowerCase())}return true};t.prototype.returnFilteredOrNonFiltered=function(){return this.processedItems?this.shouldListBeFiltered()?this.getFilteredItems():this.sortFilteredItems(this.processedItems):[]};t.prototype.emitChangeEvent=function(t){var i=this.processedItems.find((function(i){return i.id===t}));this.duetChange.emit({item:i,value:this.value,component:"duet-combobox"})};t.prototype.updateMultipleValue=function(){var t=this;this.value=this.processedItems.filter((function(i){return t.selectedItems.has(i.id)})).map((function(t){return t.value}));this.input.value="";this.updateChips();this.input.setFocus()};t.prototype.addSelectedItem=function(t,i){if(this.selectedItems.has(t)){return}this.selectedItems.add(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.removeSelectedItem=function(t,i){if(!this.selectedItems.has(t)){return}this.selectedItems.delete(t);this.updateMultipleValue();if(i){this.emitChangeEvent(t)}};t.prototype.updateSelectedItem=function(t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.selectedItems.clear();this.selectedItems.add(t);this.value=this.processedItems.find((function(i){return i.id===t})).value;if(i){this.emitChangeEvent(this.value&&t)}return[4,this.updateInputText()];case 1:e.sent();return[2]}}))}))};t.prototype.updateChips=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var e=this;return __generator(this,(function(n){switch(n.label){case 0:t=Array.from(this.selectedItems);return[4,this.input.getChips()];case 1:i=n.sent();t.forEach((function(t){return __awaiter(e,void 0,void 0,(function(){var i,e,n,r;var s=this;return __generator(this,(function(o){switch(o.label){case 0:i=this.processedItems.find((function(i){return i.id===t}));return[4,this.formatItem(i)];case 1:e=o.sent();return[4,this.input.hasChip({value:"".concat(t),text:e})];case 2:n=o.sent();if(!n){r=document.createElement("duet-chip");r.variation="input";r.role="option";r.value="".concat(t);r.textContent=e;r.addEventListener("duetRemove",(function(t){var i=t.detail.value;s.removeSelectedItem(i,true)}));this.input.addChip(r)}return[2]}}))}))}));i.forEach((function(i){if(!t.includes(i.value)){i.remove()}}));return[2]}}))}))};t.prototype.getSelectedItemLabel=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;var n=this;return __generator(this,(function(r){switch(r.label){case 0:t=this.processedItems.find((function(t){return n.selectedItems.has(t.id)}));if(!t)return[3,2];return[4,this.formatItem(t)];case 1:e=r.sent();return[3,3];case 2:e="";r.label=3;case 3:i=e;return[2,i]}}))}))};t.prototype.updateInputText=function(){return __awaiter(this,arguments,void 0,(function(t){var i,e,n;if(t===void 0){t=false}return __generator(this,(function(r){switch(r.label){case 0:if(t&&this.multiple){this.input.value="";return[2]}if(!(t&&this.force))return[3,3];i=this.returnFilteredOrNonFiltered();if(!this.multiple&&this.listOpen&&i.length===1&&i[0].name.toLowerCase()===this.input.value.toLowerCase()){this.updateSelectedItem(i[0].id,true)}if(!(this.selectedItems.size===0))return[3,1];this.input.value="";return[3,3];case 1:e=this.input;return[4,this.getSelectedItemLabel()];case 2:e.value=r.sent();r.label=3;case 3:if(!(!t&&this.selectedItems.size>0))return[3,6];this.input.value="";n=this.input;return[4,this.getSelectedItemLabel()];case 4:n.value=r.sent();this.input.scrollLeft=this.input.scrollWidth;return[4,this.input.setFocus()];case 5:r.sent();r.label=6;case 6:return[2]}}))}))};t.prototype.onListClick=function(t,i){t.preventDefault();t.stopPropagation();if(this.multiple){this.addSelectedItem(i.id,true)}else{this.updateSelectedItem(i.id,true)}this.activeItem=undefined;this.listOpen=false;return this.listOpen};t.prototype.scrollToActive=function(){var t=document.getElementById("".concat(this.activeDescendantId));if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.formatLabel=function(t,i,e,n){if(!t||n===undefined){return""}var r=e===n?this.accessibleLabels.item:this.accessibleLabels.itemFiltered;return r.replace("{name}",String(t.name)).replace("{current}",String(i+1)).replace("{total}",String(e)).replace("{hiddenItems}",String(n-e))};t.prototype.getFilteredItems=function(){var t=this;var i=this.processedItems.filter((function(i){var e,n,r,s,o;return((e=String(i.value))===null||e===void 0?void 0:e.toLowerCase()[t.filterType]((n=t.inputValue)===null||n===void 0?void 0:n.toLowerCase()))||((r=String(i.name))===null||r===void 0?void 0:r.toLowerCase()[t.filterType]((s=t.inputValue)===null||s===void 0?void 0:s.toLowerCase()))||t.formatter(i).toLowerCase()[t.filterType]((o=t.inputValue)===null||o===void 0?void 0:o.toLowerCase())||t.selectedItems.has(i.id)})).filter((function(i){var e=true;if(t.multiple&&t.selectedItems.has(i.id)){e=false}return e}));return this.sortFilteredItems(i)};t.prototype.sortFilteredItems=function(t){var i=this;if(t.length>0){t.filter((function(t){return i.selectedItems.has(t.id)})).forEach((function(i){var e=t.indexOf(i);t.splice(e,1);t.unshift(i)}))}return t};t.prototype.render=function(){var t;var i=this;var e=this.returnFilteredOrNonFiltered();return h(Host,{class:(t={"duet-combobox":true},t["duet-theme-".concat(this.theme)]=true,t)},h("slot",null),h("div",null,h("duet-popup-menu",{id:this.listBoxId,controller:this.popupMenuController,ref:function(t){return i.listContainer=t},accessibleRole:"listbox",allowVerticalFlip:false,class:{"duet-skip-teleport-inert":this.isInsideModal}},h("div",{class:"combobox-menu-container"},this.listOpen&&e.map((function(t,n){return h(DuetComboBoxSelect,{id:i.activeDescendantId,item:t,activeDescendant:n===i.activeItem,selected:i.selectedItems.has(t.id),search:i.inputValue,clickHandler:function(e){return i.onListClick(e,t)},label:i.formatLabel(t,n,e.length,i.processedItems.length),isAndroidDevice:i.isAndroidDevice})})),h("duet-spacer",{size:"x-small"})))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{listOpen:["popupMenuOpenHandler","processListOpenChange"],activeItem:["activeItemHandler"],inputValue:["inputValueHandler"],items:["processItems"],value:["processValue"]}},enumerable:false,configurable:true});return t}();DuetCombobox.style=DuetComboboxStyle0;export{DuetCombobox as duet_combobox};
|
|
@@ -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-e0645409.js";import{i as inheritGlobalTheme}from"./themeable-component-f1c77a5d.js";import{a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-5c6108e9.js";import"./string-utils-192eb3c8.js";var duetContactCardCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0}:host{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;margin-bottom:12px !important;display:block}:host(.duet-m-0){margin:0 !important}::slotted(*){padding-top:1.5rem}@media (min-width: 48em){::slotted(*){grid-column:2/span 2;padding-top:0}}.duet-contact-card{display:grid;grid-template-columns:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:rgb(8, 42, 77)}.duet-contact-card.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}@media (min-width: 48em){.duet-contact-card{grid-template-columns:min-content minmax(0, 1fr) auto;gap:20px}}.duet-contact-card .image{width:4rem;height:4rem;margin-bottom:8px;border-radius:4px}@media (min-width: 48em){.duet-contact-card .image{width:6rem;height:6rem;padding-bottom:0}}.duet-contact-card .description{padding-bottom:8px}.duet-contact-card .email,.duet-contact-card .phone{display:grid;grid-template-columns:min-content auto;gap:8px;align-items:center;justify-content:flex-start;padding-bottom:8px;overflow-wrap:break-word}:host(.duet-theme-turva2) .duet-contact-card.duet-theme-turva{color:rgb(23, 42, 59)}';var DuetContactCardStyle0=duetContactCardCss;var DuetContactCard=function(){function e(e){registerInstance(this,e);this.phoneLabel={en:"Phone",fi:"Puhelin",sv:"Telefon"};this.language=getLanguage();this.theme="";this.margin="auto";this.image=undefined;this.name=undefined;this.description=undefined;this.email=undefined;this.phone=undefined;this.buttonText=undefined;this.buttonIcon="form-date";this.buttonUrl=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.render=function(){var e=this.theme==="turva";var t=e?"turva":"default";return h(Host,{key:"031a1cc6617901d47c4ffa723e7e5af73a11b609",class:{"duet-m-0":this.margin==="none"}},h("div",{key:"3eadcbaad47c4fced83d4db168810f79bfa7b786",class:{"duet-contact-card":true,"duet-theme-turva":this.theme==="turva"},role:"group","aria-label":this.name},this.image?h("img",{class:"image",src:this.image,alt:this.name}):h("div",null),h("div",{key:"54b585ba0d7820ddc0170b050d7b2fc1160fc559"},this.name&&h("duet-heading",{key:"b6ff67b0d0a8a8443a2318de87068aa15f080774",class:"name",level:"h3",margin:"none",theme:t},this.name),this.description&&h("duet-paragraph",{key:"3586614b97c27b190bd6cf657970e3fd54999733",class:"description",margin:"none",theme:t},this.description),this.email&&h("div",{key:"f28904a0807287b25d77dabd04d62e3db9dd9885",class:"email"},h("duet-icon",{key:"f51b5fe58a74b65433172d96c921aebd5cd046f0",name:"navigation-message",size:"x-small",color:"primary-dark",margin:"none",theme:t}),h("duet-link",{key:"84014fd0fa9c758aa002751e780a876b1acf14cd",url:"mailto:".concat(this.email),accessibleLabel:"Email: ".concat(this.email),theme:t},this.email)),this.phone&&h("div",{key:"97814f25bbd4afa0c0449a22b09a72803717aaca",class:"phone"},h("duet-icon",{key:"e6775a6b8eadfe789170d5a896a225c5d2736bab",name:"form-tel",size:"x-small",color:"primary-dark",margin:"none",theme:t}),h("duet-link",{key:"61cd5ffd1d0850313af726624b8207cec0f3732f",url:"tel:".concat(this.phone),accessibleLabel:"".concat(this.phoneLabel[this.language],": ").concat(this.phone),theme:t},this.phone))),this.buttonUrl&&this.buttonText&&h("div",{key:"dbe676faf77918b470a549472baa29d249a86ac1",class:"call-to-action"},h("duet-button",{key:"294a9d190cdeba8cd13efc1d0f68aef675470c4b",variation:"default",icon:this.buttonIcon,fixed:true,margin:"none",url:this.buttonUrl,theme:t},this.buttonText)),h("div",{key:"0319211fcb9e7f11dd5b32a53a1c57436ed79268"}),h("slot",{key:"0ffb08aec4351a29a0cd3ccd25911f3271cb4058"})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetContactCard.style=DuetContactCardStyle0;export{DuetContactCard as duet_contact_card};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-
|
|
4
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-e0645409.js";import{i as inheritGlobalTheme}from"./themeable-component-f1c77a5d.js";import{s as subscribeTabbingChange,u as unsubscribeTabbingChange}from"./keyboard-utils-daf80d44.js";var duetCookieConsentCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0}:host{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;position:fixed;right:0;bottom:0;left:0;z-index:950;display:block;width:100%;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 48em){:host{right:28px;bottom:28px;left:auto;width:25rem}}:host(:focus){outline:0}:host(.user-is-tabbing:not(.descendant-focused):focus){outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8);border-radius:4px}.duet-theme-turva :host(.user-is-tabbing:not(.descendant-focused):focus),:host(.user-is-tabbing:not(.descendant-focused):focus).duet-theme-turva,.duet-theme-turva2 :host(.user-is-tabbing:not(.descendant-focused):focus),:host(.user-is-tabbing:not(.descendant-focused):focus).duet-theme-turva2{outline-color:rgba(53, 79, 101, 0.8)}.duet-cookie-consent{padding:20px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;color:rgb(255, 255, 255) !important;background-color:rgba(4, 21, 39, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent{background:rgba(4, 21, 39, 0.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.duet-cookie-consent.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background-color:rgba(12, 14, 29, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent.duet-theme-turva{background:rgba(12, 14, 29, 0.8)}}@media (min-width: 48em){.duet-cookie-consent{padding:20px;border-radius:4px}}.duet-cookie-consent-content{display:flex;align-items:center;max-width:1110px;margin:0 auto}.duet-cookie-consent-content .expand{flex:1}::slotted(a){font-weight:600;color:rgb(255, 255, 255) !important;white-space:nowrap;text-decoration:underline}::slotted(a[target=_blank]){padding-right:16px;background:url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjUgMmExLjUgMS41IDAgMDEuMTQgM0gzLjc1Yy0uMzggMC0uNy4yOC0uNzQuNjVsLS4wMS4xdjE0LjVjMCAuMzguMjguNy42NS43NGwuMS4wMWgxNC41Yy4zOCAwIC43LS4yOC43NC0uNjVsLjAxLS4xdi02Ljg5YTEuNSAxLjUgMCAwMTMgMHY2Ljg5QTMuNzUgMy43NSAwIDAxMTguMjUgMjRIMy43NUEzLjc1IDMuNzUgMCAwMTAgMjAuMjVWNS43NUEzLjc1IDMuNzUgMCAwMTMuNzUgMnptMTItMmMuNzggMCAxLjQyLjYgMS41IDEuMzZWNy41YTEuNSAxLjUgMCAwMS0zIC4xNFY1LjEybC01LjQ0IDUuNDRhMS41IDEuNSAwIDAxLTIuMjItMmwuMS0uMTJMMTguODggM0gxNi41QTEuNSAxLjUgMCAwMTE1IDEuNjRWMS41YzAtLjc4LjYtMS40MiAxLjM2LTEuNWguMTR6Ii8+PC9zdmc+") no-repeat right 50%;background-size:12px 10px}::slotted(a:focus){outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva ::slotted(a:focus),::slotted(a:focus).duet-theme-turva,.duet-theme-turva2 ::slotted(a:focus),::slotted(a:focus).duet-theme-turva2{outline-color:rgba(53, 79, 101, 0.8)}:host(.duet-theme-turva2) .duet-cookie-consent.duet-theme-turva{background-color:rgba(12, 21, 30, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){:host(.duet-theme-turva2) .duet-cookie-consent.duet-theme-turva{background:rgba(12, 21, 30, 0.8)}}';var DuetCookieConsentStyle0=duetCookieConsentCss;var DuetCookieConsent=function(){function e(e){var t=this;registerInstance(this,e);this.duetCookieConsent=createEvent(this,"duetCookieConsent",7);this.handleClick=function(e){e.preventDefault();t.duetCookieConsent.emit({component:"duet-cookie-consent"})};this.accessibleLabel="Hyväksyn evästeiden käytön";this.theme=""}e.prototype.handleFocusIn=function(e){var t=e.composedPath();var o=t[0];if(o!==this.element){this.element.classList.add("descendant-focused")}};e.prototype.handleFocusOut=function(){this.element.classList.remove("descendant-focused")};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.connectedCallback=function(){subscribeTabbingChange(this)};e.prototype.disconnectedCallback=function(){unsubscribeTabbingChange(this)};e.prototype.render=function(){return h(Host,{key:"506d1769429cf65db0c103b4f18005cfeff7bee8",tabindex:"-1",class:{"duet-theme-turva":this.theme==="turva"}},h("div",{key:"c36f8630bd43e752be0aed0fdefcdbb2cfd29718",class:{"duet-cookie-consent":true,"duet-theme-turva":this.theme==="turva"}},h("div",{key:"96368e115adefab02051daabb9e584353f411e1a",class:"duet-cookie-consent-content"},h("div",{key:"3179191d41fd6656f1a13fb3bd06b2a3388240f0",class:"expand"},h("slot",{key:"39de067bf84d2b0caf9f6f8675abb10f3d713487"})),h("duet-spacer",{key:"c08f12efe61e76885353c55a1300442c9436a6ff",size:"large",direction:"horizontal"}),h("div",{key:"8d71e1afdd7ec69a6738ccac4fac99179378b64e"},h("duet-button",{key:"d86306aa5911917a369925c86cac272216003ac0",variation:"negative",size:"small",onClick:this.handleClick,margin:"none","aria-label":this.accessibleLabel,theme:this.theme},"OK")))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetCookieConsent.style=DuetCookieConsentStyle0;export{DuetCookieConsent as duet_cookie_consent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,a,i){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function d(e){try{u(i.next(e))}catch(e){n(e)}}function o(e){try{u(i["throw"](e))}catch(e){n(e)}}function u(e){e.done?a(e.value):r(e.value).then(d,o)}u((i=i.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:[]},i,r,n,d;return d={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(e){return function(t){return u([e,t])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(a=0)),a)try{if(i=1,r&&(n=o[0]&2?r["return"]:o[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;if(r=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;r=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(n=a.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){a.label=o[1];break}if(o[0]===6&&a.label<n[1]){a.label=n[1];n=o;break}if(n&&a.label<n[2]){a.label=n[2];a.ops.push(o);break}if(n[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];r=0}finally{i=n=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{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-8edff080.js";import{i as inheritGlobalTheme}from"./themeable-component-19d01405.js";import{c as createID}from"./create-id-149a1b6d.js";import{F as FocusGuard}from"./focus-utils-d80e0fff.js";import{g as getLocaleString,a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-da0a98a7.js";import{c as checkNamedSlotElement}from"./slot-utils-86873bd2.js";import"./string-utils-192eb3c8.js";var formatOptionsShort={day:"numeric",month:"long",weekday:"long"};var formatOptionsLong={day:"numeric",month:"long",year:"numeric"};var i18n={fi:{buttonLabel:"Valitse päivämäärä",prevMonthLabel:"Edellinen kuukausi",nextMonthLabel:"Seuraava kuukausi",monthSelectLabel:"Kuukausi",yearSelectLabel:"Vuosi",closeLabel:"Sulje ikkuna",selected:"Valittu päivämäärä on",keyboardInstruction:"Voit navigoida päivämääriä nuolinäppäimillä",dayLabels:["Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai","Sunnuntai"],monthLabels:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthLabelsShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],formatterShort:new Intl.DateTimeFormat("fi-FI",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("fi-FI",formatOptionsLong)},en:{buttonLabel:"Choose date",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",selected:"Selected date is",keyboardInstruction:"You can use arrow keys to navigate dates",dayLabels:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthLabels:["January","February","March","April","May","June","July","August","September","October","November","December"],monthLabelsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("en-GB",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("en-GB",formatOptionsLong)},sv:{buttonLabel:"Välj datum",prevMonthLabel:"Föregående månad",nextMonthLabel:"Nästa månad",monthSelectLabel:"Månad",yearSelectLabel:"År",closeLabel:"Stäng fönstret",selected:"Valt datum är",keyboardInstruction:"Använd piltangenterna för att navigera i kalender",dayLabels:["Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],monthLabels:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthLabelsShort:["Jan","Feb","Mars","April","Maj","Juni","Juli","Aug","Sep","Okt","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("sv-SE",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("sv-SE",formatOptionsLong)}};var formDate={title:"form-date",tags:"form date calendar date picker",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M2.25 24A2.252 2.252 0 0 1 0 21.75V5.25A2.252 2.252 0 0 1 2.25 3H6V.75a.75.75 0 0 1 1.5 0V3h9V.75a.75.75 0 0 1 1.5 0V3h3.75A2.252 2.252 0 0 1 24 5.25v16.5A2.252 2.252 0 0 1 21.75 24zm-.75-2.25c0 .414.336.75.75.75h19.5a.75.75 0 0 0 .75-.75V10.5h-21zM22.5 9V5.25a.75.75 0 0 0-.75-.75H18V6a.75.75 0 0 1-1.5 0V4.5h-9V6A.75.75 0 0 1 6 6V4.5H2.25a.75.75 0 0 0-.75.75V9z"/><circle cx="5.625" cy="13.875" r="1.125"/><circle cx="5.625" cy="19.125" r="1.125"/><circle cx="12" cy="13.875" r="1.125"/><circle cx="12" cy="19.125" r="1.125"/><circle cx="18.375" cy="13.875" r="1.125"/><path d="M18.375 20.25c-.62 0-1.125-.505-1.125-1.125a1.127 1.127 0 0 1 1.171-1.122l.027.003a1.118 1.118 0 0 1 1.052 1.12c0 .619-.505 1.124-1.125 1.124z"/></svg>'};var DatePickerInput=function(e){var t=e.onClick,a=e.placeholder,i=e.name,r=e.inputLabel,n=e.value,d=e.valueAsDate,o=e.formattedValue,u=e.language,s=e.identifier,c=e.theme,l=e.disabled,p=e.error,b=e.role,m=e.required,f=e.tooltip,g=e.tooltipDirection,v=e.labelHidden,k=e.buttonRef,y=e.inputRef,x=e.onInput,w=e.onBlur,D=e.onFocus,S=e.hasFocus,O=e.accessibleActiveDescendant,I=e.accessibleControls,M=e.accessibleOwns,L=e.accessibleDescribedBy,E=e.accessibleLiveError,A=e.echoPlaceholder,T=e.caption;var F=i18n[u],_=F.buttonLabel,j=F.selected,U=F.formatterLong;var C={"duet-theme-turva":c==="turva","duet-date-input":true,"duet-date-input-has-focus":S};return h("div",{class:C},h("duet-input",{label:r,value:o,placeholder:a,id:s,disabled:l,theme:c,error:p,role:b,required:m,tooltip:f,tooltipDirection:g,margin:"none",labelHidden:v,accessibleAutocomplete:"none",onDuetInput:x,onDuetFocus:D,onDuetBlur:w,autoComplete:"off",disallowPattern:"[^0-9\\.\\-\\/]",expand:true,ref:y,accessibleActiveDescendant:O,accessibleControls:I,accessibleOwns:M,accessibleDescribedBy:L,accessibleLiveError:E,echoPlaceholder:A,caption:T,variation:"button"},h("slot",{name:"tooltip"}),h("button",{class:{"duet-date-button":true,"duet-no-label":v,"input-error":!!p},onClick:t,disabled:l,ref:k,type:"button",slot:"button"},h("duet-icon",{icon:formDate.svg,margin:"none",size:"small",color:"currentColor"}),h("duet-visually-hidden",null,_,d&&h("span",null,", ",j," ",U.format(d))))),h("input",{type:"hidden",name:i,value:n}))};var DATE_FORMAT=/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{4})$/;var ISO_DATE_FORMAT=/^(\d{4})-(\d{2})-(\d{2})$/;var DATE_OUTPUT_FORMAT="dd.mm.yyyy";var DATE_ISO_OUTPUT_FORMAT="YYYY-MM-DD";function createDate(e,t,a){var i=parseInt(a,10);var r=parseInt(t,10);var n=parseInt(e,10);var d=Number.isInteger(n)&&Number.isInteger(r)&&Number.isInteger(i)&&r>0&&r<=12&&i>0&&i<=31&&n>0;if(d){var o=new Date(n,r-1,i);if(o.getDate()!==i||o.getMonth()!==r-1){return undefined}return o}}function parseDate(e){if(!e){return}var t=e.match(DATE_FORMAT);if(t){return createDate(t[3],t[2],t[1])}}function parseISODate(e){if(!e){return}var t=e.match(ISO_DATE_FORMAT);if(t){return createDate(t[1],t[2],t[3])}}function formatDate(e,t){if(!e){return""}var a=e.getDate().toString(10);var i=(e.getMonth()+1).toString(10);var r=e.getFullYear().toString(10);if(e.getDate()<10){a="0".concat(a)}if(e.getMonth()<9){i="0".concat(i)}return t.replace(/MM/i,i).replace(/YYYY/i,r).replace(/DD/i,a)}function printDate(e){return formatDate(e,DATE_OUTPUT_FORMAT)}function printISODate(e){return formatDate(e,DATE_ISO_OUTPUT_FORMAT)}function isEqual(e,t){if(e==null||t==null){return false}return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function addDays(e,t){var a=new Date(e);a.setDate(a.getDate()+t);return a}function startOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var r=(i<t?7:0)+i-t;a.setDate(a.getDate()-r);return a}function endOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var r=(i<t?-7:0)+6-(i-t);a.setDate(a.getDate()+r);return a}function startOfMonth(e){return new Date(e.getFullYear(),e.getMonth(),1)}function endOfMonth(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function setMonth(e,t){var a=new Date(e);a.setMonth(t);return a}function setYear(e,t){var a=new Date(e);a.setFullYear(t);return a}function inRange(e,t,a){return clamp(e,t,a)===e}function clamp(e,t,a){var i=e.getTime();if(t&&t instanceof Date&&i<t.getTime()){return t}if(a&&a instanceof Date&&i>a.getTime()){return a}return e}function getDaysInRange(e,t){var a=[];var i=e;while(!isEqual(i,t)){a.push(i);i=addDays(i,1)}a.push(i);return a}function getViewOfMonth(e,t){if(t===void 0){t=1}var a=startOfWeek(startOfMonth(e),t);var i=endOfWeek(endOfMonth(e),t);return getDaysInRange(a,i)}var selectedDayLabel={fi:"Valittu päivä",en:"Selected day",sv:"Vald dag"};var DatePickerDay=function(e){var t=e.focusedDay,a=e.today,i=e.day,r=e.language,n=e.onDaySelect,d=e.onKeyboardNavigation,o=e.ref,u=e.inRange,s=e.isSelected;var c=isEqual(i,a);var l=isEqual(i,t);var p=i.getMonth()!==t.getMonth();var b=!u;var m=i18n[r].formatterShort;function f(e){n(e,i)}return h("td",{"data-day":printISODate(i),class:{"duet-date-table-cell":true,selected:s},"aria-label":"".concat(m.format(i)).concat(s?", ".concat(selectedDayLabel[r]):undefined),role:"button",tabIndex:l?0:-1,onClick:f,onKeyDown:d,"aria-disabled":b||p,ref:o},h("span",{class:{"duet-date-table-button":true,outside:b,disabled:p,today:c}},i.getDate()))};function range(e,t){var a=[];for(var i=e;i<=t;i++){a.push(i)}return a}function chunk(e,t){var a=[];for(var i=0;i<e.length;i+=t){a.push(e.slice(i,i+t))}return a}function parseShortcut(e){var t;var a=e.trim().split("+");var i=a.pop();return[((t=a[0])===null||t===void 0?void 0:t.toLowerCase())==="shift",i]}function createShortcuts(e){var t=Object.keys(e).map((function(t){return[parseShortcut(t),e[t]]}));return function e(a){if(!(a instanceof KeyboardEvent)){return}var i=t.find((function(e){var t=e[0],i=t[0],r=t[1];return(r.toUpperCase()===a.key.toUpperCase()||r===a.code)&&i===a.shiftKey}));if(i){i[1](a);a.preventDefault()}}}var DatePickerMonth=function(e){var t=e.selectedDate,a=e.focusedDate,i=e.labelledById,r=e.theme,n=e.language,d=e.min,o=e.max,u=e.onDateSelect,s=e.onKeyboardNavigation,c=e.focusedDayRef,l=e.onFocusEnter,p=e.onFocusExit;var b=i18n[n].dayLabels;var m=new Date;var f=getViewOfMonth(a);function g(e){var t=e.currentTarget;var a=e.relatedTarget;if(a&&!t.contains(a)){p(e)}}return h("div",{role:"application"},h("table",{role:"presentation",class:{"duet-date-table":true,"duet-theme-turva":r==="turva"},"aria-labelledby":i,onFocusin:l,onFocusout:g},h("thead",null,h("tr",null,b.map((function(e){return h("th",{scope:"col"},h("span",{"aria-hidden":"true"},e.substr(0,2)))})))),h("tbody",null,chunk(f,7).map((function(e){return h("tr",{class:"duet-date-table-row"},e.map((function(e){return h(DatePickerDay,{day:e,today:m,language:n,focusedDay:a,inRange:inRange(e,d,o),isSelected:isEqual(e,t),onDaySelect:u,onKeyboardNavigation:s,ref:function(t){if(t&&isEqual(e,a)){c(t)}}})})))})))))};var duetDatePickerCss='*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;vertical-align:top;text-align:left}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}[alignment=form-distribute]>.sc-duet-date-picker-h:last-of-type{margin-right:16px !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:relative;z-index:200;box-sizing:content-box;display:flex;flex-shrink:0;align-items:center;justify-content:center;width:47px;height:48px;color:rgb(8, 42, 77);cursor:pointer;background:rgb(255, 255, 255);border:1px solid rgb(127, 150, 165);border-left-color:rgb(181, 198, 208);border-radius:0 4px 4px 0;transition:box-shadow 150ms ease, border 150ms ease !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:rgb(23, 28, 58);border-color:rgb(143, 147, 158);border-left-color:rgb(199, 202, 207)}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:"";background:linear-gradient(to left, rgba(181, 198, 208, 0.2) 0%, rgba(181, 198, 208, 0.2) 1px, rgba(181, 198, 208, 0.1) 1px, rgba(181, 198, 208, 0) 100%)}.duet-date-button.sc-duet-date-picker:hover:not(:disabled){outline:2px solid;outline-color:rgb(98, 121, 138);outline-offset:-1px}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:hover:not(:disabled),.duet-date-button.sc-duet-date-picker:hover:not(:disabled).duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:hover:not(:disabled),.duet-date-button.sc-duet-date-picker:hover:not(:disabled).duet-theme-turva2{outline-color:rgb(120, 145, 164)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:not-allowed;background:rgb(245, 248, 250) !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:rgb(245, 247, 250) !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker,.duet-date-button.sc-duet-date-picker:focus{height:46px;color:rgb(0, 119, 179)}.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus,.duet-date-button.sc-duet-date-picker:focus:focus{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus,.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus,.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus.duet-theme-turva2,.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus:focus,.duet-date-button.sc-duet-date-picker:focus:focus.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus:focus,.duet-date-button.sc-duet-date-picker:focus:focus.duet-theme-turva2{outline:2px solid;outline-offset:2px;outline-color:rgba(53, 79, 101, 0.8)}.duet-theme-turva.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:rgb(23, 28, 58)}.input-error.sc-duet-date-picker{border-top-color:rgb(214, 28, 82);border-right-color:rgb(214, 28, 82);border-bottom-color:rgb(214, 28, 82)}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;visibility:hidden;width:100%;opacity:0;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;transform:translateZ(0);transform-origin:bottom center;transition:opacity 400ms ease, visibility 400ms ease}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);transition-property:transform, opacity}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:rgb(255, 255, 255);border:1px solid rgb(212, 223, 229);border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:rgb(222, 224, 228)}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;visibility:hidden;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transform:translateZ(0) translateY(100%);transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transform:translateZ(0) translateY(0);transition-property:transform, opacity}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:rgb(8, 42, 77);text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-transform:uppercase;letter-spacing:1px;text-decoration:none}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker:focus{outline:none}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:2.6 !important;vertical-align:initial !important;color:rgb(8, 42, 77) !important;text-align:center;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;color:rgb(23, 28, 58) !important}.duet-date-table-button.sc-duet-date-picker:hover{background:rgb(228, 241, 247) !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:rgb(255, 227, 228) !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:rgb(0, 75, 129) !important;background:rgb(240, 247, 250) !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:rgb(126, 2, 35) !important;background:rgb(255, 241, 241) !important;box-shadow:0 0 0 1px #171c3a !important}.selected.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker,.sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{color:rgb(255, 255, 255) !important;outline:0;background:rgb(0, 119, 179) !important}.duet-theme-turva.sc-duet-date-picker .selected.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{color:rgb(255, 255, 255) !important;background:rgb(198, 12, 48) !important}.duet-date-table-button.sc-duet-date-picker:active{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8);z-index:200;color:rgb(255, 255, 255) !important;background:rgb(0, 119, 179) !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active,.duet-date-table-button.sc-duet-date-picker:active.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active,.duet-date-table-button.sc-duet-date-picker:active.duet-theme-turva2{outline-color:rgba(53, 79, 101, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:rgb(255, 255, 255) !important;background:rgb(198, 12, 48) !important}.sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8);z-index:200}.duet-theme-turva.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker,.sc-duet-date-picker:focus .duet-date-table-button.duet-theme-turva.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker,.sc-duet-date-picker:focus .duet-date-table-button.duet-theme-turva2.sc-duet-date-picker{outline-color:rgba(53, 79, 101, 0.8)}.duet-date-table-button.disabled.sc-duet-date-picker{color:rgb(127, 150, 165) !important;cursor:default;outline:none !important;background:transparent !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:rgb(143, 147, 158) !important;outline:none !important;background:transparent !important}.duet-date-table-button.outside.sc-duet-date-picker{color:rgb(127, 150, 165) !important;pointer-events:none;cursor:default;outline:none;background:rgb(245, 248, 250) !important;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:rgb(143, 147, 158);outline:none;background:rgb(245, 247, 250)}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker .sc-duet-date-picker::part(button){border:0}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1.25rem;font-weight:600;line-height:1.25;color:rgb(8, 42, 77);pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker,.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.duet-theme-turva.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker,.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.duet-theme-turva2.sc-duet-date-picker{outline-color:rgba(53, 79, 101, 0.8)}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid rgb(181, 198, 208)}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:rgb(199, 202, 207)}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:rgb(8, 42, 77) !important;-webkit-appearance:none;appearance:none;cursor:pointer;background:rgb(245, 248, 250) !important;border-radius:50%}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:rgb(245, 247, 250) !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:rgb(245, 248, 250) !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:rgb(245, 247, 250) !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus,.duet-date-picker-close.sc-duet-date-picker:focus.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus,.duet-date-picker-close.sc-duet-date-picker:focus.duet-theme-turva2{outline-color:rgba(53, 79, 101, 0.8)}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:rgb(23, 42, 59)}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.duet-date-input-has-focus.sc-duet-date-picker(.duet-theme-turva2).sc-duet-date-picker .duet-theme-turva.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker:focus{color:rgb(23, 42, 59)}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{color:rgb(23, 42, 59) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover:not(.disabled){background:rgb(251, 225, 209) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{background:rgb(253, 247, 242) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:rgb(120, 145, 164) !important;background:rgb(245, 246, 247) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:rgb(199, 202, 207) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker [aria-pressed=true].sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.duet-date-table.sc-duet-date-picker{color:rgb(23, 42, 59)}';var DuetDatePickerStyle0=duetDatePickerCss;var DuetDatePicker=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",7);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.monthSelectId=createID("DuetDatePicker");this.yearSelectId=createID("DuetDatePicker");this.dialogLabelId=createID("DuetDatePicker");this.initialTouchX=null;this.initialTouchY=null;this.focusTarget=null;this.dateErrorMessages={badInput:{en:"Wrong date format",fi:"Väärä päivämäärämuoto",sv:"Fel datumformat"},rangeUnderflow:{en:"Date too early",fi:"Liian aikainen päivämäärä",sv:"Datum för tidigt"},rangeOverflow:{en:"Date too late",fi:"Liian myöhäinen päivämäärä",sv:"Datum för sent"},valueMissing:{en:"Date required",fi:"Päivämäärä vaaditaan",sv:"Datum krävs"}};this.enableActiveFocus=function(){t.focusTarget="day-button"};this.disableActiveFocus=function(){t.focusTarget=null};this.toggleOpen=function(e){e.preventDefault();t.open?t.hide(false):t.show()};this.handleBlur=function(e){e.stopPropagation();t.inputHasFocus=false;if(!t._validity.valid){t.value=null;var a=Object.entries(t._validity).find((function(e){return!!e[1]}))[0];t.internalValidityError=getLocaleString(t.dateErrorMessages[a])}t.duetBlur.emit({component:"duet-date-picker"})};this.handleFocus=function(e){e.stopPropagation();t.inputHasFocus=true;t.duetFocus.emit({component:"duet-date-picker"})};this.handleTouchStart=function(e){var a=e.changedTouches[0];t.initialTouchX=a.pageX;t.initialTouchY=a.pageY};this.handleTouchMove=function(e){e.preventDefault()};this.handleTouchEnd=function(e){var a=e.changedTouches[0];var i=a.pageX-t.initialTouchX;var r=a.pageY-t.initialTouchY;var n=70;var d=Math.abs(i)>=n&&Math.abs(r)<=n;var o=Math.abs(r)>=n&&Math.abs(i)<=n&&r>0;if(d){t.addMonths(i<0?1:-1)}else if(o){t.hide();e.preventDefault()}t.initialTouchY=null;t.initialTouchX=null};this.handleNextMonthClick=function(e){e.preventDefault();t.addMonths(1)};this.handlePreviousMonthClick=function(e){e.preventDefault();t.addMonths(-1)};this.handleEscKey=createShortcuts({Escape:function(){return t.hide()},Esc:function(){return t.hide()}});this.handleKeyboardNavigation=createShortcuts({ArrowRight:function(){return t.addDays(1)},Right:function(){return t.addDays(1)},ArrowLeft:function(){return t.addDays(-1)},Left:function(){return t.addDays(-1)},ArrowDown:function(){return t.addDays(7)},Down:function(){return t.addDays(7)},ArrowUp:function(){return t.addDays(-7)},Up:function(){return t.addDays(-7)},Home:function(){return t.startOfWeek()},End:function(){return t.endOfWeek()},PageUp:function(){return t.addMonths(-1)},PageDown:function(){return t.addMonths(1)},"Shift+PageUp":function(){return t.addYears(-1)},"Shift+PageDown":function(){return t.addYears(1)},Space:function(e){return t.handleKeyboardDaySelect(e)},Enter:function(e){return t.handleKeyboardDaySelect(e)}});this.handleKeyboardDaySelect=function(e){var a=e.target;var i=parseISODate(a.dataset.day);t.handleDaySelect(e,i)};this.handleDaySelect=function(e,a){var i=parseISODate(t.min);var r=parseISODate(t.max);t.determineValidity(a);if(inRange(a,i,r)){t.setValue(a);t.hide()}};this.handleMonthSelect=function(e){t.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=function(e){t.setYear(parseInt(e.target.value,10))};this.handleInputChange=function(e){t.inputValue=e.detail.value;var a=parseDate(t.inputValue);t.determineValidity(a);if(a||t.inputValue===""){t.setValue(a)}};this.open=false;this.focusedDay=new Date;this.inputValue="";this.inputHasFocus=false;this.internalValidityError="";this.theme="";this.expand=false;this.name="";this.identifier="";this.label="";this.caption=undefined;this.margin="auto";this.language=getLanguage();this.placeholderDefaults={fi:"pp.kk.vvvv",en:"dd.mm.yyyy",sv:"dd.mm.åååå"};this.placeholder=getLocaleString(this.placeholderDefaults,this.language);this.echoPlaceholder=false;this.disabled=false;this.error="";this.disableBuiltInErrors=false;this.labelHidden=false;this.role=undefined;this.accessibleActiveDescendant=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.required=false;this.direction="right";this.tooltip="";this.tooltipDirection="auto";this.value="";this.min="";this.max="";this.incrementYears=10;this.accessibleLiveError="polite"}Object.defineProperty(e.prototype,"validity",{get:function(){return this._validity},enumerable:false,configurable:true});e.prototype.updateValidity=function(e,t,a){if(a==="value"&&e===null){return}this.determineValidity(parseISODate(this.value));if(this._validity.valid){this.internalValidityError=""}};e.prototype.updateInternalValue=function(){if(this.value===null){return}var e=parseISODate(this.value);var t=parseDate(this.inputValue);if(!e){this.inputValue=""}else if(!isEqual(e,t)){this.inputValue=printDate(e)}};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.determineValidity(parseISODate(this.value));this.updateInternalValue();checkNamedSlotElement(this.element,"tooltip","duet-tooltip",1,true)};e.prototype.componentDidUpdate=function(){switch(this.focusTarget){case"toggle-button":this.datePickerButton.focus();this.focusTarget=null;break;case"day-button":this.focusedDayNode.focus();break;case"month-select":this.monthSelectNode.focus();this.focusTarget=null;break}};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"placeholder",defaults:"placeholderDefaults"})};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.datePickerInput.setFocus(e);return[2]}))}))};e.prototype.show=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.open=true;this.focusTarget="month-select";this.setFocusedDay(parseISODate(this.value)||new Date);return[2]}))}))};e.prototype.hide=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=true}return __generator(this,(function(t){this.open=false;if(e){this.focusTarget="toggle-button"}return[2]}))}))};e.prototype.addDays=function(e){this.setFocusedDay(addDays(this.focusedDay,e))};e.prototype.addMonths=function(e){this.setMonth(this.focusedDay.getMonth()+e)};e.prototype.addYears=function(e){this.setYear(this.focusedDay.getFullYear()+e)};e.prototype.startOfWeek=function(){this.setFocusedDay(startOfWeek(this.focusedDay))};e.prototype.endOfWeek=function(){this.setFocusedDay(endOfWeek(this.focusedDay))};e.prototype.setMonth=function(e){var t=setMonth(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setMonth(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setYear=function(e){var t=setYear(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setYear(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setFocusedDay=function(e){this.focusedDay=clamp(e,parseISODate(this.min),parseISODate(this.max))};e.prototype.determineValidity=function(e){var t,a;var i=(a=(t=this.datePickerInput)===null||t===void 0?void 0:t.value)!==null&&a!==void 0?a:"";var r=i!==""&&e==null;var n=this.required&&e==null;var d=e?!inRange(e,null,parseISODate(this.max)):false;var o=e?!inRange(e,parseISODate(this.min)):false;this._validity={patternMismatch:false,customError:false,stepMismatch:false,tooLong:false,tooShort:false,typeMismatch:false,badInput:r,rangeUnderflow:o,rangeOverflow:d,valueMissing:n,valid:!(n||r||o||d)}};e.prototype.setValue=function(e){var t=printISODate(e);if(t===this.value){return}this.value=t;this.duetChange.emit({component:"duet-date-picker",value:this.value,valueAsDate:e})};e.prototype.handleDocumentClick=function(e){var t=this;if(!this.open){return}var a=e.composedPath().every((function(e){return e!==t.dialogWrapperNode&&e!==t.datePickerButton}));if(a){this.hide(false)}};e.prototype.render=function(){var e=this;var t=parseISODate(this.value);var a=(t||this.focusedDay).getFullYear();var i=this.focusedDay.getMonth();var r=this.focusedDay.getFullYear();var n=i18n[this.language];var d=parseISODate(this.min);var o=parseISODate(this.max);var u=d!=null&&d.getMonth()===i&&d.getFullYear()===r;var s=o!=null&&o.getMonth()===i&&o.getFullYear()===r;var c=a-this.incrementYears;var l=a+this.incrementYears;if(d){c=Math.max(c,d.getFullYear())}if(o){l=Math.min(l,o.getFullYear())}return h(Host,{class:{"duet-expand":this.expand,"duet-m-0":this.margin==="none"}},h("div",{class:"duet-date"},h(DatePickerInput,{hasFocus:this.inputHasFocus,value:this.value,valueAsDate:t,formattedValue:this.inputValue,language:this.language,onInput:this.handleInputChange,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.toggleOpen,name:this.name,disabled:this.disabled,error:this.error||!this.disableBuiltInErrors&&this.internalValidityError||null,role:this.role,required:this.required,theme:this.theme,tooltip:this.tooltip,tooltipDirection:this.tooltipDirection,labelHidden:this.labelHidden,placeholder:this.placeholder,inputLabel:this.label,identifier:this.identifier,buttonRef:function(t){return e.datePickerButton=t},inputRef:function(t){return e.datePickerInput=t},accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy,accessibleLiveError:this.accessibleLiveError,echoPlaceholder:this.echoPlaceholder,caption:this.caption})),h("div",{class:{"duet-theme-turva":this.theme==="turva","duet-date-dialog":true,left:this.direction==="left",error:!!this.error,active:this.open},role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-labelledby":this.dialogLabelId,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h("duet-overlay",{visible:this.open,"display-device":"x-small"}),h(FocusGuard,{moveFocusTo:this.focusedDayNode}),h("div",{class:"duet-date-dialog-wrapper",onKeyDown:this.handleEscKey,ref:function(t){return e.dialogWrapperNode=t}},h("duet-visually-hidden",{"aria-live":"polite"},n.keyboardInstruction),h("div",{class:"duet-date-dialog-mobile-header"},h("duet-label",{margin:"none"},this.label),h("button",{class:"duet-date-picker-close",ref:function(t){return e.closeButtonNode=t},onClick:function(){return e.hide()},type:"button"},h("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xx-small"}),h("duet-visually-hidden",null,n.closeLabel))),h("div",{class:"duet-date-dialog-header"},h("div",{class:"duet-date-dialog-dropdowns"},h("duet-visually-hidden",null,h("h2",{id:this.dialogLabelId,"aria-live":"polite","aria-atomic":"true"},n.monthLabels[i]," ",this.focusedDay.getFullYear())),h("duet-visually-hidden",null,h("label",{htmlFor:this.monthSelectId},n.monthSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.monthSelectId,class:"duet-date-month-select",ref:function(t){return e.monthSelectNode=t},onChange:this.handleMonthSelect},n.monthLabels.map((function(e,t){return h("option",{key:e,value:t,selected:t===i,disabled:!inRange(new Date(r,t,1),d?startOfMonth(d):null,o?endOfMonth(o):null)},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,n.monthLabelsShort[i]),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"}))),h("duet-visually-hidden",null,h("label",{htmlFor:this.yearSelectId},n.yearSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.yearSelectId,class:"duet-date-year-select",onChange:this.handleYearSelect},range(c,l).map((function(e){return h("option",{key:e,selected:e===r},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,this.focusedDay.getFullYear()),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"})))),h("div",{class:"duet-date-dialog-buttons"},h("duet-action-button",{accessibleLabel:i18n[this.language].prevMonthLabel,actionName:i18n[this.language].prevMonthLabel,class:"duet-date-dialog-prev",onClick:this.handlePreviousMonthClick,disabled:u,"icon-name":"action-arrow-left-small"},n.prevMonthLabel),h("duet-action-button",{accessibleLabel:i18n[this.language].nextMonthLabel,actionName:i18n[this.language].nextMonthLabel,class:"duet-date-dialog-next",onClick:this.handleNextMonthClick,disabled:s,"icon-name":"action-arrow-right-small"},n.nextMonthLabel))),h(DatePickerMonth,{selectedDate:t,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,language:this.language,theme:this.theme,min:d,max:o,focusedDayRef:function(t){return e.focusedDayNode=t},onFocusEnter:this.enableActiveFocus,onFocusExit:this.disableActiveFocus})),h(FocusGuard,{moveFocusTo:this.closeButtonNode})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{min:["updateValidity"],max:["updateValidity"],value:["updateValidity","updateInternalValue"],required:["updateValidity"]}},enumerable:false,configurable:true});return e}();DuetDatePicker.style=DuetDatePickerStyle0;export{DuetDatePicker as duet_date_picker};
|
|
4
|
+
*/import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-e0645409.js";import{i as inheritGlobalTheme}from"./themeable-component-f1c77a5d.js";import{c as createID}from"./create-id-149a1b6d.js";import{F as FocusGuard}from"./focus-utils-8dcbe898.js";import{g as getLocaleString,a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-5c6108e9.js";import{c as checkNamedSlotElement}from"./slot-utils-0bb6f129.js";import"./string-utils-192eb3c8.js";var formatOptionsShort={day:"numeric",month:"long",weekday:"long"};var formatOptionsLong={day:"numeric",month:"long",year:"numeric"};var i18n={fi:{buttonLabel:"Valitse päivämäärä",prevMonthLabel:"Edellinen kuukausi",nextMonthLabel:"Seuraava kuukausi",monthSelectLabel:"Kuukausi",yearSelectLabel:"Vuosi",closeLabel:"Sulje ikkuna",selected:"Valittu päivämäärä on",keyboardInstruction:"Voit navigoida päivämääriä nuolinäppäimillä",dayLabels:["Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai","Sunnuntai"],monthLabels:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthLabelsShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],formatterShort:new Intl.DateTimeFormat("fi-FI",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("fi-FI",formatOptionsLong)},en:{buttonLabel:"Choose date",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",selected:"Selected date is",keyboardInstruction:"You can use arrow keys to navigate dates",dayLabels:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthLabels:["January","February","March","April","May","June","July","August","September","October","November","December"],monthLabelsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("en-GB",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("en-GB",formatOptionsLong)},sv:{buttonLabel:"Välj datum",prevMonthLabel:"Föregående månad",nextMonthLabel:"Nästa månad",monthSelectLabel:"Månad",yearSelectLabel:"År",closeLabel:"Stäng fönstret",selected:"Valt datum är",keyboardInstruction:"Använd piltangenterna för att navigera i kalender",dayLabels:["Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],monthLabels:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthLabelsShort:["Jan","Feb","Mars","April","Maj","Juni","Juli","Aug","Sep","Okt","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("sv-SE",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("sv-SE",formatOptionsLong)}};var formDate={title:"form-date",tags:"form date calendar date picker",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M2.25 24A2.252 2.252 0 0 1 0 21.75V5.25A2.252 2.252 0 0 1 2.25 3H6V.75a.75.75 0 0 1 1.5 0V3h9V.75a.75.75 0 0 1 1.5 0V3h3.75A2.252 2.252 0 0 1 24 5.25v16.5A2.252 2.252 0 0 1 21.75 24zm-.75-2.25c0 .414.336.75.75.75h19.5a.75.75 0 0 0 .75-.75V10.5h-21zM22.5 9V5.25a.75.75 0 0 0-.75-.75H18V6a.75.75 0 0 1-1.5 0V4.5h-9V6A.75.75 0 0 1 6 6V4.5H2.25a.75.75 0 0 0-.75.75V9z"/><circle cx="5.625" cy="13.875" r="1.125"/><circle cx="5.625" cy="19.125" r="1.125"/><circle cx="12" cy="13.875" r="1.125"/><circle cx="12" cy="19.125" r="1.125"/><circle cx="18.375" cy="13.875" r="1.125"/><path d="M18.375 20.25c-.62 0-1.125-.505-1.125-1.125a1.127 1.127 0 0 1 1.171-1.122l.027.003a1.118 1.118 0 0 1 1.052 1.12c0 .619-.505 1.124-1.125 1.124z"/></svg>'};var DatePickerInput=function(e){var t=e.onClick,a=e.placeholder,i=e.name,r=e.inputLabel,n=e.value,d=e.valueAsDate,o=e.formattedValue,u=e.language,s=e.identifier,c=e.theme,l=e.disabled,p=e.error,b=e.role,m=e.required,f=e.tooltip,g=e.tooltipDirection,v=e.labelHidden,k=e.buttonRef,y=e.inputRef,x=e.onInput,w=e.onBlur,D=e.onFocus,S=e.hasFocus,O=e.accessibleActiveDescendant,I=e.accessibleControls,M=e.accessibleOwns,L=e.accessibleDescribedBy,E=e.accessibleLiveError,A=e.echoPlaceholder,T=e.caption;var F=i18n[u],_=F.buttonLabel,j=F.selected,U=F.formatterLong;var C={"duet-theme-turva":c==="turva","duet-date-input":true,"duet-date-input-has-focus":S};return h("div",{class:C},h("duet-input",{label:r,value:o,placeholder:a,id:s,disabled:l,theme:c,error:p,role:b,required:m,tooltip:f,tooltipDirection:g,margin:"none",labelHidden:v,accessibleAutocomplete:"none",onDuetInput:x,onDuetFocus:D,onDuetBlur:w,autoComplete:"off",disallowPattern:"[^0-9\\.\\-\\/]",expand:true,ref:y,accessibleActiveDescendant:O,accessibleControls:I,accessibleOwns:M,accessibleDescribedBy:L,accessibleLiveError:E,echoPlaceholder:A,caption:T,variation:"button"},h("slot",{name:"tooltip"}),h("button",{class:{"duet-date-button":true,"duet-no-label":v,"input-error":!!p},onClick:t,disabled:l,ref:k,type:"button",slot:"button"},h("duet-icon",{icon:formDate.svg,margin:"none",size:"small",color:"currentColor"}),h("duet-visually-hidden",null,_,d&&h("span",null,", ",j," ",U.format(d))))),h("input",{type:"hidden",name:i,value:n}))};var DATE_FORMAT=/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{4})$/;var ISO_DATE_FORMAT=/^(\d{4})-(\d{2})-(\d{2})$/;var DATE_OUTPUT_FORMAT="dd.mm.yyyy";var DATE_ISO_OUTPUT_FORMAT="YYYY-MM-DD";function createDate(e,t,a){var i=parseInt(a,10);var r=parseInt(t,10);var n=parseInt(e,10);var d=Number.isInteger(n)&&Number.isInteger(r)&&Number.isInteger(i)&&r>0&&r<=12&&i>0&&i<=31&&n>0;if(d){var o=new Date(n,r-1,i);if(o.getDate()!==i||o.getMonth()!==r-1){return undefined}return o}}function parseDate(e){if(!e){return}var t=e.match(DATE_FORMAT);if(t){return createDate(t[3],t[2],t[1])}}function parseISODate(e){if(!e){return}var t=e.match(ISO_DATE_FORMAT);if(t){return createDate(t[1],t[2],t[3])}}function formatDate(e,t){if(!e){return""}var a=e.getDate().toString(10);var i=(e.getMonth()+1).toString(10);var r=e.getFullYear().toString(10);if(e.getDate()<10){a="0".concat(a)}if(e.getMonth()<9){i="0".concat(i)}return t.replace(/MM/i,i).replace(/YYYY/i,r).replace(/DD/i,a)}function printDate(e){return formatDate(e,DATE_OUTPUT_FORMAT)}function printISODate(e){return formatDate(e,DATE_ISO_OUTPUT_FORMAT)}function isEqual(e,t){if(e==null||t==null){return false}return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function addDays(e,t){var a=new Date(e);a.setDate(a.getDate()+t);return a}function startOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var r=(i<t?7:0)+i-t;a.setDate(a.getDate()-r);return a}function endOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var r=(i<t?-7:0)+6-(i-t);a.setDate(a.getDate()+r);return a}function startOfMonth(e){return new Date(e.getFullYear(),e.getMonth(),1)}function endOfMonth(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function setMonth(e,t){var a=new Date(e);a.setMonth(t);return a}function setYear(e,t){var a=new Date(e);a.setFullYear(t);return a}function inRange(e,t,a){return clamp(e,t,a)===e}function clamp(e,t,a){var i=e.getTime();if(t&&t instanceof Date&&i<t.getTime()){return t}if(a&&a instanceof Date&&i>a.getTime()){return a}return e}function getDaysInRange(e,t){var a=[];var i=e;while(!isEqual(i,t)){a.push(i);i=addDays(i,1)}a.push(i);return a}function getViewOfMonth(e,t){if(t===void 0){t=1}var a=startOfWeek(startOfMonth(e),t);var i=endOfWeek(endOfMonth(e),t);return getDaysInRange(a,i)}var selectedDayLabel={fi:"Valittu päivä",en:"Selected day",sv:"Vald dag"};var DatePickerDay=function(e){var t=e.focusedDay,a=e.today,i=e.day,r=e.language,n=e.onDaySelect,d=e.onKeyboardNavigation,o=e.ref,u=e.inRange,s=e.isSelected;var c=isEqual(i,a);var l=isEqual(i,t);var p=i.getMonth()!==t.getMonth();var b=!u;var m=i18n[r].formatterShort;function f(e){n(e,i)}return h("td",{"data-day":printISODate(i),class:{"duet-date-table-cell":true,selected:s},"aria-label":"".concat(m.format(i)).concat(s?", ".concat(selectedDayLabel[r]):undefined),role:"button",tabIndex:l?0:-1,onClick:f,onKeyDown:d,"aria-disabled":b||p,ref:o},h("span",{class:{"duet-date-table-button":true,outside:b,disabled:p,today:c}},i.getDate()))};function range(e,t){var a=[];for(var i=e;i<=t;i++){a.push(i)}return a}function chunk(e,t){var a=[];for(var i=0;i<e.length;i+=t){a.push(e.slice(i,i+t))}return a}function parseShortcut(e){var t;var a=e.trim().split("+");var i=a.pop();return[((t=a[0])===null||t===void 0?void 0:t.toLowerCase())==="shift",i]}function createShortcuts(e){var t=Object.keys(e).map((function(t){return[parseShortcut(t),e[t]]}));return function e(a){if(!(a instanceof KeyboardEvent)){return}var i=t.find((function(e){var t=e[0],i=t[0],r=t[1];return(r.toUpperCase()===a.key.toUpperCase()||r===a.code)&&i===a.shiftKey}));if(i){i[1](a);a.preventDefault()}}}var DatePickerMonth=function(e){var t=e.selectedDate,a=e.focusedDate,i=e.labelledById,r=e.theme,n=e.language,d=e.min,o=e.max,u=e.onDateSelect,s=e.onKeyboardNavigation,c=e.focusedDayRef,l=e.onFocusEnter,p=e.onFocusExit;var b=i18n[n].dayLabels;var m=new Date;var f=getViewOfMonth(a);function g(e){var t=e.currentTarget;var a=e.relatedTarget;if(a&&!t.contains(a)){p(e)}}return h("div",{role:"application"},h("table",{role:"presentation",class:{"duet-date-table":true,"duet-theme-turva":r==="turva"},"aria-labelledby":i,onFocusin:l,onFocusout:g},h("thead",null,h("tr",null,b.map((function(e){return h("th",{scope:"col"},h("span",{"aria-hidden":"true"},e.substr(0,2)))})))),h("tbody",null,chunk(f,7).map((function(e){return h("tr",{class:"duet-date-table-row"},e.map((function(e){return h(DatePickerDay,{day:e,today:m,language:n,focusedDay:a,inRange:inRange(e,d,o),isSelected:isEqual(e,t),onDaySelect:u,onKeyboardNavigation:s,ref:function(t){if(t&&isEqual(e,a)){c(t)}}})})))})))))};var duetDatePickerCss='*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;vertical-align:top;text-align:left}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}[alignment=form-distribute]>.sc-duet-date-picker-h:last-of-type:not(:last-child){margin-right:16px !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:relative;z-index:200;box-sizing:content-box;display:flex;flex-shrink:0;align-items:center;justify-content:center;width:47px;height:48px;color:rgb(8, 42, 77);cursor:pointer;background:rgb(255, 255, 255);border:1px solid rgb(127, 150, 165);border-left-color:rgb(181, 198, 208);border-radius:0 4px 4px 0;transition:box-shadow 150ms ease, border 150ms ease !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:rgb(23, 28, 58);border-color:rgb(143, 147, 158);border-left-color:rgb(199, 202, 207)}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:"";background:linear-gradient(to left, rgba(181, 198, 208, 0.2) 0%, rgba(181, 198, 208, 0.2) 1px, rgba(181, 198, 208, 0.1) 1px, rgba(181, 198, 208, 0) 100%)}.duet-date-button.sc-duet-date-picker:hover:not(:disabled){outline:2px solid;outline-color:rgb(98, 121, 138);outline-offset:-1px}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:hover:not(:disabled),.duet-date-button.sc-duet-date-picker:hover:not(:disabled).duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:hover:not(:disabled),.duet-date-button.sc-duet-date-picker:hover:not(:disabled).duet-theme-turva2{outline-color:rgb(120, 145, 164)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:not-allowed;background:rgb(245, 248, 250) !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:rgb(245, 247, 250) !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker,.duet-date-button.sc-duet-date-picker:focus{height:46px;color:rgb(0, 119, 179)}.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus,.duet-date-button.sc-duet-date-picker:focus:focus{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus,.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus,.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus.duet-theme-turva2,.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus:focus,.duet-date-button.sc-duet-date-picker:focus:focus.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus:focus,.duet-date-button.sc-duet-date-picker:focus:focus.duet-theme-turva2{outline:2px solid;outline-offset:2px;outline-color:rgba(53, 79, 101, 0.8)}.duet-theme-turva.duet-date-input-has-focus.sc-duet-date-picker .duet-date-button.sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:rgb(23, 28, 58)}.input-error.sc-duet-date-picker{border-top-color:rgb(214, 28, 82);border-right-color:rgb(214, 28, 82);border-bottom-color:rgb(214, 28, 82)}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;visibility:hidden;width:100%;opacity:0;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;transform:translateZ(0);transform-origin:bottom center;transition:opacity 400ms ease, visibility 400ms ease}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);transition-property:transform, opacity}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:rgb(255, 255, 255);border:1px solid rgb(212, 223, 229);border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:rgb(222, 224, 228)}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;visibility:hidden;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transform:translateZ(0) translateY(100%);transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transform:translateZ(0) translateY(0);transition-property:transform, opacity}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:rgb(8, 42, 77);text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-transform:uppercase;letter-spacing:1px;text-decoration:none}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker:focus{outline:none}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:2.6 !important;vertical-align:initial !important;color:rgb(8, 42, 77) !important;text-align:center;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;color:rgb(23, 28, 58) !important}.duet-date-table-button.sc-duet-date-picker:hover{background:rgb(228, 241, 247) !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:rgb(255, 227, 228) !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:rgb(0, 75, 129) !important;background:rgb(240, 247, 250) !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:rgb(126, 2, 35) !important;background:rgb(255, 241, 241) !important;box-shadow:0 0 0 1px #171c3a !important}.selected.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker,.sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{color:rgb(255, 255, 255) !important;outline:0;background:rgb(0, 119, 179) !important}.duet-theme-turva.sc-duet-date-picker .selected.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{color:rgb(255, 255, 255) !important;background:rgb(198, 12, 48) !important}.duet-date-table-button.sc-duet-date-picker:active{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8);z-index:200;color:rgb(255, 255, 255) !important;background:rgb(0, 119, 179) !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active,.duet-date-table-button.sc-duet-date-picker:active.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active,.duet-date-table-button.sc-duet-date-picker:active.duet-theme-turva2{outline-color:rgba(53, 79, 101, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:rgb(255, 255, 255) !important;background:rgb(198, 12, 48) !important}.sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8);z-index:200}.duet-theme-turva.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker,.sc-duet-date-picker:focus .duet-date-table-button.duet-theme-turva.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker,.sc-duet-date-picker:focus .duet-date-table-button.duet-theme-turva2.sc-duet-date-picker{outline-color:rgba(53, 79, 101, 0.8)}.duet-date-table-button.disabled.sc-duet-date-picker{color:rgb(127, 150, 165) !important;cursor:default;outline:none !important;background:transparent !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:rgb(143, 147, 158) !important;outline:none !important;background:transparent !important}.duet-date-table-button.outside.sc-duet-date-picker{color:rgb(127, 150, 165) !important;pointer-events:none;cursor:default;outline:none;background:rgb(245, 248, 250) !important;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:rgb(143, 147, 158);outline:none;background:rgb(245, 247, 250)}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker .sc-duet-date-picker::part(button){border:0}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1.25rem;font-weight:600;line-height:1.25;color:rgb(8, 42, 77);pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker,.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.duet-theme-turva.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker,.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.duet-theme-turva2.sc-duet-date-picker{outline-color:rgba(53, 79, 101, 0.8)}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid rgb(181, 198, 208)}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:rgb(199, 202, 207)}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:rgb(8, 42, 77) !important;-webkit-appearance:none;appearance:none;cursor:pointer;background:rgb(245, 248, 250) !important;border-radius:50%}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:rgb(245, 247, 250) !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:rgb(245, 248, 250) !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:rgb(245, 247, 250) !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus,.duet-date-picker-close.sc-duet-date-picker:focus.duet-theme-turva,.duet-theme-turva2.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus,.duet-date-picker-close.sc-duet-date-picker:focus.duet-theme-turva2{outline-color:rgba(53, 79, 101, 0.8)}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:rgb(23, 42, 59)}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.duet-date-input-has-focus.sc-duet-date-picker(.duet-theme-turva2).sc-duet-date-picker .duet-theme-turva.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker:focus{color:rgb(23, 42, 59)}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{color:rgb(23, 42, 59) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover:not(.disabled){background:rgb(251, 225, 209) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{background:rgb(253, 247, 242) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:rgb(120, 145, 164) !important;background:rgb(245, 246, 247) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:rgb(199, 202, 207) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker [aria-pressed=true].sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker,.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.sc-duet-date-picker .sc-duet-date-picker:focus .duet-date-table-button.sc-duet-date-picker{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva2.sc-duet-date-picker-h .duet-theme-turva.duet-date-table.sc-duet-date-picker{color:rgb(23, 42, 59)}';var DuetDatePickerStyle0=duetDatePickerCss;var DuetDatePicker=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",7);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.monthSelectId=createID("DuetDatePicker");this.yearSelectId=createID("DuetDatePicker");this.dialogLabelId=createID("DuetDatePicker");this.initialTouchX=null;this.initialTouchY=null;this.focusTarget=null;this.dateErrorMessages={badInput:{en:"Wrong date format",fi:"Väärä päivämäärämuoto",sv:"Fel datumformat"},rangeUnderflow:{en:"Date too early",fi:"Liian aikainen päivämäärä",sv:"Datum för tidigt"},rangeOverflow:{en:"Date too late",fi:"Liian myöhäinen päivämäärä",sv:"Datum för sent"},valueMissing:{en:"Date required",fi:"Päivämäärä vaaditaan",sv:"Datum krävs"}};this.enableActiveFocus=function(){t.focusTarget="day-button"};this.disableActiveFocus=function(){t.focusTarget=null};this.toggleOpen=function(e){e.preventDefault();t.open?t.hide(false):t.show()};this.handleBlur=function(e){e.stopPropagation();t.inputHasFocus=false;if(!t._validity.valid){t.value=null;var a=Object.entries(t._validity).find((function(e){return!!e[1]}))[0];t.internalValidityError=getLocaleString(t.dateErrorMessages[a])}t.duetBlur.emit({component:"duet-date-picker"})};this.handleFocus=function(e){e.stopPropagation();t.inputHasFocus=true;t.duetFocus.emit({component:"duet-date-picker"})};this.handleTouchStart=function(e){var a=e.changedTouches[0];t.initialTouchX=a.pageX;t.initialTouchY=a.pageY};this.handleTouchMove=function(e){e.preventDefault()};this.handleTouchEnd=function(e){var a=e.changedTouches[0];var i=a.pageX-t.initialTouchX;var r=a.pageY-t.initialTouchY;var n=70;var d=Math.abs(i)>=n&&Math.abs(r)<=n;var o=Math.abs(r)>=n&&Math.abs(i)<=n&&r>0;if(d){t.addMonths(i<0?1:-1)}else if(o){t.hide();e.preventDefault()}t.initialTouchY=null;t.initialTouchX=null};this.handleNextMonthClick=function(e){e.preventDefault();t.addMonths(1)};this.handlePreviousMonthClick=function(e){e.preventDefault();t.addMonths(-1)};this.handleEscKey=createShortcuts({Escape:function(){return t.hide()},Esc:function(){return t.hide()}});this.handleKeyboardNavigation=createShortcuts({ArrowRight:function(){return t.addDays(1)},Right:function(){return t.addDays(1)},ArrowLeft:function(){return t.addDays(-1)},Left:function(){return t.addDays(-1)},ArrowDown:function(){return t.addDays(7)},Down:function(){return t.addDays(7)},ArrowUp:function(){return t.addDays(-7)},Up:function(){return t.addDays(-7)},Home:function(){return t.startOfWeek()},End:function(){return t.endOfWeek()},PageUp:function(){return t.addMonths(-1)},PageDown:function(){return t.addMonths(1)},"Shift+PageUp":function(){return t.addYears(-1)},"Shift+PageDown":function(){return t.addYears(1)},Space:function(e){return t.handleKeyboardDaySelect(e)},Enter:function(e){return t.handleKeyboardDaySelect(e)}});this.handleKeyboardDaySelect=function(e){var a=e.target;var i=parseISODate(a.dataset.day);t.handleDaySelect(e,i)};this.handleDaySelect=function(e,a){var i=parseISODate(t.min);var r=parseISODate(t.max);t.determineValidity(a);if(inRange(a,i,r)){t.setValue(a);t.hide()}};this.handleMonthSelect=function(e){t.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=function(e){t.setYear(parseInt(e.target.value,10))};this.handleInputChange=function(e){t.inputValue=e.detail.value;var a=parseDate(t.inputValue);t.determineValidity(a);if(a||t.inputValue===""){t.setValue(a)}};this.open=false;this.focusedDay=new Date;this.inputValue="";this.inputHasFocus=false;this.internalValidityError="";this.theme="";this.expand=false;this.name="";this.identifier="";this.label="";this.caption=undefined;this.margin="auto";this.language=getLanguage();this.placeholderDefaults={fi:"pp.kk.vvvv",en:"dd.mm.yyyy",sv:"dd.mm.åååå"};this.placeholder=getLocaleString(this.placeholderDefaults,this.language);this.echoPlaceholder=false;this.disabled=false;this.error="";this.disableBuiltInErrors=false;this.labelHidden=false;this.role=undefined;this.accessibleActiveDescendant=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.required=false;this.direction="right";this.tooltip="";this.tooltipDirection="auto";this.value="";this.min="";this.max="";this.incrementYears=10;this.accessibleLiveError="polite"}Object.defineProperty(e.prototype,"validity",{get:function(){return this._validity},enumerable:false,configurable:true});e.prototype.updateValidity=function(e,t,a){if(a==="value"&&e===null){return}this.determineValidity(parseISODate(this.value));if(this._validity.valid){this.internalValidityError=""}};e.prototype.updateInternalValue=function(){if(this.value===null){return}var e=parseISODate(this.value);var t=parseDate(this.inputValue);if(!e){this.inputValue=""}else if(!isEqual(e,t)){this.inputValue=printDate(e)}};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.determineValidity(parseISODate(this.value));this.updateInternalValue();checkNamedSlotElement(this.element,"tooltip","duet-tooltip",1,true)};e.prototype.componentDidUpdate=function(){switch(this.focusTarget){case"toggle-button":this.datePickerButton.focus();this.focusTarget=null;break;case"day-button":this.focusedDayNode.focus();break;case"month-select":this.monthSelectNode.focus();this.focusTarget=null;break}};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"placeholder",defaults:"placeholderDefaults"})};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.datePickerInput.setFocus(e);return[2]}))}))};e.prototype.show=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.open=true;this.focusTarget="month-select";this.setFocusedDay(parseISODate(this.value)||new Date);return[2]}))}))};e.prototype.hide=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=true}return __generator(this,(function(t){this.open=false;if(e){this.focusTarget="toggle-button"}return[2]}))}))};e.prototype.addDays=function(e){this.setFocusedDay(addDays(this.focusedDay,e))};e.prototype.addMonths=function(e){this.setMonth(this.focusedDay.getMonth()+e)};e.prototype.addYears=function(e){this.setYear(this.focusedDay.getFullYear()+e)};e.prototype.startOfWeek=function(){this.setFocusedDay(startOfWeek(this.focusedDay))};e.prototype.endOfWeek=function(){this.setFocusedDay(endOfWeek(this.focusedDay))};e.prototype.setMonth=function(e){var t=setMonth(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setMonth(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setYear=function(e){var t=setYear(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setYear(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setFocusedDay=function(e){this.focusedDay=clamp(e,parseISODate(this.min),parseISODate(this.max))};e.prototype.determineValidity=function(e){var t,a;var i=(a=(t=this.datePickerInput)===null||t===void 0?void 0:t.value)!==null&&a!==void 0?a:"";var r=i!==""&&e==null;var n=this.required&&e==null;var d=e?!inRange(e,null,parseISODate(this.max)):false;var o=e?!inRange(e,parseISODate(this.min)):false;this._validity={patternMismatch:false,customError:false,stepMismatch:false,tooLong:false,tooShort:false,typeMismatch:false,badInput:r,rangeUnderflow:o,rangeOverflow:d,valueMissing:n,valid:!(n||r||o||d)}};e.prototype.setValue=function(e){var t=printISODate(e);if(t===this.value){return}this.value=t;this.duetChange.emit({component:"duet-date-picker",value:this.value,valueAsDate:e})};e.prototype.handleDocumentClick=function(e){var t=this;if(!this.open){return}var a=e.composedPath().every((function(e){return e!==t.dialogWrapperNode&&e!==t.datePickerButton}));if(a){this.hide(false)}};e.prototype.render=function(){var e=this;var t=parseISODate(this.value);var a=(t||this.focusedDay).getFullYear();var i=this.focusedDay.getMonth();var r=this.focusedDay.getFullYear();var n=i18n[this.language];var d=parseISODate(this.min);var o=parseISODate(this.max);var u=d!=null&&d.getMonth()===i&&d.getFullYear()===r;var s=o!=null&&o.getMonth()===i&&o.getFullYear()===r;var c=a-this.incrementYears;var l=a+this.incrementYears;if(d){c=Math.max(c,d.getFullYear())}if(o){l=Math.min(l,o.getFullYear())}return h(Host,{class:{"duet-expand":this.expand,"duet-m-0":this.margin==="none"}},h("div",{class:"duet-date"},h(DatePickerInput,{hasFocus:this.inputHasFocus,value:this.value,valueAsDate:t,formattedValue:this.inputValue,language:this.language,onInput:this.handleInputChange,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.toggleOpen,name:this.name,disabled:this.disabled,error:this.error||!this.disableBuiltInErrors&&this.internalValidityError||null,role:this.role,required:this.required,theme:this.theme,tooltip:this.tooltip,tooltipDirection:this.tooltipDirection,labelHidden:this.labelHidden,placeholder:this.placeholder,inputLabel:this.label,identifier:this.identifier,buttonRef:function(t){return e.datePickerButton=t},inputRef:function(t){return e.datePickerInput=t},accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy,accessibleLiveError:this.accessibleLiveError,echoPlaceholder:this.echoPlaceholder,caption:this.caption})),h("div",{class:{"duet-theme-turva":this.theme==="turva","duet-date-dialog":true,left:this.direction==="left",error:!!this.error,active:this.open},role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-labelledby":this.dialogLabelId,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h("duet-overlay",{visible:this.open,"display-device":"x-small"}),h(FocusGuard,{moveFocusTo:this.focusedDayNode}),h("div",{class:"duet-date-dialog-wrapper",onKeyDown:this.handleEscKey,ref:function(t){return e.dialogWrapperNode=t}},h("duet-visually-hidden",{"aria-live":"polite"},n.keyboardInstruction),h("div",{class:"duet-date-dialog-mobile-header"},h("duet-label",{margin:"none"},this.label),h("button",{class:"duet-date-picker-close",ref:function(t){return e.closeButtonNode=t},onClick:function(){return e.hide()},type:"button"},h("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xx-small"}),h("duet-visually-hidden",null,n.closeLabel))),h("div",{class:"duet-date-dialog-header"},h("div",{class:"duet-date-dialog-dropdowns"},h("duet-visually-hidden",null,h("h2",{id:this.dialogLabelId,"aria-live":"polite","aria-atomic":"true"},n.monthLabels[i]," ",this.focusedDay.getFullYear())),h("duet-visually-hidden",null,h("label",{htmlFor:this.monthSelectId},n.monthSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.monthSelectId,class:"duet-date-month-select",ref:function(t){return e.monthSelectNode=t},onChange:this.handleMonthSelect},n.monthLabels.map((function(e,t){return h("option",{key:e,value:t,selected:t===i,disabled:!inRange(new Date(r,t,1),d?startOfMonth(d):null,o?endOfMonth(o):null)},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,n.monthLabelsShort[i]),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"}))),h("duet-visually-hidden",null,h("label",{htmlFor:this.yearSelectId},n.yearSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.yearSelectId,class:"duet-date-year-select",onChange:this.handleYearSelect},range(c,l).map((function(e){return h("option",{key:e,selected:e===r},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,this.focusedDay.getFullYear()),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"})))),h("div",{class:"duet-date-dialog-buttons"},h("duet-action-button",{accessibleLabel:i18n[this.language].prevMonthLabel,actionName:i18n[this.language].prevMonthLabel,class:"duet-date-dialog-prev",onClick:this.handlePreviousMonthClick,disabled:u,"icon-name":"action-arrow-left-small"},n.prevMonthLabel),h("duet-action-button",{accessibleLabel:i18n[this.language].nextMonthLabel,actionName:i18n[this.language].nextMonthLabel,class:"duet-date-dialog-next",onClick:this.handleNextMonthClick,disabled:s,"icon-name":"action-arrow-right-small"},n.nextMonthLabel))),h(DatePickerMonth,{selectedDate:t,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,language:this.language,theme:this.theme,min:d,max:o,focusedDayRef:function(t){return e.focusedDayNode=t},onFocusEnter:this.enableActiveFocus,onFocusExit:this.disableActiveFocus})),h(FocusGuard,{moveFocusTo:this.closeButtonNode})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{min:["updateValidity"],max:["updateValidity"],value:["updateValidity","updateInternalValue"],required:["updateValidity"]}},enumerable:false,configurable:true});return e}();DuetDatePicker.style=DuetDatePickerStyle0;export{DuetDatePicker as duet_date_picker};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,g as getElement,H as Host}from"./index-
|
|
4
|
+
import{r as registerInstance,h,g as getElement,H as Host}from"./index-e0645409.js";import{i as inheritGlobalTheme}from"./themeable-component-f1c77a5d.js";import{g as getColorByName}from"./token-utils-0d5e28a7.js";import"./tokens.module-7ae22e26.js";var duetDividerCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0}:host{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;display:block;width:100%}.duet-divider{-webkit-user-select:none;user-select:none;display:block;width:100%;height:1px;margin-top:var(--divider-margin, 36px) !important;margin-right:var(--divider-margin, 0);margin-bottom:var(--divider-margin, 28px);margin-left:var(--divider-margin, 0);background:rgb(212, 223, 229)}.duet-divider.duet-p-0{padding:0 !important}.duet-divider.duet-m-0{margin:0 !important}.duet-divider.duet-m-s{margin-bottom:16px !important;margin-top:0 !important}.duet-divider.duet-theme-turva{background:rgb(222, 224, 228)}:host(.duet-theme-turva2) .duet-divider.duet-theme-turva{background:rgb(212, 221, 226)}";var DuetDividerStyle0=duetDividerCss;var DuetDivider=function(){function e(e){registerInstance(this,e);this.theme="";this.margin="auto";this.color=""}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){var e=getColorByName(this.color);return h("div",{key:"0abfcccc8eafdca452bd879ba84ae92b59fee8ae",class:{"duet-m-0":this.margin==="none","duet-m-s":this.margin==="small","duet-divider":true,"duet-theme-turva":this.theme==="turva"},style:{background:e}})};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetDivider.style=DuetDividerStyle0;var duetSpacerCss=":host{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";var DuetSpacerStyle0=duetSpacerCss;var DuetSpacer=function(){function e(e){registerInstance(this,e);this.size="medium";this.direction="vertical";this.breakpoint=""}e.prototype.render=function(){var e;return h(Host,{key:"6538750ce10fceade9822375b75a8bbbe20cd76f",class:(e={"duet-spacer":true,"duet-spacer-xx-small":this.breakpoint==="xx-small","duet-spacer-x-small":this.breakpoint==="x-small","duet-spacer-small":this.breakpoint==="small","duet-spacer-medium":this.breakpoint==="medium","duet-spacer-large":this.breakpoint==="large","duet-spacer-x-large":this.breakpoint==="x-large","duet-spacer-xx-large":this.breakpoint==="xx-large"},e[this.size]=true,e["duet-spacer-".concat(this.direction)]=true,e)})};return e}();DuetSpacer.style=DuetSpacerStyle0;export{DuetDivider as duet_divider,DuetSpacer as duet_spacer};
|