@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-9e6ac831.js';
|
|
5
5
|
import { i as isInternetExplorer } from './is-internet-explorer-62b3bdbd.js';
|
|
6
6
|
|
|
7
7
|
const duetLayoutCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-layout-has-top{margin-top:0}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout.duet-center{display:flex;align-items:center;justify-content:center;width:100%;max-width:888px}@media (min-width: 36em){.duet-layout.duet-center{padding:0 48px}}@media (min-width: 48em){.duet-layout.duet-center{padding:0 72px}}@media (min-width: 62em){.duet-layout.duet-center{width:100%}}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main,.duet-sidebar,.duet-layout-top,.duet-layout-bottom{display:block;width:100%}.duet-layout-top{position:relative;display:block;width:100%;margin:72px auto 0}.duet-layout-top.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout-top .duet-layout-top-wrapper{padding:0 20px;margin:0 auto}@media (min-width: 36em){.duet-layout-top .duet-layout-top-wrapper{padding:0 28px}}@media (min-width: 62em){.duet-layout-top .duet-layout-top-wrapper{padding:0 56px}}@media (min-width: 76.25em){.duet-layout-top .duet-layout-top-wrapper{max-width:1110px;padding:0}}.duet-center .duet-layout-top-wrapper{max-width:888px}@media (min-width: 36em){.duet-center .duet-layout-top-wrapper{padding:0 48px}}@media (min-width: 48em){.duet-center .duet-layout-top-wrapper{padding:0 72px}}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}@media (min-width: 62em){.duet-sidebar{min-width:256px;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container{width:auto;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container.has-tabs{margin-top:89px}}@media (min-width: 62em){.duet-sidebar-container.sticky{position:sticky}.duet-sidebar-container.sticky.with-links{top:calc(3rem + 20px)}.duet-sidebar-container.sticky.without-links{top:calc(4rem + 20px)}}";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement, H as Host } from './index-
|
|
5
|
-
import { i as inheritGlobalTheme } from './themeable-component-
|
|
4
|
+
import { r as registerInstance, h, g as getElement, H as Host } from './index-9e6ac831.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { w as watchForOptions } from './watch-options-dd55bce8.js';
|
|
7
7
|
|
|
8
8
|
const duetListCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-list-component{margin-bottom:16px !important;width:100%}.duet-list-component.duet-p-0{padding:0 !important}.duet-list-component.duet-m-0{margin:0 !important}";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-9e6ac831.js';
|
|
5
5
|
import { d as disableBodyScroll, e as enableBodyScroll } from './bodyScrollLock.es6-61b5e9a4.js';
|
|
6
|
+
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
7
|
import { c as createID } from './create-id-981107da.js';
|
|
7
|
-
import { f as focusElement, F as FocusGuard } from './focus-utils-
|
|
8
|
+
import { f as focusElement, F as FocusGuard } from './focus-utils-6313db97.js';
|
|
8
9
|
import { f as isEscapeKey } from './keyboard-utils-88ea1007.js';
|
|
9
10
|
import { a as getLanguage, g as getLocaleString } from './language-utils-bf701d37.js';
|
|
10
|
-
import { i as inheritGlobalTheme } from './themeable-component-e8fc98bf.js';
|
|
11
11
|
import './string-utils-5954f458.js';
|
|
12
12
|
|
|
13
13
|
const duetModalCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:900;max-height:100vh;overflow-y:auto;visibility:hidden;background:rgba(0, 41, 77, 0.85);opacity:0;transition:300ms ease;transition-delay:200ms}.duet-modal-overlay.duet-theme-turva{background:rgba(23, 28, 58, 0.85)}.duet-modal-overlay.duet-modal-active{visibility:visible;opacity:1;transition:300ms ease;transition-delay:0s}.duet-modal-overlay.duet-disable-transitions{transition:none}::slotted(img){width:100%}.duet-modal-inner{display:flex;align-items:center;width:100%;min-height:100%;padding:20px 16px}@media (min-width: 36em){.duet-modal-inner{padding:48px 16px}}@media (max-width: 35.9375em){.duet-modal-inner.duet-modal-large{padding-right:0;padding-left:0}}.duet-modal{position:relative;width:100%;max-width:686px;margin:auto;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:#00294d;background:white;border-radius:4px;opacity:0;transition:300ms ease;transition-delay:0ms;transform:scale(0.96)}.duet-theme-turva .duet-modal{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-modal-active .duet-modal{opacity:1;transition:300ms ease;transition-delay:200ms;transform:none}.duet-disable-transitions .duet-modal{transition:none}.duet-modal.small{max-width:545px}.duet-modal.large{max-width:100%}@media (min-width: 36em){.duet-modal.large{max-width:1110px}}.duet-modal:focus{outline:0}.duet-modal-body{width:100%;padding:36px 28px}.duet-modal-body.duet-modal-gutter-small{padding:36px 20px}.duet-modal-body.duet-modal-gutter-large{padding:48px 36px}@media (max-width: 22.5em){.duet-modal-body{padding:36px 20px}.duet-modal-body.duet-modal-gutter-large{padding:48px 28px}}@media (max-width: 35.9375em){.duet-modal-body{padding:36px 20px}.duet-modal-body.duet-modal-gutter-large{padding:48px 36px}}@media (min-width: 36em){.duet-modal-body{padding:36px}.duet-modal-body.duet-modal-gutter-large{padding:28px 72px}}@media (min-width: 48em){.duet-modal-body{padding:36px 72px}.duet-modal-body.duet-modal-gutter-large{padding:36px 72px}}@media (min-width: 76.25em){.duet-modal-body{padding:36px 48px 48px}.duet-modal-body.duet-modal-gutter-large{padding:48px 94px}.small .duet-modal-body{padding:36px 48px}}.duet-modal-header{text-align:center}.duet-modal-close{position:absolute;top:12px;right:12px}.duet-modal-heading{width:100%;padding-right:60px;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-style:normal;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;text-overflow:ellipsis;letter-spacing:-0.01rem;white-space:nowrap}.duet-modal-heading.duet-p-0{padding:0 !important}.duet-modal-heading.duet-m-0{margin:0 !important}";
|
|
@@ -76,6 +76,14 @@ const DuetModal = class {
|
|
|
76
76
|
* Size of the modal window.
|
|
77
77
|
*/
|
|
78
78
|
this.size = "medium";
|
|
79
|
+
/**
|
|
80
|
+
* Details of the component
|
|
81
|
+
*/
|
|
82
|
+
this.accessibleDetails = undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Aria description the button
|
|
85
|
+
*/
|
|
86
|
+
this.accessibleDescription = undefined;
|
|
79
87
|
/**
|
|
80
88
|
* Size of the modal window.
|
|
81
89
|
*/
|
|
@@ -217,7 +225,7 @@ const DuetModal = class {
|
|
|
217
225
|
iconColor = "primary-turva";
|
|
218
226
|
closeColor = "secondary-turva";
|
|
219
227
|
}
|
|
220
|
-
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: {
|
|
228
|
+
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: {
|
|
221
229
|
"duet-modal-overlay": true,
|
|
222
230
|
"duet-theme-turva": this.theme === "turva",
|
|
223
231
|
"duet-modal-active": this.open,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, g as getElement } from './index-9e6ac831.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
5
6
|
import { a as getLanguage, g as getLocaleString } from './language-utils-bf701d37.js';
|
|
6
|
-
import { i as inheritGlobalTheme } from './themeable-component-e8fc98bf.js';
|
|
7
7
|
import { a as actionArrowDownSmall } from './action-arrow-down-small-82273dc8.js';
|
|
8
8
|
import './string-utils-5954f458.js';
|
|
9
9
|
|
|
@@ -1,38 +1,88 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9e6ac831.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
5
6
|
import { c as createID } from './create-id-981107da.js';
|
|
6
7
|
import { a as isArrowRightKey, b as isArrowUpKey, c as isArrowDownKey, d as isArrowLeftKey, e as isBackspaceKey } from './keyboard-utils-88ea1007.js';
|
|
7
8
|
import { a as getLanguage, b as getLocale, g as getLocaleString } from './language-utils-bf701d37.js';
|
|
8
|
-
import { i as inheritGlobalTheme } from './themeable-component-e8fc98bf.js';
|
|
9
9
|
import './string-utils-5954f458.js';
|
|
10
10
|
|
|
11
11
|
var actionAdd={"title":"action-add","tags":"action add plus","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M12 24a.75.75 0 0 1-.75-.75v-10.5H.75a.75.75 0 0 1 0-1.5h10.5V.75a.75.75 0 0 1 1.5 0v10.5h10.5a.75.75 0 0 1 0 1.5h-10.5v10.5A.75.75 0 0 1 12 24z\"/></svg>"};
|
|
12
12
|
|
|
13
13
|
var actionSubtract={"title":"action-subtract","tags":"action subtract minus remove delete cancel","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M.75 12.788a.75.75 0 0 1 0-1.5h22.5a.75.75 0 0 1 0 1.5z\"/></svg>"};
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
/**
|
|
16
|
+
* function that takes a string value or number and looks for any character resembling a minus,
|
|
17
|
+
* it will then replace it with a hypen-minus and return the parseFloat value of that string
|
|
18
|
+
* it will string / number cast the value to a number and return that number
|
|
19
|
+
* known issues: if a negative number is indicated with other characters than a "minus like" character, it will throw
|
|
20
|
+
* - an example is that some locales use (number) as an indicator for negative values instead of -number
|
|
21
|
+
*/
|
|
22
|
+
function SafeParseFloat(value, locale) {
|
|
23
|
+
let results;
|
|
24
|
+
if (typeof value === "string") {
|
|
25
|
+
//the minuses are NOT the same characters, they differ in unicode for some languages
|
|
26
|
+
// "‐", "−", "–", and "—"
|
|
27
|
+
let convertedMinus = value.replace("−", "-").replace("‐", "-").replace("−", "-").replace("–", "-").replace("—", "-");
|
|
28
|
+
if (locale) {
|
|
29
|
+
convertedMinus = ConvertToEnUS(convertedMinus, locale, false);
|
|
30
|
+
}
|
|
31
|
+
// replace all possible spaces from the string
|
|
32
|
+
convertedMinus = convertedMinus.replace(/\s+/g, "");
|
|
33
|
+
convertedMinus = convertedMinus.replace(/(?!^-?\d*\.{0,1}\d+$)/g, "");
|
|
34
|
+
/*
|
|
35
|
+
example: https://regex101.com/r/np7FqS/1
|
|
36
|
+
/(?!^-?\d*\.{0,1}\d+$)/g
|
|
37
|
+
Negative Lookahead (?!^-?\d*\.{0,1}\d+$)
|
|
38
|
+
Assert that the Regex below does not match
|
|
39
|
+
^ asserts position at start of a line
|
|
40
|
+
- matches the character - with index 4510 (2D16 or 558) literally (case sensitive)
|
|
41
|
+
? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
|
|
42
|
+
\d matches a digit (equivalent to [0-9])
|
|
43
|
+
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
|
|
44
|
+
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
|
|
45
|
+
{0,1} matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
|
|
46
|
+
\d matches a digit (equivalent to [0-9])
|
|
47
|
+
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
|
|
48
|
+
$ asserts position at the end of a line
|
|
49
|
+
Global pattern flags
|
|
50
|
+
g modifier: global. All matches (don't return after first match)
|
|
51
|
+
m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)
|
|
52
|
+
*/
|
|
53
|
+
results = parseFloat(convertedMinus);
|
|
33
54
|
}
|
|
34
|
-
|
|
35
|
-
|
|
55
|
+
if (typeof value === "number") {
|
|
56
|
+
results = parseFloat(String(value));
|
|
57
|
+
}
|
|
58
|
+
if (!isNaN(Number(results))) {
|
|
59
|
+
return Number(results);
|
|
60
|
+
}
|
|
61
|
+
if (value === null || value === undefined) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
throw new Error("Invalid value passed to SafeParseFloat");
|
|
65
|
+
}
|
|
66
|
+
// string conversion function that takes a locale and coverts decimal indicator to en-US indicator
|
|
67
|
+
// and takes the thousand separator for the given locale and transforms that to the en-US separator
|
|
68
|
+
function ConvertToEnUS(value, locale, replaceThousands = false) {
|
|
69
|
+
let replacedValue;
|
|
70
|
+
const localeSeparator = new Intl.NumberFormat(locale).format(1 / 2).replace(/[0-9]/g, "");
|
|
71
|
+
const enUSSeparator = new Intl.NumberFormat("en-US").format(1 / 2).replace(/[0-9]/g, "");
|
|
72
|
+
const thousandSeparator = new Intl.NumberFormat(locale).format(1000).replace(/[0-9]/g, "");
|
|
73
|
+
const enUSThousandSeparator = new Intl.NumberFormat("en-US").format(1000).replace(/[0-9]/g, "");
|
|
74
|
+
// double conversions to avoid ,->. and .->, at the same time resulting in a double conversion
|
|
75
|
+
replacedValue = value.replace(localeSeparator, "DECIMALSEPARATOR");
|
|
76
|
+
if (replaceThousands) {
|
|
77
|
+
replacedValue = replacedValue.replace(thousandSeparator, "THOUSANDSEPARATOR");
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
replacedValue = replacedValue.replace(thousandSeparator, "");
|
|
81
|
+
}
|
|
82
|
+
replacedValue = replacedValue.replace("DECIMALSEPARATOR", enUSSeparator);
|
|
83
|
+
replacedValue = replacedValue.replace("THOUSANDSEPARATOR", enUSThousandSeparator);
|
|
84
|
+
return replacedValue;
|
|
85
|
+
}
|
|
36
86
|
const roundTo = (val, multiple) => Math.round(val / multiple) * multiple;
|
|
37
87
|
const clamp = (val, min, max) => Math.min(Math.max(val, min), max);
|
|
38
88
|
|
|
@@ -61,6 +111,18 @@ const DuetNumberInput = class {
|
|
|
61
111
|
* Unit for the number input.
|
|
62
112
|
*/
|
|
63
113
|
this.unit = getLocale(this.language).money;
|
|
114
|
+
/**
|
|
115
|
+
* Details of the component
|
|
116
|
+
*/
|
|
117
|
+
this.accessibleDetails = undefined;
|
|
118
|
+
/**
|
|
119
|
+
* String of id's that indicate alternative labels elements
|
|
120
|
+
*/
|
|
121
|
+
this.accessibleLabelledBy = undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Aria description the button
|
|
124
|
+
*/
|
|
125
|
+
this.accessibleDescription = undefined;
|
|
64
126
|
/**
|
|
65
127
|
* Defaults for accessibleLive
|
|
66
128
|
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
@@ -196,7 +258,7 @@ const DuetNumberInput = class {
|
|
|
196
258
|
this.handleChange = (ev) => {
|
|
197
259
|
const input = ev.target;
|
|
198
260
|
if (input && input.value) {
|
|
199
|
-
let value =
|
|
261
|
+
let value = SafeParseFloat(input.value, this.locale);
|
|
200
262
|
// Make sure that everything works if the user clears the input and
|
|
201
263
|
// starts typing non-numeric characters.
|
|
202
264
|
if (isNaN(value) || value == null) {
|
|
@@ -206,7 +268,7 @@ const DuetNumberInput = class {
|
|
|
206
268
|
this.duetInput.emit({
|
|
207
269
|
component: "duet-number-input",
|
|
208
270
|
originalEvent: ev,
|
|
209
|
-
value: this.
|
|
271
|
+
value: SafeParseFloat(this.value, this.locale).toString(),
|
|
210
272
|
valueAsNumber: value,
|
|
211
273
|
});
|
|
212
274
|
}
|
|
@@ -227,30 +289,29 @@ const DuetNumberInput = class {
|
|
|
227
289
|
if (input.value) {
|
|
228
290
|
// On blur we want to make sure that the user input is between the min and max values,
|
|
229
291
|
// and also round it up or down to the nearest step.
|
|
230
|
-
let value =
|
|
292
|
+
let value = SafeParseFloat(input.value, this.locale);
|
|
231
293
|
if (this.rounding) {
|
|
232
294
|
value = roundTo(value, this.step);
|
|
233
295
|
}
|
|
234
296
|
value = clamp(value, this.min, this.max);
|
|
235
|
-
if (value !==
|
|
297
|
+
if (value !== SafeParseFloat(this.value, this.locale) ||
|
|
298
|
+
value !== SafeParseFloat(this.focusedValue, this.locale)) {
|
|
236
299
|
this.setValue(value);
|
|
237
300
|
this.emitChange(ev);
|
|
238
301
|
}
|
|
239
302
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
});
|
|
247
|
-
}
|
|
303
|
+
this.duetChange.emit({
|
|
304
|
+
originalEvent: ev,
|
|
305
|
+
value: null,
|
|
306
|
+
valueAsNumber: null,
|
|
307
|
+
component: "duet-number-input",
|
|
308
|
+
});
|
|
248
309
|
};
|
|
249
310
|
/**
|
|
250
311
|
* Local methods.
|
|
251
312
|
*/
|
|
252
313
|
this.emitChange = (ev) => {
|
|
253
|
-
const currentValue = this.
|
|
314
|
+
const currentValue = SafeParseFloat(this.value, this.locale);
|
|
254
315
|
this.duetChange.emit({
|
|
255
316
|
originalEvent: ev,
|
|
256
317
|
value: currentValue.toString(),
|
|
@@ -258,10 +319,6 @@ const DuetNumberInput = class {
|
|
|
258
319
|
component: "duet-number-input",
|
|
259
320
|
});
|
|
260
321
|
};
|
|
261
|
-
this.cleanValue = (value) => {
|
|
262
|
-
// Returns a number that can be used in calculations.
|
|
263
|
-
return value ? parseLocaleFloat(value, this.locale) : null;
|
|
264
|
-
};
|
|
265
322
|
this.localizeValue = (value) => {
|
|
266
323
|
// Returns a localized string that can be used as input value.
|
|
267
324
|
return value.toLocaleString(this.locale);
|
|
@@ -278,13 +335,13 @@ const DuetNumberInput = class {
|
|
|
278
335
|
if (ev) {
|
|
279
336
|
ev.preventDefault();
|
|
280
337
|
}
|
|
281
|
-
const
|
|
338
|
+
const cleanedValue = SafeParseFloat(this.value, this.locale);
|
|
282
339
|
// Only fire change event when necessary
|
|
283
|
-
if (
|
|
340
|
+
if (cleanedValue === this.max) {
|
|
284
341
|
return;
|
|
285
342
|
}
|
|
286
343
|
// in cases where no value set, incrementing should go to min
|
|
287
|
-
let newValue =
|
|
344
|
+
let newValue = cleanedValue == null ? this.min : cleanedValue + this.step;
|
|
288
345
|
// handle cases where value is not multiple of step
|
|
289
346
|
// e.g. if someone enters 199, with a step of 100, add should go to 200
|
|
290
347
|
// and if someone enters 101, add should also go to 200
|
|
@@ -292,8 +349,8 @@ const DuetNumberInput = class {
|
|
|
292
349
|
const adjustment = newValue % this.step;
|
|
293
350
|
newValue -= adjustment;
|
|
294
351
|
}
|
|
295
|
-
|
|
296
|
-
this.value = this.localizeValue(
|
|
352
|
+
const clampedValue = clamp(newValue, this.min, this.max);
|
|
353
|
+
this.value = this.localizeValue(clampedValue);
|
|
297
354
|
this.emitChange(ev);
|
|
298
355
|
};
|
|
299
356
|
this.subtract = (ev) => {
|
|
@@ -302,7 +359,7 @@ const DuetNumberInput = class {
|
|
|
302
359
|
if (ev) {
|
|
303
360
|
ev.preventDefault();
|
|
304
361
|
}
|
|
305
|
-
const currentValue = this.
|
|
362
|
+
const currentValue = SafeParseFloat(this.value, this.locale);
|
|
306
363
|
// Only fire change event when necessary.
|
|
307
364
|
if (currentValue === this.min) {
|
|
308
365
|
return;
|
|
@@ -327,7 +384,7 @@ const DuetNumberInput = class {
|
|
|
327
384
|
inheritGlobalTheme(this);
|
|
328
385
|
// Format the number value to a localeString initially.
|
|
329
386
|
if (this.value) {
|
|
330
|
-
this.value = this.localizeValue(
|
|
387
|
+
this.value = this.localizeValue(SafeParseFloat(this.value, this.locale));
|
|
331
388
|
}
|
|
332
389
|
}
|
|
333
390
|
/**
|
|
@@ -342,7 +399,7 @@ const DuetNumberInput = class {
|
|
|
342
399
|
this.duetInputElement.value = "";
|
|
343
400
|
}
|
|
344
401
|
formatAnnouncement() {
|
|
345
|
-
const current = this.
|
|
402
|
+
const current = SafeParseFloat(this.value, this.locale);
|
|
346
403
|
if (current == null) {
|
|
347
404
|
return "";
|
|
348
405
|
}
|
|
@@ -355,12 +412,12 @@ const DuetNumberInput = class {
|
|
|
355
412
|
render() {
|
|
356
413
|
const identifier = this.identifier || this.inputId;
|
|
357
414
|
const maxlength = `${this.localizeValue(this.max)} ${this.unit}`.length;
|
|
358
|
-
const cleanedValue = this.
|
|
415
|
+
const cleanedValue = SafeParseFloat(this.value, this.locale);
|
|
359
416
|
return (h(Host, { class: {
|
|
360
417
|
"duet-theme-turva": this.theme === "turva",
|
|
361
418
|
"duet-expand": this.expand,
|
|
362
419
|
"duet-m-0": this.margin === "none",
|
|
363
|
-
} }, h("div", { class: "duet-number-container" }, 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 }, h("div", { class: { "duet-number-buttons": true, "duet-no-label": this.labelHidden } }, 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" }, h("duet-visually-hidden", null, this.accessibleSubtract, " ", this.step), h("duet-icon", { icon: actionSubtract.svg, size: "small", margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary" })), h("button", { "aria-controls": identifier, disabled: this.disabled, "aria-disabled": cleanedValue === this.max ? "true" : "false", class: "duet-number-button duet-number-button-add", onClick: this.add, type: "button" }, h("duet-visually-hidden", null, this.accessibleAdd, " ", this.step), h("duet-icon", { icon: actionAdd.svg, size: "small", margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary" })))), this.accessibleLiveEnabled && (h("duet-visually-hidden", { "aria-live": "polite", "aria-atomic": "true", "aria-relevant": "all" }, this.formatAnnouncement())))));
|
|
420
|
+
} }, h("div", { class: "duet-number-container" }, 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 }, h("div", { class: { "duet-number-buttons": true, "duet-no-label": this.labelHidden } }, 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" }, h("duet-visually-hidden", null, this.accessibleSubtract, " ", this.step), h("duet-icon", { icon: actionSubtract.svg, size: "small", margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary" })), h("button", { "aria-controls": identifier, disabled: this.disabled, "aria-disabled": cleanedValue === this.max ? "true" : "false", class: "duet-number-button duet-number-button-add", onClick: this.add, type: "button" }, h("duet-visually-hidden", null, this.accessibleAdd, " ", this.step), h("duet-icon", { icon: actionAdd.svg, size: "small", margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary" })))), this.accessibleLiveEnabled && (h("duet-visually-hidden", { "aria-live": "polite", "aria-atomic": "true", "aria-relevant": "all" }, this.formatAnnouncement())))));
|
|
364
421
|
}
|
|
365
422
|
get element() { return getElement(this); }
|
|
366
423
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-9e6ac831.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
5
6
|
import { c as createID } from './create-id-981107da.js';
|
|
6
7
|
import { d as debounce } from './js-utils-52e0944c.js';
|
|
7
8
|
import { j as isArrowKey, k as isNumber, d as isArrowLeftKey, b as isArrowUpKey, a as isArrowRightKey, c as isArrowDownKey, l as isMinusKey, m as isPlusKey } from './keyboard-utils-88ea1007.js';
|
|
8
9
|
import { g as getLocaleString } from './language-utils-bf701d37.js';
|
|
9
|
-
import { i as inheritGlobalTheme } from './themeable-component-e8fc98bf.js';
|
|
10
10
|
import './string-utils-5954f458.js';
|
|
11
11
|
|
|
12
12
|
const shouldDisplayNavigation = (visibleItems, total, take) => {
|
|
@@ -46,6 +46,22 @@ const DuetPagination = class {
|
|
|
46
46
|
* Variation of the paginator (compact and default supported)
|
|
47
47
|
*/
|
|
48
48
|
this.variation = "default";
|
|
49
|
+
/**
|
|
50
|
+
* Described By id
|
|
51
|
+
*/
|
|
52
|
+
this.accessibleDescribedBy = undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Details of the component
|
|
55
|
+
*/
|
|
56
|
+
this.accessibleDetails = undefined;
|
|
57
|
+
/**
|
|
58
|
+
* String of id's that indicate alternative labels elements
|
|
59
|
+
*/
|
|
60
|
+
this.accessibleLabelledBy = undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Aria description the button
|
|
63
|
+
*/
|
|
64
|
+
this.accessibleDescription = undefined;
|
|
49
65
|
/**
|
|
50
66
|
* Default pagination labels
|
|
51
67
|
*/
|
|
@@ -139,7 +155,7 @@ const DuetPagination = class {
|
|
|
139
155
|
type: "page",
|
|
140
156
|
originalEvent: ev,
|
|
141
157
|
});
|
|
142
|
-
},
|
|
158
|
+
}, 100);
|
|
143
159
|
// this will return the entered number, or the current page if the user presses enter
|
|
144
160
|
this.getEnteredNumber = debounce(ev => {
|
|
145
161
|
this.emitPageEvent(ev, this.numbersStore);
|
|
@@ -185,6 +201,7 @@ const DuetPagination = class {
|
|
|
185
201
|
e.preventDefault();
|
|
186
202
|
e.stopPropagation();
|
|
187
203
|
this.current = this.current + dir;
|
|
204
|
+
this.emitPageEvent(e);
|
|
188
205
|
}
|
|
189
206
|
//handle a11y keyboard navigation events
|
|
190
207
|
async onKeyboardDown(e) {
|
|
@@ -238,12 +255,14 @@ const DuetPagination = class {
|
|
|
238
255
|
e.preventDefault();
|
|
239
256
|
this.internalSectionIndex = 0;
|
|
240
257
|
this.current = 1;
|
|
258
|
+
this.emitPageEvent(e);
|
|
241
259
|
}
|
|
242
260
|
//handles click on the jump (total) button
|
|
243
261
|
jumpToEnd(e) {
|
|
244
262
|
e.preventDefault();
|
|
245
263
|
this.internalSectionIndex = this.totalPages / this.take - 1;
|
|
246
264
|
this.current = this.totalPages;
|
|
265
|
+
this.emitPageEvent(e);
|
|
247
266
|
}
|
|
248
267
|
// render the individual page numbers
|
|
249
268
|
renderPageNumbers() {
|
|
@@ -274,7 +293,7 @@ const DuetPagination = class {
|
|
|
274
293
|
* Always the last one in the class.
|
|
275
294
|
*/
|
|
276
295
|
render() {
|
|
277
|
-
return (h(Host, { onKeyDown: e => this.onKeyboardDown(e) }, h("nav", { role: "navigation", "aria-labelledby": this.listId, "aria-describedby": this.listId, ref: el => (this.nativeNav = el), "aria-controls": this.ariaControls, class: {
|
|
296
|
+
return (h(Host, { onKeyDown: e => this.onKeyboardDown(e) }, h("nav", { role: "navigation", "aria-labelledby": this.accessibleLabelledBy ? `${this.accessibleLabelledBy} ${this.listId}` : this.listId, "aria-describedby": this.accessibleDescribedBy ? `${this.accessibleDescribedBy} ${this.listId}` : this.listId, "aria-descriptions": this.accessibleDescription, "aria-details": this.accessibleDetails, ref: el => (this.nativeNav = el), "aria-controls": this.ariaControls, class: {
|
|
278
297
|
"duet-pagination-nav": true,
|
|
279
298
|
[`duet-pagination-variation-${this.variation}`]: true,
|
|
280
299
|
} }, this.numbersStore !== "" && (h("div", { "aria-live": "assertive", "aria-relevant": "text", class: "duet-pagination-overlay", "aria-label": `${this.accessibleLabels.jump_to} ${this.numbersStore}`, part: "navigation-overlay" }, h("duet-badge", null, "jump to page : ", this.numbersStore))), h("ol", { id: this.listId, class: {
|
|
@@ -357,15 +376,15 @@ const DuetRangeStepper = class {
|
|
|
357
376
|
this.handleStepClick(e);
|
|
358
377
|
};
|
|
359
378
|
}
|
|
360
|
-
|
|
361
|
-
if (newValue
|
|
379
|
+
watchStepIndexStateHandler(newValue) {
|
|
380
|
+
if (newValue <= 1) {
|
|
362
381
|
this.leftBnRef.setAttribute("disabled", "");
|
|
363
382
|
this.rightBnRef.focus();
|
|
364
383
|
}
|
|
365
384
|
else {
|
|
366
385
|
this.leftBnRef.removeAttribute("disabled");
|
|
367
386
|
}
|
|
368
|
-
if (newValue
|
|
387
|
+
if (newValue >= this.total / this.stepSize) {
|
|
369
388
|
this.rightBnRef.setAttribute("disabled", "");
|
|
370
389
|
this.leftBnRef.focus();
|
|
371
390
|
}
|
|
@@ -373,12 +392,20 @@ const DuetRangeStepper = class {
|
|
|
373
392
|
this.rightBnRef.removeAttribute("disabled");
|
|
374
393
|
}
|
|
375
394
|
}
|
|
395
|
+
watchStepSizeStateHandler(newValue, oldValue) {
|
|
396
|
+
if (newValue !== oldValue) {
|
|
397
|
+
if (this.stepIndex * newValue > this.total) {
|
|
398
|
+
this.stepIndex = this.total / newValue;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
376
402
|
handleStepClick(e) {
|
|
403
|
+
const from = this.stepIndex * this.stepSize - this.stepSize;
|
|
377
404
|
this.duetRangeStepUpdate.emit({
|
|
378
405
|
originalEvent: e,
|
|
379
406
|
component: "duet-range-stepper",
|
|
380
|
-
from:
|
|
381
|
-
to: this.
|
|
407
|
+
from: from,
|
|
408
|
+
to: this.getTo(),
|
|
382
409
|
index: this.stepIndex,
|
|
383
410
|
});
|
|
384
411
|
}
|
|
@@ -386,7 +413,7 @@ const DuetRangeStepper = class {
|
|
|
386
413
|
inheritGlobalTheme(this);
|
|
387
414
|
}
|
|
388
415
|
componentDidLoad() {
|
|
389
|
-
this.
|
|
416
|
+
this.watchStepIndexStateHandler(this.stepIndex);
|
|
390
417
|
}
|
|
391
418
|
increment(direction) {
|
|
392
419
|
const newIndex = this.stepIndex + direction;
|
|
@@ -394,20 +421,28 @@ const DuetRangeStepper = class {
|
|
|
394
421
|
this.stepIndex = 1;
|
|
395
422
|
}
|
|
396
423
|
else {
|
|
397
|
-
if (newIndex * this.stepSize
|
|
424
|
+
if (newIndex * this.stepSize < this.total + this.stepSize) {
|
|
398
425
|
this.stepIndex = newIndex;
|
|
399
426
|
}
|
|
427
|
+
else if (newIndex * this.stepSize > this.total + this.stepSize) {
|
|
428
|
+
this.stepIndex = Math.floor(this.total / this.stepSize);
|
|
429
|
+
}
|
|
400
430
|
}
|
|
401
431
|
}
|
|
432
|
+
getTo() {
|
|
433
|
+
const to = this.stepIndex * this.stepSize;
|
|
434
|
+
const result = to > this.total ? this.total : to;
|
|
435
|
+
return result;
|
|
436
|
+
}
|
|
402
437
|
generateStepSize() {
|
|
403
438
|
// this function uses this.stepIndex and this.range to generate a range of number like 1-100
|
|
404
439
|
// this is used to generate the step size
|
|
405
|
-
let start = (this.stepIndex - 1) * this.stepSize;
|
|
440
|
+
let start = Math.floor((this.stepIndex - 1) * this.stepSize);
|
|
406
441
|
//easy fix for starting position
|
|
407
442
|
if (start === 0) {
|
|
408
443
|
start = 1;
|
|
409
444
|
}
|
|
410
|
-
const end = this.stepIndex * this.stepSize;
|
|
445
|
+
const end = Math.floor(this.stepIndex * this.stepSize);
|
|
411
446
|
return this.ariaLabels.x_of_y
|
|
412
447
|
.replace("{0}", String(start))
|
|
413
448
|
.replace("{1}", String(end))
|
|
@@ -445,7 +480,8 @@ const DuetRangeStepper = class {
|
|
|
445
480
|
}
|
|
446
481
|
get element() { return getElement(this); }
|
|
447
482
|
static get watchers() { return {
|
|
448
|
-
"stepIndex": ["
|
|
483
|
+
"stepIndex": ["watchStepIndexStateHandler"],
|
|
484
|
+
"stepSize": ["watchStepSizeStateHandler"]
|
|
449
485
|
}; }
|
|
450
486
|
};
|
|
451
487
|
DuetRangeStepper.style = duetRangeStepperCss;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-9e6ac831.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
5
6
|
import { c as createID } from './create-id-981107da.js';
|
|
6
7
|
import { g as getLocaleString } from './language-utils-bf701d37.js';
|
|
7
|
-
import { i as inheritGlobalTheme } from './themeable-component-e8fc98bf.js';
|
|
8
8
|
import './string-utils-5954f458.js';
|
|
9
9
|
|
|
10
10
|
const duetProgressCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:inherit}.duet-progress{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;min-height:1px;}.duet-progress .progress-bar{position:relative;display:block;width:100%;height:inherit;min-height:1px;background-color:#f3f9fc;border-radius:0;box-shadow:none}.duet-theme-turva .duet-progress .progress-bar{background-color:#fcf3f4}.duet-progress .progress-bar>span{display:block;height:inherit;text-indent:-9999px;background-color:#0077b3;border-radius:0}.duet-theme-turva .duet-progress .progress-bar>span{background-color:#c60c30}.duet-progress progress[value]{display:flex;width:100%;height:inherit;min-height:1px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-theme-turva .duet-progress progress[value]{color:#c60c30}.duet-progress progress[value]::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-bar{background-color:#fcf3f4}.duet-progress progress[value]::-webkit-progress-value{background-color:#0077b3;background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-value{background-color:#c60c30}.duet-progress progress[value] ::-moz-progress-bar{background-color:#f3f9fc}.duet-theme-turva .duet-progress progress[value] ::-moz-progress-bar{background-color:#fcf3f4}";
|
|
@@ -17,6 +17,18 @@ const DuetProgress = class {
|
|
|
17
17
|
*/
|
|
18
18
|
this.progressId = createID("DuetProgress");
|
|
19
19
|
this.progressLabelId = createID("DuetProgressLabel");
|
|
20
|
+
/**
|
|
21
|
+
* Aria Details of the component
|
|
22
|
+
*/
|
|
23
|
+
this.accessibleDetails = undefined;
|
|
24
|
+
/**
|
|
25
|
+
* String of id's that indicate alternative labels elements
|
|
26
|
+
*/
|
|
27
|
+
this.accessibleLabelledBy = undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Aria description the button
|
|
30
|
+
*/
|
|
31
|
+
this.accessibleDescription = undefined;
|
|
20
32
|
/**
|
|
21
33
|
* Defaults for accessibleLabel
|
|
22
34
|
*/
|
|
@@ -62,7 +74,7 @@ const DuetProgress = class {
|
|
|
62
74
|
"duet-progress-start": this.progress === 0,
|
|
63
75
|
"duet-progress-inprogress": this.progress < 99 && this.progress !== 0,
|
|
64
76
|
"duet-theme-turva": this.theme === "turva",
|
|
65
|
-
} }, h("duet-visually-hidden", null, h("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (h("span", null, this.accessibleLabel, ", ", this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))), this.caption && (h("div", { class: "duet-progress-caption" }, h("span", null, this.caption))), h("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" }, h("div", { class: "progress-bar" }, h("span", { style: { width: `${this.progress}%;` } }, "Progress: ", this.progress, "%"))))));
|
|
77
|
+
} }, h("duet-visually-hidden", null, h("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (h("span", null, this.accessibleLabel, ", ", this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))), this.caption && (h("div", { class: "duet-progress-caption" }, h("span", null, this.caption))), h("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, "aria-labelledby": this.accessibleLabelledBy, "aria-details": this.accessibleDetails, "aria-description": this.accessibleDescription, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" }, h("div", { class: "progress-bar" }, h("span", { style: { width: `${this.progress}%;` } }, "Progress: ", this.progress, "%"))))));
|
|
66
78
|
}
|
|
67
79
|
get element() { return getElement(this); }
|
|
68
80
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9e6ac831.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
5
6
|
import { c as createID } from './create-id-981107da.js';
|
|
6
|
-
import { i as inheritGlobalTheme } from './themeable-component-e8fc98bf.js';
|
|
7
7
|
import { f as findCheckedOption, w as watchForOptions } from './watch-options-dd55bce8.js';
|
|
8
8
|
|
|
9
9
|
const duetRadioCss = "*.sc-duet-radio,*.sc-duet-radio::after,*.sc-duet-radio::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-radio-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:28px !important;margin-bottom:12px !important;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-radio-h:last-child,.sc-duet-radio-h:last-of-type{margin-right:0 !important}.vertical.sc-duet-radio-h{margin-right:0 !important}.horizontal.sc-duet-radio-h{margin-bottom:0 !important;width:auto}.horizontal.sc-duet-radio-h .duet-label.sc-duet-radio span.sc-duet-radio{max-width:100%}@media (min-width: 48em){.horizontal-responsive.sc-duet-radio-h{margin-right:28px !important;margin-bottom:0 !important;width:auto}.horizontal-responsive.sc-duet-radio-h:last-child,.horizontal-responsive.sc-duet-radio-h:last-of-type{margin-right:0 !important}.horizontal-responsive.sc-duet-radio-h .duet-label.sc-duet-radio span.sc-duet-radio{max-width:100%}}.duet-m-0.sc-duet-radio-h{margin:0 !important}.sc-duet-radio-h:last-child:not(:only-child){margin-right:0 !important;margin-bottom:0 !important}.duet-label.sc-duet-radio{position:relative;z-index:100;display:flex;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;cursor:pointer;background:transparent}.duet-theme-turva.sc-duet-radio .duet-label.sc-duet-radio{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-label.sc-duet-radio span.sc-duet-radio{flex-grow:1;font-size:1rem}.duet-label-hidden.sc-duet-radio .duet-label.sc-duet-radio{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-radio-container.sc-duet-radio{position:relative;width:100%;height:100%}.duet-radio.sc-duet-radio{padding:14px !important;position:absolute;top:0;left:0;z-index:200;width:100%;height:100%;cursor:pointer;opacity:0}.duet-radio.sc-duet-radio+label.sc-duet-radio::before{z-index:100;flex-shrink:0;width:20px;height:20px;margin:2px 10px 1px 1px;content:\"\";background:white;border:1px solid #00294d;border-radius:50%}.duet-theme-turva.sc-duet-radio .duet-radio.sc-duet-radio+label.sc-duet-radio::before{border-color:#171c3a}.duet-radio.sc-duet-radio:focus+label.sc-duet-radio::before{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva.sc-duet-radio .duet-radio.sc-duet-radio:focus+label.sc-duet-radio::before{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-radio.sc-duet-radio:checked+label.sc-duet-radio::after{position:absolute;top:6px;left:5px;z-index:200;flex-shrink:0;width:12px;height:12px;content:\"\";background:#00294d;border-radius:50%}.duet-theme-turva.sc-duet-radio .duet-radio.sc-duet-radio:checked+label.sc-duet-radio::after{background:#171c3a}.duet-radio[disabled].sc-duet-radio{cursor:default}.duet-radio[disabled].sc-duet-radio+label.sc-duet-radio{color:#657787}.duet-theme-turva.sc-duet-radio .duet-radio[disabled].sc-duet-radio+label.sc-duet-radio{color:#747475}.duet-radio[disabled].sc-duet-radio+label.sc-duet-radio::before{border-color:#cfd2d4}.duet-theme-turva.sc-duet-radio .duet-radio[disabled].sc-duet-radio+label.sc-duet-radio::before{border-color:#cfcfd1}.duet-radio[disabled].sc-duet-radio:checked+label.sc-duet-radio::before{border:1px solid #657787}.duet-radio[disabled].sc-duet-radio:checked+label.sc-duet-radio::after{background:#657787}.duet-theme-turva.sc-duet-radio .duet-radio[disabled].sc-duet-radio:checked+label.sc-duet-radio::after{background:#747475;border-color:#747475}";
|
|
@@ -18,6 +18,18 @@ const DuetRadio = class {
|
|
|
18
18
|
* Own Properties.
|
|
19
19
|
*/
|
|
20
20
|
this.radioId = createID("DuetRadio");
|
|
21
|
+
/**
|
|
22
|
+
* Aria Details of the component
|
|
23
|
+
*/
|
|
24
|
+
this.accessibleDetails = undefined;
|
|
25
|
+
/**
|
|
26
|
+
* String of id's that indicate alternative labels elements
|
|
27
|
+
*/
|
|
28
|
+
this.accessibleLabelledBy = undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Aria description the button
|
|
31
|
+
*/
|
|
32
|
+
this.accessibleDescription = undefined;
|
|
21
33
|
/**
|
|
22
34
|
* Controls the margin of the component.
|
|
23
35
|
*/
|
|
@@ -106,7 +118,7 @@ const DuetRadio = class {
|
|
|
106
118
|
horizontal: this.groupDirection === "horizontal" && !this.groupResponsive,
|
|
107
119
|
"horizontal-responsive": this.groupDirection === "horizontal" && this.groupResponsive,
|
|
108
120
|
"duet-m-0": this.margin === "none",
|
|
109
|
-
} }, h("div", { class: { "duet-radio-container": true, "duet-theme-turva": this.theme === "turva" } }, h("input", { type: "radio", onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, value: this.value, tabindex: this.accessibleIndex, class: { "duet-radio": true, disabled: this.disabled || this.groupDisabled }, checked: this.checked, disabled: this.disabled || this.groupDisabled, required: this.required, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.accessibleDescribedBy, role: this.role, name: this.name, id: identifier, ref: input => (this.nativeInput = input) }), h("label", { class: "duet-label", htmlFor: identifier }, h("span", null, this.label)))));
|
|
121
|
+
} }, h("div", { class: { "duet-radio-container": true, "duet-theme-turva": this.theme === "turva" } }, h("input", { type: "radio", onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, value: this.value, tabindex: this.accessibleIndex, class: { "duet-radio": true, disabled: this.disabled || this.groupDisabled }, checked: this.checked, disabled: this.disabled || this.groupDisabled, required: this.required, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.accessibleDescribedBy, "aria-labelledby": this.accessibleLabelledBy, "aria-details": this.accessibleDetails, "aria-description": this.accessibleDescription, role: this.role, name: this.name, id: identifier, ref: input => (this.nativeInput = input) }), h("label", { class: "duet-label", htmlFor: identifier }, h("span", null, this.label)))));
|
|
110
122
|
}
|
|
111
123
|
get element() { return getElement(this); }
|
|
112
124
|
};
|