@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, c as createEvent, 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 { p as parsePossibleJSON } from './p-5a9d75e1.js';
|
|
8
|
+
import { d as defineCustomElement$5 } from './p-e5c8a58f.js';
|
|
9
|
+
import { d as defineCustomElement$4 } from './p-7739604d.js';
|
|
10
|
+
import { d as defineCustomElement$3 } from './p-16d518fd.js';
|
|
11
|
+
import { d as defineCustomElement$2 } from './p-88511d7a.js';
|
|
12
|
+
import { d as defineCustomElement$1 } from './p-b08e57cf.js';
|
|
13
|
+
|
|
14
|
+
const duetSelectCss = "@charset \"UTF-8\";*.sc-duet-select,*.sc-duet-select::after,*.sc-duet-select::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-select-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;max-width:100%;vertical-align:bottom}.sc-duet-select-h:last-child,.sc-duet-select-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-select-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-select-h{width:100% !important}}.duet-select-variation-tiny.sc-duet-select-h{position:relative;top:-2px;width:72px;margin:0 !important;vertical-align:baseline}.duet-m-0.sc-duet-select-h{margin:0 !important}duet-tooltip.sc-duet-select{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-select{position:relative;top:4px;right:auto}}.duet-select-placeholder.sc-duet-select{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-select-container.sc-duet-select{position:relative;width:100%}.duet-select-container.duet-select-variation-tiny.sc-duet-select{width:72px}.duet-select-wrapper.sc-duet-select{position:relative;width:100%;padding:15px 14px !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:400;line-height:1.25}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-variation-tiny.sc-duet-select .duet-select-wrapper.sc-duet-select{width:81px;padding:0 !important}.duet-select-wrapper.sc-duet-select::after{content:\" \"}.duet-select-wrapper.sc-duet-select select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:200;width:100%;height:100%;padding:0;margin:0;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;cursor:pointer;border:0;outline:none;opacity:0}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#909599;box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#747475;box-shadow:0 0 0 1px #747475}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#171c3a}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#0077b3}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select{cursor:default !important}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#00294d !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:block;width:100%;min-width:8rem;padding:12px 14px !important;padding-right:48px !important;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:#00294d;text-align:left;text-overflow:ellipsis;white-space:nowrap;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#de2362 !important}.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#e02a0d !important}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select{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:#747475}.duet-select.sc-duet-select svg.sc-duet-select{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select svg.sc-duet-select{color:#171c3a}.duet-select-variation-tiny.sc-duet-select .duet-select.sc-duet-select{width:72px;min-width:inherit;padding:0 !important;margin-bottom:-4px;overflow:visible;font-weight:600;text-align:center}.duet-select-variation-tiny.sc-duet-select .duet-select.sc-duet-select duet-icon.sc-duet-select{padding-left:10px}.duet-select-help.sc-duet-select{display:block;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:#657787;border-radius:4px}.duet-select-help.sc-duet-select span.sc-duet-select{display:block;margin-top:8px}.duet-theme-turva.sc-duet-select .duet-select-help.sc-duet-select{color:#747475}.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#e02a0d}.duet-label-hidden.sc-duet-select duet-label.sc-duet-select{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
15
|
+
|
|
16
|
+
function isOptionGroup(item) {
|
|
17
|
+
return "options" in item;
|
|
18
|
+
}
|
|
19
|
+
function findOptionByValue(items, value) {
|
|
20
|
+
for (var i = 0; i < items.length; i++) {
|
|
21
|
+
let item = items[i];
|
|
22
|
+
if (isOptionGroup(item)) {
|
|
23
|
+
item = findOptionByValue(item.options, value);
|
|
24
|
+
}
|
|
25
|
+
if (item && item.value === value) {
|
|
26
|
+
return item;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const DuetSelect = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.__registerHost();
|
|
34
|
+
this.duetChange = createEvent(this, "duetChange", 3);
|
|
35
|
+
this.duetFocus = createEvent(this, "duetFocus", 7);
|
|
36
|
+
this.duetBlur = createEvent(this, "duetBlur", 7);
|
|
37
|
+
/**
|
|
38
|
+
* Own Properties
|
|
39
|
+
*/
|
|
40
|
+
this.selectId = createID("DuetSelect");
|
|
41
|
+
this.errorId = createID("DuetError");
|
|
42
|
+
this.labelId = createID("DuetLabel");
|
|
43
|
+
this.topCaptionId = createID("DuetCaptionTop");
|
|
44
|
+
this.topCaptionPlaceholderId = createID("DuetCaptionPlaceholderTop");
|
|
45
|
+
/**
|
|
46
|
+
* State() variables
|
|
47
|
+
* Inlined decorator, alphabetical order.
|
|
48
|
+
*/
|
|
49
|
+
this.processedItems = null;
|
|
50
|
+
/**
|
|
51
|
+
* Variation of dropdown. -tiny is used for small numbers / tiny option ranges.
|
|
52
|
+
*/
|
|
53
|
+
this.variation = "default";
|
|
54
|
+
/**
|
|
55
|
+
* Controls the margin of the component.
|
|
56
|
+
*/
|
|
57
|
+
this.margin = "auto";
|
|
58
|
+
/**
|
|
59
|
+
* Display the select in error state along with an error message.
|
|
60
|
+
*/
|
|
61
|
+
this.error = "";
|
|
62
|
+
/**
|
|
63
|
+
* Expands the input to fill 100% of the container width.
|
|
64
|
+
*/
|
|
65
|
+
this.expand = false;
|
|
66
|
+
/**
|
|
67
|
+
* Theme of the select.
|
|
68
|
+
*/
|
|
69
|
+
this.theme = "";
|
|
70
|
+
/**
|
|
71
|
+
* Visually hide the label, but still show it to screen readers.
|
|
72
|
+
*/
|
|
73
|
+
this.labelHidden = false;
|
|
74
|
+
/**
|
|
75
|
+
* Hint text to display.
|
|
76
|
+
*/
|
|
77
|
+
this.placeholder = "";
|
|
78
|
+
/**
|
|
79
|
+
* If form input field has a placeholder text, and user types anything (causing the placeholder text to disappear),
|
|
80
|
+
* settings this to true will "echo" it into the caption slot - this option will be false by default for the next few versions, but will eventually be true by default (scheduled for 4.30.0)
|
|
81
|
+
*/
|
|
82
|
+
this.echoPlaceholder = false;
|
|
83
|
+
/**
|
|
84
|
+
* Makes the select component disabled. This prevents users from being able
|
|
85
|
+
* to interact with the select, and conveys its inactive state to assistive
|
|
86
|
+
* technologies.
|
|
87
|
+
*/
|
|
88
|
+
this.disabled = false;
|
|
89
|
+
/**
|
|
90
|
+
* Set whether the input is required or not. Please note that this is necessary for
|
|
91
|
+
* accessible inputs when the user is required to fill them. When using this property
|
|
92
|
+
* you need to also set “novalidate” attribute to your form element to prevent
|
|
93
|
+
* browser from displaying its own validation errors.
|
|
94
|
+
*/
|
|
95
|
+
this.required = false;
|
|
96
|
+
/**
|
|
97
|
+
* Label for the select.
|
|
98
|
+
*/
|
|
99
|
+
this.label = "label";
|
|
100
|
+
/**
|
|
101
|
+
* Tooltip to display next to the label of the input.
|
|
102
|
+
*/
|
|
103
|
+
this.tooltip = "";
|
|
104
|
+
/**
|
|
105
|
+
* With direction setting you can force the tooltip to always open towards left
|
|
106
|
+
* or right instead of automatically determining the direction.
|
|
107
|
+
*/
|
|
108
|
+
this.tooltipDirection = "auto";
|
|
109
|
+
/**
|
|
110
|
+
* Component event handling.
|
|
111
|
+
*/
|
|
112
|
+
this.onClick = (ev) => {
|
|
113
|
+
ev.stopPropagation();
|
|
114
|
+
};
|
|
115
|
+
this.onChange = () => {
|
|
116
|
+
this.value = this.nativeSelect.value;
|
|
117
|
+
this.duetChange.emit({
|
|
118
|
+
value: this.value,
|
|
119
|
+
component: "duet-select",
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
this.onBlur = (ev) => {
|
|
123
|
+
this.duetBlur.emit({
|
|
124
|
+
originalEvent: ev,
|
|
125
|
+
value: this.value,
|
|
126
|
+
component: "duet-select",
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
this.onFocus = (ev) => {
|
|
130
|
+
this.duetFocus.emit({
|
|
131
|
+
originalEvent: ev,
|
|
132
|
+
value: this.value,
|
|
133
|
+
component: "duet-select",
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
valueChanged() {
|
|
138
|
+
if (this.nativeSelect) {
|
|
139
|
+
this.nativeSelect.value = this.value;
|
|
140
|
+
}
|
|
141
|
+
this.isCaptionVisible = !!this.caption;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Component lifecycle events.
|
|
145
|
+
*/
|
|
146
|
+
componentWillLoad() {
|
|
147
|
+
inheritGlobalTheme(this);
|
|
148
|
+
this.isCaptionVisible = !!this.caption;
|
|
149
|
+
this.refresh();
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Sets focus on the specified `duet-select`. Use this method instead of the global
|
|
153
|
+
* `select.focus()`.
|
|
154
|
+
*/
|
|
155
|
+
async setFocus(options) {
|
|
156
|
+
if (this.nativeSelect) {
|
|
157
|
+
this.nativeSelect.focus(options);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Local methods.
|
|
162
|
+
*/
|
|
163
|
+
async refresh() {
|
|
164
|
+
this.processedItems = parsePossibleJSON(this.items);
|
|
165
|
+
}
|
|
166
|
+
getSelectedItemLabel() {
|
|
167
|
+
let item;
|
|
168
|
+
if (this.processedItems) {
|
|
169
|
+
item = findOptionByValue(this.processedItems, this.value);
|
|
170
|
+
}
|
|
171
|
+
return item ? item.label : this.placeholder || "";
|
|
172
|
+
}
|
|
173
|
+
renderOption(option) {
|
|
174
|
+
return (h("option", { value: option.value, key: option.value, selected: this.value === option.value, disabled: option.disabled }, option.label));
|
|
175
|
+
}
|
|
176
|
+
renderOptionGroup(group) {
|
|
177
|
+
return (h("optgroup", { key: group.label, label: group.label, disabled: group.disabled }, group.options.map(option => this.renderOption(option))));
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* render() function
|
|
181
|
+
* Always the last one in the class.
|
|
182
|
+
*/
|
|
183
|
+
render() {
|
|
184
|
+
const identifier = this.identifier || this.selectId;
|
|
185
|
+
return (h(Host, { onClick: this.onClick, class: {
|
|
186
|
+
"duet-m-0": this.margin === "none",
|
|
187
|
+
"duet-expand": this.expand,
|
|
188
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
189
|
+
} }, h("div", { class: {
|
|
190
|
+
"duet-select-container": true,
|
|
191
|
+
"duet-label-hidden": this.labelHidden,
|
|
192
|
+
"duet-theme-turva": this.theme === "turva",
|
|
193
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
194
|
+
"duet-input-top-caption-shown": this.isCaptionVisible,
|
|
195
|
+
"has-error": !!this.error,
|
|
196
|
+
} }, h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (h("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (h("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), h("div", { class: "duet-select-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (h("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-select-placeholder", size: "small" }, this.placeholder)), h("select", { ref: select => (this.nativeSelect = select), disabled: this.disabled, name: this.name, id: identifier, role: this.role, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, required: this.required, "aria-describedby": this.accessibleDescribedBy }, this.placeholder && (h("option", { disabled: true, selected: true, value: "" }, this.placeholder)), !this.processedItems ? (h("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
|
|
197
|
+
return isOptionGroup(item) ? this.renderOptionGroup(item) : this.renderOption(item);
|
|
198
|
+
}))), h("div", { class: {
|
|
199
|
+
"duet-select": true,
|
|
200
|
+
"duet-select-variation-tiny": this.variation === "tiny",
|
|
201
|
+
}, "aria-hidden": "true" }, h("span", { key: this.value }, this.getSelectedItemLabel()), this.variation !== "tiny" && (h("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" }))), this.variation === "tiny" && (h("duet-icon", { name: "action-arrow-down-small", color: "currentColor", margin: "none", size: "xx-small" })))), h("span", { class: "duet-select-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h("span", null, this.error)))));
|
|
202
|
+
}
|
|
203
|
+
get element() { return this; }
|
|
204
|
+
static get watchers() { return {
|
|
205
|
+
"value": ["valueChanged"],
|
|
206
|
+
"items": ["refresh"]
|
|
207
|
+
}; }
|
|
208
|
+
static get style() { return duetSelectCss; }
|
|
209
|
+
}, [2, "duet-select", {
|
|
210
|
+
"variation": [1],
|
|
211
|
+
"accessibleActiveDescendant": [1, "accessible-active-descendant"],
|
|
212
|
+
"accessibleDescribedBy": [1, "accessible-described-by"],
|
|
213
|
+
"margin": [1],
|
|
214
|
+
"accessibleControls": [1, "accessible-controls"],
|
|
215
|
+
"accessibleOwns": [1, "accessible-owns"],
|
|
216
|
+
"error": [1],
|
|
217
|
+
"expand": [4],
|
|
218
|
+
"value": [1537],
|
|
219
|
+
"theme": [1025],
|
|
220
|
+
"labelHidden": [4, "label-hidden"],
|
|
221
|
+
"identifier": [1],
|
|
222
|
+
"name": [1],
|
|
223
|
+
"placeholder": [1],
|
|
224
|
+
"caption": [1],
|
|
225
|
+
"echoPlaceholder": [4, "echo-placeholder"],
|
|
226
|
+
"items": [1],
|
|
227
|
+
"disabled": [516],
|
|
228
|
+
"required": [4],
|
|
229
|
+
"label": [1],
|
|
230
|
+
"role": [1],
|
|
231
|
+
"tooltip": [1],
|
|
232
|
+
"tooltipDirection": [1, "tooltip-direction"],
|
|
233
|
+
"processedItems": [32],
|
|
234
|
+
"setFocus": [64]
|
|
235
|
+
}]);
|
|
236
|
+
function defineCustomElement() {
|
|
237
|
+
if (typeof customElements === "undefined") {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
const components = ["duet-select", "duet-caption", "duet-icon", "duet-label", "duet-tooltip", "duet-visually-hidden"];
|
|
241
|
+
components.forEach(tagName => { switch (tagName) {
|
|
242
|
+
case "duet-select":
|
|
243
|
+
if (!customElements.get(tagName)) {
|
|
244
|
+
customElements.define(tagName, DuetSelect);
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
case "duet-caption":
|
|
248
|
+
if (!customElements.get(tagName)) {
|
|
249
|
+
defineCustomElement$5();
|
|
250
|
+
}
|
|
251
|
+
break;
|
|
252
|
+
case "duet-icon":
|
|
253
|
+
if (!customElements.get(tagName)) {
|
|
254
|
+
defineCustomElement$4();
|
|
255
|
+
}
|
|
256
|
+
break;
|
|
257
|
+
case "duet-label":
|
|
258
|
+
if (!customElements.get(tagName)) {
|
|
259
|
+
defineCustomElement$3();
|
|
260
|
+
}
|
|
261
|
+
break;
|
|
262
|
+
case "duet-tooltip":
|
|
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 { DuetSelect as D, defineCustomElement as d };
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { E as Env, p as proxyCustomElement, H, h, b as Host } from './p-3fc2d124.js';
|
|
5
|
+
import { i as inheritGlobalTheme } from './p-4ebf1618.js';
|
|
6
|
+
import { g as getColorByName } from './p-86faf728.js';
|
|
7
|
+
|
|
8
|
+
const cleanupSvg = (svgContent) => {
|
|
9
|
+
if (typeof document === "undefined" || !svgContent) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const div = document.createElement("div");
|
|
13
|
+
div.innerHTML = svgContent;
|
|
14
|
+
// setup this way to ensure it works on our buddy IE
|
|
15
|
+
for (let i = div.childNodes.length - 1; i >= 0; i--) {
|
|
16
|
+
const child = div.childNodes[i];
|
|
17
|
+
if (child.nodeName.toLowerCase() !== "svg") {
|
|
18
|
+
div.removeChild(div.childNodes[i]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return div.firstElementChild;
|
|
22
|
+
};
|
|
23
|
+
const isValid = (elm) => {
|
|
24
|
+
if (elm.nodeName.toLowerCase() === "script") {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
for (let i = 0; i < elm.attributes.length; i++) {
|
|
28
|
+
const attribute = elm.attributes[i];
|
|
29
|
+
if (attribute.name.toLowerCase().indexOf("on") === 0) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (elm.children) {
|
|
34
|
+
for (let i = 0; i < elm.children.length; i++) {
|
|
35
|
+
if (!isValid(elm.children[i])) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
};
|
|
42
|
+
const buildIconUrl = (iconName) => {
|
|
43
|
+
// under normal operations the Icons should always be loaded from the CDN
|
|
44
|
+
{
|
|
45
|
+
return `${Env.cdnURIProd}/icons/${Env.duetIconVersion}/lib/assets/${iconName}.svg`;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const iconCache = {};
|
|
49
|
+
function fetchIconByUrl(url) {
|
|
50
|
+
if (iconCache[url]) {
|
|
51
|
+
return iconCache[url];
|
|
52
|
+
}
|
|
53
|
+
// we create a function that covers all the fetching, cleanup, validation etc,
|
|
54
|
+
// this way we can perform that work just once, and then return the same promise in future.
|
|
55
|
+
async function doFetch() {
|
|
56
|
+
const res = await fetch(url);
|
|
57
|
+
if (!res.ok) {
|
|
58
|
+
throw new Error(`SVG request failed: ${res.status} ${res.statusText}`);
|
|
59
|
+
}
|
|
60
|
+
const responseText = await res.text();
|
|
61
|
+
const svgElement = cleanupSvg(responseText);
|
|
62
|
+
if (!isValid(svgElement)) {
|
|
63
|
+
throw new Error("SVG validation failed");
|
|
64
|
+
}
|
|
65
|
+
// OuterHTML does not unfortunately work here with IE11
|
|
66
|
+
// was previously: resolve(svgElement.outerHTML)
|
|
67
|
+
const div = document.createElement("div");
|
|
68
|
+
div.appendChild(svgElement);
|
|
69
|
+
return div.innerHTML;
|
|
70
|
+
}
|
|
71
|
+
// we do not `await` the fetch, as we only care about initiating the work,
|
|
72
|
+
// it's the responsibility of the calling code to wait for the response.
|
|
73
|
+
const req = doFetch();
|
|
74
|
+
// cache for the repeat requests
|
|
75
|
+
return (iconCache[url] = req);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const duetIconCss = "*,*::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-bottom:16px !important;display:inline-block;width:auto;max-width:100%;color:inherit;-webkit-tap-highlight-color:transparent}@media (max-width: 35.9375em){:host(.duet-icon-has-outline){margin-bottom:0 !important}}@media (max-width: 35.9375em){:host(.duet-icon-has-background){margin-bottom:0 !important}}:host(.duet-m-0){margin:0 !important}@media (max-width: 35.9375em){:host(.duet-m-0){margin:0 !important}}.duet-icon{-webkit-user-select:none;user-select:none;width:100%;height:100%;transform-origin:top center}.duet-icon.duet-icon-has-outline{padding:12px;border-style:solid;border-width:1px;border-radius:50%}@media (max-width: 35.9375em){.duet-icon.duet-icon-has-outline{outline:1px solid transparent;transform:scale(0.8)}}.duet-icon.duet-icon-has-background{padding:16px;color:white;border-radius:50%}@media (max-width: 35.9375em){.duet-icon.duet-icon-has-background{outline:1px solid transparent;transform:scale(0.8)}}.duet-icon.duet-icon-has-background.duet-theme-turva,.duet-icon.duet-icon-has-background.duet-theme-default{color:white}.duet-icon.duet-icon-has-background.xxx-small .duet-icon-svg,.duet-icon.duet-icon-has-outline.xxx-small .duet-icon-svg{width:10px;height:10px}.duet-icon.duet-icon-has-background.xx-small .duet-icon-svg,.duet-icon.duet-icon-has-outline.xx-small .duet-icon-svg{width:16px;height:16px}@media (max-width: 35.9375em){.duet-icon.duet-icon-not-responsive{transform:scale(1) !important}}.duet-icon.duet-theme-default{color:#0077b3}.duet-icon.duet-theme-turva{color:#c60c30}.duet-icon.auto .duet-icon-svg{width:100%;height:100%}.duet-icon.xxx-small .duet-icon-svg{width:7px;height:7px}.duet-icon.duet-icon-has-background.xxx-small{padding:6px}.duet-icon.duet-icon-has-outline.xxx-small{padding:4px}.duet-icon.xx-small .duet-icon-svg{width:10px;height:10px}.duet-icon.duet-icon-has-background.xx-small{padding:8px}.duet-icon.duet-icon-has-outline.xx-small{padding:7px}.duet-icon.x-small .duet-icon-svg{width:16px;height:16px}.duet-icon.duet-icon-has-outline.x-small{padding:10px}.duet-icon.duet-icon-has-background.x-small{padding:12px}.duet-icon.small .duet-icon-svg{width:20px;height:20px}.duet-icon.duet-icon-has-background.small{padding:14px}.duet-icon.large .duet-icon-svg{width:30px;height:30px}.duet-icon.x-large .duet-icon-svg{width:36px;height:36px}.duet-icon.xx-large .duet-icon-svg{width:48px;height:48px}.duet-icon.xxx-large .duet-icon-svg{width:48px;height:48px}@media (min-width: 48em){.duet-icon.xxx-large .duet-icon-svg{width:72px;height:72px}}.duet-icon .duet-icon-svg{display:block;width:24px;min-width:100%;height:24px;font-size:0}.duet-icon svg{width:100%;min-width:100%;fill:currentColor}";
|
|
79
|
+
|
|
80
|
+
const DuetIcon = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
81
|
+
constructor() {
|
|
82
|
+
super();
|
|
83
|
+
this.__registerHost();
|
|
84
|
+
this.__attachShadow();
|
|
85
|
+
/**
|
|
86
|
+
* Theme of the icon. This setting will be overridden when you set the color
|
|
87
|
+
* property
|
|
88
|
+
*/
|
|
89
|
+
this.theme = "";
|
|
90
|
+
/**
|
|
91
|
+
* Icon name from Duet to display.
|
|
92
|
+
*/
|
|
93
|
+
this.name = "action-add";
|
|
94
|
+
/**
|
|
95
|
+
* Controls the margin of the component.
|
|
96
|
+
*/
|
|
97
|
+
this.margin = "auto";
|
|
98
|
+
/**
|
|
99
|
+
* Whether the icon changes its size responsively or not.
|
|
100
|
+
*/
|
|
101
|
+
this.responsive = true;
|
|
102
|
+
/**
|
|
103
|
+
* Custom color to be used for the icon, as a design token entered in camelCase
|
|
104
|
+
* or kebab-case. Example: "color-primary". This property can also be set to
|
|
105
|
+
* "currentColor" which forces the icon to use the CSS text color of parent
|
|
106
|
+
* element instead. Useful when you want to control the color in stylesheet
|
|
107
|
+
* instead.
|
|
108
|
+
*/
|
|
109
|
+
this.color = "";
|
|
110
|
+
/**
|
|
111
|
+
* Custom color to be used for a circular background, as a design token entered
|
|
112
|
+
* in camelCase or kebab-case. Using this option the icon will always be resized
|
|
113
|
+
* to $size-icon-medium on mobile viewports. Example: "color-primary".
|
|
114
|
+
*/
|
|
115
|
+
this.background = "";
|
|
116
|
+
/**
|
|
117
|
+
* Icon size. Entered as one of the icon size design tokens.
|
|
118
|
+
*/
|
|
119
|
+
this.size = "medium";
|
|
120
|
+
/**
|
|
121
|
+
* Custom color to be used for a circular border and icon outline, as a design
|
|
122
|
+
* token entered in camelCase or kebab-case. Using this option the icon will
|
|
123
|
+
* always be resized to $size-icon-medium on mobile viewports.
|
|
124
|
+
* Example: "color-primary".
|
|
125
|
+
*/
|
|
126
|
+
this.outline = "";
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Component lifecycle events.
|
|
130
|
+
*/
|
|
131
|
+
componentWillLoad() {
|
|
132
|
+
inheritGlobalTheme(this);
|
|
133
|
+
if (this.src && this.icon) {
|
|
134
|
+
console.warn("[DUET COMPONENTS]: <duet-icon> should have either have src or icon attributes, but not both. icon attribute will take precedence", "icon:", this.icon, "src:", this.src);
|
|
135
|
+
}
|
|
136
|
+
this.loadIcon();
|
|
137
|
+
}
|
|
138
|
+
async loadIcon() {
|
|
139
|
+
// static icon known at build-time, so we can set it synchronously
|
|
140
|
+
if (this.icon) {
|
|
141
|
+
this.svgContent = this.icon;
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
// dynamically load icon from url
|
|
145
|
+
const src = this.src ? this.src : buildIconUrl(this.name);
|
|
146
|
+
try {
|
|
147
|
+
this.svgContent = await fetchIconByUrl(src);
|
|
148
|
+
}
|
|
149
|
+
catch (e) {
|
|
150
|
+
console.warn(`[DUET COMPONENTS]: <duet-icon> could not load SVG from URL: ${src}.`, e);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* render() function.
|
|
155
|
+
* Always the last one in the class.
|
|
156
|
+
*/
|
|
157
|
+
render() {
|
|
158
|
+
const color = this.color === "currentColor"
|
|
159
|
+
? "currentColor"
|
|
160
|
+
: getColorByName(this.color, this.theme) || getColorByName(this.outline, this.theme);
|
|
161
|
+
const styles = {
|
|
162
|
+
color,
|
|
163
|
+
background: getColorByName(this.background, this.theme),
|
|
164
|
+
"border-color": getColorByName(this.outline, this.theme),
|
|
165
|
+
};
|
|
166
|
+
return (h(Host, { class: {
|
|
167
|
+
"duet-m-0": this.margin === "none",
|
|
168
|
+
"duet-icon-has-outline": !!this.outline,
|
|
169
|
+
"duet-icon-has-background": !!this.background,
|
|
170
|
+
} }, h("div", { "aria-hidden": "true", style: styles, class: {
|
|
171
|
+
"duet-icon": true,
|
|
172
|
+
[this.size]: true,
|
|
173
|
+
"duet-theme-turva": this.theme === "turva",
|
|
174
|
+
"duet-theme-default": this.theme === "default",
|
|
175
|
+
"duet-icon-has-outline": !!this.outline,
|
|
176
|
+
"duet-icon-has-background": !!this.background,
|
|
177
|
+
"duet-icon-not-responsive": !this.responsive,
|
|
178
|
+
} }, h("span", { "aria-hidden": "true", class: "duet-icon-svg", innerHTML: this.svgContent }))));
|
|
179
|
+
}
|
|
180
|
+
get element() { return this; }
|
|
181
|
+
static get watchers() { return {
|
|
182
|
+
"src": ["loadIcon"],
|
|
183
|
+
"icon": ["loadIcon"],
|
|
184
|
+
"name": ["loadIcon"]
|
|
185
|
+
}; }
|
|
186
|
+
static get style() { return duetIconCss; }
|
|
187
|
+
}, [1, "duet-icon", {
|
|
188
|
+
"theme": [1025],
|
|
189
|
+
"icon": [1],
|
|
190
|
+
"src": [1],
|
|
191
|
+
"name": [1],
|
|
192
|
+
"margin": [1],
|
|
193
|
+
"responsive": [4],
|
|
194
|
+
"color": [513],
|
|
195
|
+
"background": [1],
|
|
196
|
+
"size": [1],
|
|
197
|
+
"outline": [1],
|
|
198
|
+
"svgContent": [32]
|
|
199
|
+
}]);
|
|
200
|
+
function defineCustomElement() {
|
|
201
|
+
if (typeof customElements === "undefined") {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const components = ["duet-icon"];
|
|
205
|
+
components.forEach(tagName => { switch (tagName) {
|
|
206
|
+
case "duet-icon":
|
|
207
|
+
if (!customElements.get(tagName)) {
|
|
208
|
+
customElements.define(tagName, DuetIcon);
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
} });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export { DuetIcon as D, defineCustomElement as d };
|
|
@@ -0,0 +1,65 @@
|
|
|
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 duetSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";
|
|
7
|
+
|
|
8
|
+
const DuetSpacer = /*@__PURE__*/ proxyCustomElement(class extends H {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
/**
|
|
14
|
+
* Size variation of the spacer. Can be any of the spacing tokens.
|
|
15
|
+
*/
|
|
16
|
+
this.size = "medium";
|
|
17
|
+
/**
|
|
18
|
+
* Direction of the space added.
|
|
19
|
+
*/
|
|
20
|
+
this.direction = "vertical";
|
|
21
|
+
/**
|
|
22
|
+
* Adjusts the breakpoint where the spacer is shown in. The functionality
|
|
23
|
+
* follows 1:1 the media queries defined in design tokens.
|
|
24
|
+
*/
|
|
25
|
+
this.breakpoint = "";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* render() function
|
|
29
|
+
* Always the last one in the class.
|
|
30
|
+
*/
|
|
31
|
+
render() {
|
|
32
|
+
return (h(Host, { class: {
|
|
33
|
+
"duet-spacer": true,
|
|
34
|
+
"duet-spacer-xx-small": this.breakpoint === "xx-small",
|
|
35
|
+
"duet-spacer-x-small": this.breakpoint === "x-small",
|
|
36
|
+
"duet-spacer-small": this.breakpoint === "small",
|
|
37
|
+
"duet-spacer-medium": this.breakpoint === "medium",
|
|
38
|
+
"duet-spacer-large": this.breakpoint === "large",
|
|
39
|
+
"duet-spacer-x-large": this.breakpoint === "x-large",
|
|
40
|
+
"duet-spacer-xx-large": this.breakpoint === "xx-large",
|
|
41
|
+
[this.size]: true,
|
|
42
|
+
[`duet-spacer-${this.direction}`]: true,
|
|
43
|
+
} }));
|
|
44
|
+
}
|
|
45
|
+
static get style() { return duetSpacerCss; }
|
|
46
|
+
}, [1, "duet-spacer", {
|
|
47
|
+
"size": [1],
|
|
48
|
+
"direction": [1],
|
|
49
|
+
"breakpoint": [1]
|
|
50
|
+
}]);
|
|
51
|
+
function defineCustomElement() {
|
|
52
|
+
if (typeof customElements === "undefined") {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const components = ["duet-spacer"];
|
|
56
|
+
components.forEach(tagName => { switch (tagName) {
|
|
57
|
+
case "duet-spacer":
|
|
58
|
+
if (!customElements.get(tagName)) {
|
|
59
|
+
customElements.define(tagName, DuetSpacer);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
} });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { DuetSpacer as D, defineCustomElement as d };
|