@duetds/components 6.0.2 → 6.0.4
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 +51 -41
- 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 +6 -5
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +4 -4
- 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 +1 -1
- 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-8089a1a8.js → focus-utils-8a615003.js} +1 -1
- package/lib/cjs/{index-9d0e33db.js → index-d106d801.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-card/duet-card.js +4 -2
- package/lib/collection/components/duet-choice/duet-choice.js +1 -1
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +1 -1
- 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 +226 -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 +225 -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/dist-custom-elements/p-01de0640.js +37 -0
- package/lib/{esm/tokens-8ff8c570.js → dist-custom-elements/p-02305a1e.js} +18 -15
- package/lib/dist-custom-elements/p-08cfe544.js +125 -0
- package/lib/dist-custom-elements/p-09ed1ffa.js +160 -0
- package/lib/dist-custom-elements/p-0a928609.js +241 -0
- package/lib/dist-custom-elements/p-0b3f675e.js +47 -0
- package/lib/{esm/focus-utils-9e76623d.js → dist-custom-elements/p-0b8f16f1.js} +1 -1
- 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-14dcd82b.js +133 -0
- package/lib/dist-custom-elements/p-16d518fd.js +66 -0
- package/lib/dist-custom-elements/p-213ef84c.js +87 -0
- package/lib/dist-custom-elements/p-266411cf.js +307 -0
- package/lib/dist-custom-elements/p-3d987b87.js +75 -0
- package/lib/dist-custom-elements/p-3fc2d124.js +1666 -0
- package/lib/dist-custom-elements/p-4717744e.js +110 -0
- package/lib/dist-custom-elements/p-4ebf1618.js +13 -0
- package/lib/dist-custom-elements/p-56118313.js +53 -0
- package/lib/dist-custom-elements/p-565779f5.js +199 -0
- package/lib/dist-custom-elements/p-5a9d75e1.js +55 -0
- package/lib/dist-custom-elements/p-65d3ead5.js +428 -0
- package/lib/dist-custom-elements/p-6886544b.js +129 -0
- package/lib/dist-custom-elements/p-6e74e660.js +275 -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-7739604d.js +214 -0
- package/lib/dist-custom-elements/p-81c9b244.js +65 -0
- package/lib/{esm/token-utils-df78f4d8.js → dist-custom-elements/p-86faf728.js} +1 -1
- package/lib/dist-custom-elements/p-88511d7a.js +275 -0
- package/lib/dist-custom-elements/p-9c732bb9.js +193 -0
- package/lib/dist-custom-elements/p-acdba2db.js +114 -0
- package/lib/dist-custom-elements/p-b08e57cf.js +37 -0
- package/lib/dist-custom-elements/p-b9058029.js +138 -0
- package/lib/dist-custom-elements/p-bd4b92c4.js +86 -0
- package/lib/dist-custom-elements/p-bd779757.js +184 -0
- package/lib/dist-custom-elements/p-c1325e35.js +11 -0
- package/lib/dist-custom-elements/p-c70f3ccb.js +70 -0
- package/lib/dist-custom-elements/p-d004da5f.js +6 -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-d96debb6.js +287 -0
- package/lib/dist-custom-elements/p-da03a443.js +154 -0
- package/lib/dist-custom-elements/p-e294c0fb.js +341 -0
- package/lib/dist-custom-elements/p-e4d5fbc0.js +87 -0
- package/lib/dist-custom-elements/p-e5c8a58f.js +71 -0
- package/lib/dist-custom-elements/p-ede854e1.js +92 -0
- package/lib/dist-custom-elements/p-ef8eff22.js +64 -0
- package/lib/dist-custom-elements/p-f11208c3.js +6 -0
- package/lib/dist-custom-elements/p-f7db7c40.js +98 -0
- package/lib/dist-custom-elements/p-fc5362e7.js +61 -0
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-9ed4eac7.system.entry.js → p-01c551f1.system.entry.js} +1 -1
- package/lib/duet/p-02305a1e.js +4 -0
- package/lib/duet/{p-f51969f5.entry.js → p-033bfa67.entry.js} +1 -1
- package/lib/duet/{p-86a3b203.system.entry.js → p-07a850a5.system.entry.js} +1 -1
- package/lib/duet/{p-211e59a0.system.entry.js → p-09e2ff96.system.entry.js} +1 -1
- package/lib/duet/{p-07f83b14.entry.js → p-0b74af40.entry.js} +1 -1
- package/lib/duet/{p-0c59905a.entry.js → p-0c2a51ac.entry.js} +1 -1
- package/lib/duet/{p-e56705ac.system.entry.js → p-0c9f0b8a.system.entry.js} +2 -2
- package/lib/duet/{p-4af6e3b1.entry.js → p-0d96924d.entry.js} +1 -1
- package/lib/duet/{p-67a78cbe.system.entry.js → p-0e48bca9.system.entry.js} +1 -1
- package/lib/duet/{p-82abc212.system.entry.js → p-0e98f667.system.entry.js} +1 -1
- package/lib/duet/{p-f5a06ff6.system.js → p-1999f503.system.js} +1 -1
- package/lib/duet/{p-e3a6351b.system.entry.js → p-1a41550e.system.entry.js} +1 -1
- package/lib/duet/{p-4d6b341d.system.entry.js → p-1bd57792.system.entry.js} +1 -1
- package/lib/duet/{p-567cab28.system.entry.js → p-1e0d7680.system.entry.js} +1 -1
- package/lib/duet/{p-921085f6.system.entry.js → p-1ebd7945.system.entry.js} +1 -1
- package/lib/duet/p-1fc60a60.system.js +4 -0
- package/lib/duet/{p-f416e108.entry.js → p-21662682.entry.js} +1 -1
- package/lib/duet/{p-2eea39f3.entry.js → p-23943f39.entry.js} +1 -1
- package/lib/duet/{p-9a3826e8.system.entry.js → p-23a8fa64.system.entry.js} +1 -1
- package/lib/duet/{p-902552a7.system.entry.js → p-264a0e0c.system.entry.js} +1 -1
- package/lib/duet/{p-5f407bd1.entry.js → p-27f72e70.entry.js} +1 -1
- package/lib/duet/{p-3c80d2fc.entry.js → p-2a3b1a2e.entry.js} +1 -1
- package/lib/duet/{p-6c022105.system.entry.js → p-2b320481.system.entry.js} +1 -1
- package/lib/duet/p-32f7178a.system.js +4 -0
- package/lib/duet/{p-196b2664.entry.js → p-3620ded5.entry.js} +1 -1
- package/lib/duet/{p-7d43d67b.entry.js → p-3904232a.entry.js} +1 -1
- package/lib/duet/{p-c89b1c28.entry.js → p-3b173cbd.entry.js} +1 -1
- package/lib/duet/{p-a9a9d22b.system.entry.js → p-430acad4.system.entry.js} +1 -1
- package/lib/duet/{p-5bde4aed.system.entry.js → p-4463946b.system.entry.js} +1 -1
- package/lib/duet/{p-cb1f9512.system.entry.js → p-44e9b1c8.system.entry.js} +1 -1
- package/lib/duet/p-49ce11a1.entry.js +4 -0
- package/lib/duet/{p-5d286e53.system.entry.js → p-4d6feeb5.system.entry.js} +1 -1
- package/lib/duet/{p-b4e8f605.system.entry.js → p-4d767c61.system.entry.js} +1 -1
- package/lib/duet/{p-94d496e1.system.entry.js → p-4f1fe415.system.entry.js} +1 -1
- package/lib/duet/{p-de3c0f4d.js → p-532e9db7.js} +1 -1
- package/lib/duet/{p-0250c7b7.system.entry.js → p-55fd512b.system.entry.js} +1 -1
- package/lib/duet/{p-398a79a0.js → p-588be556.js} +1 -1
- package/lib/duet/{p-f8a52ab0.entry.js → p-5af6d9e2.entry.js} +1 -1
- package/lib/duet/{p-626a5916.entry.js → p-5e1d64d8.entry.js} +1 -1
- package/lib/duet/{p-422c0465.system.entry.js → p-5f6452ce.system.entry.js} +1 -1
- package/lib/duet/{p-b57a4b2d.system.entry.js → p-60e29f52.system.entry.js} +1 -1
- package/lib/duet/{p-29157f26.system.entry.js → p-613c4099.system.entry.js} +1 -1
- package/lib/duet/{p-f0e4f685.system.entry.js → p-61444a3d.system.entry.js} +1 -1
- package/lib/duet/{p-9ef03ba6.js → p-6aca8584.js} +1 -1
- package/lib/duet/{p-0c83d107.system.entry.js → p-6e5f2016.system.entry.js} +1 -1
- package/lib/duet/{p-0930ce38.system.entry.js → p-6f93638a.system.entry.js} +1 -1
- package/lib/duet/{p-bc23dcde.entry.js → p-71105750.entry.js} +1 -1
- package/lib/duet/{p-3bbfe384.entry.js → p-73c6e5fb.entry.js} +1 -1
- package/lib/duet/{p-af3a016a.system.entry.js → p-751f6957.system.entry.js} +1 -1
- package/lib/duet/{p-920f9ff2.system.js → p-77600ed7.system.js} +1 -1
- package/lib/duet/{p-32883741.system.entry.js → p-77ca874f.system.entry.js} +1 -1
- package/lib/duet/{p-4427f4b2.entry.js → p-787f9eba.entry.js} +1 -1
- package/lib/duet/{p-8a91c7bb.system.entry.js → p-7ad2cb10.system.entry.js} +1 -1
- package/lib/duet/p-7de4d97d.entry.js +4 -0
- package/lib/duet/{p-20b5e96b.system.entry.js → p-8107aeb5.system.entry.js} +1 -1
- package/lib/duet/{p-a687eeaa.system.entry.js → p-86cb85b9.system.entry.js} +1 -1
- package/lib/duet/{p-d644302f.js → p-875ae637.js} +1 -1
- package/lib/duet/{p-39e1c6da.system.entry.js → p-8aafa8e7.system.entry.js} +1 -1
- package/lib/duet/{p-8bcd7936.entry.js → p-8b09a46f.entry.js} +1 -1
- package/lib/duet/{p-9059b7e3.entry.js → p-8c08e7ba.entry.js} +1 -1
- package/lib/duet/p-8e8f8b29.entry.js +4 -0
- package/lib/duet/{p-012e33e8.entry.js → p-9094fcf8.entry.js} +1 -1
- package/lib/duet/{p-2ebf682d.entry.js → p-988a781d.entry.js} +1 -1
- package/lib/duet/{p-194f22b3.system.entry.js → p-a395d4bc.system.entry.js} +1 -1
- package/lib/duet/{p-3f1c98d0.entry.js → p-a585113b.entry.js} +1 -1
- package/lib/duet/{p-e233e6ed.entry.js → p-aa8973fc.entry.js} +1 -1
- package/lib/duet/{p-b014fdca.entry.js → p-ab7f4070.entry.js} +1 -1
- package/lib/duet/{p-278340d9.system.entry.js → p-ab89d948.system.entry.js} +1 -1
- package/lib/duet/{p-14a2d6f2.entry.js → p-aef02083.entry.js} +1 -1
- package/lib/duet/{p-24978396.entry.js → p-afdc57da.entry.js} +1 -1
- package/lib/duet/{p-a124d4a0.entry.js → p-b2abaa9e.entry.js} +1 -1
- package/lib/duet/{p-68419f1e.entry.js → p-b55e55b5.entry.js} +1 -1
- package/lib/duet/{p-007d0250.system.entry.js → p-bbc91480.system.entry.js} +1 -1
- package/lib/duet/{p-ecc8ec3e.entry.js → p-bbe1a2cd.entry.js} +1 -1
- package/lib/duet/{p-9bd36dc0.system.entry.js → p-bd3c926c.system.entry.js} +1 -1
- package/lib/duet/{p-3feb442e.system.entry.js → p-bec16aea.system.entry.js} +1 -1
- package/lib/duet/p-bf59e11d.entry.js +4 -0
- package/lib/duet/{p-d5ef1959.system.entry.js → p-c4217626.system.entry.js} +1 -1
- package/lib/duet/{p-e1a1e52d.system.entry.js → p-c5f6ea62.system.entry.js} +1 -1
- package/lib/duet/{p-6ebb40da.entry.js → p-c6d05091.entry.js} +1 -1
- package/lib/duet/{p-c3d3f68d.system.entry.js → p-c73a591d.system.entry.js} +1 -1
- package/lib/duet/{p-35eaa5a8.entry.js → p-c863a0d1.entry.js} +1 -1
- package/lib/duet/{p-33300690.entry.js → p-c986532d.entry.js} +1 -1
- package/lib/duet/{p-b43a8c7a.entry.js → p-caa49454.entry.js} +1 -1
- package/lib/duet/{p-ddf8a652.system.entry.js → p-ccb0de84.system.entry.js} +1 -1
- package/lib/duet/{p-18cc5627.system.js → p-d209191d.system.js} +1 -1
- package/lib/duet/{p-4f235805.entry.js → p-defba7cd.entry.js} +1 -1
- package/lib/duet/{p-b9e9ac80.system.js → p-df785776.system.js} +1 -1
- package/lib/duet/{p-ea60602a.entry.js → p-e9862947.entry.js} +1 -1
- package/lib/duet/{p-b9b19fe9.entry.js → p-eb74c96e.entry.js} +1 -1
- package/lib/duet/{p-f96da661.entry.js → p-ece47184.entry.js} +1 -1
- package/lib/duet/{p-178e0ae7.entry.js → p-f09f968c.entry.js} +1 -1
- package/lib/duet/{p-2171d336.entry.js → p-f97776be.entry.js} +1 -1
- package/lib/duet/{p-1c0fdc62.system.entry.js → p-fe8fc877.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 +6 -5
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +4 -4
- 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 +1 -1
- 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-236f580e.js +18 -0
- package/lib/esm/{index-0d0e51b6.js → index-b601aac1.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 +2 -2
- 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-236f580e.js +4 -0
- package/lib/esm-es5/{index-0d0e51b6.js → index-b601aac1.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-card/duet-card.d.ts +2 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +8 -8
- package/lib/types/components.d.ts +4 -4
- package/package.json +5 -5
- package/lib/custom-elements-bundle/index.d.ts +0 -399
- package/lib/custom-elements-bundle/index.js +0 -14109
- package/lib/duet/p-16d21cef.entry.js +0 -4
- package/lib/duet/p-6002f3d2.system.js +0 -4
- package/lib/duet/p-79817456.entry.js +0 -4
- package/lib/duet/p-835f4429.entry.js +0 -4
- package/lib/duet/p-a93a04b9.system.js +0 -4
- package/lib/duet/p-b6ef2e72.entry.js +0 -4
- package/lib/duet/p-d1746325.js +0 -4
- package/lib/esm-es5/focus-utils-9e76623d.js +0 -4
- package/lib/esm-es5/tokens-8ff8c570.js +0 -4
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-3fc2d124.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
import { c as createID } from './p-c1325e35.js';
|
|
7
|
+
import { a as getLanguage, g as getLocaleString } from './p-ede854e1.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './p-7739604d.js';
|
|
9
|
+
import { d as defineCustomElement$1 } from './p-b08e57cf.js';
|
|
10
|
+
|
|
11
|
+
const duetTooltipCss = "*,*::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;position:relative;z-index:200;display:inline-flex;width:auto;margin-top:-16px !important;margin-left:-3px !important;-webkit-tap-highlight-color:transparent}.duet-tooltip{position:absolute;right:-21px;bottom:100%;z-index:950;display:block;width:282px;min-height:48px;max-height:340px;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.875rem;font-weight:400;line-height:1.25;color:#00294d;visibility:hidden;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:300ms ease;transform:scale(0.9) translateZ(0) translateY(20px);transform-origin:100% 100%}.duet-tooltip.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;border-color:#e4e4e6;box-shadow:0 2px 10px 0 rgba(117, 117, 117, 0.13)}.duet-tooltip::after{position:absolute;right:22px;bottom:-20px;z-index:200;width:0;height:0;content:\"\";border:10px solid transparent;border-top:10px solid white}.duet-tooltip::before{position:absolute;right:21px;bottom:-22px;z-index:100;width:0;height:0;content:\"\";border:11px solid transparent;border-top:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip::before{border-top:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-down{top:100%;bottom:auto;transform:scale(0.9) translateZ(0) translateY(-20px);transform-origin:100% 0}.duet-tooltip.duet-tooltip-down::after{top:-20px;bottom:auto;border:10px solid transparent;border-bottom:10px solid white}.duet-tooltip.duet-tooltip-down::before{top:-22px;bottom:auto;border:11px solid transparent;border-bottom:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip.duet-tooltip-down::before{border-bottom:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-left{right:-21px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-left::after{right:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-left::before{right:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-right{right:auto !important;left:-9px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-right::after{right:auto !important;left:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-right::before{right:auto !important;left:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label{right:auto !important;left:0;width:282px !important;transform-origin:0 0 !important}.duet-tooltip.duet-tooltip-has-label::after{right:auto !important;left:1px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label::before{right:auto !important;left:0 !important;transform:none !important}.duet-tooltip.duet-tooltip-active{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(-8px)}.duet-tooltip.duet-tooltip-active.duet-tooltip-down{transform:scale(1.0001) translateZ(0) translateY(8px)}.duet-tooltip-button{z-index:100;display:inline-block;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 !important;margin-right:-12px;line-height:normal !important;color:#0077b3;white-space:nowrap;cursor:pointer;background:transparent !important;border-radius:4px}.duet-tooltip-button.duet-theme-turva{color:#c60c30}.duet-tooltip-button:hover{color:#004d80}.duet-tooltip-button:hover.duet-theme-turva{color:#940925}.duet-tooltip-button:focus{background:transparent !important;outline:0}:host(.user-is-tabbing) .duet-tooltip-button:focus{background:transparent !important;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}:host(.user-is-tabbing) .duet-tooltip-button.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tooltip-button svg{width:20px;height:20px;pointer-events:none}.duet-tooltip-button-has-label{margin-right:0}.duet-tooltip-scrollable{padding:20px !important;width:100%;max-height:250px;padding-right:25px !important;overflow-y:auto;-webkit-hyphens:auto;hyphens:auto;border-radius:4px;-webkit-overflow-scrolling:touch}.duet-tooltip-scrollable:focus{outline:none}:host(.user-is-tabbing) .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tooltip-scrollable::-webkit-scrollbar{width:4px}.duet-tooltip-scrollable::-webkit-scrollbar-track{border-radius:4px}.duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e1e3e6;border-radius:4px}.duet-theme-turva .duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e4e4e6}.duet-tooltip-label{position:relative;z-index:100;display:inline-block;max-width:calc(100% - 30px);margin-left:12px !important;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:600;line-height:1.25;text-align:left;white-space:normal;vertical-align:top}.duet-theme-turva .duet-tooltip-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-tooltip-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0 !important;padding:0 !important;margin:0 !important;line-height:normal;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;-webkit-appearance:none;appearance:none}.duet-tooltip-close:focus{outline:none;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .duet-tooltip-close:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}@media (min-width: 48em){.duet-tooltip.duet-mq-medium{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-medium::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium.duet-tooltip-down{transform-origin:50% 0}}@media (min-width: 62em){.duet-tooltip.duet-mq-large{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-large::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large.duet-tooltip-down{transform-origin:50% 0}}";
|
|
12
|
+
|
|
13
|
+
const DuetTooltip = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.__registerHost();
|
|
17
|
+
this.__attachShadow();
|
|
18
|
+
/**
|
|
19
|
+
* Own Properties.
|
|
20
|
+
*/
|
|
21
|
+
this.tooltipId = createID("DuetTooltip");
|
|
22
|
+
this.lastScrollTop = 0;
|
|
23
|
+
/**
|
|
24
|
+
* State() variables
|
|
25
|
+
* Inlined decorator, alphabetical order.
|
|
26
|
+
*/
|
|
27
|
+
this.openDown = false;
|
|
28
|
+
/**
|
|
29
|
+
* Theme of the tooltip.
|
|
30
|
+
*/
|
|
31
|
+
this.theme = "";
|
|
32
|
+
/**
|
|
33
|
+
* The currently active language. This setting changes the accessible labels to match the
|
|
34
|
+
* chosen language.
|
|
35
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
36
|
+
* @default "fi"
|
|
37
|
+
*/
|
|
38
|
+
this.language = getLanguage();
|
|
39
|
+
/**
|
|
40
|
+
* Default language strings for the accessibleLabel
|
|
41
|
+
* @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
|
|
42
|
+
*/
|
|
43
|
+
this.accessibleLabelDefault = {
|
|
44
|
+
fi: "Näytä lisätietoja",
|
|
45
|
+
en: "Show more information",
|
|
46
|
+
sv: "Visa mer tilläggsuppgifter",
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Adds accessible label for the info icon that is only shown for screen
|
|
50
|
+
* readers. This property is always required to create an accessible interface!
|
|
51
|
+
* @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
|
|
52
|
+
*/
|
|
53
|
+
this.accessibleLabel = getLocaleString(this.accessibleLabelDefault, this.language);
|
|
54
|
+
/**
|
|
55
|
+
* Default language strings for the accessibleCloseLabel
|
|
56
|
+
* @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
|
|
57
|
+
*/
|
|
58
|
+
this.accessibleCloseLabelDefault = {
|
|
59
|
+
fi: "Sulje lisätiedot",
|
|
60
|
+
en: "Close details",
|
|
61
|
+
sv: "Stäng tilläggsuppgifter",
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Adds accessible label for the close icon that is only shown for screen
|
|
65
|
+
* readers. This property is always required to create an accessibly interface!
|
|
66
|
+
* @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
|
|
67
|
+
*/
|
|
68
|
+
this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefault, this.language);
|
|
69
|
+
/**
|
|
70
|
+
* Label of the tooltip. If used, replaces the accessibleLabel option.
|
|
71
|
+
*/
|
|
72
|
+
this.label = "";
|
|
73
|
+
/**
|
|
74
|
+
* Adjust the responsive breakpoint where tooltip starts opening towards left.
|
|
75
|
+
*/
|
|
76
|
+
this.breakpoint = "medium";
|
|
77
|
+
/**
|
|
78
|
+
* With direction setting you can force the tooltip to always open towards left
|
|
79
|
+
* or right instead of automatically determining the direction.
|
|
80
|
+
*/
|
|
81
|
+
this.direction = "auto";
|
|
82
|
+
/**
|
|
83
|
+
* Adjust the vertical positioning of the tooltip toggle in pixels. Can be a
|
|
84
|
+
* negative value as well. E.g. "-13px".
|
|
85
|
+
*/
|
|
86
|
+
this.positionVertical = "0";
|
|
87
|
+
/**
|
|
88
|
+
* Adjust the horizontal positioning of the tooltip toggle in pixels. Can be a
|
|
89
|
+
* negative value as well. E.g. "-13px".
|
|
90
|
+
*/
|
|
91
|
+
this.positionHorizontal = "0";
|
|
92
|
+
/**
|
|
93
|
+
* Toggle whether the tooltip is initially visible or not. This property should
|
|
94
|
+
* not be used in production in most cases.
|
|
95
|
+
*/
|
|
96
|
+
this.active = false;
|
|
97
|
+
/**
|
|
98
|
+
* Local methods
|
|
99
|
+
*/
|
|
100
|
+
this.openTooltip = () => {
|
|
101
|
+
this.focusTarget = "tooltip";
|
|
102
|
+
this.active = true;
|
|
103
|
+
};
|
|
104
|
+
this.closeTooltip = (moveFocusToButton = false) => {
|
|
105
|
+
if (moveFocusToButton) {
|
|
106
|
+
this.focusTarget = "trigger";
|
|
107
|
+
}
|
|
108
|
+
this.active = false;
|
|
109
|
+
};
|
|
110
|
+
this.toggleOpen = () => {
|
|
111
|
+
this.active ? this.closeTooltip() : this.openTooltip();
|
|
112
|
+
};
|
|
113
|
+
this.handleFocusOut = (e) => {
|
|
114
|
+
if (!this.active) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const relatedTarget = e.relatedTarget;
|
|
118
|
+
if (
|
|
119
|
+
// if we don't know where focus went
|
|
120
|
+
relatedTarget == null ||
|
|
121
|
+
// if focus is within the tooltip itself
|
|
122
|
+
this.element.shadowRoot.contains(relatedTarget) ||
|
|
123
|
+
// if focus is within the tooltip light DOM
|
|
124
|
+
this.element.contains(relatedTarget)) {
|
|
125
|
+
// then we can skip closing
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.closeTooltip();
|
|
129
|
+
};
|
|
130
|
+
this.handleKeyDown = (e) => {
|
|
131
|
+
const isEscapeKey = e.keyCode === 27;
|
|
132
|
+
const isTabbingOut = e.target === this.scrollableEl && e.shiftKey && e.keyCode === 9;
|
|
133
|
+
if (isEscapeKey || isTabbingOut) {
|
|
134
|
+
this.closeTooltip(true);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
this.handleCloseClick = () => {
|
|
138
|
+
this.closeTooltip(true);
|
|
139
|
+
};
|
|
140
|
+
this.isElementInViewport = (el) => {
|
|
141
|
+
if (!el) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
var rect = el.getBoundingClientRect();
|
|
145
|
+
return (
|
|
146
|
+
// This takes the possible Nav component into account
|
|
147
|
+
rect.top >= 100 &&
|
|
148
|
+
rect.left >= 0 &&
|
|
149
|
+
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
150
|
+
rect.right <= (window.innerWidth || document.documentElement.clientWidth));
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Component lifecycle events.
|
|
155
|
+
*/
|
|
156
|
+
componentWillLoad() {
|
|
157
|
+
inheritGlobalTheme(this);
|
|
158
|
+
}
|
|
159
|
+
componentDidUpdate() {
|
|
160
|
+
switch (this.focusTarget) {
|
|
161
|
+
case "tooltip":
|
|
162
|
+
this.scrollableEl.focus({ preventScroll: true });
|
|
163
|
+
break;
|
|
164
|
+
case "trigger":
|
|
165
|
+
this.buttonEl.focus({ preventScroll: true });
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
this.focusTarget = null;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Component event handling.
|
|
172
|
+
*/
|
|
173
|
+
onScroll() {
|
|
174
|
+
clearTimeout(this.scrollTimer);
|
|
175
|
+
this.scrollTimer = setTimeout(() => {
|
|
176
|
+
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
177
|
+
if (!this.isElementInViewport(this.tooltipEl)) {
|
|
178
|
+
this.openDown = scrollTop > this.lastScrollTop;
|
|
179
|
+
}
|
|
180
|
+
this.lastScrollTop = Math.max(0, scrollTop);
|
|
181
|
+
}, 100);
|
|
182
|
+
}
|
|
183
|
+
handleDocumentClick(e) {
|
|
184
|
+
if (!this.active) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const path = e.composedPath();
|
|
188
|
+
const isClickOutside = path.every(el => el !== this.element);
|
|
189
|
+
if (isClickOutside) {
|
|
190
|
+
this.closeTooltip();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
async handleActiveChange(newActiveValue) {
|
|
194
|
+
if (newActiveValue) {
|
|
195
|
+
this.openDown = !this.isElementInViewport(this.tooltipEl);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
setTimeout(() => (this.openDown = false), 300);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* render() function.
|
|
203
|
+
* Always the last one in the class.
|
|
204
|
+
*/
|
|
205
|
+
render() {
|
|
206
|
+
const tooltipStyles = {
|
|
207
|
+
transform: `translateY(${this.positionVertical}) translateX(${this.positionHorizontal})`,
|
|
208
|
+
// This is needed to that the active tooltip stacks on
|
|
209
|
+
// top of other tooltips and the header.
|
|
210
|
+
zIndex: this.active ? "201" : "",
|
|
211
|
+
};
|
|
212
|
+
return (h(Host, { style: tooltipStyles }, h("button", { ref: element => (this.buttonEl = element), "aria-controls": this.tooltipId, "aria-expanded": this.active ? "true" : "false", onClick: this.toggleOpen, type: "button", class: {
|
|
213
|
+
"duet-tooltip-button": true,
|
|
214
|
+
"duet-tooltip-button-has-label": !!this.label,
|
|
215
|
+
"duet-theme-turva": this.theme === "turva",
|
|
216
|
+
} }, h("svg", { "aria-hidden": "true", role: "img", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "m13.5 17.25c-1.241 0-2.25-1.009-2.25-2.25v-3.75h-.75c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h.75c.827 0 1.5.673 1.5 1.5v3.75c0 .414.336.75.75.75h.75c.414 0 .75.336.75.75s-.336.75-.75.75z" }), h("circle", { cx: "11.625", cy: "7.125", r: "1.125" }), h("path", { d: "m12 24c-6.617 0-12-5.383-12-12s5.383-12 12-12 12 5.383 12 12-5.383 12-12 12zm0-22.5c-5.79 0-10.5 4.71-10.5 10.5s4.71 10.5 10.5 10.5 10.5-4.71 10.5-10.5-4.71-10.5-10.5-10.5z" })), this.label ? (h("span", { class: "duet-tooltip-label" }, this.label)) : (h("duet-visually-hidden", null, this.accessibleInputLabel
|
|
217
|
+
? `${this.accessibleInputLabel}, ${this.accessibleLabel}`
|
|
218
|
+
: this.accessibleLabel))), h("div", { ref: element => (this.tooltipEl = element), class: {
|
|
219
|
+
"duet-tooltip": true,
|
|
220
|
+
"duet-mq-large": this.breakpoint === "large",
|
|
221
|
+
"duet-mq-medium": this.breakpoint === "medium",
|
|
222
|
+
"duet-theme-turva": this.theme === "turva",
|
|
223
|
+
"duet-tooltip-down": this.openDown,
|
|
224
|
+
"duet-tooltip-has-label": !!this.label,
|
|
225
|
+
"duet-tooltip-left": this.direction === "left",
|
|
226
|
+
"duet-tooltip-right": this.direction === "right",
|
|
227
|
+
"duet-tooltip-active": this.active === true,
|
|
228
|
+
}, onClick: e => e.stopPropagation(), onKeyDown: this.handleKeyDown, onFocusout: this.handleFocusOut }, h("div", { ref: element => (this.scrollableEl = element), class: "duet-tooltip-scrollable", tabindex: "0", id: this.tooltipId }, h("slot", null)), h("button", { type: "button", class: "duet-tooltip-close", onClick: this.handleCloseClick }, h("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xxx-small" }), h("duet-visually-hidden", null, this.accessibleCloseLabel)))));
|
|
229
|
+
}
|
|
230
|
+
get element() { return this; }
|
|
231
|
+
static get watchers() { return {
|
|
232
|
+
"active": ["handleActiveChange"]
|
|
233
|
+
}; }
|
|
234
|
+
static get style() { return duetTooltipCss; }
|
|
235
|
+
}, [1, "duet-tooltip", {
|
|
236
|
+
"theme": [1025],
|
|
237
|
+
"language": [1025],
|
|
238
|
+
"accessibleLabelDefault": [1, "accessible-label-default"],
|
|
239
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
240
|
+
"accessibleInputLabel": [1, "accessible-input-label"],
|
|
241
|
+
"accessibleCloseLabelDefault": [1, "accessible-close-label-default"],
|
|
242
|
+
"accessibleCloseLabel": [1, "accessible-close-label"],
|
|
243
|
+
"label": [1],
|
|
244
|
+
"breakpoint": [1],
|
|
245
|
+
"direction": [1],
|
|
246
|
+
"positionVertical": [513, "position-vertical"],
|
|
247
|
+
"positionHorizontal": [513, "position-horizontal"],
|
|
248
|
+
"active": [1540],
|
|
249
|
+
"openDown": [32]
|
|
250
|
+
}, [[9, "scroll", "onScroll"], [4, "click", "handleDocumentClick"]]]);
|
|
251
|
+
function defineCustomElement() {
|
|
252
|
+
if (typeof customElements === "undefined") {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const components = ["duet-tooltip", "duet-icon", "duet-visually-hidden"];
|
|
256
|
+
components.forEach(tagName => { switch (tagName) {
|
|
257
|
+
case "duet-tooltip":
|
|
258
|
+
if (!customElements.get(tagName)) {
|
|
259
|
+
customElements.define(tagName, DuetTooltip);
|
|
260
|
+
}
|
|
261
|
+
break;
|
|
262
|
+
case "duet-icon":
|
|
263
|
+
if (!customElements.get(tagName)) {
|
|
264
|
+
defineCustomElement$2();
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
case "duet-visually-hidden":
|
|
268
|
+
if (!customElements.get(tagName)) {
|
|
269
|
+
defineCustomElement$1();
|
|
270
|
+
}
|
|
271
|
+
break;
|
|
272
|
+
} });
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export { DuetTooltip as D, defineCustomElement as d };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-3fc2d124.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './p-7739604d.js';
|
|
7
|
+
|
|
8
|
+
const duetScrollableCss = "*,*::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;-webkit-tap-highlight-color:transparent}:host{position:relative !important}:host .duet-scrollable-items{display:flex}:host .duet-scrollable-items .duet-scrollable-button{position:relative;flex:0 0 auto;flex-basis:40px;padding:10px;cursor:pointer}:host .duet-scrollable-items .duet-scrollable-button:active{transform:scale(0.8)}:host .duet-scrollable-items .duet-scrollable-button--left{left:-12px}:host .duet-scrollable-items .duet-scrollable-button--right{right:-12px}:host .duet-scrollable-items .duet-scrollable-button--occluded{display:none}:host .duet-scrollable-items .duet-scrollable-list{display:flex;flex-wrap:nowrap;gap:20px;padding-top:2px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scroll-snap-type:x mandatory;scroll-behavior:smooth;scroll-margin:0 20px;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch;}:host .duet-scrollable-items .duet-scrollable-list::-webkit-scrollbar{display:none}::slotted(*){scroll-snap-align:center;margin-left:0;-webkit-transition:-webkit-transform 0.2s ease-in-out;transition:-webkit-transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out}";
|
|
9
|
+
|
|
10
|
+
const DuetScrollable = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
/**
|
|
16
|
+
* Private variables and constants index
|
|
17
|
+
*/
|
|
18
|
+
this.currentIndex = 0;
|
|
19
|
+
this.tabListElement = undefined;
|
|
20
|
+
this.tabListClass = "duet-scrollable-list";
|
|
21
|
+
this.tablistAtStart = true;
|
|
22
|
+
this.isTabContentSmallerThanWrapper = false;
|
|
23
|
+
this.tablistAtEnd = false;
|
|
24
|
+
this.childrenData = {};
|
|
25
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
26
|
+
var _a, _b, _c, _d;
|
|
27
|
+
// otherwise, something is wrong, expecting 1 element only
|
|
28
|
+
if ((entries === null || entries === void 0 ? void 0 : entries.length) === 1) {
|
|
29
|
+
const currentWidth = (_b = (_a = entries[0]) === null || _a === void 0 ? void 0 : _a.target) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().width;
|
|
30
|
+
const scrollWidth = (_d = (_c = entries[0]) === null || _c === void 0 ? void 0 : _c.target) === null || _d === void 0 ? void 0 : _d.scrollWidth;
|
|
31
|
+
// in order to avoid state "jumping" on the boundary condition we add a few pixels to the comparison
|
|
32
|
+
this.isTabContentSmallerThanWrapper = scrollWidth > currentWidth + 5;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Theme of duet-tab-scrollable. When used this will override the color setting and
|
|
37
|
+
* use "primary" or "primary-turva" as the color depending on which theme
|
|
38
|
+
* is chosen.
|
|
39
|
+
*/
|
|
40
|
+
this.theme = "";
|
|
41
|
+
/**
|
|
42
|
+
* Optional identifier to add to buttons in the tab group
|
|
43
|
+
*/
|
|
44
|
+
this.identifier = "";
|
|
45
|
+
/**
|
|
46
|
+
* Selected element
|
|
47
|
+
*/
|
|
48
|
+
this.selected = 0;
|
|
49
|
+
}
|
|
50
|
+
watchPropHandler(newValue) {
|
|
51
|
+
this.scrollToTab(newValue, "center");
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Component lifecycle events.
|
|
55
|
+
*/
|
|
56
|
+
componentWillLoad() {
|
|
57
|
+
inheritGlobalTheme(this);
|
|
58
|
+
const slotted = this.host.children;
|
|
59
|
+
this.childrenData = { hasChildren: slotted && slotted.length > 0, numberOfChildren: slotted && slotted.length };
|
|
60
|
+
}
|
|
61
|
+
componentDidLoad() {
|
|
62
|
+
this.resizeObserver.observe(this.tabListElement);
|
|
63
|
+
}
|
|
64
|
+
disconnectedCallback() {
|
|
65
|
+
this.resizeObserver.disconnect();
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Private methods.
|
|
69
|
+
*/
|
|
70
|
+
getLastVisibleElement() {
|
|
71
|
+
const clientWidth = this.tabListElement.clientWidth;
|
|
72
|
+
const xValues = Array.from(this.host.querySelectorAll("button")).findIndex(element => element.getBoundingClientRect().x > clientWidth);
|
|
73
|
+
return xValues;
|
|
74
|
+
}
|
|
75
|
+
getFirstVisibleElement() {
|
|
76
|
+
const buttonCollection = this.host.querySelectorAll("button");
|
|
77
|
+
// reverse the array because we want the first invisible element form the middle, not the first in the list
|
|
78
|
+
const arrayOfXValues = Array.from(buttonCollection).map(el => el.getBoundingClientRect().x - el.getBoundingClientRect().width);
|
|
79
|
+
const xValues = arrayOfXValues.findIndex(element => {
|
|
80
|
+
return element > 0;
|
|
81
|
+
});
|
|
82
|
+
return xValues;
|
|
83
|
+
}
|
|
84
|
+
updateScrollButtons(container = this.tabListElement) {
|
|
85
|
+
if (container.scrollLeft <= 0) {
|
|
86
|
+
this.tablistAtStart = true;
|
|
87
|
+
}
|
|
88
|
+
else if (container.scrollLeft > 0) {
|
|
89
|
+
this.tablistAtStart = false;
|
|
90
|
+
}
|
|
91
|
+
if (container.clientWidth + container.scrollLeft + 10 >= container.scrollWidth) {
|
|
92
|
+
this.tablistAtEnd = true;
|
|
93
|
+
}
|
|
94
|
+
else if (container.clientWidth + container.scrollLeft + 10 < container.scrollWidth) {
|
|
95
|
+
this.tablistAtEnd = false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
scrollToTab(index = this.currentIndex, inline) {
|
|
99
|
+
if (!this.childrenData.hasChildren) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (index + 1 >= this.childrenData.numberOfChildren) {
|
|
103
|
+
index = this.childrenData.numberOfChildren - 1;
|
|
104
|
+
}
|
|
105
|
+
if (index < 0) {
|
|
106
|
+
index = 0;
|
|
107
|
+
}
|
|
108
|
+
const buttons = this.host.querySelectorAll("button");
|
|
109
|
+
// store previous position
|
|
110
|
+
let prevPosition = buttons[0].getBoundingClientRect().x;
|
|
111
|
+
// iterations to run
|
|
112
|
+
let ticksWhereScrollDidNotHappen = 5;
|
|
113
|
+
const getAnimationFrame = () => {
|
|
114
|
+
// if we get the same value enter the logic loop
|
|
115
|
+
if (buttons[0].getBoundingClientRect().x === prevPosition) {
|
|
116
|
+
ticksWhereScrollDidNotHappen--;
|
|
117
|
+
// When iteration is not complete run the calculation again
|
|
118
|
+
if (ticksWhereScrollDidNotHappen !== 0) {
|
|
119
|
+
window.requestAnimationFrame(getAnimationFrame);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this.updateScrollButtons();
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
window.requestAnimationFrame(getAnimationFrame);
|
|
126
|
+
prevPosition = buttons[0].getBoundingClientRect().x;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
buttons[index].scrollIntoView({ behavior: "smooth", inline });
|
|
130
|
+
window.requestAnimationFrame(getAnimationFrame);
|
|
131
|
+
}
|
|
132
|
+
scrollLeft() {
|
|
133
|
+
this.tablistAtEnd = false;
|
|
134
|
+
const first = this.getFirstVisibleElement() - 1;
|
|
135
|
+
this.scrollToTab(first, "center");
|
|
136
|
+
}
|
|
137
|
+
scrollRight() {
|
|
138
|
+
this.tablistAtStart = false;
|
|
139
|
+
const last = this.getLastVisibleElement() + 1;
|
|
140
|
+
this.scrollToTab(last, "center");
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* render() function
|
|
144
|
+
* Always the last one in the class.
|
|
145
|
+
*/
|
|
146
|
+
render() {
|
|
147
|
+
return (h(Host, { class: {
|
|
148
|
+
"duet-theme-turva": this.theme === "turva",
|
|
149
|
+
"duet-theme-default": this.theme === "default",
|
|
150
|
+
} }, h("div", { class: "duet-scrollable-items" }, h("button", { part: `${this.identifier}-button-left`, "aria-hidden": "true", class: {
|
|
151
|
+
"duet-scrollable-button": true,
|
|
152
|
+
"duet-scrollable-button--left": true,
|
|
153
|
+
"duet-scrollable-button--occluded": !this.isTabContentSmallerThanWrapper,
|
|
154
|
+
}, onClick: () => this.scrollLeft(), disabled: this.tablistAtStart, tabindex: "-1" }, h("duet-icon", { name: "action-arrow-left-small", size: "small", margin: "none" })), h("div", { class: this.tabListClass, onScroll: () => this.updateScrollButtons(), ref: element => (this.tabListElement = element) }, h("slot", null)), h("button", { part: `${this.identifier}-button-right`, "aria-hidden": "true", class: {
|
|
155
|
+
"duet-scrollable-button": true,
|
|
156
|
+
"duet-scrollable-button--right": true,
|
|
157
|
+
"duet-scrollable-button--occluded": !this.isTabContentSmallerThanWrapper,
|
|
158
|
+
}, onClick: () => this.scrollRight(), disabled: this.tablistAtEnd, tabindex: "-1" }, h("duet-icon", { name: "action-arrow-right-small", size: "small", margin: "none" })))));
|
|
159
|
+
}
|
|
160
|
+
get host() { return this; }
|
|
161
|
+
static get watchers() { return {
|
|
162
|
+
"selected": ["watchPropHandler"]
|
|
163
|
+
}; }
|
|
164
|
+
static get style() { return duetScrollableCss; }
|
|
165
|
+
}, [1, "duet-scrollable", {
|
|
166
|
+
"theme": [1025],
|
|
167
|
+
"identifier": [1],
|
|
168
|
+
"selected": [1026],
|
|
169
|
+
"tablistAtStart": [32],
|
|
170
|
+
"isTabContentSmallerThanWrapper": [32],
|
|
171
|
+
"tablistAtEnd": [32],
|
|
172
|
+
"childrenData": [32]
|
|
173
|
+
}]);
|
|
174
|
+
function defineCustomElement() {
|
|
175
|
+
if (typeof customElements === "undefined") {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const components = ["duet-scrollable", "duet-icon"];
|
|
179
|
+
components.forEach(tagName => { switch (tagName) {
|
|
180
|
+
case "duet-scrollable":
|
|
181
|
+
if (!customElements.get(tagName)) {
|
|
182
|
+
customElements.define(tagName, DuetScrollable);
|
|
183
|
+
}
|
|
184
|
+
break;
|
|
185
|
+
case "duet-icon":
|
|
186
|
+
if (!customElements.get(tagName)) {
|
|
187
|
+
defineCustomElement$1();
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
} });
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export { DuetScrollable as D, defineCustomElement as d };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { p as proxyCustomElement, H, h, b as Host } from './p-3fc2d124.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$1 } from './p-b08e57cf.js';
|
|
9
|
+
|
|
10
|
+
const duetProgressCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:inherit}.duet-progress{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;min-height:1px;}.duet-progress .progress-bar{position:relative;display:block;width:100%;height:inherit;min-height:1px;background-color:#f3f9fc;border-radius:0;box-shadow:none}.duet-theme-turva .duet-progress .progress-bar{background-color:#fcf3f4}.duet-progress .progress-bar>span{display:block;height:inherit;text-indent:-9999px;background-color:#0077b3;border-radius:0}.duet-theme-turva .duet-progress .progress-bar>span{background-color:#c60c30}.duet-progress progress[value]{display:flex;width:100%;height:inherit;min-height:1px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-theme-turva .duet-progress progress[value]{color:#c60c30}.duet-progress progress[value]::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-bar{background-color:#fcf3f4}.duet-progress progress[value]::-webkit-progress-value{background-color:#0077b3;background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-value{background-color:#c60c30}.duet-progress progress[value] ::-moz-progress-bar{background-color:#f3f9fc}.duet-theme-turva .duet-progress progress[value] ::-moz-progress-bar{background-color:#fcf3f4}";
|
|
11
|
+
|
|
12
|
+
const DuetProgress = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.__registerHost();
|
|
16
|
+
/**
|
|
17
|
+
* Own Properties
|
|
18
|
+
*/
|
|
19
|
+
this.progressId = createID("DuetProgress");
|
|
20
|
+
this.progressLabelId = createID("DuetProgressLabel");
|
|
21
|
+
/**
|
|
22
|
+
* Aria Details of the component
|
|
23
|
+
*/
|
|
24
|
+
this.accessibleDetails = undefined;
|
|
25
|
+
/**
|
|
26
|
+
* String of id's that indicate alternative labels elements
|
|
27
|
+
*/
|
|
28
|
+
this.accessibleLabelledBy = undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Aria description the button
|
|
31
|
+
*/
|
|
32
|
+
this.accessibleDescription = undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Defaults for accessibleLabel
|
|
35
|
+
*/
|
|
36
|
+
this.accessibleLabelUploadDefaults = {
|
|
37
|
+
fi: ["lähetys valmis", "lähetys käynnissä"],
|
|
38
|
+
sv: ["Uppladdningen är klar", "Uppladdning pågår"],
|
|
39
|
+
en: ["upload completed", "upload in progress"],
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Adds accessible label for upload in progress and upload complete states
|
|
43
|
+
* @default {fi: ["lähetys valmis", "lähetys käynnissä"],sv: ["Uppladdningen är klar", "Uppladdning pågår"], en: ["completed", "in progress"]}
|
|
44
|
+
*/
|
|
45
|
+
this.accessibleLabelUpload = getLocaleString(this.accessibleLabelUploadDefaults);
|
|
46
|
+
/**
|
|
47
|
+
* Progress of the bar, a value from 0-100
|
|
48
|
+
*/
|
|
49
|
+
this.progress = 0;
|
|
50
|
+
/**
|
|
51
|
+
* Height of progressbar
|
|
52
|
+
*/
|
|
53
|
+
this.height = "10px";
|
|
54
|
+
/**
|
|
55
|
+
* Theme of the input.
|
|
56
|
+
*/
|
|
57
|
+
this.theme = "";
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Component lifecycle events.
|
|
61
|
+
*/
|
|
62
|
+
componentWillLoad() {
|
|
63
|
+
inheritGlobalTheme(this);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* render() function
|
|
67
|
+
* Always the last one in the class.
|
|
68
|
+
*/
|
|
69
|
+
render() {
|
|
70
|
+
return (h(Host, null, h("div", { "aria-live": this.accessibleLabel ? "polite" : "off", "aria-hidden": this.accessibleLabel ? "false" : "true", "aria-atomic": "true", style: {
|
|
71
|
+
height: this.height,
|
|
72
|
+
}, id: this.progressId, class: {
|
|
73
|
+
"duet-progress": true,
|
|
74
|
+
"duet-progress-done": this.progress === 100,
|
|
75
|
+
"duet-progress-start": this.progress === 0,
|
|
76
|
+
"duet-progress-inprogress": this.progress < 99 && this.progress !== 0,
|
|
77
|
+
"duet-theme-turva": this.theme === "turva",
|
|
78
|
+
} }, h("duet-visually-hidden", null, h("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (h("span", null, this.accessibleLabel, ", ", this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))), this.caption && (h("div", { class: "duet-progress-caption" }, h("span", null, this.caption))), h("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, "aria-labelledby": this.accessibleLabelledBy, "aria-details": this.accessibleDetails, "aria-description": this.accessibleDescription, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" }, h("div", { class: "progress-bar" }, h("span", { style: { width: `${this.progress}%;` } }, "Progress: ", this.progress, "%"))))));
|
|
79
|
+
}
|
|
80
|
+
get element() { return this; }
|
|
81
|
+
static get style() { return duetProgressCss; }
|
|
82
|
+
}, [0, "duet-progress", {
|
|
83
|
+
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
84
|
+
"accessibleDetails": [1, "accessible-details"],
|
|
85
|
+
"accessibleLabelledBy": [1, "accessible-labelled-by"],
|
|
86
|
+
"accessibleDescription": [1, "accessible-description"],
|
|
87
|
+
"accessibleLabel": [1, "accessible-label"],
|
|
88
|
+
"accessibleLabelUploadDefaults": [1, "accessible-label-upload-defaults"],
|
|
89
|
+
"accessibleLabelUpload": [1, "accessible-label-upload"],
|
|
90
|
+
"progress": [1538],
|
|
91
|
+
"caption": [1],
|
|
92
|
+
"height": [1],
|
|
93
|
+
"theme": [1025]
|
|
94
|
+
}]);
|
|
95
|
+
function defineCustomElement() {
|
|
96
|
+
if (typeof customElements === "undefined") {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const components = ["duet-progress", "duet-visually-hidden"];
|
|
100
|
+
components.forEach(tagName => { switch (tagName) {
|
|
101
|
+
case "duet-progress":
|
|
102
|
+
if (!customElements.get(tagName)) {
|
|
103
|
+
customElements.define(tagName, DuetProgress);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "duet-visually-hidden":
|
|
107
|
+
if (!customElements.get(tagName)) {
|
|
108
|
+
defineCustomElement$1();
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
} });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export { DuetProgress 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-3fc2d124.js';
|
|
5
|
+
|
|
6
|
+
const duetVisuallyHiddenCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}";
|
|
7
|
+
|
|
8
|
+
const DuetVisuallyHidden = /*@__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, { class: "duet-visually-hidden" }, h("slot", null)));
|
|
20
|
+
}
|
|
21
|
+
static get style() { return duetVisuallyHiddenCss; }
|
|
22
|
+
}, [1, "duet-visually-hidden"]);
|
|
23
|
+
function defineCustomElement() {
|
|
24
|
+
if (typeof customElements === "undefined") {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const components = ["duet-visually-hidden"];
|
|
28
|
+
components.forEach(tagName => { switch (tagName) {
|
|
29
|
+
case "duet-visually-hidden":
|
|
30
|
+
if (!customElements.get(tagName)) {
|
|
31
|
+
customElements.define(tagName, DuetVisuallyHidden);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
} });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { DuetVisuallyHidden as D, defineCustomElement as d };
|