@duetds/components 5.1.3 → 5.1.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 +93 -9
- package/lib/cjs/action-arrow-right-small-a25eb475.js +8 -0
- package/lib/cjs/duet-action-button.cjs.entry.js +3 -3
- 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 +3 -4
- package/lib/cjs/duet-button_2.cjs.entry.js +5 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
- package/lib/cjs/duet-combobox.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 +2 -2
- 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 +23 -4
- package/lib/cjs/duet-grid_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +3 -3
- package/lib/cjs/duet-input_2.cjs.entry.js +56 -4
- 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-modal.cjs.entry.js +2 -2
- 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-pagination_2.cjs.entry.js +1 -1
- 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 +2 -2
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.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-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +2 -2
- 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-85b1fb81.js → focus-utils-9ac6d246.js} +1 -1
- package/lib/cjs/{index-a29ba279.js → index-c417c983.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{token-utils-f402e205.js → token-utils-d1f8069b.js} +1 -1
- package/lib/cjs/{tokens-8596cece.js → tokens-29450bcb.js} +3 -0
- package/lib/cjs/{tokens.module-6b2df1c2.js → tokens.module-ef598645.js} +2 -0
- package/lib/collection/components/duet-button/duet-button.css +48 -16
- package/lib/collection/components/duet-button/duet-button.js +2 -1
- package/lib/collection/components/duet-footer/duet-footer.css +154 -0
- package/lib/collection/components/duet-footer/duet-footer.js +135 -5
- package/lib/collection/components/duet-input/duet-input.css +49 -0
- package/lib/collection/components/duet-input/duet-input.js +132 -3
- package/lib/collection/components/duet-step/duet-step.js +1 -1
- package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
- package/lib/custom-elements-bundle/index.js +84 -12
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-18e17e10.entry.js → p-0356ed8e.entry.js} +1 -1
- package/lib/duet/{p-6910ace8.system.entry.js → p-078fcf7c.system.entry.js} +1 -1
- package/lib/duet/{p-8d4c33ed.system.entry.js → p-0e2e056f.system.entry.js} +1 -1
- package/lib/duet/p-1862208a.system.entry.js +4 -0
- package/lib/duet/p-18cc5627.system.js +4 -0
- package/lib/duet/{p-a056cc14.system.entry.js → p-18d04f2e.system.entry.js} +1 -1
- package/lib/duet/{p-e530ae17.entry.js → p-1e5f2840.entry.js} +1 -1
- package/lib/duet/p-2000ef23.entry.js +4 -0
- package/lib/duet/{p-28e6da82.system.entry.js → p-20c86cc5.system.entry.js} +1 -1
- package/lib/duet/{p-3e1145b2.entry.js → p-212f7cf5.entry.js} +1 -1
- package/lib/duet/{p-b7420414.entry.js → p-24c8d0df.entry.js} +1 -1
- package/lib/duet/{p-21d7cb5d.system.entry.js → p-24f41cb3.system.entry.js} +1 -1
- package/lib/duet/{p-0304408d.system.entry.js → p-29b73b1b.system.entry.js} +1 -1
- package/lib/duet/{p-1c67e70d.system.entry.js → p-2aeb9bd2.system.entry.js} +1 -1
- package/lib/duet/{p-632e25d1.system.entry.js → p-2e959285.system.entry.js} +1 -1
- package/lib/duet/{p-cd07c340.entry.js → p-2fd66459.entry.js} +1 -1
- package/lib/duet/{p-7dec1cfd.entry.js → p-30371492.entry.js} +1 -1
- package/lib/duet/{p-7ce6ba93.system.entry.js → p-32774c23.system.entry.js} +1 -1
- package/lib/duet/{p-c435f7e8.entry.js → p-3474c348.entry.js} +1 -1
- package/lib/duet/p-37217e63.entry.js +4 -0
- package/lib/duet/{p-4268681b.entry.js → p-37a36786.entry.js} +1 -1
- package/lib/duet/{p-b9d3eeb1.system.entry.js → p-3956c0b8.system.entry.js} +1 -1
- package/lib/duet/{p-ad07f399.js → p-398a79a0.js} +1 -1
- package/lib/duet/{p-28e309f1.entry.js → p-3f4ea241.entry.js} +1 -1
- package/lib/duet/{p-7888e2d8.entry.js → p-41e4f10e.entry.js} +1 -1
- package/lib/duet/{p-62cc6d2a.entry.js → p-445d538d.entry.js} +1 -1
- package/lib/duet/{p-f42c4e0f.system.entry.js → p-460e6137.system.entry.js} +1 -1
- package/lib/duet/{p-53849160.entry.js → p-47053a5e.entry.js} +1 -1
- package/lib/duet/{p-e4d54f1e.system.entry.js → p-472da63a.system.entry.js} +1 -1
- package/lib/duet/{p-a6b6a918.system.entry.js → p-4a1a4d2d.system.entry.js} +1 -1
- package/lib/duet/{p-5e591b97.entry.js → p-4ae75bd5.entry.js} +1 -1
- package/lib/duet/{p-d460ac7d.entry.js → p-4bbd7a9c.entry.js} +1 -1
- package/lib/duet/{p-995ecd9d.system.entry.js → p-4c74be13.system.entry.js} +1 -1
- package/lib/duet/{p-456f44e9.system.entry.js → p-4cab1ba4.system.entry.js} +1 -1
- package/lib/duet/{p-f8dd1339.entry.js → p-4d95a973.entry.js} +1 -1
- package/lib/duet/{p-ff5ddd90.system.entry.js → p-4dace9be.system.entry.js} +1 -1
- package/lib/duet/{p-8ee6f874.system.entry.js → p-4df9144d.system.entry.js} +1 -1
- package/lib/duet/p-50363944.js +4 -0
- package/lib/duet/{p-57f58be7.entry.js → p-553366aa.entry.js} +1 -1
- package/lib/duet/p-5ff75ab0.entry.js +4 -0
- package/lib/duet/{p-94dc3e07.system.entry.js → p-6144a827.system.entry.js} +1 -1
- package/lib/duet/{p-48307b31.entry.js → p-6440fa65.entry.js} +1 -1
- package/lib/duet/p-64611b86.entry.js +4 -0
- package/lib/duet/{p-83be3810.entry.js → p-71d151e6.entry.js} +1 -1
- package/lib/duet/{p-c5c212fd.entry.js → p-7212c87c.entry.js} +1 -1
- package/lib/duet/{p-0e6dd740.entry.js → p-78ccd8fa.entry.js} +1 -1
- package/lib/duet/{p-b683fec1.system.entry.js → p-78d2dfc8.system.entry.js} +1 -1
- package/lib/duet/p-7af28ef6.entry.js +4 -0
- package/lib/duet/p-7cbb6eba.js +4 -0
- package/lib/duet/{p-ad4570bf.system.entry.js → p-81ccf6d6.system.entry.js} +1 -1
- package/lib/duet/{p-7e17fd75.system.entry.js → p-85e8d34e.system.entry.js} +1 -1
- package/lib/duet/{p-7df54c59.entry.js → p-87900286.entry.js} +1 -1
- package/lib/duet/p-89042509.system.entry.js +4 -0
- package/lib/duet/{p-28feed35.system.entry.js → p-8a684ac7.system.entry.js} +1 -1
- package/lib/duet/{p-c06452b7.system.entry.js → p-8fa8bdab.system.entry.js} +1 -1
- package/lib/duet/{p-955b90c3.system.entry.js → p-9903055f.system.entry.js} +1 -1
- package/lib/duet/{p-bc8c3ace.system.js → p-99187a3a.system.js} +1 -1
- package/lib/duet/{p-aaed5ea2.entry.js → p-9bf95a5d.entry.js} +1 -1
- package/lib/duet/{p-f0f60ea3.entry.js → p-9c9947a8.entry.js} +1 -1
- package/lib/duet/{p-2c31428e.system.entry.js → p-9ce054f9.system.entry.js} +1 -1
- package/lib/duet/{p-dea3d7f9.system.entry.js → p-9d681426.system.entry.js} +1 -1
- package/lib/duet/{p-4e2532c7.system.js → p-9eaccbf3.system.js} +1 -1
- package/lib/duet/{p-5a434b4e.system.entry.js → p-9f3c3af5.system.entry.js} +1 -1
- package/lib/duet/p-a93a04b9.system.js +4 -0
- package/lib/duet/{p-a3857cd4.system.entry.js → p-a980e270.system.entry.js} +1 -1
- package/lib/duet/{p-3bf4c99a.entry.js → p-ab84084f.entry.js} +1 -1
- package/lib/duet/{p-2b250ac6.system.entry.js → p-b1039960.system.entry.js} +1 -1
- package/lib/duet/{p-3f65158e.entry.js → p-b1375931.entry.js} +1 -1
- package/lib/duet/p-b2dfc5bd.system.entry.js +4 -0
- package/lib/duet/{p-5969399b.system.entry.js → p-b49f89cf.system.entry.js} +1 -1
- package/lib/duet/{p-8e0bad03.entry.js → p-b6e0ea1d.entry.js} +1 -1
- package/lib/duet/{p-ac1e6f4b.system.js → p-b78ab2f5.system.js} +1 -1
- package/lib/duet/{p-acdd49f6.entry.js → p-b7e592bf.entry.js} +1 -1
- package/lib/duet/p-b8e8a024.entry.js +4 -0
- package/lib/duet/p-bd8c5946.entry.js +4 -0
- package/lib/duet/{p-28b24806.system.entry.js → p-be6e164e.system.entry.js} +1 -1
- package/lib/duet/{p-b6cbe383.entry.js → p-bf95adc2.entry.js} +1 -1
- package/lib/duet/p-d1746325.js +4 -0
- package/lib/duet/{p-ffbe9ffc.entry.js → p-d4d7c619.entry.js} +1 -1
- package/lib/duet/{p-ca79fa1a.js → p-e0e35d41.js} +1 -1
- package/lib/duet/p-e15afaf5.system.entry.js +4 -0
- package/lib/duet/p-e2074848.system.js +4 -0
- package/lib/duet/{p-adb092e7.entry.js → p-e6aa9737.entry.js} +1 -1
- package/lib/duet/{p-f4664942.system.entry.js → p-e6eb55cf.system.entry.js} +2 -2
- package/lib/duet/{p-b9120f45.system.entry.js → p-e7f60c95.system.entry.js} +1 -1
- package/lib/duet/{p-20814483.entry.js → p-e8340671.entry.js} +1 -1
- package/lib/duet/{p-cb445018.js → p-e918a990.js} +1 -1
- package/lib/duet/{p-cfe414d2.system.entry.js → p-ec06dc8c.system.entry.js} +1 -1
- package/lib/duet/{p-f2ad1371.entry.js → p-ec1797d8.entry.js} +1 -1
- package/lib/duet/{p-3e4a5b9c.entry.js → p-ecf2860f.entry.js} +1 -1
- package/lib/duet/{p-c2ad83a9.entry.js → p-efeac1a1.entry.js} +1 -1
- package/lib/duet/{p-bd122a6e.system.entry.js → p-f2f17151.system.entry.js} +1 -1
- package/lib/duet/p-f476cb84.system.js +4 -0
- package/lib/duet/{p-712c9016.system.entry.js → p-f4943cc5.system.entry.js} +1 -1
- package/lib/duet/{p-9318e1c2.system.entry.js → p-f597ccbb.system.entry.js} +1 -1
- package/lib/duet/{p-497750f2.entry.js → p-f650fa99.entry.js} +1 -1
- package/lib/duet/{p-ebd9782a.system.entry.js → p-f8b1afeb.system.entry.js} +1 -1
- package/lib/esm/action-arrow-right-small-f9d2ba83.js +6 -0
- package/lib/esm/duet-action-button.entry.js +3 -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 +2 -3
- package/lib/esm/duet-button_2.entry.js +5 -4
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -2
- package/lib/esm/duet-collapsible.entry.js +2 -2
- package/lib/esm/duet-combobox.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 +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 +23 -4
- package/lib/esm/duet-grid_2.entry.js +2 -2
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +3 -3
- package/lib/esm/duet-input_2.entry.js +56 -4
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +1 -1
- 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 +2 -2
- package/lib/esm/duet-scrollable_3.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-step_2.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-tooltip.entry.js +1 -1
- 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 +2 -2
- package/lib/esm/{focus-utils-429ccac4.js → focus-utils-bcb5b759.js} +1 -1
- package/lib/esm/{index-089c3eed.js → index-7dc1fa94.js} +1 -1
- package/lib/esm/loader.js +2 -2
- package/lib/esm/{token-utils-e9a69acf.js → token-utils-f3b5f7a8.js} +1 -1
- package/lib/esm/{tokens-e110dc89.js → tokens-8ff8c570.js} +3 -0
- package/lib/esm/{tokens.module-49cbf963.js → tokens.module-f4572ed7.js} +2 -0
- package/lib/esm-es5/action-arrow-right-small-f9d2ba83.js +4 -0
- 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 +2 -2
- package/lib/esm-es5/duet-button_2.entry.js +2 -2
- 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-choice_2.entry.js +1 -1
- 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-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 +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +2 -2
- 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-modal.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-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-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +2 -2
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.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-bcb5b759.js +4 -0
- package/lib/esm-es5/{index-089c3eed.js → index-7dc1fa94.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{token-utils-e9a69acf.js → token-utils-f3b5f7a8.js} +1 -1
- package/lib/esm-es5/tokens-8ff8c570.js +4 -0
- package/lib/esm-es5/{tokens.module-49cbf963.js → tokens.module-f4572ed7.js} +1 -1
- package/lib/html.html-data.json +42 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-footer/duet-footer.d.ts +30 -1
- package/lib/types/components/duet-input/duet-input.d.ts +23 -0
- package/lib/types/components.d.ts +57 -1
- package/package.json +5 -5
- package/lib/duet/p-021f4ce6.entry.js +0 -4
- package/lib/duet/p-165aeec8.system.entry.js +0 -4
- package/lib/duet/p-27189fa0.entry.js +0 -4
- package/lib/duet/p-4cb2c888.entry.js +0 -4
- package/lib/duet/p-52b6d127.entry.js +0 -4
- package/lib/duet/p-694ebf05.entry.js +0 -4
- package/lib/duet/p-80e16593.entry.js +0 -4
- package/lib/duet/p-8143f3de.js +0 -4
- package/lib/duet/p-86777eb7.system.js +0 -4
- package/lib/duet/p-93f9ccbc.system.entry.js +0 -4
- package/lib/duet/p-94def463.entry.js +0 -4
- package/lib/duet/p-b2d00c4b.system.entry.js +0 -4
- package/lib/duet/p-b48323e2.system.entry.js +0 -4
- package/lib/duet/p-bd322f8f.js +0 -4
- package/lib/duet/p-ddb6344c.system.js +0 -4
- package/lib/duet/p-fa99eaa4.system.js +0 -4
- package/lib/esm-es5/focus-utils-429ccac4.js +0 -4
- package/lib/esm-es5/tokens-e110dc89.js +0 -4
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
+
import arrowDownSmallIcon from "@duetds/icons/lib/assets/action-arrow-down-small";
|
|
4
5
|
import arrowRightIcon from "@duetds/icons/lib/assets/action-arrow-right";
|
|
6
|
+
import arrowRightSmallIcon from "@duetds/icons/lib/assets/action-arrow-right-small";
|
|
5
7
|
import newWindowIcon from "@duetds/icons/lib/assets/action-new-window";
|
|
6
8
|
import newWindowIconSmall from "@duetds/icons/lib/assets/action-new-window-small";
|
|
7
9
|
import { Component, Element, Event, Fragment, h, Prop, State, Watch } from "@stencil/core";
|
|
@@ -14,12 +16,18 @@ const i18n = {
|
|
|
14
16
|
sv: { lahi: "© LokalTapiola", turva: "© Turva" },
|
|
15
17
|
en: { lahi: "© LocalTapiola", turva: "© Turva" },
|
|
16
18
|
};
|
|
19
|
+
const i18nMultilevel = {
|
|
20
|
+
fi: { lahi: "© LähiTapiola", turva: "© Keskinäinen Vakuutusyhtiö Turva" },
|
|
21
|
+
sv: { lahi: "© LokalTapiola", turva: "© Keskinäinen Vakuutusyhtiö Turva" },
|
|
22
|
+
en: { lahi: "© LocalTapiola", turva: "© Keskinäinen Vakuutusyhtiö Turva" },
|
|
23
|
+
};
|
|
17
24
|
const createEvent = (ev, data) => ({
|
|
18
25
|
component: "duet-footer",
|
|
19
26
|
data,
|
|
20
27
|
originalEvent: ev,
|
|
21
28
|
});
|
|
22
29
|
/**
|
|
30
|
+
* @slot extra - A slot for extra links.
|
|
23
31
|
* @part top - piercing selector for styling the top part of the footer
|
|
24
32
|
* @part menu - piercing selector for styling the menu section of the footer
|
|
25
33
|
*/
|
|
@@ -29,7 +37,11 @@ export class DuetFooter {
|
|
|
29
37
|
* State() variables
|
|
30
38
|
* Inlined decorator, alphabetical order.
|
|
31
39
|
*/
|
|
40
|
+
this.processedMainItem = null;
|
|
32
41
|
this.processedItems = null;
|
|
42
|
+
this.processedSecondaryItems = null;
|
|
43
|
+
this.processedTertiaryMainItem = null;
|
|
44
|
+
this.processedTertiaryItems = null;
|
|
33
45
|
this.processedMenu = null;
|
|
34
46
|
/**
|
|
35
47
|
* Theme of the navigation.
|
|
@@ -104,7 +116,11 @@ export class DuetFooter {
|
|
|
104
116
|
* Local methods
|
|
105
117
|
*/
|
|
106
118
|
async refresh() {
|
|
119
|
+
this.processedMainItem = parsePossibleJSON(this.mainItem);
|
|
107
120
|
this.processedItems = parsePossibleJSON(this.items);
|
|
121
|
+
this.processedSecondaryItems = parsePossibleJSON(this.secondaryItems);
|
|
122
|
+
this.processedTertiaryMainItem = parsePossibleJSON(this.tertiaryMainItem);
|
|
123
|
+
this.processedTertiaryItems = parsePossibleJSON(this.tertiaryItems);
|
|
108
124
|
this.processedMenu = parsePossibleJSON(this.menu);
|
|
109
125
|
}
|
|
110
126
|
/**
|
|
@@ -112,19 +128,21 @@ export class DuetFooter {
|
|
|
112
128
|
* Always the last one in the class.
|
|
113
129
|
*/
|
|
114
130
|
render() {
|
|
115
|
-
const text = getLocaleString(i18n);
|
|
131
|
+
const text = this.variation === "multilevel" ? getLocaleString(i18nMultilevel) : getLocaleString(i18n);
|
|
116
132
|
const copyrightLabel = this.theme === "turva" ? text.turva : text.lahi;
|
|
117
133
|
return (h("footer", { class: {
|
|
118
134
|
"duet-footer": true,
|
|
119
135
|
"duet-m-0": this.margin === "none",
|
|
120
136
|
"duet-theme-turva": this.theme === "turva",
|
|
121
137
|
"duet-footer-simple": this.variation === "simple",
|
|
138
|
+
"duet-footer-multilevel": this.variation === "multilevel",
|
|
122
139
|
} },
|
|
123
140
|
h("div", { class: "duet-footer-wrapper" },
|
|
124
141
|
h("div", { class: "duet-footer-top", part: "top" },
|
|
125
142
|
this.variation !== "simple" && (h("duet-logo", { href: this.logoHref, onClick: this.handleLogoClick, size: "large", inverse: true, language: this.language, theme: this.theme })),
|
|
126
143
|
this.processedItems &&
|
|
127
144
|
this.variation !== "simple" &&
|
|
145
|
+
this.variation !== "multilevel" &&
|
|
128
146
|
this.processedItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
129
147
|
h("div", { class: "duet-footer-icon" },
|
|
130
148
|
h("duet-icon", { size: "medium", margin: "none", name: item.icon, color: "currentColor" })),
|
|
@@ -132,11 +150,50 @@ export class DuetFooter {
|
|
|
132
150
|
item.external && h("duet-visually-hidden", null,
|
|
133
151
|
", ",
|
|
134
152
|
this.accessibleLabelExternal),
|
|
135
|
-
h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: arrowRightIcon.svg, size: "auto", margin: "none", color: "currentColor" }))))))
|
|
153
|
+
h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: arrowRightIcon.svg, size: "auto", margin: "none", color: "currentColor" })))))),
|
|
154
|
+
this.processedItems && this.variation === "multilevel" && (h("div", { class: "multilevel" },
|
|
155
|
+
h("div", { class: "multilevel-left" },
|
|
156
|
+
h("div", { class: "multilevel-main-item" }, this.processedMainItem && (h("a", { class: "duet-footer-link", href: this.processedMainItem.href, id: this.processedMainItem.id, target: this.processedMainItem.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, this.processedMainItem) },
|
|
157
|
+
h("span", null, this.processedMainItem.label),
|
|
158
|
+
this.processedMainItem.external && (h("duet-visually-hidden", null,
|
|
159
|
+
", ",
|
|
160
|
+
this.accessibleLabelExternal)),
|
|
161
|
+
h("div", { class: "duet-footer-arrow" }, this.processedMainItem.external && (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })))))),
|
|
162
|
+
h("div", { class: "multilevel-primary-items" }, this.processedItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
163
|
+
h("div", { class: "duet-footer-icon" },
|
|
164
|
+
h("duet-icon", { size: "small", margin: "none", name: item.icon, color: "currentColor" })),
|
|
165
|
+
h("span", null, item.label),
|
|
166
|
+
item.external && h("duet-visually-hidden", null,
|
|
167
|
+
", ",
|
|
168
|
+
this.accessibleLabelExternal),
|
|
169
|
+
h("div", { class: "duet-footer-arrow" }, item.external && (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" }))))))),
|
|
170
|
+
h("div", { class: "multilevel-secondary-items" }, this.processedSecondaryItems &&
|
|
171
|
+
this.processedSecondaryItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
172
|
+
h("span", null, item.label),
|
|
173
|
+
item.external && (h("duet-visually-hidden", null,
|
|
174
|
+
", ",
|
|
175
|
+
this.accessibleLabelExternal)),
|
|
176
|
+
h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: arrowRightSmallIcon.svg, size: "auto", margin: "none", color: "currentColor" })))))))),
|
|
177
|
+
h("div", { class: "multilevel-right" },
|
|
178
|
+
this.processedTertiaryMainItem && (h("span", { class: "duet-footer-link tertiary-main-item", id: this.processedTertiaryMainItem.id },
|
|
179
|
+
h("span", null, this.processedTertiaryMainItem.label),
|
|
180
|
+
this.processedTertiaryMainItem.external && (h("duet-visually-hidden", null,
|
|
181
|
+
", ",
|
|
182
|
+
this.accessibleLabelExternal)),
|
|
183
|
+
h("div", { class: "duet-footer-arrow" },
|
|
184
|
+
h("duet-icon", { icon: arrowDownSmallIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })))),
|
|
185
|
+
this.processedTertiaryItems &&
|
|
186
|
+
this.processedTertiaryItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
187
|
+
h("span", null, item.label),
|
|
188
|
+
item.external && h("duet-visually-hidden", null,
|
|
189
|
+
", ",
|
|
190
|
+
this.accessibleLabelExternal),
|
|
191
|
+
h("div", { class: "duet-footer-arrow" }, item.external && (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })))))))))),
|
|
192
|
+
h("slot", { name: "extra" }),
|
|
136
193
|
h("p", { class: "duet-footer-menu", part: "menu" },
|
|
137
194
|
h("span", { class: "duet-footer-copyright" }, `${copyrightLabel} ${new Date().getFullYear()}`),
|
|
138
195
|
this.processedMenu && (h(Fragment, null,
|
|
139
|
-
h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/"),
|
|
196
|
+
this.variation !== "multilevel" && (h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/")),
|
|
140
197
|
this.processedMenu.map(item => (h("a", { href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleMenuClick(event, item) },
|
|
141
198
|
item.label,
|
|
142
199
|
item.external && (h(Fragment, null,
|
|
@@ -145,7 +202,8 @@ export class DuetFooter {
|
|
|
145
202
|
this.accessibleLabelExternal),
|
|
146
203
|
h("div", { class: "duet-footer-external" },
|
|
147
204
|
h("duet-icon", { icon: newWindowIconSmall.svg, size: "xx-small", margin: "none", color: "currentColor" })))),
|
|
148
|
-
h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/")))))))
|
|
205
|
+
h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/"))))))),
|
|
206
|
+
this.variation === "multilevel" && (h("p", { class: "duet-footer-copyright duet-footer-copyright-mobile" }, `${copyrightLabel} ${new Date().getFullYear()}`)))));
|
|
149
207
|
}
|
|
150
208
|
static get is() { return "duet-footer"; }
|
|
151
209
|
static get encapsulation() { return "shadow"; }
|
|
@@ -184,7 +242,7 @@ export class DuetFooter {
|
|
|
184
242
|
"mutable": false,
|
|
185
243
|
"complexType": {
|
|
186
244
|
"original": "DuetFooterVariation",
|
|
187
|
-
"resolved": "\"default\" | \"simple\"",
|
|
245
|
+
"resolved": "\"default\" | \"multilevel\" | \"simple\"",
|
|
188
246
|
"references": {
|
|
189
247
|
"DuetFooterVariation": {
|
|
190
248
|
"location": "local"
|
|
@@ -271,6 +329,23 @@ export class DuetFooter {
|
|
|
271
329
|
"reflect": false,
|
|
272
330
|
"defaultValue": "getLanguage()"
|
|
273
331
|
},
|
|
332
|
+
"mainItem": {
|
|
333
|
+
"type": "any",
|
|
334
|
+
"mutable": false,
|
|
335
|
+
"complexType": {
|
|
336
|
+
"original": "any",
|
|
337
|
+
"resolved": "any",
|
|
338
|
+
"references": {}
|
|
339
|
+
},
|
|
340
|
+
"required": false,
|
|
341
|
+
"optional": false,
|
|
342
|
+
"docs": {
|
|
343
|
+
"tags": [],
|
|
344
|
+
"text": "Main item of footer links. Item have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
345
|
+
},
|
|
346
|
+
"attribute": "main-item",
|
|
347
|
+
"reflect": false
|
|
348
|
+
},
|
|
274
349
|
"items": {
|
|
275
350
|
"type": "any",
|
|
276
351
|
"mutable": false,
|
|
@@ -288,6 +363,57 @@ export class DuetFooter {
|
|
|
288
363
|
"attribute": "items",
|
|
289
364
|
"reflect": false
|
|
290
365
|
},
|
|
366
|
+
"secondaryItems": {
|
|
367
|
+
"type": "any",
|
|
368
|
+
"mutable": false,
|
|
369
|
+
"complexType": {
|
|
370
|
+
"original": "any",
|
|
371
|
+
"resolved": "any",
|
|
372
|
+
"references": {}
|
|
373
|
+
},
|
|
374
|
+
"required": false,
|
|
375
|
+
"optional": false,
|
|
376
|
+
"docs": {
|
|
377
|
+
"tags": [],
|
|
378
|
+
"text": "An array of items for the secondary footer links. Items have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
379
|
+
},
|
|
380
|
+
"attribute": "secondary-items",
|
|
381
|
+
"reflect": false
|
|
382
|
+
},
|
|
383
|
+
"tertiaryMainItem": {
|
|
384
|
+
"type": "any",
|
|
385
|
+
"mutable": false,
|
|
386
|
+
"complexType": {
|
|
387
|
+
"original": "any",
|
|
388
|
+
"resolved": "any",
|
|
389
|
+
"references": {}
|
|
390
|
+
},
|
|
391
|
+
"required": false,
|
|
392
|
+
"optional": false,
|
|
393
|
+
"docs": {
|
|
394
|
+
"tags": [],
|
|
395
|
+
"text": "Main item of tertiary footer links. Item have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
396
|
+
},
|
|
397
|
+
"attribute": "tertiary-main-item",
|
|
398
|
+
"reflect": false
|
|
399
|
+
},
|
|
400
|
+
"tertiaryItems": {
|
|
401
|
+
"type": "any",
|
|
402
|
+
"mutable": false,
|
|
403
|
+
"complexType": {
|
|
404
|
+
"original": "any",
|
|
405
|
+
"resolved": "any",
|
|
406
|
+
"references": {}
|
|
407
|
+
},
|
|
408
|
+
"required": false,
|
|
409
|
+
"optional": false,
|
|
410
|
+
"docs": {
|
|
411
|
+
"tags": [],
|
|
412
|
+
"text": "An array of items for the tertiary footer links. Items have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
413
|
+
},
|
|
414
|
+
"attribute": "tertiary-items",
|
|
415
|
+
"reflect": false
|
|
416
|
+
},
|
|
291
417
|
"accessibleLabelExternalDefaults": {
|
|
292
418
|
"type": "string",
|
|
293
419
|
"mutable": false,
|
|
@@ -354,7 +480,11 @@ export class DuetFooter {
|
|
|
354
480
|
}
|
|
355
481
|
}; }
|
|
356
482
|
static get states() { return {
|
|
483
|
+
"processedMainItem": {},
|
|
357
484
|
"processedItems": {},
|
|
485
|
+
"processedSecondaryItems": {},
|
|
486
|
+
"processedTertiaryMainItem": {},
|
|
487
|
+
"processedTertiaryItems": {},
|
|
358
488
|
"processedMenu": {}
|
|
359
489
|
}; }
|
|
360
490
|
static get events() { return [{
|
|
@@ -100,6 +100,32 @@ duet-caption:not(:last-of-type) {
|
|
|
100
100
|
width: 100%;
|
|
101
101
|
height: 100%;
|
|
102
102
|
}
|
|
103
|
+
.duet-input-container.has-clear .duet-input-clear-icon {
|
|
104
|
+
position: relative;
|
|
105
|
+
z-index: 250;
|
|
106
|
+
}
|
|
107
|
+
.duet-input-container.has-clear .duet-input-clear-icon button {
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: -24px;
|
|
110
|
+
right: 0;
|
|
111
|
+
min-width: 48px;
|
|
112
|
+
min-height: 48px;
|
|
113
|
+
}
|
|
114
|
+
.duet-input-container.has-clear .duet-input-clear-icon button:focus {
|
|
115
|
+
outline: 0;
|
|
116
|
+
box-shadow: 0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3;
|
|
117
|
+
}
|
|
118
|
+
.duet-theme-turva .duet-input-container.has-clear .duet-input-clear-icon button:focus {
|
|
119
|
+
box-shadow: 0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a;
|
|
120
|
+
}
|
|
121
|
+
.duet-input-container.has-clear .duet-input-clear-icon button:active {
|
|
122
|
+
opacity: 0.75;
|
|
123
|
+
transition: none;
|
|
124
|
+
}
|
|
125
|
+
.duet-input-container.has-clear.has-icon .duet-input-clear-icon {
|
|
126
|
+
top: -24px;
|
|
127
|
+
right: 24px;
|
|
128
|
+
}
|
|
103
129
|
|
|
104
130
|
.duet-input {
|
|
105
131
|
position: relative;
|
|
@@ -299,4 +325,27 @@ duet-caption:not(:last-of-type) {
|
|
|
299
325
|
.duet-input-relative {
|
|
300
326
|
position: relative;
|
|
301
327
|
width: 100%;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.duet-input-variation-button {
|
|
331
|
+
position: relative;
|
|
332
|
+
width: 100%;
|
|
333
|
+
}
|
|
334
|
+
.duet-input-variation-button .duet-input-relative {
|
|
335
|
+
display: flex;
|
|
336
|
+
flex-direction: row;
|
|
337
|
+
flex-wrap: nowrap;
|
|
338
|
+
align-content: center;
|
|
339
|
+
align-items: center;
|
|
340
|
+
justify-content: flex-start;
|
|
341
|
+
width: auto;
|
|
342
|
+
}
|
|
343
|
+
.duet-input-variation-button .duet-input-relative duet-button {
|
|
344
|
+
z-index: 250;
|
|
345
|
+
margin-bottom: 0;
|
|
346
|
+
}
|
|
347
|
+
.duet-input-variation-button .duet-input-relative .duet-input {
|
|
348
|
+
border-right-width: 0 !important;
|
|
349
|
+
border-top-right-radius: 0 !important;
|
|
350
|
+
border-bottom-right-radius: 0 !important;
|
|
302
351
|
}
|
|
@@ -6,6 +6,8 @@ import searchIcon from "@duetds/icons/lib/assets/form-search";
|
|
|
6
6
|
import { Component, Element, Event, h, Host, Method, Prop, Watch } from "@stencil/core";
|
|
7
7
|
import { createID } from "../../utils/create-id";
|
|
8
8
|
import { cleanValue, resetCursor } from "../../utils/input-utils";
|
|
9
|
+
import { isEscapeKey } from "../../utils/keyboard-utils";
|
|
10
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
9
11
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
10
12
|
const icons = {
|
|
11
13
|
search: searchIcon,
|
|
@@ -17,11 +19,17 @@ export class DuetInput {
|
|
|
17
19
|
* Own Properties
|
|
18
20
|
*/
|
|
19
21
|
this.inputId = createID("DuetInput");
|
|
22
|
+
this.clearId = createID("DuetInputClear");
|
|
20
23
|
this.labelId = createID("DuetLabel");
|
|
21
24
|
this.topCaptionId = createID("DuetCaptionTop");
|
|
22
25
|
this.topCaptionPlaceholderId = createID("DuetCaptionPlaceholderTop");
|
|
23
26
|
this.errorId = createID("DuetError");
|
|
24
27
|
this.disallowPatternRegex = null;
|
|
28
|
+
this.clearLabel = getLocaleString({
|
|
29
|
+
en: "Clear",
|
|
30
|
+
fi: "Tyhjennä",
|
|
31
|
+
sv: "Rensa",
|
|
32
|
+
});
|
|
25
33
|
/**
|
|
26
34
|
* Indicates the id of a component that describes the input.
|
|
27
35
|
*/
|
|
@@ -35,6 +43,10 @@ export class DuetInput {
|
|
|
35
43
|
* event after each keystroke.
|
|
36
44
|
*/
|
|
37
45
|
this.debounce = 0;
|
|
46
|
+
/**
|
|
47
|
+
* If set, the input field will display a clear button that can be accessed with tabbing.
|
|
48
|
+
*/
|
|
49
|
+
this.clear = false;
|
|
38
50
|
/**
|
|
39
51
|
* If form input field has a placeholder text, and user types anything (causing the placeholder text to disappear),
|
|
40
52
|
* settings this to true will "echo" it into the caption slot - this option will be false by default for the next few versions, but will eventually be true by default (scheduled for 4.30.0)
|
|
@@ -68,6 +80,10 @@ export class DuetInput {
|
|
|
68
80
|
* Type of the input.
|
|
69
81
|
*/
|
|
70
82
|
this.type = "text";
|
|
83
|
+
/**
|
|
84
|
+
* Variation of button.
|
|
85
|
+
*/
|
|
86
|
+
this.variation = "default";
|
|
71
87
|
/**
|
|
72
88
|
* Label for the input.
|
|
73
89
|
*/
|
|
@@ -135,6 +151,13 @@ export class DuetInput {
|
|
|
135
151
|
component: "duet-input",
|
|
136
152
|
});
|
|
137
153
|
};
|
|
154
|
+
this.onClear = (ev) => {
|
|
155
|
+
this.duetFocus.emit({
|
|
156
|
+
originalEvent: ev,
|
|
157
|
+
value: this.value,
|
|
158
|
+
component: "duet-input",
|
|
159
|
+
});
|
|
160
|
+
};
|
|
138
161
|
/** Private functions
|
|
139
162
|
*
|
|
140
163
|
*/
|
|
@@ -154,6 +177,17 @@ export class DuetInput {
|
|
|
154
177
|
}
|
|
155
178
|
return describedBy;
|
|
156
179
|
};
|
|
180
|
+
this.handleClearClick = event => {
|
|
181
|
+
const clearing = this.clearInput();
|
|
182
|
+
this.onClear(event);
|
|
183
|
+
return clearing;
|
|
184
|
+
};
|
|
185
|
+
this.keyHandler = event => {
|
|
186
|
+
if (isEscapeKey(event) && this.clear) {
|
|
187
|
+
this.handleClearClick(event);
|
|
188
|
+
}
|
|
189
|
+
return event;
|
|
190
|
+
};
|
|
157
191
|
}
|
|
158
192
|
disallowedPatternChange() {
|
|
159
193
|
this.disallowPatternRegex = this.disallowPattern ? new RegExp(this.disallowPattern, "g") : null;
|
|
@@ -208,6 +242,16 @@ export class DuetInput {
|
|
|
208
242
|
restoreCursor();
|
|
209
243
|
}
|
|
210
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* Reset the cursor position on the native element
|
|
247
|
+
* `input.resetCursor()`.
|
|
248
|
+
*/
|
|
249
|
+
async clearInput() {
|
|
250
|
+
if (this.nativeInput) {
|
|
251
|
+
this.nativeInput.value = "";
|
|
252
|
+
this.value = "";
|
|
253
|
+
}
|
|
254
|
+
}
|
|
211
255
|
/**
|
|
212
256
|
* render() function
|
|
213
257
|
* Always the last one in the class.
|
|
@@ -225,14 +269,16 @@ export class DuetInput {
|
|
|
225
269
|
else if (!this.pattern && this.type === "tel") {
|
|
226
270
|
inputProps.pattern = "[0-9+ ]+";
|
|
227
271
|
}
|
|
228
|
-
return (h(Host, { class: { "duet-expand": this.expand, "duet-m-0": this.margin === "none" } },
|
|
272
|
+
return (h(Host, { class: { "duet-expand": this.expand, "duet-m-0": this.margin === "none" }, onKeyUp: e => this.keyHandler(e) },
|
|
229
273
|
h("div", { class: {
|
|
230
274
|
"duet-input-container": true,
|
|
231
275
|
"duet-theme-turva": this.theme === "turva",
|
|
276
|
+
[`duet-input-variation-${this.variation}`]: true,
|
|
232
277
|
"duet-label-hidden": this.labelHidden,
|
|
233
278
|
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
234
279
|
"has-icon": !!this.icon || (this.type !== "text" && this.type !== "tel" && this.type !== "password"),
|
|
235
280
|
"has-error": !!this.error,
|
|
281
|
+
"has-clear": this.clear,
|
|
236
282
|
} },
|
|
237
283
|
h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label),
|
|
238
284
|
this.tooltip && (h("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)),
|
|
@@ -245,10 +291,18 @@ export class DuetInput {
|
|
|
245
291
|
"is-number": this.component === "number",
|
|
246
292
|
"is-date": this.component === "date",
|
|
247
293
|
}, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-expanded": this.accessibleExpanded, "aria-haspopup": this.accessibleHasPopup, "aria-owns": this.accessibleOwns, "aria-describedby": this.getDescribedBy(), placeholder: this.placeholder, spellcheck: "false", minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.autoComplete, required: this.required, role: this.role, name: this.name, id: identifier }, inputProps)),
|
|
248
|
-
!this.icon &&
|
|
294
|
+
!this.icon &&
|
|
295
|
+
this.type !== "text" &&
|
|
296
|
+
this.type !== "tel" &&
|
|
297
|
+
this.type !== "password" &&
|
|
298
|
+
this.variation !== "button" && (h("div", { class: "duet-input-icon" },
|
|
249
299
|
h("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))),
|
|
250
|
-
this.
|
|
300
|
+
this.clear && this.value && (h("div", { class: "duet-input-clear-icon" },
|
|
301
|
+
h("button", { onClick: this.handleClearClick, id: this.clearId, "aria-label": this.clearLabel, "aria-keyshortcuts": "Escape" },
|
|
302
|
+
h("duet-icon", { margin: "none", size: "xx-small", name: "activity-close", color: "currentColor" })))),
|
|
303
|
+
this.icon && this.variation !== "button" && (h("div", { class: "duet-input-icon" },
|
|
251
304
|
h("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))),
|
|
305
|
+
this.variation === "button" && h("slot", { name: "button" }),
|
|
252
306
|
h("slot", null)),
|
|
253
307
|
h("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h("span", { class: "duet-input-error" }, this.error)))));
|
|
254
308
|
}
|
|
@@ -400,6 +454,24 @@ export class DuetInput {
|
|
|
400
454
|
"reflect": false,
|
|
401
455
|
"defaultValue": "0"
|
|
402
456
|
},
|
|
457
|
+
"clear": {
|
|
458
|
+
"type": "boolean",
|
|
459
|
+
"mutable": false,
|
|
460
|
+
"complexType": {
|
|
461
|
+
"original": "boolean",
|
|
462
|
+
"resolved": "boolean",
|
|
463
|
+
"references": {}
|
|
464
|
+
},
|
|
465
|
+
"required": false,
|
|
466
|
+
"optional": false,
|
|
467
|
+
"docs": {
|
|
468
|
+
"tags": [],
|
|
469
|
+
"text": "If set, the input field will display a clear button that can be accessed with tabbing."
|
|
470
|
+
},
|
|
471
|
+
"attribute": "clear",
|
|
472
|
+
"reflect": false,
|
|
473
|
+
"defaultValue": "false"
|
|
474
|
+
},
|
|
403
475
|
"caption": {
|
|
404
476
|
"type": "string",
|
|
405
477
|
"mutable": false,
|
|
@@ -574,6 +646,28 @@ export class DuetInput {
|
|
|
574
646
|
"reflect": false,
|
|
575
647
|
"defaultValue": "\"text\""
|
|
576
648
|
},
|
|
649
|
+
"variation": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"mutable": false,
|
|
652
|
+
"complexType": {
|
|
653
|
+
"original": "DuetVariationType",
|
|
654
|
+
"resolved": "\"button\" | \"default\"",
|
|
655
|
+
"references": {
|
|
656
|
+
"DuetVariationType": {
|
|
657
|
+
"location": "local"
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"required": false,
|
|
662
|
+
"optional": false,
|
|
663
|
+
"docs": {
|
|
664
|
+
"tags": [],
|
|
665
|
+
"text": "Variation of button."
|
|
666
|
+
},
|
|
667
|
+
"attribute": "variation",
|
|
668
|
+
"reflect": false,
|
|
669
|
+
"defaultValue": "\"default\""
|
|
670
|
+
},
|
|
577
671
|
"label": {
|
|
578
672
|
"type": "string",
|
|
579
673
|
"mutable": false,
|
|
@@ -944,6 +1038,25 @@ export class DuetInput {
|
|
|
944
1038
|
}
|
|
945
1039
|
}
|
|
946
1040
|
}
|
|
1041
|
+
}, {
|
|
1042
|
+
"method": "duetClear",
|
|
1043
|
+
"name": "duetClear",
|
|
1044
|
+
"bubbles": true,
|
|
1045
|
+
"cancelable": true,
|
|
1046
|
+
"composed": true,
|
|
1047
|
+
"docs": {
|
|
1048
|
+
"tags": [],
|
|
1049
|
+
"text": "Emitted when the input is cleared."
|
|
1050
|
+
},
|
|
1051
|
+
"complexType": {
|
|
1052
|
+
"original": "DuetInputEvent",
|
|
1053
|
+
"resolved": "{ originalEvent?: Event; value: string; component: \"duet-input\"; }",
|
|
1054
|
+
"references": {
|
|
1055
|
+
"DuetInputEvent": {
|
|
1056
|
+
"location": "local"
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
947
1060
|
}, {
|
|
948
1061
|
"method": "duetFocus",
|
|
949
1062
|
"name": "duetFocus",
|
|
@@ -1002,6 +1115,22 @@ export class DuetInput {
|
|
|
1002
1115
|
"text": "Reset the cursor position on the native element\n`input.resetCursor()`.",
|
|
1003
1116
|
"tags": []
|
|
1004
1117
|
}
|
|
1118
|
+
},
|
|
1119
|
+
"clearInput": {
|
|
1120
|
+
"complexType": {
|
|
1121
|
+
"signature": "() => Promise<void>",
|
|
1122
|
+
"parameters": [],
|
|
1123
|
+
"references": {
|
|
1124
|
+
"Promise": {
|
|
1125
|
+
"location": "global"
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
"return": "Promise<void>"
|
|
1129
|
+
},
|
|
1130
|
+
"docs": {
|
|
1131
|
+
"text": "Reset the cursor position on the native element\n`input.resetCursor()`.",
|
|
1132
|
+
"tags": []
|
|
1133
|
+
}
|
|
1005
1134
|
}
|
|
1006
1135
|
}; }
|
|
1007
1136
|
static get elementRef() { return "element"; }
|
|
@@ -96,7 +96,7 @@ export class DuetStep {
|
|
|
96
96
|
"rounded-bottom": this.roundedBottom,
|
|
97
97
|
"duet-theme-turva": this.theme === "turva",
|
|
98
98
|
} },
|
|
99
|
-
h("div", { class: "duet-step-heading", id: this.buttonId, role: "button", tabindex: this.state !== "
|
|
99
|
+
h("div", { class: "duet-step-heading", id: this.buttonId, role: this.state !== "current" ? "button" : "region", "aria-current": this.state === "current" ? "step" : undefined, tabindex: this.state !== "current" ? "0" : undefined, "aria-disabled": this.isClickDisabled().toString(), "aria-expanded": (this.state === "current").toString(), "aria-controls": this.contentId, "aria-selected": (this.state === "current").toString(), onClick: this.handleClick, onKeyDown: this.handleKeyDown, ref: element => (this.buttonElement = element) },
|
|
100
100
|
h("div", { "aria-hidden": "true" },
|
|
101
101
|
h("div", { class: "duet-step-counter" }, this.renderStepCounter())),
|
|
102
102
|
h("duet-spacer", { direction: "horizontal", size: "large", breakpoint: "small" }),
|