@duetds/components 4.36.0 → 5.0.1
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 +1143 -983
- package/lib/cjs/duet-action-button.cjs.entry.js +163 -0
- 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 +8 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-collapsible.cjs.entry.js +3 -3
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +4 -4
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/{duet-editable-table_4.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +382 -337
- 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 +7 -7
- 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 +24 -14
- 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 +2 -2
- 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 +2 -2
- package/lib/cjs/{focus-utils-675b1aa3.js → focus-utils-1051dbe3.js} +1 -1
- package/lib/cjs/{index-58eb8f67.js → index-db0781a3.js} +1 -1
- package/lib/cjs/js-utils-be1d29ae.js +39 -0
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{token-utils-05bd23b4.js → token-utils-ac8432d1.js} +10 -7
- package/lib/cjs/{tokens-8596cece.js → tokens-72efc7fd.js} +0 -0
- package/lib/cjs/{tokens.module-6b2df1c2.js → tokens.module-6afcc9c1.js} +0 -0
- package/lib/collection/collection-manifest.json +14 -11
- package/lib/collection/components/duet-action-button/duet-action-button.css +87 -0
- package/lib/collection/components/duet-action-button/duet-action-button.js +489 -0
- package/lib/collection/components/duet-button/duet-button.js +23 -1
- package/lib/collection/components/duet-choice/duet-choice.css +20 -15
- package/lib/collection/components/duet-choice/duet-choice.js +10 -8
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +2 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +2 -57
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +2 -6
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +3 -2
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +20 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +331 -205
- package/lib/collection/components/duet-header/duet-header.css +5 -1
- package/lib/collection/components/duet-header/duet-header.js +4 -3
- package/lib/collection/components/duet-pagination/duet-pagination.css +3 -62
- package/lib/collection/components/duet-pagination/duet-pagination.js +49 -19
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.css +4 -55
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +2 -4
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +5 -1
- package/lib/collection/components/duet-table/duet-table.css +42 -8
- package/lib/collection/components/duet-table/duet-table.js +11 -2
- package/lib/collection/components/duet-upload/duet-upload.css +25 -0
- package/lib/collection/components/duet-upload/duet-upload.js +270 -166
- package/lib/collection/components/duet-upload/upload-validators.js +1 -1
- package/lib/collection/utils/fixture-utils.js +3 -1
- package/lib/collection/utils/js-utils.js +36 -1
- package/lib/collection/utils/token-utils.js +33 -6
- package/lib/custom-elements-bundle/index.d.ts +6 -12
- package/lib/custom-elements-bundle/index.js +1159 -1015
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/p-038f5a76.js +4 -0
- package/lib/duet/{p-aa5abb52.system.entry.js → p-077e9821.system.entry.js} +1 -1
- package/lib/duet/{p-9358e24b.entry.js → p-08f1713b.entry.js} +1 -1
- package/lib/duet/{p-6aa8d848.entry.js → p-0cf96c98.entry.js} +1 -1
- package/lib/duet/p-0ff56acb.system.entry.js +4 -0
- package/lib/duet/p-13302cc8.entry.js +4 -0
- package/lib/duet/{p-a0f979a4.entry.js → p-1630296b.entry.js} +1 -1
- package/lib/duet/{p-818cd527.entry.js → p-1acbc962.entry.js} +1 -1
- package/lib/duet/{p-1afe9641.system.entry.js → p-20dd2c3c.system.entry.js} +1 -1
- package/lib/duet/{p-85d9b1b0.system.js → p-21ab96c0.system.js} +1 -1
- package/lib/duet/{p-e67fc1ed.system.entry.js → p-222c74a9.system.entry.js} +1 -1
- package/lib/duet/{p-5e410fa9.system.entry.js → p-242ba82c.system.entry.js} +1 -1
- package/lib/duet/{p-40360b4a.system.entry.js → p-25fdd6d2.system.entry.js} +1 -1
- package/lib/duet/{p-ddb6344c.system.js → p-268c0abb.system.js} +0 -0
- package/lib/duet/{p-a2db8ff2.system.entry.js → p-26c5cc5a.system.entry.js} +1 -1
- package/lib/duet/{p-4b688aea.entry.js → p-2772bbb1.entry.js} +1 -1
- package/lib/duet/{p-bf25e52a.entry.js → p-28e4253c.entry.js} +1 -1
- package/lib/duet/{p-6df7b78c.entry.js → p-3018d431.entry.js} +1 -1
- package/lib/duet/{p-ad8a49a3.system.entry.js → p-347ffc22.system.entry.js} +1 -1
- package/lib/duet/{p-e9ca7e01.entry.js → p-3651b695.entry.js} +1 -1
- package/lib/duet/{p-4f32cc18.system.entry.js → p-3946058c.system.entry.js} +1 -1
- package/lib/duet/p-3d5a497d.system.entry.js +4 -0
- package/lib/duet/{p-8c0fd5de.js → p-3eed1432.js} +1 -1
- package/lib/duet/{p-44a3794d.system.entry.js → p-41246296.system.entry.js} +1 -1
- package/lib/duet/{p-314b64b4.system.entry.js → p-43204695.system.entry.js} +1 -1
- package/lib/duet/{p-daede773.entry.js → p-440a9c95.entry.js} +1 -1
- package/lib/duet/{p-8b8c2ef4.entry.js → p-44bb7ac8.entry.js} +1 -1
- package/lib/duet/{p-b42066e0.entry.js → p-489d1777.entry.js} +1 -1
- package/lib/duet/{p-2a9345a7.entry.js → p-48cdb48a.entry.js} +1 -1
- package/lib/duet/{p-e584ce1d.entry.js → p-4b72d87e.entry.js} +1 -1
- package/lib/duet/{p-99a112e4.entry.js → p-4be7b036.entry.js} +1 -1
- package/lib/duet/{p-ac44ab7a.entry.js → p-4d300ede.entry.js} +1 -1
- package/lib/duet/{p-8a768d0b.entry.js → p-569ee410.entry.js} +1 -1
- package/lib/duet/{p-84940fc4.system.entry.js → p-56f472b3.system.entry.js} +1 -1
- package/lib/duet/p-5746d88c.js +4 -0
- package/lib/duet/{p-90799d0a.entry.js → p-5a69aed5.entry.js} +1 -1
- package/lib/duet/{p-8db453bf.system.js → p-5cc4b13d.system.js} +1 -1
- package/lib/duet/{p-8706664b.system.entry.js → p-63b70e9d.system.entry.js} +1 -1
- package/lib/duet/p-63c8a2cd.system.entry.js +4 -0
- package/lib/duet/p-6abdc336.entry.js +4 -0
- package/lib/duet/p-6ba556ad.entry.js +4 -0
- package/lib/duet/{p-f993e4c3.system.entry.js → p-6c27e55c.system.entry.js} +1 -1
- package/lib/duet/{p-7730d2b8.entry.js → p-6d3485e0.entry.js} +1 -1
- package/lib/duet/{p-a75776f5.entry.js → p-6f2aec60.entry.js} +1 -1
- package/lib/duet/p-75640b15.entry.js +4 -0
- package/lib/duet/{p-21cd146b.system.entry.js → p-7769f3af.system.entry.js} +1 -1
- package/lib/duet/p-77acbfe4.system.js +4 -0
- package/lib/duet/{p-ad06c91d.system.entry.js → p-7a8cea36.system.entry.js} +1 -1
- package/lib/duet/{p-fa99eaa4.system.js → p-812b0905.system.js} +0 -0
- package/lib/duet/{p-ae82d8e7.entry.js → p-815e5588.entry.js} +1 -1
- package/lib/duet/p-823501e1.system.entry.js +4 -0
- package/lib/duet/p-8e83c0ea.system.entry.js +4 -0
- package/lib/duet/p-92639d0b.system.js +4 -0
- package/lib/duet/{p-22e6615d.system.entry.js → p-93302e3a.system.entry.js} +1 -1
- package/lib/duet/{p-6e6e1b77.system.entry.js → p-94bc746c.system.entry.js} +1 -1
- package/lib/duet/{p-09920da9.entry.js → p-9716f92a.entry.js} +1 -1
- package/lib/duet/{p-9ead1c59.entry.js → p-9a535dd9.entry.js} +1 -1
- package/lib/duet/{p-78779ba1.system.entry.js → p-9cf9c233.system.entry.js} +1 -1
- package/lib/duet/{p-c0a24b5e.system.entry.js → p-a853c03b.system.entry.js} +2 -2
- package/lib/duet/{p-ea124391.system.entry.js → p-ab651bab.system.entry.js} +1 -1
- package/lib/duet/{p-fb55e381.system.entry.js → p-b1d3ee06.system.entry.js} +1 -1
- package/lib/duet/p-b4a3ee75.entry.js +4 -0
- package/lib/duet/{p-b5aaf161.entry.js → p-b4eb216b.entry.js} +1 -1
- package/lib/duet/p-baf1b7ec.system.entry.js +4 -0
- package/lib/duet/{p-7f1cbb7d.entry.js → p-bfd81bd7.entry.js} +1 -1
- package/lib/duet/{p-80aa512a.system.entry.js → p-c0f57d75.system.entry.js} +1 -1
- package/lib/duet/{p-dda7f098.entry.js → p-c3342f8e.entry.js} +1 -1
- package/lib/duet/{p-aebf6700.entry.js → p-ca7fd033.entry.js} +1 -1
- package/lib/duet/{p-0769de2b.system.entry.js → p-cac113fe.system.entry.js} +1 -1
- package/lib/duet/p-cb701a9c.entry.js +4 -0
- package/lib/duet/{p-0349b691.system.entry.js → p-d214b9b2.system.entry.js} +1 -1
- package/lib/duet/{p-b11f2fcd.system.entry.js → p-d2b946cd.system.entry.js} +1 -1
- package/lib/duet/{p-5f4362b4.entry.js → p-d3169bff.entry.js} +1 -1
- package/lib/duet/{p-b6b58d31.entry.js → p-d57ac853.entry.js} +1 -1
- package/lib/duet/{p-59480299.system.entry.js → p-d7263055.system.entry.js} +1 -1
- package/lib/duet/{p-c167a5aa.system.entry.js → p-d7ad9b74.system.entry.js} +1 -1
- package/lib/duet/{p-8143f3de.js → p-d7bc0102.js} +0 -0
- package/lib/duet/{p-d444e178.system.entry.js → p-d81e9ca0.system.entry.js} +1 -1
- package/lib/duet/{p-878c1c83.system.entry.js → p-d8f83ac5.system.entry.js} +1 -1
- package/lib/duet/{p-84a9fbf4.system.entry.js → p-da76095f.system.entry.js} +1 -1
- package/lib/duet/p-dbb4a588.js +4 -0
- package/lib/duet/{p-a8f707d4.system.entry.js → p-e1920232.system.entry.js} +2 -2
- package/lib/duet/{p-1c1c9705.entry.js → p-e4c6b105.entry.js} +1 -1
- package/lib/duet/{p-663aec3a.entry.js → p-e5531f4f.entry.js} +1 -1
- package/lib/duet/p-ea293f60.entry.js +4 -0
- package/lib/duet/{p-95f71b43.system.entry.js → p-eb39b494.system.entry.js} +1 -1
- package/lib/duet/{p-ad07f399.js → p-ed75c8b3.js} +0 -0
- package/lib/duet/{p-fd561872.system.entry.js → p-f20b487a.system.entry.js} +1 -1
- package/lib/duet/{p-1aeb418c.entry.js → p-f7d7ec47.entry.js} +1 -1
- package/lib/duet/p-fa02e479.entry.js +4 -0
- package/lib/duet/p-faf60d2a.entry.js +4 -0
- package/lib/duet/{p-28a22555.system.entry.js → p-fb8ed18e.system.entry.js} +1 -1
- package/lib/duet/p-fea2cbc5.system.js +4 -0
- package/lib/duet/{p-c61ace58.system.entry.js → p-ff3d551a.system.entry.js} +1 -1
- package/lib/duet/{p-bd602c98.entry.js → p-ff7ab8cb.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +159 -0
- 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 +8 -4
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +4 -4
- package/lib/esm/duet-collapsible.entry.js +3 -3
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +4 -4
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/{duet-editable-table_4.entry.js → duet-editable-table_3.entry.js} +384 -338
- 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 +7 -7
- 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 +24 -14
- 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 +2 -2
- 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 +2 -2
- package/lib/esm/{focus-utils-bd3c1702.js → focus-utils-f49312fd.js} +1 -1
- package/lib/esm/{index-49b2d31a.js → index-9526901a.js} +1 -1
- package/lib/esm/js-utils-52e0944c.js +36 -0
- package/lib/esm/loader.js +2 -2
- package/lib/esm/{token-utils-75f78ca4.js → token-utils-e9a0cb88.js} +10 -7
- package/lib/esm/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
- package/lib/esm/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
- package/lib/esm-es5/duet-action-button.entry.js +4 -0
- 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 +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +2 -2
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +4 -0
- 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 +2 -2
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-bd3c1702.js → focus-utils-f49312fd.js} +1 -1
- package/lib/esm-es5/{index-49b2d31a.js → index-9526901a.js} +1 -1
- package/lib/esm-es5/js-utils-52e0944c.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/token-utils-e9a0cb88.js +4 -0
- package/lib/esm-es5/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
- package/lib/esm-es5/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
- package/lib/html.html-data.json +5266 -0
- package/lib/types/components/duet-action-button/duet-action-button.d.ts +112 -0
- package/lib/types/components/duet-button/duet-button.d.ts +4 -0
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +1 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +2 -2
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +106 -48
- package/lib/types/components/duet-header/duet-header.d.ts +1 -0
- package/lib/types/components/duet-pagination/duet-pagination.d.ts +7 -2
- package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +4 -0
- package/lib/types/components/duet-table/duet-table.d.ts +16 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +68 -58
- package/lib/types/components.d.ts +225 -149
- package/lib/types/utils/js-utils.d.ts +2 -0
- package/lib/types/utils/token-utils.d.ts +2 -0
- package/package.json +4 -5
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +0 -96
- package/lib/cjs/js-utils-33a9dbe3.js +0 -16
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +0 -32
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +0 -225
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +0 -36
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +0 -225
- package/lib/duet/p-1b56e483.system.entry.js +0 -4
- package/lib/duet/p-298a9ffc.system.js +0 -4
- package/lib/duet/p-363abf26.system.entry.js +0 -4
- package/lib/duet/p-3c13a041.entry.js +0 -4
- package/lib/duet/p-50b4fb2c.js +0 -4
- package/lib/duet/p-6da8743f.system.entry.js +0 -4
- package/lib/duet/p-72ce134a.entry.js +0 -4
- package/lib/duet/p-78aa974b.system.entry.js +0 -4
- package/lib/duet/p-7e2c06d0.js +0 -4
- package/lib/duet/p-81867417.system.js +0 -4
- package/lib/duet/p-8f56fd3f.entry.js +0 -4
- package/lib/duet/p-8fa952df.entry.js +0 -4
- package/lib/duet/p-9782946f.entry.js +0 -4
- package/lib/duet/p-995f20fc.entry.js +0 -4
- package/lib/duet/p-a154a0c0.entry.js +0 -4
- package/lib/duet/p-a16a58c1.system.js +0 -4
- package/lib/duet/p-abcbdef5.entry.js +0 -4
- package/lib/duet/p-b25d3769.js +0 -4
- package/lib/duet/p-c5db93a7.system.entry.js +0 -4
- package/lib/duet/p-d32b240d.system.entry.js +0 -4
- package/lib/duet/p-fc02d8e9.entry.js +0 -4
- package/lib/esm/duet-editable-table-button.entry.js +0 -92
- package/lib/esm/js-utils-b69f17df.js +0 -14
- package/lib/esm-es5/duet-editable-table-button.entry.js +0 -4
- package/lib/esm-es5/duet-editable-table_4.entry.js +0 -4
- package/lib/esm-es5/js-utils-b69f17df.js +0 -4
- package/lib/esm-es5/token-utils-75f78ca4.js +0 -4
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +0 -73
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +0 -76
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Prop, State } from "@stencil/core";
|
|
5
|
+
import { createID } from "../../utils/create-id";
|
|
6
|
+
import { debounce } from "../../utils/js-utils";
|
|
7
|
+
import { isKeyboardClick } from "../../utils/keyboard-utils";
|
|
8
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
9
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
10
|
+
import { getColorByName } from "../../utils/token-utils";
|
|
11
|
+
/**
|
|
12
|
+
* Slot: default slot inside an invisible element, this can be used to enhance accessibility
|
|
13
|
+
* Part: button this part enables style overrides for the button
|
|
14
|
+
* Part: icon this part enables style overrides for the icon
|
|
15
|
+
*/
|
|
16
|
+
export class DuetActionButton {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.numbersStore = "";
|
|
19
|
+
/**
|
|
20
|
+
* Theme of the pagination.
|
|
21
|
+
*/
|
|
22
|
+
this.theme = "";
|
|
23
|
+
/**
|
|
24
|
+
* Name of the icon to display
|
|
25
|
+
*/
|
|
26
|
+
this.iconName = "action-arrow-left-small";
|
|
27
|
+
/**
|
|
28
|
+
* Color of the icon to display
|
|
29
|
+
*/
|
|
30
|
+
this.iconColor = "currentColor";
|
|
31
|
+
/**
|
|
32
|
+
* Size of the icon
|
|
33
|
+
*/
|
|
34
|
+
this.iconSize = "xx-small";
|
|
35
|
+
/**
|
|
36
|
+
* Name of action being called
|
|
37
|
+
*/
|
|
38
|
+
this.actionName = "default-action";
|
|
39
|
+
/**
|
|
40
|
+
* Name of id of action that was called being called
|
|
41
|
+
*/
|
|
42
|
+
this.actionId = undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Name of id of action that was called being called
|
|
45
|
+
*/
|
|
46
|
+
this.actionMeta = undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Disables the button
|
|
49
|
+
*/
|
|
50
|
+
this.disabled = false;
|
|
51
|
+
/**
|
|
52
|
+
* Custom color to be used for the icon, as a design token entered in camelCase
|
|
53
|
+
* or kebab-case. Example: "color-primary". This property can also be set to
|
|
54
|
+
* "currentColor" which forces the icon to use the CSS text color of parent
|
|
55
|
+
* element instead. Useful when you want to control the color in stylesheet
|
|
56
|
+
* instead.
|
|
57
|
+
*/
|
|
58
|
+
this.color = "";
|
|
59
|
+
/**
|
|
60
|
+
* Custom color to be used for a background, as a design token entered
|
|
61
|
+
* in camelCase or kebab-case. Using this option the icon will always be resized
|
|
62
|
+
* to $size-icon-medium on mobile viewports. Example: "color-primary".
|
|
63
|
+
*/
|
|
64
|
+
this.background = "";
|
|
65
|
+
/**
|
|
66
|
+
* Described By id
|
|
67
|
+
*/
|
|
68
|
+
this.ariaDescribedBy = undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Aria description the button
|
|
71
|
+
*/
|
|
72
|
+
this.ariaDescription = undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Default pagination labels
|
|
75
|
+
*/
|
|
76
|
+
this.ariaLabelsDefaults = {
|
|
77
|
+
en: {
|
|
78
|
+
label: "Click to activate action",
|
|
79
|
+
},
|
|
80
|
+
fi: {
|
|
81
|
+
label: "Klikkaa toiminnon aktivointiin",
|
|
82
|
+
},
|
|
83
|
+
sv: {
|
|
84
|
+
label: "Klicka för att aktivera åtgärd",
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Default pagination labels
|
|
89
|
+
*/
|
|
90
|
+
this.ariaLabels = getLocaleString(this.ariaLabelsDefaults);
|
|
91
|
+
/**
|
|
92
|
+
* Used to indicate which dom element with ID this element controls
|
|
93
|
+
*/
|
|
94
|
+
this.ariaControls = "";
|
|
95
|
+
this.listId = createID("duet-action-button");
|
|
96
|
+
/**
|
|
97
|
+
* Private methods.
|
|
98
|
+
*/
|
|
99
|
+
//helper to emit relevant page events
|
|
100
|
+
this.emitPageEvent = debounce(e => {
|
|
101
|
+
this.duetActionEvent.emit({
|
|
102
|
+
component: "duet-action-button",
|
|
103
|
+
originalEvent: e,
|
|
104
|
+
action: this.actionId,
|
|
105
|
+
name: this.actionName,
|
|
106
|
+
meta: this.actionMeta,
|
|
107
|
+
id: this.listId,
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
//handle a11y keyboard navigation events
|
|
112
|
+
async onKeyboardDown(e) {
|
|
113
|
+
if (isKeyboardClick(e)) {
|
|
114
|
+
this.emitPageEvent(e);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//set update current when mouse click on page number
|
|
118
|
+
async onMouseHandler(e) {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
this.duetActionEvent.emit({
|
|
121
|
+
component: "duet-action-button",
|
|
122
|
+
originalEvent: e,
|
|
123
|
+
action: this.actionName,
|
|
124
|
+
id: this.actionId,
|
|
125
|
+
meta: this.actionMeta,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Component lifecycle events.
|
|
130
|
+
*/
|
|
131
|
+
componentWillLoad() {
|
|
132
|
+
inheritGlobalTheme(this);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* render() function
|
|
136
|
+
* Always the last one in the class.
|
|
137
|
+
*/
|
|
138
|
+
render() {
|
|
139
|
+
const color = this.color === "currentColor" ? "currentColor" : getColorByName(this.color, this.theme);
|
|
140
|
+
const styles = {
|
|
141
|
+
color,
|
|
142
|
+
background: getColorByName(this.background, this.theme),
|
|
143
|
+
"border-color": getColorByName(this.iconColor, this.theme),
|
|
144
|
+
"border-width": "1px",
|
|
145
|
+
"border-style": "solid",
|
|
146
|
+
};
|
|
147
|
+
return (h(Host, { onKeyDown: e => this.onKeyboardDown(e) },
|
|
148
|
+
h("button", { part: "button", style: styles, disabled: this.disabled, id: this.listId, class: {
|
|
149
|
+
"duet-action-button": true,
|
|
150
|
+
"duet-action-button--disabled": this.disabled,
|
|
151
|
+
[`duet-action-button--${this.theme}`]: this.theme !== "",
|
|
152
|
+
}, type: "button", onClick: e => this.onMouseHandler(e), "aria-label": this.ariaLabels.label, "aria-description": this.ariaDescription, "aria-describedby": this.ariaDescribedBy, "aria-controls": this.ariaControls },
|
|
153
|
+
h("duet-icon", { part: "icon", name: this.iconName, color: this.iconColor, margin: "none", size: this.iconSize }),
|
|
154
|
+
h("duet-visually-hidden", null,
|
|
155
|
+
h("slot", null)))));
|
|
156
|
+
}
|
|
157
|
+
static get is() { return "duet-action-button"; }
|
|
158
|
+
static get encapsulation() { return "shadow"; }
|
|
159
|
+
static get originalStyleUrls() { return {
|
|
160
|
+
"$": ["duet-action-button.scss"]
|
|
161
|
+
}; }
|
|
162
|
+
static get styleUrls() { return {
|
|
163
|
+
"$": ["duet-action-button.css"]
|
|
164
|
+
}; }
|
|
165
|
+
static get properties() { return {
|
|
166
|
+
"theme": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"mutable": true,
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "DuetTheme",
|
|
171
|
+
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
172
|
+
"references": {
|
|
173
|
+
"DuetTheme": {
|
|
174
|
+
"location": "import",
|
|
175
|
+
"path": "../../common-types"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Theme of the pagination."
|
|
184
|
+
},
|
|
185
|
+
"attribute": "theme",
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"defaultValue": "\"\""
|
|
188
|
+
},
|
|
189
|
+
"iconName": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "string",
|
|
194
|
+
"resolved": "string",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "Name of the icon to display"
|
|
202
|
+
},
|
|
203
|
+
"attribute": "icon-name",
|
|
204
|
+
"reflect": false,
|
|
205
|
+
"defaultValue": "\"action-arrow-left-small\""
|
|
206
|
+
},
|
|
207
|
+
"iconColor": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "string",
|
|
212
|
+
"resolved": "string",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": false,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": "Color of the icon to display"
|
|
220
|
+
},
|
|
221
|
+
"attribute": "icon-color",
|
|
222
|
+
"reflect": false,
|
|
223
|
+
"defaultValue": "\"currentColor\""
|
|
224
|
+
},
|
|
225
|
+
"iconSize": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "DuetActionButtonIconSize",
|
|
230
|
+
"resolved": "\"small\" | \"x-small\" | \"xx-small\"",
|
|
231
|
+
"references": {
|
|
232
|
+
"DuetActionButtonIconSize": {
|
|
233
|
+
"location": "local"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"required": false,
|
|
238
|
+
"optional": false,
|
|
239
|
+
"docs": {
|
|
240
|
+
"tags": [],
|
|
241
|
+
"text": "Size of the icon"
|
|
242
|
+
},
|
|
243
|
+
"attribute": "icon-size",
|
|
244
|
+
"reflect": false,
|
|
245
|
+
"defaultValue": "\"xx-small\""
|
|
246
|
+
},
|
|
247
|
+
"actionName": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"mutable": false,
|
|
250
|
+
"complexType": {
|
|
251
|
+
"original": "string",
|
|
252
|
+
"resolved": "string",
|
|
253
|
+
"references": {}
|
|
254
|
+
},
|
|
255
|
+
"required": false,
|
|
256
|
+
"optional": false,
|
|
257
|
+
"docs": {
|
|
258
|
+
"tags": [],
|
|
259
|
+
"text": "Name of action being called"
|
|
260
|
+
},
|
|
261
|
+
"attribute": "action-name",
|
|
262
|
+
"reflect": false,
|
|
263
|
+
"defaultValue": "\"default-action\""
|
|
264
|
+
},
|
|
265
|
+
"actionId": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"mutable": false,
|
|
268
|
+
"complexType": {
|
|
269
|
+
"original": "string",
|
|
270
|
+
"resolved": "string",
|
|
271
|
+
"references": {}
|
|
272
|
+
},
|
|
273
|
+
"required": false,
|
|
274
|
+
"optional": false,
|
|
275
|
+
"docs": {
|
|
276
|
+
"tags": [],
|
|
277
|
+
"text": "Name of id of action that was called being called"
|
|
278
|
+
},
|
|
279
|
+
"attribute": "action-id",
|
|
280
|
+
"reflect": false,
|
|
281
|
+
"defaultValue": "undefined"
|
|
282
|
+
},
|
|
283
|
+
"actionMeta": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"mutable": false,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "Record<any, any> | string",
|
|
288
|
+
"resolved": "string | { [x: string]: any; }",
|
|
289
|
+
"references": {
|
|
290
|
+
"Record": {
|
|
291
|
+
"location": "global"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": false,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": "Name of id of action that was called being called"
|
|
300
|
+
},
|
|
301
|
+
"attribute": "action-meta",
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "undefined"
|
|
304
|
+
},
|
|
305
|
+
"disabled": {
|
|
306
|
+
"type": "boolean",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "boolean",
|
|
310
|
+
"resolved": "boolean",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": "Disables the button"
|
|
318
|
+
},
|
|
319
|
+
"attribute": "disabled",
|
|
320
|
+
"reflect": false,
|
|
321
|
+
"defaultValue": "false"
|
|
322
|
+
},
|
|
323
|
+
"color": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "DuetColor",
|
|
328
|
+
"resolved": "string",
|
|
329
|
+
"references": {
|
|
330
|
+
"DuetColor": {
|
|
331
|
+
"location": "import",
|
|
332
|
+
"path": "../../common-types"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"required": false,
|
|
337
|
+
"optional": false,
|
|
338
|
+
"docs": {
|
|
339
|
+
"tags": [],
|
|
340
|
+
"text": "Custom color to be used for the icon, as a design token entered in camelCase\nor kebab-case. Example: \"color-primary\". This property can also be set to\n\"currentColor\" which forces the icon to use the CSS text color of parent\nelement instead. Useful when you want to control the color in stylesheet\ninstead."
|
|
341
|
+
},
|
|
342
|
+
"attribute": "color",
|
|
343
|
+
"reflect": true,
|
|
344
|
+
"defaultValue": "\"\""
|
|
345
|
+
},
|
|
346
|
+
"background": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"mutable": false,
|
|
349
|
+
"complexType": {
|
|
350
|
+
"original": "DuetColor",
|
|
351
|
+
"resolved": "string",
|
|
352
|
+
"references": {
|
|
353
|
+
"DuetColor": {
|
|
354
|
+
"location": "import",
|
|
355
|
+
"path": "../../common-types"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": false,
|
|
360
|
+
"optional": false,
|
|
361
|
+
"docs": {
|
|
362
|
+
"tags": [],
|
|
363
|
+
"text": "Custom color to be used for a background, as a design token entered\nin camelCase or kebab-case. Using this option the icon will always be resized\nto $size-icon-medium on mobile viewports. Example: \"color-primary\"."
|
|
364
|
+
},
|
|
365
|
+
"attribute": "background",
|
|
366
|
+
"reflect": false,
|
|
367
|
+
"defaultValue": "\"\""
|
|
368
|
+
},
|
|
369
|
+
"ariaDescribedBy": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"mutable": false,
|
|
372
|
+
"complexType": {
|
|
373
|
+
"original": "string",
|
|
374
|
+
"resolved": "string",
|
|
375
|
+
"references": {}
|
|
376
|
+
},
|
|
377
|
+
"required": false,
|
|
378
|
+
"optional": false,
|
|
379
|
+
"docs": {
|
|
380
|
+
"tags": [],
|
|
381
|
+
"text": "Described By id"
|
|
382
|
+
},
|
|
383
|
+
"attribute": "accessible-described-by",
|
|
384
|
+
"reflect": false,
|
|
385
|
+
"defaultValue": "undefined"
|
|
386
|
+
},
|
|
387
|
+
"ariaDescription": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"mutable": false,
|
|
390
|
+
"complexType": {
|
|
391
|
+
"original": "string",
|
|
392
|
+
"resolved": "string",
|
|
393
|
+
"references": {}
|
|
394
|
+
},
|
|
395
|
+
"required": false,
|
|
396
|
+
"optional": false,
|
|
397
|
+
"docs": {
|
|
398
|
+
"tags": [],
|
|
399
|
+
"text": "Aria description the button"
|
|
400
|
+
},
|
|
401
|
+
"attribute": "accessible-description",
|
|
402
|
+
"reflect": false,
|
|
403
|
+
"defaultValue": "undefined"
|
|
404
|
+
},
|
|
405
|
+
"ariaLabelsDefaults": {
|
|
406
|
+
"type": "unknown",
|
|
407
|
+
"mutable": false,
|
|
408
|
+
"complexType": {
|
|
409
|
+
"original": "DuetLangObject",
|
|
410
|
+
"resolved": "DuetLangObject",
|
|
411
|
+
"references": {
|
|
412
|
+
"DuetLangObject": {
|
|
413
|
+
"location": "import",
|
|
414
|
+
"path": "../../utils/language-utils"
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"required": false,
|
|
419
|
+
"optional": false,
|
|
420
|
+
"docs": {
|
|
421
|
+
"tags": [],
|
|
422
|
+
"text": "Default pagination labels"
|
|
423
|
+
},
|
|
424
|
+
"defaultValue": "{\n en: {\n label: \"Click to activate action\",\n },\n fi: {\n label: \"Klikkaa toiminnon aktivointiin\",\n },\n sv: {\n label: \"Klicka f\u00F6r att aktivera \u00E5tg\u00E4rd\",\n },\n }"
|
|
425
|
+
},
|
|
426
|
+
"ariaLabels": {
|
|
427
|
+
"type": "unknown",
|
|
428
|
+
"mutable": false,
|
|
429
|
+
"complexType": {
|
|
430
|
+
"original": "Record<string, string>",
|
|
431
|
+
"resolved": "{ [x: string]: string; }",
|
|
432
|
+
"references": {
|
|
433
|
+
"Record": {
|
|
434
|
+
"location": "global"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"required": false,
|
|
439
|
+
"optional": false,
|
|
440
|
+
"docs": {
|
|
441
|
+
"tags": [],
|
|
442
|
+
"text": "Default pagination labels"
|
|
443
|
+
},
|
|
444
|
+
"defaultValue": "getLocaleString(\n this.ariaLabelsDefaults\n )"
|
|
445
|
+
},
|
|
446
|
+
"ariaControls": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"mutable": false,
|
|
449
|
+
"complexType": {
|
|
450
|
+
"original": "string",
|
|
451
|
+
"resolved": "string",
|
|
452
|
+
"references": {}
|
|
453
|
+
},
|
|
454
|
+
"required": false,
|
|
455
|
+
"optional": false,
|
|
456
|
+
"docs": {
|
|
457
|
+
"tags": [],
|
|
458
|
+
"text": "Used to indicate which dom element with ID this element controls"
|
|
459
|
+
},
|
|
460
|
+
"attribute": "accessible-controls",
|
|
461
|
+
"reflect": false,
|
|
462
|
+
"defaultValue": "\"\""
|
|
463
|
+
}
|
|
464
|
+
}; }
|
|
465
|
+
static get states() { return {
|
|
466
|
+
"numbersStore": {}
|
|
467
|
+
}; }
|
|
468
|
+
static get events() { return [{
|
|
469
|
+
"method": "duetActionEvent",
|
|
470
|
+
"name": "duetActionEvent",
|
|
471
|
+
"bubbles": true,
|
|
472
|
+
"cancelable": false,
|
|
473
|
+
"composed": true,
|
|
474
|
+
"docs": {
|
|
475
|
+
"tags": [],
|
|
476
|
+
"text": "Emitted a page selection has been made"
|
|
477
|
+
},
|
|
478
|
+
"complexType": {
|
|
479
|
+
"original": "DuetActionButtonEvent",
|
|
480
|
+
"resolved": "{ originalEvent?: Event; component: \"duet-action-button\"; action: string; name?: string; id?: string; index?: string; meta?: string | Record<any, any>; }",
|
|
481
|
+
"references": {
|
|
482
|
+
"DuetActionButtonEvent": {
|
|
483
|
+
"location": "local"
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}]; }
|
|
488
|
+
static get elementRef() { return "element"; }
|
|
489
|
+
}
|
|
@@ -8,6 +8,10 @@ import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
|
8
8
|
import { getColorByName } from "../../utils/token-utils";
|
|
9
9
|
export class DuetButton {
|
|
10
10
|
constructor() {
|
|
11
|
+
/**
|
|
12
|
+
* Use this property to add an aria-haspopup attribute to a button, if you are using it as a menu button.
|
|
13
|
+
*/
|
|
14
|
+
this.accessiblePopup = "false";
|
|
11
15
|
/**
|
|
12
16
|
* Loading state of the button
|
|
13
17
|
*/
|
|
@@ -237,7 +241,7 @@ export class DuetButton {
|
|
|
237
241
|
commonChildren,
|
|
238
242
|
this.external && h("duet-visually-hidden", null,
|
|
239
243
|
", ",
|
|
240
|
-
this.accessibleLabelExternal))) : (h("button", Object.assign({}, commonProps, { type: this.getButtonType(), disabled: this.disabled, name: this.name, value: this.value, "aria-pressed": this.accessiblePressed != null ? this.accessiblePressed.toString() : undefined }), commonChildren)),
|
|
244
|
+
this.accessibleLabelExternal))) : (h("button", Object.assign({}, commonProps, { type: this.getButtonType(), disabled: this.disabled, name: this.name, value: this.value, "aria-pressed": this.accessiblePressed != null ? this.accessiblePressed.toString() : undefined, "aria-haspopup": this.accessiblePopup != null ? this.accessiblePopup.toString() : undefined }), commonChildren)),
|
|
241
245
|
this.loading && h("duet-spinner", { color: "currentColor" }))));
|
|
242
246
|
}
|
|
243
247
|
static get is() { return "duet-button"; }
|
|
@@ -283,6 +287,24 @@ export class DuetButton {
|
|
|
283
287
|
"attribute": "accessible-controls",
|
|
284
288
|
"reflect": false
|
|
285
289
|
},
|
|
290
|
+
"accessiblePopup": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"mutable": false,
|
|
293
|
+
"complexType": {
|
|
294
|
+
"original": "string",
|
|
295
|
+
"resolved": "string",
|
|
296
|
+
"references": {}
|
|
297
|
+
},
|
|
298
|
+
"required": false,
|
|
299
|
+
"optional": false,
|
|
300
|
+
"docs": {
|
|
301
|
+
"tags": [],
|
|
302
|
+
"text": "Use this property to add an aria-haspopup attribute to a button, if you are using it as a menu button."
|
|
303
|
+
},
|
|
304
|
+
"attribute": "accessible-popup",
|
|
305
|
+
"reflect": false,
|
|
306
|
+
"defaultValue": "\"false\""
|
|
307
|
+
},
|
|
286
308
|
"accessibleActiveDescendant": {
|
|
287
309
|
"type": "string",
|
|
288
310
|
"mutable": false,
|
|
@@ -107,19 +107,30 @@
|
|
|
107
107
|
user-select: none;
|
|
108
108
|
position: relative;
|
|
109
109
|
z-index: 100;
|
|
110
|
-
display:
|
|
110
|
+
display: flex;
|
|
111
|
+
gap: 1rem;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: flex-start;
|
|
111
114
|
width: 100%;
|
|
112
|
-
|
|
115
|
+
height: 100%;
|
|
116
|
+
min-height: 3.875rem;
|
|
117
|
+
padding: 1rem;
|
|
113
118
|
font-size: 1rem;
|
|
114
119
|
font-weight: 600;
|
|
115
120
|
text-decoration: none;
|
|
121
|
+
word-break: break-word;
|
|
116
122
|
cursor: pointer;
|
|
117
123
|
border: 2px solid #e1e3e6;
|
|
118
124
|
border-radius: 4px;
|
|
119
125
|
transition: background-color 150ms ease;
|
|
120
126
|
}
|
|
127
|
+
.duet-choice-label > div:last-child {
|
|
128
|
+
flex: 1;
|
|
129
|
+
align-self: flex-start;
|
|
130
|
+
justify-self: flex-end;
|
|
131
|
+
margin-top: 0.25rem;
|
|
132
|
+
}
|
|
121
133
|
.has-info .duet-choice-label {
|
|
122
|
-
padding-right: 110px;
|
|
123
134
|
border-top-right-radius: 0;
|
|
124
135
|
border-bottom-right-radius: 0;
|
|
125
136
|
}
|
|
@@ -152,9 +163,6 @@
|
|
|
152
163
|
opacity: 0.75;
|
|
153
164
|
transition: none !important;
|
|
154
165
|
}
|
|
155
|
-
.has-icon .duet-choice-label {
|
|
156
|
-
padding-left: 48px;
|
|
157
|
-
}
|
|
158
166
|
.checked .duet-choice-label {
|
|
159
167
|
color: #0077b3 !important;
|
|
160
168
|
background: #f3f9fc;
|
|
@@ -227,11 +235,10 @@ input[disabled] + .duet-choice-label .duet-checkmark {
|
|
|
227
235
|
}
|
|
228
236
|
|
|
229
237
|
.duet-checkmark-container {
|
|
230
|
-
position:
|
|
231
|
-
top: 17.7777777778px;
|
|
232
|
-
right: 16px;
|
|
238
|
+
position: relative;
|
|
233
239
|
width: 20px;
|
|
234
240
|
height: 20px;
|
|
241
|
+
margin-left: auto;
|
|
235
242
|
border: 1px solid #909599;
|
|
236
243
|
border-radius: 4px;
|
|
237
244
|
transition: border 300ms ease;
|
|
@@ -299,10 +306,7 @@ input[disabled] + .duet-choice-label .duet-checkmark {
|
|
|
299
306
|
}
|
|
300
307
|
}
|
|
301
308
|
.duet-choice-card-icon {
|
|
302
|
-
position:
|
|
303
|
-
top: 50%;
|
|
304
|
-
left: 16px;
|
|
305
|
-
transform: translateY(-50%);
|
|
309
|
+
position: relative;
|
|
306
310
|
}
|
|
307
311
|
.duet-choice-card-icon duet-icon {
|
|
308
312
|
display: block;
|
|
@@ -374,9 +378,10 @@ input[disabled] + .duet-choice-label .duet-checkmark {
|
|
|
374
378
|
.duet-choice-info-toggle {
|
|
375
379
|
display: flex;
|
|
376
380
|
flex-shrink: 0;
|
|
381
|
+
align-items: flex-start;
|
|
377
382
|
justify-content: center;
|
|
378
383
|
width: 57.6px;
|
|
379
|
-
padding-top:
|
|
384
|
+
padding-top: 1.25rem;
|
|
380
385
|
cursor: pointer;
|
|
381
386
|
background: white;
|
|
382
387
|
border: 2px solid #e1e3e6;
|
|
@@ -388,7 +393,7 @@ input[disabled] + .duet-choice-label .duet-checkmark {
|
|
|
388
393
|
}
|
|
389
394
|
.duet-choice-info-toggle[aria-expanded=true] {
|
|
390
395
|
background: #f5f8fa;
|
|
391
|
-
border-bottom:
|
|
396
|
+
border-bottom-color: transparent;
|
|
392
397
|
border-bottom-right-radius: 0;
|
|
393
398
|
}
|
|
394
399
|
.duet-choice-info-toggle[disabled] {
|
|
@@ -291,14 +291,16 @@ export class DuetChoice {
|
|
|
291
291
|
h("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick },
|
|
292
292
|
this.icon && (h("div", { class: "duet-choice-card-icon" },
|
|
293
293
|
h("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
h("
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
h("
|
|
300
|
-
|
|
301
|
-
|
|
294
|
+
h("div", null,
|
|
295
|
+
h("div", null, this.label),
|
|
296
|
+
this.caption && (h("div", null,
|
|
297
|
+
h("duet-spacer", { size: "xx-small" }),
|
|
298
|
+
h("duet-caption", { margin: "none", selected: this.checked }, this.caption))),
|
|
299
|
+
this.hasAdditional && (h("div", null,
|
|
300
|
+
h("duet-spacer", { size: "xx-small" }),
|
|
301
|
+
h("slot", { name: "additional" })))),
|
|
302
|
+
h("div", null,
|
|
303
|
+
h("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && h("div", { class: "duet-checkmark" }))))),
|
|
302
304
|
this.hasInfo && !this.collapsible && (h("button", { ref: button => (this.infoButtonEl = button), id: this.infoButtonId, class: {
|
|
303
305
|
"duet-choice-info-toggle": true,
|
|
304
306
|
"duet-theme-turva": this.theme === "turva",
|
|
@@ -10,6 +10,7 @@ import { sanitizeString } from "../../utils/string-utils";
|
|
|
10
10
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
11
11
|
/**
|
|
12
12
|
* @part duet-collapsible-heading-content - piercing selector for styling the heading content
|
|
13
|
+
* @part duet-collapsible-content - piercing selector for styling the content
|
|
13
14
|
*/
|
|
14
15
|
export class DuetCollapsible {
|
|
15
16
|
constructor() {
|
|
@@ -132,7 +133,7 @@ export class DuetCollapsible {
|
|
|
132
133
|
h("div", { class: "duet-collapsible-heading-icon" },
|
|
133
134
|
h("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: icon.svg })),
|
|
134
135
|
h("div", { class: "duet-collapsible-heading-content", part: "duet-collapsible-heading-content" }, this.heading)),
|
|
135
|
-
h("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" } },
|
|
136
|
+
h("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" }, part: "duet-collapsible-content" },
|
|
136
137
|
h("slot", null))));
|
|
137
138
|
}
|
|
138
139
|
static get is() { return "duet-collapsible"; }
|