@duetds/components 4.28.0 → 4.31.0
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/README.md +4 -4
- package/hydrate/index.js +914 -168
- package/lib/cjs/{action-arrow-down-small-ce4eddbc.js → action-arrow-down-small-ef77a2d1.js} +3 -0
- package/lib/cjs/{action-new-window-small-764927c8.js → action-new-window-small-fa51dfb9.js} +3 -0
- package/lib/cjs/{app-globals-10f3c9d9.js → app-globals-a032b236.js} +3 -0
- package/lib/cjs/{bodyScrollLock.es6-ec4c4a5c.js → bodyScrollLock.es6-6ef1142a.js} +3 -0
- package/lib/cjs/{common-strings-210be249.js → common-strings-de17f887.js} +3 -0
- package/lib/cjs/{create-id-d0d6cd15.js → create-id-c3b984b1.js} +3 -0
- package/lib/cjs/{dom-3e7d9c3b.js → dom-e89ebf90.js} +4 -1
- package/lib/cjs/duet-alert.cjs.entry.js +10 -4
- package/lib/cjs/duet-badge.cjs.entry.js +7 -4
- package/lib/cjs/duet-button_2.cjs.entry.js +17 -10
- package/lib/cjs/duet-caption_4.cjs.entry.js +23 -17
- package/lib/cjs/duet-card.cjs.entry.js +13 -10
- package/lib/cjs/duet-checkbox.cjs.entry.js +7 -4
- package/lib/cjs/duet-choice_2.cjs.entry.js +16 -11
- package/lib/cjs/duet-collapsible.cjs.entry.js +512 -8
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +6 -3
- package/lib/cjs/duet-date-picker.cjs.entry.js +31 -15
- package/lib/cjs/duet-divider_2.cjs.entry.js +7 -4
- package/lib/cjs/duet-empty-state.cjs.entry.js +6 -3
- package/lib/cjs/duet-fieldset.cjs.entry.js +7 -4
- package/lib/cjs/duet-footer.cjs.entry.js +15 -8
- package/lib/cjs/duet-grid_2.cjs.entry.js +8 -5
- package/lib/cjs/duet-header_2.cjs.entry.js +68 -21
- package/lib/cjs/duet-hero.cjs.entry.js +16 -10
- package/lib/cjs/duet-icon.cjs.entry.js +22 -6
- package/lib/cjs/duet-input_2.cjs.entry.js +16 -8
- package/lib/cjs/duet-layout.cjs.entry.js +6 -3
- package/lib/cjs/duet-list_2.cjs.entry.js +8 -5
- package/lib/cjs/duet-modal.cjs.entry.js +19 -12
- package/lib/cjs/duet-notification_2.cjs.entry.js +17 -9
- package/lib/cjs/duet-number-input.cjs.entry.js +54 -24
- package/lib/cjs/duet-radio_2.cjs.entry.js +9 -6
- package/lib/cjs/duet-range-slider.cjs.entry.js +9 -6
- package/lib/cjs/duet-select.cjs.entry.js +8 -5
- package/lib/cjs/duet-step_2.cjs.entry.js +9 -6
- package/lib/cjs/duet-tab_2.cjs.entry.js +23 -11
- package/lib/cjs/duet-table.cjs.entry.js +7 -4
- package/lib/cjs/duet-textarea.cjs.entry.js +8 -5
- package/lib/cjs/duet-toggle.cjs.entry.js +7 -4
- package/lib/cjs/duet-tooltip.cjs.entry.js +33 -15
- package/lib/cjs/duet-tray.cjs.entry.js +33 -15
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +5 -2
- package/lib/cjs/duet.cjs.js +8 -5
- package/lib/cjs/{focus-utils-162d8238.js → focus-utils-bd331feb.js} +4 -1
- package/lib/cjs/{index-69f4451b.js → index-113c2add.js} +11 -1
- package/lib/cjs/index.cjs.js +3 -0
- package/lib/cjs/{input-utils-712b8b32.js → input-utils-f3e3854c.js} +28 -0
- package/lib/cjs/{is-internet-explorer-cd4610fc.js → is-internet-explorer-91361c56.js} +3 -0
- package/lib/cjs/{keyboard-utils-a0b0a23c.js → keyboard-utils-b4e3d1d3.js} +3 -0
- package/lib/cjs/language-utils-48b8860b.js +93 -0
- package/lib/cjs/loader.cjs.js +7 -4
- package/lib/cjs/{shadow-css-09555044.js → shadow-css-0c8c175b.js} +4 -1
- package/lib/cjs/string-utils-267e3dbb.js +53 -0
- package/lib/cjs/{themeable-component-c462e6fd.js → themeable-component-0c1be552.js} +3 -0
- package/lib/cjs/{token-utils-4e9d1b6c.js → token-utils-13e5d13e.js} +4 -1
- package/lib/cjs/{tokens.module-6f0eaf7f.js → tokens.module-53b3bd92.js} +3 -0
- package/lib/cjs/{watch-options-edeeafd0.js → watch-options-3877c082.js} +3 -0
- package/lib/collection/collection-manifest.json +1 -1
- package/lib/collection/common-strings.js +3 -0
- package/lib/collection/components/duet-alert/duet-alert.js +19 -6
- package/lib/collection/components/duet-badge/duet-badge.css +1 -0
- package/lib/collection/components/duet-badge/duet-badge.js +4 -1
- package/lib/collection/components/duet-button/duet-button.css +3 -3
- package/lib/collection/components/duet-button/duet-button.js +28 -11
- package/lib/collection/components/duet-caption/duet-caption.js +4 -1
- package/lib/collection/components/duet-card/duet-card.css +10 -7
- package/lib/collection/components/duet-card/duet-card.js +9 -8
- package/lib/collection/components/duet-checkbox/duet-checkbox.js +4 -1
- package/lib/collection/components/duet-choice/duet-choice.css +0 -1
- package/lib/collection/components/duet-choice/duet-choice.js +17 -8
- package/lib/collection/components/duet-choice-group/duet-choice-group.css +3 -1
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +5 -2
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +110 -6
- package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +4 -1
- package/lib/collection/components/duet-date-picker/date-i18n.js +3 -0
- package/lib/collection/components/duet-date-picker/date-picker-day.js +4 -1
- package/lib/collection/components/duet-date-picker/date-picker-input.js +4 -1
- package/lib/collection/components/duet-date-picker/date-picker-month.js +4 -1
- package/lib/collection/components/duet-date-picker/date-utils.js +3 -0
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +85 -35
- package/lib/collection/components/duet-date-picker/utils.js +3 -0
- package/lib/collection/components/duet-divider/duet-divider.js +4 -1
- package/lib/collection/components/duet-empty-state/duet-empty-state.js +4 -1
- package/lib/collection/components/duet-fieldset/duet-fieldset.js +5 -2
- package/lib/collection/components/duet-footer/duet-footer.js +33 -12
- package/lib/collection/components/duet-grid/duet-grid.js +4 -1
- package/lib/collection/components/duet-grid-item/duet-grid-item.js +4 -1
- package/lib/collection/components/duet-header/duet-header.js +108 -36
- package/lib/collection/components/duet-heading/duet-heading.css +1 -0
- package/lib/collection/components/duet-heading/duet-heading.js +5 -2
- package/lib/collection/components/duet-hero/duet-hero.js +35 -15
- package/lib/collection/components/duet-icon/duet-icon.js +6 -3
- package/lib/collection/components/duet-icon/icon-utils.js +17 -1
- package/lib/collection/components/duet-input/duet-input.js +12 -4
- package/lib/collection/components/duet-label/duet-label.css +2 -0
- package/lib/collection/components/duet-label/duet-label.js +4 -1
- package/lib/collection/components/duet-layout/duet-layout.js +4 -1
- package/lib/collection/components/duet-link/duet-link.js +35 -17
- package/lib/collection/components/duet-list/duet-list.js +5 -2
- package/lib/collection/components/duet-list-item/duet-list-item.js +4 -1
- package/lib/collection/components/duet-logo/duet-logo.js +15 -4
- package/lib/collection/components/duet-modal/duet-modal.js +40 -17
- package/lib/collection/components/duet-notification/duet-notification.js +19 -4
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +24 -12
- package/lib/collection/components/duet-number-input/duet-number-input.js +182 -31
- package/lib/collection/components/duet-number-input/number-input-utils.js +3 -0
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +5 -2
- package/lib/collection/components/duet-radio/duet-radio.js +4 -1
- package/lib/collection/components/duet-radio-group/duet-radio-group.js +5 -2
- package/lib/collection/components/duet-range-slider/duet-range-slider.js +6 -3
- package/lib/collection/components/duet-select/duet-select.js +4 -1
- package/lib/collection/components/duet-spacer/duet-spacer.js +4 -1
- package/lib/collection/components/duet-spinner/duet-spinner.js +5 -2
- package/lib/collection/components/duet-step/duet-step.js +6 -3
- package/lib/collection/components/duet-stepper/duet-stepper.js +4 -1
- package/lib/collection/components/duet-tab/duet-tab.js +4 -1
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +56 -10
- package/lib/collection/components/duet-table/duet-table.js +5 -2
- package/lib/collection/components/duet-textarea/duet-textarea.js +5 -2
- package/lib/collection/components/duet-toggle/duet-toggle.js +4 -1
- package/lib/collection/components/duet-tooltip/duet-tooltip.js +98 -17
- package/lib/collection/components/duet-tray/duet-tray.js +97 -16
- package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +4 -1
- package/lib/collection/global/duet-global.js +3 -0
- package/lib/collection/utils/create-id.js +3 -0
- package/lib/collection/utils/fixture-utils.js +15 -5
- package/lib/collection/utils/focus-utils.js +3 -0
- package/lib/collection/utils/form-components.js +3 -0
- package/lib/collection/utils/group-by.js +3 -0
- package/lib/collection/utils/input-utils.js +27 -0
- package/lib/collection/utils/is-internet-explorer.js +3 -0
- package/lib/collection/utils/keyboard-utils.js +3 -0
- package/lib/collection/utils/language-utils.js +46 -8
- package/lib/collection/utils/string-utils.js +24 -0
- package/lib/collection/utils/test-utils.js +3 -0
- package/lib/collection/utils/themeable-component.js +3 -0
- package/lib/collection/utils/token-utils.js +3 -0
- package/lib/collection/utils/watch-options.js +3 -0
- package/lib/custom-elements-bundle/index.js +970 -222
- package/lib/duet/duet.esm.js +4 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/index.esm.js +3 -0
- package/lib/duet/p-0058512b.js +4 -0
- package/lib/duet/p-0224db45.entry.js +4 -0
- package/lib/duet/{p-c261a84b.system.entry.js → p-02ad46a0.system.entry.js} +4 -1
- package/lib/duet/{p-ae82ab86.js → p-04f9f1bf.js} +3 -0
- package/lib/duet/{p-62b75c80.system.js → p-053b71e6.system.js} +3 -0
- package/lib/duet/{p-f5e7899b.system.entry.js → p-07263910.system.entry.js} +4 -1
- package/lib/duet/{p-6242ef49.system.js → p-0c4bbd65.system.js} +3 -0
- package/lib/duet/{p-8b9ee5b0.js → p-115c79b6.js} +3 -0
- package/lib/duet/{p-a69855b7.js → p-15c15c6a.js} +3 -0
- package/lib/duet/{p-e780bfa0.js → p-18d801be.js} +3 -0
- package/lib/duet/p-1bfbc988.entry.js +4 -0
- package/lib/duet/p-1cd7177f.entry.js +4 -0
- package/lib/duet/p-1cec5a70.system.entry.js +4 -0
- package/lib/duet/p-1e7222c2.entry.js +4 -0
- package/lib/duet/p-202bbd70.entry.js +4 -0
- package/lib/duet/{p-44d3eb2f.system.entry.js → p-22f56356.system.entry.js} +4 -1
- package/lib/duet/{p-551d38f9.js → p-2826f987.js} +3 -0
- package/lib/duet/p-28b67b94.entry.js +4 -0
- package/lib/duet/{p-01dad2d3.js → p-322d1c38.js} +4 -1
- package/lib/duet/p-33426ddc.entry.js +4 -0
- package/lib/duet/p-33cf6ed1.entry.js +4 -0
- package/lib/duet/p-3d3f773d.system.entry.js +4 -0
- package/lib/duet/p-3e1ef509.system.entry.js +4 -0
- package/lib/duet/p-3f78a826.system.js +4 -0
- package/lib/duet/{p-50e14ff9.system.js → p-418b2ce7.system.js} +3 -0
- package/lib/duet/{p-9d4322ba.system.js → p-43e39d98.system.js} +3 -0
- package/lib/duet/p-44ffb960.entry.js +4 -0
- package/lib/duet/p-453955cc.system.entry.js +4 -0
- package/lib/duet/p-4670a654.entry.js +4 -0
- package/lib/duet/p-47645ea8.system.entry.js +4 -0
- package/lib/duet/p-504dbf8f.system.entry.js +4 -0
- package/lib/duet/p-5230ee3c.system.entry.js +4 -0
- package/lib/duet/p-56e172f5.system.entry.js +4 -0
- package/lib/duet/{p-7d7a595e.system.js → p-57ea2576.system.js} +4 -1
- package/lib/duet/p-5aa0d34d.entry.js +4 -0
- package/lib/duet/{p-63b13a5f.system.js → p-5f6bd5db.system.js} +3 -0
- package/lib/duet/p-5fc7e1f7.system.entry.js +4 -0
- package/lib/duet/p-605bc214.system.entry.js +4 -0
- package/lib/duet/p-60ab57d4.entry.js +4 -0
- package/lib/duet/p-64109493.entry.js +4 -0
- package/lib/duet/p-69a5dc6b.entry.js +4 -0
- package/lib/duet/p-6a230911.system.entry.js +4 -0
- package/lib/duet/p-6a356ab1.system.js +4 -0
- package/lib/duet/p-6a760b8a.entry.js +4 -0
- package/lib/duet/p-6d2da245.entry.js +4 -0
- package/lib/duet/p-704245ef.js +4 -0
- package/lib/duet/p-712e7dde.system.entry.js +4 -0
- package/lib/duet/p-746655ba.entry.js +4 -0
- package/lib/duet/p-76f00bd5.js +4 -0
- package/lib/duet/p-7b6db837.system.entry.js +4 -0
- package/lib/duet/p-7d080785.system.entry.js +4 -0
- package/lib/duet/p-82dc2e0b.entry.js +4 -0
- package/lib/duet/p-8c8e82aa.system.js +4 -0
- package/lib/duet/{p-5fe386d7.system.entry.js → p-8c980350.system.entry.js} +4 -1
- package/lib/duet/{p-1fcc25b6.system.entry.js → p-8cb47a70.system.entry.js} +4 -1
- package/lib/duet/p-8f03c3eb.entry.js +4 -0
- package/lib/duet/{p-50ea2036.system.js → p-8faaaf5f.system.js} +3 -0
- package/lib/duet/p-91fa68a5.js +4 -0
- package/lib/duet/p-92d38668.system.entry.js +4 -0
- package/lib/duet/p-95626e7e.system.entry.js +4 -0
- package/lib/duet/p-96808a2e.system.entry.js +4 -0
- package/lib/duet/p-96c103b2.system.entry.js +4 -0
- package/lib/duet/p-986779fb.js +4 -0
- package/lib/duet/{p-a0c363a1.js → p-9a89ec39.js} +3 -0
- package/lib/duet/p-9a8d5b11.system.js +4 -0
- package/lib/duet/p-9a945278.system.js +4 -0
- package/lib/duet/p-9c94be45.entry.js +4 -0
- package/lib/duet/p-9ce1baab.system.entry.js +4 -0
- package/lib/duet/p-9dfcd29a.js +4 -0
- package/lib/duet/p-9ff25646.entry.js +4 -0
- package/lib/duet/p-a1d12e94.system.entry.js +4 -0
- package/lib/duet/{p-a78af9f5.js → p-a28cf57b.js} +3 -0
- package/lib/duet/p-b03a46b6.entry.js +4 -0
- package/lib/duet/p-b1b8e510.entry.js +4 -0
- package/lib/duet/p-b694cbf5.system.js +4 -0
- package/lib/duet/p-b7e50cfa.entry.js +4 -0
- package/lib/duet/p-b82927b0.system.entry.js +4 -0
- package/lib/duet/p-ba205dca.entry.js +4 -0
- package/lib/duet/{p-2dd28142.system.js → p-bb12b972.system.js} +3 -0
- package/lib/duet/p-bcae23fc.system.entry.js +4 -0
- package/lib/duet/{p-a0e09a50.js → p-bd779757.js} +3 -0
- package/lib/duet/{p-69599f4e.js → p-bd9a7d8f.js} +3 -0
- package/lib/duet/p-be19c57b.system.entry.js +4 -0
- package/lib/duet/{p-6e296e99.js → p-c1325e35.js} +3 -0
- package/lib/duet/p-c4737f88.entry.js +4 -0
- package/lib/duet/{p-c3058688.js → p-c5beceed.js} +4 -1
- package/lib/duet/p-c5f10483.system.entry.js +4 -0
- package/lib/duet/{p-d95998b4.system.js → p-c7ae95bd.system.js} +3 -0
- package/lib/duet/{p-31c3b93f.system.js → p-ce0892e6.system.js} +3 -0
- package/lib/duet/p-d35fd913.system.entry.js +4 -0
- package/lib/duet/p-d4b4bfa6.entry.js +4 -0
- package/lib/duet/p-d7623eb8.system.entry.js +4 -0
- package/lib/duet/p-d863e150.system.js +4 -0
- package/lib/duet/p-dc85d2a4.entry.js +4 -0
- package/lib/duet/p-de093c16.entry.js +4 -0
- package/lib/duet/p-de842863.entry.js +4 -0
- package/lib/duet/p-e08b8909.entry.js +4 -0
- package/lib/duet/p-e39471b6.entry.js +4 -0
- package/lib/duet/{p-f180f2f2.system.js → p-e566ff11.system.js} +3 -0
- package/lib/duet/{p-cd603d87.system.js → p-e58ca7af.system.js} +4 -1
- package/lib/duet/p-e834c8d5.system.entry.js +4 -0
- package/lib/duet/{p-a8a8954e.system.entry.js → p-ef45cfe9.system.entry.js} +4 -1
- package/lib/duet/{p-73baca13.system.js → p-efaa0c04.system.js} +3 -0
- package/lib/duet/{p-fd305188.system.entry.js → p-f0b1850a.system.entry.js} +4 -1
- package/lib/duet/{p-871f3440.js → p-f11208c3.js} +3 -0
- package/lib/duet/p-f53c8019.entry.js +4 -0
- package/lib/duet/{p-95253d0a.entry.js → p-f96c4093.system.entry.js} +4 -1
- package/lib/duet/p-fbd83d67.entry.js +4 -0
- package/lib/duet/{p-dbe056ce.system.js → p-fd98468a.system.js} +3 -0
- package/lib/duet/p-fdecaf46.entry.js +4 -0
- package/lib/esm/{action-arrow-down-small-c24d2c7f.js → action-arrow-down-small-82273dc8.js} +3 -0
- package/lib/esm/{action-new-window-small-d592feb6.js → action-new-window-small-1945be91.js} +3 -0
- package/lib/esm/{app-globals-2796679e.js → app-globals-6641e444.js} +3 -0
- package/lib/esm/{bodyScrollLock.es6-cf1e49b2.js → bodyScrollLock.es6-61b5e9a4.js} +3 -0
- package/lib/esm/{common-strings-d5205fd4.js → common-strings-97e04e4b.js} +3 -0
- package/lib/esm/{create-id-124e0fc4.js → create-id-981107da.js} +3 -0
- package/lib/esm/{dom-1f98a75f.js → dom-21034390.js} +4 -1
- package/lib/esm/duet-alert.entry.js +10 -4
- package/lib/esm/duet-badge.entry.js +7 -4
- package/lib/esm/duet-button_2.entry.js +17 -10
- package/lib/esm/duet-caption_4.entry.js +23 -17
- package/lib/esm/duet-card.entry.js +13 -10
- package/lib/esm/duet-checkbox.entry.js +7 -4
- package/lib/esm/duet-choice_2.entry.js +16 -11
- package/lib/esm/duet-collapsible.entry.js +512 -8
- package/lib/esm/duet-cookie-consent.entry.js +6 -3
- package/lib/esm/duet-date-picker.entry.js +31 -15
- package/lib/esm/duet-divider_2.entry.js +7 -4
- package/lib/esm/duet-empty-state.entry.js +6 -3
- package/lib/esm/duet-fieldset.entry.js +7 -4
- package/lib/esm/duet-footer.entry.js +15 -8
- package/lib/esm/duet-grid_2.entry.js +8 -5
- package/lib/esm/duet-header_2.entry.js +68 -21
- package/lib/esm/duet-hero.entry.js +16 -10
- package/lib/esm/duet-icon.entry.js +22 -6
- package/lib/esm/duet-input_2.entry.js +16 -8
- package/lib/esm/duet-layout.entry.js +6 -3
- package/lib/esm/duet-list_2.entry.js +8 -5
- package/lib/esm/duet-modal.entry.js +19 -12
- package/lib/esm/duet-notification_2.entry.js +17 -9
- package/lib/esm/duet-number-input.entry.js +54 -24
- package/lib/esm/duet-radio_2.entry.js +9 -6
- package/lib/esm/duet-range-slider.entry.js +9 -6
- package/lib/esm/duet-select.entry.js +8 -5
- package/lib/esm/duet-step_2.entry.js +9 -6
- package/lib/esm/duet-tab_2.entry.js +23 -11
- package/lib/esm/duet-table.entry.js +7 -4
- package/lib/esm/duet-textarea.entry.js +8 -5
- package/lib/esm/duet-toggle.entry.js +7 -4
- package/lib/esm/duet-tooltip.entry.js +33 -15
- package/lib/esm/duet-tray.entry.js +33 -15
- package/lib/esm/duet-visually-hidden.entry.js +5 -2
- package/lib/esm/duet.js +8 -5
- package/lib/esm/{focus-utils-e76191e8.js → focus-utils-1995e5a9.js} +4 -1
- package/lib/esm/{index-aaa7610e.js → index-6e246691.js} +11 -1
- package/lib/esm/index.js +3 -1
- package/lib/esm/{input-utils-8a4c03a1.js → input-utils-f4cafee1.js} +28 -1
- package/lib/esm/{is-internet-explorer-0b40c5fe.js → is-internet-explorer-62b3bdbd.js} +3 -0
- package/lib/esm/{keyboard-utils-956f0d36.js → keyboard-utils-584cedd7.js} +3 -0
- package/lib/esm/language-utils-d5c38f65.js +89 -0
- package/lib/esm/loader.js +7 -4
- package/lib/esm/{shadow-css-67b66845.js → shadow-css-31e2d504.js} +4 -1
- package/lib/esm/string-utils-2f1793b8.js +49 -0
- package/lib/esm/{themeable-component-2a857b64.js → themeable-component-572685dd.js} +3 -0
- package/lib/esm/{token-utils-56e2be37.js → token-utils-5a35377f.js} +4 -1
- package/lib/esm/{tokens.module-17f6088f.js → tokens.module-edb66c04.js} +3 -0
- package/lib/esm/{watch-options-8f61a365.js → watch-options-de55ea78.js} +3 -0
- package/lib/esm-es5/{action-arrow-down-small-c24d2c7f.js → action-arrow-down-small-82273dc8.js} +3 -0
- package/lib/esm-es5/{action-new-window-small-d592feb6.js → action-new-window-small-1945be91.js} +3 -0
- package/lib/esm-es5/{app-globals-2796679e.js → app-globals-6641e444.js} +3 -0
- package/lib/esm-es5/{bodyScrollLock.es6-cf1e49b2.js → bodyScrollLock.es6-61b5e9a4.js} +3 -0
- package/lib/esm-es5/{common-strings-d5205fd4.js → common-strings-97e04e4b.js} +3 -0
- package/lib/esm-es5/{create-id-124e0fc4.js → create-id-981107da.js} +3 -0
- package/lib/esm-es5/{dom-1f98a75f.js → dom-21034390.js} +3 -0
- package/lib/esm-es5/duet-alert.entry.js +4 -1
- package/lib/esm-es5/duet-badge.entry.js +4 -1
- package/lib/esm-es5/duet-button_2.entry.js +4 -1
- package/lib/esm-es5/duet-caption_4.entry.js +4 -1
- package/lib/esm-es5/duet-card.entry.js +4 -1
- package/lib/esm-es5/duet-checkbox.entry.js +4 -1
- package/lib/esm-es5/duet-choice_2.entry.js +4 -1
- package/lib/esm-es5/duet-collapsible.entry.js +4 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +4 -1
- package/lib/esm-es5/duet-date-picker.entry.js +4 -1
- package/lib/esm-es5/duet-divider_2.entry.js +4 -1
- package/lib/esm-es5/duet-empty-state.entry.js +4 -1
- package/lib/esm-es5/duet-fieldset.entry.js +4 -1
- package/lib/esm-es5/duet-footer.entry.js +4 -1
- package/lib/esm-es5/duet-grid_2.entry.js +4 -1
- package/lib/esm-es5/duet-header_2.entry.js +4 -1
- package/lib/esm-es5/duet-hero.entry.js +4 -1
- package/lib/esm-es5/duet-icon.entry.js +4 -1
- package/lib/esm-es5/duet-input_2.entry.js +4 -1
- package/lib/esm-es5/duet-layout.entry.js +4 -1
- package/lib/esm-es5/duet-list_2.entry.js +4 -1
- package/lib/esm-es5/duet-modal.entry.js +4 -1
- package/lib/esm-es5/duet-notification_2.entry.js +4 -1
- package/lib/esm-es5/duet-number-input.entry.js +4 -1
- package/lib/esm-es5/duet-radio_2.entry.js +4 -1
- package/lib/esm-es5/duet-range-slider.entry.js +4 -1
- package/lib/esm-es5/duet-select.entry.js +4 -1
- package/lib/esm-es5/duet-step_2.entry.js +4 -1
- package/lib/esm-es5/duet-tab_2.entry.js +4 -1
- package/lib/esm-es5/duet-table.entry.js +4 -1
- package/lib/esm-es5/duet-textarea.entry.js +4 -1
- package/lib/esm-es5/duet-toggle.entry.js +4 -1
- package/lib/esm-es5/duet-tooltip.entry.js +4 -1
- package/lib/esm-es5/duet-tray.entry.js +4 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +4 -1
- package/lib/esm-es5/duet.js +4 -1
- package/lib/esm-es5/{focus-utils-e76191e8.js → focus-utils-1995e5a9.js} +4 -1
- package/lib/esm-es5/index-6e246691.js +4 -0
- package/lib/esm-es5/index.js +3 -0
- package/lib/esm-es5/input-utils-f4cafee1.js +4 -0
- package/lib/esm-es5/{is-internet-explorer-0b40c5fe.js → is-internet-explorer-62b3bdbd.js} +3 -0
- package/lib/esm-es5/{keyboard-utils-956f0d36.js → keyboard-utils-584cedd7.js} +3 -0
- package/lib/esm-es5/language-utils-d5c38f65.js +4 -0
- package/lib/esm-es5/loader.js +4 -1
- package/lib/esm-es5/{shadow-css-67b66845.js → shadow-css-31e2d504.js} +3 -0
- package/lib/esm-es5/string-utils-2f1793b8.js +4 -0
- package/lib/esm-es5/{themeable-component-2a857b64.js → themeable-component-572685dd.js} +3 -0
- package/lib/esm-es5/{token-utils-56e2be37.js → token-utils-5a35377f.js} +4 -1
- package/lib/esm-es5/{tokens.module-17f6088f.js → tokens.module-edb66c04.js} +3 -0
- package/lib/esm-es5/{watch-options-8f61a365.js → watch-options-de55ea78.js} +3 -0
- package/lib/html.html-data.json +140 -2
- package/lib/loader/cdn.js +3 -1
- package/lib/loader/index.cjs.js +3 -1
- package/lib/loader/index.d.ts +0 -1
- package/lib/loader/index.es2017.js +3 -1
- package/lib/loader/index.js +3 -1
- package/lib/types/components/duet-alert/duet-alert.d.ts +4 -2
- package/lib/types/components/duet-badge/duet-badge.d.ts +1 -1
- package/lib/types/components/duet-button/duet-button.d.ts +6 -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 +1 -1
- package/lib/types/components/duet-choice/duet-choice.d.ts +5 -4
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +24 -1
- package/lib/types/components/duet-date-picker/date-picker-month.d.ts +1 -1
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +16 -7
- package/lib/types/components/duet-divider/duet-divider.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 +7 -3
- package/lib/types/components/duet-grid-item/duet-grid-item.d.ts +1 -1
- package/lib/types/components/duet-header/duet-header.d.ts +50 -8
- package/lib/types/components/duet-heading/duet-heading.d.ts +1 -1
- package/lib/types/components/duet-hero/duet-hero.d.ts +8 -5
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-input/duet-input.d.ts +2 -2
- package/lib/types/components/duet-link/duet-link.d.ts +8 -5
- package/lib/types/components/duet-list/duet-list.d.ts +1 -1
- package/lib/types/components/duet-logo/duet-logo.d.ts +3 -1
- package/lib/types/components/duet-modal/duet-modal.d.ts +11 -5
- package/lib/types/components/duet-notification/duet-notification.d.ts +4 -1
- package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +6 -5
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +29 -2
- package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +1 -1
- package/lib/types/components/duet-radio/duet-radio.d.ts +2 -2
- package/lib/types/components/duet-range-slider/duet-range-slider.d.ts +2 -2
- package/lib/types/components/duet-select/duet-select.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 +10 -1
- package/lib/types/components/duet-textarea/duet-textarea.d.ts +2 -2
- package/lib/types/components/duet-toggle/duet-toggle.d.ts +2 -2
- package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +16 -1
- package/lib/types/components/duet-tray/duet-tray.d.ts +15 -0
- package/lib/types/components.d.ts +265 -33
- package/lib/types/utils/input-utils.d.ts +9 -0
- package/lib/types/utils/language-utils.d.ts +26 -3
- package/lib/types/utils/string-utils.d.ts +1 -0
- package/lib/types/utils/test-utils.d.ts +1 -1
- package/package.json +39 -23
- package/lib/cjs/language-utils-0f4f60f1.js +0 -54
- package/lib/cjs/string-utils-0336d6da.js +0 -28
- package/lib/duet/p-00914fa8.entry.js +0 -1
- package/lib/duet/p-08b10b1b.entry.js +0 -1
- package/lib/duet/p-0a5bdffc.entry.js +0 -1
- package/lib/duet/p-117e6a2d.system.entry.js +0 -1
- package/lib/duet/p-11f650f9.system.entry.js +0 -1
- package/lib/duet/p-120f15f9.entry.js +0 -1
- package/lib/duet/p-1270fad1.entry.js +0 -1
- package/lib/duet/p-15c4ae87.system.entry.js +0 -1
- package/lib/duet/p-19d86321.system.js +0 -1
- package/lib/duet/p-1a544f89.js +0 -1
- package/lib/duet/p-1a773ea3.system.entry.js +0 -1
- package/lib/duet/p-1f18716e.entry.js +0 -1
- package/lib/duet/p-2141f564.system.js +0 -1
- package/lib/duet/p-23f2a281.entry.js +0 -1
- package/lib/duet/p-28072b15.entry.js +0 -1
- package/lib/duet/p-2ce3a1bc.entry.js +0 -1
- package/lib/duet/p-2f56c5d0.entry.js +0 -1
- package/lib/duet/p-330725c5.js +0 -1
- package/lib/duet/p-378186a8.entry.js +0 -1
- package/lib/duet/p-393dc5f0.system.entry.js +0 -1
- package/lib/duet/p-4486ae28.system.entry.js +0 -1
- package/lib/duet/p-45713f8a.system.entry.js +0 -1
- package/lib/duet/p-4e4d8137.system.entry.js +0 -1
- package/lib/duet/p-4f4895e0.entry.js +0 -1
- package/lib/duet/p-51f89eec.entry.js +0 -1
- package/lib/duet/p-545f6a97.entry.js +0 -1
- package/lib/duet/p-568ab60b.system.entry.js +0 -1
- package/lib/duet/p-598ba79a.js +0 -1
- package/lib/duet/p-598edf9e.system.entry.js +0 -1
- package/lib/duet/p-5e6a5340.entry.js +0 -1
- package/lib/duet/p-64fd394a.entry.js +0 -1
- package/lib/duet/p-66c75914.system.entry.js +0 -1
- package/lib/duet/p-6dc51621.system.entry.js +0 -1
- package/lib/duet/p-6f41124b.system.js +0 -1
- package/lib/duet/p-6f6b2cc5.system.entry.js +0 -1
- package/lib/duet/p-700243af.entry.js +0 -1
- package/lib/duet/p-770d46e6.entry.js +0 -1
- package/lib/duet/p-8498e753.system.entry.js +0 -1
- package/lib/duet/p-852e96c1.system.js +0 -1
- package/lib/duet/p-86de511c.system.entry.js +0 -1
- package/lib/duet/p-8db7a844.system.entry.js +0 -1
- package/lib/duet/p-91255671.js +0 -1
- package/lib/duet/p-921afc00.entry.js +0 -1
- package/lib/duet/p-9ac41fbc.system.entry.js +0 -1
- package/lib/duet/p-9b6adcb3.system.entry.js +0 -1
- package/lib/duet/p-9b9cb411.system.entry.js +0 -1
- package/lib/duet/p-9ff8c7c4.entry.js +0 -1
- package/lib/duet/p-a4d8b2c4.entry.js +0 -1
- package/lib/duet/p-a92bdc1c.system.entry.js +0 -1
- package/lib/duet/p-b6e261ef.js +0 -1
- package/lib/duet/p-b761ef2d.entry.js +0 -1
- package/lib/duet/p-b87ce8c9.system.entry.js +0 -1
- package/lib/duet/p-bdf5fe15.entry.js +0 -1
- package/lib/duet/p-c0c1bcba.system.js +0 -1
- package/lib/duet/p-c5fe3120.system.entry.js +0 -1
- package/lib/duet/p-c6d19c6c.system.entry.js +0 -1
- package/lib/duet/p-c8068a31.entry.js +0 -1
- package/lib/duet/p-cb073c9b.entry.js +0 -1
- package/lib/duet/p-cb49c05a.system.js +0 -1
- package/lib/duet/p-cb62f051.entry.js +0 -1
- package/lib/duet/p-ce55045f.js +0 -1
- package/lib/duet/p-d20651ba.entry.js +0 -1
- package/lib/duet/p-d7c57e6c.entry.js +0 -1
- package/lib/duet/p-da0df691.system.entry.js +0 -1
- package/lib/duet/p-dc2d2635.system.entry.js +0 -1
- package/lib/duet/p-dcd0f562.system.entry.js +0 -1
- package/lib/duet/p-dd4281d5.entry.js +0 -1
- package/lib/duet/p-e374aba6.entry.js +0 -1
- package/lib/duet/p-e693d73a.system.entry.js +0 -1
- package/lib/duet/p-e7bef783.entry.js +0 -1
- package/lib/duet/p-ec326c4c.system.entry.js +0 -1
- package/lib/duet/p-efa3e05d.entry.js +0 -1
- package/lib/duet/p-f2cca5cc.system.js +0 -1
- package/lib/duet/p-f3d07b69.entry.js +0 -1
- package/lib/duet/p-fbeb43e8.entry.js +0 -1
- package/lib/esm/language-utils-c7ce7c0e.js +0 -50
- package/lib/esm/string-utils-9ef35d2a.js +0 -25
- package/lib/esm-es5/index-aaa7610e.js +0 -1
- package/lib/esm-es5/input-utils-8a4c03a1.js +0 -1
- package/lib/esm-es5/language-utils-c7ce7c0e.js +0 -1
- package/lib/esm-es5/string-utils-9ef35d2a.js +0 -1
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import subtractIcon from "@duetds/icons/lib/assets/action-subtract";
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
5
4
|
import addIcon from "@duetds/icons/lib/assets/action-add";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import subtractIcon from "@duetds/icons/lib/assets/action-subtract";
|
|
6
|
+
import { Component, Element, Event, h, Host, Method, Prop, State } from "@stencil/core";
|
|
7
|
+
import { createID } from "../../utils/create-id";
|
|
8
|
+
import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isBackspaceKey, } from "../../utils/keyboard-utils";
|
|
8
9
|
import { getLanguage, getLocale, getLocaleString } from "../../utils/language-utils";
|
|
10
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
11
|
+
import { clamp, parseLocaleFloat, roundTo } from "./number-input-utils";
|
|
9
12
|
export class DuetNumberInput {
|
|
10
13
|
constructor() {
|
|
11
14
|
this.inputId = createID("DuetInput");
|
|
12
15
|
/**
|
|
13
16
|
* The currently active language. This setting changes the accessible labels to match the
|
|
14
17
|
* chosen language.
|
|
18
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
19
|
+
* @default "fi"
|
|
15
20
|
*/
|
|
16
21
|
this.language = getLanguage();
|
|
17
22
|
/**
|
|
@@ -23,34 +28,52 @@ export class DuetNumberInput {
|
|
|
23
28
|
*/
|
|
24
29
|
this.unit = getLocale(this.language).money;
|
|
25
30
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
31
|
+
* Defaults for accessibleLive
|
|
32
|
+
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
28
33
|
*/
|
|
29
|
-
this.
|
|
34
|
+
this.accessibleLiveDefaults = {
|
|
30
35
|
fi: "{current} euroa valittuna",
|
|
31
36
|
en: "{current} euros selected",
|
|
32
|
-
sv: "{current}
|
|
33
|
-
}
|
|
37
|
+
sv: "{current} euro valt",
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Format of message used to announce current amount when switching between amounts.
|
|
41
|
+
* The string {current} is replaced with the current amount.
|
|
42
|
+
* @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
|
|
43
|
+
*/
|
|
44
|
+
this.accessibleLive = getLocaleString(this.accessibleLiveDefaults, this.language);
|
|
34
45
|
/**
|
|
35
46
|
* Disables the aria-live messaging used internally in this component. This could be useful when you want to use custom aria-live messages instead.
|
|
36
47
|
*/
|
|
37
48
|
this.accessibleLiveEnabled = true;
|
|
38
49
|
/**
|
|
39
|
-
*
|
|
50
|
+
* Defaults for accessibleAdd
|
|
51
|
+
* @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
|
|
40
52
|
*/
|
|
41
|
-
this.
|
|
53
|
+
this.accessibleAddDefaults = {
|
|
42
54
|
fi: "Lisää summaan",
|
|
43
55
|
en: "Add to the amount",
|
|
44
56
|
sv: "Lägg till beloppet",
|
|
45
|
-
}
|
|
57
|
+
};
|
|
46
58
|
/**
|
|
47
|
-
* Accessible label for the
|
|
59
|
+
* Accessible label for the add button that is read for screen reader users.
|
|
60
|
+
* @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
|
|
61
|
+
*/
|
|
62
|
+
this.accessibleAdd = getLocaleString(this.accessibleAddDefaults, this.language);
|
|
63
|
+
/**
|
|
64
|
+
* Defaults for accessibleSubtract
|
|
65
|
+
* @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
|
|
48
66
|
*/
|
|
49
|
-
this.
|
|
67
|
+
this.accessibleSubtractDefaults = {
|
|
50
68
|
fi: "Vähennä summasta",
|
|
51
69
|
en: "Subtract from the amount",
|
|
52
70
|
sv: "Dra från beloppet",
|
|
53
|
-
}
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Accessible label for the subtract button that is read for screen reader users.
|
|
74
|
+
* @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
|
|
75
|
+
*/
|
|
76
|
+
this.accessibleSubtract = getLocaleString(this.accessibleSubtractDefaults, this.language);
|
|
54
77
|
/**
|
|
55
78
|
* Theme of the input.
|
|
56
79
|
*/
|
|
@@ -68,13 +91,19 @@ export class DuetNumberInput {
|
|
|
68
91
|
*/
|
|
69
92
|
this.min = 0;
|
|
70
93
|
/**
|
|
71
|
-
*
|
|
94
|
+
* Defaults for Label
|
|
95
|
+
* @default {fi: "Etiketti", en: "Label", sv: "Märka"}
|
|
72
96
|
*/
|
|
73
|
-
this.
|
|
74
|
-
fi: "
|
|
97
|
+
this.labelDefaults = {
|
|
98
|
+
fi: "Nimilappu",
|
|
75
99
|
en: "Label",
|
|
76
|
-
sv: "
|
|
77
|
-
}
|
|
100
|
+
sv: "Etikett",
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Label for the number input.
|
|
104
|
+
* @default {fi: "Etiketti", en: "Label", sv: "Märka"}
|
|
105
|
+
*/
|
|
106
|
+
this.label = getLocaleString(this.labelDefaults, this.language);
|
|
78
107
|
/**
|
|
79
108
|
* Visually hide the label, but still show it to screen readers.
|
|
80
109
|
*/
|
|
@@ -340,7 +369,13 @@ export class DuetNumberInput {
|
|
|
340
369
|
"required": false,
|
|
341
370
|
"optional": false,
|
|
342
371
|
"docs": {
|
|
343
|
-
"tags": [
|
|
372
|
+
"tags": [{
|
|
373
|
+
"text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing",
|
|
374
|
+
"name": "deprecated"
|
|
375
|
+
}, {
|
|
376
|
+
"text": "\"fi\"",
|
|
377
|
+
"name": "default"
|
|
378
|
+
}],
|
|
344
379
|
"text": "The currently active language. This setting changes the accessible labels to match the\nchosen language."
|
|
345
380
|
},
|
|
346
381
|
"attribute": "language",
|
|
@@ -456,6 +491,32 @@ export class DuetNumberInput {
|
|
|
456
491
|
"attribute": "accessible-described-by",
|
|
457
492
|
"reflect": false
|
|
458
493
|
},
|
|
494
|
+
"accessibleLiveDefaults": {
|
|
495
|
+
"type": "string",
|
|
496
|
+
"mutable": false,
|
|
497
|
+
"complexType": {
|
|
498
|
+
"original": "DuetLangObject | string",
|
|
499
|
+
"resolved": "DuetLangObject | string",
|
|
500
|
+
"references": {
|
|
501
|
+
"DuetLangObject": {
|
|
502
|
+
"location": "import",
|
|
503
|
+
"path": "../../utils/language-utils"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"required": false,
|
|
508
|
+
"optional": false,
|
|
509
|
+
"docs": {
|
|
510
|
+
"tags": [{
|
|
511
|
+
"text": "{fi: \"{current} euroa valittuna\", en: \"{current} euros selected\", sv: \"{current} valda euro\"}",
|
|
512
|
+
"name": "default"
|
|
513
|
+
}],
|
|
514
|
+
"text": "Defaults for accessibleLive"
|
|
515
|
+
},
|
|
516
|
+
"attribute": "accessible-live-default",
|
|
517
|
+
"reflect": false,
|
|
518
|
+
"defaultValue": "{\n fi: \"{current} euroa valittuna\",\n en: \"{current} euros selected\",\n sv: \"{current} euro valt\",\n }"
|
|
519
|
+
},
|
|
459
520
|
"accessibleLive": {
|
|
460
521
|
"type": "string",
|
|
461
522
|
"mutable": false,
|
|
@@ -467,12 +528,15 @@ export class DuetNumberInput {
|
|
|
467
528
|
"required": false,
|
|
468
529
|
"optional": false,
|
|
469
530
|
"docs": {
|
|
470
|
-
"tags": [
|
|
531
|
+
"tags": [{
|
|
532
|
+
"text": "{fi: \"{current} euroa valittuna\", en: \"{current} euros selected\", sv: \"{current} valda euro\"}",
|
|
533
|
+
"name": "default"
|
|
534
|
+
}],
|
|
471
535
|
"text": "Format of message used to announce current amount when switching between amounts.\nThe string {current} is replaced with the current amount."
|
|
472
536
|
},
|
|
473
537
|
"attribute": "accessible-live",
|
|
474
538
|
"reflect": false,
|
|
475
|
-
"defaultValue": "getLocaleString(
|
|
539
|
+
"defaultValue": "getLocaleString(this.accessibleLiveDefaults, this.language)"
|
|
476
540
|
},
|
|
477
541
|
"accessibleLiveEnabled": {
|
|
478
542
|
"type": "boolean",
|
|
@@ -492,6 +556,32 @@ export class DuetNumberInput {
|
|
|
492
556
|
"reflect": false,
|
|
493
557
|
"defaultValue": "true"
|
|
494
558
|
},
|
|
559
|
+
"accessibleAddDefaults": {
|
|
560
|
+
"type": "string",
|
|
561
|
+
"mutable": false,
|
|
562
|
+
"complexType": {
|
|
563
|
+
"original": "DuetLangObject | string",
|
|
564
|
+
"resolved": "DuetLangObject | string",
|
|
565
|
+
"references": {
|
|
566
|
+
"DuetLangObject": {
|
|
567
|
+
"location": "import",
|
|
568
|
+
"path": "../../utils/language-utils"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
"required": false,
|
|
573
|
+
"optional": false,
|
|
574
|
+
"docs": {
|
|
575
|
+
"tags": [{
|
|
576
|
+
"text": "{fi: \"Lis\u00E4\u00E4 summaan\", en: \"Add to the amount\", sv: \"L\u00E4gg till beloppet\"}",
|
|
577
|
+
"name": "default"
|
|
578
|
+
}],
|
|
579
|
+
"text": "Defaults for accessibleAdd"
|
|
580
|
+
},
|
|
581
|
+
"attribute": "accessible-add-default",
|
|
582
|
+
"reflect": false,
|
|
583
|
+
"defaultValue": "{\n fi: \"Lis\u00E4\u00E4 summaan\",\n en: \"Add to the amount\",\n sv: \"L\u00E4gg till beloppet\",\n }"
|
|
584
|
+
},
|
|
495
585
|
"accessibleAdd": {
|
|
496
586
|
"type": "string",
|
|
497
587
|
"mutable": false,
|
|
@@ -503,12 +593,41 @@ export class DuetNumberInput {
|
|
|
503
593
|
"required": false,
|
|
504
594
|
"optional": false,
|
|
505
595
|
"docs": {
|
|
506
|
-
"tags": [
|
|
596
|
+
"tags": [{
|
|
597
|
+
"text": "{fi: \"Lis\u00E4\u00E4 summaan\", en: \"Add to the amount\", sv: \"L\u00E4gg till beloppet\"}",
|
|
598
|
+
"name": "default"
|
|
599
|
+
}],
|
|
507
600
|
"text": "Accessible label for the add button that is read for screen reader users."
|
|
508
601
|
},
|
|
509
602
|
"attribute": "accessible-add",
|
|
510
603
|
"reflect": false,
|
|
511
|
-
"defaultValue": "getLocaleString(
|
|
604
|
+
"defaultValue": "getLocaleString(this.accessibleAddDefaults, this.language)"
|
|
605
|
+
},
|
|
606
|
+
"accessibleSubtractDefaults": {
|
|
607
|
+
"type": "string",
|
|
608
|
+
"mutable": false,
|
|
609
|
+
"complexType": {
|
|
610
|
+
"original": "DuetLangObject | string",
|
|
611
|
+
"resolved": "DuetLangObject | string",
|
|
612
|
+
"references": {
|
|
613
|
+
"DuetLangObject": {
|
|
614
|
+
"location": "import",
|
|
615
|
+
"path": "../../utils/language-utils"
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
"required": false,
|
|
620
|
+
"optional": false,
|
|
621
|
+
"docs": {
|
|
622
|
+
"tags": [{
|
|
623
|
+
"text": "{fi: \"V\u00E4henn\u00E4 summasta\", en: \"Subtract from the amount\", sv: \"Dra fr\u00E5n beloppet\"}",
|
|
624
|
+
"name": "default"
|
|
625
|
+
}],
|
|
626
|
+
"text": "Defaults for accessibleSubtract"
|
|
627
|
+
},
|
|
628
|
+
"attribute": "accessible-subtract-defaults",
|
|
629
|
+
"reflect": false,
|
|
630
|
+
"defaultValue": "{\n fi: \"V\u00E4henn\u00E4 summasta\",\n en: \"Subtract from the amount\",\n sv: \"Dra fr\u00E5n beloppet\",\n }"
|
|
512
631
|
},
|
|
513
632
|
"accessibleSubtract": {
|
|
514
633
|
"type": "string",
|
|
@@ -521,12 +640,15 @@ export class DuetNumberInput {
|
|
|
521
640
|
"required": false,
|
|
522
641
|
"optional": false,
|
|
523
642
|
"docs": {
|
|
524
|
-
"tags": [
|
|
643
|
+
"tags": [{
|
|
644
|
+
"text": "{fi: \"V\u00E4henn\u00E4 summasta\", en: \"Subtract from the amount\", sv: \"Dra fr\u00E5n beloppet\"}",
|
|
645
|
+
"name": "default"
|
|
646
|
+
}],
|
|
525
647
|
"text": "Accessible label for the subtract button that is read for screen reader users."
|
|
526
648
|
},
|
|
527
649
|
"attribute": "accessible-subtract",
|
|
528
650
|
"reflect": false,
|
|
529
|
-
"defaultValue": "getLocaleString(
|
|
651
|
+
"defaultValue": "getLocaleString(this.accessibleSubtractDefaults, this.language)"
|
|
530
652
|
},
|
|
531
653
|
"theme": {
|
|
532
654
|
"type": "string",
|
|
@@ -627,6 +749,32 @@ export class DuetNumberInput {
|
|
|
627
749
|
"reflect": false,
|
|
628
750
|
"defaultValue": "0"
|
|
629
751
|
},
|
|
752
|
+
"labelDefaults": {
|
|
753
|
+
"type": "string",
|
|
754
|
+
"mutable": false,
|
|
755
|
+
"complexType": {
|
|
756
|
+
"original": "DuetLangObject | string",
|
|
757
|
+
"resolved": "DuetLangObject | string",
|
|
758
|
+
"references": {
|
|
759
|
+
"DuetLangObject": {
|
|
760
|
+
"location": "import",
|
|
761
|
+
"path": "../../utils/language-utils"
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
"required": false,
|
|
766
|
+
"optional": false,
|
|
767
|
+
"docs": {
|
|
768
|
+
"tags": [{
|
|
769
|
+
"text": "{fi: \"Etiketti\", en: \"Label\", sv: \"M\u00E4rka\"}",
|
|
770
|
+
"name": "default"
|
|
771
|
+
}],
|
|
772
|
+
"text": "Defaults for Label"
|
|
773
|
+
},
|
|
774
|
+
"attribute": "label-default",
|
|
775
|
+
"reflect": false,
|
|
776
|
+
"defaultValue": "{\n fi: \"Nimilappu\",\n en: \"Label\",\n sv: \"Etikett\",\n }"
|
|
777
|
+
},
|
|
630
778
|
"label": {
|
|
631
779
|
"type": "string",
|
|
632
780
|
"mutable": false,
|
|
@@ -638,12 +786,15 @@ export class DuetNumberInput {
|
|
|
638
786
|
"required": false,
|
|
639
787
|
"optional": false,
|
|
640
788
|
"docs": {
|
|
641
|
-
"tags": [
|
|
789
|
+
"tags": [{
|
|
790
|
+
"text": "{fi: \"Etiketti\", en: \"Label\", sv: \"M\u00E4rka\"}",
|
|
791
|
+
"name": "default"
|
|
792
|
+
}],
|
|
642
793
|
"text": "Label for the number input."
|
|
643
794
|
},
|
|
644
795
|
"attribute": "label",
|
|
645
796
|
"reflect": false,
|
|
646
|
-
"defaultValue": "getLocaleString(
|
|
797
|
+
"defaultValue": "getLocaleString(this.labelDefaults, this.language)"
|
|
647
798
|
},
|
|
648
799
|
"labelHidden": {
|
|
649
800
|
"type": "boolean",
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, h, Prop } from "@stencil/core";
|
|
3
5
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
|
+
import { getColorByName } from "../../utils/token-utils";
|
|
4
7
|
export class DuetParagraph {
|
|
5
8
|
constructor() {
|
|
6
9
|
/**
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Method, Prop } from "@stencil/core";
|
|
2
5
|
import { createID } from "../../utils/create-id";
|
|
3
6
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
4
7
|
export class DuetRadio {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, h, Host, Prop, Watch } from "@stencil/core";
|
|
3
5
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
|
+
import { findCheckedOption, watchForOptions } from "../../utils/watch-options";
|
|
4
7
|
export class DuetRadioGroup {
|
|
5
8
|
constructor() {
|
|
6
9
|
/**
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { colorGray, colorGrayTurva, colorPrimary, colorPrimaryTurva } from "@duetds/tokens";
|
|
5
|
+
import { Component, Element, Event, h, Host, Method, Prop } from "@stencil/core";
|
|
3
6
|
import { createID } from "../../utils/create-id";
|
|
4
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
5
7
|
import isInternetExplorer from "../../utils/is-internet-explorer";
|
|
8
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
9
|
const colors = {
|
|
7
10
|
turva: {
|
|
8
11
|
active: colorPrimaryTurva,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from "@stencil/core";
|
|
2
5
|
import { createID } from "../../utils/create-id";
|
|
3
6
|
import { parsePossibleJSON } from "../../utils/string-utils";
|
|
4
7
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, h, Host, Prop } from "@stencil/core";
|
|
3
5
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
|
+
import { getColorByName } from "../../utils/token-utils";
|
|
4
7
|
export class DuetSpinner {
|
|
5
8
|
constructor() {
|
|
6
9
|
/**
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
4
|
import editIcon from "@duetds/icons/lib/assets/action-edit-2";
|
|
5
|
+
import { Build, Component, Element, Event, h, Method, Prop } from "@stencil/core";
|
|
6
|
+
import { createID } from "../../utils/create-id";
|
|
5
7
|
import { isKeyboardClick } from "../../utils/keyboard-utils";
|
|
8
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
9
|
/**
|
|
7
10
|
* @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
|
|
8
11
|
* @slot heading-content - Step heading content. Use this slot to show additional content next to step heading.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Listen, Prop, Watch } from "@stencil/core";
|
|
2
5
|
import groupBy from "../../utils/group-by";
|
|
3
6
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
4
7
|
export class DuetStepper {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Method, Prop, State } from "@stencil/core";
|
|
4
5
|
import { createID } from "../../utils/create-id";
|
|
6
|
+
import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey } from "../../utils/keyboard-utils";
|
|
5
7
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
9
|
export class DuetTabGroup {
|
|
7
10
|
constructor() {
|
|
8
11
|
this.id = createID("DuetTabGroup");
|
|
@@ -23,16 +26,24 @@ export class DuetTabGroup {
|
|
|
23
26
|
/**
|
|
24
27
|
* The currently active language. This setting changes the accessible labels to match the
|
|
25
28
|
* chosen language.
|
|
29
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
30
|
+
* @default "fi"
|
|
26
31
|
*/
|
|
27
32
|
this.language = getLanguage();
|
|
28
33
|
/**
|
|
29
|
-
*
|
|
34
|
+
* Defaults for Label
|
|
35
|
+
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
30
36
|
*/
|
|
31
|
-
this.
|
|
37
|
+
this.labelDefaults = {
|
|
32
38
|
fi: "Valitse",
|
|
33
39
|
en: "Choose",
|
|
34
|
-
sv: "
|
|
35
|
-
}
|
|
40
|
+
sv: "Välj",
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Label for the select element which gets shown on mobile.
|
|
44
|
+
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
45
|
+
*/
|
|
46
|
+
this.label = getLocaleString(this.labelDefaults, this.language);
|
|
36
47
|
/**
|
|
37
48
|
* Determines whether the label for the select element shown on mobile is visually hidden.
|
|
38
49
|
*/
|
|
@@ -239,13 +250,45 @@ export class DuetTabGroup {
|
|
|
239
250
|
"required": false,
|
|
240
251
|
"optional": false,
|
|
241
252
|
"docs": {
|
|
242
|
-
"tags": [
|
|
253
|
+
"tags": [{
|
|
254
|
+
"text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing",
|
|
255
|
+
"name": "deprecated"
|
|
256
|
+
}, {
|
|
257
|
+
"text": "\"fi\"",
|
|
258
|
+
"name": "default"
|
|
259
|
+
}],
|
|
243
260
|
"text": "The currently active language. This setting changes the accessible labels to match the\nchosen language."
|
|
244
261
|
},
|
|
245
262
|
"attribute": "language",
|
|
246
263
|
"reflect": false,
|
|
247
264
|
"defaultValue": "getLanguage()"
|
|
248
265
|
},
|
|
266
|
+
"labelDefaults": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"mutable": false,
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "DuetLangObject | string",
|
|
271
|
+
"resolved": "DuetLangObject | string",
|
|
272
|
+
"references": {
|
|
273
|
+
"DuetLangObject": {
|
|
274
|
+
"location": "import",
|
|
275
|
+
"path": "../../utils/language-utils"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"required": false,
|
|
280
|
+
"optional": false,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [{
|
|
283
|
+
"text": "{fi: \"Valitse\", en: \"Choose\", sv: \"V\u00E4lja\"}",
|
|
284
|
+
"name": "default"
|
|
285
|
+
}],
|
|
286
|
+
"text": "Defaults for Label"
|
|
287
|
+
},
|
|
288
|
+
"attribute": "label-default",
|
|
289
|
+
"reflect": false,
|
|
290
|
+
"defaultValue": "{\n fi: \"Valitse\",\n en: \"Choose\",\n sv: \"V\u00E4lj\",\n }"
|
|
291
|
+
},
|
|
249
292
|
"label": {
|
|
250
293
|
"type": "string",
|
|
251
294
|
"mutable": false,
|
|
@@ -257,12 +300,15 @@ export class DuetTabGroup {
|
|
|
257
300
|
"required": false,
|
|
258
301
|
"optional": false,
|
|
259
302
|
"docs": {
|
|
260
|
-
"tags": [
|
|
303
|
+
"tags": [{
|
|
304
|
+
"text": "{fi: \"Valitse\", en: \"Choose\", sv: \"V\u00E4lja\"}",
|
|
305
|
+
"name": "default"
|
|
306
|
+
}],
|
|
261
307
|
"text": "Label for the select element which gets shown on mobile."
|
|
262
308
|
},
|
|
263
309
|
"attribute": "label",
|
|
264
310
|
"reflect": false,
|
|
265
|
-
"defaultValue": "getLocaleString(
|
|
311
|
+
"defaultValue": "getLocaleString(this.labelDefaults, this.language)"
|
|
266
312
|
},
|
|
267
313
|
"labelHidden": {
|
|
268
314
|
"type": "boolean",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { mediaQueryLarge, mediaQueryMedium, mediaQuerySmall, mediaQueryXLarge, mediaQueryXxLarge, mediaQueryXxxLarge, sizeHeader, sizeNavigation, } from "@duetds/tokens";
|
|
5
|
+
import { Build, Component, Element, h, Host, Prop, State } from "@stencil/core";
|
|
3
6
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
4
7
|
// remove wrapping speech marks.
|
|
5
8
|
// media query tokens are wrapped in speech marks,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Method, Prop, Watch, } from "@stencil/core";
|
|
2
5
|
import { createID } from "../../utils/create-id";
|
|
3
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
4
6
|
import { cleanValue } from "../../utils/input-utils";
|
|
7
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
5
8
|
const CharacterCount = ({ value, maxlength, label, theme }) => {
|
|
6
9
|
if (maxlength == null) {
|
|
7
10
|
return;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Method, Prop, Watch } from "@stencil/core";
|
|
2
5
|
import { createID } from "../../utils/create-id";
|
|
3
6
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
4
7
|
export class DuetToggle {
|