@duetds/components 6.0.3 → 6.0.5
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 +77 -70
- package/lib/cjs/duet-action-button.cjs.entry.js +3 -3
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +10 -9
- package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
- package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +17 -14
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +1 -1
- package/lib/cjs/duet-grid_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +3 -3
- package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.cjs.entry.js +25 -27
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +2 -2
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +1 -1
- package/lib/cjs/{focus-utils-15207057.js → focus-utils-bbba1f98.js} +1 -1
- package/lib/cjs/{index-28a9133b.js → index-af927d29.js} +1 -1
- package/lib/cjs/loader.cjs.js +1 -1
- package/lib/cjs/{token-utils-fef5b4eb.js → token-utils-f6e2f4ef.js} +1 -1
- package/lib/cjs/{tokens-29450bcb.js → tokens-4c69b122.js} +18 -15
- package/lib/cjs/{tokens.module-ef598645.js → tokens.module-1bb2d45e.js} +12 -10
- package/lib/collection/components/duet-choice/duet-choice.js +4 -4
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +4 -3
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +25 -27
- package/lib/collection/components/duet-upload/duet-upload.js +18 -15
- package/lib/dist-custom-elements/duet-action-button.d.ts +11 -0
- package/lib/dist-custom-elements/duet-action-button.js +9 -0
- package/lib/dist-custom-elements/duet-alert.d.ts +11 -0
- package/lib/dist-custom-elements/duet-alert.js +9 -0
- package/lib/dist-custom-elements/duet-badge.d.ts +11 -0
- package/lib/dist-custom-elements/duet-badge.js +9 -0
- package/lib/dist-custom-elements/duet-breadcrumb.d.ts +11 -0
- package/lib/dist-custom-elements/duet-breadcrumb.js +73 -0
- package/lib/dist-custom-elements/duet-breadcrumbs.d.ts +11 -0
- package/lib/dist-custom-elements/duet-breadcrumbs.js +90 -0
- package/lib/dist-custom-elements/duet-button.d.ts +11 -0
- package/lib/dist-custom-elements/duet-button.js +9 -0
- package/lib/dist-custom-elements/duet-caption.d.ts +11 -0
- package/lib/dist-custom-elements/duet-caption.js +9 -0
- package/lib/dist-custom-elements/duet-card.d.ts +11 -0
- package/lib/dist-custom-elements/duet-card.js +190 -0
- package/lib/dist-custom-elements/duet-checkbox.d.ts +11 -0
- package/lib/dist-custom-elements/duet-checkbox.js +163 -0
- package/lib/dist-custom-elements/duet-choice-group.d.ts +11 -0
- package/lib/dist-custom-elements/duet-choice-group.js +227 -0
- package/lib/dist-custom-elements/duet-choice.d.ts +11 -0
- package/lib/dist-custom-elements/duet-choice.js +390 -0
- package/lib/dist-custom-elements/duet-collapsible.d.ts +11 -0
- package/lib/dist-custom-elements/duet-collapsible.js +170 -0
- package/lib/dist-custom-elements/duet-combobox.d.ts +11 -0
- package/lib/dist-custom-elements/duet-combobox.js +432 -0
- package/lib/dist-custom-elements/duet-cookie-consent.d.ts +11 -0
- package/lib/dist-custom-elements/duet-cookie-consent.js +94 -0
- package/lib/dist-custom-elements/duet-date-picker.d.ts +11 -0
- package/lib/dist-custom-elements/duet-date-picker.js +906 -0
- package/lib/dist-custom-elements/duet-divider.d.ts +11 -0
- package/lib/dist-custom-elements/duet-divider.js +9 -0
- package/lib/dist-custom-elements/duet-editable-table.d.ts +11 -0
- package/lib/dist-custom-elements/duet-editable-table.js +9 -0
- package/lib/dist-custom-elements/duet-empty-state.d.ts +11 -0
- package/lib/dist-custom-elements/duet-empty-state.js +9 -0
- package/lib/dist-custom-elements/duet-fieldset.d.ts +11 -0
- package/lib/dist-custom-elements/duet-fieldset.js +9 -0
- package/lib/dist-custom-elements/duet-footer.d.ts +11 -0
- package/lib/dist-custom-elements/duet-footer.js +199 -0
- package/lib/dist-custom-elements/duet-grid-item.d.ts +11 -0
- package/lib/dist-custom-elements/duet-grid-item.js +9 -0
- package/lib/dist-custom-elements/duet-grid.d.ts +11 -0
- package/lib/dist-custom-elements/duet-grid.js +9 -0
- package/lib/dist-custom-elements/duet-header.d.ts +11 -0
- package/lib/dist-custom-elements/duet-header.js +764 -0
- package/lib/dist-custom-elements/duet-heading.d.ts +11 -0
- package/lib/dist-custom-elements/duet-heading.js +9 -0
- package/lib/dist-custom-elements/duet-hero.d.ts +11 -0
- package/lib/dist-custom-elements/duet-hero.js +314 -0
- package/lib/dist-custom-elements/duet-icon.d.ts +11 -0
- package/lib/dist-custom-elements/duet-icon.js +9 -0
- package/lib/dist-custom-elements/duet-input.d.ts +11 -0
- package/lib/dist-custom-elements/duet-input.js +9 -0
- package/lib/dist-custom-elements/duet-label.d.ts +11 -0
- package/lib/dist-custom-elements/duet-label.js +9 -0
- package/lib/dist-custom-elements/duet-layout.d.ts +11 -0
- package/lib/dist-custom-elements/duet-layout.js +107 -0
- package/lib/dist-custom-elements/duet-link.d.ts +11 -0
- package/lib/dist-custom-elements/duet-link.js +9 -0
- package/lib/dist-custom-elements/duet-list-item.d.ts +11 -0
- package/lib/dist-custom-elements/duet-list-item.js +9 -0
- package/lib/dist-custom-elements/duet-list.d.ts +11 -0
- package/lib/dist-custom-elements/duet-list.js +9 -0
- package/lib/dist-custom-elements/duet-logo.d.ts +11 -0
- package/lib/dist-custom-elements/duet-logo.js +9 -0
- package/lib/dist-custom-elements/duet-modal.d.ts +11 -0
- package/lib/dist-custom-elements/duet-modal.js +331 -0
- package/lib/dist-custom-elements/duet-notification-drawer.d.ts +11 -0
- package/lib/dist-custom-elements/duet-notification-drawer.js +194 -0
- package/lib/dist-custom-elements/duet-notification.d.ts +11 -0
- package/lib/dist-custom-elements/duet-notification.js +114 -0
- package/lib/dist-custom-elements/duet-number-input.d.ts +11 -0
- package/lib/dist-custom-elements/duet-number-input.js +516 -0
- package/lib/dist-custom-elements/duet-pagination.d.ts +11 -0
- package/lib/dist-custom-elements/duet-pagination.js +396 -0
- package/lib/dist-custom-elements/duet-paragraph.d.ts +11 -0
- package/lib/dist-custom-elements/duet-paragraph.js +9 -0
- package/lib/dist-custom-elements/duet-progress.d.ts +11 -0
- package/lib/dist-custom-elements/duet-progress.js +9 -0
- package/lib/dist-custom-elements/duet-radio-group.d.ts +11 -0
- package/lib/dist-custom-elements/duet-radio-group.js +216 -0
- package/lib/dist-custom-elements/duet-radio.d.ts +11 -0
- package/lib/dist-custom-elements/duet-radio.js +167 -0
- package/lib/dist-custom-elements/duet-range-slider.d.ts +11 -0
- package/lib/dist-custom-elements/duet-range-slider.js +209 -0
- package/lib/dist-custom-elements/duet-range-stepper.d.ts +11 -0
- package/lib/dist-custom-elements/duet-range-stepper.js +223 -0
- package/lib/dist-custom-elements/duet-scrollable.d.ts +11 -0
- package/lib/dist-custom-elements/duet-scrollable.js +9 -0
- package/lib/dist-custom-elements/duet-select.d.ts +11 -0
- package/lib/dist-custom-elements/duet-select.js +9 -0
- package/lib/dist-custom-elements/duet-spacer.d.ts +11 -0
- package/lib/dist-custom-elements/duet-spacer.js +9 -0
- package/lib/dist-custom-elements/duet-spinner.d.ts +11 -0
- package/lib/dist-custom-elements/duet-spinner.js +9 -0
- package/lib/dist-custom-elements/duet-step.d.ts +11 -0
- package/lib/dist-custom-elements/duet-step.js +150 -0
- package/lib/dist-custom-elements/duet-stepper.d.ts +11 -0
- package/lib/dist-custom-elements/duet-stepper.js +164 -0
- package/lib/dist-custom-elements/duet-tab-group.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tab-group.js +301 -0
- package/lib/dist-custom-elements/duet-tab.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tab.js +59 -0
- package/lib/dist-custom-elements/duet-table.d.ts +11 -0
- package/lib/dist-custom-elements/duet-table.js +9 -0
- package/lib/dist-custom-elements/duet-textarea.d.ts +11 -0
- package/lib/dist-custom-elements/duet-textarea.js +297 -0
- package/lib/dist-custom-elements/duet-toggle.d.ts +11 -0
- package/lib/dist-custom-elements/duet-toggle.js +150 -0
- package/lib/dist-custom-elements/duet-tooltip.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tooltip.js +9 -0
- package/lib/dist-custom-elements/duet-tray.d.ts +11 -0
- package/lib/dist-custom-elements/duet-tray.js +175 -0
- package/lib/dist-custom-elements/duet-upload-aria-status.d.ts +11 -0
- package/lib/dist-custom-elements/duet-upload-aria-status.js +9 -0
- package/lib/dist-custom-elements/duet-upload.d.ts +11 -0
- package/lib/dist-custom-elements/duet-upload.js +1514 -0
- package/lib/dist-custom-elements/duet-visually-hidden.d.ts +11 -0
- package/lib/dist-custom-elements/duet-visually-hidden.js +9 -0
- package/lib/dist-custom-elements/index.d.ts +26 -0
- package/lib/dist-custom-elements/index.js +37 -0
- package/lib/{esm/tokens-8ff8c570.js → dist-custom-elements/p-02305a1e.js} +18 -15
- package/lib/dist-custom-elements/p-0b3f675e.js +47 -0
- package/lib/{esm/focus-utils-559691b3.js → dist-custom-elements/p-0b8f16f1.js} +1 -1
- package/lib/dist-custom-elements/p-0ce83b83.js +154 -0
- package/lib/dist-custom-elements/p-0f5b2dfe.js +287 -0
- package/lib/dist-custom-elements/p-115c79b6.js +6 -0
- package/lib/dist-custom-elements/p-12721178.js +57 -0
- package/lib/dist-custom-elements/p-166d7b9c.js +199 -0
- package/lib/dist-custom-elements/p-1ad6b04e.js +1666 -0
- package/lib/dist-custom-elements/p-21887c28.js +275 -0
- package/lib/dist-custom-elements/p-24c2ac51.js +114 -0
- package/lib/dist-custom-elements/p-266411cf.js +307 -0
- package/lib/dist-custom-elements/p-2bb345c0.js +193 -0
- package/lib/dist-custom-elements/p-32a67b55.js +87 -0
- package/lib/dist-custom-elements/p-4c52333e.js +341 -0
- package/lib/dist-custom-elements/p-4ebf1618.js +13 -0
- package/lib/dist-custom-elements/p-4f516732.js +214 -0
- package/lib/dist-custom-elements/p-53a0c93d.js +37 -0
- package/lib/dist-custom-elements/p-544d933d.js +61 -0
- package/lib/dist-custom-elements/p-56118313.js +53 -0
- package/lib/dist-custom-elements/p-56b5945f.js +160 -0
- package/lib/dist-custom-elements/p-5a9d75e1.js +55 -0
- package/lib/dist-custom-elements/p-692cc270.js +125 -0
- package/lib/dist-custom-elements/p-6cae0682.js +75 -0
- package/lib/dist-custom-elements/p-704245ef.js +9 -0
- package/lib/dist-custom-elements/p-76f00bd5.js +10 -0
- package/lib/dist-custom-elements/p-7a003d73.js +37 -0
- package/lib/dist-custom-elements/p-7f5ad01d.js +64 -0
- package/lib/{esm/token-utils-df78f4d8.js → dist-custom-elements/p-86faf728.js} +1 -1
- package/lib/dist-custom-elements/p-8f69f7ca.js +428 -0
- package/lib/dist-custom-elements/p-92012dcc.js +71 -0
- package/lib/dist-custom-elements/p-9af8e9da.js +70 -0
- package/lib/dist-custom-elements/p-a087e30a.js +86 -0
- package/lib/dist-custom-elements/p-b9058029.js +138 -0
- package/lib/dist-custom-elements/p-bd779757.js +184 -0
- package/lib/dist-custom-elements/p-c0469b33.js +133 -0
- package/lib/dist-custom-elements/p-c1325e35.js +11 -0
- package/lib/dist-custom-elements/p-c8d44e6d.js +87 -0
- package/lib/dist-custom-elements/p-cfab50b5.js +110 -0
- package/lib/dist-custom-elements/p-d004da5f.js +6 -0
- package/lib/dist-custom-elements/p-d11287e1.js +129 -0
- package/lib/dist-custom-elements/p-d4c234ed.js +390 -0
- package/lib/dist-custom-elements/p-d8549efe.js +20 -0
- package/lib/dist-custom-elements/p-db91a981.js +98 -0
- package/lib/dist-custom-elements/p-e121eb6d.js +241 -0
- package/lib/dist-custom-elements/p-ede854e1.js +92 -0
- package/lib/dist-custom-elements/p-ee9a63c3.js +65 -0
- package/lib/dist-custom-elements/p-f11208c3.js +6 -0
- package/lib/dist-custom-elements/p-f1d0dca7.js +275 -0
- package/lib/dist-custom-elements/p-fb6be4e4.js +66 -0
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-4c93a18e.system.entry.js → p-01ec746a.system.entry.js} +1 -1
- package/lib/duet/p-02305a1e.js +4 -0
- package/lib/duet/{p-674e546f.system.entry.js → p-02a0c4f6.system.entry.js} +1 -1
- package/lib/duet/{p-b01e2523.entry.js → p-02fec3bd.entry.js} +1 -1
- package/lib/duet/{p-300147ad.entry.js → p-032a5071.entry.js} +1 -1
- package/lib/duet/{p-0626271f.entry.js → p-08fe21b1.entry.js} +1 -1
- package/lib/duet/{p-d0cee171.entry.js → p-0b0c7f09.entry.js} +1 -1
- package/lib/duet/{p-1931d33f.system.js → p-100c6ed7.system.js} +1 -1
- package/lib/duet/{p-dab594cf.system.entry.js → p-168a22df.system.entry.js} +1 -1
- package/lib/duet/p-1fc60a60.system.js +4 -0
- package/lib/duet/{p-bb9624c3.entry.js → p-24dafa59.entry.js} +1 -1
- package/lib/duet/{p-d444107c.system.entry.js → p-28fcab59.system.entry.js} +1 -1
- package/lib/duet/{p-db15d420.system.entry.js → p-292ab686.system.entry.js} +1 -1
- package/lib/duet/{p-de986d77.system.entry.js → p-293b8c58.system.entry.js} +1 -1
- package/lib/duet/{p-9308c1e6.entry.js → p-2c698aec.entry.js} +1 -1
- package/lib/duet/p-32f7178a.system.js +4 -0
- package/lib/duet/{p-92d95bde.system.entry.js → p-3967595b.system.entry.js} +1 -1
- package/lib/duet/{p-72443e94.system.entry.js → p-414b1ba7.system.entry.js} +1 -1
- package/lib/duet/{p-ae515c54.entry.js → p-422d7157.entry.js} +1 -1
- package/lib/duet/{p-9fcac068.system.entry.js → p-4df190b5.system.entry.js} +1 -1
- package/lib/duet/{p-c41b07d7.entry.js → p-50eb1959.entry.js} +1 -1
- package/lib/duet/{p-de3c0f4d.js → p-532e9db7.js} +1 -1
- package/lib/duet/{p-16521f2d.entry.js → p-552ce747.entry.js} +1 -1
- package/lib/duet/{p-398a79a0.js → p-588be556.js} +1 -1
- package/lib/duet/{p-b008fe25.entry.js → p-58c58219.entry.js} +1 -1
- package/lib/duet/{p-2bd79d6b.entry.js → p-5b7db3d5.entry.js} +1 -1
- package/lib/duet/{p-5d967d15.entry.js → p-5bb6f856.entry.js} +1 -1
- package/lib/duet/{p-20271117.entry.js → p-62ff683a.entry.js} +1 -1
- package/lib/duet/{p-e1654a8b.system.entry.js → p-65206bf2.system.entry.js} +1 -1
- package/lib/duet/{p-2bba6489.entry.js → p-66bb00c2.entry.js} +1 -1
- package/lib/duet/{p-49db53a1.system.entry.js → p-6cc35a71.system.entry.js} +1 -1
- package/lib/duet/{p-63dbd5af.system.entry.js → p-7431ad27.system.entry.js} +1 -1
- package/lib/duet/{p-df11c241.system.entry.js → p-74bcd39f.system.entry.js} +1 -1
- package/lib/duet/{p-e2ac0727.system.entry.js → p-76fd11ff.system.entry.js} +1 -1
- package/lib/duet/{p-339e5901.system.js → p-7871ef0a.system.js} +1 -1
- package/lib/duet/{p-1aca544d.entry.js → p-79160b90.entry.js} +1 -1
- package/lib/duet/{p-23ad5f8a.entry.js → p-7d71fd3b.entry.js} +1 -1
- package/lib/duet/{p-946aa901.system.entry.js → p-7d866e2a.system.entry.js} +1 -1
- package/lib/duet/{p-9e54127f.system.entry.js → p-83120829.system.entry.js} +1 -1
- package/lib/duet/{p-d0f72f22.js → p-85c3f82e.js} +1 -1
- package/lib/duet/{p-06ab2787.system.entry.js → p-85df6ff1.system.entry.js} +1 -1
- package/lib/duet/{p-68c3b19f.entry.js → p-86567f28.entry.js} +1 -1
- package/lib/duet/{p-104bf1b5.entry.js → p-8669b09e.entry.js} +1 -1
- package/lib/duet/{p-9f18afd6.entry.js → p-88819152.entry.js} +1 -1
- package/lib/duet/{p-5d1787cb.entry.js → p-89dc739e.entry.js} +1 -1
- package/lib/duet/{p-6c875cfa.system.entry.js → p-8a4d7ae9.system.entry.js} +1 -1
- package/lib/duet/{p-571440c7.system.entry.js → p-8edd208a.system.entry.js} +1 -1
- package/lib/duet/{p-691f609b.entry.js → p-8efd9495.entry.js} +1 -1
- package/lib/duet/{p-c5499bc3.entry.js → p-8f222a1b.entry.js} +1 -1
- package/lib/duet/{p-6b0a4b3b.entry.js → p-98ba3424.entry.js} +1 -1
- package/lib/duet/{p-31004a7b.system.entry.js → p-996ba330.system.entry.js} +1 -1
- package/lib/duet/{p-de815460.system.entry.js → p-9999e5fa.system.entry.js} +1 -1
- package/lib/duet/{p-de146ffa.system.entry.js → p-9bae46c2.system.entry.js} +1 -1
- package/lib/duet/{p-ab2f08b3.system.entry.js → p-9cb366b1.system.entry.js} +1 -1
- package/lib/duet/{p-8c409ffe.system.entry.js → p-a3de163c.system.entry.js} +1 -1
- package/lib/duet/{p-064dd5fd.entry.js → p-a40a7074.entry.js} +1 -1
- package/lib/duet/{p-1010fb94.entry.js → p-a463d7ba.entry.js} +1 -1
- package/lib/duet/{p-087d72dd.system.entry.js → p-a755f378.system.entry.js} +1 -1
- package/lib/duet/{p-b066a6b7.entry.js → p-a78c751d.entry.js} +1 -1
- package/lib/duet/{p-c8d9da51.entry.js → p-aae486b1.entry.js} +1 -1
- package/lib/duet/{p-0f7f7e7d.system.entry.js → p-ade95c1a.system.entry.js} +1 -1
- package/lib/duet/{p-9f8a51b4.system.entry.js → p-ae270d5c.system.entry.js} +1 -1
- package/lib/duet/{p-94c07a46.system.entry.js → p-afd48ab5.system.entry.js} +1 -1
- package/lib/duet/{p-f2eaad1e.js → p-b1931fae.js} +1 -1
- package/lib/duet/{p-e3983bfe.entry.js → p-b1b6bfaf.entry.js} +1 -1
- package/lib/duet/{p-6eecfced.system.entry.js → p-bcaa46bc.system.entry.js} +1 -1
- package/lib/duet/{p-eb54474f.system.entry.js → p-bd95bbac.system.entry.js} +1 -1
- package/lib/duet/{p-09364233.entry.js → p-c14e364f.entry.js} +1 -1
- package/lib/duet/{p-074bfd45.entry.js → p-cd24ed34.entry.js} +1 -1
- package/lib/duet/{p-8157e5bb.system.entry.js → p-ceaefc71.system.entry.js} +1 -1
- package/lib/duet/{p-18cc5627.system.js → p-d209191d.system.js} +1 -1
- package/lib/duet/{p-5658ac20.system.entry.js → p-d33ad700.system.entry.js} +1 -1
- package/lib/duet/{p-41cb95cb.entry.js → p-d5700477.entry.js} +1 -1
- package/lib/duet/{p-b3dc55a6.system.entry.js → p-d8c1e717.system.entry.js} +1 -1
- package/lib/duet/{p-cca9c605.system.entry.js → p-d8e4683f.system.entry.js} +1 -1
- package/lib/duet/{p-0ae59d7c.entry.js → p-db5582e2.entry.js} +1 -1
- package/lib/duet/{p-f7ac05dd.system.entry.js → p-dc3379cf.system.entry.js} +1 -1
- package/lib/duet/{p-cfa50753.system.js → p-ddc42b65.system.js} +1 -1
- package/lib/duet/{p-3cc55c8a.system.entry.js → p-e1c35023.system.entry.js} +1 -1
- package/lib/duet/p-e6d75fab.entry.js +4 -0
- package/lib/duet/{p-89048c6f.entry.js → p-e99cfa9a.entry.js} +1 -1
- package/lib/duet/{p-4034b322.system.entry.js → p-ec08089e.system.entry.js} +1 -1
- package/lib/duet/{p-bec24271.system.entry.js → p-ec45b5c6.system.entry.js} +1 -1
- package/lib/duet/{p-5beb69ac.entry.js → p-ed41265b.entry.js} +1 -1
- package/lib/duet/{p-744ce6ce.entry.js → p-ed985877.entry.js} +1 -1
- package/lib/duet/p-f5cac1af.entry.js +4 -0
- package/lib/duet/{p-e0f6ebf4.system.entry.js → p-f6725c7b.system.entry.js} +1 -1
- package/lib/duet/{p-c2e37fb4.entry.js → p-f7012b1f.entry.js} +1 -1
- package/lib/duet/{p-23ba48a5.system.entry.js → p-f7856429.system.entry.js} +1 -1
- package/lib/duet/{p-97a369d6.entry.js → p-f9d05a5c.entry.js} +1 -1
- package/lib/duet/{p-ef4b4f35.entry.js → p-fb798cb8.entry.js} +1 -1
- package/lib/duet/{p-47ed8218.entry.js → p-fcbf70a6.entry.js} +1 -1
- package/lib/duet/{p-3d029dce.system.entry.js → p-fcc58f66.system.entry.js} +1 -1
- package/lib/duet/{p-db115036.entry.js → p-fdd0a7df.entry.js} +1 -1
- package/lib/duet/{p-6841adb8.system.entry.js → p-feae179e.system.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +3 -3
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +3 -3
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +10 -9
- package/lib/esm/duet-collapsible.entry.js +2 -2
- package/lib/esm/duet-combobox.entry.js +1 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +17 -14
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +1 -1
- package/lib/esm/duet-grid_2.entry.js +2 -2
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +3 -3
- package/lib/esm/duet-input_2.entry.js +1 -1
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +25 -27
- package/lib/esm/duet-progress.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +2 -2
- package/lib/esm/duet-scrollable_3.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +2 -2
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +1 -1
- package/lib/esm/focus-utils-b515b88b.js +18 -0
- package/lib/esm/{index-f600b8dc.js → index-d8c3ba71.js} +1 -1
- package/lib/esm/loader.js +1 -1
- package/lib/esm/token-utils-ebf797ab.js +92 -0
- package/lib/esm/tokens-b9d87fda.js +459 -0
- package/lib/esm/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +12 -10
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +2 -2
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +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 +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-559691b3.js → focus-utils-b515b88b.js} +1 -1
- package/lib/esm-es5/{index-f600b8dc.js → index-d8c3ba71.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{token-utils-df78f4d8.js → token-utils-ebf797ab.js} +1 -1
- package/lib/esm-es5/tokens-b9d87fda.js +4 -0
- package/lib/esm-es5/{tokens.module-f4572ed7.js → tokens.module-385c4cf8.js} +1 -1
- package/lib/types/components/duet-choice-group/duet-choice-group.d.ts +1 -0
- package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +2 -2
- package/lib/types/components/duet-upload/duet-upload.d.ts +8 -8
- package/lib/types/components.d.ts +6 -6
- package/package.json +5 -5
- package/lib/custom-elements-bundle/index.d.ts +0 -399
- package/lib/custom-elements-bundle/index.js +0 -14110
- package/lib/duet/p-6002f3d2.system.js +0 -4
- package/lib/duet/p-7c198c75.entry.js +0 -4
- package/lib/duet/p-a93a04b9.system.js +0 -4
- package/lib/duet/p-d1746325.js +0 -4
- package/lib/duet/p-f2ab3e5c.entry.js +0 -4
- package/lib/esm-es5/tokens-8ff8c570.js +0 -4
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, c as createEvent, h, b as Host } from './p-1ad6b04e.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
import { c as createID } from './p-c1325e35.js';
|
|
7
|
+
import { d as debounce } from './p-0b3f675e.js';
|
|
8
|
+
import { i as isKeyboardClick } from './p-d8549efe.js';
|
|
9
|
+
import { g as getLocaleString } from './p-ede854e1.js';
|
|
10
|
+
import { c as capitalizeFirstLetter, g as getColorByName, s as shadeRGBColor } from './p-86faf728.js';
|
|
11
|
+
import { d as defineCustomElement$2 } from './p-4f516732.js';
|
|
12
|
+
import { d as defineCustomElement$1 } from './p-53a0c93d.js';
|
|
13
|
+
|
|
14
|
+
const duetActionButtonCss = "*,*::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:inline-block;margin:0 auto}button.duet-action-button{white-space:nowrap}button.duet-action-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva button.duet-action-button{color:#171c3a;background:#f5f5f7}button.duet-action-button duet-icon{display:block}@media (max-width: 35.9375em){button.duet-action-button{width:32px;height:32px}}button.duet-action-button:not(:disabled):hover{background:#e9ecee}.duet-theme-turva button.duet-action-button:not(:disabled):hover{background:#e9e9eb}button.duet-action-button:focus{outline:0;box-shadow:0 0 0 2px #0077b3 !important}.duet-theme-turva button.duet-action-button:focus{box-shadow:0 0 0 2px #171c3a !important}button.duet-action-button:active:focus{background:#dddfe1 !important;box-shadow:none}.duet-theme-turva button.duet-action-button:active:focus{background:#ddddde !important}button.duet-action-button:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva button.duet-action-button:disabled{color:#747475;background:#f5f5f7}";
|
|
15
|
+
|
|
16
|
+
const DuetActionButton = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.__registerHost();
|
|
20
|
+
this.__attachShadow();
|
|
21
|
+
this.duetActionEvent = createEvent(this, "duetActionEvent", 6);
|
|
22
|
+
this.listId = createID("duet-action-button");
|
|
23
|
+
this.numbersStore = "";
|
|
24
|
+
/**
|
|
25
|
+
* Theme of the pagination.
|
|
26
|
+
*/
|
|
27
|
+
this.theme = "";
|
|
28
|
+
/**
|
|
29
|
+
* Name of the icon to display
|
|
30
|
+
*/
|
|
31
|
+
this.iconName = "action-arrow-left-small";
|
|
32
|
+
/**
|
|
33
|
+
* Color of the icon to display
|
|
34
|
+
*/
|
|
35
|
+
this.iconColor = "currentColor";
|
|
36
|
+
/**
|
|
37
|
+
* Size of the icon
|
|
38
|
+
*/
|
|
39
|
+
this.iconSize = "xx-small";
|
|
40
|
+
/**
|
|
41
|
+
* Name of action being called
|
|
42
|
+
*/
|
|
43
|
+
this.actionName = "default-action";
|
|
44
|
+
/**
|
|
45
|
+
* Name of id of action that was called being called
|
|
46
|
+
*/
|
|
47
|
+
this.actionId = undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Name of id of action that was called being called
|
|
50
|
+
*/
|
|
51
|
+
this.actionMeta = undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Disables the button
|
|
54
|
+
*/
|
|
55
|
+
this.disabled = false;
|
|
56
|
+
/**
|
|
57
|
+
* Custom color to be used for the icon, as a design token entered in camelCase
|
|
58
|
+
* or kebab-case. Example: "color-primary". This property can also be set to
|
|
59
|
+
* "currentColor" which forces the icon to use the CSS text color of parent
|
|
60
|
+
* element instead. Useful when you want to control the color in stylesheet
|
|
61
|
+
* instead.
|
|
62
|
+
*/
|
|
63
|
+
this.color = "";
|
|
64
|
+
/**
|
|
65
|
+
* Custom color to be used for a background, as a design token entered
|
|
66
|
+
* in camelCase or kebab-case. Using this option the icon will always be resized
|
|
67
|
+
* to $size-icon-medium on mobile viewports. Example: "color-primary".
|
|
68
|
+
*/
|
|
69
|
+
this.background = "";
|
|
70
|
+
/**
|
|
71
|
+
* Title of the action button (shows as DOM tooltip when hovering)
|
|
72
|
+
* if set to true, this will try to add a best-guess title based on action-name
|
|
73
|
+
* if set to a string the string is used
|
|
74
|
+
* if set to false nothing is set
|
|
75
|
+
*/
|
|
76
|
+
this.accessibleTitle = true;
|
|
77
|
+
/**
|
|
78
|
+
* Described By id
|
|
79
|
+
*/
|
|
80
|
+
this.accessibleDescribedBy = undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Details of the component
|
|
83
|
+
*/
|
|
84
|
+
this.accessibleDetails = undefined;
|
|
85
|
+
/**
|
|
86
|
+
* String of id's that indicate alternative labels elements
|
|
87
|
+
*/
|
|
88
|
+
this.accessibleLabelledBy = undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Aria description the button
|
|
91
|
+
*/
|
|
92
|
+
this.accessibleDescription = undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Default accessible labels
|
|
95
|
+
*/
|
|
96
|
+
this.accessibleLabelsDefaults = {
|
|
97
|
+
en: {
|
|
98
|
+
label: "Click to activate action",
|
|
99
|
+
},
|
|
100
|
+
fi: {
|
|
101
|
+
label: "Klikkaa toiminnon aktivointiin",
|
|
102
|
+
},
|
|
103
|
+
sv: {
|
|
104
|
+
label: "Klicka för att aktivera åtgärd",
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Default accessible labels
|
|
109
|
+
*/
|
|
110
|
+
this.accessibleLabels = getLocaleString(this.accessibleLabelsDefaults);
|
|
111
|
+
/**
|
|
112
|
+
* Used to indicate which dom element with ID this element controls
|
|
113
|
+
*/
|
|
114
|
+
this.accessibleControls = "";
|
|
115
|
+
/**
|
|
116
|
+
* Private methods.
|
|
117
|
+
*/
|
|
118
|
+
//helper to emit relevant page events
|
|
119
|
+
this.emitPageEvent = debounce(e => {
|
|
120
|
+
this.duetActionEvent.emit({
|
|
121
|
+
component: "duet-action-button",
|
|
122
|
+
originalEvent: e,
|
|
123
|
+
action: this.actionId,
|
|
124
|
+
name: this.actionName,
|
|
125
|
+
meta: this.actionMeta,
|
|
126
|
+
id: this.listId,
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
//handle a11y keyboard navigation events
|
|
131
|
+
async onKeyboardDown(e) {
|
|
132
|
+
if (isKeyboardClick(e)) {
|
|
133
|
+
this.emitPageEvent(e);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//return readable title for the action-button
|
|
137
|
+
getTitle() {
|
|
138
|
+
let titleString = "";
|
|
139
|
+
if (typeof this.accessibleTitle === "string") {
|
|
140
|
+
titleString = this.accessibleTitle;
|
|
141
|
+
}
|
|
142
|
+
if (this.accessibleTitle === true) {
|
|
143
|
+
titleString = capitalizeFirstLetter(`${this.actionName}`);
|
|
144
|
+
}
|
|
145
|
+
return titleString;
|
|
146
|
+
}
|
|
147
|
+
//set update current when mouse click on page number
|
|
148
|
+
async onMouseHandler(e) {
|
|
149
|
+
e.preventDefault();
|
|
150
|
+
this.duetActionEvent.emit({
|
|
151
|
+
component: "duet-action-button",
|
|
152
|
+
originalEvent: e,
|
|
153
|
+
action: this.actionName,
|
|
154
|
+
id: this.actionId,
|
|
155
|
+
meta: this.actionMeta,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Component lifecycle events.
|
|
160
|
+
*/
|
|
161
|
+
componentWillLoad() {
|
|
162
|
+
inheritGlobalTheme(this);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* render() function
|
|
166
|
+
* Always the last one in the class.
|
|
167
|
+
*/
|
|
168
|
+
render() {
|
|
169
|
+
const color = this.color === "currentColor" ? "currentColor" : getColorByName(this.color, this.theme);
|
|
170
|
+
const backgroundColor = getColorByName(this.background, this.theme);
|
|
171
|
+
const backgroundHoverColor = backgroundColor ? shadeRGBColor(backgroundColor, -0.1) : backgroundColor;
|
|
172
|
+
const backgroundStyles = backgroundColor
|
|
173
|
+
? `
|
|
174
|
+
button.duet-action-button {
|
|
175
|
+
background: ${backgroundColor} !important;
|
|
176
|
+
}
|
|
177
|
+
button.duet-action-button:not(:disabled):hover {
|
|
178
|
+
background: ${backgroundHoverColor} !important;
|
|
179
|
+
}
|
|
180
|
+
`
|
|
181
|
+
: "";
|
|
182
|
+
const styles = {
|
|
183
|
+
color,
|
|
184
|
+
"border-color": getColorByName(this.iconColor, this.theme),
|
|
185
|
+
"border-width": "1px",
|
|
186
|
+
"border-style": "solid",
|
|
187
|
+
};
|
|
188
|
+
return (h(Host, { onKeyDown: e => this.onKeyboardDown(e) }, h("style", { innerHTML: backgroundStyles }), h("button", { part: "button", style: styles, disabled: this.disabled, id: this.listId, class: {
|
|
189
|
+
"duet-action-button": true,
|
|
190
|
+
"duet-action-button--disabled": this.disabled,
|
|
191
|
+
[`duet-action-button--${this.theme}`]: this.theme !== "",
|
|
192
|
+
}, type: "button", onClick: e => this.onMouseHandler(e), "aria-label": this.accessibleLabels.label, "aria-labelledby": this.accessibleLabelledBy, "aria-description": this.accessibleDescription, "aria-describedby": this.accessibleDescribedBy, "aria-details": this.accessibleDetails, "aria-controls": this.accessibleControls, title: this.getTitle() }, h("duet-icon", { part: "icon", name: this.iconName, color: this.iconColor, margin: "none", size: this.iconSize }), h("duet-visually-hidden", null, h("slot", null)))));
|
|
193
|
+
}
|
|
194
|
+
get element() { return this; }
|
|
195
|
+
static get style() { return duetActionButtonCss; }
|
|
196
|
+
}, [1, "duet-action-button", {
|
|
197
|
+
"theme": [1025],
|
|
198
|
+
"iconName": [1, "icon-name"],
|
|
199
|
+
"iconColor": [1, "icon-color"],
|
|
200
|
+
"iconSize": [1, "icon-size"],
|
|
201
|
+
"actionName": [1, "action-name"],
|
|
202
|
+
"actionId": [1, "action-id"],
|
|
203
|
+
"actionMeta": [1, "action-meta"],
|
|
204
|
+
"disabled": [4],
|
|
205
|
+
"color": [513],
|
|
206
|
+
"background": [1],
|
|
207
|
+
"accessibleTitle": [8, "title"],
|
|
208
|
+
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
209
|
+
"accessibleDetails": [1, "accessible-details"],
|
|
210
|
+
"accessibleLabelledBy": [1, "accessible-labelled-by"],
|
|
211
|
+
"accessibleDescription": [1, "accessible-description"],
|
|
212
|
+
"accessibleLabelsDefaults": [16],
|
|
213
|
+
"accessibleLabels": [16],
|
|
214
|
+
"accessibleControls": [1, "accessible-controls"],
|
|
215
|
+
"numbersStore": [32]
|
|
216
|
+
}]);
|
|
217
|
+
function defineCustomElement() {
|
|
218
|
+
if (typeof customElements === "undefined") {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const components = ["duet-action-button", "duet-icon", "duet-visually-hidden"];
|
|
222
|
+
components.forEach(tagName => { switch (tagName) {
|
|
223
|
+
case "duet-action-button":
|
|
224
|
+
if (!customElements.get(tagName)) {
|
|
225
|
+
customElements.define(tagName, DuetActionButton);
|
|
226
|
+
}
|
|
227
|
+
break;
|
|
228
|
+
case "duet-icon":
|
|
229
|
+
if (!customElements.get(tagName)) {
|
|
230
|
+
defineCustomElement$2();
|
|
231
|
+
}
|
|
232
|
+
break;
|
|
233
|
+
case "duet-visually-hidden":
|
|
234
|
+
if (!customElements.get(tagName)) {
|
|
235
|
+
defineCustomElement$1();
|
|
236
|
+
}
|
|
237
|
+
break;
|
|
238
|
+
} });
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export { DuetActionButton as D, defineCustomElement as d };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { c as convertHtmlQuotes } from './p-5a9d75e1.js';
|
|
5
|
+
|
|
6
|
+
const localeLookUpTable = {
|
|
7
|
+
fi: "fi-FI",
|
|
8
|
+
en: "en-GB",
|
|
9
|
+
us: "en-US",
|
|
10
|
+
sv: "sv-SE",
|
|
11
|
+
};
|
|
12
|
+
const localeMonetarySignifierLookUpTable = {
|
|
13
|
+
fi: "€",
|
|
14
|
+
en: "£",
|
|
15
|
+
us: "$",
|
|
16
|
+
sv: "€",
|
|
17
|
+
};
|
|
18
|
+
const defLanguageArray = ["fi", "en", "sv"];
|
|
19
|
+
const defaultLanguage = "fi";
|
|
20
|
+
const getCurrentLanguage = () => {
|
|
21
|
+
return document.documentElement.lang ? document.documentElement.lang.toLowerCase() : defaultLanguage;
|
|
22
|
+
};
|
|
23
|
+
const isOfTypeLanguage = (keyInput) => {
|
|
24
|
+
return defLanguageArray.includes(keyInput);
|
|
25
|
+
};
|
|
26
|
+
const checkForLanguage = (languageString = getCurrentLanguage()) => {
|
|
27
|
+
if (isOfTypeLanguage(languageString)) {
|
|
28
|
+
return languageString;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return defaultLanguage;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Returns the current language as a string representation (taken from html lang attribute)
|
|
36
|
+
* If language is not fi|sv|en it will default to "fi"
|
|
37
|
+
* @param {string} lang=fi - "fi" | "sv" | "en"
|
|
38
|
+
* @default {string} "fi"
|
|
39
|
+
*/
|
|
40
|
+
const getLanguage = (languageString = getCurrentLanguage()) => checkForLanguage(languageString);
|
|
41
|
+
/**
|
|
42
|
+
* Returns the current language and locale
|
|
43
|
+
* If language is not fi|sv|en it will default to "fi"
|
|
44
|
+
* special case where lang can be ALSO be "us" in addition to other types - if user decides to override local language
|
|
45
|
+
* @param {string} lang="fi" - "fi" | "sv" | "en" | "us"
|
|
46
|
+
* @default {object} {locale: "fi-FI", money: "€"}
|
|
47
|
+
*/
|
|
48
|
+
const getLocale = (lang) => {
|
|
49
|
+
const returnObj = {
|
|
50
|
+
locale: localeLookUpTable[lang],
|
|
51
|
+
money: localeMonetarySignifierLookUpTable[lang],
|
|
52
|
+
};
|
|
53
|
+
if (returnObj.locale && returnObj.money) {
|
|
54
|
+
return returnObj;
|
|
55
|
+
}
|
|
56
|
+
throw new Error(`Locale for "${lang}" not found`);
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Takes any json object that is passed and/or htmlencoded and converts it to proper json
|
|
60
|
+
*/
|
|
61
|
+
const sanitizeString = (string) => {
|
|
62
|
+
const argIsString = typeof string === "string";
|
|
63
|
+
if (argIsString) {
|
|
64
|
+
try {
|
|
65
|
+
return JSON.parse(convertHtmlQuotes(string));
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
console.log("sanitizeString received a string, that didnt parse to json object", string, e);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Returns the current string / object from a given translation object
|
|
75
|
+
* If language is not fi|sv|en it will default to "fi"
|
|
76
|
+
* special case where lang can be ALSO be "us" in addition to other types - if user decides to override local language
|
|
77
|
+
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
|
|
78
|
+
* @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
|
|
79
|
+
* @default {object} {locale: "fi-FI", money: "€"}
|
|
80
|
+
* @returns {(string|Object)} given example contains {fi:"something"} and language===fi this will return "something"
|
|
81
|
+
*/
|
|
82
|
+
const getLocaleString = (langObject, languageOverride) => {
|
|
83
|
+
const obj = sanitizeString(langObject);
|
|
84
|
+
if (languageOverride) {
|
|
85
|
+
return obj[checkForLanguage(languageOverride)];
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return obj[getLanguage()];
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { getLanguage as a, getLocale as b, getLocaleString as g, sanitizeString as s };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-1ad6b04e.js';
|
|
5
|
+
|
|
6
|
+
const duetSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";
|
|
7
|
+
|
|
8
|
+
const DuetSpacer = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
/**
|
|
14
|
+
* Size variation of the spacer. Can be any of the spacing tokens.
|
|
15
|
+
*/
|
|
16
|
+
this.size = "medium";
|
|
17
|
+
/**
|
|
18
|
+
* Direction of the space added.
|
|
19
|
+
*/
|
|
20
|
+
this.direction = "vertical";
|
|
21
|
+
/**
|
|
22
|
+
* Adjusts the breakpoint where the spacer is shown in. The functionality
|
|
23
|
+
* follows 1:1 the media queries defined in design tokens.
|
|
24
|
+
*/
|
|
25
|
+
this.breakpoint = "";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* render() function
|
|
29
|
+
* Always the last one in the class.
|
|
30
|
+
*/
|
|
31
|
+
render() {
|
|
32
|
+
return (h(Host, { class: {
|
|
33
|
+
"duet-spacer": true,
|
|
34
|
+
"duet-spacer-xx-small": this.breakpoint === "xx-small",
|
|
35
|
+
"duet-spacer-x-small": this.breakpoint === "x-small",
|
|
36
|
+
"duet-spacer-small": this.breakpoint === "small",
|
|
37
|
+
"duet-spacer-medium": this.breakpoint === "medium",
|
|
38
|
+
"duet-spacer-large": this.breakpoint === "large",
|
|
39
|
+
"duet-spacer-x-large": this.breakpoint === "x-large",
|
|
40
|
+
"duet-spacer-xx-large": this.breakpoint === "xx-large",
|
|
41
|
+
[this.size]: true,
|
|
42
|
+
[`duet-spacer-${this.direction}`]: true,
|
|
43
|
+
} }));
|
|
44
|
+
}
|
|
45
|
+
static get style() { return duetSpacerCss; }
|
|
46
|
+
}, [1, "duet-spacer", {
|
|
47
|
+
"size": [1],
|
|
48
|
+
"direction": [1],
|
|
49
|
+
"breakpoint": [1]
|
|
50
|
+
}]);
|
|
51
|
+
function defineCustomElement() {
|
|
52
|
+
if (typeof customElements === "undefined") {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const components = ["duet-spacer"];
|
|
56
|
+
components.forEach(tagName => { switch (tagName) {
|
|
57
|
+
case "duet-spacer":
|
|
58
|
+
if (!customElements.get(tagName)) {
|
|
59
|
+
customElements.define(tagName, DuetSpacer);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
} });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { DuetSpacer as D, defineCustomElement as d };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
var actionNewWindowSmall={"title":"action-new-window-small","tags":"arrow open new window tab external linksquare box rectangle action small","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M10.5 2a1.5 1.5 0 0 1 .14 3H3.75c-.38 0-.7.28-.74.65l-.01.1v14.5c0 .38.28.7.65.74l.1.01h14.5c.38 0 .7-.28.74-.65l.01-.1v-6.89a1.5 1.5 0 0 1 3 0v6.89A3.75 3.75 0 0 1 18.25 24H3.75A3.75 3.75 0 0 1 0 20.25V5.75A3.75 3.75 0 0 1 3.75 2zm12-2c.78 0 1.42.6 1.5 1.36V7.5a1.5 1.5 0 0 1-3 .14V5.12l-5.44 5.44a1.5 1.5 0 0 1-2.22-2l.1-.12L18.88 3H16.5A1.5 1.5 0 0 1 15 1.64V1.5c0-.78.6-1.42 1.36-1.5h.14z\"/></svg>"};
|
|
5
|
+
|
|
6
|
+
export { actionNewWindowSmall as a };
|