@duetds/components 5.1.9 → 5.2.2
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 +392 -125
- package/lib/cjs/{dom-66424ef2.js → dom-96576bce.js} +1 -1
- package/lib/cjs/duet-action-button.cjs.entry.js +16 -8
- package/lib/cjs/duet-alert.cjs.entry.js +2 -2
- package/lib/cjs/duet-badge.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +2 -2
- package/lib/cjs/duet-button_2.cjs.entry.js +17 -2
- package/lib/cjs/duet-caption_4.cjs.entry.js +2 -2
- package/lib/cjs/duet-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-checkbox.cjs.entry.js +15 -3
- package/lib/cjs/duet-choice_2.cjs.entry.js +16 -4
- package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
- package/lib/cjs/duet-combobox.cjs.entry.js +2 -2
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +2 -2
- package/lib/cjs/duet-date-picker.cjs.entry.js +3 -4
- package/lib/cjs/duet-divider_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +5 -4
- package/lib/cjs/duet-empty-state.cjs.entry.js +2 -2
- package/lib/cjs/duet-fieldset.cjs.entry.js +2 -2
- package/lib/cjs/duet-footer.cjs.entry.js +2 -2
- 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 +2 -2
- package/lib/cjs/duet-icon.cjs.entry.js +2 -2
- package/lib/cjs/duet-input_2.cjs.entry.js +18 -4
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-modal.cjs.entry.js +12 -4
- package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-number-input.cjs.entry.js +106 -49
- package/lib/cjs/duet-pagination_2.cjs.entry.js +50 -14
- package/lib/cjs/duet-progress.cjs.entry.js +15 -3
- package/lib/cjs/duet-radio_2.cjs.entry.js +15 -3
- package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +2 -2
- package/lib/cjs/duet-select.cjs.entry.js +2 -2
- package/lib/cjs/duet-step_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-textarea.cjs.entry.js +17 -3
- package/lib/cjs/duet-toggle.cjs.entry.js +15 -3
- package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
- 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 +4 -4
- package/lib/cjs/{focus-utils-3ef68d4c.js → focus-utils-4648b81b.js} +1 -1
- package/lib/cjs/{index-e1907091.js → index-d690ab34.js} +11 -9
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-1ff2f74f.js → shadow-css-38b9e725.js} +2 -3
- package/lib/cjs/{themeable-component-940d3b50.js → themeable-component-fdeaef9f.js} +0 -0
- package/lib/collection/collection-manifest.json +1 -1
- package/lib/collection/{utils/form-components.js → common/a11y-component.js} +0 -0
- package/lib/collection/common/form-components.js +4 -0
- package/lib/collection/common/index.js +4 -0
- package/lib/collection/{utils → common}/themeable-component.js +0 -0
- package/lib/collection/components/duet-action-button/duet-action-button.js +57 -13
- package/lib/collection/components/duet-alert/duet-alert.js +1 -1
- package/lib/collection/components/duet-badge/duet-badge.js +1 -1
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.js +1 -1
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.js +1 -1
- package/lib/collection/components/duet-button/duet-button.js +70 -1
- package/lib/collection/components/duet-caption/duet-caption.js +1 -1
- package/lib/collection/components/duet-card/duet-card.js +1 -1
- package/lib/collection/components/duet-checkbox/duet-checkbox.js +68 -2
- package/lib/collection/components/duet-choice/duet-choice.js +68 -2
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +1 -1
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +1 -1
- package/lib/collection/components/duet-combobox/duet-combobox.js +1 -1
- package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +1 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +1 -1
- package/lib/collection/components/duet-date-picker/utils.js +0 -1
- package/lib/collection/components/duet-divider/duet-divider.js +1 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +3 -2
- package/lib/collection/components/duet-empty-state/duet-empty-state.js +1 -1
- package/lib/collection/components/duet-fieldset/duet-fieldset.js +1 -1
- package/lib/collection/components/duet-footer/duet-footer.js +1 -1
- package/lib/collection/components/duet-grid-item/duet-grid-item.js +1 -1
- package/lib/collection/components/duet-header/duet-header.css +1 -1
- package/lib/collection/components/duet-header/duet-header.js +1 -1
- package/lib/collection/components/duet-heading/duet-heading.js +1 -1
- package/lib/collection/components/duet-hero/duet-hero.js +1 -1
- package/lib/collection/components/duet-icon/duet-icon.js +1 -1
- package/lib/collection/components/duet-input/duet-input.js +72 -4
- package/lib/collection/components/duet-label/duet-label.js +1 -1
- package/lib/collection/components/duet-link/duet-link.js +1 -1
- package/lib/collection/components/duet-list/duet-list.js +1 -1
- package/lib/collection/components/duet-logo/duet-logo.js +1 -1
- package/lib/collection/components/duet-modal/duet-modal.js +80 -2
- package/lib/collection/components/duet-notification/duet-notification.js +1 -1
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +1 -1
- package/lib/collection/components/duet-number-input/duet-number-input.js +90 -29
- package/lib/collection/components/duet-pagination/duet-pagination.js +94 -3
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +1 -1
- package/lib/collection/components/duet-progress/duet-progress.js +68 -2
- package/lib/collection/components/duet-radio/duet-radio.js +68 -2
- package/lib/collection/components/duet-radio-group/duet-radio-group.js +1 -1
- package/lib/collection/components/duet-range-slider/duet-range-slider.js +1 -1
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +29 -12
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +1 -1
- package/lib/collection/components/duet-select/duet-select.js +1 -1
- package/lib/collection/components/duet-spinner/duet-spinner.js +1 -1
- package/lib/collection/components/duet-step/duet-step.js +1 -1
- package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +1 -1
- package/lib/collection/components/duet-table/duet-table.css +30 -18
- package/lib/collection/components/duet-table/duet-table.js +1 -1
- package/lib/collection/components/duet-textarea/duet-textarea.js +70 -2
- package/lib/collection/components/duet-toggle/duet-toggle.js +68 -2
- package/lib/collection/components/duet-tooltip/duet-tooltip.js +1 -1
- package/lib/collection/components/duet-tray/duet-tray.js +1 -1
- package/lib/collection/components/duet-upload/duet-upload.js +1 -1
- package/lib/collection/utils/math.utils.js +76 -0
- package/lib/custom-elements-bundle/index.js +323 -112
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-d92b2eac.system.entry.js → p-057e3337.system.entry.js} +1 -1
- package/lib/duet/{p-7f705e70.entry.js → p-08829649.entry.js} +1 -1
- package/lib/duet/{p-cd158ec2.system.entry.js → p-0a62f171.system.entry.js} +1 -1
- package/lib/duet/{p-7772d2f3.system.entry.js → p-0da92109.system.entry.js} +1 -1
- package/lib/duet/p-10b144b0.system.entry.js +4 -0
- package/lib/duet/p-113531de.entry.js +4 -0
- package/lib/duet/{p-1c315e22.system.entry.js → p-1164c8a6.system.entry.js} +1 -1
- package/lib/duet/{p-6b87a943.system.entry.js → p-14a98f4b.system.entry.js} +1 -1
- package/lib/duet/{p-8c372ef6.system.entry.js → p-1527b7e3.system.entry.js} +2 -2
- package/lib/duet/{p-d2c9bb5f.system.entry.js → p-188d7eb5.system.entry.js} +1 -1
- package/lib/duet/{p-41ed75d0.system.entry.js → p-1c6a3c81.system.entry.js} +1 -1
- package/lib/duet/{p-ae5872e3.system.entry.js → p-1d6d8314.system.entry.js} +1 -1
- package/lib/duet/{p-b953aedb.system.entry.js → p-1fdc5601.system.entry.js} +1 -1
- package/lib/duet/p-2135afa1.system.entry.js +4 -0
- package/lib/duet/p-216d4da8.entry.js +4 -0
- package/lib/duet/{p-1d87a095.system.js → p-2260d4d2.system.js} +1 -1
- package/lib/duet/{p-fbc61588.system.entry.js → p-24201d53.system.entry.js} +1 -1
- package/lib/duet/{p-b67edf51.system.entry.js → p-31f7ef10.system.entry.js} +1 -1
- package/lib/duet/p-336ddadc.js +4 -0
- package/lib/duet/{p-6b03322b.system.js → p-33b3aba4.system.js} +0 -0
- package/lib/duet/p-355f9884.entry.js +4 -0
- package/lib/duet/{p-851b469e.system.entry.js → p-35611d73.system.entry.js} +2 -2
- package/lib/duet/{p-b5ef3764.entry.js → p-3735b874.entry.js} +1 -1
- package/lib/duet/p-38c52a73.entry.js +4 -0
- package/lib/duet/{p-3ed22b96.system.entry.js → p-3a529853.system.entry.js} +1 -1
- package/lib/duet/{p-fa59ebf4.js → p-3b31184e.js} +0 -0
- package/lib/duet/{p-2d244cbb.system.entry.js → p-3b871ee9.system.entry.js} +1 -1
- package/lib/duet/{p-d7e383e1.system.entry.js → p-3c0d7470.system.entry.js} +2 -2
- package/lib/duet/p-3cf51bd3.entry.js +4 -0
- package/lib/duet/p-3dadaaf9.entry.js +4 -0
- package/lib/duet/p-3e510a51.entry.js +4 -0
- package/lib/duet/{p-fcf30d60.system.entry.js → p-43c0c459.system.entry.js} +1 -1
- package/lib/duet/p-479657e4.entry.js +4 -0
- package/lib/duet/p-4804b9d8.system.entry.js +4 -0
- package/lib/duet/{p-d50a26ce.system.entry.js → p-4a000e12.system.entry.js} +2 -2
- package/lib/duet/p-4be66230.js +5 -0
- package/lib/duet/{p-abf8eaf7.js → p-4ebf1618.js} +0 -0
- package/lib/duet/{p-43a54146.system.entry.js → p-54eadbb6.system.entry.js} +1 -1
- package/lib/duet/{p-b32178af.entry.js → p-55fbbafb.entry.js} +1 -1
- package/lib/duet/{p-0a8cb1f2.system.entry.js → p-56a92e4b.system.entry.js} +1 -1
- package/lib/duet/{p-eda1280f.entry.js → p-57934454.entry.js} +1 -1
- package/lib/duet/{p-6fd465b3.entry.js → p-5a4a83ce.entry.js} +1 -1
- package/lib/duet/{p-2e68b854.system.entry.js → p-5aec2bd7.system.entry.js} +1 -1
- package/lib/duet/p-5da3ec79.entry.js +4 -0
- package/lib/duet/{p-5b0f15e4.entry.js → p-6009349f.entry.js} +1 -1
- package/lib/duet/{p-f4b909bd.system.entry.js → p-636c9c24.system.entry.js} +1 -1
- package/lib/duet/{p-ca10ad5f.system.entry.js → p-65b4903d.system.entry.js} +1 -1
- package/lib/duet/{p-5d2204fc.entry.js → p-6ecb8b94.entry.js} +1 -1
- package/lib/duet/{p-906e53f9.entry.js → p-7bad44b0.entry.js} +1 -1
- package/lib/duet/{p-0da0c06d.system.entry.js → p-7ccefcc3.system.entry.js} +2 -2
- package/lib/duet/p-7e3eec66.system.entry.js +4 -0
- package/lib/duet/{p-ef5c2a47.system.entry.js → p-7fbb09c1.system.entry.js} +1 -1
- package/lib/duet/{p-d5b3feeb.system.entry.js → p-804eb7eb.system.entry.js} +1 -1
- package/lib/duet/p-808d661f.system.entry.js +4 -0
- package/lib/duet/{p-5b609e18.entry.js → p-834242e9.entry.js} +1 -1
- package/lib/duet/{p-8fa561be.system.entry.js → p-84a95f49.system.entry.js} +1 -1
- package/lib/duet/{p-0e3fad96.entry.js → p-879ab923.entry.js} +1 -1
- package/lib/duet/p-89368497.system.js +4 -0
- package/lib/duet/p-8d7c2cf4.entry.js +4 -0
- package/lib/duet/{p-1ce6c0c0.entry.js → p-928e0b63.entry.js} +1 -1
- package/lib/duet/{p-c5b1e054.system.entry.js → p-95dc8004.system.entry.js} +1 -1
- package/lib/duet/{p-36455aba.entry.js → p-96e03d88.entry.js} +1 -1
- package/lib/duet/{p-95be8318.system.entry.js → p-974143b1.system.entry.js} +1 -1
- package/lib/duet/{p-2911128f.entry.js → p-999dec9f.entry.js} +1 -1
- package/lib/duet/p-9e3cd6b5.entry.js +4 -0
- package/lib/duet/p-9ed30f80.entry.js +4 -0
- package/lib/duet/p-a1980c81.entry.js +4 -0
- package/lib/duet/{p-007518fb.entry.js → p-a7e5cd45.entry.js} +1 -1
- package/lib/duet/p-aae30188.system.js +5 -0
- package/lib/duet/{p-7f26e522.entry.js → p-ab66df54.entry.js} +1 -1
- package/lib/duet/p-af5f34fb.entry.js +4 -0
- package/lib/duet/p-afc7cc44.entry.js +4 -0
- package/lib/duet/{p-542af014.system.js → p-b668b67c.system.js} +0 -0
- package/lib/duet/p-b6cea2fb.entry.js +4 -0
- package/lib/duet/p-be1a1ee5.entry.js +4 -0
- package/lib/duet/{p-c23ef060.entry.js → p-bf306f77.entry.js} +1 -1
- package/lib/duet/{p-76dc3268.entry.js → p-c0cb67d7.entry.js} +1 -1
- package/lib/duet/p-c858aedd.entry.js +4 -0
- package/lib/duet/{p-00f69be4.entry.js → p-cbb59840.entry.js} +1 -1
- package/lib/duet/{p-27d238c5.js → p-d4c234ed.js} +1 -1
- package/lib/duet/{p-4fb88265.entry.js → p-d511ca66.entry.js} +1 -1
- package/lib/duet/{p-fcb0ac03.system.entry.js → p-db48e77a.system.entry.js} +2 -2
- package/lib/duet/{p-6d148390.system.entry.js → p-dc429d5d.system.entry.js} +2 -2
- package/lib/duet/p-e0ba5d9e.system.entry.js +4 -0
- package/lib/duet/{p-70f5c86d.entry.js → p-e3010ea3.entry.js} +1 -1
- package/lib/duet/{p-43bdb5df.system.entry.js → p-e3e092e1.system.entry.js} +2 -2
- package/lib/duet/p-e406a3b7.entry.js +4 -0
- package/lib/duet/{p-080ce662.entry.js → p-e4133a47.entry.js} +1 -1
- package/lib/duet/{p-86395c08.entry.js → p-e5992e2a.entry.js} +1 -1
- package/lib/duet/{p-eeeadb94.entry.js → p-e67563e7.entry.js} +1 -1
- package/lib/duet/{p-f4bba24d.system.entry.js → p-e6ff063e.system.entry.js} +1 -1
- package/lib/duet/{p-4fcde9bd.system.entry.js → p-e7eb9f7a.system.entry.js} +1 -1
- package/lib/duet/{p-f1f59897.system.entry.js → p-e8658390.system.entry.js} +1 -1
- package/lib/duet/p-ea59bb06.system.entry.js +4 -0
- package/lib/duet/p-ff46ec81.system.js +16 -0
- package/lib/esm/{dom-3c479050.js → dom-3dbcb0d8.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +16 -8
- package/lib/esm/duet-alert.entry.js +2 -2
- package/lib/esm/duet-badge.entry.js +2 -2
- package/lib/esm/duet-breadcrumb.entry.js +2 -2
- package/lib/esm/duet-breadcrumbs.entry.js +2 -2
- package/lib/esm/duet-button_2.entry.js +17 -2
- package/lib/esm/duet-caption_4.entry.js +2 -2
- package/lib/esm/duet-card.entry.js +2 -2
- package/lib/esm/duet-checkbox.entry.js +15 -3
- package/lib/esm/duet-choice_2.entry.js +16 -4
- package/lib/esm/duet-collapsible.entry.js +2 -2
- package/lib/esm/duet-combobox.entry.js +2 -2
- package/lib/esm/duet-cookie-consent.entry.js +2 -2
- package/lib/esm/duet-date-picker.entry.js +3 -4
- package/lib/esm/duet-divider_2.entry.js +2 -2
- package/lib/esm/duet-editable-table_3.entry.js +5 -4
- package/lib/esm/duet-empty-state.entry.js +2 -2
- package/lib/esm/duet-fieldset.entry.js +2 -2
- package/lib/esm/duet-footer.entry.js +2 -2
- 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 +2 -2
- package/lib/esm/duet-icon.entry.js +2 -2
- package/lib/esm/duet-input_2.entry.js +18 -4
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +2 -2
- package/lib/esm/duet-modal.entry.js +12 -4
- package/lib/esm/duet-notification_2.entry.js +2 -2
- package/lib/esm/duet-number-input.entry.js +106 -49
- package/lib/esm/duet-pagination_2.entry.js +50 -14
- package/lib/esm/duet-progress.entry.js +15 -3
- package/lib/esm/duet-radio_2.entry.js +15 -3
- package/lib/esm/duet-range-slider.entry.js +2 -2
- package/lib/esm/duet-scrollable_3.entry.js +2 -2
- package/lib/esm/duet-select.entry.js +2 -2
- package/lib/esm/duet-step_2.entry.js +2 -2
- package/lib/esm/duet-textarea.entry.js +17 -3
- package/lib/esm/duet-toggle.entry.js +15 -3
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +2 -2
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{focus-utils-dbdd6235.js → focus-utils-6313db97.js} +1 -1
- package/lib/esm/{index-33a07cd5.js → index-9e6ac831.js} +11 -9
- package/lib/esm/loader.js +3 -3
- package/lib/esm/polyfills/css-shim.js +1 -1
- package/lib/esm/{shadow-css-fbe49d20.js → shadow-css-501eda9a.js} +2 -3
- package/lib/esm/{themeable-component-e8fc98bf.js → themeable-component-cb76be7c.js} +0 -0
- package/lib/esm-es5/{dom-3c479050.js → dom-3dbcb0d8.js} +0 -0
- package/lib/esm-es5/duet-action-button.entry.js +2 -2
- 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-choice_2.entry.js +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-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 +2 -2
- 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 +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 +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-modal.entry.js +2 -2
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +2 -2
- package/lib/esm-es5/duet-pagination_2.entry.js +2 -2
- 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 +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +2 -2
- package/lib/esm-es5/duet-toggle.entry.js +2 -2
- 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-6313db97.js +4 -0
- package/lib/esm-es5/index-9e6ac831.js +5 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-501eda9a.js +15 -0
- package/lib/esm-es5/{themeable-component-e8fc98bf.js → themeable-component-cb76be7c.js} +0 -0
- package/lib/types/common/a11y-component.d.ts +13 -0
- package/lib/types/{utils → common}/form-components.d.ts +0 -1
- package/lib/types/common/index.d.ts +3 -0
- package/lib/types/{utils → common}/themeable-component.d.ts +0 -0
- package/lib/types/components/duet-action-button/duet-action-button.d.ts +15 -7
- package/lib/types/components/duet-alert/duet-alert.d.ts +1 -1
- package/lib/types/components/duet-badge/duet-badge.d.ts +1 -1
- package/lib/types/components/duet-breadcrumbs/duet-breadcrumb.d.ts +1 -1
- package/lib/types/components/duet-breadcrumbs/duet-breadcrumbs.d.ts +1 -1
- package/lib/types/components/duet-button/duet-button.d.ts +14 -3
- package/lib/types/components/duet-caption/duet-caption.d.ts +1 -1
- package/lib/types/components/duet-card/duet-card.d.ts +1 -1
- package/lib/types/components/duet-checkbox/duet-checkbox.d.ts +14 -3
- package/lib/types/components/duet-choice/duet-choice.d.ts +14 -3
- package/lib/types/components/duet-choice-group/duet-choice-group.d.ts +1 -1
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +1 -1
- package/lib/types/components/duet-combobox/duet-combobox.d.ts +1 -1
- package/lib/types/components/duet-cookie-consent/duet-cookie-consent.d.ts +1 -1
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +2 -2
- package/lib/types/components/duet-divider/duet-divider.d.ts +1 -1
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +1 -1
- package/lib/types/components/duet-empty-state/duet-empty-state.d.ts +1 -1
- package/lib/types/components/duet-fieldset/duet-fieldset.d.ts +1 -1
- package/lib/types/components/duet-footer/duet-footer.d.ts +1 -1
- package/lib/types/components/duet-grid-item/duet-grid-item.d.ts +1 -1
- package/lib/types/components/duet-header/duet-header.d.ts +1 -1
- package/lib/types/components/duet-heading/duet-heading.d.ts +1 -1
- package/lib/types/components/duet-hero/duet-hero.d.ts +1 -1
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-input/duet-input.d.ts +15 -4
- package/lib/types/components/duet-label/duet-label.d.ts +1 -1
- package/lib/types/components/duet-link/duet-link.d.ts +1 -1
- package/lib/types/components/duet-list/duet-list.d.ts +1 -1
- package/lib/types/components/duet-logo/duet-logo.d.ts +1 -1
- package/lib/types/components/duet-modal/duet-modal.d.ts +18 -2
- package/lib/types/components/duet-notification/duet-notification.d.ts +1 -1
- package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +1 -1
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +14 -4
- package/lib/types/components/duet-pagination/duet-pagination.d.ts +18 -2
- package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +1 -1
- package/lib/types/components/duet-progress/duet-progress.d.ts +14 -2
- package/lib/types/components/duet-radio/duet-radio.d.ts +14 -3
- package/lib/types/components/duet-radio-group/duet-radio-group.d.ts +1 -1
- package/lib/types/components/duet-range-slider/duet-range-slider.d.ts +2 -2
- package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +4 -2
- package/lib/types/components/duet-scrollable/duet-scrollable.d.ts +1 -1
- package/lib/types/components/duet-select/duet-select.d.ts +2 -2
- package/lib/types/components/duet-spinner/duet-spinner.d.ts +1 -1
- package/lib/types/components/duet-step/duet-step.d.ts +1 -1
- package/lib/types/components/duet-stepper/duet-stepper.d.ts +1 -1
- package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +1 -1
- package/lib/types/components/duet-table/duet-table.d.ts +1 -1
- package/lib/types/components/duet-textarea/duet-textarea.d.ts +14 -3
- package/lib/types/components/duet-toggle/duet-toggle.d.ts +14 -3
- package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +1 -1
- package/lib/types/components/duet-tray/duet-tray.d.ts +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +2 -2
- package/lib/types/components.d.ts +520 -112
- package/lib/types/utils/math.utils.d.ts +11 -0
- package/package.json +6 -6
- package/lib/collection/components/duet-number-input/number-input-utils.js +0 -26
- package/lib/duet/p-0fce5ee0.entry.js +0 -4
- package/lib/duet/p-112c7cf4.entry.js +0 -4
- package/lib/duet/p-14940019.entry.js +0 -4
- package/lib/duet/p-1a39ba08.entry.js +0 -4
- package/lib/duet/p-2c66423c.system.entry.js +0 -4
- package/lib/duet/p-3504f285.system.entry.js +0 -4
- package/lib/duet/p-356c2c34.entry.js +0 -4
- package/lib/duet/p-41e0b7a6.entry.js +0 -4
- package/lib/duet/p-46aab89e.entry.js +0 -4
- package/lib/duet/p-539f2a06.system.js +0 -4
- package/lib/duet/p-55376e66.system.entry.js +0 -4
- package/lib/duet/p-56212fca.js +0 -4
- package/lib/duet/p-60931fe2.entry.js +0 -4
- package/lib/duet/p-65256911.entry.js +0 -4
- package/lib/duet/p-6d4f68c7.entry.js +0 -4
- package/lib/duet/p-80d48e3c.entry.js +0 -4
- package/lib/duet/p-92a25fb5.system.js +0 -16
- package/lib/duet/p-934b6e46.entry.js +0 -4
- package/lib/duet/p-aa3a10db.system.entry.js +0 -4
- package/lib/duet/p-b97e1c6e.entry.js +0 -4
- package/lib/duet/p-c94d980f.system.entry.js +0 -4
- package/lib/duet/p-c953e685.entry.js +0 -4
- package/lib/duet/p-cce3f6c1.system.js +0 -4
- package/lib/duet/p-ce973d95.entry.js +0 -4
- package/lib/duet/p-da4808e6.entry.js +0 -4
- package/lib/duet/p-da6ec22c.js +0 -4
- package/lib/duet/p-e70200b0.entry.js +0 -4
- package/lib/duet/p-e93e4714.system.entry.js +0 -4
- package/lib/duet/p-fb9b713b.entry.js +0 -4
- package/lib/duet/p-fec90322.entry.js +0 -4
- package/lib/duet/p-ff54acdd.system.entry.js +0 -4
- package/lib/esm-es5/focus-utils-dbdd6235.js +0 -4
- package/lib/esm-es5/index-33a07cd5.js +0 -4
- package/lib/esm-es5/shadow-css-fbe49d20.js +0 -15
- package/lib/types/components/duet-number-input/number-input-utils.d.ts +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { Component, h, Host, Prop } from "@stencil/core";
|
|
5
|
-
import { inheritGlobalTheme } from "../../
|
|
5
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
6
|
export class DuetGridItem {
|
|
7
7
|
constructor() {
|
|
8
8
|
/**
|
|
@@ -292,11 +292,11 @@
|
|
|
292
292
|
}
|
|
293
293
|
@media (min-width: 62em) {
|
|
294
294
|
.duet-header-items .duet-header-item {
|
|
295
|
+
font-weight: 600;
|
|
295
296
|
border-radius: 4px;
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
.duet-theme-turva .duet-header-items .duet-header-item {
|
|
299
|
-
font-weight: 600;
|
|
300
300
|
color: #171c3a;
|
|
301
301
|
border-color: #e1e3e6;
|
|
302
302
|
}
|
|
@@ -11,10 +11,10 @@ import { media_query_large } from "@duetds/tokens/lib/tokens.json";
|
|
|
11
11
|
import { Build, Component, Element, Event, Fragment, h, Host, Listen, Method, Prop, State, Watch, } from "@stencil/core";
|
|
12
12
|
import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock/lib/bodyScrollLock.es6.js";
|
|
13
13
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
14
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
14
15
|
import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isEscapeKey, isSpaceKey, } from "../../utils/keyboard-utils";
|
|
15
16
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
16
17
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
17
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
18
18
|
import { DuetHeaderDropdown } from "./duet-header-dropdown";
|
|
19
19
|
import { DuetHeaderHamburger } from "./duet-header-hamburger";
|
|
20
20
|
import { DuetHeaderIcon } from "./duet-header-icon";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Element, h, Prop } from "@stencil/core";
|
|
5
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
5
6
|
import { sanitizeString } from "../../utils/string-utils";
|
|
6
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
7
7
|
import { getColorByName } from "../../utils/token-utils";
|
|
8
8
|
export class DuetHeading {
|
|
9
9
|
constructor() {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import newWindowIcon from "@duetds/icons/lib/assets/action-new-window-small";
|
|
5
5
|
import { Component, Element, Event, h, Prop, State, Watch } from "@stencil/core";
|
|
6
6
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
7
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
7
8
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
9
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
9
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
10
10
|
/**
|
|
11
11
|
* @slot default - This is an unamed slot for a text or extra button that is placed after any buttons (or list item)
|
|
12
12
|
* @slot badge - This is a slot for a status badge that sits next to pre-heading inside the hero component.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { Build, Component, Element, h, Host, Prop, State, Watch } from "@stencil/core";
|
|
5
|
-
import { inheritGlobalTheme } from "../../
|
|
5
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
6
|
import { getColorByName } from "../../utils/token-utils";
|
|
7
7
|
import { buildIconUrl, fetchIconByUrl } from "./icon-utils";
|
|
8
8
|
export class DuetIcon {
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import emailIcon from "@duetds/icons/lib/assets/form-email";
|
|
5
5
|
import searchIcon from "@duetds/icons/lib/assets/form-search";
|
|
6
6
|
import { Component, Element, Event, h, Host, Method, Prop, Watch } from "@stencil/core";
|
|
7
|
+
import { inheritGlobalTheme } from "../../common";
|
|
7
8
|
import { createID } from "../../utils/create-id";
|
|
8
9
|
import { cleanValue, resetCursor } from "../../utils/input-utils";
|
|
9
10
|
import { isEscapeKey } from "../../utils/keyboard-utils";
|
|
10
11
|
import { getLocaleString } from "../../utils/language-utils";
|
|
11
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
12
12
|
const icons = {
|
|
13
13
|
search: searchIcon,
|
|
14
14
|
email: emailIcon,
|
|
@@ -31,13 +31,25 @@ export class DuetInput {
|
|
|
31
31
|
sv: "Rensa",
|
|
32
32
|
});
|
|
33
33
|
/**
|
|
34
|
-
* Indicates the id of a component that describes the input.
|
|
34
|
+
* Indicates the id or a string of space seperated ids of a component(s) that describes the input.
|
|
35
35
|
*/
|
|
36
36
|
this.accessibleDescribedBy = "";
|
|
37
37
|
/**
|
|
38
38
|
* Indicates value of any popup element associated with the input.
|
|
39
39
|
*/
|
|
40
40
|
this.accessibleHasPopup = undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Aria Details of the component
|
|
43
|
+
*/
|
|
44
|
+
this.accessibleDetails = undefined;
|
|
45
|
+
/**
|
|
46
|
+
* String of id's that indicate alternative labels elements
|
|
47
|
+
*/
|
|
48
|
+
this.accessibleLabelledBy = undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Aria description the button
|
|
51
|
+
*/
|
|
52
|
+
this.accessibleDescription = undefined;
|
|
41
53
|
/**
|
|
42
54
|
* Set the amount of time, in milliseconds, to wait to trigger the duetChange
|
|
43
55
|
* event after each keystroke.
|
|
@@ -290,7 +302,9 @@ export class DuetInput {
|
|
|
290
302
|
disabled: this.disabled,
|
|
291
303
|
"is-number": this.component === "number",
|
|
292
304
|
"is-date": this.component === "date",
|
|
293
|
-
}, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "aria-labelledby":
|
|
305
|
+
}, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "aria-labelledby": this.accessibleLabelledBy
|
|
306
|
+
? `${this.labelId} ${this.errorId} ${this.accessibleLabelledBy}`
|
|
307
|
+
: `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-details": this.accessibleDetails, "aria-description": this.accessibleDescription, "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)),
|
|
294
308
|
!this.icon &&
|
|
295
309
|
this.type !== "text" &&
|
|
296
310
|
this.type !== "tel" &&
|
|
@@ -412,7 +426,7 @@ export class DuetInput {
|
|
|
412
426
|
"optional": false,
|
|
413
427
|
"docs": {
|
|
414
428
|
"tags": [],
|
|
415
|
-
"text": "Indicates the id of a component that describes the input."
|
|
429
|
+
"text": "Indicates the id or a string of space seperated ids of a component(s) that describes the input."
|
|
416
430
|
},
|
|
417
431
|
"attribute": "accessible-described-by",
|
|
418
432
|
"reflect": false,
|
|
@@ -436,6 +450,60 @@ export class DuetInput {
|
|
|
436
450
|
"reflect": false,
|
|
437
451
|
"defaultValue": "undefined"
|
|
438
452
|
},
|
|
453
|
+
"accessibleDetails": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"mutable": false,
|
|
456
|
+
"complexType": {
|
|
457
|
+
"original": "string",
|
|
458
|
+
"resolved": "string",
|
|
459
|
+
"references": {}
|
|
460
|
+
},
|
|
461
|
+
"required": false,
|
|
462
|
+
"optional": false,
|
|
463
|
+
"docs": {
|
|
464
|
+
"tags": [],
|
|
465
|
+
"text": "Aria Details of the component"
|
|
466
|
+
},
|
|
467
|
+
"attribute": "accessible-details",
|
|
468
|
+
"reflect": false,
|
|
469
|
+
"defaultValue": "undefined"
|
|
470
|
+
},
|
|
471
|
+
"accessibleLabelledBy": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"mutable": false,
|
|
474
|
+
"complexType": {
|
|
475
|
+
"original": "string",
|
|
476
|
+
"resolved": "string",
|
|
477
|
+
"references": {}
|
|
478
|
+
},
|
|
479
|
+
"required": false,
|
|
480
|
+
"optional": false,
|
|
481
|
+
"docs": {
|
|
482
|
+
"tags": [],
|
|
483
|
+
"text": "String of id's that indicate alternative labels elements"
|
|
484
|
+
},
|
|
485
|
+
"attribute": "accessible-labelled-by",
|
|
486
|
+
"reflect": false,
|
|
487
|
+
"defaultValue": "undefined"
|
|
488
|
+
},
|
|
489
|
+
"accessibleDescription": {
|
|
490
|
+
"type": "string",
|
|
491
|
+
"mutable": false,
|
|
492
|
+
"complexType": {
|
|
493
|
+
"original": "string",
|
|
494
|
+
"resolved": "string",
|
|
495
|
+
"references": {}
|
|
496
|
+
},
|
|
497
|
+
"required": false,
|
|
498
|
+
"optional": false,
|
|
499
|
+
"docs": {
|
|
500
|
+
"tags": [],
|
|
501
|
+
"text": "Aria description the button"
|
|
502
|
+
},
|
|
503
|
+
"attribute": "accessible-description",
|
|
504
|
+
"reflect": false,
|
|
505
|
+
"defaultValue": "undefined"
|
|
506
|
+
},
|
|
439
507
|
"debounce": {
|
|
440
508
|
"type": "number",
|
|
441
509
|
"mutable": false,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { Component, h, Host, Prop } from "@stencil/core";
|
|
5
|
-
import { inheritGlobalTheme } from "../../
|
|
5
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
6
|
export class DuetLabel {
|
|
7
7
|
constructor() {
|
|
8
8
|
/**
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import newWindowIcon from "@duetds/icons/lib/assets/action-new-window-small";
|
|
5
5
|
import { Build, Component, Fragment, h, Host, Method, Prop } from "@stencil/core";
|
|
6
6
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
7
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
7
8
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
9
|
/**
|
|
10
10
|
* @part duet-link - piercing selector for styling the link
|
|
11
11
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Element, h, Prop, Watch } from "@stencil/core";
|
|
5
|
-
import { inheritGlobalTheme } from "../../
|
|
5
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
6
|
import { watchForOptions } from "../../utils/watch-options";
|
|
7
7
|
export class DuetList {
|
|
8
8
|
constructor() {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { colorBrandBlue, colorBrandGrayTurva, colorGrayLightest, colorPrimaryTurva } from "@duetds/tokens";
|
|
5
5
|
import { Component, Element, h, Host, Method, Prop } from "@stencil/core";
|
|
6
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
7
|
import { createID } from "../../utils/create-id";
|
|
7
8
|
import { getLanguage } from "../../utils/language-utils";
|
|
8
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
9
|
const TurvaLogo = ({ inverse, logoId }) => {
|
|
10
10
|
const logoColor = inverse ? colorGrayLightest : colorBrandGrayTurva;
|
|
11
11
|
const textColor = inverse ? colorGrayLightest : colorPrimaryTurva;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Element, Event, h, Listen, Method, Prop, State, Watch } from "@stencil/core";
|
|
5
5
|
import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock/lib/bodyScrollLock.es6.js";
|
|
6
|
+
import { inheritGlobalTheme } from "../../common";
|
|
6
7
|
import { createID } from "../../utils/create-id";
|
|
7
8
|
import { focusElement, FocusGuard } from "../../utils/focus-utils";
|
|
8
9
|
import { isEscapeKey } from "../../utils/keyboard-utils";
|
|
9
10
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
10
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
11
11
|
// The transition below is slightly higher than the actual CSS transition as VoiceOver on
|
|
12
12
|
// iOS has otherwise problems moving the focus from modal back to the original element.
|
|
13
13
|
// This issue is similar to what we’ve seen in Duet Date Picker + iOS VoiceOver.
|
|
@@ -71,6 +71,14 @@ export class DuetModal {
|
|
|
71
71
|
* Size of the modal window.
|
|
72
72
|
*/
|
|
73
73
|
this.size = "medium";
|
|
74
|
+
/**
|
|
75
|
+
* Details of the component
|
|
76
|
+
*/
|
|
77
|
+
this.accessibleDetails = undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Aria description the button
|
|
80
|
+
*/
|
|
81
|
+
this.accessibleDescription = undefined;
|
|
74
82
|
/**
|
|
75
83
|
* Size of the modal window.
|
|
76
84
|
*/
|
|
@@ -212,7 +220,7 @@ export class DuetModal {
|
|
|
212
220
|
iconColor = "primary-turva";
|
|
213
221
|
closeColor = "secondary-turva";
|
|
214
222
|
}
|
|
215
|
-
return (h("div", { ref: modal => (this.modalEl = modal), "aria-labelledby": this.heading ? this.modalId : false, "aria-describedby": this.slotDefaultId, role: "dialog", "aria-modal": this.isSafariBrowser ? false : true, tabindex: "-1", "aria-flowto": this.slotDefaultId, class: {
|
|
223
|
+
return (h("div", { ref: modal => (this.modalEl = modal), "aria-labelledby": this.heading ? this.modalId : false, "aria-details": this.accessibleDetails, "aria-description": this.accessibleDescription, "aria-describedby": this.accessibleDescribedBy ? `${this.slotDefaultId} ${this.accessibleDescribedBy}` : this.slotDefaultId, role: "dialog", "aria-modal": this.isSafariBrowser ? false : true, tabindex: "-1", "aria-flowto": this.slotDefaultId, class: {
|
|
216
224
|
"duet-modal-overlay": true,
|
|
217
225
|
"duet-theme-turva": this.theme === "turva",
|
|
218
226
|
"duet-modal-active": this.open,
|
|
@@ -356,6 +364,76 @@ export class DuetModal {
|
|
|
356
364
|
"reflect": false,
|
|
357
365
|
"defaultValue": "\"medium\""
|
|
358
366
|
},
|
|
367
|
+
"accessibleDescribedBy": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"mutable": false,
|
|
370
|
+
"complexType": {
|
|
371
|
+
"original": "string",
|
|
372
|
+
"resolved": "string",
|
|
373
|
+
"references": {}
|
|
374
|
+
},
|
|
375
|
+
"required": false,
|
|
376
|
+
"optional": false,
|
|
377
|
+
"docs": {
|
|
378
|
+
"tags": [],
|
|
379
|
+
"text": "Indicates the id or a string of space seperated ids of a component(s) that describes the input."
|
|
380
|
+
},
|
|
381
|
+
"attribute": "accessible-described-by",
|
|
382
|
+
"reflect": false
|
|
383
|
+
},
|
|
384
|
+
"accessibleLabelledBy": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"mutable": false,
|
|
387
|
+
"complexType": {
|
|
388
|
+
"original": "string",
|
|
389
|
+
"resolved": "string",
|
|
390
|
+
"references": {}
|
|
391
|
+
},
|
|
392
|
+
"required": false,
|
|
393
|
+
"optional": false,
|
|
394
|
+
"docs": {
|
|
395
|
+
"tags": [],
|
|
396
|
+
"text": "Indicates the id or a string of space seperated ids of a component(s) that labels the input."
|
|
397
|
+
},
|
|
398
|
+
"attribute": "accessible-labelled-by",
|
|
399
|
+
"reflect": false
|
|
400
|
+
},
|
|
401
|
+
"accessibleDetails": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"mutable": false,
|
|
404
|
+
"complexType": {
|
|
405
|
+
"original": "string",
|
|
406
|
+
"resolved": "string",
|
|
407
|
+
"references": {}
|
|
408
|
+
},
|
|
409
|
+
"required": false,
|
|
410
|
+
"optional": false,
|
|
411
|
+
"docs": {
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": "Details of the component"
|
|
414
|
+
},
|
|
415
|
+
"attribute": "accessible-details",
|
|
416
|
+
"reflect": false,
|
|
417
|
+
"defaultValue": "undefined"
|
|
418
|
+
},
|
|
419
|
+
"accessibleDescription": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"mutable": false,
|
|
422
|
+
"complexType": {
|
|
423
|
+
"original": "string",
|
|
424
|
+
"resolved": "string",
|
|
425
|
+
"references": {}
|
|
426
|
+
},
|
|
427
|
+
"required": false,
|
|
428
|
+
"optional": false,
|
|
429
|
+
"docs": {
|
|
430
|
+
"tags": [],
|
|
431
|
+
"text": "Aria description the button"
|
|
432
|
+
},
|
|
433
|
+
"attribute": "accessible-description",
|
|
434
|
+
"reflect": false,
|
|
435
|
+
"defaultValue": "undefined"
|
|
436
|
+
},
|
|
359
437
|
"gutterSize": {
|
|
360
438
|
"type": "string",
|
|
361
439
|
"mutable": false,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Element, h, Method, Prop } from "@stencil/core";
|
|
5
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
5
6
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
6
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
7
7
|
export class DuetNotification {
|
|
8
8
|
constructor() {
|
|
9
9
|
/**
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import arrowDownIcon from "@duetds/icons/lib/assets/action-arrow-down-small";
|
|
5
5
|
import { Component, Element, h, Listen, Method, Prop, State } from "@stencil/core";
|
|
6
|
+
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
6
7
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
7
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
8
8
|
const ESC_KEY = 27;
|
|
9
9
|
export class DuetNotificationDrawer {
|
|
10
10
|
constructor() {
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import addIcon from "@duetds/icons/lib/assets/action-add";
|
|
5
5
|
import subtractIcon from "@duetds/icons/lib/assets/action-subtract";
|
|
6
6
|
import { Component, Element, Event, h, Host, Method, Prop, State } from "@stencil/core";
|
|
7
|
+
import { inheritGlobalTheme } from "../../common";
|
|
7
8
|
import { createID } from "../../utils/create-id";
|
|
8
9
|
import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isBackspaceKey, } from "../../utils/keyboard-utils";
|
|
9
10
|
import { getLanguage, getLocale, getLocaleString } from "../../utils/language-utils";
|
|
10
|
-
import {
|
|
11
|
-
import { clamp, parseLocaleFloat, roundTo } from "./number-input-utils";
|
|
11
|
+
import { clamp, roundTo, SafeParseFloat } from "../../utils/math.utils";
|
|
12
12
|
export class DuetNumberInput {
|
|
13
13
|
constructor() {
|
|
14
14
|
this.inputId = createID("DuetInput");
|
|
@@ -27,6 +27,18 @@ export class DuetNumberInput {
|
|
|
27
27
|
* Unit for the number input.
|
|
28
28
|
*/
|
|
29
29
|
this.unit = getLocale(this.language).money;
|
|
30
|
+
/**
|
|
31
|
+
* Details of the component
|
|
32
|
+
*/
|
|
33
|
+
this.accessibleDetails = undefined;
|
|
34
|
+
/**
|
|
35
|
+
* String of id's that indicate alternative labels elements
|
|
36
|
+
*/
|
|
37
|
+
this.accessibleLabelledBy = undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Aria description the button
|
|
40
|
+
*/
|
|
41
|
+
this.accessibleDescription = undefined;
|
|
30
42
|
/**
|
|
31
43
|
* Defaults for accessibleLive
|
|
32
44
|
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
@@ -162,7 +174,7 @@ export class DuetNumberInput {
|
|
|
162
174
|
this.handleChange = (ev) => {
|
|
163
175
|
const input = ev.target;
|
|
164
176
|
if (input && input.value) {
|
|
165
|
-
let value =
|
|
177
|
+
let value = SafeParseFloat(input.value, this.locale);
|
|
166
178
|
// Make sure that everything works if the user clears the input and
|
|
167
179
|
// starts typing non-numeric characters.
|
|
168
180
|
if (isNaN(value) || value == null) {
|
|
@@ -172,7 +184,7 @@ export class DuetNumberInput {
|
|
|
172
184
|
this.duetInput.emit({
|
|
173
185
|
component: "duet-number-input",
|
|
174
186
|
originalEvent: ev,
|
|
175
|
-
value: this.
|
|
187
|
+
value: SafeParseFloat(this.value, this.locale).toString(),
|
|
176
188
|
valueAsNumber: value,
|
|
177
189
|
});
|
|
178
190
|
}
|
|
@@ -193,30 +205,29 @@ export class DuetNumberInput {
|
|
|
193
205
|
if (input.value) {
|
|
194
206
|
// On blur we want to make sure that the user input is between the min and max values,
|
|
195
207
|
// and also round it up or down to the nearest step.
|
|
196
|
-
let value =
|
|
208
|
+
let value = SafeParseFloat(input.value, this.locale);
|
|
197
209
|
if (this.rounding) {
|
|
198
210
|
value = roundTo(value, this.step);
|
|
199
211
|
}
|
|
200
212
|
value = clamp(value, this.min, this.max);
|
|
201
|
-
if (value !==
|
|
213
|
+
if (value !== SafeParseFloat(this.value, this.locale) ||
|
|
214
|
+
value !== SafeParseFloat(this.focusedValue, this.locale)) {
|
|
202
215
|
this.setValue(value);
|
|
203
216
|
this.emitChange(ev);
|
|
204
217
|
}
|
|
205
218
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
213
|
-
}
|
|
219
|
+
this.duetChange.emit({
|
|
220
|
+
originalEvent: ev,
|
|
221
|
+
value: null,
|
|
222
|
+
valueAsNumber: null,
|
|
223
|
+
component: "duet-number-input",
|
|
224
|
+
});
|
|
214
225
|
};
|
|
215
226
|
/**
|
|
216
227
|
* Local methods.
|
|
217
228
|
*/
|
|
218
229
|
this.emitChange = (ev) => {
|
|
219
|
-
const currentValue = this.
|
|
230
|
+
const currentValue = SafeParseFloat(this.value, this.locale);
|
|
220
231
|
this.duetChange.emit({
|
|
221
232
|
originalEvent: ev,
|
|
222
233
|
value: currentValue.toString(),
|
|
@@ -224,10 +235,6 @@ export class DuetNumberInput {
|
|
|
224
235
|
component: "duet-number-input",
|
|
225
236
|
});
|
|
226
237
|
};
|
|
227
|
-
this.cleanValue = (value) => {
|
|
228
|
-
// Returns a number that can be used in calculations.
|
|
229
|
-
return value ? parseLocaleFloat(value, this.locale) : null;
|
|
230
|
-
};
|
|
231
238
|
this.localizeValue = (value) => {
|
|
232
239
|
// Returns a localized string that can be used as input value.
|
|
233
240
|
return value.toLocaleString(this.locale);
|
|
@@ -244,13 +251,13 @@ export class DuetNumberInput {
|
|
|
244
251
|
if (ev) {
|
|
245
252
|
ev.preventDefault();
|
|
246
253
|
}
|
|
247
|
-
const
|
|
254
|
+
const cleanedValue = SafeParseFloat(this.value, this.locale);
|
|
248
255
|
// Only fire change event when necessary
|
|
249
|
-
if (
|
|
256
|
+
if (cleanedValue === this.max) {
|
|
250
257
|
return;
|
|
251
258
|
}
|
|
252
259
|
// in cases where no value set, incrementing should go to min
|
|
253
|
-
let newValue =
|
|
260
|
+
let newValue = cleanedValue == null ? this.min : cleanedValue + this.step;
|
|
254
261
|
// handle cases where value is not multiple of step
|
|
255
262
|
// e.g. if someone enters 199, with a step of 100, add should go to 200
|
|
256
263
|
// and if someone enters 101, add should also go to 200
|
|
@@ -258,8 +265,8 @@ export class DuetNumberInput {
|
|
|
258
265
|
const adjustment = newValue % this.step;
|
|
259
266
|
newValue -= adjustment;
|
|
260
267
|
}
|
|
261
|
-
|
|
262
|
-
this.value = this.localizeValue(
|
|
268
|
+
const clampedValue = clamp(newValue, this.min, this.max);
|
|
269
|
+
this.value = this.localizeValue(clampedValue);
|
|
263
270
|
this.emitChange(ev);
|
|
264
271
|
};
|
|
265
272
|
this.subtract = (ev) => {
|
|
@@ -268,7 +275,7 @@ export class DuetNumberInput {
|
|
|
268
275
|
if (ev) {
|
|
269
276
|
ev.preventDefault();
|
|
270
277
|
}
|
|
271
|
-
const currentValue = this.
|
|
278
|
+
const currentValue = SafeParseFloat(this.value, this.locale);
|
|
272
279
|
// Only fire change event when necessary.
|
|
273
280
|
if (currentValue === this.min) {
|
|
274
281
|
return;
|
|
@@ -293,7 +300,7 @@ export class DuetNumberInput {
|
|
|
293
300
|
inheritGlobalTheme(this);
|
|
294
301
|
// Format the number value to a localeString initially.
|
|
295
302
|
if (this.value) {
|
|
296
|
-
this.value = this.localizeValue(
|
|
303
|
+
this.value = this.localizeValue(SafeParseFloat(this.value, this.locale));
|
|
297
304
|
}
|
|
298
305
|
}
|
|
299
306
|
/**
|
|
@@ -308,7 +315,7 @@ export class DuetNumberInput {
|
|
|
308
315
|
this.duetInputElement.value = "";
|
|
309
316
|
}
|
|
310
317
|
formatAnnouncement() {
|
|
311
|
-
const current = this.
|
|
318
|
+
const current = SafeParseFloat(this.value, this.locale);
|
|
312
319
|
if (current == null) {
|
|
313
320
|
return "";
|
|
314
321
|
}
|
|
@@ -321,14 +328,14 @@ export class DuetNumberInput {
|
|
|
321
328
|
render() {
|
|
322
329
|
const identifier = this.identifier || this.inputId;
|
|
323
330
|
const maxlength = `${this.localizeValue(this.max)} ${this.unit}`.length;
|
|
324
|
-
const cleanedValue = this.
|
|
331
|
+
const cleanedValue = SafeParseFloat(this.value, this.locale);
|
|
325
332
|
return (h(Host, { class: {
|
|
326
333
|
"duet-theme-turva": this.theme === "turva",
|
|
327
334
|
"duet-expand": this.expand,
|
|
328
335
|
"duet-m-0": this.margin === "none",
|
|
329
336
|
} },
|
|
330
337
|
h("div", { class: "duet-number-container" },
|
|
331
|
-
h("duet-input", { ref: input => (this.duetInputElement = input), onDuetChange: event => this.handleChange(event), onDuetFocus: this.handleFocus, onDuetBlur: event => this.handleBlur(event), onKeyDown: event => this.handleKeyDown(event), label: this.label, value: this.value ? `${this.value} ${this.unit}` : "", error: this.error, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": cleanedValue != null ? cleanedValue : "", maxlength: maxlength, name: this.name, component: "number", required: this.required, disabled: this.disabled, role: this.role, labelHidden: this.labelHidden, tooltip: this.tooltip, identifier: identifier, theme: this.theme, margin: "none", expand: true, numericKeyboard: true, autoComplete: "off", type: "text", accessibleActiveDescendant: this.accessibleActiveDescendant, accessibleControls: this.accessibleControls, accessibleOwns: this.accessibleOwns, accessibleDescribedBy: this.accessibleDescribedBy },
|
|
338
|
+
h("duet-input", { ref: input => (this.duetInputElement = input), onDuetChange: event => this.handleChange(event), onDuetFocus: this.handleFocus, onDuetBlur: event => this.handleBlur(event), onKeyDown: event => this.handleKeyDown(event), label: this.label, value: this.value ? `${this.value} ${this.unit}` : "", error: this.error, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": cleanedValue != null ? cleanedValue : "", maxlength: maxlength, name: this.name, component: "number", required: this.required, disabled: this.disabled, role: this.role, labelHidden: this.labelHidden, tooltip: this.tooltip, identifier: identifier, theme: this.theme, margin: "none", expand: true, numericKeyboard: true, autoComplete: "off", type: "text", accessibleActiveDescendant: this.accessibleActiveDescendant, accessibleLabelledBy: this.accessibleLabelledBy, accessibleDescription: this.accessibleDescription, accessibleDetails: this.accessibleDetails, accessibleControls: this.accessibleControls, accessibleOwns: this.accessibleOwns, accessibleDescribedBy: this.accessibleDescribedBy },
|
|
332
339
|
h("div", { class: { "duet-number-buttons": true, "duet-no-label": this.labelHidden } },
|
|
333
340
|
h("button", { "aria-controls": identifier, disabled: this.disabled, "aria-disabled": cleanedValue == null || cleanedValue === this.min ? "true" : "false", class: "duet-number-button duet-number-button-subtract", onClick: this.subtract, type: "button" },
|
|
334
341
|
h("duet-visually-hidden", null,
|
|
@@ -457,6 +464,60 @@ export class DuetNumberInput {
|
|
|
457
464
|
"attribute": "accessible-controls",
|
|
458
465
|
"reflect": false
|
|
459
466
|
},
|
|
467
|
+
"accessibleDetails": {
|
|
468
|
+
"type": "string",
|
|
469
|
+
"mutable": false,
|
|
470
|
+
"complexType": {
|
|
471
|
+
"original": "string",
|
|
472
|
+
"resolved": "string",
|
|
473
|
+
"references": {}
|
|
474
|
+
},
|
|
475
|
+
"required": false,
|
|
476
|
+
"optional": false,
|
|
477
|
+
"docs": {
|
|
478
|
+
"tags": [],
|
|
479
|
+
"text": "Details of the component"
|
|
480
|
+
},
|
|
481
|
+
"attribute": "accessible-details",
|
|
482
|
+
"reflect": false,
|
|
483
|
+
"defaultValue": "undefined"
|
|
484
|
+
},
|
|
485
|
+
"accessibleLabelledBy": {
|
|
486
|
+
"type": "string",
|
|
487
|
+
"mutable": false,
|
|
488
|
+
"complexType": {
|
|
489
|
+
"original": "string",
|
|
490
|
+
"resolved": "string",
|
|
491
|
+
"references": {}
|
|
492
|
+
},
|
|
493
|
+
"required": false,
|
|
494
|
+
"optional": false,
|
|
495
|
+
"docs": {
|
|
496
|
+
"tags": [],
|
|
497
|
+
"text": "String of id's that indicate alternative labels elements"
|
|
498
|
+
},
|
|
499
|
+
"attribute": "accessible-labelled-by",
|
|
500
|
+
"reflect": false,
|
|
501
|
+
"defaultValue": "undefined"
|
|
502
|
+
},
|
|
503
|
+
"accessibleDescription": {
|
|
504
|
+
"type": "string",
|
|
505
|
+
"mutable": false,
|
|
506
|
+
"complexType": {
|
|
507
|
+
"original": "string",
|
|
508
|
+
"resolved": "string",
|
|
509
|
+
"references": {}
|
|
510
|
+
},
|
|
511
|
+
"required": false,
|
|
512
|
+
"optional": false,
|
|
513
|
+
"docs": {
|
|
514
|
+
"tags": [],
|
|
515
|
+
"text": "Aria description the button"
|
|
516
|
+
},
|
|
517
|
+
"attribute": "accessible-description",
|
|
518
|
+
"reflect": false,
|
|
519
|
+
"defaultValue": "undefined"
|
|
520
|
+
},
|
|
460
521
|
"accessibleOwns": {
|
|
461
522
|
"type": "string",
|
|
462
523
|
"mutable": false,
|