@duetds/components 10.5.0 → 10.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hydrate/index.js +501 -263
- package/hydrate/index.mjs +501 -263
- package/lib/cjs/{a11y-utils-DaAO4N9d.js → a11y-utils-CgWjS7yq.js} +1 -1
- package/lib/cjs/{app-globals-CHNvdfQj.js → app-globals-D68ciWsb.js} +1 -1
- package/lib/cjs/duet-action-button.cjs.entry.js +6 -6
- package/lib/cjs/duet-alert.cjs.entry.js +4 -4
- package/lib/cjs/duet-badge.cjs.entry.js +7 -7
- package/lib/cjs/duet-banner.cjs.entry.js +15 -16
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +7 -7
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +7 -7
- package/lib/cjs/duet-button_2.cjs.entry.js +8 -8
- package/lib/cjs/duet-callout.cjs.entry.js +5 -5
- package/lib/cjs/duet-caption_4.cjs.entry.js +11 -11
- package/lib/cjs/duet-card.cjs.entry.js +21 -10
- package/lib/cjs/duet-checkbox.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkmark.cjs.entry.js +4 -4
- package/lib/cjs/duet-chip.cjs.entry.js +28 -12
- package/lib/cjs/duet-choice_2.cjs.entry.js +7 -7
- package/lib/cjs/duet-collapsible.cjs.entry.js +4 -4
- package/lib/cjs/duet-combobox.cjs.entry.js +6 -6
- package/lib/cjs/duet-contact-card.cjs.entry.js +17 -7
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +3 -3
- package/lib/cjs/duet-date-picker.cjs.entry.js +127 -14
- package/lib/cjs/duet-divider_2.cjs.entry.js +5 -5
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +15 -15
- package/lib/cjs/duet-empty-state.cjs.entry.js +2 -2
- package/lib/cjs/duet-fieldset.cjs.entry.js +6 -6
- 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 +4 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +7 -7
- package/lib/cjs/duet-hero.cjs.entry.js +22 -21
- package/lib/cjs/duet-icon.cjs.entry.js +7 -7
- package/lib/cjs/duet-indicator.cjs.entry.js +5 -5
- package/lib/cjs/duet-input_2.cjs.entry.js +70 -18
- package/lib/cjs/duet-layout.cjs.entry.js +7 -7
- package/lib/cjs/duet-list_2.cjs.entry.js +5 -5
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +4 -4
- package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +5 -5
- package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +7 -7
- package/lib/cjs/duet-menu-bar-item.cjs.entry.js +7 -7
- package/lib/cjs/duet-menu-bar-link.cjs.entry.js +4 -4
- package/lib/cjs/duet-menu-bar.cjs.entry.js +6 -6
- package/lib/cjs/duet-modal.cjs.entry.js +15 -15
- package/lib/cjs/duet-multiselect.cjs.entry.js +11 -11
- package/lib/cjs/duet-nav.cjs.entry.js +3 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +10 -10
- package/lib/cjs/duet-number-input.cjs.entry.js +9 -9
- package/lib/cjs/duet-overlay.cjs.entry.js +3 -3
- package/lib/cjs/duet-page-heading.cjs.entry.js +6 -6
- package/lib/cjs/duet-pagination_2.cjs.entry.js +19 -19
- package/lib/cjs/duet-panel.cjs.entry.js +4 -4
- package/lib/cjs/duet-phone-input.cjs.entry.js +11 -6
- package/lib/cjs/duet-popup-menu_2.cjs.entry.js +10 -10
- package/lib/cjs/duet-progress.cjs.entry.js +3 -3
- package/lib/cjs/duet-promo-card.cjs.entry.js +20 -8
- package/lib/cjs/duet-radio_2.cjs.entry.js +7 -7
- package/lib/cjs/duet-range-slider.cjs.entry.js +8 -8
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +18 -18
- package/lib/cjs/duet-section-layout.cjs.entry.js +4 -4
- package/lib/cjs/duet-select.cjs.entry.js +9 -9
- package/lib/cjs/duet-shaped-image.cjs.entry.js +4 -4
- package/lib/cjs/duet-share-chart-item.cjs.entry.js +2 -2
- package/lib/cjs/duet-share-chart.cjs.entry.js +8 -8
- package/lib/cjs/duet-show-more.cjs.entry.js +6 -6
- package/lib/cjs/duet-slideout-lang.cjs.entry.js +4 -4
- package/lib/cjs/duet-slideout-link.cjs.entry.js +7 -7
- package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +6 -6
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +13 -13
- package/lib/cjs/duet-slideout.cjs.entry.js +20 -14
- package/lib/cjs/duet-status-icon.cjs.entry.js +3 -3
- package/lib/cjs/duet-step_2.cjs.entry.js +7 -7
- package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +5 -5
- package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +7 -7
- package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +7 -7
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +4 -4
- package/lib/cjs/duet-submenu-bar.cjs.entry.js +7 -7
- package/lib/cjs/duet-textarea.cjs.entry.js +8 -8
- package/lib/cjs/duet-toggle.cjs.entry.js +9 -9
- package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +5 -5
- package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +7 -7
- package/lib/cjs/duet-toolbar-item.cjs.entry.js +8 -8
- package/lib/cjs/duet-toolbar-link.cjs.entry.js +4 -4
- package/lib/cjs/duet-toolbar.cjs.entry.js +4 -4
- package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +10 -10
- package/lib/cjs/duet-tooltip.cjs.entry.js +5 -5
- package/lib/cjs/duet-tray.cjs.entry.js +7 -7
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +2 -2
- package/lib/cjs/duet-upload-item.cjs.entry.js +6 -6
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +2 -2
- package/lib/cjs/duet.cjs.js +3 -3
- package/lib/cjs/{errorcodes.utils-Dkf_MfrJ.js → errorcodes.utils-C0tQ3k6Z.js} +1 -1
- package/lib/cjs/{focus-utils-BuGg0Oha.js → focus-utils-tCoGOO7d.js} +1 -1
- package/lib/cjs/{index-ZxE6MB5V.js → index-BeiMjjVl.js} +9 -9
- package/lib/cjs/{keyboard-utils-D9UlHbik.js → keyboard-utils-DibQafwg.js} +2 -0
- package/lib/cjs/{label-CpPOBfjS.js → label-Cu4DNShe.js} +1 -1
- package/lib/cjs/{language-utils-C7Z0KYg-.js → language-utils-B3NubUDr.js} +1 -1
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/picture-utils-D_HVgfq5.js +15 -0
- package/lib/cjs/{slot-utils-BXdHT3A1.js → slot-utils-Dny6EJ_G.js} +1 -1
- package/lib/cjs/{themeable-component-CIDaln0Z.js → themeable-component-Csdvrnsd.js} +1 -1
- package/lib/cjs/{token-utils-DY3-olMV.js → token-utils-ZISdNshf.js} +1 -1
- package/lib/cjs/{tokens.module-CTbvyezn.js → tokens.module-CGRpZaa1.js} +2 -1
- package/lib/collection/components/duet-action-button/duet-action-button.js +2 -2
- package/lib/collection/components/duet-alert/duet-alert.js +1 -1
- package/lib/collection/components/duet-badge/duet-badge.js +2 -2
- package/lib/collection/components/duet-banner/duet-banner.css +12 -0
- package/lib/collection/components/duet-banner/duet-banner.js +30 -5
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.js +4 -4
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.js +2 -2
- package/lib/collection/components/duet-button/duet-button.js +8 -8
- package/lib/collection/components/duet-callout/duet-callout.js +2 -2
- package/lib/collection/components/duet-caption/duet-caption.js +1 -1
- package/lib/collection/components/duet-card/duet-card.css +3 -0
- package/lib/collection/components/duet-card/duet-card.js +43 -7
- package/lib/collection/components/duet-checkbox/duet-checkbox.js +3 -3
- package/lib/collection/components/duet-chip/duet-chip.js +53 -17
- package/lib/collection/components/duet-choice/duet-checkmark.js +2 -2
- package/lib/collection/components/duet-choice/duet-choice.js +3 -3
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +2 -2
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +3 -3
- package/lib/collection/components/duet-combobox/duet-combobox.js +3 -3
- package/lib/collection/components/duet-contact-card/duet-contact-card.css +3 -0
- package/lib/collection/components/duet-contact-card/duet-contact-card.js +38 -2
- package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +1 -1
- package/lib/collection/components/duet-date-picker/date-picker-month.js +4 -2
- package/lib/collection/components/duet-date-picker/date-utils.js +7 -0
- package/lib/collection/components/duet-date-picker/disallowed-days.js +23 -0
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +100 -10
- package/lib/collection/components/duet-date-picker/finnish-bank-holidays.js +66 -0
- package/lib/collection/components/duet-divider/duet-divider.js +1 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +5 -5
- package/lib/collection/components/duet-empty-state/duet-empty-state.js +3 -3
- package/lib/collection/components/duet-fieldset/duet-fieldset.js +3 -3
- package/lib/collection/components/duet-file-chooser/duet-file-chooser.js +1 -1
- package/lib/collection/components/duet-footer/duet-footer.js +7 -7
- package/lib/collection/components/duet-grid/duet-grid.js +3 -3
- package/lib/collection/components/duet-grid-item/duet-grid-item.js +2 -2
- package/lib/collection/components/duet-header/duet-header.js +15 -15
- package/lib/collection/components/duet-heading/duet-heading.js +1 -1
- package/lib/collection/components/duet-hero/duet-hero.css +92 -14
- package/lib/collection/components/duet-hero/duet-hero.js +47 -21
- package/lib/collection/components/duet-icon/duet-icon.js +3 -3
- package/lib/collection/components/duet-indicator/duet-indicator.js +3 -3
- package/lib/collection/components/duet-input/duet-input.js +73 -20
- package/lib/collection/components/duet-label/duet-label.js +2 -2
- package/lib/collection/components/duet-layout/duet-layout.js +6 -6
- package/lib/collection/components/duet-link/duet-link.js +2 -2
- package/lib/collection/components/duet-list/duet-list.js +4 -4
- package/lib/collection/components/duet-list-item/duet-list-item.js +2 -2
- package/lib/collection/components/duet-logo/duet-logo.js +2 -2
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +4 -4
- package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +2 -2
- package/lib/collection/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.js +4 -4
- package/lib/collection/components/duet-menu-bar-dropdown-link/duet-menu-bar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-menu-bar-item/duet-menu-bar-item.js +2 -2
- package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +2 -2
- package/lib/collection/components/duet-modal/duet-modal.js +11 -11
- package/lib/collection/components/duet-multiselect/duet-multiselect.js +11 -11
- package/lib/collection/components/duet-nav/duet-nav.js +1 -1
- package/lib/collection/components/duet-notification/duet-notification.js +2 -2
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +4 -4
- package/lib/collection/components/duet-number-input/duet-number-input.js +8 -8
- package/lib/collection/components/duet-overlay/duet-overlay.js +2 -2
- package/lib/collection/components/duet-page-heading/duet-page-heading.js +3 -3
- package/lib/collection/components/duet-pagination/duet-pagination.js +13 -13
- package/lib/collection/components/duet-panel/duet-panel.js +3 -3
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +5 -5
- package/lib/collection/components/duet-phone-input/duet-phone-input.js +30 -5
- package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +1 -1
- package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +4 -4
- package/lib/collection/components/duet-promo-card/duet-promo-card.css +4 -0
- package/lib/collection/components/duet-promo-card/duet-promo-card.js +39 -2
- package/lib/collection/components/duet-radio/duet-radio.js +6 -6
- package/lib/collection/components/duet-radio-group/duet-radio-group.js +1 -1
- package/lib/collection/components/duet-range-slider/duet-range-slider.js +4 -4
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +3 -3
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +5 -5
- package/lib/collection/components/duet-section-layout/duet-section-layout.js +3 -3
- package/lib/collection/components/duet-select/duet-select.js +10 -10
- package/lib/collection/components/duet-shaped-image/duet-shaped-image.js +2 -2
- package/lib/collection/components/duet-share-chart/duet-share-chart.js +2 -2
- package/lib/collection/components/duet-share-chart-item/duet-share-chart-item.js +1 -1
- package/lib/collection/components/duet-show-more/duet-show-more.js +3 -3
- package/lib/collection/components/duet-slideout/duet-slideout.js +12 -6
- package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +1 -1
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +2 -2
- package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +6 -6
- package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.js +4 -4
- package/lib/collection/components/duet-spacer/duet-spacer.js +3 -3
- package/lib/collection/components/duet-spinner/duet-spinner.js +2 -2
- package/lib/collection/components/duet-status-icon/duet-status-icon.js +2 -2
- package/lib/collection/components/duet-step/duet-step.js +4 -4
- package/lib/collection/components/duet-stepper/duet-stepper.js +2 -2
- package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.js +5 -5
- package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.js +4 -4
- package/lib/collection/components/duet-submenu-bar-dropdown-link/duet-submenu-bar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-submenu-bar-item/duet-submenu-bar-item.js +1 -1
- package/lib/collection/components/duet-submenu-bar-link/duet-submenu-bar-link.js +1 -1
- package/lib/collection/components/duet-tab/duet-tab.js +2 -2
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +9 -9
- package/lib/collection/components/duet-table/duet-table-styles.js +5 -5
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-textarea/duet-textarea.js +7 -7
- package/lib/collection/components/duet-toggle/duet-toggle.js +4 -4
- package/lib/collection/components/duet-toolbar/duet-toolbar.js +2 -2
- package/lib/collection/components/duet-toolbar-dropdown/duet-toolbar-dropdown.js +4 -4
- package/lib/collection/components/duet-toolbar-dropdown-link/duet-toolbar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-toolbar-item/duet-toolbar-item.js +3 -3
- package/lib/collection/components/duet-toolbar-link/duet-toolbar-link.js +2 -2
- package/lib/collection/components/duet-tooltip/duet-tooltip-button.js +3 -3
- package/lib/collection/components/duet-tooltip/duet-tooltip-popup.js +3 -3
- package/lib/collection/components/duet-tooltip/duet-tooltip.js +1 -1
- package/lib/collection/components/duet-tray/duet-tray.js +2 -2
- package/lib/collection/components/duet-upload/duet-upload.js +16 -16
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +1 -1
- package/lib/collection/components/duet-upload-item/duet-upload-item.js +4 -4
- package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +1 -1
- package/lib/collection/utils/keyboard-utils.js +1 -0
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/p-054c334d.entry.js +4 -0
- package/lib/duet/{p-3277233e.entry.js → p-0e10e36b.entry.js} +1 -1
- package/lib/duet/{p-9ae7aaef.entry.js → p-12d7fdf6.entry.js} +1 -1
- package/lib/duet/{p-3f7afd87.entry.js → p-1579bdf5.entry.js} +1 -1
- package/lib/duet/{p-7eea47d5.entry.js → p-174935bc.entry.js} +1 -1
- package/lib/duet/{p-42ec7305.entry.js → p-1d7a9425.entry.js} +1 -1
- package/lib/duet/{p-317e81f3.entry.js → p-20066df8.entry.js} +1 -1
- package/lib/duet/{p-3690576a.entry.js → p-20c8226c.entry.js} +1 -1
- package/lib/duet/{p-19863cdf.entry.js → p-210bc161.entry.js} +1 -1
- package/lib/duet/{p-b747f6e9.entry.js → p-244bfbf9.entry.js} +1 -1
- package/lib/duet/{p-38973524.entry.js → p-264688ae.entry.js} +1 -1
- package/lib/duet/{p-93ff8fe4.entry.js → p-2bf78fe4.entry.js} +1 -1
- package/lib/duet/{p-9e1a59d1.entry.js → p-2e44c6b8.entry.js} +1 -1
- package/lib/duet/{p-c1afac0d.entry.js → p-304a9a55.entry.js} +1 -1
- package/lib/duet/{p-516397ba.entry.js → p-30d8a1e4.entry.js} +1 -1
- package/lib/duet/p-3445529c.entry.js +4 -0
- package/lib/duet/{p-2f8a47e2.entry.js → p-3533d6ee.entry.js} +1 -1
- package/lib/duet/{p-fe829b53.entry.js → p-374b48f6.entry.js} +1 -1
- package/lib/duet/{p-7353ee4c.entry.js → p-3b9d7f6a.entry.js} +1 -1
- package/lib/duet/{p-5f5f72d4.entry.js → p-3def9480.entry.js} +1 -1
- package/lib/duet/p-3fbe466a.entry.js +4 -0
- package/lib/duet/{p-d3b5c997.entry.js → p-407d4e5a.entry.js} +1 -1
- package/lib/duet/p-41230630.entry.js +4 -0
- package/lib/duet/p-44e53564.entry.js +4 -0
- package/lib/duet/p-46287d85.entry.js +4 -0
- package/lib/duet/p-48e77341.entry.js +4 -0
- package/lib/duet/{p-a8876b3d.entry.js → p-4a041c60.entry.js} +1 -1
- package/lib/duet/{p-efa4eecc.entry.js → p-4a251661.entry.js} +1 -1
- package/lib/duet/{p-407f7f03.entry.js → p-4a4e5bb5.entry.js} +1 -1
- package/lib/duet/{p-b1326cbb.entry.js → p-4acdc586.entry.js} +1 -1
- package/lib/duet/{p-8ace1eb4.entry.js → p-4b07ce36.entry.js} +1 -1
- package/lib/duet/{p-e7f2359a.entry.js → p-4cee693b.entry.js} +1 -1
- package/lib/duet/{p-3f35fce3.entry.js → p-4e1c2676.entry.js} +1 -1
- package/lib/duet/{p-40fa7371.entry.js → p-4e5532c8.entry.js} +1 -1
- package/lib/duet/{p-7fd39204.entry.js → p-512d18c8.entry.js} +1 -1
- package/lib/duet/{p-6ef683d5.entry.js → p-555e0c78.entry.js} +1 -1
- package/lib/duet/{p-cb6c4158.entry.js → p-5b322a86.entry.js} +1 -1
- package/lib/duet/p-5f72134e.entry.js +4 -0
- package/lib/duet/{p-dedf6a32.entry.js → p-61abccd4.entry.js} +1 -1
- package/lib/duet/{p-443af533.entry.js → p-6a11ba26.entry.js} +1 -1
- package/lib/duet/{p-f040706c.entry.js → p-6bd78205.entry.js} +1 -1
- package/lib/duet/p-6c239923.entry.js +4 -0
- package/lib/duet/{p-bdbf0fae.entry.js → p-6ce82324.entry.js} +1 -1
- package/lib/duet/{p-268b3066.entry.js → p-6d1d1199.entry.js} +1 -1
- package/lib/duet/p-81c5d3e3.entry.js +4 -0
- package/lib/duet/p-829bccb7.entry.js +4 -0
- package/lib/duet/{p-c2026c6b.entry.js → p-83dcbb64.entry.js} +1 -1
- package/lib/duet/{p-461d4089.entry.js → p-84f8bee8.entry.js} +1 -1
- package/lib/duet/{p-d6f0afa5.entry.js → p-8927ccc1.entry.js} +1 -1
- package/lib/duet/{p-3b2fba0f.entry.js → p-8bdcfd1f.entry.js} +1 -1
- package/lib/duet/{p-833802f9.entry.js → p-8fbcea55.entry.js} +1 -1
- package/lib/duet/{p-20a8ef81.entry.js → p-914ee7ac.entry.js} +1 -1
- package/lib/duet/{p-d3baa815.entry.js → p-95bb2a8d.entry.js} +1 -1
- package/lib/duet/{p-cbcee3e2.entry.js → p-985213bb.entry.js} +1 -1
- package/lib/duet/{p-52beb436.entry.js → p-9889218e.entry.js} +1 -1
- package/lib/duet/{p-30108edc.entry.js → p-9b2731b9.entry.js} +1 -1
- package/lib/duet/{p-829db926.entry.js → p-9b448008.entry.js} +1 -1
- package/lib/duet/p-9c41f1d5.entry.js +4 -0
- package/lib/duet/p-BDgGHTHh.js +4 -0
- package/lib/duet/p-BZev46O8.js +4 -0
- package/lib/duet/p-BaefVzkx.js +4 -0
- package/lib/duet/p-CcoGR9T9.js +4 -0
- package/lib/duet/{p-R3pTP2Oy.js → p-CyfEm8iD.js} +1 -1
- package/lib/duet/p-D3450NfA.js +5 -0
- package/lib/duet/{p-CFqvB5PA.js → p-D9N9LBeD.js} +1 -1
- package/lib/duet/{p-C5Yfx2kd.js → p-DI7IXBXp.js} +1 -1
- package/lib/duet/{p-D2ly4TZR.js → p-DYmL1tSl.js} +1 -1
- package/lib/duet/p-Dk60lC7n.js +4 -0
- package/lib/duet/p-JFwTD5kM.js +4 -0
- package/lib/duet/{p-BzYmwX5_.js → p-KbNgo0QF.js} +1 -1
- package/lib/duet/{p-110c7572.entry.js → p-a01f3141.entry.js} +1 -1
- package/lib/duet/{p-43e076b5.entry.js → p-a49b5d93.entry.js} +1 -1
- package/lib/duet/p-a6dbe893.entry.js +4 -0
- package/lib/duet/{p-1da7703d.entry.js → p-aa1256f9.entry.js} +1 -1
- package/lib/duet/{p-a068c086.entry.js → p-aa7e4c81.entry.js} +1 -1
- package/lib/duet/{p-70612314.entry.js → p-ac4fc44c.entry.js} +1 -1
- package/lib/duet/{p-61ec0e1c.entry.js → p-ae382e2e.entry.js} +1 -1
- package/lib/duet/{p-a483117e.entry.js → p-bc41d13d.entry.js} +1 -1
- package/lib/duet/{p-734249e0.entry.js → p-c54ecb23.entry.js} +1 -1
- package/lib/duet/{p-70961edb.entry.js → p-d72dee5d.entry.js} +1 -1
- package/lib/duet/p-d7abb7fa.entry.js +4 -0
- package/lib/duet/{p-8b0dfbd7.entry.js → p-dbb9e1d4.entry.js} +1 -1
- package/lib/duet/{p-317a1fc0.entry.js → p-e40d9c21.entry.js} +1 -1
- package/lib/duet/{p-06297bd8.entry.js → p-e43df9c2.entry.js} +1 -1
- package/lib/duet/{p-02d8e844.entry.js → p-e442943d.entry.js} +1 -1
- package/lib/duet/p-eb7bc989.entry.js +4 -0
- package/lib/duet/{p-a9104184.entry.js → p-ec1d2e0a.entry.js} +1 -1
- package/lib/duet/p-edcdf0b7.entry.js +4 -0
- package/lib/duet/{p-e08dce92.entry.js → p-ee369233.entry.js} +1 -1
- package/lib/duet/{p-8012c7bc.entry.js → p-f297f8f2.entry.js} +1 -1
- package/lib/duet/{p-c54be349.entry.js → p-f30c3cfe.entry.js} +1 -1
- package/lib/duet/{p-a5177d32.entry.js → p-f4538e9d.entry.js} +1 -1
- package/lib/duet/{p-c216e746.entry.js → p-f4de7ac0.entry.js} +1 -1
- package/lib/duet/{p-4b7f1244.entry.js → p-f8d640ba.entry.js} +1 -1
- package/lib/duet/{p-2dd7d75e.entry.js → p-f9db8670.entry.js} +1 -1
- package/lib/duet/p-fc1a18f8.entry.js +4 -0
- package/lib/duet/{p-d779fe42.entry.js → p-fc2be136.entry.js} +1 -1
- package/lib/duet/p-fdc4a97c.entry.js +4 -0
- package/lib/duet/p-kkZE1C6Z.js +4 -0
- package/lib/esm/{a11y-utils-ChN5Nhxh.js → a11y-utils--wwGTL0T.js} +1 -1
- package/lib/esm/{app-globals-4kCk2rkO.js → app-globals-Diuuep9d.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +6 -6
- package/lib/esm/duet-alert.entry.js +4 -4
- package/lib/esm/duet-badge.entry.js +7 -7
- package/lib/esm/duet-banner.entry.js +15 -16
- package/lib/esm/duet-breadcrumb.entry.js +7 -7
- package/lib/esm/duet-breadcrumbs.entry.js +7 -7
- package/lib/esm/duet-button_2.entry.js +8 -8
- package/lib/esm/duet-callout.entry.js +5 -5
- package/lib/esm/duet-caption_4.entry.js +11 -11
- package/lib/esm/duet-card.entry.js +22 -11
- package/lib/esm/duet-checkbox.entry.js +3 -3
- package/lib/esm/duet-checkmark.entry.js +4 -4
- package/lib/esm/duet-chip.entry.js +28 -12
- package/lib/esm/duet-choice_2.entry.js +7 -7
- package/lib/esm/duet-collapsible.entry.js +4 -4
- package/lib/esm/duet-combobox.entry.js +6 -6
- package/lib/esm/duet-contact-card.entry.js +17 -7
- package/lib/esm/duet-cookie-consent.entry.js +3 -3
- package/lib/esm/duet-date-picker.entry.js +127 -14
- package/lib/esm/duet-divider_2.entry.js +5 -5
- package/lib/esm/duet-editable-table_3.entry.js +15 -15
- package/lib/esm/duet-empty-state.entry.js +2 -2
- package/lib/esm/duet-fieldset.entry.js +6 -6
- 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 +4 -4
- package/lib/esm/duet-header_2.entry.js +7 -7
- package/lib/esm/duet-hero.entry.js +22 -21
- package/lib/esm/duet-icon.entry.js +7 -7
- package/lib/esm/duet-indicator.entry.js +5 -5
- package/lib/esm/duet-input_2.entry.js +70 -18
- package/lib/esm/duet-layout.entry.js +7 -7
- package/lib/esm/duet-list_2.entry.js +5 -5
- package/lib/esm/duet-menu-bar-button.entry.js +4 -4
- package/lib/esm/duet-menu-bar-dropdown-link.entry.js +5 -5
- package/lib/esm/duet-menu-bar-dropdown.entry.js +7 -7
- package/lib/esm/duet-menu-bar-item.entry.js +7 -7
- package/lib/esm/duet-menu-bar-link.entry.js +4 -4
- package/lib/esm/duet-menu-bar.entry.js +6 -6
- package/lib/esm/duet-modal.entry.js +15 -15
- package/lib/esm/duet-multiselect.entry.js +11 -11
- package/lib/esm/duet-nav.entry.js +3 -3
- package/lib/esm/duet-notification_2.entry.js +10 -10
- package/lib/esm/duet-number-input.entry.js +9 -9
- package/lib/esm/duet-overlay.entry.js +3 -3
- package/lib/esm/duet-page-heading.entry.js +6 -6
- package/lib/esm/duet-pagination_2.entry.js +19 -19
- package/lib/esm/duet-panel.entry.js +4 -4
- package/lib/esm/duet-phone-input.entry.js +11 -6
- package/lib/esm/duet-popup-menu_2.entry.js +10 -10
- package/lib/esm/duet-progress.entry.js +3 -3
- package/lib/esm/duet-promo-card.entry.js +20 -8
- package/lib/esm/duet-radio_2.entry.js +7 -7
- package/lib/esm/duet-range-slider.entry.js +8 -8
- package/lib/esm/duet-scrollable_3.entry.js +18 -18
- package/lib/esm/duet-section-layout.entry.js +4 -4
- package/lib/esm/duet-select.entry.js +9 -9
- package/lib/esm/duet-shaped-image.entry.js +4 -4
- package/lib/esm/duet-share-chart-item.entry.js +2 -2
- package/lib/esm/duet-share-chart.entry.js +8 -8
- package/lib/esm/duet-show-more.entry.js +6 -6
- package/lib/esm/duet-slideout-lang.entry.js +4 -4
- package/lib/esm/duet-slideout-link.entry.js +7 -7
- package/lib/esm/duet-slideout-panel-dropdown.entry.js +6 -6
- package/lib/esm/duet-slideout-panel.entry.js +13 -13
- package/lib/esm/duet-slideout.entry.js +20 -14
- package/lib/esm/duet-status-icon.entry.js +3 -3
- package/lib/esm/duet-step_2.entry.js +7 -7
- package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +5 -5
- package/lib/esm/duet-submenu-bar-dropdown.entry.js +7 -7
- package/lib/esm/duet-submenu-bar-item.entry.js +7 -7
- package/lib/esm/duet-submenu-bar-link.entry.js +4 -4
- package/lib/esm/duet-submenu-bar.entry.js +7 -7
- package/lib/esm/duet-textarea.entry.js +8 -8
- package/lib/esm/duet-toggle.entry.js +9 -9
- package/lib/esm/duet-toolbar-dropdown-link.entry.js +5 -5
- package/lib/esm/duet-toolbar-dropdown.entry.js +7 -7
- package/lib/esm/duet-toolbar-item.entry.js +8 -8
- package/lib/esm/duet-toolbar-link.entry.js +4 -4
- package/lib/esm/duet-toolbar.entry.js +4 -4
- package/lib/esm/duet-tooltip-button_2.entry.js +10 -10
- package/lib/esm/duet-tooltip.entry.js +5 -5
- package/lib/esm/duet-tray.entry.js +7 -7
- package/lib/esm/duet-upload-aria-status.entry.js +2 -2
- package/lib/esm/duet-upload-item.entry.js +6 -6
- package/lib/esm/duet-visually-hidden.entry.js +2 -2
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{errorcodes.utils-DuFCu_27.js → errorcodes.utils-S_WrUPeV.js} +1 -1
- package/lib/esm/{focus-utils-CFswdkeD.js → focus-utils-C4oaajGr.js} +1 -1
- package/lib/esm/{index-B2cboDWM.js → index-D3450NfA.js} +9 -9
- package/lib/esm/{keyboard-utils-Db8rvjPI.js → keyboard-utils-BaefVzkx.js} +2 -1
- package/lib/esm/{label-CJxIWUOT.js → label-C1HF2o4Y.js} +1 -1
- package/lib/esm/{language-utils-C4M4ASkT.js → language-utils-D4WVl8Ph.js} +1 -1
- package/lib/esm/loader.js +4 -4
- package/lib/esm/picture-utils-MSeJTkDk.js +13 -0
- package/lib/esm/{slot-utils--sNK1DNn.js → slot-utils-Dxcjtmp3.js} +1 -1
- package/lib/esm/{themeable-component-BBi3552X.js → themeable-component-QHdUfcat.js} +1 -1
- package/lib/esm/{token-utils-B0KAgyj_.js → token-utils-BILzD7LX.js} +1 -1
- package/lib/esm/{tokens.module-DEzE2U5T.js → tokens.module-kkZE1C6Z.js} +1 -1
- package/lib/types/components/duet-banner/duet-banner.d.ts +5 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-card/duet-card.d.ts +5 -0
- package/lib/types/components/duet-chip/duet-chip.d.ts +15 -8
- package/lib/types/components/duet-contact-card/duet-contact-card.d.ts +5 -0
- package/lib/types/components/duet-date-picker/date-picker-month.d.ts +3 -0
- package/lib/types/components/duet-date-picker/date-utils.d.ts +4 -0
- package/lib/types/components/duet-date-picker/disallowed-days.d.ts +9 -0
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +14 -0
- package/lib/types/components/duet-date-picker/finnish-bank-holidays.d.ts +11 -0
- package/lib/types/components/duet-hero/duet-hero.d.ts +5 -0
- package/lib/types/components/duet-input/duet-input.d.ts +11 -0
- package/lib/types/components/duet-phone-input/duet-phone-input.d.ts +5 -0
- package/lib/types/components/duet-promo-card/duet-promo-card.d.ts +6 -0
- package/lib/types/components.d.ts +104 -12
- package/lib/types/utils/keyboard-utils.d.ts +1 -0
- package/package.json +5 -5
- package/lib/duet/p-0c04f9f5.entry.js +0 -4
- package/lib/duet/p-18a8ea12.entry.js +0 -4
- package/lib/duet/p-1bca9931.entry.js +0 -4
- package/lib/duet/p-3f3c6e64.entry.js +0 -4
- package/lib/duet/p-4af6a8ed.entry.js +0 -4
- package/lib/duet/p-5284c707.entry.js +0 -4
- package/lib/duet/p-5c9f443c.entry.js +0 -4
- package/lib/duet/p-5lFzA17H.js +0 -4
- package/lib/duet/p-6b469225.entry.js +0 -4
- package/lib/duet/p-7294c37d.entry.js +0 -4
- package/lib/duet/p-72b504ef.entry.js +0 -4
- package/lib/duet/p-74aac967.entry.js +0 -4
- package/lib/duet/p-7c08fd87.entry.js +0 -4
- package/lib/duet/p-83238bf3.entry.js +0 -4
- package/lib/duet/p-86ffd3cb.entry.js +0 -4
- package/lib/duet/p-871620d3.entry.js +0 -4
- package/lib/duet/p-9c9811ba.entry.js +0 -4
- package/lib/duet/p-B2cboDWM.js +0 -5
- package/lib/duet/p-B8-N_qjs.js +0 -4
- package/lib/duet/p-Cg4m_WHe.js +0 -4
- package/lib/duet/p-DEzE2U5T.js +0 -4
- package/lib/duet/p-Db8rvjPI.js +0 -4
- package/lib/duet/p-d5f90dbc.entry.js +0 -4
- package/lib/duet/p-fa13ffe9.entry.js +0 -4
- package/lib/duet/p-s8EL6NG5.js +0 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate the date of Easter Sunday for a given year using the
|
|
3
|
+
* Meeus/Jones/Butcher Gregorian algorithm.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getEasterSunday(year: number): Date;
|
|
6
|
+
/**
|
|
7
|
+
* Finnish bank holidays for a given year, as published by the Bank of Finland:
|
|
8
|
+
* https://www.suomenpankki.fi/en/money-and-payments/bank-holidays/
|
|
9
|
+
*/
|
|
10
|
+
export declare function getFinnishBankHolidays(year: number): Date[];
|
|
11
|
+
export declare function isFinnishBankHoliday(date: Date): boolean;
|
|
@@ -2,6 +2,7 @@ import { EventEmitter } from "../../stencil-public-runtime";
|
|
|
2
2
|
import { DuetAnalyticsEvent, DuetColor, DuetHeadingLevel, DuetIconName, DuetLanguage, DuetTheme } from "../../common-types";
|
|
3
3
|
import { ThemeableComponent } from "../../common/themeable-component";
|
|
4
4
|
import { DuetLangObject } from "../../utils/language-utils";
|
|
5
|
+
import { DuetSource } from "../../utils/picture-utils";
|
|
5
6
|
export type DuetHeroIconSize = "medium" | "large";
|
|
6
7
|
export type DuetHeroVariation = "default" | "light" | "gray" | "image" | "minimal" | "campaign" | "section" | "product" | "content";
|
|
7
8
|
export type DuetHeroBackData = {
|
|
@@ -171,6 +172,10 @@ export declare class DuetHero implements ThemeableComponent {
|
|
|
171
172
|
* Alt attribute text for the image. If not provided, image is assigned presentation role.
|
|
172
173
|
*/
|
|
173
174
|
imageAlt: string;
|
|
175
|
+
/**
|
|
176
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
177
|
+
*/
|
|
178
|
+
sources: DuetSource[] | string;
|
|
174
179
|
/**
|
|
175
180
|
* Style variation of the hero area.
|
|
176
181
|
*/
|
|
@@ -30,6 +30,8 @@ export declare class DuetInput implements ThemeableComponent, InputComponent, A1
|
|
|
30
30
|
private togglePasswordRevealedButton?;
|
|
31
31
|
private isCaptionVisible;
|
|
32
32
|
private timeoutId;
|
|
33
|
+
private maxlengthAnnouncementTimeoutId;
|
|
34
|
+
private maxlengthAnnouncementKey;
|
|
33
35
|
private disallowPatternRegex;
|
|
34
36
|
private clearLabel;
|
|
35
37
|
private timeAnnouncement;
|
|
@@ -38,6 +40,7 @@ export declare class DuetInput implements ThemeableComponent, InputComponent, A1
|
|
|
38
40
|
private passwordShownAriaAnnouncement;
|
|
39
41
|
private passwordHiddenAriaAnnouncement;
|
|
40
42
|
private chipsSelectedDesriptionLabel;
|
|
43
|
+
private maxlengthReachedLabel;
|
|
41
44
|
/**
|
|
42
45
|
* Reference to host HTML element.
|
|
43
46
|
*/
|
|
@@ -55,6 +58,10 @@ export declare class DuetInput implements ThemeableComponent, InputComponent, A1
|
|
|
55
58
|
*/
|
|
56
59
|
isFocused: boolean;
|
|
57
60
|
_accessiblePopup: string;
|
|
61
|
+
/**
|
|
62
|
+
* Text announced to screen readers when the maxlength limit is reached.
|
|
63
|
+
*/
|
|
64
|
+
maxlengthAnnouncement: string;
|
|
58
65
|
/**
|
|
59
66
|
* Indicates the id of a related component’s visually focused element.
|
|
60
67
|
*/
|
|
@@ -327,6 +334,10 @@ export declare class DuetInput implements ThemeableComponent, InputComponent, A1
|
|
|
327
334
|
private onBlur;
|
|
328
335
|
private onFocus;
|
|
329
336
|
private onClear;
|
|
337
|
+
private onInputKeyDown;
|
|
338
|
+
private onInputPaste;
|
|
339
|
+
private isAtMaxlengthWithoutSelection;
|
|
340
|
+
private handleMaxlengthLimitReached;
|
|
330
341
|
/**
|
|
331
342
|
* Private functions
|
|
332
343
|
*/
|
|
@@ -101,6 +101,11 @@ export declare class DuetPhoneInput implements ThemeableComponent, A11yComponent
|
|
|
101
101
|
* Name of the input.
|
|
102
102
|
*/
|
|
103
103
|
name: string;
|
|
104
|
+
/**
|
|
105
|
+
* Set the type of automatic completion by the browser. Must include "tel", may also include token "home", "work" or
|
|
106
|
+
* "mobile". If you must disable automatic completion (not recommended) use "off"
|
|
107
|
+
*/
|
|
108
|
+
autoComplete: string;
|
|
104
109
|
/**
|
|
105
110
|
* Display the input in error state along with an error message.
|
|
106
111
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DuetColor, DuetHeadingLevel, DuetMargin, DuetTheme } from "../../common-types";
|
|
2
2
|
import { ThemeableComponent } from "../../common/themeable-component";
|
|
3
|
+
import { DuetSource } from "../../utils/picture-utils";
|
|
3
4
|
/**
|
|
4
5
|
* @slot pre-heading - Slot for pre-heading content.
|
|
5
6
|
* @slot heading - Slot for heading content. Only span should be used in this slot.
|
|
@@ -38,6 +39,11 @@ export declare class DuetPromoCard implements ThemeableComponent {
|
|
|
38
39
|
* Alt attribute text for the image. If not provided, image is assigned presentation role.
|
|
39
40
|
*/
|
|
40
41
|
imageAlt: string;
|
|
42
|
+
/**
|
|
43
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
44
|
+
* This is an experimental feature and might be changed without notice.
|
|
45
|
+
*/
|
|
46
|
+
sources: DuetSource[] | string;
|
|
41
47
|
/**
|
|
42
48
|
* The actual heading level used in the HTML markup.
|
|
43
49
|
*/
|
|
@@ -381,6 +381,11 @@ export namespace Components {
|
|
|
381
381
|
* Alt attribute text for the image. If not provided, image is assigned presentation role.
|
|
382
382
|
*/
|
|
383
383
|
"imageAlt": string;
|
|
384
|
+
/**
|
|
385
|
+
* Will the image cover the whole image area (possibly getting cropped), or will it be contained without any cropping (possibly not filling the whole area).
|
|
386
|
+
* @default "cover"
|
|
387
|
+
*/
|
|
388
|
+
"imageFit": "cover" | "contain";
|
|
384
389
|
/**
|
|
385
390
|
* Controls the margin of the component.
|
|
386
391
|
* @default "auto"
|
|
@@ -392,7 +397,7 @@ export namespace Components {
|
|
|
392
397
|
*/
|
|
393
398
|
"size": bannerSize;
|
|
394
399
|
/**
|
|
395
|
-
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
400
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
396
401
|
*/
|
|
397
402
|
"sources": DuetSource[] | string;
|
|
398
403
|
/**
|
|
@@ -544,7 +549,7 @@ export namespace Components {
|
|
|
544
549
|
*/
|
|
545
550
|
"external": boolean;
|
|
546
551
|
/**
|
|
547
|
-
* Keep the button fixed width even on mobile viewports.
|
|
552
|
+
* Keep the button fixed width even on mobile viewports. Fixed width is always used for variation plain.
|
|
548
553
|
* @default false
|
|
549
554
|
*/
|
|
550
555
|
"fixed": boolean;
|
|
@@ -754,6 +759,10 @@ export namespace Components {
|
|
|
754
759
|
* @default undefined
|
|
755
760
|
*/
|
|
756
761
|
"shadowBreakpoint"?: DuetBreakpoints;
|
|
762
|
+
/**
|
|
763
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
764
|
+
*/
|
|
765
|
+
"sources": DuetSource[] | string;
|
|
757
766
|
/**
|
|
758
767
|
* Theme of the card.
|
|
759
768
|
* @default ""
|
|
@@ -904,12 +913,17 @@ export namespace Components {
|
|
|
904
913
|
"type": DuetChoiceType;
|
|
905
914
|
}
|
|
906
915
|
interface DuetChip {
|
|
916
|
+
/**
|
|
917
|
+
* Indicates the id or a string of space seperated ids of a component(s) that describes the input.
|
|
918
|
+
* @default ""
|
|
919
|
+
*/
|
|
920
|
+
"accessibleDescribedBy": string;
|
|
907
921
|
/**
|
|
908
922
|
* If the component expands or collapses adjacent content, then use this property to add the aria-expanded attribute to the opening element. Set the value to convey the current expanded (true) or collapsed (false) state of the content.
|
|
909
923
|
*/
|
|
910
924
|
"accessibleExpanded": boolean;
|
|
911
925
|
/**
|
|
912
|
-
* Adds accessible label for the chip that is
|
|
926
|
+
* Adds accessible label for the chip that is used by screen readers and other assistive technology. Has effect only with "button" variation as for the other variations the accessible label is automatically generated.
|
|
913
927
|
*/
|
|
914
928
|
"accessibleLabel": string;
|
|
915
929
|
/**
|
|
@@ -941,7 +955,7 @@ export namespace Components {
|
|
|
941
955
|
*/
|
|
942
956
|
"name": string;
|
|
943
957
|
/**
|
|
944
|
-
* Id of the DuetPopupMenu that is controlled by the chip.
|
|
958
|
+
* Id of the DuetPopupMenu that is controlled by the chip. Works only with "filter" variation.
|
|
945
959
|
*/
|
|
946
960
|
"popup": string;
|
|
947
961
|
/**
|
|
@@ -973,7 +987,7 @@ export namespace Components {
|
|
|
973
987
|
*/
|
|
974
988
|
"value": string;
|
|
975
989
|
/**
|
|
976
|
-
* Variation of the chip. Button should be used to present a list of actions or suggestions. It behaves like a button and must be used together with a click handler. Filter acts like a checkbox, it can be toggled on or off, and it should be used with a value. Input represents items input by the user, and the chip can be removed with a click. Radio behaves like a radio button, it can be toggled on or off, and it should be used with a value and name.
|
|
990
|
+
* Variation of the chip. Button should be used to present a list of actions or suggestions. It behaves like a button and must be used together with a click handler. Filter acts like a checkbox, it can be toggled on or off, and it should be used with a value. Filter can also be used with a popup-menu - then the initial text describes the type of category of filtering, and the selection from the popup-menu sets the filter value. Input represents items input by the user, and the chip can be removed with a click. Radio behaves like a radio button, it can be toggled on or off in a group, and it should be used with a value and name.
|
|
977
991
|
* @default "button"
|
|
978
992
|
*/
|
|
979
993
|
"variation": DuetChipVariation;
|
|
@@ -1385,6 +1399,10 @@ export namespace Components {
|
|
|
1385
1399
|
* Phone.
|
|
1386
1400
|
*/
|
|
1387
1401
|
"phone": string;
|
|
1402
|
+
/**
|
|
1403
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
1404
|
+
*/
|
|
1405
|
+
"sources": DuetSource[] | string;
|
|
1388
1406
|
/**
|
|
1389
1407
|
* Theme.
|
|
1390
1408
|
* @default ""
|
|
@@ -1444,6 +1462,21 @@ export namespace Components {
|
|
|
1444
1462
|
* @default false
|
|
1445
1463
|
*/
|
|
1446
1464
|
"disabled": boolean;
|
|
1465
|
+
/**
|
|
1466
|
+
* Disallow selecting Finnish bank holidays, including Easter-based dates and Midsummer Eve.
|
|
1467
|
+
* @default false
|
|
1468
|
+
*/
|
|
1469
|
+
"disallowBankHolidays": boolean;
|
|
1470
|
+
/**
|
|
1471
|
+
* Disallow selecting Saturdays and Sundays.
|
|
1472
|
+
* @default false
|
|
1473
|
+
*/
|
|
1474
|
+
"disallowWeekends": boolean;
|
|
1475
|
+
/**
|
|
1476
|
+
* Disallow selecting specific dates. Accepts an array of ISO-8601 (YYYY-MM-DD) dates, or a comma-separated string of the same when set as an HTML attribute.
|
|
1477
|
+
* @default []
|
|
1478
|
+
*/
|
|
1479
|
+
"disallowedDates": string | string[];
|
|
1447
1480
|
/**
|
|
1448
1481
|
* If form input field has a placeholder text, and user types anything (causing the text to dissapear), settings this to true will "echo" it into the caption slot - this option will be false by default for the next few versions, but will eventually be true by default (scheduled for 4.30.0)
|
|
1449
1482
|
* @default false
|
|
@@ -1552,7 +1585,7 @@ export namespace Components {
|
|
|
1552
1585
|
*/
|
|
1553
1586
|
"tooltipDirection": DuetTooltipDirection;
|
|
1554
1587
|
/**
|
|
1555
|
-
* This offers information relating to the current validity of the component. It follow as closely as possible the behaviour of the native date input. Useful properties to inspect are badInput, valueMissing, rangeOverflow, rangeUnderflow.
|
|
1588
|
+
* This offers information relating to the current validity of the component. It follow as closely as possible the behaviour of the native date input. Useful properties to inspect are badInput, valueMissing, rangeOverflow, rangeUnderflow. For disallowed dates property customError is set true.
|
|
1556
1589
|
* @readonly
|
|
1557
1590
|
*/
|
|
1558
1591
|
"validity": ValidityState;
|
|
@@ -2182,6 +2215,10 @@ export namespace Components {
|
|
|
2182
2215
|
* @default ""
|
|
2183
2216
|
*/
|
|
2184
2217
|
"preHeading": string;
|
|
2218
|
+
/**
|
|
2219
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
2220
|
+
*/
|
|
2221
|
+
"sources": DuetSource[] | string;
|
|
2185
2222
|
/**
|
|
2186
2223
|
* The level of the heading. Only usable with campaign, section variations.
|
|
2187
2224
|
* @default "h2"
|
|
@@ -3834,6 +3871,11 @@ export namespace Components {
|
|
|
3834
3871
|
* @default undefined
|
|
3835
3872
|
*/
|
|
3836
3873
|
"accessibleLabelledBy": string;
|
|
3874
|
+
/**
|
|
3875
|
+
* Set the type of automatic completion by the browser. Must include "tel", may also include token "home", "work" or "mobile". If you must disable automatic completion (not recommended) use "off"
|
|
3876
|
+
* @default "tel"
|
|
3877
|
+
*/
|
|
3878
|
+
"autoComplete": string;
|
|
3837
3879
|
/**
|
|
3838
3880
|
* Caption (underneath label) that can be set as a way of adding extra information
|
|
3839
3881
|
*/
|
|
@@ -4181,6 +4223,10 @@ export namespace Components {
|
|
|
4181
4223
|
* Sets focus on underlying a element. Available only when url attribute is used. Use this method instead of the native `focus()`.
|
|
4182
4224
|
*/
|
|
4183
4225
|
"setFocus": (options?: FocusOptions) => Promise<void>;
|
|
4226
|
+
/**
|
|
4227
|
+
* Array of sources for responsive images. Sources have the properties of <source> element. This is an experimental feature and might be changed without notice.
|
|
4228
|
+
*/
|
|
4229
|
+
"sources": DuetSource[] | string;
|
|
4184
4230
|
/**
|
|
4185
4231
|
* Text color.
|
|
4186
4232
|
* @default "secondary"
|
|
@@ -8118,6 +8164,11 @@ declare namespace LocalJSX {
|
|
|
8118
8164
|
* Alt attribute text for the image. If not provided, image is assigned presentation role.
|
|
8119
8165
|
*/
|
|
8120
8166
|
"imageAlt"?: string;
|
|
8167
|
+
/**
|
|
8168
|
+
* Will the image cover the whole image area (possibly getting cropped), or will it be contained without any cropping (possibly not filling the whole area).
|
|
8169
|
+
* @default "cover"
|
|
8170
|
+
*/
|
|
8171
|
+
"imageFit"?: "cover" | "contain";
|
|
8121
8172
|
/**
|
|
8122
8173
|
* Controls the margin of the component.
|
|
8123
8174
|
* @default "auto"
|
|
@@ -8129,7 +8180,7 @@ declare namespace LocalJSX {
|
|
|
8129
8180
|
*/
|
|
8130
8181
|
"size"?: bannerSize;
|
|
8131
8182
|
/**
|
|
8132
|
-
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
8183
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
8133
8184
|
*/
|
|
8134
8185
|
"sources"?: DuetSource[] | string;
|
|
8135
8186
|
/**
|
|
@@ -8281,7 +8332,7 @@ declare namespace LocalJSX {
|
|
|
8281
8332
|
*/
|
|
8282
8333
|
"external"?: boolean;
|
|
8283
8334
|
/**
|
|
8284
|
-
* Keep the button fixed width even on mobile viewports.
|
|
8335
|
+
* Keep the button fixed width even on mobile viewports. Fixed width is always used for variation plain.
|
|
8285
8336
|
* @default false
|
|
8286
8337
|
*/
|
|
8287
8338
|
"fixed"?: boolean;
|
|
@@ -8495,6 +8546,10 @@ declare namespace LocalJSX {
|
|
|
8495
8546
|
* @default undefined
|
|
8496
8547
|
*/
|
|
8497
8548
|
"shadowBreakpoint"?: DuetBreakpoints;
|
|
8549
|
+
/**
|
|
8550
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
8551
|
+
*/
|
|
8552
|
+
"sources"?: DuetSource[] | string;
|
|
8498
8553
|
/**
|
|
8499
8554
|
* Theme of the card.
|
|
8500
8555
|
* @default ""
|
|
@@ -8653,12 +8708,17 @@ declare namespace LocalJSX {
|
|
|
8653
8708
|
"type"?: DuetChoiceType;
|
|
8654
8709
|
}
|
|
8655
8710
|
interface DuetChip {
|
|
8711
|
+
/**
|
|
8712
|
+
* Indicates the id or a string of space seperated ids of a component(s) that describes the input.
|
|
8713
|
+
* @default ""
|
|
8714
|
+
*/
|
|
8715
|
+
"accessibleDescribedBy"?: string;
|
|
8656
8716
|
/**
|
|
8657
8717
|
* If the component expands or collapses adjacent content, then use this property to add the aria-expanded attribute to the opening element. Set the value to convey the current expanded (true) or collapsed (false) state of the content.
|
|
8658
8718
|
*/
|
|
8659
8719
|
"accessibleExpanded"?: boolean;
|
|
8660
8720
|
/**
|
|
8661
|
-
* Adds accessible label for the chip that is
|
|
8721
|
+
* Adds accessible label for the chip that is used by screen readers and other assistive technology. Has effect only with "button" variation as for the other variations the accessible label is automatically generated.
|
|
8662
8722
|
*/
|
|
8663
8723
|
"accessibleLabel"?: string;
|
|
8664
8724
|
/**
|
|
@@ -8706,7 +8766,7 @@ declare namespace LocalJSX {
|
|
|
8706
8766
|
*/
|
|
8707
8767
|
"onDuetRemove"?: (event: DuetChipCustomEvent<DuetChipEvent>) => void;
|
|
8708
8768
|
/**
|
|
8709
|
-
* Id of the DuetPopupMenu that is controlled by the chip.
|
|
8769
|
+
* Id of the DuetPopupMenu that is controlled by the chip. Works only with "filter" variation.
|
|
8710
8770
|
*/
|
|
8711
8771
|
"popup"?: string;
|
|
8712
8772
|
/**
|
|
@@ -8724,7 +8784,7 @@ declare namespace LocalJSX {
|
|
|
8724
8784
|
*/
|
|
8725
8785
|
"value"?: string;
|
|
8726
8786
|
/**
|
|
8727
|
-
* Variation of the chip. Button should be used to present a list of actions or suggestions. It behaves like a button and must be used together with a click handler. Filter acts like a checkbox, it can be toggled on or off, and it should be used with a value. Input represents items input by the user, and the chip can be removed with a click. Radio behaves like a radio button, it can be toggled on or off, and it should be used with a value and name.
|
|
8787
|
+
* Variation of the chip. Button should be used to present a list of actions or suggestions. It behaves like a button and must be used together with a click handler. Filter acts like a checkbox, it can be toggled on or off, and it should be used with a value. Filter can also be used with a popup-menu - then the initial text describes the type of category of filtering, and the selection from the popup-menu sets the filter value. Input represents items input by the user, and the chip can be removed with a click. Radio behaves like a radio button, it can be toggled on or off in a group, and it should be used with a value and name.
|
|
8728
8788
|
* @default "button"
|
|
8729
8789
|
*/
|
|
8730
8790
|
"variation"?: DuetChipVariation;
|
|
@@ -9139,6 +9199,10 @@ declare namespace LocalJSX {
|
|
|
9139
9199
|
* Phone.
|
|
9140
9200
|
*/
|
|
9141
9201
|
"phone"?: string;
|
|
9202
|
+
/**
|
|
9203
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
9204
|
+
*/
|
|
9205
|
+
"sources"?: DuetSource[] | string;
|
|
9142
9206
|
/**
|
|
9143
9207
|
* Theme.
|
|
9144
9208
|
* @default ""
|
|
@@ -9202,6 +9266,21 @@ declare namespace LocalJSX {
|
|
|
9202
9266
|
* @default false
|
|
9203
9267
|
*/
|
|
9204
9268
|
"disabled"?: boolean;
|
|
9269
|
+
/**
|
|
9270
|
+
* Disallow selecting Finnish bank holidays, including Easter-based dates and Midsummer Eve.
|
|
9271
|
+
* @default false
|
|
9272
|
+
*/
|
|
9273
|
+
"disallowBankHolidays"?: boolean;
|
|
9274
|
+
/**
|
|
9275
|
+
* Disallow selecting Saturdays and Sundays.
|
|
9276
|
+
* @default false
|
|
9277
|
+
*/
|
|
9278
|
+
"disallowWeekends"?: boolean;
|
|
9279
|
+
/**
|
|
9280
|
+
* Disallow selecting specific dates. Accepts an array of ISO-8601 (YYYY-MM-DD) dates, or a comma-separated string of the same when set as an HTML attribute.
|
|
9281
|
+
* @default []
|
|
9282
|
+
*/
|
|
9283
|
+
"disallowedDates"?: string | string[];
|
|
9205
9284
|
/**
|
|
9206
9285
|
* If form input field has a placeholder text, and user types anything (causing the text to dissapear), settings this to true will "echo" it into the caption slot - this option will be false by default for the next few versions, but will eventually be true by default (scheduled for 4.30.0)
|
|
9207
9286
|
* @default false
|
|
@@ -9310,7 +9389,7 @@ declare namespace LocalJSX {
|
|
|
9310
9389
|
*/
|
|
9311
9390
|
"tooltipDirection"?: DuetTooltipDirection;
|
|
9312
9391
|
/**
|
|
9313
|
-
* This offers information relating to the current validity of the component. It follow as closely as possible the behaviour of the native date input. Useful properties to inspect are badInput, valueMissing, rangeOverflow, rangeUnderflow.
|
|
9392
|
+
* This offers information relating to the current validity of the component. It follow as closely as possible the behaviour of the native date input. Useful properties to inspect are badInput, valueMissing, rangeOverflow, rangeUnderflow. For disallowed dates property customError is set true.
|
|
9314
9393
|
* @readonly
|
|
9315
9394
|
*/
|
|
9316
9395
|
"validity"?: ValidityState;
|
|
@@ -10000,6 +10079,10 @@ declare namespace LocalJSX {
|
|
|
10000
10079
|
* @default ""
|
|
10001
10080
|
*/
|
|
10002
10081
|
"preHeading"?: string;
|
|
10082
|
+
/**
|
|
10083
|
+
* Array of sources for responsive images. Sources have the properties of <source> element.
|
|
10084
|
+
*/
|
|
10085
|
+
"sources"?: DuetSource[] | string;
|
|
10003
10086
|
/**
|
|
10004
10087
|
* The level of the heading. Only usable with campaign, section variations.
|
|
10005
10088
|
* @default "h2"
|
|
@@ -11590,6 +11673,11 @@ declare namespace LocalJSX {
|
|
|
11590
11673
|
* @default undefined
|
|
11591
11674
|
*/
|
|
11592
11675
|
"accessibleLabelledBy"?: string;
|
|
11676
|
+
/**
|
|
11677
|
+
* Set the type of automatic completion by the browser. Must include "tel", may also include token "home", "work" or "mobile". If you must disable automatic completion (not recommended) use "off"
|
|
11678
|
+
* @default "tel"
|
|
11679
|
+
*/
|
|
11680
|
+
"autoComplete"?: string;
|
|
11593
11681
|
/**
|
|
11594
11682
|
* Caption (underneath label) that can be set as a way of adding extra information
|
|
11595
11683
|
*/
|
|
@@ -11928,6 +12016,10 @@ declare namespace LocalJSX {
|
|
|
11928
12016
|
* @default "auto"
|
|
11929
12017
|
*/
|
|
11930
12018
|
"margin"?: DuetMargin;
|
|
12019
|
+
/**
|
|
12020
|
+
* Array of sources for responsive images. Sources have the properties of <source> element. This is an experimental feature and might be changed without notice.
|
|
12021
|
+
*/
|
|
12022
|
+
"sources"?: DuetSource[] | string;
|
|
11931
12023
|
/**
|
|
11932
12024
|
* Text color.
|
|
11933
12025
|
* @default "secondary"
|
|
@@ -14,6 +14,7 @@ export declare const isQuestionKey: (e: KeyboardEvent) => boolean;
|
|
|
14
14
|
export declare const isEnterKey: (e: KeyboardEvent) => boolean;
|
|
15
15
|
export declare const isKeyboardClick: (e: KeyboardEvent) => boolean;
|
|
16
16
|
export declare const isNumber: (e: KeyboardEvent) => boolean;
|
|
17
|
+
export declare const isCharacterInsertKey: (e: KeyboardEvent) => boolean;
|
|
17
18
|
export declare const subscribeTabbingChange: (component: any) => void;
|
|
18
19
|
export declare const unsubscribeTabbingChange: (component: any) => void;
|
|
19
20
|
export declare const enableUserIsTabbing: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duetds/components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.0",
|
|
4
4
|
"description": "This package includes Duet Design System Web Components and related utilities.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "duetdesignsystem@lahitapiola.fi"
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"body-scroll-lock": "3.1.5"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@duetds/fonts": "3.0.
|
|
71
|
-
"@duetds/icons": "4.3.
|
|
72
|
-
"@duetds/tokens": "5.1.
|
|
70
|
+
"@duetds/fonts": "3.0.68",
|
|
71
|
+
"@duetds/icons": "4.3.10",
|
|
72
|
+
"@duetds/tokens": "5.1.3",
|
|
73
73
|
"@percy/cli": "1.30.1",
|
|
74
74
|
"@rollup/plugin-replace": "5.0.2",
|
|
75
75
|
"@stencil/core": "4.36.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "572d3c821f7c9a3d07ebba40c15cf13221523411"
|
|
101
101
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,h as t,H as o,g as n}from"./p-B2cboDWM.js";import{i}from"./p-BzYmwX5_.js";const a=class{constructor(t){e(this,t),this.theme="",this.sticky=!1}componentWillLoad(){i(this)}render(){return t(o,{key:"7e22b4d7023564579ca7e937ea9b3e1c41383217"},t("div",{key:"cbd604f24c3d48b16771529aaf84590fbe2c349e",class:{container:!0,sticky:this.sticky}},t("slot",{key:"6d354508134cf4f829922e1d12b9163ed8796753"}),t("slot",{key:"2cde080603a8252ec4015dedd7166b3d3c59b945",name:"mobile"}),t("slot",{key:"9654b2dfc61dbbb9833a8b5df624bdb92adadc15",name:"desktop"})))}get element(){return n(this)}};a.style="*,*::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;width:100%}:host([sticky]){position:relative;z-index:300}.container{position:relative;z-index:400;pointer-events:none}.container *{pointer-events:auto}::slotted(*[slot=mobile]){display:inherit}::slotted(*[slot=desktop]){display:none}@media (min-width: 62em){::slotted(*[slot=mobile]){display:none}::slotted(*[slot=desktop]){display:inherit}}.sticky{position:sticky;top:0}@media (min-width: 62em){.sticky{position:relative;top:unset}}";export{a as duet_nav}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,c as t,h as s,H as o,g as a}from"./p-B2cboDWM.js";import{i}from"./p-BzYmwX5_.js";import{c as n}from"./p-Cfr_DJqU.js";import{i as r}from"./p-Db8rvjPI.js";import{a as h,g as l,c,d}from"./p-CFqvB5PA.js";import"./p-C6E9F6QT.js";const m=class{constructor(s){e(this,s),this.duetToggle=t(this,"duetToggle",7),this.contentId=n("DuetShowMore"),this.buttonId=n("DuetShowMoreButton"),this.isSafariBrowser=/^((?!chrome|android).)*safari/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent),this.buttonAriaOpen=!1,this.theme="",this.language=h(),this.showMoreLabelDefaults={fi:"Näytä lisää",sv:"Visa mer",en:"Show more"},this.showMoreLabel=l(this.showMoreLabelDefaults),this.showLessLabelDefaults={fi:"Näytä vähemmän",sv:"Visa mindre",en:"Show less"},this.showLessLabel=l(this.showLessLabelDefaults),this.showMoreAccessibleLabelDefaults={fi:"Näytä lisää tästä aiheesta",sv:"Visa mer om detta ämne",en:"Show more about this subject"},this.showMoreAccessibleLabel=l(this.showMoreAccessibleLabelDefaults),this.showLessAccessibleLabelDefaults={fi:"Näytä vähemmän tästä aiheesta",sv:"Visa mindre om detta ämne",en:"Show less about this subject"},this.showLessAccessibleLabel=l(this.showLessAccessibleLabelDefaults),this.margin="auto",this.buttonMargin="auto",this.buttonPadding="auto",this.open=!1,this.handleKeyDown=e=>{r(e)&&this.handleClick(e)},this.handleClick=e=>{e.preventDefault();const t=!this.open;this.open=t,t?(setTimeout((()=>{this.contentElement.focus()}),100),setTimeout((()=>{this.buttonAriaOpen=t}),500)):this.buttonAriaOpen=t,this.duetToggle.emit({component:"duet-show-more",originalEvent:e})}}componentWillLoad(){i(this),this.buttonAriaOpen=this.open}connectedCallback(){c(this,[{prop:"showMoreLabel",defaults:"showMoreLabelDefaults"},{prop:"showLessLabel",defaults:"showLessLabelDefaults"},{prop:"showMoreAccessibleLabel",defaults:"showMoreAccessibleLabelDefaults"},{prop:"showLessAccessibleLabel",defaults:"showLessAccessibleLabelDefaults"}])}disconnectedCallback(){d(this)}render(){return s(o,{key:"63b3a492707e1a57c1611b073e6b663f3b3f5550"},s("div",{key:"663d694dedf732ed665fdd22ac8bfbb609aa4ba2",class:{"duet-show-more":!0,"duet-theme-turva":"turva"===this.theme,"duet-m-0":"none"===this.margin,open:this.open}},s("div",{key:"035ca78df910e7b4c7266e94ce54011f73197274",ref:e=>this.contentElement=e,class:{content:!0,"duet-theme-turva":"turva"===this.theme},id:this.contentId,tabindex:this.open?"-1":""},s("div",{key:"6a41aea8c1bd21d5112e1d0fadb83de9c25b99a2",class:{"slotted-content":!0}},s("slot",{key:"7cbe45659e187d12579f798c9019be8aa6c40c83"}))),s("duet-button",{key:"fb2e655522a81a79a288db8a6ba720e3ada41a5d",id:this.buttonId,variation:"plain","accessible-label":this.buttonAriaOpen?this.showLessAccessibleLabel:this.showMoreAccessibleLabel,"accessible-expanded":this.buttonAriaOpen?"true":"false","accessible-controls":this.contentId,accessiblePressed:this.isSafariBrowser?this.open:null,onClick:this.handleClick,onKeyDown:this.handleKeyDown,"icon-right":!0,icon:this.open?"action-arrow-up-small":"action-arrow-down-small","icon-size":"medium-small",size:"small",margin:this.buttonMargin,padding:this.buttonPadding,theme:"turva"===this.theme?"turva":"default"},s("span",{key:"5cb30295ce5968c5d7a87185652db0640ab42839"},this.open?this.showLessLabel:this.showMoreLabel))))}get element(){return a(this)}};m.style='*,*::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}.duet-show-more{margin-bottom:16px !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:rgb(8, 42, 77)}.duet-show-more.duet-m-0{margin:0 !important}.duet-show-more .slotted-content{display:none}.duet-show-more.open .slotted-content{display:block}.duet-show-more .content:focus{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva .duet-show-more .content:focus,.duet-show-more .content:focus.duet-theme-turva{outline:2px solid;outline-offset:2px;outline-color:rgba(53, 79, 101, 0.8)}.duet-show-more.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, 42, 59)}';export{m as duet_show_more}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{h as t,r as e,c as a,H as i,g as o}from"./p-B2cboDWM.js";import{D as n}from"./p-Cg4m_WHe.js";import{i as r}from"./p-BzYmwX5_.js";import{c as s}from"./p-Cfr_DJqU.js";import{F as d}from"./p-R3pTP2Oy.js";import{a as l,g as u,c,d as b}from"./p-CFqvB5PA.js";import{c as h,p}from"./p-5lFzA17H.js";import{g as m}from"./p-DvwKrUS6.js";import"./p-C6E9F6QT.js";const g={day:"numeric",month:"long",weekday:"long"},f={day:"numeric",month:"long",year:"numeric"},v={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",g),formatterLong:new Intl.DateTimeFormat("fi-FI",f)},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",g),formatterLong:new Intl.DateTimeFormat("en-GB",f)},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",g),formatterLong:new Intl.DateTimeFormat("sv-SE",f)}};var y,k,x=m(k?y:(k=1,y={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>'}));const w=({onClick:e,placeholder:a,inputLabel:i,valueAsDate:o,formattedValue:n,language:r,identifier:s,theme:d,disabled:l,error:u,role:c,required:b,tooltip:h,tooltipDirection:p,labelHidden:m,buttonRef:g,inputRef:f,onInput:y,onBlur:k,onFocus:w,hasFocus:S,accessibleActiveDescendant:D,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:L,accessibleLiveError:A,echoPlaceholder:F,caption:z})=>{const{buttonLabel:C,selected:j,formatterLong:E}=v[r];return t("div",{class:{"duet-theme-turva":"turva"===d,"duet-date-input":!0,"duet-date-input-has-focus":S}},t("duet-input",{label:i,value:n,placeholder:a,id:s,disabled:l,theme:d,error:u,role:c,required:b,tooltip:h,tooltipDirection:p,margin:"none",labelHidden:m,accessibleAutocomplete:"none",onDuetChange:t=>t.stopImmediatePropagation(),onDuetInput:y,onDuetFocus:w,onDuetBlur:k,autoComplete:"off",disallowPattern:"[^0-9\\.\\-\\/]",expand:!0,ref:f,accessibleActiveDescendant:D,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:L,accessibleLiveError:A,echoPlaceholder:F,caption:z,variation:"button"},t("slot",{name:"tooltip"}),t("button",{class:{"duet-date-button":!0,"duet-no-label":m,"input-error":!!u},onClick:e,disabled:l,ref:g,type:"button",slot:"button"},t("duet-icon",{icon:x.svg,margin:"none",size:"small",color:"currentColor"}),t("duet-visually-hidden",null,C,o&&t("span",null,", ",j," ",E.format(o))))))},S=/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{4})$/,D=/^(\d{4})-(\d{2})-(\d{2})$/;function M(t,e,a){var i=parseInt(a,10),o=parseInt(e,10),n=parseInt(t,10);if(Number.isInteger(n)&&Number.isInteger(o)&&Number.isInteger(i)&&o>0&&o<=12&&i>0&&i<=31&&n>0){const t=new Date(n,o-1,i);if(t.getDate()!==i||t.getMonth()!==o-1)return;return t}}function I(t){if(!t)return;const e=t.match(S);return e?M(e[3],e[2],e[1]):void 0}function L(t){if(!t)return;const e=t.match(D);return e?M(e[1],e[2],e[3]):void 0}function A(t,e){if(!t)return"";var a=t.getDate().toString(10),i=(t.getMonth()+1).toString(10),o=t.getFullYear().toString(10);return t.getDate()<10&&(a=`0${a}`),t.getMonth()<9&&(i=`0${i}`),e.replace(/MM/i,i).replace(/YYYY/i,o).replace(/DD/i,a)}function F(t){return A(t,"YYYY-MM-DD")}function z(t,e){return null!=t&&null!=e&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function C(t,e){var a=new Date(t);return a.setDate(a.getDate()+e),a}function j(t,e=1){var a=new Date(t),i=a.getDay(),o=(i<e?7:0)+i-e;return a.setDate(a.getDate()-o),a}function E(t,e=1){var a=new Date(t),i=a.getDay(),o=6+(i<e?-7:0)-(i-e);return a.setDate(a.getDate()+o),a}function V(t){return new Date(t.getFullYear(),t.getMonth(),1)}function U(t){return new Date(t.getFullYear(),t.getMonth()+1,0)}function H(t,e){const a=new Date(t);return a.setMonth(e),a}function B(t,e){const a=new Date(t);return a.setFullYear(e),a}function R(t,e,a){return Y(t,e,a)===t}function Y(t,e,a){const i=t.getTime();return e&&e instanceof Date&&i<e.getTime()?e:a&&a instanceof Date&&i>a.getTime()?a:t}const P={fi:"Valittu päivä",en:"Selected day",sv:"Vald dag"},T=({focusedDay:e,today:a,day:i,language:o,onDaySelect:n,onKeyboardNavigation:r,ref:s,inRange:d,isSelected:l})=>{const u=z(i,a),c=z(i,e),b=i.getMonth()!==e.getMonth(),h=!d,{formatterShort:p}=v[o];return t("td",{"data-day":F(i),class:{"duet-date-table-cell":!0,selected:l},"aria-label":`${p.format(i)}${l?`, ${P[o]}`:void 0}`,role:"button",tabIndex:c?0:-1,onClick:function(t){n(t,i)},onKeyDown:r,"aria-disabled":h||b,ref:s},t("span",{class:{"duet-date-table-button":!0,outside:h,disabled:b,today:u}},i.getDate()))};function J(t){var e;const a=t.trim().split("+"),i=a.pop();return["shift"===(null===(e=a[0])||void 0===e?void 0:e.toLowerCase()),i]}function N(t){const e=Object.keys(t).map((e=>[J(e),t[e]]));return function(t){if(!(t instanceof KeyboardEvent))return;const a=e.find((([[e,a]])=>(a.toUpperCase()===t.key.toUpperCase()||a===t.code)&&e===t.shiftKey));a&&(a[1](t),t.preventDefault())}}const O=({selectedDate:e,focusedDate:a,labelledById:i,theme:o,language:n,min:r,max:s,onDateSelect:d,onKeyboardNavigation:l,focusedDayRef:u,onFocusEnter:c,onFocusExit:b})=>{const{dayLabels:h}=v[n],p=new Date,m=function(t,e=1){return function(t,e){const a=[];let i=t;for(;!z(i,e);)a.push(i),i=C(i,1);return a.push(i),a}(j(V(t),e),E(U(t),e))}(a);return t("div",{role:"application"},t("table",{role:"presentation",class:{"duet-date-table":!0,"duet-theme-turva":"turva"===o},"aria-labelledby":i,onFocusin:c,onFocusout:function(t){const e=t.relatedTarget;e&&!t.currentTarget.contains(e)&&b(t)}},t("thead",null,t("tr",null,h.map((e=>t("th",{scope:"col"},t("span",{"aria-hidden":"true"},e.substr(0,2))))))),t("tbody",null,function(t){const e=[];for(let a=0;a<t.length;a+=7)e.push(t.slice(a,a+7));return e}(m).map((i=>t("tr",{class:"duet-date-table-row"},i.map((i=>t(T,{day:i,today:p,language:n,focusedDay:a,inRange:R(i,r,s),isSelected:z(i,e),onDaySelect:d,onKeyboardNavigation:l,ref:t=>{t&&z(i,a)&&u(t)}})))))))))},K=class{constructor(t){e(this,t),this.duetChange=a(this,"duetChange",7),this.duetBlur=a(this,"duetBlur",7),this.duetFocus=a(this,"duetFocus",7),this.proxyId=s("DuetDatePicker"),this.monthSelectId=s("DuetDatePicker"),this.yearSelectId=s("DuetDatePicker"),this.dialogLabelId=s("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.open=!1,this.focusedDay=new Date,this.inputValue="",this.inputHasFocus=!1,this.theme="",this.expand=!1,this.name="",this.identifier="",this.label="",this.margin="auto",this.language=l(),this.placeholderDefaults={fi:"pp.kk.vvvv",en:"dd.mm.yyyy",sv:"dd.mm.åååå"},this.placeholder=u(this.placeholderDefaults,this.language),this.echoPlaceholder=!1,this.disabled=!1,this.error="",this.disableBuiltInErrors=!1,this.labelHidden=!1,this.required=!1,this.direction="right",this.tooltip="",this.tooltipDirection="auto",this.value="",this.min="",this.max="",this.incrementYears=10,this.accessibleLiveError="polite",this.enableActiveFocus=()=>{this.focusTarget="day-button"},this.disableActiveFocus=()=>{this.focusTarget=null},this.toggleOpen=t=>{t.preventDefault(),this.open?this.hide(!1):this.show()},this.handleBlur=t=>{if(t.stopPropagation(),this.inputHasFocus=!1,!this._validity.valid&&!this.disableBuiltInErrors){const t=Object.entries(this._validity).find((t=>!!t[1]))[0];this.error=u(this.dateErrorMessages[t])}this.duetBlur.emit({component:"duet-date-picker"})},this.handleFocus=t=>{t.stopPropagation(),this.inputHasFocus=!0,this.duetFocus.emit({component:"duet-date-picker"})},this.handleTouchStart=t=>{const e=t.changedTouches[0];this.initialTouchX=e.pageX,this.initialTouchY=e.pageY},this.handleTouchMove=t=>{t.preventDefault()},this.handleTouchEnd=t=>{const e=t.changedTouches[0],a=e.pageX-this.initialTouchX,i=e.pageY-this.initialTouchY,o=Math.abs(a)>=70&&Math.abs(i)<=70,n=Math.abs(i)>=70&&Math.abs(a)<=70&&i>0;o?this.addMonths(a<0?1:-1):n&&(this.hide(),t.preventDefault()),this.initialTouchY=null,this.initialTouchX=null},this.handleNextMonthClick=t=>{t.preventDefault(),this.addMonths(1)},this.handlePreviousMonthClick=t=>{t.preventDefault(),this.addMonths(-1)},this.handleEscKey=N({Escape:()=>this.hide(),Esc:()=>this.hide()}),this.handleKeyboardNavigation=N({ArrowRight:()=>this.addDays(1),Right:()=>this.addDays(1),ArrowLeft:()=>this.addDays(-1),Left:()=>this.addDays(-1),ArrowDown:()=>this.addDays(7),Down:()=>this.addDays(7),ArrowUp:()=>this.addDays(-7),Up:()=>this.addDays(-7),Home:()=>this.startOfWeek(),End:()=>this.endOfWeek(),PageUp:()=>this.addMonths(-1),PageDown:()=>this.addMonths(1),"Shift+PageUp":()=>this.addYears(-1),"Shift+PageDown":()=>this.addYears(1),Space:t=>this.handleKeyboardDaySelect(t),Enter:t=>this.handleKeyboardDaySelect(t)}),this.handleKeyboardDaySelect=t=>{const e=L(t.target.dataset.day);this.handleDaySelect(t,e)},this.handleDaySelect=(t,e)=>{R(e,L(this.min),L(this.max))&&(this.setValue(e),this.hide())},this.handleMonthSelect=t=>{this.setMonth(parseInt(t.target.value,10))},this.handleYearSelect=t=>{this.setYear(parseInt(t.target.value,10))},this.handleInputChange=t=>{this.inputValue=t.detail.value;const e=I(this.inputValue);this.setValue(e)}}get validity(){return this.determineValidity(),this._validity}updateValidity(){this.determineValidity()}updateInternalValue(){if(!this.value&&this.inputHasFocus)return;const t=L(this.value),e=I(this.inputValue);t?z(t,e)||(this.inputValue=A(t,"dd.mm.yyyy")):this.inputValue=""}componentWillLoad(){r(this),this.determineValidity(),this.updateInternalValue(),h(this.element,"tooltip","duet-tooltip",1,!0)}componentDidUpdate(){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}}componentDidRender(){p(this.element,this.proxyId,this.name,this.value,this.required)}connectedCallback(){c(this,{prop:"placeholder",defaults:"placeholderDefaults"})}disconnectedCallback(){b(this)}async setFocus(t){this.datePickerInput.setFocus(t)}async show(){this.open=!0,this.focusTarget="month-select",this.setFocusedDay(L(this.value)||new Date)}async hide(t=!0){this.open=!1,t&&(this.focusTarget="toggle-button")}addDays(t){this.setFocusedDay(C(this.focusedDay,t))}addMonths(t){this.setMonth(this.focusedDay.getMonth()+t)}addYears(t){this.setYear(this.focusedDay.getFullYear()+t)}startOfWeek(){this.setFocusedDay(j(this.focusedDay))}endOfWeek(){this.setFocusedDay(E(this.focusedDay))}setMonth(t){const e=H(V(this.focusedDay),t),a=U(e),i=H(this.focusedDay,t);this.setFocusedDay(Y(i,e,a))}setYear(t){const e=B(V(this.focusedDay),t),a=U(e),i=B(this.focusedDay,t);this.setFocusedDay(Y(i,e,a))}setFocusedDay(t){this.focusedDay=Y(t,L(this.min),L(this.max))}determineValidity(){var t,e;const a=L(this.value),i=null!==(e=null===(t=this.datePickerInput)||void 0===t?void 0:t.value)&&void 0!==e?e:"",o=!a&&""!==i,n=!a&&this.required,r=!!a&&!R(a,null,L(this.max)),s=!!a&&!R(a,L(this.min));this._validity={patternMismatch:!1,customError:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,badInput:o,rangeUnderflow:s,rangeOverflow:r,valueMissing:n,valid:!(n||o||s||r)},this._validity.valid&&(this.error="")}setValue(t){const e=F(t);e!==this.value&&(this.value=e,this.determineValidity(),this.duetChange.emit({component:"duet-date-picker",value:this.value,valueAsDate:t}))}handleDocumentClick(t){this.open&&t.composedPath().every((t=>t!==this.dialogWrapperNode&&t!==this.datePickerButton))&&this.hide(!1)}render(){const e=L(this.value),a=(e||this.focusedDay).getFullYear(),o=this.focusedDay.getMonth(),r=this.focusedDay.getFullYear(),s=v[this.language],l=L(this.min),u=L(this.max),c=null!=l&&l.getMonth()===o&&l.getFullYear()===r,b=null!=u&&u.getMonth()===o&&u.getFullYear()===r;let h=a-this.incrementYears,p=a+this.incrementYears;return l&&(h=Math.max(h,l.getFullYear())),u&&(p=Math.min(p,u.getFullYear())),t(i,{key:"bc53156f31fd151a978be4cb494d89811177d2de",class:{"duet-expand":this.expand,"duet-m-0":"none"===this.margin}},t("div",{key:"bd85feeae1d997447181347f131cf0eaa309af93",class:"duet-date"},t(w,{key:"0e22a10646a9df5c2dee41047df08e8df6b63872",hasFocus:this.inputHasFocus,value:this.value,valueAsDate:e,formattedValue:this.inputValue,language:this.language,onInput:this.handleInputChange,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.toggleOpen,name:this.name,disabled:this.disabled,error:this.error,role:this.role,required:this.required,theme:this.theme,tooltip:this.tooltip,tooltipDirection:this.tooltipDirection,labelHidden:this.labelHidden,placeholder:this.placeholder,inputLabel:this.label,identifier:this.identifier,buttonRef:t=>this.datePickerButton=t,inputRef:t=>this.datePickerInput=t,accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy,accessibleLiveError:this.accessibleLiveError,echoPlaceholder:this.echoPlaceholder,caption:this.caption})),t("div",{key:"c4575f4c809d00307b254756d1c00e5d65520b03",class:{"duet-theme-turva":"turva"===this.theme,"duet-date-dialog":!0,left:"left"===this.direction,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},t("duet-overlay",{key:"73718663a16c1f4f18625a0e9b5e12c4d84e2862",visible:this.open,"display-device":"x-small"}),t(d,{key:"55795dff1697ed625725a441813c2837b9180ca4",moveFocusTo:this.focusedDayNode}),t("div",{key:"4575c14cab6890c2ed93f14cc269495f4e6112c6",class:"duet-date-dialog-wrapper",onKeyDown:this.handleEscKey,ref:t=>this.dialogWrapperNode=t},t("duet-visually-hidden",{key:"64ec3d2f1809490ebfe3dd1e04bd332fd603010a","aria-live":"polite"},s.keyboardInstruction),t("div",{key:"b5545e0104ad9a0bc9f99ff3a725752595a0ffa6",class:"duet-date-dialog-mobile-header"},t(n,{key:"73d2c0aa481b994ce191816304e1867f461aa7d7",margin:"none"},this.label),t("button",{key:"c7483c8e743830ff8a21c2127897b43e45b57d8b",class:"duet-date-picker-close",ref:t=>this.closeButtonNode=t,onClick:()=>this.hide(),type:"button"},t("duet-icon",{key:"b2b8fd08895e8a5b0de42af39fb3e8b4810314e7",name:"navigation-close-small",margin:"none",color:"currentColor",size:"xx-small"}),t("duet-visually-hidden",{key:"9238a95c2b5266055844e593ba8ab6349d9d033f"},s.closeLabel))),t("div",{key:"3f68135c40899e3de9f9546ebdace84fbe831141",class:"duet-date-dialog-header"},t("div",{key:"5cc6d3e6a2665e29091147f86fe44339af33327c",class:"duet-date-dialog-dropdowns"},t("duet-visually-hidden",{key:"5bf35b2c9736d2d110344b92942f13be850d644b"},t("h2",{key:"95391f17e2c907733fe1c3d567678d236e369fdc",id:this.dialogLabelId,"aria-live":"polite","aria-atomic":"true"},s.monthLabels[o]," ",this.focusedDay.getFullYear())),t("duet-visually-hidden",{key:"a356aafd4ce51cf91cbc363297645efa79da42e3"},t("label",{key:"d806131d0e348f3743726e47daeb580baaec91a2",htmlFor:this.monthSelectId},s.monthSelectLabel)),t("div",{key:"5e4a84de81c95b6c62dc03de1c805f472377805c",class:"duet-date-dialog-select"},t("select",{key:"aa66520799ef32c4dfe30506cdbeb4f01000055e",id:this.monthSelectId,class:"duet-date-month-select",ref:t=>this.monthSelectNode=t,onChange:this.handleMonthSelect},s.monthLabels.map(((e,a)=>t("option",{key:e,value:a,selected:a===o,disabled:!R(new Date(r,a,1),l?V(l):null,u?U(u):null)},e)))),t("div",{key:"8bf72353d282a2c82f0e64e1a752a17dbcd6423b",class:"duet-date-dialog-select-label","aria-hidden":"true"},t("span",{key:"1b9a7f95c0007b30117782c962311c54244228a3"},s.monthLabelsShort[o]),t("duet-icon",{key:"a234a84604cb1f87ee8c382b7d886e00a13cd913",name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"}))),t("duet-visually-hidden",{key:"f41e59ff6c32248ea057f4547ef6bf24688423e1"},t("label",{key:"10ea1d3b43b673950054ad36abe59688971843d0",htmlFor:this.yearSelectId},s.yearSelectLabel)),t("div",{key:"b7cd16b90fb5126189de4648b99c6634c15bc5a2",class:"duet-date-dialog-select"},t("select",{key:"852475517a751519016dcc2c14023b9f1850b0d9",id:this.yearSelectId,class:"duet-date-year-select",onChange:this.handleYearSelect},function(t,e){for(var a=[],i=t;i<=e;i++)a.push(i);return a}(h,p).map((e=>t("option",{key:e,selected:e===r},e)))),t("div",{key:"426ab30bd0268b659253d8b9dcd375b7da1952dd",class:"duet-date-dialog-select-label","aria-hidden":"true"},t("span",{key:"55b9cc0f5e60cd6ad666e58c2724865216d1c635"},this.focusedDay.getFullYear()),t("duet-icon",{key:"b28ab73ebb1ca7fac93ee3c52d696fa65f2bef29",name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"})))),t("div",{key:"eee0f191f6b409674d0ef2b7383d6ab45c316d7c",class:"duet-date-dialog-buttons"},t("duet-action-button",{key:"5a4c05b83e76b2740f71fe7e2d94602e16aa0219",accessibleLabel:v[this.language].prevMonthLabel,actionName:v[this.language].prevMonthLabel,class:"duet-date-dialog-prev",onClick:this.handlePreviousMonthClick,disabled:c,"icon-name":"action-arrow-left-small"},s.prevMonthLabel),t("duet-action-button",{key:"0d4117fdd8511135bede66b13c8177d7105b567f",accessibleLabel:v[this.language].nextMonthLabel,actionName:v[this.language].nextMonthLabel,class:"duet-date-dialog-next",onClick:this.handleNextMonthClick,disabled:b,"icon-name":"action-arrow-right-small"},s.nextMonthLabel))),t(O,{key:"ac47f9d6b83fa994e5137a45c300db313dd70701",selectedDate:e,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,language:this.language,theme:this.theme,min:l,max:u,focusedDayRef:t=>this.focusedDayNode=t,onFocusEnter:this.enableActiveFocus,onFocusExit:this.disableActiveFocus})),t(d,{key:"9727a0dab133694bd4b2ef008adec00439040b8b",moveFocusTo:this.closeButtonNode})))}get element(){return o(this)}static get watchers(){return{min:["updateValidity"],max:["updateValidity"],value:["updateValidity","updateInternalValue"],required:["updateValidity"],inputValue:["updateValidity"]}}};K.style='.duet-internal-label{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600 !important;line-height:1.25;line-height:1.25;color:rgb(8, 42, 77);text-align:left;word-break:break-word;cursor:default}.duet-internal-label.duet-p-0{padding:0 !important}.duet-internal-label.duet-m-0{margin:0 !important}.duet-internal-label span{font-size:1rem;font-weight:600 !important;word-break:break-word}.duet-internal-label.duet-m-0{margin-bottom:0 !important}.duet-internal-label.duet-small-margin{margin-top:8px !important;margin-bottom:4px !important}.duet-internal-label.duet-has-tooltip{padding-right:48px}@media (min-width: 48em){.duet-internal-label.duet-has-tooltip{padding-right:0}}.duet-internal-label.duet-internal-label-small{font-size:0.875rem}.duet-internal-label.duet-internal-label-small span{font-size:0.875rem}.duet-internal-label.duet-weight-normal{font-weight:400 !important}.duet-internal-label.duet-weight-normal span{font-weight:400 !important}.duet-internal-label.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, 42, 59)}*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0}:host{margin-right:16px !important}:host(:last-child),:host(:last-of-type){margin-right:0 !important}:host(.form-distribute:last-of-type:not(:last-child)){margin-right:16px !important}: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;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;vertical-align:top;text-align:left}@media (min-width: 36em){:host{width:calc(50% - 16px - 3px)}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}.duet-date{position:relative;width:100%}.duet-date button,.duet-date-dialog button{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button{-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-date-button::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:hover:not(:disabled){outline:2px solid;outline-color:rgb(127, 150, 165) !important;outline-offset:-1px}.duet-theme-turva .duet-date-button:hover:not(:disabled),.duet-date-button:hover:not(:disabled).duet-theme-turva{outline-color:rgb(120, 145, 164) !important}.duet-date-button:disabled{pointer-events:none;cursor:not-allowed;background:rgb(245, 248, 250) !important}.duet-date-button:disabled::before{display:none}.duet-date-button:disabled duet-icon{opacity:0.4}.duet-date-button duet-icon{transform:translateY(-1px)}.duet-date-button:active duet-icon{transform:translateY(0)}.duet-date-input-has-focus .duet-date-button,.duet-date-button:focus{height:46px;color:rgb(0, 119, 179)}.duet-date-input-has-focus .duet-date-button:focus,.duet-date-button:focus:focus{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva .duet-date-input-has-focus .duet-date-button:focus,.duet-date-input-has-focus .duet-date-button:focus.duet-theme-turva,.duet-theme-turva .duet-date-button:focus:focus,.duet-date-button:focus:focus.duet-theme-turva{outline:2px solid;outline-offset:2px;outline-color:rgba(53, 79, 101, 0.8)}.input-error{border-top-color:rgb(214, 28, 82);border-right-color:rgb(214, 28, 82);border-bottom-color:rgb(214, 28, 82)}.duet-date-dialog{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{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog{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{visibility:visible;opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);transition-property:transform, opacity}@media (min-width: 36em){.duet-date-dialog.error{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper{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}@media (max-width: 35.9375em){.duet-date-dialog-wrapper{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 .duet-date-dialog-wrapper{visibility:visible;opacity:1;transform:translateZ(0) translateY(0);transition-property:transform, opacity}}.duet-date-table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:rgb(8, 42, 77);text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table th{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 .duet-date-table-cell{text-align:center}.duet-date-table .duet-date-table-cell:focus{outline:none}.duet-date-table-button{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-date-table-button:hover{background:rgb(228, 241, 247) !important}.duet-date-table-button.today{z-index:200;color:rgb(0, 75, 129) !important;background:rgb(240, 247, 250) !important;box-shadow:0 0 0 1px #0077b3 !important}.selected .duet-date-table-button,:focus .duet-date-table-button{color:rgb(255, 255, 255) !important;outline:0;background:rgb(0, 119, 179) !important}.duet-date-table-button: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 .duet-date-table-button:active,.duet-date-table-button:active.duet-theme-turva{outline-color:rgba(53, 79, 101, 0.8)}:focus .duet-date-table-button{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8);z-index:200}.duet-theme-turva :focus .duet-date-table-button,:focus .duet-date-table-button.duet-theme-turva{outline-color:rgba(53, 79, 101, 0.8)}.duet-date-table-button.disabled{color:rgb(127, 150, 165) !important;cursor:default;outline:none !important;background:transparent !important}.duet-date-table-button.outside{color:rgb(127, 150, 165) !important;pointer-events:none;cursor:default;outline:none;background:rgb(245, 248, 250) !important;opacity:0.75}.duet-date-dialog-header{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons{white-space:nowrap}.duet-date-dialog-buttons ::part(button){border:0}.duet-date-dialog-select{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select .duet-date-dialog-select-label{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-date-dialog-select span{margin-right:4px}.duet-date-dialog-select select{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select select:focus+.duet-date-dialog-select-label{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva .duet-date-dialog-select select:focus+.duet-date-dialog-select-label,.duet-date-dialog-select select:focus+.duet-date-dialog-select-label.duet-theme-turva{outline-color:rgba(53, 79, 101, 0.8)}.duet-date-dialog-mobile-header{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{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-date-dialog-mobile-header label{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header label{display:none}}.duet-date-picker-close{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{opacity:0}}.duet-date-picker-close:hover{background:rgb(245, 248, 250) !important}.duet-date-picker-close:focus{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva .duet-date-picker-close:focus,.duet-date-picker-close:focus.duet-theme-turva{outline-color:rgba(53, 79, 101, 0.8)}@media (min-width: 36em){.duet-date-picker-close:focus{opacity:1}}.duet-theme-turva .duet-date-button{color:rgb(23, 42, 59);border-color:rgb(120, 145, 164);border-left-color:rgb(178, 194, 205)}.duet-theme-turva:disabled{background:rgb(245, 246, 247) !important}.duet-theme-turva.duet-date-input-has-focus .duet-theme-turva,.duet-theme-turva:focus{color:rgb(23, 42, 59)}.duet-theme-turva .duet-date-dialog-wrapper{border-color:rgb(212, 221, 226)}.duet-theme-turva .duet-date-table-button{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, 42, 59) !important}.duet-theme-turva .duet-date-table-button:hover:not(.disabled){background:rgb(251, 225, 209) !important}.duet-theme-turva .duet-date-table-button.today{color:rgb(140, 0, 30) !important;background:rgb(253, 247, 242) !important;box-shadow:0 0 0 1px #171c3a !important}.duet-theme-turva .duet-date-table-button:active{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva .duet-date-table-button.outside{color:rgb(120, 145, 164) !important;outline:none;background:rgb(245, 246, 247) !important}.duet-theme-turva .duet-date-table-button.disabled{color:rgb(178, 194, 205) !important;outline:none !important;background:transparent !important}.duet-theme-turva .selected .duet-date-table-button,.duet-theme-turva :focus .duet-date-table-button{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva :active.duet-date-table-button{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva .duet-date-dialog-select .duet-date-dialog-select-label{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 42, 59)}.duet-theme-turva .duet-date-dialog-mobile-header{border-color:rgb(178, 194, 205)}.duet-theme-turva .duet-date-picker-close{background:rgb(245, 246, 247) !important}.duet-theme-turva .duet-date-picker-close:hover{background:rgb(245, 246, 247) !important}.duet-theme-turva [aria-pressed=true] .duet-date-table-button,.duet-theme-turva :focus .duet-date-table-button{color:rgb(255, 255, 255) !important;background:rgb(230, 23, 64) !important}.duet-theme-turva.duet-date-table{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, 42, 59)}';export{K as duet_date_picker}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,c as t,h as i,H as c,g as o}from"./p-B2cboDWM.js";import{i as d}from"./p-BzYmwX5_.js";import{c as n}from"./p-Cfr_DJqU.js";import{s as r,u as a,h}from"./p-Db8rvjPI.js";import{g as s}from"./p-CFqvB5PA.js";import"./p-C6E9F6QT.js";const u=class{constructor(i){e(this,i),this.duetChange=t(this,"duetChange",3),this.duetRemove=t(this,"duetRemove",3),this.duetFocus=t(this,"duetFocus",7),this.duetBlur=t(this,"duetBlur",7),this.focus=!1,this.chipId=n("DuetChip"),this.deleteLabels={fi:"Poista",en:"Remove",sv:"Ta bort"},this.selectedForDeletionLabels={fi:"Valittu, poista askelpalautinnäppäimellä",en:"Selected, remove with backspace",sv:"Valt, ta bort med backsteg"},this.inputChipHover=!1,this.inputChipDeleteFocus=!1,this.variation="button",this.size="medium",this.icon="",this.theme="",this.selected=!1,this.checked=!1,this.disabled=!1,this.accessiblePopup="false",this.enforceNoDisabledSelected=()=>{this.disabled&&this.checked&&(console.error("Duet error: pre-selected chip may not be disabled"),this.disabled=!1)},this.radioInputListenersRemove=e=>{e.removeEventListener("change",this.onRadioChange),e.removeEventListener("click",this.onRadioClick),e.removeEventListener("focus",this.onFocus),e.removeEventListener("blur",this.onBlur)},this.radioInputListenersAdd=e=>{e.addEventListener("change",this.onRadioChange),e.addEventListener("click",this.onRadioClick),e.addEventListener("focus",this.onFocus),e.addEventListener("blur",this.onBlur)},this.radioInputSetUp=()=>{const e=this.element.querySelector("input"),t=e||document.createElement("input");t.slot="input",t.ariaDisabled=this.disabled?"true":void 0,t.id=this.identifier||this.chipId,t.type="radio",t.name!==this.name&&(t.name=this.name),t.value=this.value,t.checked=this.checked,t.ariaLabel=this.element.textContent,e?this.radioInputListenersRemove(t):this.element.appendChild(t),this.radioInputListenersAdd(t),this.focusableElement=t},this.popupSetUp=()=>{const e=document.querySelector(`duet-popup-menu#${this.popup}`);if(e){this.popupElement=e,e.controller=this.element;const t=this.element.textContent,i=this.value;e.id||(e.id="popup-menu"),e.addEventListener("duetToggle",(e=>{this.popupOpen=e.detail.open}));const c=()=>{e.querySelectorAll("duet-popup-menu-item").forEach((e=>{e.active=!1}))};e.querySelectorAll("duet-popup-menu-item").forEach((e=>{e.addEventListener("click",(o=>{var d;const n=null!==(d=e.value)&&void 0!==d?d:e.innerText;e.active?(c(),this.element.textContent=t,this.value=i,this.checked=!1):(c(),e.active=!0,this.element.textContent=e.innerText,this.value=n,this.checked=!0),this.emitChange(o),setTimeout((()=>{this.popupElement.isOpen()&&this.popupElement.hide()}))}))}))}},this.onFocus=e=>{this.focus=!0,this.duetFocus.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-chip"})},this.onBlur=e=>{this.focus=!1,this.duetBlur.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-chip"})},this.emitChange=e=>{this.duetChange.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-chip"})},this.onFilterChange=e=>{this.checked=!this.checked,this.emitChange(e)},this.onRadioChange=e=>{this.checked=this.focusableElement.checked,this.emitChange(e)},this.onRadioClick=e=>{this.disabled&&e.preventDefault()},this.onFilterClick=e=>{this.disabled?e.preventDefault():this.popupElement&&(e.preventDefault(),this.popupElement.toggle())},this.onRemoveClick=e=>{null==e||e.preventDefault(),this.duetRemove.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-chip"}),this.element.remove()}}clearOtherRadioButtons(){"radio"===this.variation&&this.checked&&document.querySelectorAll(`duet-chip[variation="radio"][name="${this.name}"]`).forEach((e=>{e!==this.element&&(e.checked=!1)}))}removeDisabledAttributeWhenFalse(){this.disabled||this.element.removeAttribute("disabled")}componentWillLoad(){d(this),this.removeDisabledAttributeWhenFalse(),this.popupSetUp(),this.enforceNoDisabledSelected()}connectedCallback(){r(this)}disconnectedCallback(){a(this)}componentDidRender(){"radio"===this.variation&&this.radioInputSetUp()}getAccessibleExpanded(){return null!=this.accessibleExpanded?(!!this.accessibleExpanded).toString():this.popupElement?this.popupOpen?"true":"false":void 0}getAccessiblePopup(){return this.popupElement?"true":null!=this.accessiblePopup?this.accessiblePopup.toString():void 0}getAccessibleDeleteLabel(){return`${s(this.deleteLabels)} ${this.element.textContent}`}getAccessibleInputChipLabel(){return`${this.element.textContent}${this.selected?` (${s(this.selectedForDeletionLabels)}) `:""},`}async setFocus(e){h(),setTimeout((()=>this.focusableElement.focus(e)),200)}async setDeleteFocus(){setTimeout((()=>this.deleteButtonElement.focus()),200)}async removeChip(){this.onRemoveClick()}render(){var e;const t=this.identifier||this.chipId,o={"duet-chip-container":!0,[`duet-chip-${this.variation}`]:!0,"duet-chip-focus":this.focus,"duet-chip-selected":this.selected,"duet-chip-hover":this.inputChipHover,"duet-chip-delete-focus":this.inputChipDeleteFocus,"duet-chip-has-icon":!!this.icon,"duet-chip-has-popup":"filter"===this.variation&&!!this.popupElement,"duet-theme-turva":"turva"===this.theme,"duet-chip-filter-checked":"filter"===this.variation&&this.checked,"duet-chip-radio-checked":"radio"===this.variation&&this.checked,"duet-chip-filter-popup-open":this.popupOpen,"duet-chip-disabled":this.disabled,[this.size]:!0},d={onFocus:this.onFocus,onBlur:this.onBlur,ref:e=>this.focusableElement=e};return i(c,{key:"ebc8f8cba112ee9f682c22ba09f04b05968d4ba2",class:{[this.variation]:!0}},"button"===this.variation&&i("span",{key:"6bf0c0545a457d2917df074d7d263e12e07e3255",class:o},i("button",Object.assign({key:"51780aa4be42824dd17784e59b17ff23cdca4ea1",id:t,"aria-label":this.accessibleLabel,"aria-haspopup":this.getAccessiblePopup(),"aria-expanded":this.getAccessibleExpanded(),"aria-disabled":this.disabled?"true":void 0,name:this.name,value:this.value,onClick:this.disabled?e=>e.stopPropagation():void 0},d),i("span",{key:"52036fee728f26c3b21701d9ed870caf45e9295f",class:"duet-chip-icon-container"},this.icon&&i("duet-icon",{key:"7ef322e3c74ca552fb91a03d1d4d7cbba4b325e3",name:this.icon,size:"x-small",margin:"none",color:"currentColor"})),i("slot",{key:"b781a521f1dc02c0c7b0792309d4fb730acc5c2d"}))),"input"===this.variation&&i("span",{key:"c997bfd1f27de93629210b953c9788bdf754538f",class:o,"aria-label":this.getAccessibleInputChipLabel()},i("button",Object.assign({key:"c1ff3d503dda53884a42637460d048a27fe0d40e",id:t,class:"duet-chip-input-button",value:this.value,"aria-label":this.accessibleLabel,onMouseOver:()=>this.inputChipHover=!0,onMouseOut:()=>this.inputChipHover=!1,onClick:()=>this.selected=!this.selected},d),i("span",{key:"73d0e2250e46b6bdd1ffd65f9879e7c9d90da448",class:"duet-chip-icon-container"},this.icon&&i("duet-icon",{key:"f5353d825977fb008fb2d71fe796a2c6f4720181",name:this.icon,size:"x-small",margin:"none",color:"currentColor"})),i("slot",{key:"2932e26e6266957b80953b2ce275d580466e47ba"})),i("button",{key:"248c016d99211ec7893a1cc74f7ecd268d44d343",class:"duet-chip-remove-button","aria-label":this.getAccessibleDeleteLabel(),onClick:this.onRemoveClick,onFocus:()=>this.inputChipDeleteFocus=!0,onBlur:()=>this.inputChipDeleteFocus=!1,ref:e=>this.deleteButtonElement=e},i("duet-icon",{key:"6172cedf507d0e6f69ea39ce8fa6a4e21b714d11",name:"activity-close",size:"xx-small",margin:"none",color:"currentColor"}))),"filter"===this.variation&&i("span",{key:"8c7b88c4c077b7bd4afd0c7bdf36d01f9c9092ae",class:o},i("input",Object.assign({key:"b97c5cba016483f506521d00100f022160f48680","aria-haspopup":this.getAccessiblePopup(),"aria-controls":null===(e=this.popupElement)||void 0===e?void 0:e.id,"aria-expanded":this.getAccessibleExpanded(),"aria-disabled":this.disabled?"true":void 0,id:t,type:"checkbox",name:this.name,value:this.value,checked:this.checked,onClick:this.onFilterClick,onChange:this.onFilterChange},d)),i("label",{key:"cc082e72c8f2a782f4bfd44afc35daea973c6b08",htmlFor:t},this.icon&&i("span",{key:"a453948d4d0507fe5dbd080f573d83356f95f35c",class:"duet-chip-icon-container"},i("duet-icon",{key:"4545c9c75f4ac311e19d9932328eb7e6d8318ac9",name:this.icon,size:"large"===this.size?"small":"x-small",margin:"none",color:"currentColor"}),i("duet-icon",{key:"2dd3e4bc69e6efd4138ba8b74a5fddf52394416f",name:"messaging-checked-small",size:"large"===this.size?"x-small":"xx-small",margin:"none",color:"currentColor",class:"check-mark"})),i("slot",{key:"5367a32b3b34e7c67412bd0a0dfa9ace24636687"}),this.popupElement&&i("span",{key:"edad2d024ba464eea661cd1990629633438b6ba0",class:"duet-chip-popup-disclosure"},i("duet-icon",{key:"aa76a07f9446fea95dc61660c92c5bee645f27d4",name:"action-arrow-down-small",size:"large"===this.size?"xx-small":"xxx-small",margin:"none",color:"currentColor"})))),"radio"===this.variation&&i("span",{key:"97fe2aee42e9823b794acaeda3df724470c4c832",class:o},i("slot",{key:"f820fe5d09ff67433693698dd9d60848535cab8a",name:"input"}),i("label",{key:"0953b3248cc1c8f6fa46f2684f7fc465bfd0a412",htmlFor:t},this.icon&&i("span",{key:"25e66d3992af529de900ead65488bf64a4c12650",class:"duet-chip-icon-container"},i("duet-icon",{key:"731d3562a51b7c231d8142c7b0ec8d95675439ab",name:this.icon,size:"large"===this.size?"small":"x-small",margin:"none",color:"currentColor"}),i("duet-icon",{key:"9b041e11ab55414369bcd45962c31263129fd5b6",name:"messaging-checked-small",size:"xx-small",margin:"none",color:"currentColor",class:"check-mark"})),i("slot",{key:"9a9dd5c4ba7e327a2df00f24bb272f61a4061d65"}))))}get element(){return o(this)}static get watchers(){return{checked:["clearOtherRadioButtons"],disabled:["removeDisabledAttributeWhenFalse"]}}};u.style='*,*::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-right:8px !important;margin-bottom:12px !important;position:relative;display:inline-block;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}:host:last-child,:host:last-of-type{margin-right:0 !important}[alignment=form-distribute]>:host:last-of-type:not(:last-child){margin-right:8px !important}:host(.input){margin-top:6px !important;margin-right:0 !important;margin-bottom:6px !important;margin-left:4px !important}.duet-chip-container{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:1px;line-height:1.1;color:rgb(8, 42, 77) !important;text-align:center;hyphens:none;cursor:pointer;background:rgb(255, 255, 255);border-color:rgb(181, 198, 208);border-style:solid;border-width:1px;border-radius:8px;transition:background-color 300ms ease, color 300ms ease, border-color 300ms ease}.duet-chip-container.duet-p-0{padding:0 !important}.duet-chip-container.duet-m-0{margin:0 !important}.duet-chip-container:hover{padding:0 !important;border-color:rgb(0, 119, 179);border-width:2px}.duet-chip-container.duet-chip-disabled{color:rgb(98, 121, 138) !important;cursor:default;background:rgb(245, 248, 250) !important;border-color:rgb(245, 248, 250) !important}.duet-chip-container.duet-chip-disabled:hover{background:rgb(245, 248, 250);border-color:rgb(245, 248, 250)}.duet-chip-container.duet-chip-disabled button,.duet-chip-container.duet-chip-disabled label{cursor:default}.duet-chip-container button,.duet-chip-container label{display:flex;align-items:center;width:100%;height:100%;padding:8px 14px;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:600;line-height:1rem;color:rgb(8, 42, 77) !important;cursor:pointer}.duet-chip-container button:focus,.duet-chip-container label:focus{outline:none}.duet-chip-container .duet-chip-icon-container{display:flex;align-items:center;height:16px;padding:0;transition:padding 300ms ease}.duet-chip-container.duet-chip-has-icon .duet-chip-icon-container{width:24px;height:16px;padding-right:8px}.duet-chip-container.duet-chip-has-icon.duet-chip-filter-checked .duet-chip-icon-container,.duet-chip-container.duet-chip-has-icon.duet-chip-radio-checked .duet-chip-icon-container{padding-right:11px;padding-left:3px}.duet-chip-container.duet-chip-has-icon button,.duet-chip-container.duet-chip-has-icon label{padding-left:12px}.duet-chip-container.duet-chip-has-popup button,.duet-chip-container.duet-chip-has-popup label{padding-right:12px}.duet-chip-container duet-icon:not(.check-mark){visibility:visible;width:auto;transform:scaleX(1);transition:width 300ms ease, transform 300ms ease}.duet-chip-container duet-icon.check-mark{visibility:hidden;width:0;overflow:hidden;transform:scaleX(0);transition:width 300ms ease, transform 300ms ease}.duet-chip-container.duet-chip-filter-checked,.duet-chip-container.duet-chip-radio-checked{padding:0 !important;background:rgb(228, 241, 247);border-color:rgb(0, 119, 179);border-width:2px}.duet-chip-container.duet-chip-filter-checked:hover,.duet-chip-container.duet-chip-radio-checked:hover{background:rgb(198, 225, 238)}.duet-chip-container.duet-chip-filter-checked.chip-has-icon button,.duet-chip-container.duet-chip-filter-checked.chip-has-icon label,.duet-chip-container.duet-chip-radio-checked.chip-has-icon button,.duet-chip-container.duet-chip-radio-checked.chip-has-icon label{padding-left:10px}.duet-chip-container.duet-chip-filter-checked .duet-chip-icon-container,.duet-chip-container.duet-chip-radio-checked .duet-chip-icon-container{padding-right:10px}.duet-chip-container.duet-chip-filter-checked .duet-chip-icon-container duet-icon:not(.check-mark),.duet-chip-container.duet-chip-radio-checked .duet-chip-icon-container duet-icon:not(.check-mark){visibility:hidden;width:0;overflow:hidden;transform:scaleX(0);transition:width 300ms ease, transform 300ms ease}.duet-chip-container.duet-chip-filter-checked .duet-chip-icon-container duet-icon.check-mark,.duet-chip-container.duet-chip-radio-checked .duet-chip-icon-container duet-icon.check-mark{visibility:visible;width:auto;transform:scaleX(1);transition:width 300ms ease, transform 300ms ease}.duet-chip-container .duet-chip-popup-disclosure{padding-right:4.5px;padding-left:12.5px}.duet-chip-container .duet-chip-popup-disclosure duet-icon{transition:transform 300ms ease}.duet-chip-container.duet-chip-filter-popup-open{background:rgb(240, 247, 250);border-color:rgb(240, 247, 250)}.duet-chip-container.duet-chip-filter-popup-open .duet-chip-popup-disclosure duet-icon{transform:rotate(180deg)}.duet-chip-container.duet-chip-input:hover{padding:1px !important;border-color:rgb(181, 198, 208);border-width:1px}.duet-chip-container.duet-chip-input.duet-chip-hover,.duet-chip-container.duet-chip-input.duet-chip-selected{padding:0 !important;border-color:rgb(0, 119, 179);border-width:2px}.duet-chip-container.duet-chip-input.duet-chip-hover .duet-chip-remove-button,.duet-chip-container.duet-chip-input.duet-chip-selected .duet-chip-remove-button{right:0;width:34px;height:34px;background:transparent}.duet-chip-container.duet-chip-input.duet-chip-delete-focus{background:rgb(240, 247, 250)}.duet-chip-container.duet-chip-input .duet-chip-input-button{margin-right:22px}.duet-chip-container.duet-chip-input .duet-chip-remove-button{position:absolute;top:-1px;right:-1px;width:36px;height:36px;padding-left:10px;border:3px solid transparent;border-radius:8px}.duet-chip-container.duet-chip-input .duet-chip-remove-button:hover{background:rgb(217, 236, 245);background-clip:padding-box}.duet-chip-container.duet-chip-input.duet-chip-selected{background:rgb(240, 247, 250)}.duet-chip-container.duet-chip-input.duet-chip-selected.duet-chip-hover{background:rgb(217, 236, 245)}.duet-chip-container.duet-chip-input.duet-chip-selected .duet-chip-remove-button:hover{background:rgb(198, 225, 238);background-clip:padding-box}.duet-chip-container.large button,.duet-chip-container.large label{padding:15px 18px}.duet-chip-container.large.duet-chip-has-icon .duet-chip-icon-container{width:30px;padding-right:10px}.duet-chip-container.large .duet-chip-popup-disclosure{padding-right:6.5px;padding-left:14.5px}:host(.user-is-tabbing) .duet-chip-focus,:host(.user-is-tabbing) .duet-chip-delete-focus .duet-chip-remove-button{outline:2px solid;outline-offset:2px;outline-color:rgba(0, 119, 179, 0.8)}.duet-theme-turva :host(.user-is-tabbing) .duet-chip-focus,:host(.user-is-tabbing) .duet-chip-focus.duet-theme-turva,.duet-theme-turva :host(.user-is-tabbing) .duet-chip-delete-focus .duet-chip-remove-button,:host(.user-is-tabbing) .duet-chip-delete-focus .duet-chip-remove-button.duet-theme-turva{outline-color:rgba(53, 79, 101, 0.8)}.duet-chip-container input,*::slotted([slot=input]){position:absolute !important;top:0;left:0;z-index:-1;width:100%;height:100%;margin:0;appearance:none;cursor:pointer;border-width:2px;border-radius:8px;opacity:0}*::slotted([slot=input]:not([aria-disabled=true])){z-index:1}.duet-chip-container.duet-theme-turva{color:rgb(23, 42, 59) !important;background:rgb(255, 255, 255);border-color:rgb(178, 194, 205)}.duet-chip-container.duet-theme-turva:hover{border-color:rgb(230, 23, 64)}.duet-chip-container.duet-theme-turva.duet-chip-disabled{color:rgb(120, 145, 164) !important;background:rgb(245, 246, 247);border-color:rgb(245, 246, 247)}.duet-chip-container.duet-theme-turva.duet-chip-disabled:hover{background:rgb(245, 246, 247);border-color:rgb(245, 246, 247)}.duet-chip-container.duet-theme-turva.duet-chip-filter-checked,.duet-chip-container.duet-theme-turva.duet-chip-radio-checked{background:rgb(253, 247, 242);border-color:rgb(230, 23, 64)}.duet-chip-container.duet-theme-turva.duet-chip-filter-checked:hover,.duet-chip-container.duet-theme-turva.duet-chip-radio-checked:hover{background:rgb(251, 225, 209)}.duet-chip-container.duet-theme-turva.duet-chip-filter-popup-open{background:rgb(253, 247, 242);border-color:rgb(178, 194, 205)}.duet-chip-container.duet-theme-turva.duet-chip-input .duet-chip-remove-button:hover{background:rgb(255, 242, 242)}.duet-chip-container.duet-theme-turva.duet-chip-input.duet-chip-selected{background:rgb(255, 242, 242)}.duet-chip-container.duet-theme-turva.duet-chip-input.duet-chip-selected.duet-chip-hover{background:rgb(255, 229, 230);background-clip:padding-box}.duet-chip-container.duet-theme-turva.duet-chip-input.duet-chip-selected .duet-chip-remove-button:hover{background:rgb(255, 201, 204);background-clip:padding-box}.duet-chip-container.duet-theme-turva.duet-chip-input:hover{border-color:rgb(178, 194, 205)}.duet-chip-container.duet-theme-turva.duet-chip-input.duet-chip-hover,.duet-chip-container.duet-theme-turva.duet-chip-input.duet-chip-selected{border-color:rgb(230, 23, 64)}';export{u as duet_chip}
|