@duetds/components 6.8.3 → 6.8.4
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 +153 -28
- package/lib/cjs/duet-action-button.cjs.entry.js +11 -2
- package/lib/cjs/duet-alert.cjs.entry.js +14 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +9 -1
- package/lib/cjs/duet-caption_4.cjs.entry.js +15 -1
- package/lib/cjs/duet-card.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkmark.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +22 -4
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
- package/lib/cjs/duet-contact-card.cjs.entry.js +1 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +15 -3
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +14 -2
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +1 -1
- package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +12 -2
- package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
- package/lib/cjs/duet-nav.cjs.entry.js +1 -1
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.cjs.entry.js +6 -4
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout-lang.cjs.entry.js +8 -1
- package/lib/cjs/duet-slideout-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +9 -2
- package/lib/cjs/duet-slideout.cjs.entry.js +9 -2
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +2 -2
- package/lib/cjs/{focus-utils-2ff2eab6.js → focus-utils-1cfcd199.js} +1 -1
- package/lib/cjs/{index-6d5f06d0.js → index-ab015402.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/collection/components/duet-action-button/duet-action-button.js +38 -3
- package/lib/collection/components/duet-alert/duet-alert.js +21 -4
- package/lib/collection/components/duet-button/duet-button.js +27 -12
- package/lib/collection/components/duet-caption/duet-caption.js +1 -1
- package/lib/collection/components/duet-card/duet-card.js +3 -3
- package/lib/collection/components/duet-checkbox/duet-checkbox.js +3 -3
- package/lib/collection/components/duet-choice/duet-choice.js +33 -11
- package/lib/collection/components/duet-choice-group/duet-choice-group.css +1 -1
- 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-cookie-consent/duet-cookie-consent.js +1 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +23 -9
- 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 +1 -1
- package/lib/collection/components/duet-footer/duet-footer.js +26 -12
- package/lib/collection/components/duet-grid/duet-grid.js +3 -3
- package/lib/collection/components/duet-header/duet-header.js +15 -15
- package/lib/collection/components/duet-heading/duet-heading.js +1 -1
- package/lib/collection/components/duet-hero/duet-hero.js +5 -5
- package/lib/collection/components/duet-icon/duet-icon.js +1 -1
- package/lib/collection/components/duet-input/duet-input.js +8 -8
- package/lib/collection/components/duet-label/duet-label.js +2 -2
- package/lib/collection/components/duet-layout/duet-layout.js +1 -1
- package/lib/collection/components/duet-link/duet-link.js +20 -3
- package/lib/collection/components/duet-list/duet-list.js +4 -4
- package/lib/collection/components/duet-logo/duet-logo.js +1 -1
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +1 -1
- package/lib/collection/components/duet-modal/duet-modal.js +19 -7
- package/lib/collection/components/duet-multiselect/duet-multiselect.js +5 -5
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +1 -1
- package/lib/collection/components/duet-number-input/duet-number-input.js +4 -4
- package/lib/collection/components/duet-pagination/duet-pagination.js +2 -2
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +3 -3
- package/lib/collection/components/duet-radio/duet-radio.js +3 -3
- package/lib/collection/components/duet-range-slider/duet-range-slider.js +2 -2
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +6 -4
- package/lib/collection/components/duet-select/duet-select.js +5 -5
- package/lib/collection/components/duet-slideout/duet-slideout.js +14 -2
- package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +13 -1
- package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +10 -2
- package/lib/collection/components/duet-spacer/duet-spacer.js +2 -2
- package/lib/collection/components/duet-spinner/duet-spinner.js +1 -1
- package/lib/collection/components/duet-step/duet-step.js +2 -2
- package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +4 -4
- package/lib/collection/components/duet-textarea/duet-textarea.js +4 -4
- package/lib/collection/components/duet-toggle/duet-toggle.js +1 -1
- package/lib/collection/components/duet-tooltip/duet-tooltip.js +1 -1
- package/lib/collection/components/duet-upload/duet-upload.js +13 -13
- package/lib/dist-custom-elements/duet-action-button.js +1 -1
- package/lib/dist-custom-elements/duet-alert.js +1 -1
- package/lib/dist-custom-elements/duet-badge.js +1 -1
- package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
- package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
- package/lib/dist-custom-elements/duet-button.js +1 -1
- package/lib/dist-custom-elements/duet-caption.js +1 -1
- package/lib/dist-custom-elements/duet-card.js +3 -3
- package/lib/dist-custom-elements/duet-checkbox.js +1 -1
- package/lib/dist-custom-elements/duet-checkmark.js +1 -1
- package/lib/dist-custom-elements/duet-choice-group.js +7 -7
- package/lib/dist-custom-elements/duet-choice.js +28 -9
- package/lib/dist-custom-elements/duet-collapsible.js +2 -2
- package/lib/dist-custom-elements/duet-combobox.js +2 -2
- package/lib/dist-custom-elements/duet-contact-card.js +8 -8
- package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
- package/lib/dist-custom-elements/duet-date-picker.js +26 -14
- package/lib/dist-custom-elements/duet-divider.js +1 -1
- package/lib/dist-custom-elements/duet-editable-table.js +1 -1
- package/lib/dist-custom-elements/duet-empty-state.js +1 -1
- package/lib/dist-custom-elements/duet-fieldset.js +1 -1
- package/lib/dist-custom-elements/duet-footer.js +20 -8
- package/lib/dist-custom-elements/duet-grid-item.js +1 -1
- package/lib/dist-custom-elements/duet-grid.js +1 -1
- package/lib/dist-custom-elements/duet-header.js +8 -8
- package/lib/dist-custom-elements/duet-heading.js +1 -1
- package/lib/dist-custom-elements/duet-hero.js +9 -9
- package/lib/dist-custom-elements/duet-icon.js +1 -1
- package/lib/dist-custom-elements/duet-input.js +1 -1
- package/lib/dist-custom-elements/duet-label.js +1 -1
- package/lib/dist-custom-elements/duet-layout.js +1 -1
- package/lib/dist-custom-elements/duet-link.js +1 -1
- package/lib/dist-custom-elements/duet-list-item.js +1 -1
- package/lib/dist-custom-elements/duet-list.js +1 -1
- package/lib/dist-custom-elements/duet-logo.js +1 -1
- package/lib/dist-custom-elements/duet-menu-bar-button.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar.js +2 -2
- package/lib/dist-custom-elements/duet-modal.js +20 -10
- package/lib/dist-custom-elements/duet-multiselect.js +8 -8
- package/lib/dist-custom-elements/duet-nav.js +1 -1
- package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
- package/lib/dist-custom-elements/duet-notification.js +2 -2
- package/lib/dist-custom-elements/duet-number-input.js +9 -9
- package/lib/dist-custom-elements/duet-page-heading.js +2 -2
- package/lib/dist-custom-elements/duet-pagination.js +7 -7
- package/lib/dist-custom-elements/duet-paragraph.js +1 -1
- package/lib/dist-custom-elements/duet-progress.js +1 -1
- package/lib/dist-custom-elements/duet-radio-group.js +6 -6
- package/lib/dist-custom-elements/duet-radio.js +1 -1
- package/lib/dist-custom-elements/duet-range-slider.js +2 -2
- package/lib/dist-custom-elements/duet-range-stepper.js +9 -7
- package/lib/dist-custom-elements/duet-scrollable.js +1 -1
- package/lib/dist-custom-elements/duet-section-layout.js +1 -1
- package/lib/dist-custom-elements/duet-select.js +1 -1
- package/lib/dist-custom-elements/duet-slideout-lang.js +12 -4
- package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-slideout-panel.js +11 -3
- package/lib/dist-custom-elements/duet-slideout.js +11 -3
- package/lib/dist-custom-elements/duet-spacer.js +1 -1
- package/lib/dist-custom-elements/duet-spinner.js +1 -1
- package/lib/dist-custom-elements/duet-step.js +4 -4
- package/lib/dist-custom-elements/duet-stepper.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar.js +2 -2
- package/lib/dist-custom-elements/duet-tab-group.js +9 -9
- package/lib/dist-custom-elements/duet-tab.js +1 -1
- package/lib/dist-custom-elements/duet-table.js +1 -1
- package/lib/dist-custom-elements/duet-textarea.js +8 -8
- package/lib/dist-custom-elements/duet-toggle.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip.js +1 -1
- package/lib/dist-custom-elements/duet-tray.js +3 -3
- package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
- package/lib/dist-custom-elements/duet-upload.js +18 -18
- package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
- package/lib/dist-custom-elements/index.js +1 -1
- package/lib/dist-custom-elements/{p-cb7de9dd.js → p-03f5e1df.js} +1 -1
- package/lib/dist-custom-elements/{p-681c9a42.js → p-104dae34.js} +21 -7
- package/lib/dist-custom-elements/{p-13d9d4b0.js → p-139ccc08.js} +1 -1
- package/lib/dist-custom-elements/{p-5ab6461c.js → p-14fe8052.js} +1 -1
- package/lib/dist-custom-elements/{p-1cb77270.js → p-17a5bfd6.js} +2 -2
- package/lib/dist-custom-elements/{p-9f1bb199.js → p-1b6d9683.js} +1 -1
- package/lib/dist-custom-elements/{p-87b5525b.js → p-21ae30e5.js} +20 -6
- package/lib/dist-custom-elements/{p-ce7b7450.js → p-258d095f.js} +1 -1
- package/lib/dist-custom-elements/{p-9556589f.js → p-2b8d110c.js} +1 -1
- package/lib/dist-custom-elements/{p-84c970d9.js → p-43901e47.js} +1 -1
- package/lib/dist-custom-elements/{p-89dbfa07.js → p-49026ea5.js} +1 -1
- package/lib/dist-custom-elements/{p-4ad31816.js → p-51be19a2.js} +1 -1
- package/lib/dist-custom-elements/{p-10030e7c.js → p-5333970a.js} +1 -1
- package/lib/dist-custom-elements/{p-53076cdd.js → p-6891c1b3.js} +2 -2
- package/lib/dist-custom-elements/{p-d5e06462.js → p-6c630da1.js} +1 -1
- package/lib/dist-custom-elements/{p-c86c6df0.js → p-7782af26.js} +2 -2
- package/lib/dist-custom-elements/{p-57aace09.js → p-7cccb592.js} +3 -3
- package/lib/dist-custom-elements/{p-7a6f9236.js → p-8a77e325.js} +1 -1
- package/lib/dist-custom-elements/{p-4a7f34e4.js → p-92135039.js} +2 -2
- package/lib/dist-custom-elements/{p-dd03af24.js → p-a53cebf1.js} +1 -1
- package/lib/dist-custom-elements/{p-2e97d3cf.js → p-a89fd096.js} +1 -1
- package/lib/dist-custom-elements/{p-db69ae9d.js → p-a971f4cf.js} +7 -7
- package/lib/dist-custom-elements/{p-9bf072bd.js → p-b2b89a56.js} +2 -2
- package/lib/dist-custom-elements/{p-05e73b74.js → p-bf71c608.js} +1 -1
- package/lib/dist-custom-elements/{p-6a8cdb7b.js → p-c05dc335.js} +1 -1
- package/lib/dist-custom-elements/{p-f7a12024.js → p-c1d5b264.js} +8 -8
- package/lib/dist-custom-elements/{p-8d8f500f.js → p-cd486ca1.js} +6 -6
- package/lib/dist-custom-elements/{p-8aa1b007.js → p-d3e697f4.js} +1 -1
- package/lib/dist-custom-elements/{p-26afb575.js → p-d4995343.js} +1 -1
- package/lib/dist-custom-elements/{p-9b6166b7.js → p-e9e98c22.js} +1 -1
- package/lib/dist-custom-elements/{p-9cfa785f.js → p-f41d4dba.js} +15 -5
- package/lib/dist-custom-elements/{p-a0efab88.js → p-fa93f54b.js} +15 -7
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-49ebb54d.system.entry.js → p-006cfe82.system.entry.js} +1 -1
- package/lib/duet/{p-6c05e879.js → p-076452be.js} +1 -1
- package/lib/duet/p-0769bfaa.system.entry.js +4 -0
- package/lib/duet/{p-d4d0fd29.js → p-0a64a5a4.js} +1 -1
- package/lib/duet/{p-94fa2062.system.entry.js → p-0a79b874.system.entry.js} +1 -1
- package/lib/duet/{p-d7d050f5.system.entry.js → p-0a96cc2c.system.entry.js} +1 -1
- package/lib/duet/{p-259eff20.system.entry.js → p-0aac4192.system.entry.js} +1 -1
- package/lib/duet/{p-40b6203e.system.entry.js → p-0ec18f3b.system.entry.js} +1 -1
- package/lib/duet/{p-c88e1b86.system.entry.js → p-0ec5260f.system.entry.js} +2 -2
- package/lib/duet/p-0f5b0e9a.entry.js +4 -0
- package/lib/duet/{p-76fdc86f.system.entry.js → p-0f7ab746.system.entry.js} +1 -1
- package/lib/duet/p-141234e3.entry.js +4 -0
- package/lib/duet/{p-1e86fdd0.system.entry.js → p-142e0dd6.system.entry.js} +1 -1
- package/lib/duet/{p-2765a53e.system.entry.js → p-15346bb7.system.entry.js} +1 -1
- package/lib/duet/p-1578385a.system.entry.js +4 -0
- package/lib/duet/{p-cffc25f7.system.entry.js → p-1835986d.system.entry.js} +1 -1
- package/lib/duet/{p-4af19474.entry.js → p-19deb8bb.entry.js} +1 -1
- package/lib/duet/{p-35afcb27.entry.js → p-1bdce03c.entry.js} +1 -1
- package/lib/duet/{p-68ab467a.entry.js → p-1c731783.entry.js} +1 -1
- package/lib/duet/{p-886c35c2.entry.js → p-207ad310.entry.js} +1 -1
- package/lib/duet/{p-84cf594e.entry.js → p-21f94254.entry.js} +1 -1
- package/lib/duet/{p-e30006d7.system.entry.js → p-23500651.system.entry.js} +1 -1
- package/lib/duet/{p-3ffbaf35.system.entry.js → p-238517b4.system.entry.js} +1 -1
- package/lib/duet/{p-4266b177.entry.js → p-25bf58d2.entry.js} +1 -1
- package/lib/duet/p-271e6527.entry.js +4 -0
- package/lib/duet/p-28b0eafe.entry.js +4 -0
- package/lib/duet/{p-c989c952.entry.js → p-2b6e9c34.entry.js} +1 -1
- package/lib/duet/{p-48a22eca.entry.js → p-2b998d32.entry.js} +1 -1
- package/lib/duet/{p-efdc7c2e.entry.js → p-2b9c8a7d.entry.js} +1 -1
- package/lib/duet/{p-a8432547.system.entry.js → p-2b9fb222.system.entry.js} +1 -1
- package/lib/duet/{p-2d0a6607.system.entry.js → p-2dafbb00.system.entry.js} +1 -1
- package/lib/duet/{p-4d25be5d.entry.js → p-322c2769.entry.js} +1 -1
- package/lib/duet/p-32ba724d.js +4 -0
- package/lib/duet/{p-8ae86f38.system.entry.js → p-33a2e92d.system.entry.js} +1 -1
- package/lib/duet/{p-7c7f6370.entry.js → p-3405c2df.entry.js} +1 -1
- package/lib/duet/{p-e459f448.entry.js → p-345381c1.entry.js} +1 -1
- package/lib/duet/{p-9431cbd9.entry.js → p-3490b163.entry.js} +1 -1
- package/lib/duet/{p-56b49a2b.system.entry.js → p-350bad81.system.entry.js} +1 -1
- package/lib/duet/{p-c48232b6.entry.js → p-369661b2.entry.js} +1 -1
- package/lib/duet/{p-8f1e0f63.entry.js → p-39f8bec2.entry.js} +1 -1
- package/lib/duet/{p-2e5b3bcf.entry.js → p-3b197740.entry.js} +1 -1
- package/lib/duet/{p-d9a1ce3e.system.entry.js → p-3d2339ae.system.entry.js} +1 -1
- package/lib/duet/{p-b7c160f8.system.entry.js → p-433085d5.system.entry.js} +1 -1
- package/lib/duet/p-45c55f88.system.entry.js +4 -0
- package/lib/duet/p-464e267f.system.js +4 -0
- package/lib/duet/{p-ca6f6878.entry.js → p-4de46382.entry.js} +1 -1
- package/lib/duet/{p-74c8d3c2.entry.js → p-514e2f71.entry.js} +1 -1
- package/lib/duet/{p-268a27e0.system.entry.js → p-5252d291.system.entry.js} +1 -1
- package/lib/duet/p-52a0bf60.system.entry.js +4 -0
- package/lib/duet/{p-d4e3b832.system.entry.js → p-53d28f2b.system.entry.js} +1 -1
- package/lib/duet/p-545ca91e.system.entry.js +4 -0
- package/lib/duet/p-57824291.entry.js +4 -0
- package/lib/duet/{p-4ddb8b0f.entry.js → p-599dfb21.entry.js} +1 -1
- package/lib/duet/{p-7f1506d7.entry.js → p-5aaee74b.entry.js} +1 -1
- package/lib/duet/{p-8d4c36cc.system.entry.js → p-5b0b828a.system.entry.js} +1 -1
- package/lib/duet/{p-3f01f964.system.entry.js → p-5d3c68ad.system.entry.js} +1 -1
- package/lib/duet/{p-abdd047f.system.entry.js → p-5daa0d26.system.entry.js} +1 -1
- package/lib/duet/{p-51588335.entry.js → p-5dedf71b.entry.js} +1 -1
- package/lib/duet/{p-d8d0fb8f.entry.js → p-5f1e31c7.entry.js} +1 -1
- package/lib/duet/{p-f998b544.system.entry.js → p-5f5fae98.system.entry.js} +1 -1
- package/lib/duet/{p-1515b46a.entry.js → p-6597319a.entry.js} +1 -1
- package/lib/duet/{p-b1296afd.system.entry.js → p-6aa662f0.system.entry.js} +1 -1
- package/lib/duet/p-6b7be36b.entry.js +4 -0
- package/lib/duet/{p-cc332f12.entry.js → p-6c171fd9.entry.js} +1 -1
- package/lib/duet/p-6d99c12c.entry.js +4 -0
- package/lib/duet/{p-07f8de09.system.entry.js → p-6f930a32.system.entry.js} +1 -1
- package/lib/duet/{p-5fcf69f8.entry.js → p-71eda242.entry.js} +1 -1
- package/lib/duet/{p-1ea20994.entry.js → p-73e2201d.entry.js} +1 -1
- package/lib/duet/{p-d94e5b57.system.entry.js → p-76dabced.system.entry.js} +1 -1
- package/lib/duet/{p-0115b516.system.entry.js → p-783530af.system.entry.js} +1 -1
- package/lib/duet/{p-64c8ddb9.entry.js → p-78b89180.entry.js} +1 -1
- package/lib/duet/{p-dbc13c36.system.js → p-7adef50f.system.js} +1 -1
- package/lib/duet/{p-39c79c00.system.entry.js → p-8025514b.system.entry.js} +1 -1
- package/lib/duet/{p-9aebf3f7.entry.js → p-8085ad32.entry.js} +1 -1
- package/lib/duet/{p-1c21f6ee.entry.js → p-83ac5c6e.entry.js} +1 -1
- package/lib/duet/p-85053e56.system.entry.js +4 -0
- package/lib/duet/{p-1ccc3647.system.entry.js → p-8661ddb0.system.entry.js} +1 -1
- package/lib/duet/{p-0f2c807b.entry.js → p-86799457.entry.js} +1 -1
- package/lib/duet/{p-92d37e55.system.js → p-8684b2af.system.js} +1 -1
- package/lib/duet/p-886f3df1.system.entry.js +4 -0
- package/lib/duet/{p-9ca2af16.system.entry.js → p-88d3cc5a.system.entry.js} +1 -1
- package/lib/duet/{p-9693b127.entry.js → p-8aba8575.entry.js} +1 -1
- package/lib/duet/{p-eb92e362.entry.js → p-8ada2a8a.entry.js} +1 -1
- package/lib/duet/{p-2c19f162.entry.js → p-8c20f50a.entry.js} +1 -1
- package/lib/duet/p-8dc321a1.entry.js +4 -0
- package/lib/duet/{p-9207cd90.system.entry.js → p-8de9a81e.system.entry.js} +1 -1
- package/lib/duet/{p-b3c6d973.system.entry.js → p-8f7a04bc.system.entry.js} +1 -1
- package/lib/duet/{p-fd7de93a.entry.js → p-8fcd5734.entry.js} +1 -1
- package/lib/duet/{p-7ff34de9.entry.js → p-9116af4f.entry.js} +1 -1
- package/lib/duet/{p-efe489f3.entry.js → p-94c6c463.entry.js} +1 -1
- package/lib/duet/{p-50ee41e3.entry.js → p-994c33e2.entry.js} +1 -1
- package/lib/duet/{p-20291d6a.system.entry.js → p-9c456965.system.entry.js} +1 -1
- package/lib/duet/p-9eaee650.system.entry.js +4 -0
- package/lib/duet/{p-18a1350b.system.entry.js → p-a05666f0.system.entry.js} +2 -2
- package/lib/duet/{p-fd7a5a08.entry.js → p-a08a9752.entry.js} +1 -1
- package/lib/duet/{p-d871a695.system.entry.js → p-a4042d5b.system.entry.js} +1 -1
- package/lib/duet/{p-c3436d4d.system.entry.js → p-a4f9eacd.system.entry.js} +1 -1
- package/lib/duet/{p-15b65a7c.entry.js → p-a7b1f336.entry.js} +1 -1
- package/lib/duet/{p-2a57d9b6.entry.js → p-ac37e21d.entry.js} +1 -1
- package/lib/duet/p-ad983011.entry.js +4 -0
- package/lib/duet/{p-cbd1e2c6.system.entry.js → p-aee5400b.system.entry.js} +1 -1
- package/lib/duet/{p-dd6b8fec.system.entry.js → p-af47bd24.system.entry.js} +1 -1
- package/lib/duet/{p-def345e8.system.entry.js → p-b16848d3.system.entry.js} +1 -1
- package/lib/duet/{p-85961465.entry.js → p-b2ebc2e1.entry.js} +1 -1
- package/lib/duet/{p-1bb2106c.system.entry.js → p-b3e57f17.system.entry.js} +1 -1
- package/lib/duet/{p-fc1cf69f.system.entry.js → p-b59904ae.system.entry.js} +1 -1
- package/lib/duet/{p-2e6a3a17.entry.js → p-c17ad6a4.entry.js} +1 -1
- package/lib/duet/{p-75492e02.system.entry.js → p-c32df4f2.system.entry.js} +1 -1
- package/lib/duet/{p-2b3c2e41.system.entry.js → p-c46b2038.system.entry.js} +1 -1
- package/lib/duet/{p-aabd9905.system.entry.js → p-c6787142.system.entry.js} +1 -1
- package/lib/duet/{p-3c5967bc.entry.js → p-c8892cfa.entry.js} +1 -1
- package/lib/duet/{p-614c7065.system.entry.js → p-c8b3d426.system.entry.js} +1 -1
- package/lib/duet/{p-2ef88161.system.js → p-c8dc599d.system.js} +1 -1
- package/lib/duet/{p-ecb55af2.system.entry.js → p-ca4539ce.system.entry.js} +1 -1
- package/lib/duet/{p-770f94ca.entry.js → p-ca8a79e7.entry.js} +1 -1
- package/lib/duet/{p-032d0db3.system.entry.js → p-ccbff327.system.entry.js} +1 -1
- package/lib/duet/{p-15e1c955.entry.js → p-cf33e4a4.entry.js} +1 -1
- package/lib/duet/{p-1ec42ecd.entry.js → p-d27f9702.entry.js} +1 -1
- package/lib/duet/p-d65b676f.entry.js +4 -0
- package/lib/duet/{p-9abc893a.system.entry.js → p-d8769dca.system.entry.js} +1 -1
- package/lib/duet/{p-d03517b4.system.entry.js → p-daf3ccef.system.entry.js} +1 -1
- package/lib/duet/{p-a6653cdc.system.entry.js → p-db98a514.system.entry.js} +1 -1
- package/lib/duet/{p-8ed7e105.entry.js → p-dc8c7e0b.entry.js} +1 -1
- package/lib/duet/p-e0651eca.system.entry.js +4 -0
- package/lib/duet/{p-53de8491.entry.js → p-e4b73cff.entry.js} +1 -1
- package/lib/duet/{p-d7014558.entry.js → p-e829bf10.entry.js} +1 -1
- package/lib/duet/{p-01833853.system.entry.js → p-ec5ae55d.system.entry.js} +1 -1
- package/lib/duet/{p-3ab084e8.system.entry.js → p-ec9d77cf.system.entry.js} +1 -1
- package/lib/duet/p-f0384acb.entry.js +4 -0
- package/lib/duet/{p-ef7c6a28.system.entry.js → p-f06940f6.system.entry.js} +1 -1
- package/lib/duet/{p-70425e80.system.entry.js → p-f0ba21c3.system.entry.js} +1 -1
- package/lib/duet/p-f5e7e0a7.system.entry.js +4 -0
- package/lib/duet/{p-04a1f201.entry.js → p-f6f5032b.entry.js} +1 -1
- package/lib/duet/p-f738d8e5.entry.js +4 -0
- package/lib/duet/{p-ab4af140.entry.js → p-faaa35cf.entry.js} +1 -1
- package/lib/duet/{p-a8d67797.entry.js → p-fb1b340d.entry.js} +1 -1
- package/lib/duet/{p-e651dcce.system.entry.js → p-fc318998.system.entry.js} +1 -1
- package/lib/duet/p-fcca01e2.entry.js +4 -0
- package/lib/duet/{p-3aeb487a.entry.js → p-ffba3249.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +12 -3
- package/lib/esm/duet-alert.entry.js +15 -2
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +2 -2
- package/lib/esm/duet-button_2.entry.js +10 -2
- package/lib/esm/duet-caption_4.entry.js +16 -2
- package/lib/esm/duet-card.entry.js +1 -1
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-checkmark.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +23 -5
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-combobox.entry.js +2 -2
- package/lib/esm/duet-contact-card.entry.js +2 -2
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +16 -4
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +2 -2
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +15 -3
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +2 -2
- package/lib/esm/duet-hero.entry.js +2 -2
- package/lib/esm/duet-icon.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +2 -2
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-menu-bar-button.entry.js +1 -1
- package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
- package/lib/esm/duet-menu-bar-link.entry.js +1 -1
- package/lib/esm/duet-menu-bar.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +13 -3
- package/lib/esm/duet-multiselect.entry.js +2 -2
- package/lib/esm/duet-nav.entry.js +1 -1
- package/lib/esm/duet-notification_2.entry.js +2 -2
- package/lib/esm/duet-number-input.entry.js +2 -2
- package/lib/esm/duet-page-heading.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +7 -5
- package/lib/esm/duet-progress.entry.js +2 -2
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +2 -2
- package/lib/esm/duet-section-layout.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-slideout-lang.entry.js +9 -2
- package/lib/esm/duet-slideout-link.entry.js +1 -1
- package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
- package/lib/esm/duet-slideout-panel.entry.js +10 -3
- package/lib/esm/duet-slideout.entry.js +10 -3
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm/duet-submenu-bar.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
- package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
- package/lib/esm/duet-toolbar-link.entry.js +1 -1
- package/lib/esm/duet-toolbar.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +2 -2
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +3 -3
- package/lib/esm/{focus-utils-24487417.js → focus-utils-5c277b1d.js} +1 -1
- package/lib/esm/{index-3b6ef857.js → index-dc7d6b8d.js} +1 -1
- package/lib/esm/{language-utils-7b211f31.js → language-utils-6be16ff0.js} +1 -1
- package/lib/esm/loader.js +3 -3
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- package/lib/esm-es5/duet-alert.entry.js +2 -2
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-checkmark.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-contact-card.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +2 -2
- package/lib/esm-es5/duet-grid_2.entry.js +2 -2
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +2 -2
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-multiselect.entry.js +1 -1
- package/lib/esm-es5/duet-nav.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-page-heading.entry.js +1 -1
- package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-section-layout.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel.entry.js +2 -2
- package/lib/esm-es5/duet-slideout.entry.js +2 -2
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +2 -2
- package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/focus-utils-5c277b1d.js +4 -0
- package/lib/esm-es5/{index-3b6ef857.js → index-dc7d6b8d.js} +1 -1
- package/lib/esm-es5/{language-utils-7b211f31.js → language-utils-6be16ff0.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/types/components/duet-action-button/duet-action-button.d.ts +6 -0
- package/lib/types/components/duet-alert/duet-alert.d.ts +4 -1
- package/lib/types/components/duet-button/duet-button.d.ts +3 -2
- package/lib/types/components/duet-choice/duet-choice.d.ts +6 -2
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +3 -0
- package/lib/types/components/duet-footer/duet-footer.d.ts +3 -0
- package/lib/types/components/duet-link/duet-link.d.ts +3 -0
- package/lib/types/components/duet-modal/duet-modal.d.ts +2 -0
- package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +0 -1
- package/lib/types/components/duet-slideout/duet-slideout.d.ts +4 -1
- package/lib/types/components/duet-slideout-lang/duet-slideout-lang.d.ts +4 -1
- package/lib/types/components/duet-slideout-panel/duet-slideout-panel.d.ts +4 -1
- package/lib/types/components.d.ts +8 -4
- package/package.json +5 -5
- package/lib/duet/p-0335d3ba.system.entry.js +0 -4
- package/lib/duet/p-31159c85.system.entry.js +0 -4
- package/lib/duet/p-3dc1f3c6.system.entry.js +0 -4
- package/lib/duet/p-44c56bb6.entry.js +0 -4
- package/lib/duet/p-470e0520.entry.js +0 -4
- package/lib/duet/p-475f863c.entry.js +0 -4
- package/lib/duet/p-4d5cb241.entry.js +0 -4
- package/lib/duet/p-4f203781.js +0 -4
- package/lib/duet/p-5a884cab.entry.js +0 -4
- package/lib/duet/p-5bf71c27.entry.js +0 -4
- package/lib/duet/p-74e6b8fd.system.entry.js +0 -4
- package/lib/duet/p-77c2e21e.system.js +0 -4
- package/lib/duet/p-82e4f38f.entry.js +0 -4
- package/lib/duet/p-84f17b60.entry.js +0 -4
- package/lib/duet/p-8e6d9b39.entry.js +0 -4
- package/lib/duet/p-9a911da7.entry.js +0 -4
- package/lib/duet/p-9d4592dc.system.entry.js +0 -4
- package/lib/duet/p-9fd3df4e.system.entry.js +0 -4
- package/lib/duet/p-c96b1fae.entry.js +0 -4
- package/lib/duet/p-cb814de3.entry.js +0 -4
- package/lib/duet/p-da73f58c.system.entry.js +0 -4
- package/lib/duet/p-deb0bf2b.system.entry.js +0 -4
- package/lib/duet/p-f5708af6.system.entry.js +0 -4
- package/lib/duet/p-fee010a2.entry.js +0 -4
- package/lib/duet/p-ff84ff9d.system.entry.js +0 -4
- package/lib/esm-es5/focus-utils-24487417.js +0 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { h, Host } from "@stencil/core";
|
|
5
5
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
6
|
import { createID } from "../../utils/create-id";
|
|
7
|
-
import { getLocaleString } from "../../utils/language-utils";
|
|
7
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
8
8
|
export class DuetAlert {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.descriptiveId = createID("DuetAlert");
|
|
@@ -24,6 +24,7 @@ export class DuetAlert {
|
|
|
24
24
|
this.theme = "";
|
|
25
25
|
this.isDismissed = false;
|
|
26
26
|
this.timeoutID = undefined;
|
|
27
|
+
this.language = getLanguage();
|
|
27
28
|
this.accessibleLabelDefaults = {
|
|
28
29
|
fi: "Sulje viesti",
|
|
29
30
|
sv: "Stäng meddelandet",
|
|
@@ -38,6 +39,11 @@ export class DuetAlert {
|
|
|
38
39
|
this.variation = "default";
|
|
39
40
|
this.dismissible = false;
|
|
40
41
|
}
|
|
42
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
43
|
+
if (newValue !== oldValue && this.accessibleLabel === this.accessibleLabelDefaults[oldValue]) {
|
|
44
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults, newValue);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
41
47
|
/**
|
|
42
48
|
* Component lifecycle events.
|
|
43
49
|
*/
|
|
@@ -49,10 +55,14 @@ export class DuetAlert {
|
|
|
49
55
|
this.timeoutID = setTimeout(() => this.handleDismiss(), this.autoDismiss);
|
|
50
56
|
}
|
|
51
57
|
}
|
|
58
|
+
connectedCallback() {
|
|
59
|
+
connectLanguageChangeObserver(this);
|
|
60
|
+
}
|
|
52
61
|
disconnectedCallback() {
|
|
53
62
|
if (this.timeoutID) {
|
|
54
63
|
clearTimeout(this.timeoutID);
|
|
55
64
|
}
|
|
65
|
+
disconnectLanguageChangeObserver(this);
|
|
56
66
|
}
|
|
57
67
|
/**
|
|
58
68
|
* Show.
|
|
@@ -156,7 +166,7 @@ export class DuetAlert {
|
|
|
156
166
|
},
|
|
157
167
|
"accessibleLabel": {
|
|
158
168
|
"type": "string",
|
|
159
|
-
"mutable":
|
|
169
|
+
"mutable": true,
|
|
160
170
|
"complexType": {
|
|
161
171
|
"original": "string",
|
|
162
172
|
"resolved": "string",
|
|
@@ -325,7 +335,8 @@ export class DuetAlert {
|
|
|
325
335
|
static get states() {
|
|
326
336
|
return {
|
|
327
337
|
"isDismissed": {},
|
|
328
|
-
"timeoutID": {}
|
|
338
|
+
"timeoutID": {},
|
|
339
|
+
"language": {}
|
|
329
340
|
};
|
|
330
341
|
}
|
|
331
342
|
static get events() {
|
|
@@ -345,7 +356,7 @@ export class DuetAlert {
|
|
|
345
356
|
"references": {
|
|
346
357
|
"DuetAlertEvent": {
|
|
347
358
|
"location": "local",
|
|
348
|
-
"path": "/Users/
|
|
359
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-alert/duet-alert.tsx"
|
|
349
360
|
}
|
|
350
361
|
}
|
|
351
362
|
}
|
|
@@ -387,4 +398,10 @@ export class DuetAlert {
|
|
|
387
398
|
}
|
|
388
399
|
};
|
|
389
400
|
}
|
|
401
|
+
static get watchers() {
|
|
402
|
+
return [{
|
|
403
|
+
"propName": "language",
|
|
404
|
+
"methodName": "watchLanguageStateHandler"
|
|
405
|
+
}];
|
|
406
|
+
}
|
|
390
407
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { h, Host } from "@stencil/core";
|
|
5
5
|
import { inheritGlobalTheme } from "../../common";
|
|
6
6
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
7
|
-
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
7
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
8
8
|
import { getColorByName } from "../../utils/token-utils";
|
|
9
9
|
export class DuetButton {
|
|
10
10
|
constructor() {
|
|
@@ -65,6 +65,11 @@ export class DuetButton {
|
|
|
65
65
|
this.iconOnly = false;
|
|
66
66
|
this.url = undefined;
|
|
67
67
|
}
|
|
68
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
69
|
+
if (newValue !== oldValue && this.accessibleLabelExternal === this.accessibleLabelExternalDefaults[oldValue]) {
|
|
70
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, newValue);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
68
73
|
/**
|
|
69
74
|
* Component lifecycle events.
|
|
70
75
|
*/
|
|
@@ -78,6 +83,7 @@ export class DuetButton {
|
|
|
78
83
|
this.proxyButton = document.createElement("button");
|
|
79
84
|
this.proxyButton.style.display = "none";
|
|
80
85
|
this.syncToProxyButton();
|
|
86
|
+
connectLanguageChangeObserver(this);
|
|
81
87
|
if (!this.url && this.element.closest("form")) {
|
|
82
88
|
this.element.insertAdjacentElement("beforebegin", this.proxyButton);
|
|
83
89
|
}
|
|
@@ -85,6 +91,7 @@ export class DuetButton {
|
|
|
85
91
|
disconnectedCallback() {
|
|
86
92
|
this.proxyButton.remove();
|
|
87
93
|
this.proxyButton = null;
|
|
94
|
+
disconnectLanguageChangeObserver(this);
|
|
88
95
|
}
|
|
89
96
|
syncToProxyButton() {
|
|
90
97
|
this.proxyButton.type = this.getButtonType();
|
|
@@ -406,7 +413,7 @@ export class DuetButton {
|
|
|
406
413
|
"references": {
|
|
407
414
|
"DuetButtonVariation": {
|
|
408
415
|
"location": "local",
|
|
409
|
-
"path": "/Users/
|
|
416
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-button/duet-button.tsx"
|
|
410
417
|
}
|
|
411
418
|
}
|
|
412
419
|
},
|
|
@@ -522,7 +529,7 @@ export class DuetButton {
|
|
|
522
529
|
"references": {
|
|
523
530
|
"DuetButtonTextCentering": {
|
|
524
531
|
"location": "local",
|
|
525
|
-
"path": "/Users/
|
|
532
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-button/duet-button.tsx"
|
|
526
533
|
}
|
|
527
534
|
}
|
|
528
535
|
},
|
|
@@ -545,7 +552,7 @@ export class DuetButton {
|
|
|
545
552
|
"references": {
|
|
546
553
|
"DuetButtonWrapping": {
|
|
547
554
|
"location": "local",
|
|
548
|
-
"path": "/Users/
|
|
555
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-button/duet-button.tsx"
|
|
549
556
|
}
|
|
550
557
|
}
|
|
551
558
|
},
|
|
@@ -702,11 +709,16 @@ export class DuetButton {
|
|
|
702
709
|
},
|
|
703
710
|
"language": {
|
|
704
711
|
"type": "string",
|
|
705
|
-
"mutable":
|
|
712
|
+
"mutable": true,
|
|
706
713
|
"complexType": {
|
|
707
|
-
"original": "
|
|
708
|
-
"resolved": "
|
|
709
|
-
"references": {
|
|
714
|
+
"original": "DuetLanguage",
|
|
715
|
+
"resolved": "\"en\" | \"fi\" | \"sv\"",
|
|
716
|
+
"references": {
|
|
717
|
+
"DuetLanguage": {
|
|
718
|
+
"location": "import",
|
|
719
|
+
"path": "../../common-types"
|
|
720
|
+
}
|
|
721
|
+
}
|
|
710
722
|
},
|
|
711
723
|
"required": false,
|
|
712
724
|
"optional": false,
|
|
@@ -721,7 +733,7 @@ export class DuetButton {
|
|
|
721
733
|
"text": ""
|
|
722
734
|
},
|
|
723
735
|
"attribute": "language",
|
|
724
|
-
"reflect":
|
|
736
|
+
"reflect": true,
|
|
725
737
|
"defaultValue": "getLanguage()"
|
|
726
738
|
},
|
|
727
739
|
"accessibleLabelExternalDefaults": {
|
|
@@ -752,7 +764,7 @@ export class DuetButton {
|
|
|
752
764
|
},
|
|
753
765
|
"accessibleLabelExternal": {
|
|
754
766
|
"type": "string",
|
|
755
|
-
"mutable":
|
|
767
|
+
"mutable": true,
|
|
756
768
|
"complexType": {
|
|
757
769
|
"original": "string",
|
|
758
770
|
"resolved": "string",
|
|
@@ -844,7 +856,7 @@ export class DuetButton {
|
|
|
844
856
|
"references": {
|
|
845
857
|
"DuetButtonIconSize": {
|
|
846
858
|
"location": "local",
|
|
847
|
-
"path": "/Users/
|
|
859
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-button/duet-button.tsx"
|
|
848
860
|
}
|
|
849
861
|
}
|
|
850
862
|
},
|
|
@@ -867,7 +879,7 @@ export class DuetButton {
|
|
|
867
879
|
"references": {
|
|
868
880
|
"DuetButtonSize": {
|
|
869
881
|
"location": "local",
|
|
870
|
-
"path": "/Users/
|
|
882
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-button/duet-button.tsx"
|
|
871
883
|
}
|
|
872
884
|
}
|
|
873
885
|
},
|
|
@@ -980,6 +992,9 @@ export class DuetButton {
|
|
|
980
992
|
static get elementRef() { return "element"; }
|
|
981
993
|
static get watchers() {
|
|
982
994
|
return [{
|
|
995
|
+
"propName": "language",
|
|
996
|
+
"methodName": "watchLanguageStateHandler"
|
|
997
|
+
}, {
|
|
983
998
|
"propName": "disabled",
|
|
984
999
|
"methodName": "syncToProxyButton"
|
|
985
1000
|
}, {
|
|
@@ -116,7 +116,7 @@ export class DuetCaption {
|
|
|
116
116
|
"references": {
|
|
117
117
|
"DuetCaptionSize": {
|
|
118
118
|
"location": "local",
|
|
119
|
-
"path": "/Users/
|
|
119
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-caption/duet-caption.tsx"
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
},
|
|
@@ -187,7 +187,7 @@ export class DuetCard {
|
|
|
187
187
|
"references": {
|
|
188
188
|
"DuetCardVariation": {
|
|
189
189
|
"location": "local",
|
|
190
|
-
"path": "/Users/
|
|
190
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-card/duet-card.tsx"
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
},
|
|
@@ -353,7 +353,7 @@ export class DuetCard {
|
|
|
353
353
|
"references": {
|
|
354
354
|
"DuetCardPadding": {
|
|
355
355
|
"location": "local",
|
|
356
|
-
"path": "/Users/
|
|
356
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-card/duet-card.tsx"
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
},
|
|
@@ -472,7 +472,7 @@ export class DuetCard {
|
|
|
472
472
|
"references": {
|
|
473
473
|
"DuetCardToggleEvent": {
|
|
474
474
|
"location": "local",
|
|
475
|
-
"path": "/Users/
|
|
475
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-card/duet-card.tsx"
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
}
|
|
@@ -481,7 +481,7 @@ export class DuetCheckbox {
|
|
|
481
481
|
"references": {
|
|
482
482
|
"DuetCheckboxEvent": {
|
|
483
483
|
"location": "local",
|
|
484
|
-
"path": "/Users/
|
|
484
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-checkbox/duet-checkbox.tsx"
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
}
|
|
@@ -501,7 +501,7 @@ export class DuetCheckbox {
|
|
|
501
501
|
"references": {
|
|
502
502
|
"DuetCheckboxEvent": {
|
|
503
503
|
"location": "local",
|
|
504
|
-
"path": "/Users/
|
|
504
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-checkbox/duet-checkbox.tsx"
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
}
|
|
@@ -521,7 +521,7 @@ export class DuetCheckbox {
|
|
|
521
521
|
"references": {
|
|
522
522
|
"DuetCheckboxEvent": {
|
|
523
523
|
"location": "local",
|
|
524
|
-
"path": "/Users/
|
|
524
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-checkbox/duet-checkbox.tsx"
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import infoIcon from "@duetds/icons/lib/assets/messaging-info";
|
|
5
|
-
import { Build, h, Host } from "@stencil/core";
|
|
5
|
+
import { Build, h, Host, } from "@stencil/core";
|
|
6
6
|
import { inheritGlobalTheme } from "../../common";
|
|
7
7
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
8
8
|
import { createID } from "../../utils/create-id";
|
|
9
9
|
import { FocusGuard } from "../../utils/focus-utils";
|
|
10
10
|
import { isEscapeKey, isKeyboardClick, isQuestionKey } from "../../utils/keyboard-utils";
|
|
11
|
-
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
11
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
12
12
|
/**
|
|
13
13
|
* @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
|
|
14
14
|
* @slot label - Label content.
|
|
@@ -94,6 +94,7 @@ export class DuetChoice {
|
|
|
94
94
|
this.isHovering = false;
|
|
95
95
|
this.isInfoOpen = false;
|
|
96
96
|
this.isBlurred = false;
|
|
97
|
+
this.language = getLanguage();
|
|
97
98
|
this.theme = "";
|
|
98
99
|
this.label = "label";
|
|
99
100
|
this.accessibleLabelInfoButtonDefaults = DuetStringsExternalDefaults;
|
|
@@ -122,12 +123,20 @@ export class DuetChoice {
|
|
|
122
123
|
this.disabled = false;
|
|
123
124
|
this.required = false;
|
|
124
125
|
this.infoLabelDefaults = {
|
|
125
|
-
fi: "Lisätietoja",
|
|
126
|
+
fi: "Lisätietoja vaihtoehdosta",
|
|
126
127
|
en: "More information about",
|
|
127
128
|
sv: "Mera information om",
|
|
128
129
|
};
|
|
129
130
|
this.infoLabel = getLocaleString(this.infoLabelDefaults, getLanguage());
|
|
130
131
|
}
|
|
132
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
133
|
+
if (newValue !== oldValue && this.accessibleLabelInfoButton === this.accessibleLabelInfoButtonDefaults[oldValue]) {
|
|
134
|
+
this.accessibleLabelInfoButton = getLocaleString(this.accessibleLabelInfoButtonDefaults, newValue);
|
|
135
|
+
}
|
|
136
|
+
if (newValue !== oldValue && this.infoLabel === this.infoLabelDefaults[oldValue]) {
|
|
137
|
+
this.infoLabel = getLocaleString(this.infoLabelDefaults, newValue);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
131
140
|
/**
|
|
132
141
|
* Component lifecycle events.
|
|
133
142
|
*/
|
|
@@ -143,6 +152,12 @@ export class DuetChoice {
|
|
|
143
152
|
: !!this.element.querySelector(":scope > [slot='label']");
|
|
144
153
|
this.hasBeforeText = !!this.element.querySelector("[slot='before-text']");
|
|
145
154
|
}
|
|
155
|
+
connectedCallback() {
|
|
156
|
+
connectLanguageChangeObserver(this);
|
|
157
|
+
}
|
|
158
|
+
disconnectedCallback() {
|
|
159
|
+
disconnectLanguageChangeObserver(this);
|
|
160
|
+
}
|
|
146
161
|
/**
|
|
147
162
|
* Component event handling.
|
|
148
163
|
*/
|
|
@@ -327,7 +342,7 @@ export class DuetChoice {
|
|
|
327
342
|
},
|
|
328
343
|
"accessibleLabelInfoButton": {
|
|
329
344
|
"type": "string",
|
|
330
|
-
"mutable":
|
|
345
|
+
"mutable": true,
|
|
331
346
|
"complexType": {
|
|
332
347
|
"original": "string",
|
|
333
348
|
"resolved": "string",
|
|
@@ -803,11 +818,11 @@ export class DuetChoice {
|
|
|
803
818
|
},
|
|
804
819
|
"attribute": "accessible-label-info-default",
|
|
805
820
|
"reflect": false,
|
|
806
|
-
"defaultValue": "{\n fi: \"Lis\u00E4tietoja\",\n en: \"More information about\",\n sv: \"Mera information om\",\n }"
|
|
821
|
+
"defaultValue": "{\n fi: \"Lis\u00E4tietoja vaihtoehdosta\",\n en: \"More information about\",\n sv: \"Mera information om\",\n }"
|
|
807
822
|
},
|
|
808
823
|
"infoLabel": {
|
|
809
824
|
"type": "string",
|
|
810
|
-
"mutable":
|
|
825
|
+
"mutable": true,
|
|
811
826
|
"complexType": {
|
|
812
827
|
"original": "string",
|
|
813
828
|
"resolved": "string",
|
|
@@ -818,7 +833,7 @@ export class DuetChoice {
|
|
|
818
833
|
"docs": {
|
|
819
834
|
"tags": [{
|
|
820
835
|
"name": "default",
|
|
821
|
-
"text": "{\nfi: \"Lis\u00E4tietoja\",\nen: \"More information about\",\nsv: \"Mera information om\",\n}"
|
|
836
|
+
"text": "{\nfi: \"Lis\u00E4tietoja vaihtoehdosta\",\nen: \"More information about\",\nsv: \"Mera information om\",\n}"
|
|
822
837
|
}],
|
|
823
838
|
"text": "Hint text to display before the user types into the date picker input."
|
|
824
839
|
},
|
|
@@ -832,7 +847,8 @@ export class DuetChoice {
|
|
|
832
847
|
return {
|
|
833
848
|
"isHovering": {},
|
|
834
849
|
"isInfoOpen": {},
|
|
835
|
-
"isBlurred": {}
|
|
850
|
+
"isBlurred": {},
|
|
851
|
+
"language": {}
|
|
836
852
|
};
|
|
837
853
|
}
|
|
838
854
|
static get events() {
|
|
@@ -852,7 +868,7 @@ export class DuetChoice {
|
|
|
852
868
|
"references": {
|
|
853
869
|
"DuetChoiceEvent": {
|
|
854
870
|
"location": "local",
|
|
855
|
-
"path": "/Users/
|
|
871
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-choice/duet-choice.tsx"
|
|
856
872
|
}
|
|
857
873
|
}
|
|
858
874
|
}
|
|
@@ -872,7 +888,7 @@ export class DuetChoice {
|
|
|
872
888
|
"references": {
|
|
873
889
|
"DuetChoiceEvent": {
|
|
874
890
|
"location": "local",
|
|
875
|
-
"path": "/Users/
|
|
891
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-choice/duet-choice.tsx"
|
|
876
892
|
}
|
|
877
893
|
}
|
|
878
894
|
}
|
|
@@ -892,7 +908,7 @@ export class DuetChoice {
|
|
|
892
908
|
"references": {
|
|
893
909
|
"DuetChoiceEvent": {
|
|
894
910
|
"location": "local",
|
|
895
|
-
"path": "/Users/
|
|
911
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-choice/duet-choice.tsx"
|
|
896
912
|
}
|
|
897
913
|
}
|
|
898
914
|
}
|
|
@@ -941,6 +957,12 @@ export class DuetChoice {
|
|
|
941
957
|
};
|
|
942
958
|
}
|
|
943
959
|
static get elementRef() { return "element"; }
|
|
960
|
+
static get watchers() {
|
|
961
|
+
return [{
|
|
962
|
+
"propName": "language",
|
|
963
|
+
"methodName": "watchLanguageStateHandler"
|
|
964
|
+
}];
|
|
965
|
+
}
|
|
944
966
|
static get listeners() {
|
|
945
967
|
return [{
|
|
946
968
|
"name": "blur",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
:host(.horizontal) .duet-choice-group {
|
|
28
28
|
display: block;
|
|
29
|
+
margin-bottom: 0;
|
|
29
30
|
}
|
|
30
31
|
:host(.horizontal) .duet-choice-group.duet-no-stacking {
|
|
31
32
|
display: flex;
|
|
@@ -33,7 +34,6 @@
|
|
|
33
34
|
@media (max-width: 35.9375em) {
|
|
34
35
|
:host(.horizontal) .duet-choice-group {
|
|
35
36
|
display: flex;
|
|
36
|
-
margin-bottom: 0;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -204,7 +204,7 @@ export class DuetCollapsible {
|
|
|
204
204
|
"references": {
|
|
205
205
|
"DuetCollapsibleWeight": {
|
|
206
206
|
"location": "local",
|
|
207
|
-
"path": "/Users/
|
|
207
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-collapsible/duet-collapsible.tsx"
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
},
|
|
@@ -227,7 +227,7 @@ export class DuetCollapsible {
|
|
|
227
227
|
"references": {
|
|
228
228
|
"DuetCollapsibleHeadingFontSize": {
|
|
229
229
|
"location": "local",
|
|
230
|
-
"path": "/Users/
|
|
230
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-collapsible/duet-collapsible.tsx"
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
},
|
|
@@ -324,7 +324,7 @@ export class DuetCollapsible {
|
|
|
324
324
|
"references": {
|
|
325
325
|
"DuetCollapsibleToggleEvent": {
|
|
326
326
|
"location": "local",
|
|
327
|
-
"path": "/Users/
|
|
327
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-collapsible/duet-collapsible.tsx"
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
}
|
|
@@ -467,7 +467,7 @@ export class DuetCombobox {
|
|
|
467
467
|
"references": {
|
|
468
468
|
"DuetComboboxItem": {
|
|
469
469
|
"location": "local",
|
|
470
|
-
"path": "/Users/
|
|
470
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-combobox/duet-combobox.tsx"
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
},
|
|
@@ -568,7 +568,7 @@ export class DuetCombobox {
|
|
|
568
568
|
"references": {
|
|
569
569
|
"DuetComboboxEvent": {
|
|
570
570
|
"location": "local",
|
|
571
|
-
"path": "/Users/
|
|
571
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-combobox/duet-combobox.tsx"
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
}
|
|
@@ -592,7 +592,7 @@ export class DuetCombobox {
|
|
|
592
592
|
},
|
|
593
593
|
"DuetComboboxItem": {
|
|
594
594
|
"location": "local",
|
|
595
|
-
"path": "/Users/
|
|
595
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-combobox/duet-combobox.tsx"
|
|
596
596
|
}
|
|
597
597
|
},
|
|
598
598
|
"return": "Promise<string>"
|
|
@@ -99,7 +99,7 @@ export class DuetCookieConsent {
|
|
|
99
99
|
"references": {
|
|
100
100
|
"DuetCookieConsentEvent": {
|
|
101
101
|
"location": "local",
|
|
102
|
-
"path": "/Users/
|
|
102
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-cookie-consent/duet-cookie-consent.tsx"
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -5,7 +5,7 @@ import { h, Host } from "@stencil/core";
|
|
|
5
5
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
6
|
import { createID } from "../../utils/create-id";
|
|
7
7
|
import { FocusGuard } from "../../utils/focus-utils";
|
|
8
|
-
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
9
9
|
import i18n from "./date-i18n";
|
|
10
10
|
import { DatePickerInput } from "./date-picker-input";
|
|
11
11
|
import { DatePickerMonth } from "./date-picker-month";
|
|
@@ -153,6 +153,11 @@ export class DuetDatePicker {
|
|
|
153
153
|
this.incrementYears = 10;
|
|
154
154
|
this.validity = undefined;
|
|
155
155
|
}
|
|
156
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
157
|
+
if (newValue !== oldValue && this.placeholder === this.placeholderDefaults[oldValue]) {
|
|
158
|
+
this.placeholder = getLocaleString(this.placeholderDefaults, newValue);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
156
161
|
updateValidity() {
|
|
157
162
|
this.determineValidity(parseISODate(this.value));
|
|
158
163
|
}
|
|
@@ -196,6 +201,12 @@ export class DuetDatePicker {
|
|
|
196
201
|
break;
|
|
197
202
|
}
|
|
198
203
|
}
|
|
204
|
+
connectedCallback() {
|
|
205
|
+
connectLanguageChangeObserver(this);
|
|
206
|
+
}
|
|
207
|
+
disconnectedCallback() {
|
|
208
|
+
disconnectLanguageChangeObserver(this);
|
|
209
|
+
}
|
|
199
210
|
/**
|
|
200
211
|
* Sets focus on the date picker's input. Use this method instead of the global `focus()`.
|
|
201
212
|
*/
|
|
@@ -333,7 +344,7 @@ export class DuetDatePicker {
|
|
|
333
344
|
left: this.direction === "left",
|
|
334
345
|
error: !!this.error,
|
|
335
346
|
active: this.open,
|
|
336
|
-
}, 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(FocusGuard, { moveFocusTo: this.focusedDayNode }), h("div", { class: "duet-date-dialog-wrapper", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, h("duet-visually-hidden", { "aria-live": "polite" }, text.keyboardInstruction), h("div", { class: "duet-date-dialog-mobile-header" }, h("duet-label", { margin: "none" }, this.label), h("button", { class: "duet-date-picker-close", ref: element => (this.closeButtonNode = element), onClick: () => this.hide(), type: "button" }, h("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xx-small" }), h("duet-visually-hidden", null, text.closeLabel))), h("div", { class: "duet-date-dialog-header" }, h("div", { class: "duet-date-dialog-dropdowns" }, h("duet-visually-hidden", null, h("h2", { id: this.dialogLabelId, "aria-live": "polite", "aria-atomic": "true" }, text.monthLabels[focusedMonth], " ", this.focusedDay.getFullYear())), h("duet-visually-hidden", null, h("label", { htmlFor: this.monthSelectId }, text.monthSelectLabel)), h("div", { class: "duet-date-dialog-select" }, h("select", { 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", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h("span", null, text.monthLabelsShort[focusedMonth]), h("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" }))), h("duet-visually-hidden", null, h("label", { htmlFor: this.yearSelectId }, text.yearSelectLabel)), h("div", { class: "duet-date-dialog-select" }, h("select", { 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", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h("span", null, this.focusedDay.getFullYear()), h("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" })))), h("div", { class: "duet-date-dialog-buttons" }, h("duet-action-button", { class: "duet-date-dialog-prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, "icon-name": "action-arrow-left-small" }, text.prevMonthLabel), h("duet-action-button", { class: "duet-date-dialog-next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, "icon-name": "action-arrow-right-small" }, text.nextMonthLabel))), h(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, language: this.language, theme: this.theme, min: minDate, max: maxDate, focusedDayRef: element => (this.focusedDayNode = element), onFocusEnter: this.enableActiveFocus, onFocusExit: this.disableActiveFocus })), h(FocusGuard, { moveFocusTo: this.closeButtonNode }))));
|
|
347
|
+
}, 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(FocusGuard, { moveFocusTo: this.focusedDayNode }), h("div", { class: "duet-date-dialog-wrapper", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, h("duet-visually-hidden", { "aria-live": "polite" }, text.keyboardInstruction), h("div", { class: "duet-date-dialog-mobile-header" }, h("duet-label", { margin: "none" }, this.label), h("button", { class: "duet-date-picker-close", ref: element => (this.closeButtonNode = element), onClick: () => this.hide(), type: "button" }, h("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xx-small" }), h("duet-visually-hidden", null, text.closeLabel))), h("div", { class: "duet-date-dialog-header" }, h("div", { class: "duet-date-dialog-dropdowns" }, h("duet-visually-hidden", null, h("h2", { id: this.dialogLabelId, "aria-live": "polite", "aria-atomic": "true" }, text.monthLabels[focusedMonth], " ", this.focusedDay.getFullYear())), h("duet-visually-hidden", null, h("label", { htmlFor: this.monthSelectId }, text.monthSelectLabel)), h("div", { class: "duet-date-dialog-select" }, h("select", { 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", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h("span", null, text.monthLabelsShort[focusedMonth]), h("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" }))), h("duet-visually-hidden", null, h("label", { htmlFor: this.yearSelectId }, text.yearSelectLabel)), h("div", { class: "duet-date-dialog-select" }, h("select", { 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", { class: "duet-date-dialog-select-label", "aria-hidden": "true" }, h("span", null, this.focusedDay.getFullYear()), h("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xxx-small" })))), h("div", { class: "duet-date-dialog-buttons" }, h("duet-action-button", { accessibleLabel: i18n[this.language].prevMonthLabel, actionName: i18n[this.language].prevMonthLabel, class: "duet-date-dialog-prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, "icon-name": "action-arrow-left-small" }, text.prevMonthLabel), h("duet-action-button", { 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, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, language: this.language, theme: this.theme, min: minDate, max: maxDate, focusedDayRef: element => (this.focusedDayNode = element), onFocusEnter: this.enableActiveFocus, onFocusExit: this.disableActiveFocus })), h(FocusGuard, { moveFocusTo: this.closeButtonNode }))));
|
|
337
348
|
}
|
|
338
349
|
static get is() { return "duet-date-picker"; }
|
|
339
350
|
static get encapsulation() { return "scoped"; }
|
|
@@ -486,7 +497,7 @@ export class DuetDatePicker {
|
|
|
486
497
|
},
|
|
487
498
|
"language": {
|
|
488
499
|
"type": "string",
|
|
489
|
-
"mutable":
|
|
500
|
+
"mutable": true,
|
|
490
501
|
"complexType": {
|
|
491
502
|
"original": "DuetLanguage",
|
|
492
503
|
"resolved": "\"en\" | \"fi\" | \"sv\"",
|
|
@@ -510,7 +521,7 @@ export class DuetDatePicker {
|
|
|
510
521
|
"text": "The currently active language. This setting changes the month/year/day.\nnames and button labels as well as all screen reader labels."
|
|
511
522
|
},
|
|
512
523
|
"attribute": "language",
|
|
513
|
-
"reflect":
|
|
524
|
+
"reflect": true,
|
|
514
525
|
"defaultValue": "getLanguage()"
|
|
515
526
|
},
|
|
516
527
|
"placeholderDefaults": {
|
|
@@ -541,7 +552,7 @@ export class DuetDatePicker {
|
|
|
541
552
|
},
|
|
542
553
|
"placeholder": {
|
|
543
554
|
"type": "string",
|
|
544
|
-
"mutable":
|
|
555
|
+
"mutable": true,
|
|
545
556
|
"complexType": {
|
|
546
557
|
"original": "string",
|
|
547
558
|
"resolved": "string",
|
|
@@ -744,7 +755,7 @@ export class DuetDatePicker {
|
|
|
744
755
|
"references": {
|
|
745
756
|
"DuetDatePickerDirection": {
|
|
746
757
|
"location": "local",
|
|
747
|
-
"path": "/Users/
|
|
758
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-date-picker/duet-date-picker.tsx"
|
|
748
759
|
}
|
|
749
760
|
}
|
|
750
761
|
},
|
|
@@ -916,7 +927,7 @@ export class DuetDatePicker {
|
|
|
916
927
|
"references": {
|
|
917
928
|
"DuetDatePickerChangeEvent": {
|
|
918
929
|
"location": "local",
|
|
919
|
-
"path": "/Users/
|
|
930
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-date-picker/duet-date-picker.tsx"
|
|
920
931
|
}
|
|
921
932
|
}
|
|
922
933
|
}
|
|
@@ -936,7 +947,7 @@ export class DuetDatePicker {
|
|
|
936
947
|
"references": {
|
|
937
948
|
"DuetDatePickerFocusEvent": {
|
|
938
949
|
"location": "local",
|
|
939
|
-
"path": "/Users/
|
|
950
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-date-picker/duet-date-picker.tsx"
|
|
940
951
|
}
|
|
941
952
|
}
|
|
942
953
|
}
|
|
@@ -956,7 +967,7 @@ export class DuetDatePicker {
|
|
|
956
967
|
"references": {
|
|
957
968
|
"DuetDatePickerFocusEvent": {
|
|
958
969
|
"location": "local",
|
|
959
|
-
"path": "/Users/
|
|
970
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-date-picker/duet-date-picker.tsx"
|
|
960
971
|
}
|
|
961
972
|
}
|
|
962
973
|
}
|
|
@@ -1026,6 +1037,9 @@ export class DuetDatePicker {
|
|
|
1026
1037
|
static get elementRef() { return "element"; }
|
|
1027
1038
|
static get watchers() {
|
|
1028
1039
|
return [{
|
|
1040
|
+
"propName": "language",
|
|
1041
|
+
"methodName": "watchLanguageStateHandler"
|
|
1042
|
+
}, {
|
|
1029
1043
|
"propName": "min",
|
|
1030
1044
|
"methodName": "updateValidity"
|
|
1031
1045
|
}, {
|
|
@@ -75,7 +75,7 @@ export class DuetDivider {
|
|
|
75
75
|
"references": {
|
|
76
76
|
"DuetDividerMargin": {
|
|
77
77
|
"location": "local",
|
|
78
|
-
"path": "/Users/
|
|
78
|
+
"path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-divider/duet-divider.tsx"
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
},
|