@duetds/components 6.9.0 → 6.9.1
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 +224 -69
- package/lib/cjs/duet-action-button.cjs.entry.js +17 -2
- package/lib/cjs/duet-alert.cjs.entry.js +1 -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 +1 -1
- package/lib/cjs/duet-caption_4.cjs.entry.js +1 -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 +2 -2
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-combobox.cjs.entry.js +12 -2
- 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 +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +25 -10
- 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 +1 -1
- package/lib/cjs/duet-grid_2.cjs.entry.js +4 -2
- package/lib/cjs/duet-header_2.cjs.entry.js +15 -1
- package/lib/cjs/duet-hero.cjs.entry.js +15 -3
- 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 +2 -2
- package/lib/cjs/duet-multiselect.cjs.entry.js +9 -3
- package/lib/cjs/duet-nav.cjs.entry.js +1 -1
- package/lib/cjs/duet-notification_2.cjs.entry.js +15 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +47 -27
- package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.cjs.entry.js +16 -3
- 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 +3 -3
- package/lib/cjs/duet-slideout-lang.cjs.entry.js +1 -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 +2 -2
- package/lib/cjs/duet-slideout.cjs.entry.js +3 -3
- 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 +22 -7
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar.cjs.entry.js +2 -2
- 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 +16 -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-5c2e36e8.js → focus-utils-46e27452.js} +1 -1
- package/lib/cjs/{index-92f0a873.js → index-8512a70b.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/collection/components/duet-action-button/duet-action-button.js +25 -6
- package/lib/collection/components/duet-combobox/duet-combobox.js +16 -3
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +15 -3
- package/lib/collection/components/duet-grid/duet-grid.css +18 -0
- package/lib/collection/components/duet-grid/duet-grid.js +20 -0
- package/lib/collection/components/duet-header/duet-header.js +20 -4
- package/lib/collection/components/duet-hero/duet-hero.css +7 -0
- package/lib/collection/components/duet-hero/duet-hero.js +17 -3
- package/lib/collection/components/duet-multiselect/duet-multiselect.js +11 -4
- package/lib/collection/components/duet-notification/duet-notification.js +22 -5
- package/lib/collection/components/duet-number-input/duet-number-input.js +46 -26
- package/lib/collection/components/duet-pagination/duet-pagination.js +21 -5
- package/lib/collection/components/duet-select/duet-select.css +0 -4
- package/lib/collection/components/duet-select/duet-select.js +1 -1
- package/lib/collection/components/duet-slideout/duet-slideout.css +2 -0
- package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.css +5 -21
- package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.css +1 -0
- package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.js +21 -5
- package/lib/collection/components/duet-table/duet-table.js +17 -1
- package/lib/collection/components/duet-tooltip/duet-tooltip.js +21 -4
- package/lib/collection/components/duet-upload/duet-upload.css +19 -9
- package/lib/collection/components/duet-upload/duet-upload.js +1 -1
- package/lib/collection/components/duet-upload/upload-item.js +3 -3
- 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 +3 -3
- 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 +6 -6
- package/lib/dist-custom-elements/duet-choice.js +6 -6
- package/lib/dist-custom-elements/duet-collapsible.js +2 -2
- package/lib/dist-custom-elements/duet-combobox.js +16 -5
- package/lib/dist-custom-elements/duet-contact-card.js +9 -9
- package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
- package/lib/dist-custom-elements/duet-date-picker.js +11 -11
- package/lib/dist-custom-elements/duet-divider.js +1 -1
- package/lib/dist-custom-elements/duet-editable-table.js +19 -11
- 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 +5 -5
- 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 +26 -12
- package/lib/dist-custom-elements/duet-heading.js +1 -1
- package/lib/dist-custom-elements/duet-hero.js +25 -13
- 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 +8 -8
- package/lib/dist-custom-elements/duet-multiselect.js +18 -11
- package/lib/dist-custom-elements/duet-nav.js +1 -1
- package/lib/dist-custom-elements/duet-notification-drawer.js +5 -5
- package/lib/dist-custom-elements/duet-notification.js +19 -5
- package/lib/dist-custom-elements/duet-number-input.js +56 -36
- package/lib/dist-custom-elements/duet-page-heading.js +2 -2
- package/lib/dist-custom-elements/duet-pagination.js +26 -12
- 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 +5 -5
- 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 +3 -3
- 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 +3 -3
- package/lib/dist-custom-elements/duet-slideout.js +4 -4
- 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 +24 -8
- package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar.js +3 -3
- package/lib/dist-custom-elements/duet-tab-group.js +10 -10
- package/lib/dist-custom-elements/duet-tab.js +2 -2
- package/lib/dist-custom-elements/duet-table.js +1 -1
- package/lib/dist-custom-elements/duet-textarea.js +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 +4 -4
- package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
- package/lib/dist-custom-elements/duet-upload.js +22 -25
- 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-1bf112be.js → p-00afad07.js} +1 -1
- package/lib/dist-custom-elements/{p-6c05e879.js → p-076452be.js} +1 -1
- package/lib/dist-custom-elements/{p-d0dea200.js → p-117109e4.js} +1 -1
- package/lib/dist-custom-elements/{p-0d1b84db.js → p-11fbe397.js} +1 -1
- package/lib/dist-custom-elements/{p-26d32594.js → p-2a919c81.js} +21 -6
- package/lib/dist-custom-elements/{p-c820f65e.js → p-414fdb0c.js} +1 -1
- package/lib/dist-custom-elements/{p-9eba8647.js → p-43bbb094.js} +2 -2
- package/lib/dist-custom-elements/{p-d6a4de03.js → p-51307fda.js} +1 -1
- package/lib/dist-custom-elements/{p-dde8e436.js → p-528cdd3e.js} +5 -5
- package/lib/dist-custom-elements/{p-353d6d0c.js → p-57d6495c.js} +1 -1
- package/lib/dist-custom-elements/{p-4b4a086d.js → p-5e60f757.js} +9 -9
- package/lib/dist-custom-elements/{p-132f2514.js → p-69fa1743.js} +8 -8
- package/lib/dist-custom-elements/{p-e1de0408.js → p-6f661b09.js} +1 -1
- package/lib/dist-custom-elements/{p-19ad4945.js → p-72635656.js} +1 -1
- package/lib/dist-custom-elements/{p-c01c91d6.js → p-7392a942.js} +2 -2
- package/lib/dist-custom-elements/{p-c4a3d30d.js → p-7c4c8cf0.js} +1 -1
- package/lib/dist-custom-elements/{p-17d43428.js → p-84d75d9d.js} +4 -4
- package/lib/dist-custom-elements/{p-29b2c3bb.js → p-8d12a863.js} +1 -1
- package/lib/dist-custom-elements/{p-7199196e.js → p-9175529e.js} +3 -3
- package/lib/dist-custom-elements/{p-49848110.js → p-94df5d2c.js} +1 -1
- package/lib/dist-custom-elements/{p-d6bcc527.js → p-98b0f345.js} +1 -1
- package/lib/dist-custom-elements/p-9f027a93.js +183 -0
- package/lib/dist-custom-elements/{p-a56cc313.js → p-afc65a24.js} +2 -2
- package/lib/dist-custom-elements/{p-890a9b12.js → p-b51fbd15.js} +2 -2
- package/lib/dist-custom-elements/{p-9d23386f.js → p-b7b7c63b.js} +1 -1
- package/lib/dist-custom-elements/{p-7a4bdb83.js → p-bbf48894.js} +1 -1
- package/lib/dist-custom-elements/{p-47ba781e.js → p-bdc087cb.js} +15 -2
- package/lib/dist-custom-elements/{p-276e05ab.js → p-c272c5d5.js} +6 -6
- package/lib/dist-custom-elements/{p-41ef88f4.js → p-c57eccd3.js} +22 -6
- package/lib/dist-custom-elements/{p-945a2c0c.js → p-c8659d75.js} +2 -2
- package/lib/dist-custom-elements/{p-a1ee31fb.js → p-cefb33f9.js} +1 -1
- package/lib/dist-custom-elements/{p-85fd8f09.js → p-f1b800f0.js} +1 -1
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-d8de0d06.entry.js → p-00c11b87.entry.js} +1 -1
- package/lib/duet/{p-2e69c81b.entry.js → p-018b0ffe.entry.js} +1 -1
- package/lib/duet/p-01ca2f64.system.entry.js +4 -0
- package/lib/duet/{p-45a64d20.entry.js → p-02fb736a.entry.js} +1 -1
- package/lib/duet/{p-702a9390.entry.js → p-04ccc444.entry.js} +1 -1
- package/lib/duet/{p-f173da98.entry.js → p-05f30291.entry.js} +1 -1
- package/lib/duet/p-08b03779.system.entry.js +4 -0
- package/lib/duet/{p-a6a5458a.entry.js → p-097c4d0c.entry.js} +1 -1
- package/lib/duet/p-0ab4083f.entry.js +4 -0
- package/lib/duet/{p-d5474f30.system.entry.js → p-0ca53854.system.entry.js} +1 -1
- package/lib/duet/{p-c4738155.system.entry.js → p-0e8dab5b.system.entry.js} +1 -1
- package/lib/duet/{p-d503fd3d.entry.js → p-1254c99a.entry.js} +1 -1
- package/lib/duet/{p-c3495075.system.entry.js → p-1263323e.system.entry.js} +1 -1
- package/lib/duet/{p-835ea0dc.system.entry.js → p-133d2ee1.system.entry.js} +1 -1
- package/lib/duet/{p-9f5446d7.system.entry.js → p-14e3383d.system.entry.js} +1 -1
- package/lib/duet/{p-fa7a4245.entry.js → p-154c0d34.entry.js} +1 -1
- package/lib/duet/{p-65b119a7.system.entry.js → p-1666fed9.system.entry.js} +1 -1
- package/lib/duet/{p-21d08944.entry.js → p-1739bdd1.entry.js} +1 -1
- package/lib/duet/p-187c9ec6.system.entry.js +4 -0
- package/lib/duet/{p-2b94fb6c.entry.js → p-2078d7cd.entry.js} +1 -1
- package/lib/duet/{p-29193196.entry.js → p-22caa775.entry.js} +1 -1
- package/lib/duet/{p-893d0a53.entry.js → p-2695e6c6.entry.js} +1 -1
- package/lib/duet/{p-2c0d4d3c.entry.js → p-27cc2332.entry.js} +1 -1
- package/lib/duet/{p-e71cb6f4.entry.js → p-2c28eb80.entry.js} +1 -1
- package/lib/duet/{p-850b95d7.entry.js → p-2c6e4614.entry.js} +1 -1
- package/lib/duet/{p-47fb8005.system.entry.js → p-2d6e3927.system.entry.js} +1 -1
- package/lib/duet/{p-02e23372.entry.js → p-2e1e2d3d.entry.js} +1 -1
- package/lib/duet/{p-7c32523b.system.entry.js → p-2f936baf.system.entry.js} +1 -1
- package/lib/duet/{p-6fe5922d.system.entry.js → p-33bf6eed.system.entry.js} +1 -1
- package/lib/duet/{p-e8a6eda7.system.entry.js → p-340bef19.system.entry.js} +1 -1
- package/lib/duet/{p-78f49cbf.system.entry.js → p-35907d51.system.entry.js} +1 -1
- package/lib/duet/p-361ce072.system.entry.js +4 -0
- package/lib/duet/{p-d7c0027e.entry.js → p-376ec229.entry.js} +1 -1
- package/lib/duet/{p-72585f83.entry.js → p-3856f3a8.entry.js} +1 -1
- package/lib/duet/{p-39c34fde.system.entry.js → p-3a21d43b.system.entry.js} +1 -1
- package/lib/duet/p-3a28cf58.entry.js +4 -0
- package/lib/duet/p-3d3e5e9e.entry.js +4 -0
- package/lib/duet/{p-b3584ef1.system.entry.js → p-417c1eca.system.entry.js} +1 -1
- package/lib/duet/{p-643dd974.entry.js → p-45a939b3.entry.js} +1 -1
- package/lib/duet/{p-6326cade.system.entry.js → p-46ca69cf.system.entry.js} +1 -1
- package/lib/duet/{p-1ef436d2.js → p-4879ffe9.js} +1 -1
- package/lib/duet/p-4b7f3ac1.system.js +4 -0
- package/lib/duet/{p-7fd9b8b6.system.entry.js → p-4bdd34bc.system.entry.js} +1 -1
- package/lib/duet/{p-628c4fc7.system.entry.js → p-4c286dee.system.entry.js} +1 -1
- package/lib/duet/{p-be3c04fb.entry.js → p-50b51053.entry.js} +1 -1
- package/lib/duet/p-51160aa4.entry.js +4 -0
- package/lib/duet/{p-8b123c27.system.entry.js → p-539034b3.system.entry.js} +1 -1
- package/lib/duet/{p-c22a97ea.system.entry.js → p-54a44e1e.system.entry.js} +1 -1
- package/lib/duet/{p-95f020cc.system.entry.js → p-56b4f6e5.system.entry.js} +1 -1
- package/lib/duet/{p-faaa6249.entry.js → p-57f981bd.entry.js} +1 -1
- package/lib/duet/{p-049f7427.entry.js → p-58833aca.entry.js} +1 -1
- package/lib/duet/{p-4ab70001.system.entry.js → p-5abf961b.system.entry.js} +1 -1
- package/lib/duet/{p-c7507f6b.system.entry.js → p-5c2dd50b.system.entry.js} +2 -2
- package/lib/duet/p-5c83e833.entry.js +4 -0
- package/lib/duet/p-614194b1.entry.js +4 -0
- package/lib/duet/p-618615d1.system.entry.js +4 -0
- package/lib/duet/{p-58d08fb8.entry.js → p-61e84177.entry.js} +1 -1
- package/lib/duet/{p-b16b89c3.system.entry.js → p-64297b4d.system.entry.js} +1 -1
- package/lib/duet/{p-a5b5f3e2.system.entry.js → p-64b14d85.system.entry.js} +1 -1
- package/lib/duet/p-6a1f0973.system.entry.js +4 -0
- package/lib/duet/{p-bc89db28.entry.js → p-6a8341c1.entry.js} +1 -1
- package/lib/duet/p-71779b62.entry.js +4 -0
- package/lib/duet/{p-c073eb55.system.entry.js → p-71e63186.system.entry.js} +1 -1
- package/lib/duet/p-736eb6f6.system.entry.js +4 -0
- package/lib/duet/p-75a307e4.entry.js +4 -0
- package/lib/duet/{p-1bfff197.system.entry.js → p-76bac602.system.entry.js} +1 -1
- package/lib/duet/{p-4136d211.entry.js → p-7743d05c.entry.js} +1 -1
- package/lib/duet/{p-07e54b8a.entry.js → p-78973e79.entry.js} +1 -1
- package/lib/duet/{p-2b4f4c85.system.entry.js → p-7cbc8aa1.system.entry.js} +1 -1
- package/lib/duet/{p-ce108a20.entry.js → p-7dd4e3f6.entry.js} +1 -1
- package/lib/duet/p-7e9e10ab.entry.js +4 -0
- package/lib/duet/{p-7a5077a2.system.entry.js → p-80973cda.system.entry.js} +1 -1
- package/lib/duet/{p-c91aaa04.system.entry.js → p-825c4e47.system.entry.js} +1 -1
- package/lib/duet/{p-190507d4.system.entry.js → p-84881c84.system.entry.js} +1 -1
- package/lib/duet/p-86201340.system.entry.js +4 -0
- package/lib/duet/{p-c518f7da.system.entry.js → p-8a517f70.system.entry.js} +1 -1
- package/lib/duet/{p-5047ae3d.entry.js → p-8b7b4c46.entry.js} +1 -1
- package/lib/duet/{p-7a53ff56.entry.js → p-90fece55.entry.js} +1 -1
- package/lib/duet/{p-72264693.entry.js → p-9389ce47.entry.js} +1 -1
- package/lib/duet/{p-58b9c7b4.system.entry.js → p-94f2509c.system.entry.js} +1 -1
- package/lib/duet/p-960503a3.entry.js +4 -0
- package/lib/duet/p-9616579e.entry.js +4 -0
- package/lib/duet/{p-f7ff8b67.entry.js → p-981b43c2.entry.js} +1 -1
- package/lib/duet/{p-38680e94.system.entry.js → p-99ccb2c2.system.entry.js} +1 -1
- package/lib/duet/p-9cd3ea60.system.entry.js +4 -0
- package/lib/duet/p-9d36613e.system.entry.js +4 -0
- package/lib/duet/{p-4b02643a.system.entry.js → p-9fc991c2.system.entry.js} +1 -1
- package/lib/duet/{p-addd277e.system.entry.js → p-a0bcc46c.system.entry.js} +1 -1
- package/lib/duet/p-a113525c.entry.js +4 -0
- package/lib/duet/{p-5743852f.system.js → p-a190f8b9.system.js} +1 -1
- package/lib/duet/{p-aac361b8.entry.js → p-a29118e6.entry.js} +1 -1
- package/lib/duet/{p-80bc3db3.entry.js → p-a3f23363.entry.js} +1 -1
- package/lib/duet/{p-7f2a16b3.entry.js → p-a4a9705f.entry.js} +1 -1
- package/lib/duet/{p-ef31120e.system.entry.js → p-a4e42811.system.entry.js} +1 -1
- package/lib/duet/p-a6751ba6.entry.js +4 -0
- package/lib/duet/{p-44bbf984.entry.js → p-a7d9728a.entry.js} +1 -1
- package/lib/duet/{p-e9cea31c.entry.js → p-abbcf5dc.entry.js} +1 -1
- package/lib/duet/{p-fad8bcee.system.entry.js → p-aee38b4a.system.entry.js} +1 -1
- package/lib/duet/{p-ad82c633.system.entry.js → p-b1abb582.system.entry.js} +1 -1
- package/lib/duet/{p-c3e4e6a2.system.entry.js → p-b2be54b5.system.entry.js} +1 -1
- package/lib/duet/{p-b1b1160e.system.entry.js → p-b308ce5d.system.entry.js} +1 -1
- package/lib/duet/{p-d563682c.entry.js → p-b3f12c59.entry.js} +1 -1
- package/lib/duet/{p-2ff8c614.entry.js → p-b656b461.entry.js} +1 -1
- package/lib/duet/{p-48bab8b6.entry.js → p-bb536ec4.entry.js} +1 -1
- package/lib/duet/{p-8f0579d1.entry.js → p-bc0ce7e7.entry.js} +1 -1
- package/lib/duet/{p-93f3e158.system.entry.js → p-bf37cb60.system.entry.js} +1 -1
- package/lib/duet/{p-c832c83e.system.entry.js → p-c141d219.system.entry.js} +1 -1
- package/lib/duet/p-c16de43f.system.entry.js +4 -0
- package/lib/duet/{p-2184a285.system.entry.js → p-c19d32af.system.entry.js} +1 -1
- package/lib/duet/{p-84eb3d96.system.entry.js → p-c213c2f2.system.entry.js} +1 -1
- package/lib/duet/{p-2a80caf9.entry.js → p-c3c98ddf.entry.js} +1 -1
- package/lib/duet/{p-9aae9d2a.system.entry.js → p-c70da05a.system.entry.js} +1 -1
- package/lib/duet/{p-17d1d5ee.entry.js → p-cb5771c5.entry.js} +1 -1
- package/lib/duet/{p-dcce6bad.entry.js → p-cd410e2a.entry.js} +1 -1
- package/lib/duet/{p-8760c0ee.system.entry.js → p-cfebc130.system.entry.js} +1 -1
- package/lib/duet/{p-568c7b6d.entry.js → p-d22e694c.entry.js} +1 -1
- package/lib/duet/{p-fc8b03f3.system.entry.js → p-d2d14d3b.system.entry.js} +1 -1
- package/lib/duet/p-d51ed3e2.system.entry.js +4 -0
- package/lib/duet/{p-7dc36831.system.js → p-d8422099.system.js} +1 -1
- package/lib/duet/{p-c0ac70a9.entry.js → p-d924703a.entry.js} +1 -1
- package/lib/duet/{p-cc7f7692.entry.js → p-db9f9e24.entry.js} +1 -1
- package/lib/duet/{p-1de4b105.system.entry.js → p-dc1f60cd.system.entry.js} +1 -1
- package/lib/duet/p-dc566220.entry.js +4 -0
- package/lib/duet/{p-a79f86b5.system.entry.js → p-df1531b7.system.entry.js} +1 -1
- package/lib/duet/{p-12ee9a23.system.entry.js → p-e13d0460.system.entry.js} +1 -1
- package/lib/duet/{p-afb58e46.js → p-e1919861.js} +1 -1
- package/lib/duet/{p-21d4df80.entry.js → p-e4626c0e.entry.js} +1 -1
- package/lib/duet/{p-5576e447.system.entry.js → p-e920e34f.system.entry.js} +1 -1
- package/lib/duet/{p-26ebc753.system.entry.js → p-e9fb2c3b.system.entry.js} +1 -1
- package/lib/duet/{p-2faa3962.entry.js → p-eb4393ed.entry.js} +1 -1
- package/lib/duet/{p-2e822cf0.entry.js → p-ed222f86.entry.js} +1 -1
- package/lib/duet/p-f25db9b8.entry.js +4 -0
- package/lib/duet/{p-7d4e2e96.system.entry.js → p-f28d27a4.system.entry.js} +1 -1
- package/lib/duet/{p-2b0d6d66.system.entry.js → p-fa0896f4.system.entry.js} +1 -1
- package/lib/duet/{p-de06c5ff.entry.js → p-faeed6cf.entry.js} +1 -1
- package/lib/duet/{p-d3da2989.system.entry.js → p-fb352dcf.system.entry.js} +1 -1
- package/lib/duet/{p-e57b04f0.entry.js → p-fec9ec39.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +18 -3
- package/lib/esm/duet-alert.entry.js +1 -1
- 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 +1 -1
- package/lib/esm/duet-button_2.entry.js +1 -1
- package/lib/esm/duet-caption_4.entry.js +1 -1
- 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 +2 -2
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-combobox.entry.js +13 -3
- package/lib/esm/duet-contact-card.entry.js +1 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +26 -11
- 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 +1 -1
- package/lib/esm/duet-grid_2.entry.js +4 -2
- package/lib/esm/duet-header_2.entry.js +15 -1
- package/lib/esm/duet-hero.entry.js +16 -4
- package/lib/esm/duet-icon.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +1 -1
- 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 +2 -2
- package/lib/esm/duet-multiselect.entry.js +10 -4
- package/lib/esm/duet-nav.entry.js +1 -1
- package/lib/esm/duet-notification_2.entry.js +16 -2
- package/lib/esm/duet-number-input.entry.js +47 -27
- package/lib/esm/duet-page-heading.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +17 -4
- package/lib/esm/duet-progress.entry.js +1 -1
- 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 +1 -1
- package/lib/esm/duet-section-layout.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +3 -3
- package/lib/esm/duet-slideout-lang.entry.js +1 -1
- 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 +2 -2
- package/lib/esm/duet-slideout.entry.js +3 -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 +22 -7
- package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm/duet-submenu-bar.entry.js +2 -2
- 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 +17 -2
- package/lib/esm/duet-tray.entry.js +1 -1
- 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-123e9cba.js → focus-utils-3483f616.js} +1 -1
- package/lib/esm/{index-9d169c3d.js → index-fff18e02.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 +1 -1
- 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 +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.entry.js +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- package/lib/esm-es5/duet-nav.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +2 -2
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-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 +1 -1
- package/lib/esm-es5/duet-slideout.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-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-3483f616.js +4 -0
- package/lib/esm-es5/{index-9d169c3d.js → index-fff18e02.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/types/components/duet-action-button/duet-action-button.d.ts +8 -1
- package/lib/types/components/duet-combobox/duet-combobox.d.ts +3 -1
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +4 -1
- package/lib/types/components/duet-grid/duet-grid.d.ts +5 -0
- package/lib/types/components/duet-header/duet-header.d.ts +1 -0
- package/lib/types/components/duet-hero/duet-hero.d.ts +3 -0
- package/lib/types/components/duet-multiselect/duet-multiselect.d.ts +4 -1
- package/lib/types/components/duet-notification/duet-notification.d.ts +3 -0
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +1 -0
- package/lib/types/components/duet-pagination/duet-pagination.d.ts +5 -1
- package/lib/types/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.d.ts +2 -1
- package/lib/types/components/duet-table/duet-table.d.ts +6 -1
- package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +3 -0
- package/lib/types/components.d.ts +8 -0
- package/package.json +5 -5
- package/lib/dist-custom-elements/p-e48e8201.js +0 -180
- package/lib/duet/p-00e57f9b.system.entry.js +0 -4
- package/lib/duet/p-1710310b.entry.js +0 -4
- package/lib/duet/p-18843061.entry.js +0 -4
- package/lib/duet/p-197dba64.system.entry.js +0 -4
- package/lib/duet/p-1d283741.system.entry.js +0 -4
- package/lib/duet/p-2a89686a.entry.js +0 -4
- package/lib/duet/p-459b8e74.system.entry.js +0 -4
- package/lib/duet/p-5127e9fb.entry.js +0 -4
- package/lib/duet/p-52766fb1.entry.js +0 -4
- package/lib/duet/p-5c083efb.system.entry.js +0 -4
- package/lib/duet/p-5f872140.entry.js +0 -4
- package/lib/duet/p-6023d419.system.entry.js +0 -4
- package/lib/duet/p-6fe463e6.entry.js +0 -4
- package/lib/duet/p-723308e1.entry.js +0 -4
- package/lib/duet/p-8a963cd7.system.entry.js +0 -4
- package/lib/duet/p-8f60b4a4.entry.js +0 -4
- package/lib/duet/p-98c7286c.entry.js +0 -4
- package/lib/duet/p-9f9a14d7.entry.js +0 -4
- package/lib/duet/p-a3782a14.entry.js +0 -4
- package/lib/duet/p-acb0fbdc.system.entry.js +0 -4
- package/lib/duet/p-b421ea8a.system.entry.js +0 -4
- package/lib/duet/p-c360334a.system.js +0 -4
- package/lib/duet/p-cb2bd40e.entry.js +0 -4
- package/lib/duet/p-d8d3f485.system.entry.js +0 -4
- package/lib/duet/p-daa0dccd.entry.js +0 -4
- package/lib/duet/p-dc71bc89.entry.js +0 -4
- package/lib/duet/p-e73937e1.system.entry.js +0 -4
- package/lib/duet/p-f9c26b20.system.entry.js +0 -4
- package/lib/esm-es5/focus-utils-123e9cba.js +0 -4
|
@@ -6,7 +6,7 @@ import { inheritGlobalTheme } from "../../common";
|
|
|
6
6
|
import { createID } from "../../utils/create-id";
|
|
7
7
|
import { debounce } from "../../utils/js-utils";
|
|
8
8
|
import { isKeyboardClick } from "../../utils/keyboard-utils";
|
|
9
|
-
import { getLocaleString } from "../../utils/language-utils";
|
|
9
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
10
10
|
import { capitalizeFirstLetter, getColorByName, shadeRGBColor } from "../../utils/token-utils";
|
|
11
11
|
/**
|
|
12
12
|
* @slot default - slot inside an invisible element, this can be used to enhance accessibility
|
|
@@ -31,6 +31,7 @@ export class DuetActionButton {
|
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
this.numbersStore = "";
|
|
34
|
+
this.language = getLanguage();
|
|
34
35
|
this.theme = "";
|
|
35
36
|
this.iconName = "action-arrow-left-small";
|
|
36
37
|
this.iconColor = "currentColor";
|
|
@@ -48,12 +49,17 @@ export class DuetActionButton {
|
|
|
48
49
|
this.accessibleDescription = undefined;
|
|
49
50
|
this.accessibleLabelsDefaults = {
|
|
50
51
|
en: "Click to activate action",
|
|
51
|
-
fi: "Klikkaa
|
|
52
|
+
fi: "Klikkaa aktivoidaksesi toiminto",
|
|
52
53
|
sv: "Klicka för att aktivera åtgärd",
|
|
53
54
|
};
|
|
54
55
|
this.accessibleLabel = getLocaleString(this.accessibleLabelsDefaults);
|
|
55
56
|
this.accessibleControls = "";
|
|
56
57
|
}
|
|
58
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
59
|
+
if (newValue !== oldValue && this.accessibleLabel === this.accessibleLabelsDefaults[oldValue]) {
|
|
60
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelsDefaults, newValue);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
57
63
|
//handle a11y keyboard navigation events
|
|
58
64
|
async onKeyboardDown(e) {
|
|
59
65
|
if (isKeyboardClick(e)) {
|
|
@@ -88,6 +94,12 @@ export class DuetActionButton {
|
|
|
88
94
|
componentWillLoad() {
|
|
89
95
|
inheritGlobalTheme(this);
|
|
90
96
|
}
|
|
97
|
+
connectedCallback() {
|
|
98
|
+
connectLanguageChangeObserver(this);
|
|
99
|
+
}
|
|
100
|
+
disconnectedCallback() {
|
|
101
|
+
disconnectLanguageChangeObserver(this);
|
|
102
|
+
}
|
|
91
103
|
/**
|
|
92
104
|
* Sets focus on the specified `duet-action-button`. Use this method instead of the global
|
|
93
105
|
* `button.focus()`.
|
|
@@ -454,11 +466,11 @@ export class DuetActionButton {
|
|
|
454
466
|
"tags": [],
|
|
455
467
|
"text": "Default accessible label"
|
|
456
468
|
},
|
|
457
|
-
"defaultValue": "{\n en: \"Click to activate action\",\n fi: \"Klikkaa
|
|
469
|
+
"defaultValue": "{\n en: \"Click to activate action\",\n fi: \"Klikkaa aktivoidaksesi toiminto\",\n sv: \"Klicka f\u00F6r att aktivera \u00E5tg\u00E4rd\",\n }"
|
|
458
470
|
},
|
|
459
471
|
"accessibleLabel": {
|
|
460
472
|
"type": "string",
|
|
461
|
-
"mutable":
|
|
473
|
+
"mutable": true,
|
|
462
474
|
"complexType": {
|
|
463
475
|
"original": "string",
|
|
464
476
|
"resolved": "string",
|
|
@@ -472,7 +484,7 @@ export class DuetActionButton {
|
|
|
472
484
|
},
|
|
473
485
|
"attribute": "accessible-label",
|
|
474
486
|
"reflect": false,
|
|
475
|
-
"defaultValue": "getLocaleString(this.accessibleLabelsDefaults)"
|
|
487
|
+
"defaultValue": "getLocaleString(\n this.accessibleLabelsDefaults\n )"
|
|
476
488
|
},
|
|
477
489
|
"accessibleControls": {
|
|
478
490
|
"type": "string",
|
|
@@ -496,7 +508,8 @@ export class DuetActionButton {
|
|
|
496
508
|
}
|
|
497
509
|
static get states() {
|
|
498
510
|
return {
|
|
499
|
-
"numbersStore": {}
|
|
511
|
+
"numbersStore": {},
|
|
512
|
+
"language": {}
|
|
500
513
|
};
|
|
501
514
|
}
|
|
502
515
|
static get events() {
|
|
@@ -549,4 +562,10 @@ export class DuetActionButton {
|
|
|
549
562
|
};
|
|
550
563
|
}
|
|
551
564
|
static get elementRef() { return "element"; }
|
|
565
|
+
static get watchers() {
|
|
566
|
+
return [{
|
|
567
|
+
"propName": "language",
|
|
568
|
+
"methodName": "watchLanguageStateHandler"
|
|
569
|
+
}];
|
|
570
|
+
}
|
|
552
571
|
}
|
|
@@ -5,7 +5,7 @@ import { Build, h, Host, } from "@stencil/core";
|
|
|
5
5
|
import { inheritGlobalTheme } from "../../common";
|
|
6
6
|
import { debounce } from "../../utils/js-utils";
|
|
7
7
|
import { isArrowDownKey, isArrowUpKey, isEnterKey, isEscapeKey, isTabKey } from "../../utils/keyboard-utils";
|
|
8
|
-
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
9
9
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
10
10
|
import { DuetComboBoxSelect } from "./duet-combobox-select";
|
|
11
11
|
export class DuetCombobox {
|
|
@@ -26,6 +26,7 @@ export class DuetCombobox {
|
|
|
26
26
|
this.listOpen = false;
|
|
27
27
|
this.selectedItems = new Set();
|
|
28
28
|
this.activeItem = undefined;
|
|
29
|
+
this.language = getLanguage();
|
|
29
30
|
this.accessibleLabelDefaults = {
|
|
30
31
|
en: {
|
|
31
32
|
heading: "Select:",
|
|
@@ -56,6 +57,12 @@ export class DuetCombobox {
|
|
|
56
57
|
activeItemHandler(state) {
|
|
57
58
|
this.input.accessibleActiveDescendant = this.listOpen && (state || state === 0) ? `active_item` : "";
|
|
58
59
|
}
|
|
60
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
61
|
+
if (newValue !== oldValue &&
|
|
62
|
+
this.accessibleLabels === getLocaleString(parsePossibleJSON(this.accessibleLabelDefaults), oldValue)) {
|
|
63
|
+
this.accessibleLabels = getLocaleString(parsePossibleJSON(this.accessibleLabelDefaults), newValue);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
59
66
|
handleDocumentClick(e) {
|
|
60
67
|
//we want to remove all user text if they have NOT selected from the dropdown
|
|
61
68
|
const path = e.composedPath();
|
|
@@ -94,6 +101,7 @@ export class DuetCombobox {
|
|
|
94
101
|
}
|
|
95
102
|
});
|
|
96
103
|
this.element.addEventListener("keydown", this.handleInputKeyDownEvent.bind(this));
|
|
104
|
+
connectLanguageChangeObserver(this);
|
|
97
105
|
//add correct aria attributes to the input element
|
|
98
106
|
this.input.accessibleAutocomplete = "list";
|
|
99
107
|
this.input.accessibleControls = "duet-combobox-list-element";
|
|
@@ -109,6 +117,7 @@ export class DuetCombobox {
|
|
|
109
117
|
e.stopPropagation();
|
|
110
118
|
});
|
|
111
119
|
this.resizeObserver.disconnect();
|
|
120
|
+
disconnectLanguageChangeObserver(this);
|
|
112
121
|
}
|
|
113
122
|
componentDidLoad() {
|
|
114
123
|
// observe resize events to dynamically adjust size of dropdown area
|
|
@@ -380,7 +389,7 @@ export class DuetCombobox {
|
|
|
380
389
|
},
|
|
381
390
|
"accessibleLabels": {
|
|
382
391
|
"type": "unknown",
|
|
383
|
-
"mutable":
|
|
392
|
+
"mutable": true,
|
|
384
393
|
"complexType": {
|
|
385
394
|
"original": "Record<string, string>",
|
|
386
395
|
"resolved": "{ [x: string]: string; }",
|
|
@@ -567,7 +576,8 @@ export class DuetCombobox {
|
|
|
567
576
|
"selectionMsg": {},
|
|
568
577
|
"listOpen": {},
|
|
569
578
|
"selectedItems": {},
|
|
570
|
-
"activeItem": {}
|
|
579
|
+
"activeItem": {},
|
|
580
|
+
"language": {}
|
|
571
581
|
};
|
|
572
582
|
}
|
|
573
583
|
static get events() {
|
|
@@ -631,6 +641,9 @@ export class DuetCombobox {
|
|
|
631
641
|
return [{
|
|
632
642
|
"propName": "activeItem",
|
|
633
643
|
"methodName": "activeItemHandler"
|
|
644
|
+
}, {
|
|
645
|
+
"propName": "language",
|
|
646
|
+
"methodName": "watchLanguageStateHandler"
|
|
634
647
|
}];
|
|
635
648
|
}
|
|
636
649
|
static get listeners() {
|
|
@@ -5,7 +5,7 @@ import { h, Host } from "@stencil/core";
|
|
|
5
5
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
6
|
import { fieldSorter } from "../../utils/js-utils";
|
|
7
7
|
import { isKeyboardClick } from "../../utils/keyboard-utils";
|
|
8
|
-
import { getLocaleString } from "../../utils/language-utils";
|
|
8
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
9
9
|
import { TableData } from "./duet-editable-table-tabledata";
|
|
10
10
|
export class DuetEditableTable {
|
|
11
11
|
constructor() {
|
|
@@ -41,6 +41,7 @@ export class DuetEditableTable {
|
|
|
41
41
|
this.toggleColumn(column, e);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
+
this.language = getLanguage();
|
|
44
45
|
this.margin = "auto";
|
|
45
46
|
this.variation = "striped";
|
|
46
47
|
this.sticky = false;
|
|
@@ -63,6 +64,12 @@ export class DuetEditableTable {
|
|
|
63
64
|
this.hasHeadSlotFirst = !!this.element.querySelector("[slot='thead-first']");
|
|
64
65
|
this.hasHeadSlotLast = !!this.element.querySelector("[slot='thead-last']");
|
|
65
66
|
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
connectLanguageChangeObserver(this);
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
disconnectLanguageChangeObserver(this);
|
|
72
|
+
}
|
|
66
73
|
createLabel(column) {
|
|
67
74
|
const { sort_order, direction, index, label } = column;
|
|
68
75
|
const i18nLabel = getLocaleString(label);
|
|
@@ -81,7 +88,7 @@ export class DuetEditableTable {
|
|
|
81
88
|
}
|
|
82
89
|
return "action-subtract-small";
|
|
83
90
|
};
|
|
84
|
-
return (h("span", { class: "duet-table-label", "data-index": index }, h("duet-button", { size: "small", icon: getButtonIcon(), "icon-size": "medium-small", "accessible-label":
|
|
91
|
+
return (h("span", { class: "duet-table-label", "data-index": index }, h("duet-button", { size: "small", icon: getButtonIcon(), "icon-size": "medium-small", "accessible-label": this.sortableDefaultLabel[this.language], variation: "plain", margin: "none", "icon-right": true, onClick: event => this.toggleColumn(column, event), onKeyDown: event => this.handleKeyDown(column, event) }, i18nLabel)));
|
|
85
92
|
}
|
|
86
93
|
getSortedColumns() {
|
|
87
94
|
//create a new array from sort instead of mutating original
|
|
@@ -110,7 +117,7 @@ export class DuetEditableTable {
|
|
|
110
117
|
const label = this.createLabel(column);
|
|
111
118
|
return label !== "" ? h("th", { scope: "col" }, label) : h("td", null);
|
|
112
119
|
}
|
|
113
|
-
}), this.actions && (h("th", { scope: "col", class: "duet-table-action-header-heading" }, this.actions && h("duet-visually-hidden", null,
|
|
120
|
+
}), this.actions && (h("th", { scope: "col", class: "duet-table-action-header-heading" }, this.actions && h("duet-visually-hidden", null, this.actionColumnLabel[this.language])))));
|
|
114
121
|
}
|
|
115
122
|
renderActions(rowItem, index) {
|
|
116
123
|
// escape early
|
|
@@ -448,6 +455,11 @@ export class DuetEditableTable {
|
|
|
448
455
|
}
|
|
449
456
|
};
|
|
450
457
|
}
|
|
458
|
+
static get states() {
|
|
459
|
+
return {
|
|
460
|
+
"language": {}
|
|
461
|
+
};
|
|
462
|
+
}
|
|
451
463
|
static get events() {
|
|
452
464
|
return [{
|
|
453
465
|
"method": "duetTableToggle",
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
:host(.duet-grid-breakpoint-x-small) {
|
|
20
20
|
flex-direction: row !important;
|
|
21
21
|
}
|
|
22
|
+
:host(.duet-grid-breakpoint-x-small).duet-grid-row-reverse {
|
|
23
|
+
flex-direction: row-reverse !important;
|
|
24
|
+
}
|
|
22
25
|
@media (max-width: 22.5em) {
|
|
23
26
|
:host(.duet-grid-breakpoint-x-small) {
|
|
24
27
|
flex-direction: column !important;
|
|
@@ -29,24 +32,36 @@
|
|
|
29
32
|
:host(.duet-grid-breakpoint-small) {
|
|
30
33
|
flex-direction: row !important;
|
|
31
34
|
}
|
|
35
|
+
:host(.duet-grid-breakpoint-small).duet-grid-row-reverse {
|
|
36
|
+
flex-direction: row-reverse !important;
|
|
37
|
+
}
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
@media (min-width: 48em) {
|
|
35
41
|
:host(.duet-grid-breakpoint-medium) {
|
|
36
42
|
flex-direction: row !important;
|
|
37
43
|
}
|
|
44
|
+
:host(.duet-grid-breakpoint-medium).duet-grid-row-reverse {
|
|
45
|
+
flex-direction: row-reverse !important;
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
@media (min-width: 62em) {
|
|
41
50
|
:host(.duet-grid-breakpoint-large) {
|
|
42
51
|
flex-direction: row !important;
|
|
43
52
|
}
|
|
53
|
+
:host(.duet-grid-breakpoint-large).duet-grid-row-reverse {
|
|
54
|
+
flex-direction: row-reverse !important;
|
|
55
|
+
}
|
|
44
56
|
}
|
|
45
57
|
|
|
46
58
|
@media (min-width: 64.0625em) {
|
|
47
59
|
:host(.duet-grid-breakpoint-x-large) {
|
|
48
60
|
flex-direction: row !important;
|
|
49
61
|
}
|
|
62
|
+
:host(.duet-grid-breakpoint-x-large).duet-grid-row-reverse {
|
|
63
|
+
flex-direction: row-reverse !important;
|
|
64
|
+
}
|
|
50
65
|
}
|
|
51
66
|
|
|
52
67
|
:host(.duet-grid-wrap) {
|
|
@@ -56,6 +71,9 @@
|
|
|
56
71
|
:host(.duet-no-stacking) {
|
|
57
72
|
flex-direction: row !important;
|
|
58
73
|
}
|
|
74
|
+
:host(.duet-no-stacking).duet-grid-row-reverse {
|
|
75
|
+
flex-direction: row-reverse !important;
|
|
76
|
+
}
|
|
59
77
|
|
|
60
78
|
:host(.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {
|
|
61
79
|
flex-direction: column !important;
|
|
@@ -18,6 +18,7 @@ export class DuetGrid {
|
|
|
18
18
|
this.responsive = false;
|
|
19
19
|
this.breakpoint = "small";
|
|
20
20
|
this.direction = "horizontal";
|
|
21
|
+
this.rowReverse = false;
|
|
21
22
|
this.alignment = "top";
|
|
22
23
|
this.distribution = "default";
|
|
23
24
|
this.mobile = "";
|
|
@@ -140,6 +141,7 @@ export class DuetGrid {
|
|
|
140
141
|
"duet-grid-breakpoint-medium": this.breakpoint === "medium",
|
|
141
142
|
"duet-grid-breakpoint-large": this.breakpoint === "large",
|
|
142
143
|
"duet-grid-breakpoint-x-large": this.breakpoint === "x-large",
|
|
144
|
+
"duet-grid-row-reverse": this.rowReverse,
|
|
143
145
|
} }));
|
|
144
146
|
}
|
|
145
147
|
static get is() { return "duet-grid"; }
|
|
@@ -220,6 +222,24 @@ export class DuetGrid {
|
|
|
220
222
|
"reflect": false,
|
|
221
223
|
"defaultValue": "\"horizontal\""
|
|
222
224
|
},
|
|
225
|
+
"rowReverse": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "boolean",
|
|
230
|
+
"resolved": "boolean",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Reverse the order of the grid items when horizontal. Usefull when we want the primary item\nto be on bottom right on desktop, but on top on mobile and the first for screen readers."
|
|
238
|
+
},
|
|
239
|
+
"attribute": "row-reverse",
|
|
240
|
+
"reflect": false,
|
|
241
|
+
"defaultValue": "false"
|
|
242
|
+
},
|
|
223
243
|
"alignment": {
|
|
224
244
|
"type": "string",
|
|
225
245
|
"mutable": false,
|
|
@@ -13,7 +13,7 @@ import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock/lib/bodySc
|
|
|
13
13
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
14
14
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
15
15
|
import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isEscapeKey, isSpaceKey, } from "../../utils/keyboard-utils";
|
|
16
|
-
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
16
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
17
17
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
18
18
|
import { DuetHeaderDropdown } from "./duet-header-dropdown";
|
|
19
19
|
import { DuetHeaderHamburger } from "./duet-header-hamburger";
|
|
@@ -251,6 +251,17 @@ export class DuetHeader {
|
|
|
251
251
|
this.contactItems = undefined;
|
|
252
252
|
this.languageItems = undefined;
|
|
253
253
|
}
|
|
254
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
255
|
+
if (newValue !== oldValue && this.accessibleLabel === this.accessibleLabelDefaults[oldValue]) {
|
|
256
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults, newValue);
|
|
257
|
+
}
|
|
258
|
+
if (newValue !== oldValue && this.accessibleI18nLabels === this.accessibleI18nLabelsDefaults[oldValue]) {
|
|
259
|
+
this.accessibleI18nLabels = getLocaleString(this.accessibleI18nLabelsDefaults, newValue);
|
|
260
|
+
}
|
|
261
|
+
if (newValue !== oldValue && this.accessibleLabelExternal === this.accessibleLabelExternalDefaults[oldValue]) {
|
|
262
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, newValue);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
254
265
|
/**
|
|
255
266
|
* Component lifecycle events.
|
|
256
267
|
*/
|
|
@@ -267,6 +278,7 @@ export class DuetHeader {
|
|
|
267
278
|
this.boundMqlFunctions[i] = bound;
|
|
268
279
|
}
|
|
269
280
|
}
|
|
281
|
+
connectLanguageChangeObserver(this);
|
|
270
282
|
}
|
|
271
283
|
disconnectedCallback() {
|
|
272
284
|
if (this.navigationEl) {
|
|
@@ -279,6 +291,7 @@ export class DuetHeader {
|
|
|
279
291
|
}
|
|
280
292
|
}
|
|
281
293
|
this.boundMqlFunctions = [];
|
|
294
|
+
disconnectLanguageChangeObserver(this);
|
|
282
295
|
}
|
|
283
296
|
/**
|
|
284
297
|
* Component event handling.
|
|
@@ -614,7 +627,7 @@ export class DuetHeader {
|
|
|
614
627
|
},
|
|
615
628
|
"accessibleI18nLabels": {
|
|
616
629
|
"type": "unknown",
|
|
617
|
-
"mutable":
|
|
630
|
+
"mutable": true,
|
|
618
631
|
"complexType": {
|
|
619
632
|
"original": "I18nText",
|
|
620
633
|
"resolved": "I18nText",
|
|
@@ -664,7 +677,7 @@ export class DuetHeader {
|
|
|
664
677
|
},
|
|
665
678
|
"accessibleLabelExternal": {
|
|
666
679
|
"type": "string",
|
|
667
|
-
"mutable":
|
|
680
|
+
"mutable": true,
|
|
668
681
|
"complexType": {
|
|
669
682
|
"original": "string",
|
|
670
683
|
"resolved": "string",
|
|
@@ -708,7 +721,7 @@ export class DuetHeader {
|
|
|
708
721
|
},
|
|
709
722
|
"accessibleLabel": {
|
|
710
723
|
"type": "string",
|
|
711
|
-
"mutable":
|
|
724
|
+
"mutable": true,
|
|
712
725
|
"complexType": {
|
|
713
726
|
"original": "string",
|
|
714
727
|
"resolved": "string",
|
|
@@ -1271,6 +1284,9 @@ export class DuetHeader {
|
|
|
1271
1284
|
static get elementRef() { return "element"; }
|
|
1272
1285
|
static get watchers() {
|
|
1273
1286
|
return [{
|
|
1287
|
+
"propName": "language",
|
|
1288
|
+
"methodName": "watchLanguageStateHandler"
|
|
1289
|
+
}, {
|
|
1274
1290
|
"propName": "user",
|
|
1275
1291
|
"methodName": "refresh"
|
|
1276
1292
|
}, {
|
|
@@ -468,6 +468,7 @@
|
|
|
468
468
|
}
|
|
469
469
|
@media (min-width: 62em) {
|
|
470
470
|
.duet-hero.duet-hero-product {
|
|
471
|
+
min-height: 375px;
|
|
471
472
|
padding-top: 0;
|
|
472
473
|
}
|
|
473
474
|
.duet-hero.duet-hero-product.duet-hero-narrow {
|
|
@@ -485,6 +486,9 @@
|
|
|
485
486
|
.duet-hero.duet-hero-product .background-area {
|
|
486
487
|
top: -112px;
|
|
487
488
|
}
|
|
489
|
+
.duet-hero.duet-hero-product .background-area.narrow {
|
|
490
|
+
top: 0;
|
|
491
|
+
}
|
|
488
492
|
}
|
|
489
493
|
.duet-hero.duet-hero-product .background-container {
|
|
490
494
|
position: absolute;
|
|
@@ -497,6 +501,9 @@
|
|
|
497
501
|
.duet-hero.duet-hero-product .background-container {
|
|
498
502
|
top: -48px;
|
|
499
503
|
}
|
|
504
|
+
.duet-hero.duet-hero-product .background-container.narrow {
|
|
505
|
+
top: -160px;
|
|
506
|
+
}
|
|
500
507
|
}
|
|
501
508
|
.duet-hero.duet-hero-product .background {
|
|
502
509
|
position: absolute;
|
|
@@ -5,7 +5,7 @@ import newWindowIcon from "@duetds/icons/lib/assets/action-new-window-small";
|
|
|
5
5
|
import { h } from "@stencil/core";
|
|
6
6
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
7
7
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
8
|
-
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
9
9
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
10
10
|
/**
|
|
11
11
|
* @part duet-hero - piercing selector for styling the hero container
|
|
@@ -60,6 +60,11 @@ export class DuetHero {
|
|
|
60
60
|
this.actions = undefined;
|
|
61
61
|
this.layout = "narrow";
|
|
62
62
|
}
|
|
63
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
64
|
+
if (newValue !== oldValue && this.accessibleLabelExternal === this.accessibleLabelExternalDefaults[oldValue]) {
|
|
65
|
+
this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, newValue);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
63
68
|
/**
|
|
64
69
|
* Component lifecycle events.
|
|
65
70
|
*/
|
|
@@ -69,6 +74,12 @@ export class DuetHero {
|
|
|
69
74
|
this.hasSubHeadingSlot = !!this.element.querySelector('[slot="subheading"]');
|
|
70
75
|
this.refresh();
|
|
71
76
|
}
|
|
77
|
+
connectedCallback() {
|
|
78
|
+
connectLanguageChangeObserver(this);
|
|
79
|
+
}
|
|
80
|
+
disconnectedCallback() {
|
|
81
|
+
disconnectLanguageChangeObserver(this);
|
|
82
|
+
}
|
|
72
83
|
/**
|
|
73
84
|
* Local methods.
|
|
74
85
|
*/
|
|
@@ -155,7 +166,7 @@ export class DuetHero {
|
|
|
155
166
|
"duet-hero-text-center": (this.textCenter && !this.leftAlign) || campaignOrSection,
|
|
156
167
|
"duet-hero-left-align": this.leftAlign && !campaignOrSection,
|
|
157
168
|
"duet-hero-narrow": this.layout === "narrow",
|
|
158
|
-
}, part: "duet-hero" }, campaignOrSection && this.image && (h("div", { class: "background-area" }, h("div", { class: "background-container" }, h("div", { class: "background" }, h("img", { src: this.image, alt: "", role: "presentation" })), h("div", { class: "brand-shape" })))), this.variation === "product" && this.image && (h("div", { class: "background-area" }, h("div", { class: "background-container" }, h("div", { class: { background: true, [this.layout]: true } }, h("div", { class: { "background-mask": true, [this.layout]: true } }), this.theme !== "turva" && h("div", { class: { "brand-shape": true, [this.layout]: true } }), h("div", { class: { "brand-shaped-image": true, [this.layout]: true } }, h("div", { class: { "brand-shaped-image-wrapper": true, [this.layout]: true } }, h("div", { class: { "brand-shaped-image-bg": true, [this.layout]: true }, style: styles }))), this.categoryIcon && (h("div", { class: { "brand-shaped-icon": true, [this.layout]: true } }, h("duet-icon", { class: { [this.layout]: true }, background: "none", name: this.categoryIcon, margin: "none", size: "auto", responsive: false }))))))), this.variation === "content" && this.image && (h("div", { class: "background-area" }, h("div", { class: "background" }, h("div", { class: "background-mask" }), this.theme !== "turva" && h("div", { class: "brand-shape" }), h("div", { class: "brand-shaped-image" }, h("div", { class: "brand-shaped-image-wrapper" }, h("div", { class: "brand-shaped-image-bg", style: styles })))))), h("div", { class: { "duet-hero-wrapper": true, [this.layout]: true } }, this.image && this.variation === "image" && (h("div", { class: "duet-hero-image-mask" }, h("div", { class: "duet-hero-image-wrapper" }, h("div", { class: "duet-hero-image", style: styles })))), (this.variation === "gray" || this.variation === "light" || this.variation === "minimal") &&
|
|
169
|
+
}, part: "duet-hero" }, campaignOrSection && this.image && (h("div", { class: "background-area" }, h("div", { class: "background-container" }, h("div", { class: "background" }, h("img", { src: this.image, alt: "", role: "presentation" })), h("div", { class: "brand-shape" })))), this.variation === "product" && this.image && (h("div", { class: { "background-area": true, [this.layout]: true } }, h("div", { class: { "background-container": true, [this.layout]: true } }, h("div", { class: { background: true, [this.layout]: true } }, h("div", { class: { "background-mask": true, [this.layout]: true } }), this.theme !== "turva" && h("div", { class: { "brand-shape": true, [this.layout]: true } }), h("div", { class: { "brand-shaped-image": true, [this.layout]: true } }, h("div", { class: { "brand-shaped-image-wrapper": true, [this.layout]: true } }, h("div", { class: { "brand-shaped-image-bg": true, [this.layout]: true }, style: styles }))), this.categoryIcon && (h("div", { class: { "brand-shaped-icon": true, [this.layout]: true } }, h("duet-icon", { class: { [this.layout]: true }, background: "none", name: this.categoryIcon, margin: "none", size: "auto", responsive: false }))))))), this.variation === "content" && this.image && (h("div", { class: "background-area" }, h("div", { class: "background" }, h("div", { class: "background-mask" }), this.theme !== "turva" && h("div", { class: "brand-shape" }), h("div", { class: "brand-shaped-image" }, h("div", { class: "brand-shaped-image-wrapper" }, h("div", { class: "brand-shaped-image-bg", style: styles })))))), h("div", { class: { "duet-hero-wrapper": true, [this.layout]: true } }, this.image && this.variation === "image" && (h("div", { class: "duet-hero-image-mask" }, h("div", { class: "duet-hero-image-wrapper" }, h("div", { class: "duet-hero-image", style: styles })))), (this.variation === "gray" || this.variation === "light" || this.variation === "minimal") &&
|
|
159
170
|
this.processedBack && (h("div", { class: "duet-hero-back" }, h("duet-button", { style: buttonStyles, variation: "plain", icon: "action-arrow-left-small", theme: this.theme, iconSize: "small", color: buttonColor, padding: "none", margin: "none", fixed: true, url: this.processedBack.href, identifier: this.processedBack.id, onClick: event => this.handleClick(event, {
|
|
160
171
|
label: this.processedBack.label,
|
|
161
172
|
href: this.processedBack.href,
|
|
@@ -492,7 +503,7 @@ export class DuetHero {
|
|
|
492
503
|
},
|
|
493
504
|
"accessibleLabelExternal": {
|
|
494
505
|
"type": "string",
|
|
495
|
-
"mutable":
|
|
506
|
+
"mutable": true,
|
|
496
507
|
"complexType": {
|
|
497
508
|
"original": "string",
|
|
498
509
|
"resolved": "string",
|
|
@@ -768,6 +779,9 @@ export class DuetHero {
|
|
|
768
779
|
static get elementRef() { return "element"; }
|
|
769
780
|
static get watchers() {
|
|
770
781
|
return [{
|
|
782
|
+
"propName": "language",
|
|
783
|
+
"methodName": "watchLanguageStateHandler"
|
|
784
|
+
}, {
|
|
771
785
|
"propName": "back",
|
|
772
786
|
"methodName": "refresh"
|
|
773
787
|
}, {
|
|
@@ -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 { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isEnterKey, isEscapeKey, isTabKey, } from "../../utils/keyboard-utils";
|
|
8
|
-
import {
|
|
8
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, } from "../../utils/language-utils";
|
|
9
9
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
10
10
|
function toggleInArray(arr, item) {
|
|
11
11
|
return arr.includes(item) ? arr.filter(i => i !== item) : [...arr, item];
|
|
@@ -97,6 +97,7 @@ export class DuetMultiselect {
|
|
|
97
97
|
this.processedItems = [];
|
|
98
98
|
this.checkboxesVisible = false;
|
|
99
99
|
this.activeDescendant = "";
|
|
100
|
+
this.language = getLanguage();
|
|
100
101
|
this.margin = "auto";
|
|
101
102
|
this.error = "";
|
|
102
103
|
this.expand = false;
|
|
@@ -126,6 +127,12 @@ export class DuetMultiselect {
|
|
|
126
127
|
this.isCaptionVisible = !!this.caption;
|
|
127
128
|
this.refresh();
|
|
128
129
|
}
|
|
130
|
+
connectedCallback() {
|
|
131
|
+
connectLanguageChangeObserver(this);
|
|
132
|
+
}
|
|
133
|
+
disconnectedCallback() {
|
|
134
|
+
disconnectLanguageChangeObserver(this);
|
|
135
|
+
}
|
|
129
136
|
/**
|
|
130
137
|
* Sets focus on the specified `duet-multiselect`. Use this method instead of the global
|
|
131
138
|
* `multiselect.focus()`.
|
|
@@ -146,7 +153,6 @@ export class DuetMultiselect {
|
|
|
146
153
|
* Always the last one in the class.
|
|
147
154
|
*/
|
|
148
155
|
render() {
|
|
149
|
-
const selectedTranslation = getLocaleString(this.selectedLangObject);
|
|
150
156
|
return (h(Host, { class: {
|
|
151
157
|
"duet-m-0": this.margin === "none",
|
|
152
158
|
"duet-expand": this.expand,
|
|
@@ -156,7 +162,7 @@ export class DuetMultiselect {
|
|
|
156
162
|
"duet-theme-turva": this.theme === "turva",
|
|
157
163
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
158
164
|
"has-error": !!this.error,
|
|
159
|
-
}, onKeyDown: (e) => this.onMultiselectKeyDown(e) }, h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: this.identifier }, this.label), this.tooltip && (h("duet-tooltip", { class: "duet-multiselect-tooltip", direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h("div", { class: "duet-multiselect-wrapper" }, h("button", { id: this.identifier, ref: el => (this.multiselectElement = el), class: { "duet-multiselect": true, "duet-multiselect-active": this.checkboxesVisible }, tabindex: "0", onClick: () => this.toggleCheckboxes(), onFocus: e => this.onFocus(e), onBlur: e => this.onBlur(e), role: "combobox", "aria-expanded": this.checkboxesVisible ? "true" : "false", "aria-haspopup": "listbox", "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-owns": `${this.identifier}-checkboxes`, onKeyDown: (e) => this.onMultiselectInputKeyDown(e), disabled: this.disabled }, h("span", { role: "textbox", "aria-readonly": "true", "aria-multiline": "false", "aria-autocomplete": "none", "aria-controls": `${this.identifier}-checkboxes` }, this.placeholder), this.value && this.value.length > 0 && (h("duet-badge", { class: "duet-multiselect-badge", margin: "none", theme: this.theme }, this.value.length, " ",
|
|
165
|
+
}, onKeyDown: (e) => this.onMultiselectKeyDown(e) }, h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: this.identifier }, this.label), this.tooltip && (h("duet-tooltip", { class: "duet-multiselect-tooltip", direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h("div", { class: "duet-multiselect-wrapper" }, h("button", { id: this.identifier, ref: el => (this.multiselectElement = el), class: { "duet-multiselect": true, "duet-multiselect-active": this.checkboxesVisible }, tabindex: "0", onClick: () => this.toggleCheckboxes(), onFocus: e => this.onFocus(e), onBlur: e => this.onBlur(e), role: "combobox", "aria-expanded": this.checkboxesVisible ? "true" : "false", "aria-haspopup": "listbox", "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-owns": `${this.identifier}-checkboxes`, onKeyDown: (e) => this.onMultiselectInputKeyDown(e), disabled: this.disabled }, h("span", { role: "textbox", "aria-readonly": "true", "aria-multiline": "false", "aria-autocomplete": "none", "aria-controls": `${this.identifier}-checkboxes` }, this.placeholder), this.value && this.value.length > 0 && (h("duet-badge", { class: "duet-multiselect-badge", margin: "none", theme: this.theme }, this.value.length, " ", this.selectedLangObject[this.language], h("duet-visually-hidden", null, ", ", this.value.map(item => item.label).join(", ")))), h("svg", { role: "img", class: { "duet-multiselect-icon": true, "duet-multiselect-icon--rotate": this.checkboxesVisible }, fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" }))), h("div", { id: `${this.identifier}-checkboxes`, role: "listbox", class: {
|
|
160
166
|
"duet-multiselect-checkboxes": true,
|
|
161
167
|
"duet-multiselect-checkboxes-active": this.checkboxesVisible,
|
|
162
168
|
}, "aria-activedescendant": this.activeDescendant, "aria-multiselectable": "true" }, this.processedItems &&
|
|
@@ -458,7 +464,8 @@ export class DuetMultiselect {
|
|
|
458
464
|
return {
|
|
459
465
|
"processedItems": {},
|
|
460
466
|
"checkboxesVisible": {},
|
|
461
|
-
"activeDescendant": {}
|
|
467
|
+
"activeDescendant": {},
|
|
468
|
+
"language": {}
|
|
462
469
|
};
|
|
463
470
|
}
|
|
464
471
|
static get events() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
|
-
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
6
|
+
import { connectLanguageChangeObserver, disconnectLanguageChangeObserver, getLanguage, getLocaleString, } from "../../utils/language-utils";
|
|
7
7
|
export class DuetNotification {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.language = getLanguage();
|
|
@@ -19,12 +19,23 @@ export class DuetNotification {
|
|
|
19
19
|
this.external = false;
|
|
20
20
|
this.theme = "";
|
|
21
21
|
}
|
|
22
|
+
watchLanguageStateHandler(newValue, oldValue) {
|
|
23
|
+
if (newValue !== oldValue && this.accessibleLabelUnread === this.accessibleLabelUnreadDefaults[oldValue]) {
|
|
24
|
+
this.accessibleLabelUnread = getLocaleString(this.accessibleLabelUnreadDefaults, newValue);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
22
27
|
/**
|
|
23
28
|
* Component lifecycle events.
|
|
24
29
|
*/
|
|
25
30
|
componentWillLoad() {
|
|
26
31
|
inheritGlobalTheme(this);
|
|
27
32
|
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
connectLanguageChangeObserver(this);
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
disconnectLanguageChangeObserver(this);
|
|
38
|
+
}
|
|
28
39
|
/**
|
|
29
40
|
* Move focus to the notification's link element.
|
|
30
41
|
* Use this method instead of the native `focus()` method.
|
|
@@ -56,7 +67,7 @@ export class DuetNotification {
|
|
|
56
67
|
return {
|
|
57
68
|
"language": {
|
|
58
69
|
"type": "string",
|
|
59
|
-
"mutable":
|
|
70
|
+
"mutable": true,
|
|
60
71
|
"complexType": {
|
|
61
72
|
"original": "DuetLanguage",
|
|
62
73
|
"resolved": "\"en\" | \"fi\" | \"sv\"",
|
|
@@ -80,7 +91,7 @@ export class DuetNotification {
|
|
|
80
91
|
"text": "The currently active language.\nUsed for announcing unread notifications to screen readers."
|
|
81
92
|
},
|
|
82
93
|
"attribute": "language",
|
|
83
|
-
"reflect":
|
|
94
|
+
"reflect": true,
|
|
84
95
|
"defaultValue": "getLanguage()"
|
|
85
96
|
},
|
|
86
97
|
"accessibleLabelUnreadDefaults": {
|
|
@@ -106,7 +117,7 @@ export class DuetNotification {
|
|
|
106
117
|
},
|
|
107
118
|
"accessibleLabelUnread": {
|
|
108
119
|
"type": "string",
|
|
109
|
-
"mutable":
|
|
120
|
+
"mutable": true,
|
|
110
121
|
"complexType": {
|
|
111
122
|
"original": "string",
|
|
112
123
|
"resolved": "string",
|
|
@@ -123,7 +134,7 @@ export class DuetNotification {
|
|
|
123
134
|
},
|
|
124
135
|
"attribute": "accessible-label-unread",
|
|
125
136
|
"reflect": false,
|
|
126
|
-
"defaultValue": "getLocaleString(this.accessibleLabelUnreadDefaults
|
|
137
|
+
"defaultValue": "getLocaleString(\n this.accessibleLabelUnreadDefaults,\n this.language\n )"
|
|
127
138
|
},
|
|
128
139
|
"url": {
|
|
129
140
|
"type": "string",
|
|
@@ -255,4 +266,10 @@ export class DuetNotification {
|
|
|
255
266
|
};
|
|
256
267
|
}
|
|
257
268
|
static get elementRef() { return "element"; }
|
|
269
|
+
static get watchers() {
|
|
270
|
+
return [{
|
|
271
|
+
"propName": "language",
|
|
272
|
+
"methodName": "watchLanguageStateHandler"
|
|
273
|
+
}];
|
|
274
|
+
}
|
|
258
275
|
}
|