@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,61 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h } from './p-1ad6b04e.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
|
|
7
|
+
const duetDividerCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-divider{-webkit-user-select:none;user-select:none;display:block;width:100%;height:1px;margin-top:36px !important;margin-bottom:28px;background:#e1e3e6}.duet-divider.duet-p-0{padding:0 !important}.duet-divider.duet-m-0{margin:0 !important}.duet-divider.duet-m-s{margin-bottom:16px !important;margin-top:0 !important}.duet-divider.duet-theme-turva{background:#e4e4e6}";
|
|
8
|
+
|
|
9
|
+
const DuetDivider = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
/**
|
|
15
|
+
* Theme of the divider.
|
|
16
|
+
*/
|
|
17
|
+
this.theme = "";
|
|
18
|
+
/**
|
|
19
|
+
* Controls the margin of the component.
|
|
20
|
+
*/
|
|
21
|
+
this.margin = "auto";
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Component lifecycle events.
|
|
25
|
+
*/
|
|
26
|
+
componentWillLoad() {
|
|
27
|
+
inheritGlobalTheme(this);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* render() function
|
|
31
|
+
* Always the last one in the class.
|
|
32
|
+
*/
|
|
33
|
+
render() {
|
|
34
|
+
return (h("div", { class: {
|
|
35
|
+
"duet-m-0": this.margin === "none",
|
|
36
|
+
"duet-m-s": this.margin === "small",
|
|
37
|
+
"duet-divider": true,
|
|
38
|
+
"duet-theme-turva": this.theme === "turva",
|
|
39
|
+
} }));
|
|
40
|
+
}
|
|
41
|
+
get element() { return this; }
|
|
42
|
+
static get style() { return duetDividerCss; }
|
|
43
|
+
}, [1, "duet-divider", {
|
|
44
|
+
"theme": [1025],
|
|
45
|
+
"margin": [1]
|
|
46
|
+
}]);
|
|
47
|
+
function defineCustomElement() {
|
|
48
|
+
if (typeof customElements === "undefined") {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const components = ["duet-divider"];
|
|
52
|
+
components.forEach(tagName => { switch (tagName) {
|
|
53
|
+
case "duet-divider":
|
|
54
|
+
if (!customElements.get(tagName)) {
|
|
55
|
+
customElements.define(tagName, DuetDivider);
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
} });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { DuetDivider as D, defineCustomElement as d };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* This function restores cursor position after changing input
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const resetCursor = storeAndResetCursor(this.input.selectionStart,this.input.selectionEnd)
|
|
9
|
+
* this.input.changeValueAndForceUpdateOfCursoPosition()
|
|
10
|
+
* resetCursor()
|
|
11
|
+
*/
|
|
12
|
+
function resetCursor(domElement) {
|
|
13
|
+
if (domElement && domElement.selectionStart) {
|
|
14
|
+
const start = domElement.selectionStart;
|
|
15
|
+
const end = domElement.selectionEnd;
|
|
16
|
+
return function () {
|
|
17
|
+
if (start === end) {
|
|
18
|
+
domElement.selectionStart = start;
|
|
19
|
+
domElement.selectionEnd = end;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
domElement.setSelectionRange(start, end);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return () => true;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Given an input and a regex, remove any characters from the input's value
|
|
30
|
+
* which match the regex, *whilst* maintaining cursor position.
|
|
31
|
+
*
|
|
32
|
+
* In effect, this prevent users from entering specific characters.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* input.value = "foo123"
|
|
36
|
+
* cleanValue(input, /[^0-9]/g)
|
|
37
|
+
* input.value === "123"
|
|
38
|
+
*/
|
|
39
|
+
function cleanValue(input, regex) {
|
|
40
|
+
const value = input.value;
|
|
41
|
+
const cursor = input.selectionStart;
|
|
42
|
+
const beforeCursor = value.slice(0, cursor);
|
|
43
|
+
const afterCursor = value.slice(cursor, value.length);
|
|
44
|
+
const filteredBeforeCursor = beforeCursor.replace(regex, "");
|
|
45
|
+
const filterAfterCursor = afterCursor.replace(regex, "");
|
|
46
|
+
const newValue = filteredBeforeCursor + filterAfterCursor;
|
|
47
|
+
const newCursor = filteredBeforeCursor.length;
|
|
48
|
+
input.value = newValue;
|
|
49
|
+
input.selectionStart = input.selectionEnd = newCursor;
|
|
50
|
+
return newValue;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { cleanValue as c, resetCursor as r };
|
|
@@ -0,0 +1,160 @@
|
|
|
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 { g as getLocaleString } from './p-ede854e1.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './p-4c52333e.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './p-4f516732.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './p-6cae0682.js';
|
|
11
|
+
import { d as defineCustomElement$1 } from './p-53a0c93d.js';
|
|
12
|
+
|
|
13
|
+
const duetAlertCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;max-height:999px;border-radius:4px;transition:opacity 300ms ease, visibility 300ms ease, transform 300ms ease, max-height 300ms ease}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}:host(.duet-alert-is-dismissed){max-height:0;visibility:hidden;opacity:0;transform:scale(0.98)}:host(.duet-alert-is-dismissed) .duet-alert{margin:0 !important}.duet-alert{margin-bottom:16px !important;position:relative;width:100%;padding:16px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;background:#f2f8fb;border:1px solid #0077b3;border-radius:4px;transition:margin 100ms 300ms ease}.duet-alert.duet-p-0{padding:0 !important}.duet-alert.duet-m-0{margin:0 !important}.duet-alert.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;background:#f3f4f5;border-color:#171c3a}.duet-alert.warning{background:#fffbf4;border-color:#f7b228}.duet-alert.warning.duet-theme-turva{background:#fffaf3;border-color:#faa40f}.duet-alert.danger{background:#fdf4f7;border-color:#de2362}.duet-alert.danger.duet-theme-turva{background:#fdf4f3;border-color:#e02a0d}.duet-alert.success{background:#f2f9f7;border-color:#00875a}.duet-alert.success.duet-theme-turva{background:#f3f9f6;border-color:#08874e}.duet-alert-dismiss{position:absolute;top:2px;right:2px}.duet-alert-container{display:inline-flex;align-items:center;justify-content:center;width:100%;margin:0 auto !important}.duet-alert-container span{width:100%}.duet-alert-has-icon .duet-alert-container{margin-top:2px !important}.duet-alert-icon{display:inline-block;align-self:center;width:20px;min-width:20px;height:20px;margin:0 16px 0 0 !important}.duet-alert-icon duet-icon{width:20px;height:20px}.duet-alert-is-dismissible{padding:16px 48px 16px 16px;text-align:left}.duet-alert-is-dismissible .duet-alert-container{text-align:left}";
|
|
14
|
+
|
|
15
|
+
const DuetAlert = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.__registerHost();
|
|
19
|
+
this.__attachShadow();
|
|
20
|
+
this.duetDismiss = createEvent(this, "duetDismiss", 7);
|
|
21
|
+
this.descriptiveId = createID("DuetAlert");
|
|
22
|
+
/**
|
|
23
|
+
* Theme of the card.
|
|
24
|
+
*/
|
|
25
|
+
this.theme = "";
|
|
26
|
+
/**
|
|
27
|
+
* State() variables
|
|
28
|
+
* Inlined decorator, alphabetical order.
|
|
29
|
+
*/
|
|
30
|
+
this.isDismissed = false;
|
|
31
|
+
/**
|
|
32
|
+
* Property to change languageDefaults on the component.
|
|
33
|
+
* normally you would handle these strings on an application level and override @accessibleLabel when needed
|
|
34
|
+
* @default {fi: "Sulje viesti", sv: "Stäng meddelandet", en: "Close the message"}
|
|
35
|
+
*/
|
|
36
|
+
this.accessibleLabelDefaults = {
|
|
37
|
+
fi: "Sulje viesti",
|
|
38
|
+
sv: "Stäng meddelandet",
|
|
39
|
+
en: "Close the message",
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Adds accessible label for the dismissible alert close button.
|
|
43
|
+
* @default {fi: "Sulje viesti", sv: "Stäng meddelandet", en: "Close the message"}
|
|
44
|
+
*/
|
|
45
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults);
|
|
46
|
+
/**
|
|
47
|
+
* Enable or disabled announcements by assistive technologies.
|
|
48
|
+
*/
|
|
49
|
+
this.announcements = true;
|
|
50
|
+
/**
|
|
51
|
+
* Icon to display to the left of the content.
|
|
52
|
+
*/
|
|
53
|
+
this.icon = "";
|
|
54
|
+
/**
|
|
55
|
+
* Controls the margin of the component.
|
|
56
|
+
*/
|
|
57
|
+
this.margin = "auto";
|
|
58
|
+
/**
|
|
59
|
+
* Controls the padding of the component.
|
|
60
|
+
*/
|
|
61
|
+
this.padding = "auto";
|
|
62
|
+
/**
|
|
63
|
+
* Style variation of the alert.
|
|
64
|
+
*/
|
|
65
|
+
this.variation = "default";
|
|
66
|
+
/**
|
|
67
|
+
* Should a button be rendered to dismiss the alert?
|
|
68
|
+
*/
|
|
69
|
+
this.dismissible = false;
|
|
70
|
+
this.handleDismiss = (ev) => {
|
|
71
|
+
this.isDismissed = true;
|
|
72
|
+
this.duetDismiss.emit({
|
|
73
|
+
component: "duet-alert",
|
|
74
|
+
originalEvent: ev,
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Component lifecycle events.
|
|
80
|
+
*/
|
|
81
|
+
componentWillLoad() {
|
|
82
|
+
inheritGlobalTheme(this);
|
|
83
|
+
}
|
|
84
|
+
componentDidLoad() {
|
|
85
|
+
if (this.autoDismiss) {
|
|
86
|
+
this.timeoutID = setTimeout(() => this.handleDismiss(), this.autoDismiss);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
disconnectedCallback() {
|
|
90
|
+
if (this.timeoutID) {
|
|
91
|
+
clearTimeout(this.timeoutID);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* render() function
|
|
96
|
+
* Always the last one in the class.
|
|
97
|
+
*/
|
|
98
|
+
render() {
|
|
99
|
+
const closeColor = this.theme === "turva" ? "secondary-turva" : "secondary";
|
|
100
|
+
const role = this.variation === "danger" || this.variation === "warning" ? "alert" : "status";
|
|
101
|
+
return (h(Host, { class: { "duet-theme-turva": this.theme === "turva", "duet-alert-is-dismissed": this.isDismissed }, role: this.announcements ? role : undefined }, h("div", { class: {
|
|
102
|
+
"duet-alert": true,
|
|
103
|
+
"duet-alert-has-icon": !!this.icon,
|
|
104
|
+
"duet-alert-is-dismissible": this.dismissible,
|
|
105
|
+
"duet-p-0": this.padding === "none",
|
|
106
|
+
"duet-m-0": this.margin === "none",
|
|
107
|
+
[this.variation]: true,
|
|
108
|
+
"duet-theme-turva": this.theme === "turva",
|
|
109
|
+
} }, h("div", { class: "duet-alert-container" }, this.icon && (h("div", { class: "duet-alert-icon" }, h("duet-icon", { size: "auto", name: this.icon, color: "currentColor" }))), h("span", { id: this.descriptiveId }, h("slot", null))), this.dismissible && (h("div", { class: "duet-alert-dismiss" }, h("duet-button", { variation: "plain", accessibleLabel: this.accessibleLabel, accessibleDescribedBy: this.descriptiveId, color: closeColor, iconSize: "medium", icon: "navigation-close", iconOnly: true, margin: "none", theme: this.theme, onClick: this.handleDismiss, fixed: true }))))));
|
|
110
|
+
}
|
|
111
|
+
static get style() { return duetAlertCss; }
|
|
112
|
+
}, [1, "duet-alert", {
|
|
113
|
+
"theme": [1025],
|
|
114
|
+
"accessibleLabelDefaults": [1, "accessible-label-default"],
|
|
115
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
116
|
+
"announcements": [4],
|
|
117
|
+
"icon": [1],
|
|
118
|
+
"autoDismiss": [2, "auto-dismiss"],
|
|
119
|
+
"margin": [1],
|
|
120
|
+
"padding": [1],
|
|
121
|
+
"variation": [1],
|
|
122
|
+
"dismissible": [4],
|
|
123
|
+
"isDismissed": [32],
|
|
124
|
+
"timeoutID": [32]
|
|
125
|
+
}]);
|
|
126
|
+
function defineCustomElement() {
|
|
127
|
+
if (typeof customElements === "undefined") {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const components = ["duet-alert", "duet-button", "duet-icon", "duet-spinner", "duet-visually-hidden"];
|
|
131
|
+
components.forEach(tagName => { switch (tagName) {
|
|
132
|
+
case "duet-alert":
|
|
133
|
+
if (!customElements.get(tagName)) {
|
|
134
|
+
customElements.define(tagName, DuetAlert);
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
case "duet-button":
|
|
138
|
+
if (!customElements.get(tagName)) {
|
|
139
|
+
defineCustomElement$4();
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
case "duet-icon":
|
|
143
|
+
if (!customElements.get(tagName)) {
|
|
144
|
+
defineCustomElement$3();
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
case "duet-spinner":
|
|
148
|
+
if (!customElements.get(tagName)) {
|
|
149
|
+
defineCustomElement$2();
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
case "duet-visually-hidden":
|
|
153
|
+
if (!customElements.get(tagName)) {
|
|
154
|
+
defineCustomElement$1();
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
} });
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export { DuetAlert as D, defineCustomElement as d };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
function isObject(maybeObj) {
|
|
5
|
+
return Object.prototype.toString.call(maybeObj) === "[object Object]";
|
|
6
|
+
}
|
|
7
|
+
const parsePossibleJSON = (maybeJSON) => {
|
|
8
|
+
if (Array.isArray(maybeJSON) || isObject(maybeJSON)) {
|
|
9
|
+
return maybeJSON;
|
|
10
|
+
}
|
|
11
|
+
if (typeof maybeJSON === "string") {
|
|
12
|
+
try {
|
|
13
|
+
return JSON.parse(maybeJSON);
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
console.warn(e);
|
|
17
|
+
try {
|
|
18
|
+
return JSON.parse(convertHtmlQuotes(maybeJSON));
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
console.warn(e);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// undefined is not a type in JSON,
|
|
26
|
+
// so we use it here to signal invalid input
|
|
27
|
+
return undefined;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Format string, via simplistic sprintf equivalent
|
|
31
|
+
* @example String.format('{0} is super, but {1} is best! {{0}}', 'Duet', 'Coffee'); -> "Duet is super, but Coffee ist best! {0}"
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
if (!String.format) {
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
String.format = function (format) {
|
|
38
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
39
|
+
return format.replace(/\{\{|\}\}|\{(\d+)\}/g, function (curlyBrack, index) {
|
|
40
|
+
return curlyBrack == "{{" ? "{" : curlyBrack == "}}" ? "}" : args[index];
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const MATCH_DISALLOWED_CHARS = /[^a-z0-9áéíóúñüöäå \.,_-]/gim;
|
|
45
|
+
function sanitizeString(string) {
|
|
46
|
+
return string.replace(MATCH_DISALLOWED_CHARS, "").trim();
|
|
47
|
+
}
|
|
48
|
+
const convertHtmlQuotes = string => {
|
|
49
|
+
if (typeof string === "string") {
|
|
50
|
+
return string.replace(/"/g, '"').replace(/'/g, '"');
|
|
51
|
+
}
|
|
52
|
+
return string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { convertHtmlQuotes as c, parsePossibleJSON as p, sanitizeString as s };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-1ad6b04e.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-53a0c93d.js';
|
|
6
|
+
|
|
7
|
+
const DuetUploadAriaStatus = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
/**
|
|
13
|
+
* State() variables
|
|
14
|
+
*/
|
|
15
|
+
this.statusMessage = null;
|
|
16
|
+
/**
|
|
17
|
+
* Status labels used in the component
|
|
18
|
+
*/
|
|
19
|
+
this.statusMessageLabel = null;
|
|
20
|
+
/**
|
|
21
|
+
* Adds accessible label that is read aloud
|
|
22
|
+
*/
|
|
23
|
+
this.accessibleAriaLive = "polite";
|
|
24
|
+
/**
|
|
25
|
+
* valid file amount
|
|
26
|
+
*/
|
|
27
|
+
this.valid = undefined;
|
|
28
|
+
/**
|
|
29
|
+
* total files
|
|
30
|
+
*/
|
|
31
|
+
this.total = undefined;
|
|
32
|
+
/**
|
|
33
|
+
* invalid file amount
|
|
34
|
+
*/
|
|
35
|
+
this.invalid = undefined;
|
|
36
|
+
/**
|
|
37
|
+
* valid file amount
|
|
38
|
+
*/
|
|
39
|
+
this.inprogress = undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Private functions
|
|
42
|
+
*/
|
|
43
|
+
this.replacePlaceHolders = (statusString) => {
|
|
44
|
+
const addFiles = (amount) => {
|
|
45
|
+
return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
|
|
46
|
+
};
|
|
47
|
+
return statusString
|
|
48
|
+
.replace("{filesUploaded}", addFiles(this.valid))
|
|
49
|
+
.replace("{filesInProgress}", addFiles(this.inprogress))
|
|
50
|
+
.replace("{filesTotal}", addFiles(this.total))
|
|
51
|
+
.replace("{filesWithErrors}", addFiles(this.invalid));
|
|
52
|
+
};
|
|
53
|
+
this.getStatusMessage = () => {
|
|
54
|
+
const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
|
|
55
|
+
const hasErrors = this.invalid > 0;
|
|
56
|
+
const isInProgress = this.inprogress > 0;
|
|
57
|
+
const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
|
|
58
|
+
const isDone = this.valid === this.total && !isInProgress && !hasErrors;
|
|
59
|
+
const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
|
|
60
|
+
if (isDone) {
|
|
61
|
+
this.statusMessage = this.replacePlaceHolders(done);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
else if (isInProgressWithErrors) {
|
|
65
|
+
this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
else if (isInProgress) {
|
|
69
|
+
this.statusMessage = this.replacePlaceHolders(inProgress);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
else if (isDoneWithErrors) {
|
|
73
|
+
this.statusMessage = this.replacePlaceHolders(doneWithErrors);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
return;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
watchHandler(newValue, oldValue) {
|
|
80
|
+
if (newValue !== oldValue) {
|
|
81
|
+
this.getStatusMessage();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* render() function
|
|
86
|
+
* Always the last one in the class.
|
|
87
|
+
*/
|
|
88
|
+
render() {
|
|
89
|
+
return (h(Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, h("duet-visually-hidden", null, this.statusMessage)));
|
|
90
|
+
}
|
|
91
|
+
static get watchers() { return {
|
|
92
|
+
"valid": ["watchHandler"],
|
|
93
|
+
"invalid": ["watchHandler"],
|
|
94
|
+
"inprogress": ["watchHandler"],
|
|
95
|
+
"total": ["watchHandler"]
|
|
96
|
+
}; }
|
|
97
|
+
}, [1, "duet-upload-aria-status", {
|
|
98
|
+
"statusMessageLabel": [16],
|
|
99
|
+
"accessibleAriaLive": [1, "accessible-aria-live"],
|
|
100
|
+
"valid": [2],
|
|
101
|
+
"total": [2],
|
|
102
|
+
"invalid": [2],
|
|
103
|
+
"inprogress": [2],
|
|
104
|
+
"statusMessage": [32]
|
|
105
|
+
}]);
|
|
106
|
+
function defineCustomElement() {
|
|
107
|
+
if (typeof customElements === "undefined") {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const components = ["duet-upload-aria-status", "duet-visually-hidden"];
|
|
111
|
+
components.forEach(tagName => { switch (tagName) {
|
|
112
|
+
case "duet-upload-aria-status":
|
|
113
|
+
if (!customElements.get(tagName)) {
|
|
114
|
+
customElements.define(tagName, DuetUploadAriaStatus);
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
case "duet-visually-hidden":
|
|
118
|
+
if (!customElements.get(tagName)) {
|
|
119
|
+
defineCustomElement$1();
|
|
120
|
+
}
|
|
121
|
+
break;
|
|
122
|
+
} });
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { DuetUploadAriaStatus as D, defineCustomElement as d };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-1ad6b04e.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
import { g as getColorByName } from './p-86faf728.js';
|
|
7
|
+
|
|
8
|
+
const duetSpinnerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute;top:50%;left:50%;z-index:800;max-width:100%}:host(.duet-theme-default) .duet-spinner{color:#0077b3 !important}:host(.duet-theme-turva) .duet-spinner{color:#c60c30 !important}:host(.duet-custom-color){color:inherit}*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-spinner{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:800;width:24px;height:24px;color:#0077b3;border:2px solid transparent;border-left:2px solid currentColor;border-radius:50%;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%;animation:duetRotate 0.6s linear infinite}.duet-spinner::after{position:absolute;top:50%;left:50%;z-index:200;box-sizing:content-box;width:100%;height:100%;overflow:hidden;content:\"\";border:2px solid currentColor;border-radius:50%;opacity:0.3;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%}.duet-spinner.medium{width:36px;height:36px;border-width:4px}.duet-spinner.medium::after{border-width:4px}.duet-spinner.large{width:72px;height:72px;border-width:8px}.duet-spinner.large::after{border-width:8px}@keyframes duetRotate{0%{transform:translateZ(0) rotate(0deg) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}";
|
|
9
|
+
|
|
10
|
+
const DuetSpinner = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
/**
|
|
16
|
+
* Color of the spinner, as a design token entered in camelCase or kebab-case.
|
|
17
|
+
* Example: "color-primary". This property can also be set to "currentColor"
|
|
18
|
+
* which forces the icon to use the CSS text color of parent element instead.
|
|
19
|
+
* Useful when you want to control the color in stylesheet instead.
|
|
20
|
+
*/
|
|
21
|
+
this.color = "gray-lightest";
|
|
22
|
+
/**
|
|
23
|
+
* Size variation of the spinner.
|
|
24
|
+
*/
|
|
25
|
+
this.size = "small";
|
|
26
|
+
/**
|
|
27
|
+
* Theme of the spinner. When used this will override the color setting and
|
|
28
|
+
* use "primary" or "primary-turva" as the color depending on which theme
|
|
29
|
+
* is chosen.
|
|
30
|
+
*/
|
|
31
|
+
this.theme = "";
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Component lifecycle events.
|
|
35
|
+
*/
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
inheritGlobalTheme(this);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* render() function
|
|
41
|
+
* Always the last one in the class.
|
|
42
|
+
*/
|
|
43
|
+
render() {
|
|
44
|
+
const color = this.color === "currentColor" ? "currentColor" : getColorByName(this.color);
|
|
45
|
+
return (h(Host, { class: {
|
|
46
|
+
"duet-custom-color": this.color !== "currentColor" && this.theme !== "turva" && this.theme !== "default",
|
|
47
|
+
"duet-theme-turva": this.theme === "turva" && this.color !== "currentColor",
|
|
48
|
+
"duet-theme-default": this.theme === "default" && this.color !== "currentColor",
|
|
49
|
+
} }, h("div", { class: {
|
|
50
|
+
"duet-spinner": true,
|
|
51
|
+
[this.size]: true,
|
|
52
|
+
}, style: { color }, "aria-label": this.accessibleLabel })));
|
|
53
|
+
}
|
|
54
|
+
static get style() { return duetSpinnerCss; }
|
|
55
|
+
}, [1, "duet-spinner", {
|
|
56
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
57
|
+
"color": [1],
|
|
58
|
+
"size": [1],
|
|
59
|
+
"theme": [1025]
|
|
60
|
+
}]);
|
|
61
|
+
function defineCustomElement() {
|
|
62
|
+
if (typeof customElements === "undefined") {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const components = ["duet-spinner"];
|
|
66
|
+
components.forEach(tagName => { switch (tagName) {
|
|
67
|
+
case "duet-spinner":
|
|
68
|
+
if (!customElements.get(tagName)) {
|
|
69
|
+
customElements.define(tagName, DuetSpinner);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
} });
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { DuetSpinner as D, defineCustomElement as d };
|
|
@@ -0,0 +1,37 @@
|
|
|
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 duetListItemCss = "*,*::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:flex;flex-flow:row;width:100%;overflow:visible;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d}@media (max-width: 35.9375em){:host{flex-wrap:wrap}}:host dt,:host dd{margin-inline-start:0;-webkit-hyphens:auto;hyphens:auto;text-align:left;word-break:break-all;word-break:break-word}@media (max-width: 35.9375em){:host dt,:host dd{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}}:host dt{padding:16px !important;font-weight:600}@media (max-width: 35.9375em){:host dt{padding-bottom:4px !important}}.duet-theme-turva :host dt{font-weight:700}:host dd{padding:16px !important;margin-left:auto;text-align:left}@media (max-width: 35.9375em){:host dd{padding-top:0 !important}}:host(:not(.duet-list-striped)) dt{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){:host(:not(.duet-list-striped)) dt{padding-bottom:4px !important}}:host(:not(.duet-list-striped)) dd{padding:8px !important;padding-left:0 !important}@media (max-width: 35.9375em){:host(:not(.duet-list-striped)) dd{padding-top:0 !important}}:host(.duet-theme-turva){font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}:host(.duet-list-striped:nth-child(odd)) dt,:host(.duet-list-striped:nth-child(odd)) dd{background:#f5f8fa}:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dt,:host(.duet-list-striped.duet-theme-turva:nth-child(odd)) dd{background:#f5f5f7}:host(.duet-list-width-30) dt{flex-basis:33%}:host(.duet-list-width-30) dd{flex-basis:67%}:host(.duet-list-width-50) dt{flex-basis:47%}:host(.duet-list-width-50) dd{flex-basis:53%}:host(.duet-list-width-70) dt{flex-basis:65%}:host(.duet-list-width-70) dd{flex-basis:35%}:host(.duet-p-0) dt,:host(.duet-p-0) dd{padding-top:0 !important;padding-bottom:4px !important}@media (max-width: 35.9375em){:host(.duet-list-mobile-center) dt,:host(.duet-list-mobile-center) dd{text-align:center}}@media (max-width: 61.9375em){:host(.duet-list-breakpoint-large){flex-wrap:wrap}:host(.duet-list-breakpoint-large) dt,:host(.duet-list-breakpoint-large) dd{flex:inherit;flex-basis:100% !important;width:100%;padding-bottom:4px !important}:host(.duet-list-breakpoint-large) dd{padding-top:0 !important}}:host(.duet-list-breakpoint-large.duet-list-striped) dd{padding-bottom:16px !important}@media (max-width: 61.9375em){:host(.duet-list-breakpoint-large.duet-list-mobile-center) dt,:host(.duet-list-breakpoint-large.duet-list-mobile-center) dd{text-align:center !important}}";
|
|
7
|
+
|
|
8
|
+
const DuetListItem = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* render() function
|
|
16
|
+
* Always the last one in the class.
|
|
17
|
+
*/
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, null, h("dt", null, h("slot", { name: "label" })), h("dd", null, h("slot", { name: "value" }))));
|
|
20
|
+
}
|
|
21
|
+
static get style() { return duetListItemCss; }
|
|
22
|
+
}, [1, "duet-list-item"]);
|
|
23
|
+
function defineCustomElement() {
|
|
24
|
+
if (typeof customElements === "undefined") {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const components = ["duet-list-item"];
|
|
28
|
+
components.forEach(tagName => { switch (tagName) {
|
|
29
|
+
case "duet-list-item":
|
|
30
|
+
if (!customElements.get(tagName)) {
|
|
31
|
+
customElements.define(tagName, DuetListItem);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
} });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { DuetListItem as D, defineCustomElement as d };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-1ad6b04e.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
|
|
7
|
+
const duetBadgeCss = "*,*::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;margin-right:4px !important;margin-bottom:2px !important;display:inline-block;width:auto;vertical-align:middle}:host:last-child,:host:last-of-type{margin-right:0 !important}:host(.duet-m-0){margin:0 !important}.duet-badge{width:100%;padding:4.4444444444px 12px 5.4444444444px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.75rem;font-style:normal;font-weight:600;line-height:1.25;color:#00294d;text-align:center;word-break:break-word;vertical-align:middle;background:#e6f1f7;border-radius:20rem}.duet-badge.duet-p-0{padding:0 !important}.duet-badge.duet-m-0{margin:0 !important}.duet-badge.duet-theme-turva{padding:5.4444444444px 12px 4.4444444444px;font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-weight:700;color:#171c3a;background:#e8e8eb}.duet-badge.warning{background:#fef3df}.duet-badge.warning.duet-theme-turva{background:#fef1db}.duet-badge.danger{background:#fce9ef}.duet-badge.danger.duet-theme-turva{background:#fceae7}.duet-badge.success{background:#e6f3ef}.duet-badge.success.duet-theme-turva{background:#e6f3ed}";
|
|
8
|
+
|
|
9
|
+
const DuetBadge = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
/**
|
|
15
|
+
* Theme of the badge.
|
|
16
|
+
*/
|
|
17
|
+
this.theme = "";
|
|
18
|
+
/**
|
|
19
|
+
* Style variation of the alert.
|
|
20
|
+
*/
|
|
21
|
+
this.variation = "default";
|
|
22
|
+
/**
|
|
23
|
+
* Controls the margin of the component.
|
|
24
|
+
*/
|
|
25
|
+
this.margin = "auto";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Component lifecycle events.
|
|
29
|
+
*/
|
|
30
|
+
componentWillLoad() {
|
|
31
|
+
inheritGlobalTheme(this);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* render() function
|
|
35
|
+
* Always the last one of the class.
|
|
36
|
+
*/
|
|
37
|
+
render() {
|
|
38
|
+
return (h(Host, { class: { "duet-m-0": this.margin === "none" } }, h("div", { class: {
|
|
39
|
+
"duet-badge": true,
|
|
40
|
+
[this.variation]: true,
|
|
41
|
+
"duet-theme-turva": this.theme === "turva",
|
|
42
|
+
} }, h("slot", null))));
|
|
43
|
+
}
|
|
44
|
+
static get style() { return duetBadgeCss; }
|
|
45
|
+
}, [1, "duet-badge", {
|
|
46
|
+
"theme": [1025],
|
|
47
|
+
"variation": [1],
|
|
48
|
+
"margin": [1]
|
|
49
|
+
}]);
|
|
50
|
+
function defineCustomElement() {
|
|
51
|
+
if (typeof customElements === "undefined") {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const components = ["duet-badge"];
|
|
55
|
+
components.forEach(tagName => { switch (tagName) {
|
|
56
|
+
case "duet-badge":
|
|
57
|
+
if (!customElements.get(tagName)) {
|
|
58
|
+
customElements.define(tagName, DuetBadge);
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
} });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { DuetBadge as D, defineCustomElement as d };
|