@duetds/components 10.5.0 → 10.7.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 +658 -282
- package/hydrate/index.mjs +658 -282
- package/lib/cjs/{a11y-utils-DaAO4N9d.js → a11y-utils-DmCjy3Q3.js} +1 -1
- package/lib/cjs/{app-globals-CHNvdfQj.js → app-globals-D1tikFob.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 +17 -18
- 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 +22 -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 +7 -17
- package/lib/cjs/duet-contact-card.cjs.entry.js +18 -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 +12 -8
- package/lib/cjs/duet-header_2.cjs.entry.js +7 -7
- package/lib/cjs/duet-hero.cjs.entry.js +27 -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-teaser.cjs.entry.js +110 -0
- 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-Di-nO8ua.js} +1 -1
- package/lib/cjs/{focus-utils-BuGg0Oha.js → focus-utils-uEO1pi2O.js} +1 -1
- package/lib/cjs/{index-ZxE6MB5V.js → index-BGRMvA4R.js} +13 -9
- package/lib/cjs/{keyboard-utils-D9UlHbik.js → keyboard-utils-DibQafwg.js} +2 -0
- package/lib/cjs/{label-CpPOBfjS.js → label-CwgdRt0Q.js} +1 -1
- package/lib/cjs/{language-utils-C7Z0KYg-.js → language-utils-CrB5zNlc.js} +1 -1
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/picture-utils-CZhgDlXJ.js +20 -0
- package/lib/cjs/{slot-utils-BXdHT3A1.js → slot-utils-4v5bqyQh.js} +1 -1
- package/lib/cjs/{themeable-component-CIDaln0Z.js → themeable-component-I4SEm6nQ.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/collection-manifest.json +1 -0
- 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 +51 -7
- 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 +63 -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 +4 -16
- package/lib/collection/components/duet-contact-card/duet-contact-card.css +3 -0
- package/lib/collection/components/duet-contact-card/duet-contact-card.js +58 -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.css +22 -0
- package/lib/collection/components/duet-grid/duet-grid.js +17 -8
- 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 +235 -144
- package/lib/collection/components/duet-hero/duet-hero.js +72 -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 +58 -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-teaser/duet-teaser.css +127 -0
- package/lib/collection/components/duet-teaser/duet-teaser.js +462 -0
- 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/collection/utils/picture-utils.js +6 -1
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/{p-61ec0e1c.entry.js → p-017873ec.entry.js} +1 -1
- package/lib/duet/{p-b1326cbb.entry.js → p-047af1e2.entry.js} +1 -1
- package/lib/duet/{p-516397ba.entry.js → p-058fcc72.entry.js} +1 -1
- package/lib/duet/p-05a6360b.entry.js +4 -0
- package/lib/duet/p-05b5ef84.entry.js +4 -0
- package/lib/duet/{p-6ef683d5.entry.js → p-07d43c60.entry.js} +1 -1
- package/lib/duet/{p-52beb436.entry.js → p-0ab559fb.entry.js} +1 -1
- package/lib/duet/{p-fe829b53.entry.js → p-0acf9bcf.entry.js} +1 -1
- package/lib/duet/{p-d3baa815.entry.js → p-0c42cc61.entry.js} +1 -1
- package/lib/duet/{p-443af533.entry.js → p-0df7094e.entry.js} +1 -1
- package/lib/duet/p-10baba94.entry.js +4 -0
- package/lib/duet/{p-30108edc.entry.js → p-1358a396.entry.js} +1 -1
- package/lib/duet/{p-70961edb.entry.js → p-1498e4a8.entry.js} +1 -1
- package/lib/duet/p-16d5dd2c.entry.js +4 -0
- package/lib/duet/p-1ec31f22.entry.js +4 -0
- package/lib/duet/{p-d6f0afa5.entry.js → p-2013545d.entry.js} +1 -1
- package/lib/duet/p-2265c46a.entry.js +4 -0
- package/lib/duet/{p-f040706c.entry.js → p-2394b3cd.entry.js} +1 -1
- package/lib/duet/{p-d779fe42.entry.js → p-2b17c517.entry.js} +1 -1
- package/lib/duet/{p-c54be349.entry.js → p-2f0f3a4a.entry.js} +1 -1
- package/lib/duet/{p-a9104184.entry.js → p-3ce04abc.entry.js} +1 -1
- package/lib/duet/{p-dedf6a32.entry.js → p-420df0aa.entry.js} +1 -1
- package/lib/duet/{p-c216e746.entry.js → p-430fad4e.entry.js} +1 -1
- package/lib/duet/p-453001ea.entry.js +4 -0
- package/lib/duet/{p-fa13ffe9.entry.js → p-4695398d.entry.js} +1 -1
- package/lib/duet/p-4bc7198d.entry.js +4 -0
- package/lib/duet/p-4e028274.entry.js +4 -0
- package/lib/duet/{p-8b0dfbd7.entry.js → p-5be103d0.entry.js} +1 -1
- package/lib/duet/{p-407f7f03.entry.js → p-5e5b6dc7.entry.js} +1 -1
- package/lib/duet/{p-42ec7305.entry.js → p-5fc88879.entry.js} +1 -1
- package/lib/duet/{p-e08dce92.entry.js → p-6865e880.entry.js} +1 -1
- package/lib/duet/{p-cb6c4158.entry.js → p-68a9ffb5.entry.js} +1 -1
- package/lib/duet/{p-b747f6e9.entry.js → p-69bcb076.entry.js} +1 -1
- package/lib/duet/p-71da8fbe.entry.js +4 -0
- package/lib/duet/{p-20a8ef81.entry.js → p-76e2c659.entry.js} +1 -1
- package/lib/duet/{p-74aac967.entry.js → p-7f5387dd.entry.js} +1 -1
- package/lib/duet/{p-110c7572.entry.js → p-84ed366e.entry.js} +1 -1
- package/lib/duet/{p-a8876b3d.entry.js → p-868647de.entry.js} +1 -1
- package/lib/duet/{p-a483117e.entry.js → p-8ad4bb4c.entry.js} +1 -1
- package/lib/duet/{p-3690576a.entry.js → p-8b9ffff4.entry.js} +1 -1
- package/lib/duet/{p-461d4089.entry.js → p-8da66626.entry.js} +1 -1
- package/lib/duet/{p-9ae7aaef.entry.js → p-8ea85c31.entry.js} +1 -1
- package/lib/duet/p-940a87e7.entry.js +4 -0
- package/lib/duet/{p-268b3066.entry.js → p-99550717.entry.js} +1 -1
- package/lib/duet/{p-8ace1eb4.entry.js → p-9987420d.entry.js} +1 -1
- package/lib/duet/{p-833802f9.entry.js → p-9d41df85.entry.js} +1 -1
- package/lib/duet/{p-3f7afd87.entry.js → p-9dee0205.entry.js} +1 -1
- package/lib/duet/{p-CFqvB5PA.js → p-B0XOGsB6.js} +1 -1
- package/lib/duet/p-B44ykle6.js +4 -0
- package/lib/duet/{p-R3pTP2Oy.js → p-B5SMAn1G.js} +1 -1
- package/lib/duet/p-BAiGBGTO.js +4 -0
- package/lib/duet/p-BWz_ChlU.js +4 -0
- package/lib/duet/p-BaefVzkx.js +4 -0
- package/lib/duet/{p-B8-N_qjs.js → p-Bnup2-sN.js} +1 -1
- package/lib/duet/p-C6rGA5IU.js +4 -0
- package/lib/duet/p-D4MpGrUR.js +5 -0
- package/lib/duet/p-DSNAI2Lx.js +4 -0
- package/lib/duet/{p-D2ly4TZR.js → p-DYmL1tSl.js} +1 -1
- package/lib/duet/{p-C5Yfx2kd.js → p-DtprEjjN.js} +1 -1
- package/lib/duet/{p-38973524.entry.js → p-a2106abd.entry.js} +1 -1
- package/lib/duet/p-a2a2f775.entry.js +4 -0
- package/lib/duet/{p-3277233e.entry.js → p-a2f7ef35.entry.js} +1 -1
- package/lib/duet/{p-829db926.entry.js → p-a62e6d8d.entry.js} +1 -1
- package/lib/duet/{p-40fa7371.entry.js → p-a6dc8c7d.entry.js} +1 -1
- package/lib/duet/{p-02d8e844.entry.js → p-a944ffff.entry.js} +1 -1
- package/lib/duet/{p-4b7f1244.entry.js → p-aebcf484.entry.js} +1 -1
- package/lib/duet/{p-bdbf0fae.entry.js → p-b2f0905a.entry.js} +1 -1
- package/lib/duet/p-b3a7ef62.entry.js +4 -0
- package/lib/duet/{p-70612314.entry.js → p-b4a1c719.entry.js} +1 -1
- package/lib/duet/p-b5204ec2.entry.js +4 -0
- package/lib/duet/{p-8012c7bc.entry.js → p-b58cfa18.entry.js} +1 -1
- package/lib/duet/{p-2dd7d75e.entry.js → p-b69946d4.entry.js} +1 -1
- package/lib/duet/{p-317e81f3.entry.js → p-b7351bfd.entry.js} +1 -1
- package/lib/duet/{p-3b2fba0f.entry.js → p-b7bb7472.entry.js} +1 -1
- package/lib/duet/{p-d3b5c997.entry.js → p-b9e97305.entry.js} +1 -1
- package/lib/duet/p-bb7fa0cf.entry.js +4 -0
- package/lib/duet/p-bef7eed7.entry.js +4 -0
- package/lib/duet/p-bffae8f6.entry.js +4 -0
- package/lib/duet/{p-c1afac0d.entry.js → p-c26e2123.entry.js} +1 -1
- package/lib/duet/{p-e7f2359a.entry.js → p-c49a72ad.entry.js} +1 -1
- package/lib/duet/{p-1da7703d.entry.js → p-c5c63d0f.entry.js} +1 -1
- package/lib/duet/{p-43e076b5.entry.js → p-c9a12663.entry.js} +1 -1
- package/lib/duet/{p-a5177d32.entry.js → p-ccaf5c28.entry.js} +1 -1
- package/lib/duet/{p-7fd39204.entry.js → p-d78923f9.entry.js} +1 -1
- package/lib/duet/p-d8383f1a.entry.js +4 -0
- package/lib/duet/{p-3f35fce3.entry.js → p-e3d91f53.entry.js} +1 -1
- package/lib/duet/p-e78af675.entry.js +4 -0
- package/lib/duet/{p-9e1a59d1.entry.js → p-e9a7215b.entry.js} +1 -1
- package/lib/duet/p-ebe55a34.entry.js +4 -0
- package/lib/duet/{p-efa4eecc.entry.js → p-ef340dc6.entry.js} +1 -1
- package/lib/duet/{p-317a1fc0.entry.js → p-f17438c7.entry.js} +1 -1
- package/lib/duet/{p-7353ee4c.entry.js → p-f264879d.entry.js} +1 -1
- package/lib/duet/p-f61ebeb1.entry.js +4 -0
- package/lib/duet/p-f647f09e.entry.js +4 -0
- package/lib/duet/p-f89da74c.entry.js +4 -0
- package/lib/duet/{p-2f8a47e2.entry.js → p-f959ca52.entry.js} +1 -1
- package/lib/duet/{p-19863cdf.entry.js → p-fb0f6212.entry.js} +1 -1
- package/lib/duet/p-fb59f80d.entry.js +4 -0
- package/lib/duet/{p-7eea47d5.entry.js → p-feae1702.entry.js} +1 -1
- package/lib/duet/p-kkZE1C6Z.js +4 -0
- package/lib/esm/{a11y-utils-ChN5Nhxh.js → a11y-utils-DZqe1lDK.js} +1 -1
- package/lib/esm/{app-globals-4kCk2rkO.js → app-globals-Byl9AdI1.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 +17 -18
- 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 +23 -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 +7 -17
- package/lib/esm/duet-contact-card.entry.js +18 -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 +12 -8
- package/lib/esm/duet-header_2.entry.js +7 -7
- package/lib/esm/duet-hero.entry.js +27 -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-teaser.entry.js +108 -0
- 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-KA3z1KuW.js} +1 -1
- package/lib/esm/{focus-utils-CFswdkeD.js → focus-utils-id9x3opi.js} +1 -1
- package/lib/esm/{index-B2cboDWM.js → index-D4MpGrUR.js} +13 -9
- package/lib/esm/{keyboard-utils-Db8rvjPI.js → keyboard-utils-BaefVzkx.js} +2 -1
- package/lib/esm/{label-CJxIWUOT.js → label-Caev3m-F.js} +1 -1
- package/lib/esm/{language-utils-C4M4ASkT.js → language-utils-DTyUbpD-.js} +1 -1
- package/lib/esm/loader.js +4 -4
- package/lib/esm/picture-utils-4PMNZDR2.js +18 -0
- package/lib/esm/{slot-utils--sNK1DNn.js → slot-utils-BhEk4zKY.js} +1 -1
- package/lib/esm/{themeable-component-BBi3552X.js → themeable-component-B_d7Klmd.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 +10 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-card/duet-card.d.ts +10 -0
- package/lib/types/components/duet-chip/duet-chip.d.ts +15 -8
- package/lib/types/components/duet-combobox/duet-combobox.d.ts +0 -1
- package/lib/types/components/duet-contact-card/duet-contact-card.d.ts +10 -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-grid/duet-grid.d.ts +2 -1
- package/lib/types/components/duet-hero/duet-hero.d.ts +10 -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 +11 -0
- package/lib/types/components/duet-teaser/duet-teaser.d.ts +93 -0
- package/lib/types/components.d.ts +291 -14
- package/lib/types/utils/keyboard-utils.d.ts +1 -0
- package/lib/types/utils/picture-utils.d.ts +4 -0
- package/package.json +5 -5
- package/lib/duet/p-06297bd8.entry.js +0 -4
- 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-5f5f72d4.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-734249e0.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-93ff8fe4.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-BzYmwX5_.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-a068c086.entry.js +0 -4
- package/lib/duet/p-c2026c6b.entry.js +0 -4
- package/lib/duet/p-cbcee3e2.entry.js +0 -4
- package/lib/duet/p-d5f90dbc.entry.js +0 -4
- package/lib/duet/p-s8EL6NG5.js +0 -4
|
@@ -12,6 +12,7 @@ import i18n from "./date-i18n";
|
|
|
12
12
|
import { DatePickerInput } from "./date-picker-input";
|
|
13
13
|
import { DatePickerMonth } from "./date-picker-month";
|
|
14
14
|
import { addDays, clamp, endOfMonth, endOfWeek, inRange, isEqual, parseDate, parseISODate, printDate, printISODate, setMonth, setYear, startOfMonth, startOfWeek, } from "./date-utils";
|
|
15
|
+
import { isDateDisallowed } from "./disallowed-days";
|
|
15
16
|
import { createShortcuts, range } from "./utils";
|
|
16
17
|
/**
|
|
17
18
|
* @slot tooltip - Use to place a tooltip alongside the label.
|
|
@@ -46,6 +47,11 @@ export class DuetDatePicker {
|
|
|
46
47
|
fi: "Päivämäärä vaaditaan",
|
|
47
48
|
sv: "Datum krävs",
|
|
48
49
|
},
|
|
50
|
+
customError: {
|
|
51
|
+
en: "Date not allowed",
|
|
52
|
+
fi: "Päivämäärä ei sallittu",
|
|
53
|
+
sv: "Datum inte tillåtet",
|
|
54
|
+
},
|
|
49
55
|
};
|
|
50
56
|
this.open = false;
|
|
51
57
|
this.focusedDay = new Date();
|
|
@@ -154,6 +160,19 @@ export class DuetDatePicker {
|
|
|
154
160
|
* This setting can be used alone or together with the min property.
|
|
155
161
|
*/
|
|
156
162
|
this.max = "";
|
|
163
|
+
/**
|
|
164
|
+
* Disallow selecting Saturdays and Sundays.
|
|
165
|
+
*/
|
|
166
|
+
this.disallowWeekends = false;
|
|
167
|
+
/**
|
|
168
|
+
* Disallow selecting Finnish bank holidays, including Easter-based dates and Midsummer Eve.
|
|
169
|
+
*/
|
|
170
|
+
this.disallowBankHolidays = false;
|
|
171
|
+
/**
|
|
172
|
+
* Disallow selecting specific dates. Accepts an array of ISO-8601 (YYYY-MM-DD) dates,
|
|
173
|
+
* or a comma-separated string of the same when set as an HTML attribute.
|
|
174
|
+
*/
|
|
175
|
+
this.disallowedDates = [];
|
|
157
176
|
/**
|
|
158
177
|
* Increment to add to years, defaults to 10 for simplicity, if you need a larger selectionspace you can set it to 100
|
|
159
178
|
*/
|
|
@@ -256,7 +275,7 @@ export class DuetDatePicker {
|
|
|
256
275
|
this.handleDaySelect = (_event, day) => {
|
|
257
276
|
const min = parseISODate(this.min);
|
|
258
277
|
const max = parseISODate(this.max);
|
|
259
|
-
if (inRange(day, min, max)) {
|
|
278
|
+
if (inRange(day, min, max) && !isDateDisallowed(day, this)) {
|
|
260
279
|
this.setValue(day);
|
|
261
280
|
this.hide();
|
|
262
281
|
}
|
|
@@ -277,6 +296,7 @@ export class DuetDatePicker {
|
|
|
277
296
|
* This offers information relating to the current validity of the component.
|
|
278
297
|
* It follow as closely as possible the behaviour of the native date input.
|
|
279
298
|
* Useful properties to inspect are badInput, valueMissing, rangeOverflow, rangeUnderflow.
|
|
299
|
+
* For disallowed dates property customError is set true.
|
|
280
300
|
*/
|
|
281
301
|
get validity() {
|
|
282
302
|
this.determineValidity();
|
|
@@ -401,9 +421,10 @@ export class DuetDatePicker {
|
|
|
401
421
|
const valueMissing = !valueAsDate && this.required;
|
|
402
422
|
const rangeOverflow = valueAsDate ? !inRange(valueAsDate, null, parseISODate(this.max)) : false;
|
|
403
423
|
const rangeUnderflow = valueAsDate ? !inRange(valueAsDate, parseISODate(this.min)) : false;
|
|
424
|
+
const customError = valueAsDate ? isDateDisallowed(valueAsDate, this) : false;
|
|
404
425
|
this._validity = {
|
|
405
426
|
patternMismatch: false,
|
|
406
|
-
customError
|
|
427
|
+
customError,
|
|
407
428
|
stepMismatch: false,
|
|
408
429
|
tooLong: false,
|
|
409
430
|
tooShort: false,
|
|
@@ -412,7 +433,7 @@ export class DuetDatePicker {
|
|
|
412
433
|
rangeUnderflow,
|
|
413
434
|
rangeOverflow,
|
|
414
435
|
valueMissing,
|
|
415
|
-
valid: !(valueMissing || badInput || rangeUnderflow || rangeOverflow),
|
|
436
|
+
valid: !(valueMissing || badInput || rangeUnderflow || rangeOverflow || customError),
|
|
416
437
|
};
|
|
417
438
|
if (this._validity.valid) {
|
|
418
439
|
this.error = "";
|
|
@@ -475,13 +496,13 @@ export class DuetDatePicker {
|
|
|
475
496
|
if (maxDate) {
|
|
476
497
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
477
498
|
}
|
|
478
|
-
return (h(Host, { key: '
|
|
499
|
+
return (h(Host, { key: '574a2e443eb79af37f178f46845a206f561cba2e', class: { "duet-expand": this.expand, "duet-m-0": this.margin === "none" } }, h("div", { key: '62fa53292d9b464c3bfce84805c61abbc729b32c', class: "duet-date" }, h(DatePickerInput, { key: 'fd44ced264f1b867ffa5642a110d118cfd8a7977', hasFocus: this.inputHasFocus, value: this.value, valueAsDate: valueAsDate, 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: element => (this.datePickerButton = element), inputRef: element => (this.datePickerInput = element), accessibleActiveDescendant: this.accessibleActiveDescendant, accessibleControls: this.accessibleControls, accessibleOwns: this.accessibleOwns, accessibleDescribedBy: this.accessibleDescribedBy, accessibleLiveError: this.accessibleLiveError, echoPlaceholder: this.echoPlaceholder, caption: this.caption })), h("div", { key: '7db19721a17bc48c0f232de5a91e9aee49435f6b', class: {
|
|
479
500
|
"duet-theme-turva": this.theme === "turva",
|
|
480
501
|
"duet-date-dialog": true,
|
|
481
502
|
left: this.direction === "left",
|
|
482
503
|
error: !!this.error,
|
|
483
504
|
active: this.open,
|
|
484
|
-
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("duet-overlay", { key: '
|
|
505
|
+
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("duet-overlay", { key: 'b762f7971ef0f3cfdba4338da8b66ddd932d739c', visible: this.open, "display-device": "x-small" }), h(FocusGuard, { key: '116f8a028515e1cabbdfe6c7c4fbe46a366e8417', moveFocusTo: this.focusedDayNode }), h("div", { key: '46df5dc4188ca94f1e9288cc94b369a56a951ee1', class: "duet-date-dialog-wrapper", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, h("duet-visually-hidden", { key: '1de44e1f4c44b9c97adb419fa7abf60f937b0fa2', "aria-live": "polite" }, text.keyboardInstruction), h("div", { key: '4a36684eab5f83211dcd9f04f240ad535f781376', class: "duet-date-dialog-mobile-header" }, h(DuetInternalLabel, { key: 'ef9877f7fc10b63428437a0ddbc07a787792617b', margin: "none" }, this.label), h("button", { key: '52b087991727aa7c32178aef85a7ff6a88b33f6e', class: "duet-date-picker-close", ref: element => (this.closeButtonNode = element), onClick: () => this.hide(), type: "button" }, h("duet-icon", { key: '9434a8ab91835101fca28fb28d3ba3b5fc768583', name: "navigation-close-small", margin: "none", color: "currentColor", size: "xx-small" }), h("duet-visually-hidden", { key: 'eaa01ae0b3e0270af1ee5b7777c4bf1c823ed55d' }, text.closeLabel))), h("div", { key: '8f59e259985eb3628f23dd8aa4edd90eab33ce45', class: "duet-date-dialog-header" }, h("div", { key: 'fd9e2ffede5b19a2008684f5587663372a769b0f', class: "duet-date-dialog-dropdowns" }, h("duet-visually-hidden", { key: '9bfda8777868d3a1a0b5dfb1146d4bd22ece9b9d' }, h("h2", { key: '4f8171f8b0bfabeb8ef0d44f604c668810572ba8', id: this.dialogLabelId, "aria-live": "polite", "aria-atomic": "true" }, text.monthLabels[focusedMonth], " ", this.focusedDay.getFullYear())), h("duet-visually-hidden", { key: 'f55f26894bef3e11233e3d72b62d70ff5f4f30fc' }, h("label", { key: '01d6cda898862ee9c82f018e4a875a54c8a4454c', htmlFor: this.monthSelectId }, text.monthSelectLabel)), h("div", { key: '758b166665674a916ab6d6b2c9fd78b6f51f27fd', class: "duet-date-dialog-select" }, h("select", { key: '548b2e7615f581454c64c30fe8e8c8d6dfe0d969', id: this.monthSelectId, class: "duet-date-month-select", ref: element => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, text.monthLabels.map((month, i) => (h("option", { key: month, value: i, selected: i === focusedMonth, disabled: !inRange(new Date(focusedYear, i, 1), minDate ? startOfMonth(minDate) : null, maxDate ? endOfMonth(maxDate) : null) }, month)))), h("div", { key: '34d1e610de1d9f1c1436fdf1ffb2294742269696', class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h("span", { key: '84d57f82660038e7fb7d631e6eb03be0ef9c4315' }, text.monthLabelsShort[focusedMonth]), h("duet-icon", { key: 'f706752d81c80ae05bf13a19ed6cfa3b2d7262cc', name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" }))), h("duet-visually-hidden", { key: 'fb67730ced2246377442fb2fd2ebf5086db34fbd' }, h("label", { key: '0d3d28925711a15b919004ad2384c719b9832f7d', htmlFor: this.yearSelectId }, text.yearSelectLabel)), h("div", { key: '371bb8461b655460da25e9982e17c0385fab8f71', class: "duet-date-dialog-select" }, h("select", { key: 'c466eed369426ad7cc78fbed3278a0523529920c', id: this.yearSelectId, class: "duet-date-year-select", onChange: this.handleYearSelect }, range(minYear, maxYear).map(year => (h("option", { key: year, selected: year === focusedYear }, year)))), h("div", { key: '78db254ed00d0d7b5104f4932415d970ff17e1f4', class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h("span", { key: '9a66b0dad5bf39fd769cd851cb529b4568310d9d' }, this.focusedDay.getFullYear()), h("duet-icon", { key: 'a68a8da9385f631020ba28389caf1b611def6676', name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" })))), h("div", { key: 'd1dd09f7da7f1e9d50cdd79ae97d13ba4d89be25', class: "duet-date-dialog-buttons" }, h("duet-action-button", { key: 'e7b3c41d7d56f2c24b4e69db80e4c8fc2e0395a2', accessibleLabel: i18n[this.language].prevMonthLabel, actionName: i18n[this.language].prevMonthLabel, class: "duet-date-dialog-prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, "icon-name": "action-arrow-left-small" }, text.prevMonthLabel), h("duet-action-button", { key: '980a6a1316a3f0b64a0ae62dd80d3494ea855ae8', accessibleLabel: i18n[this.language].nextMonthLabel, actionName: i18n[this.language].nextMonthLabel, class: "duet-date-dialog-next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, "icon-name": "action-arrow-right-small" }, text.nextMonthLabel))), h(DatePickerMonth, { key: '8524700a8665fe9b8edc04bd6b90b4aacc1eeea0', selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, language: this.language, theme: this.theme, min: minDate, max: maxDate, disallowWeekends: this.disallowWeekends, disallowBankHolidays: this.disallowBankHolidays, disallowedDates: this.disallowedDates, focusedDayRef: element => (this.focusedDayNode = element), onFocusEnter: this.enableActiveFocus, onFocusExit: this.disableActiveFocus })), h(FocusGuard, { key: '8b92a3d7d025848e2e3c976e9c091364b52b7f96', moveFocusTo: this.closeButtonNode }))));
|
|
485
506
|
}
|
|
486
507
|
static get is() { return "duet-date-picker"; }
|
|
487
508
|
static get encapsulation() { return "shadow"; }
|
|
@@ -957,7 +978,7 @@ export class DuetDatePicker {
|
|
|
957
978
|
"references": {
|
|
958
979
|
"DuetDatePickerDirection": {
|
|
959
980
|
"location": "local",
|
|
960
|
-
"path": "/Users/
|
|
981
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-date-picker/duet-date-picker.tsx",
|
|
961
982
|
"id": "src/components/duet-date-picker/duet-date-picker.tsx::DuetDatePickerDirection"
|
|
962
983
|
}
|
|
963
984
|
}
|
|
@@ -1079,6 +1100,66 @@ export class DuetDatePicker {
|
|
|
1079
1100
|
"reflect": false,
|
|
1080
1101
|
"defaultValue": "\"\""
|
|
1081
1102
|
},
|
|
1103
|
+
"disallowWeekends": {
|
|
1104
|
+
"type": "boolean",
|
|
1105
|
+
"attribute": "disallow-weekends",
|
|
1106
|
+
"mutable": false,
|
|
1107
|
+
"complexType": {
|
|
1108
|
+
"original": "boolean",
|
|
1109
|
+
"resolved": "boolean",
|
|
1110
|
+
"references": {}
|
|
1111
|
+
},
|
|
1112
|
+
"required": false,
|
|
1113
|
+
"optional": false,
|
|
1114
|
+
"docs": {
|
|
1115
|
+
"tags": [],
|
|
1116
|
+
"text": "Disallow selecting Saturdays and Sundays."
|
|
1117
|
+
},
|
|
1118
|
+
"getter": false,
|
|
1119
|
+
"setter": false,
|
|
1120
|
+
"reflect": false,
|
|
1121
|
+
"defaultValue": "false"
|
|
1122
|
+
},
|
|
1123
|
+
"disallowBankHolidays": {
|
|
1124
|
+
"type": "boolean",
|
|
1125
|
+
"attribute": "disallow-bank-holidays",
|
|
1126
|
+
"mutable": false,
|
|
1127
|
+
"complexType": {
|
|
1128
|
+
"original": "boolean",
|
|
1129
|
+
"resolved": "boolean",
|
|
1130
|
+
"references": {}
|
|
1131
|
+
},
|
|
1132
|
+
"required": false,
|
|
1133
|
+
"optional": false,
|
|
1134
|
+
"docs": {
|
|
1135
|
+
"tags": [],
|
|
1136
|
+
"text": "Disallow selecting Finnish bank holidays, including Easter-based dates and Midsummer Eve."
|
|
1137
|
+
},
|
|
1138
|
+
"getter": false,
|
|
1139
|
+
"setter": false,
|
|
1140
|
+
"reflect": false,
|
|
1141
|
+
"defaultValue": "false"
|
|
1142
|
+
},
|
|
1143
|
+
"disallowedDates": {
|
|
1144
|
+
"type": "string",
|
|
1145
|
+
"attribute": "disallowed-dates",
|
|
1146
|
+
"mutable": false,
|
|
1147
|
+
"complexType": {
|
|
1148
|
+
"original": "string | string[]",
|
|
1149
|
+
"resolved": "string | string[]",
|
|
1150
|
+
"references": {}
|
|
1151
|
+
},
|
|
1152
|
+
"required": false,
|
|
1153
|
+
"optional": false,
|
|
1154
|
+
"docs": {
|
|
1155
|
+
"tags": [],
|
|
1156
|
+
"text": "Disallow selecting specific dates. Accepts an array of ISO-8601 (YYYY-MM-DD) dates,\nor a comma-separated string of the same when set as an HTML attribute."
|
|
1157
|
+
},
|
|
1158
|
+
"getter": false,
|
|
1159
|
+
"setter": false,
|
|
1160
|
+
"reflect": false,
|
|
1161
|
+
"defaultValue": "[]"
|
|
1162
|
+
},
|
|
1082
1163
|
"incrementYears": {
|
|
1083
1164
|
"type": "number",
|
|
1084
1165
|
"attribute": "increment",
|
|
@@ -1117,7 +1198,7 @@ export class DuetDatePicker {
|
|
|
1117
1198
|
"optional": false,
|
|
1118
1199
|
"docs": {
|
|
1119
1200
|
"tags": [],
|
|
1120
|
-
"text": "This offers information relating to the current validity of the component.\nIt follow as closely as possible the behaviour of the native date input.\nUseful properties to inspect are badInput, valueMissing, rangeOverflow, rangeUnderflow."
|
|
1201
|
+
"text": "This offers information relating to the current validity of the component.\nIt follow as closely as possible the behaviour of the native date input.\nUseful properties to inspect are badInput, valueMissing, rangeOverflow, rangeUnderflow.\nFor disallowed dates property customError is set true."
|
|
1121
1202
|
},
|
|
1122
1203
|
"getter": true,
|
|
1123
1204
|
"setter": false
|
|
@@ -1169,7 +1250,7 @@ export class DuetDatePicker {
|
|
|
1169
1250
|
"references": {
|
|
1170
1251
|
"DuetDatePickerChangeEvent": {
|
|
1171
1252
|
"location": "local",
|
|
1172
|
-
"path": "/Users/
|
|
1253
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-date-picker/duet-date-picker.tsx",
|
|
1173
1254
|
"id": "src/components/duet-date-picker/duet-date-picker.tsx::DuetDatePickerChangeEvent"
|
|
1174
1255
|
}
|
|
1175
1256
|
}
|
|
@@ -1190,7 +1271,7 @@ export class DuetDatePicker {
|
|
|
1190
1271
|
"references": {
|
|
1191
1272
|
"DuetDatePickerFocusEvent": {
|
|
1192
1273
|
"location": "local",
|
|
1193
|
-
"path": "/Users/
|
|
1274
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-date-picker/duet-date-picker.tsx",
|
|
1194
1275
|
"id": "src/components/duet-date-picker/duet-date-picker.tsx::DuetDatePickerFocusEvent"
|
|
1195
1276
|
}
|
|
1196
1277
|
}
|
|
@@ -1211,7 +1292,7 @@ export class DuetDatePicker {
|
|
|
1211
1292
|
"references": {
|
|
1212
1293
|
"DuetDatePickerFocusEvent": {
|
|
1213
1294
|
"location": "local",
|
|
1214
|
-
"path": "/Users/
|
|
1295
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-date-picker/duet-date-picker.tsx",
|
|
1215
1296
|
"id": "src/components/duet-date-picker/duet-date-picker.tsx::DuetDatePickerFocusEvent"
|
|
1216
1297
|
}
|
|
1217
1298
|
}
|
|
@@ -1302,6 +1383,15 @@ export class DuetDatePicker {
|
|
|
1302
1383
|
}, {
|
|
1303
1384
|
"propName": "inputValue",
|
|
1304
1385
|
"methodName": "updateValidity"
|
|
1386
|
+
}, {
|
|
1387
|
+
"propName": "disallowWeekends",
|
|
1388
|
+
"methodName": "updateValidity"
|
|
1389
|
+
}, {
|
|
1390
|
+
"propName": "disallowBankHolidays",
|
|
1391
|
+
"methodName": "updateValidity"
|
|
1392
|
+
}, {
|
|
1393
|
+
"propName": "disallowedDates",
|
|
1394
|
+
"methodName": "updateValidity"
|
|
1305
1395
|
}, {
|
|
1306
1396
|
"propName": "value",
|
|
1307
1397
|
"methodName": "updateInternalValue"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { addDays, isEqual } from "./date-utils";
|
|
5
|
+
const holidaysByYear = new Map();
|
|
6
|
+
/**
|
|
7
|
+
* Calculate the date of Easter Sunday for a given year using the
|
|
8
|
+
* Meeus/Jones/Butcher Gregorian algorithm.
|
|
9
|
+
*/
|
|
10
|
+
export function getEasterSunday(year) {
|
|
11
|
+
const a = year % 19;
|
|
12
|
+
const b = Math.floor(year / 100);
|
|
13
|
+
const c = year % 100;
|
|
14
|
+
const d = Math.floor(b / 4);
|
|
15
|
+
const e = b % 4;
|
|
16
|
+
const f = Math.floor((b + 8) / 25);
|
|
17
|
+
const g = Math.floor((b - f + 1) / 3);
|
|
18
|
+
const h = (19 * a + b - d - g + 15) % 30;
|
|
19
|
+
const i = Math.floor(c / 4);
|
|
20
|
+
const k = c % 4;
|
|
21
|
+
const l = (32 + 2 * e + 2 * i - h - k) % 7;
|
|
22
|
+
const m = Math.floor((a + 11 * h + 22 * l) / 451);
|
|
23
|
+
const monthAndDay = h + l - 7 * m + 114;
|
|
24
|
+
const month = Math.floor(monthAndDay / 31);
|
|
25
|
+
const day = (monthAndDay % 31) + 1;
|
|
26
|
+
return new Date(year, month - 1, day);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Midsummer Eve is the Friday falling between 19 and 25 June (inclusive).
|
|
30
|
+
*/
|
|
31
|
+
function getMidsummerEve(year) {
|
|
32
|
+
for (let day = 19; day <= 25; day++) {
|
|
33
|
+
const date = new Date(year, 5, day);
|
|
34
|
+
if (date.getDay() === 5) {
|
|
35
|
+
return date;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Finnish bank holidays for a given year, as published by the Bank of Finland:
|
|
41
|
+
* https://www.suomenpankki.fi/en/money-and-payments/bank-holidays/
|
|
42
|
+
*/
|
|
43
|
+
export function getFinnishBankHolidays(year) {
|
|
44
|
+
if (holidaysByYear.has(year)) {
|
|
45
|
+
return holidaysByYear.get(year);
|
|
46
|
+
}
|
|
47
|
+
const easterSunday = getEasterSunday(year);
|
|
48
|
+
const holidays = [
|
|
49
|
+
new Date(year, 0, 1), // New Year's Day
|
|
50
|
+
new Date(year, 0, 6), // Epiphany
|
|
51
|
+
addDays(easterSunday, -2), // Good Friday
|
|
52
|
+
addDays(easterSunday, 1), // Easter Monday
|
|
53
|
+
new Date(year, 4, 1), // May Day
|
|
54
|
+
addDays(easterSunday, 39), // Ascension Day
|
|
55
|
+
getMidsummerEve(year), // Midsummer Eve
|
|
56
|
+
new Date(year, 11, 6), // Independence Day
|
|
57
|
+
new Date(year, 11, 24), // Christmas Eve
|
|
58
|
+
new Date(year, 11, 25), // Christmas Day
|
|
59
|
+
new Date(year, 11, 26), // Boxing Day
|
|
60
|
+
];
|
|
61
|
+
holidaysByYear.set(year, holidays);
|
|
62
|
+
return holidays;
|
|
63
|
+
}
|
|
64
|
+
export function isFinnishBankHoliday(date) {
|
|
65
|
+
return getFinnishBankHolidays(date.getFullYear()).some(holiday => isEqual(holiday, date));
|
|
66
|
+
}
|
|
@@ -89,7 +89,7 @@ export class DuetDivider {
|
|
|
89
89
|
"references": {
|
|
90
90
|
"DuetDividerMargin": {
|
|
91
91
|
"location": "local",
|
|
92
|
-
"path": "/Users/
|
|
92
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-divider/duet-divider.tsx",
|
|
93
93
|
"id": "src/components/duet-divider/duet-divider.tsx::DuetDividerMargin"
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -366,7 +366,7 @@ export class DuetEditableTable {
|
|
|
366
366
|
"references": {
|
|
367
367
|
"DuetEditableTableActions": {
|
|
368
368
|
"location": "local",
|
|
369
|
-
"path": "/Users/
|
|
369
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-editable-table/duet-editable-table.tsx",
|
|
370
370
|
"id": "src/components/duet-editable-table/duet-editable-table.tsx::DuetEditableTableActions"
|
|
371
371
|
}
|
|
372
372
|
}
|
|
@@ -394,7 +394,7 @@ export class DuetEditableTable {
|
|
|
394
394
|
"references": {
|
|
395
395
|
"DuetEditableTableColumns": {
|
|
396
396
|
"location": "local",
|
|
397
|
-
"path": "/Users/
|
|
397
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-editable-table/duet-editable-table.tsx",
|
|
398
398
|
"id": "src/components/duet-editable-table/duet-editable-table.tsx::DuetEditableTableColumns"
|
|
399
399
|
}
|
|
400
400
|
}
|
|
@@ -422,7 +422,7 @@ export class DuetEditableTable {
|
|
|
422
422
|
"references": {
|
|
423
423
|
"DuetEditableTableRows": {
|
|
424
424
|
"location": "local",
|
|
425
|
-
"path": "/Users/
|
|
425
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-editable-table/duet-editable-table.tsx",
|
|
426
426
|
"id": "src/components/duet-editable-table/duet-editable-table.tsx::DuetEditableTableRows"
|
|
427
427
|
}
|
|
428
428
|
}
|
|
@@ -570,7 +570,7 @@ export class DuetEditableTable {
|
|
|
570
570
|
"references": {
|
|
571
571
|
"DuetTableToggleEvent": {
|
|
572
572
|
"location": "local",
|
|
573
|
-
"path": "/Users/
|
|
573
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-editable-table/duet-editable-table.tsx",
|
|
574
574
|
"id": "src/components/duet-editable-table/duet-editable-table.tsx::DuetTableToggleEvent"
|
|
575
575
|
}
|
|
576
576
|
}
|
|
@@ -591,7 +591,7 @@ export class DuetEditableTable {
|
|
|
591
591
|
"references": {
|
|
592
592
|
"DuetTableMenuEvent": {
|
|
593
593
|
"location": "local",
|
|
594
|
-
"path": "/Users/
|
|
594
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-editable-table/duet-editable-table.tsx",
|
|
595
595
|
"id": "src/components/duet-editable-table/duet-editable-table.tsx::DuetTableMenuEvent"
|
|
596
596
|
}
|
|
597
597
|
}
|
|
@@ -111,7 +111,7 @@ export class DuetEmptyState {
|
|
|
111
111
|
"references": {
|
|
112
112
|
"DuetEmptyStateStatus": {
|
|
113
113
|
"location": "local",
|
|
114
|
-
"path": "/Users/
|
|
114
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-empty-state/duet-empty-state.tsx",
|
|
115
115
|
"id": "src/components/duet-empty-state/duet-empty-state.tsx::DuetEmptyStateStatus"
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -203,7 +203,7 @@ export class DuetEmptyState {
|
|
|
203
203
|
"references": {
|
|
204
204
|
"DuetEmptyStatePadding": {
|
|
205
205
|
"location": "local",
|
|
206
|
-
"path": "/Users/
|
|
206
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-empty-state/duet-empty-state.tsx",
|
|
207
207
|
"id": "src/components/duet-empty-state/duet-empty-state.tsx::DuetEmptyStatePadding"
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -229,7 +229,7 @@ export class DuetEmptyState {
|
|
|
229
229
|
"references": {
|
|
230
230
|
"DuetEmptyStateSize": {
|
|
231
231
|
"location": "local",
|
|
232
|
-
"path": "/Users/
|
|
232
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-empty-state/duet-empty-state.tsx",
|
|
233
233
|
"id": "src/components/duet-empty-state/duet-empty-state.tsx::DuetEmptyStateSize"
|
|
234
234
|
}
|
|
235
235
|
}
|
|
@@ -75,20 +75,20 @@ export class DuetFieldset {
|
|
|
75
75
|
* Always the last one in the class.
|
|
76
76
|
*/
|
|
77
77
|
render() {
|
|
78
|
-
return (h(Host, { key: '
|
|
78
|
+
return (h(Host, { key: '6b5e616dee35539f33f740844d8cb031480e7034', class: { "duet-m-0": this.margin === "none" } }, h("fieldset", { key: 'b9847559a5f6d043d40cf13941b02abcafcd4826', "aria-labelledby": this.labelId, "aria-describedby": this.error ? this.errorId : null,
|
|
79
79
|
// NVDA and VoiceOver do not yet support aria-errormessage
|
|
80
80
|
// once they do, we can remove errors from the aria-describedby
|
|
81
81
|
// aria-errormessage={this.error ? this.errorId : null}
|
|
82
82
|
class: {
|
|
83
83
|
"duet-fieldset": true,
|
|
84
84
|
"duet-theme-turva": this.theme === "turva",
|
|
85
|
-
} }, h("legend", { key: '
|
|
85
|
+
} }, h("legend", { key: '00db725af6a81cc39f9812b6ad907e14099e640b', id: this.labelId }, h(this.labelHeadingLevel, { key: 'e790c1bb2136af773035d687afa1af037f965174' }, this.label), this.caption && h("span", { key: '94cfa68d4e1bc683b16749e06667ad9fa13a84c6' }, this.caption)), h("div", { key: 'f7fbe98556ff25593ef84788b28a95a684a923e6', class: {
|
|
86
86
|
"duet-legend-wrapper": true,
|
|
87
87
|
"duet-legend-has-caption": !!this.caption,
|
|
88
88
|
"duet-legend-has-tooltip": this.hasTooltip,
|
|
89
89
|
"duet-legend-hidden": this.labelHidden,
|
|
90
90
|
"duet-legend-compact": this.compactLabel,
|
|
91
|
-
} }, h("div", { key: '
|
|
91
|
+
} }, h("div", { key: '1ed3c1d5c1e394cc84c6b38d05d6dae5c81025de', class: "duet-fieldset-label" }, h("span", { key: '0a004664043ce7eecc9a0a12383342f4d6bd7b46', "aria-hidden": "true" }, this.label), h("slot", { key: '3e1c56c60ca7a1b343aa25d3e63609ddcfef2822', onSlotchange: this.checkHasTooltip, name: "tooltip" })), this.caption && (h("div", { key: '8b165ea6688eb0a0c179fe76c583990d357e99d6', class: "duet-fieldset-caption", "aria-hidden": "true" }, h("duet-caption", { key: 'b54388620f28ecef14c0da6d4e8d27ed9b16de78', theme: this.theme, margin: "none" }, this.caption)))), h("slot", { key: '41fa24ea72a9f4318bb6dd183fb0a464ed45d8ca' }), h("span", { key: '6569844fd76312f12b64a7864f35e6f4637110db', class: "duet-fieldset-help duet-fieldset-error", id: this.errorId, "aria-atomic": "true", "aria-live": this.accessibleLiveError, "aria-relevant": "additions removals" }, this.error && h("span", { key: 'cef4273c56dff02051a14435d02d975131d4c4a4', class: { "duet-m-0": this.lastItemIsChip } }, this.error)))));
|
|
92
92
|
}
|
|
93
93
|
static get is() { return "duet-fieldset"; }
|
|
94
94
|
static get encapsulation() { return "shadow"; }
|
|
@@ -153,7 +153,7 @@ export class DuetUploadItem {
|
|
|
153
153
|
"references": {
|
|
154
154
|
"DuetFileChooserEvent": {
|
|
155
155
|
"location": "local",
|
|
156
|
-
"path": "/Users/
|
|
156
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-file-chooser/duet-file-chooser.tsx",
|
|
157
157
|
"id": "src/components/duet-file-chooser/duet-file-chooser.tsx::DuetFileChooserEvent"
|
|
158
158
|
}
|
|
159
159
|
}
|
|
@@ -221,7 +221,7 @@ export class DuetFooter {
|
|
|
221
221
|
"references": {
|
|
222
222
|
"DuetFooterVariation": {
|
|
223
223
|
"location": "local",
|
|
224
|
-
"path": "/Users/
|
|
224
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-footer/duet-footer.tsx",
|
|
225
225
|
"id": "src/components/duet-footer/duet-footer.tsx::DuetFooterVariation"
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -453,7 +453,7 @@ export class DuetFooter {
|
|
|
453
453
|
"references": {
|
|
454
454
|
"DuetFooterChangeEvent": {
|
|
455
455
|
"location": "local",
|
|
456
|
-
"path": "/Users/
|
|
456
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-footer/duet-footer.tsx",
|
|
457
457
|
"id": "src/components/duet-footer/duet-footer.tsx::DuetFooterChangeEvent"
|
|
458
458
|
}
|
|
459
459
|
}
|
|
@@ -474,7 +474,7 @@ export class DuetFooter {
|
|
|
474
474
|
"references": {
|
|
475
475
|
"DuetFooterChangeEvent": {
|
|
476
476
|
"location": "local",
|
|
477
|
-
"path": "/Users/
|
|
477
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-footer/duet-footer.tsx",
|
|
478
478
|
"id": "src/components/duet-footer/duet-footer.tsx::DuetFooterChangeEvent"
|
|
479
479
|
}
|
|
480
480
|
}
|
|
@@ -495,7 +495,7 @@ export class DuetFooter {
|
|
|
495
495
|
"references": {
|
|
496
496
|
"DuetFooterChangeEvent": {
|
|
497
497
|
"location": "local",
|
|
498
|
-
"path": "/Users/
|
|
498
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-footer/duet-footer.tsx",
|
|
499
499
|
"id": "src/components/duet-footer/duet-footer.tsx::DuetFooterChangeEvent"
|
|
500
500
|
}
|
|
501
501
|
}
|
|
@@ -516,7 +516,7 @@ export class DuetFooter {
|
|
|
516
516
|
"references": {
|
|
517
517
|
"DuetFooterChangeEvent": {
|
|
518
518
|
"location": "local",
|
|
519
|
-
"path": "/Users/
|
|
519
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-footer/duet-footer.tsx",
|
|
520
520
|
"id": "src/components/duet-footer/duet-footer.tsx::DuetFooterChangeEvent"
|
|
521
521
|
}
|
|
522
522
|
}
|
|
@@ -537,7 +537,7 @@ export class DuetFooter {
|
|
|
537
537
|
"references": {
|
|
538
538
|
"DuetFooterAnalyticsEvent": {
|
|
539
539
|
"location": "local",
|
|
540
|
-
"path": "/Users/
|
|
540
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-footer/duet-footer.tsx",
|
|
541
541
|
"id": "src/components/duet-footer/duet-footer.tsx::DuetFooterAnalyticsEvent"
|
|
542
542
|
}
|
|
543
543
|
}
|
|
@@ -558,7 +558,7 @@ export class DuetFooter {
|
|
|
558
558
|
"references": {
|
|
559
559
|
"DuetFooterChangeEvent": {
|
|
560
560
|
"location": "local",
|
|
561
|
-
"path": "/Users/
|
|
561
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-footer/duet-footer.tsx",
|
|
562
562
|
"id": "src/components/duet-footer/duet-footer.tsx::DuetFooterChangeEvent"
|
|
563
563
|
}
|
|
564
564
|
}
|
|
@@ -594,4 +594,26 @@
|
|
|
594
594
|
:host(.duet-grid-variation-grid.duet-grid-template-button-grid) {
|
|
595
595
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
596
596
|
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
:host(.duet-grid-variation-grid.duet-grid-template-teaser) {
|
|
600
|
+
grid-template-columns: minmax(0, 540px);
|
|
601
|
+
gap: 40px;
|
|
602
|
+
padding: 0;
|
|
603
|
+
}
|
|
604
|
+
@container (min-width: 720px) {
|
|
605
|
+
:host(.duet-grid-variation-grid.duet-grid-template-teaser) {
|
|
606
|
+
grid-template-columns: repeat(2, minmax(0, 540px));
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
@container (min-width: 1100px) {
|
|
610
|
+
:host(.duet-grid-variation-grid.duet-grid-template-teaser) {
|
|
611
|
+
grid-template-columns: repeat(3, minmax(0, 540px));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
@container (min-width: 1100px) {
|
|
616
|
+
:host(.duet-grid-variation-grid.duet-grid-template-teaser.duet-grid-direct-children-4) {
|
|
617
|
+
grid-template-columns: repeat(2, minmax(0, 540px));
|
|
618
|
+
}
|
|
597
619
|
}
|
|
@@ -5,6 +5,7 @@ import { Build, h, Host } from "@stencil/core";
|
|
|
5
5
|
import { debounce } from "../../utils/js-utils";
|
|
6
6
|
export class DuetGrid {
|
|
7
7
|
constructor() {
|
|
8
|
+
this.directChildCount = 0;
|
|
8
9
|
/**
|
|
9
10
|
* Enable or disable the automatic responsive behaviour of the grid component.
|
|
10
11
|
* Setting this option to "true" makes sure that contents are stacked vertically
|
|
@@ -121,7 +122,9 @@ export class DuetGrid {
|
|
|
121
122
|
return Array.from(Build.isServer ? this.element.children : this.element.querySelectorAll(":scope > *"));
|
|
122
123
|
}
|
|
123
124
|
async updateGridItems() {
|
|
124
|
-
const
|
|
125
|
+
const children = this.getDirectChildren();
|
|
126
|
+
this.directChildCount = children.length;
|
|
127
|
+
const items = children.filter(child => child.tagName.toLowerCase() === "duet-grid-item");
|
|
125
128
|
items.forEach(item => {
|
|
126
129
|
item.responsive = this.responsive;
|
|
127
130
|
item.breakpoint = this.breakpoint;
|
|
@@ -208,7 +211,7 @@ export class DuetGrid {
|
|
|
208
211
|
* Always the last one in the class.
|
|
209
212
|
*/
|
|
210
213
|
render() {
|
|
211
|
-
return (h(Host, { key: '
|
|
214
|
+
return (h(Host, { key: 'af6ceb11c84216f03b1dda1c12f3ae224b5c4874', class: {
|
|
212
215
|
"duet-grid": true,
|
|
213
216
|
"duet-no-stacking": !this.responsive,
|
|
214
217
|
"duet-grid-align-top": this.alignment === "top", // flex-start
|
|
@@ -235,9 +238,10 @@ export class DuetGrid {
|
|
|
235
238
|
"duet-grid-row-reverse": this.rowReverse,
|
|
236
239
|
[`duet-grid-variation-${this.gridTemplate ? "grid" : "flex"}`]: true,
|
|
237
240
|
[`duet-grid-template-${this.gridTemplate}`]: true,
|
|
241
|
+
[`duet-grid-direct-children-${this.directChildCount}`]: true,
|
|
238
242
|
"duet-grid-no-row-gap": this.gridTemplateGap.startsWith("none") && this.gridTemplate !== "button-grid",
|
|
239
243
|
"duet-grid-no-column-gap": this.gridTemplateGap.endsWith("none") && this.gridTemplate !== "button-grid",
|
|
240
|
-
} }, h("slot", { key: '
|
|
244
|
+
} }, h("slot", { key: 'c000cfdac55f96a2f4698668e48b13f1e6829ccc' })));
|
|
241
245
|
}
|
|
242
246
|
static get is() { return "duet-grid"; }
|
|
243
247
|
static get encapsulation() { return "shadow"; }
|
|
@@ -355,7 +359,7 @@ export class DuetGrid {
|
|
|
355
359
|
"references": {
|
|
356
360
|
"DuetGridAlignment": {
|
|
357
361
|
"location": "local",
|
|
358
|
-
"path": "/Users/
|
|
362
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-grid/duet-grid.tsx",
|
|
359
363
|
"id": "src/components/duet-grid/duet-grid.tsx::DuetGridAlignment"
|
|
360
364
|
}
|
|
361
365
|
}
|
|
@@ -381,7 +385,7 @@ export class DuetGrid {
|
|
|
381
385
|
"references": {
|
|
382
386
|
"DuetGridDistribution": {
|
|
383
387
|
"location": "local",
|
|
384
|
-
"path": "/Users/
|
|
388
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-grid/duet-grid.tsx",
|
|
385
389
|
"id": "src/components/duet-grid/duet-grid.tsx::DuetGridDistribution"
|
|
386
390
|
}
|
|
387
391
|
}
|
|
@@ -407,7 +411,7 @@ export class DuetGrid {
|
|
|
407
411
|
"references": {
|
|
408
412
|
"DuetGridMobileAlignment": {
|
|
409
413
|
"location": "local",
|
|
410
|
-
"path": "/Users/
|
|
414
|
+
"path": "/Users/kasimir/projects/lahitapiola/duet-design-system/packages/components/src/components/duet-grid/duet-grid.tsx",
|
|
411
415
|
"id": "src/components/duet-grid/duet-grid.tsx::DuetGridMobileAlignment"
|
|
412
416
|
}
|
|
413
417
|
}
|
|
@@ -428,8 +432,8 @@ export class DuetGrid {
|
|
|
428
432
|
"attribute": "grid-template",
|
|
429
433
|
"mutable": false,
|
|
430
434
|
"complexType": {
|
|
431
|
-
"original": "| \"small\"\n | \"medium\"\n | \"large\"\n | \"sidebar-right\"\n | \"sidebar-left\"\n | \"two-columns\"\n | \"three-columns\"\n | \"button-grid\"",
|
|
432
|
-
"resolved": "\"button-grid\" | \"large\" | \"medium\" | \"sidebar-left\" | \"sidebar-right\" | \"small\" | \"three-columns\" | \"two-columns\"",
|
|
435
|
+
"original": "| \"small\"\n | \"medium\"\n | \"large\"\n | \"sidebar-right\"\n | \"sidebar-left\"\n | \"two-columns\"\n | \"three-columns\"\n | \"button-grid\"\n | \"teaser\"",
|
|
436
|
+
"resolved": "\"button-grid\" | \"large\" | \"medium\" | \"sidebar-left\" | \"sidebar-right\" | \"small\" | \"teaser\" | \"three-columns\" | \"two-columns\"",
|
|
433
437
|
"references": {}
|
|
434
438
|
},
|
|
435
439
|
"required": false,
|
|
@@ -465,6 +469,11 @@ export class DuetGrid {
|
|
|
465
469
|
}
|
|
466
470
|
};
|
|
467
471
|
}
|
|
472
|
+
static get states() {
|
|
473
|
+
return {
|
|
474
|
+
"directChildCount": {}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
468
477
|
static get elementRef() { return "element"; }
|
|
469
478
|
static get watchers() {
|
|
470
479
|
return [{
|