@duetds/components 4.32.0 → 4.34.0
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 +2367 -244
- package/lib/cjs/{dom-a28e5c5f.js → dom-52a4f07a.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +2 -2
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +18 -11
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +39 -18
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -450
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +7 -7
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +96 -0
- package/lib/cjs/duet-editable-table_4.cjs.entry.js +1520 -0
- 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 +3 -3
- package/lib/cjs/duet-grid_2.cjs.entry.js +69 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +216 -49
- package/lib/cjs/duet-hero.cjs.entry.js +2 -2
- package/lib/cjs/duet-icon.cjs.entry.js +8 -6
- package/lib/cjs/duet-input_2.cjs.entry.js +8 -9
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-modal.cjs.entry.js +3 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
- package/lib/cjs/duet-progress.cjs.entry.js +75 -0
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
- package/lib/cjs/duet-select.cjs.entry.js +5 -5
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
- package/lib/cjs/duet-tray.cjs.entry.js +3 -3
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +100 -0
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +4 -4
- package/lib/cjs/{focus-utils-55b5a616.js → focus-utils-480ea4e0.js} +1 -1
- package/lib/cjs/form-search-d61b2843.js +8 -0
- package/lib/cjs/{index-03ed1f55.js → index-6966a494.js} +5 -2
- package/lib/cjs/{language-utils-48b8860b.js → language-utils-aa282901.js} +6 -2
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-6560c90c.js → shadow-css-e1b62a99.js} +9 -10
- package/lib/cjs/token-utils-05bd23b4.js +77 -0
- package/lib/cjs/tokens-8596cece.js +459 -0
- package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
- package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
- package/lib/collection/collection-manifest.json +17 -3
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.js +94 -21
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +4 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +9 -9
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +225 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +225 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +404 -0
- package/lib/collection/components/duet-footer/duet-footer.css +1 -0
- package/lib/collection/components/duet-grid/duet-grid.js +74 -6
- package/lib/collection/components/duet-header/duet-header-dropdown.js +27 -0
- package/lib/collection/components/duet-header/duet-header-hamburger.js +9 -0
- package/lib/collection/components/duet-header/duet-header-icon.js +9 -0
- package/lib/collection/components/duet-header/duet-header.css +272 -39
- package/lib/collection/components/duet-header/duet-header.js +310 -122
- package/lib/collection/components/duet-heading/duet-heading.css +3 -0
- package/lib/collection/components/duet-heading/duet-heading.js +7 -6
- package/lib/collection/components/duet-icon/duet-icon.js +5 -3
- package/lib/collection/components/duet-input/duet-input.css +15 -0
- package/lib/collection/components/duet-input/duet-input.js +4 -4
- package/lib/collection/components/duet-link/duet-link.js +4 -1
- package/lib/collection/components/duet-list-item/duet-list-item.css +1 -1
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.css +4 -3
- package/lib/collection/components/duet-paragraph/duet-paragraph.css +6 -0
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
- package/lib/collection/components/duet-progress/duet-progress.css +103 -0
- package/lib/collection/components/duet-progress/duet-progress.js +240 -0
- package/lib/collection/components/duet-select/duet-select.css +15 -0
- package/lib/collection/components/duet-select/duet-select.js +3 -3
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
- package/lib/collection/components/duet-table/duet-table.css +42 -17
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-textarea/duet-textarea.css +19 -0
- package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
- package/lib/collection/components/duet-upload/duet-upload.css +64 -0
- package/lib/collection/components/duet-upload/duet-upload.js +1885 -0
- package/lib/collection/components/duet-upload/errorcodes.utils.js +32 -0
- package/lib/collection/components/duet-upload/mock.helpers.js +91 -0
- package/lib/collection/components/duet-upload/upload-editable-item-error.js +16 -0
- package/lib/collection/components/duet-upload/upload-editable-item-inprogres.js +8 -0
- package/lib/collection/components/duet-upload/upload-editable-item-success.js +30 -0
- package/lib/collection/components/duet-upload/upload-validators.js +93 -0
- package/lib/collection/components/duet-upload/upload.helpers.js +13 -0
- package/lib/collection/components/duet-upload/xhr.helpers.js +30 -0
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +217 -0
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +6 -3
- package/lib/collection/utils/template-utils.js +33 -0
- package/lib/collection/utils/token-utils.js +67 -14
- package/lib/collection/utils/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +36 -0
- package/lib/custom-elements-bundle/index.js +2309 -334
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-92103298.system.entry.js → p-07f43530.system.entry.js} +1 -1
- package/lib/duet/{p-cc0bd28f.system.entry.js → p-093bca2f.system.entry.js} +1 -1
- package/lib/duet/{p-a678da8c.entry.js → p-0aaf86ba.entry.js} +1 -1
- package/lib/duet/{p-94a5fd74.system.entry.js → p-0b0a05ed.system.entry.js} +1 -1
- package/lib/duet/{p-00eac879.system.entry.js → p-0be1c660.system.entry.js} +1 -1
- package/lib/duet/{p-3b3bac3f.system.entry.js → p-0d66e11b.system.entry.js} +1 -1
- package/lib/duet/{p-7331f2fe.system.entry.js → p-0de430e1.system.entry.js} +1 -1
- package/lib/duet/{p-3618aaee.entry.js → p-0ef8d711.entry.js} +1 -1
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/{p-c19094dd.entry.js → p-12a08d77.entry.js} +1 -1
- package/lib/duet/p-15c9a17c.entry.js +4 -0
- package/lib/duet/{p-9cdd361e.js → p-183726f7.js} +0 -0
- package/lib/duet/{p-b75c5f13.entry.js → p-18c3eb54.entry.js} +1 -1
- package/lib/duet/{p-9542c540.entry.js → p-1b591fa4.entry.js} +1 -1
- package/lib/duet/{p-f364ce8b.system.entry.js → p-1bd0f4eb.system.entry.js} +1 -1
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/p-27bd8744.system.entry.js +4 -0
- package/lib/duet/p-289a31cb.entry.js +4 -0
- package/lib/duet/{p-8c511832.system.entry.js → p-29b352db.system.entry.js} +1 -1
- package/lib/duet/p-2a00f231.system.entry.js +4 -0
- package/lib/duet/p-3215e07e.system.entry.js +4 -0
- package/lib/duet/{p-ed479d09.system.entry.js → p-338b9955.system.entry.js} +1 -1
- package/lib/duet/{p-8740fa38.entry.js → p-33de1029.entry.js} +1 -1
- package/lib/duet/p-34ebff3b.entry.js +4 -0
- package/lib/duet/{p-b6a0caf8.system.entry.js → p-379d416f.system.entry.js} +1 -1
- package/lib/duet/{p-0b9b6393.entry.js → p-39a12eb9.entry.js} +1 -1
- package/lib/duet/{p-8652a7ab.system.entry.js → p-39fd8b43.system.entry.js} +1 -1
- package/lib/duet/{p-ffc2ffff.entry.js → p-3bafdf7c.entry.js} +1 -1
- package/lib/duet/{p-4fcbcecd.system.entry.js → p-3c1ce7e2.system.entry.js} +1 -1
- package/lib/duet/p-3da6b84e.entry.js +4 -0
- package/lib/duet/p-43c49a72.entry.js +4 -0
- package/lib/duet/{p-9f0f5674.entry.js → p-44f4b8ff.entry.js} +1 -1
- package/lib/duet/{p-b0bbbdba.system.entry.js → p-4c5ac0c2.system.entry.js} +1 -1
- package/lib/duet/p-50b4fb2c.js +4 -0
- package/lib/duet/p-51f7ae72.entry.js +4 -0
- package/lib/duet/p-52621211.js +15 -0
- package/lib/duet/{p-2a3411b5.system.entry.js → p-5443c9ca.system.entry.js} +1 -1
- package/lib/duet/{p-abd3bfb4.system.entry.js → p-5610db77.system.entry.js} +1 -1
- package/lib/duet/{p-2c0dd9ba.system.entry.js → p-5b409bfb.system.entry.js} +1 -1
- package/lib/duet/{p-807b2087.entry.js → p-6353407f.entry.js} +1 -1
- package/lib/duet/{p-a89e88a3.js → p-64bf94ee.js} +1 -1
- package/lib/duet/{p-2c679963.entry.js → p-64e915ae.entry.js} +1 -1
- package/lib/duet/{p-432ba72e.system.entry.js → p-6c237f21.system.entry.js} +1 -1
- package/lib/duet/p-6c8521f6.system.entry.js +4 -0
- package/lib/duet/{p-a962c8c1.system.js → p-6e4fd6ba.system.js} +0 -0
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/{p-8002a095.entry.js → p-7347f4ac.entry.js} +1 -1
- package/lib/duet/{p-d13874cb.entry.js → p-781bd6db.entry.js} +1 -1
- package/lib/duet/{p-5a817929.system.entry.js → p-78e8a689.system.entry.js} +1 -1
- package/lib/duet/p-8143f3de.js +4 -0
- package/lib/duet/p-81e855e4.system.js +4 -0
- package/lib/duet/{p-84ece735.entry.js → p-8224d768.entry.js} +1 -1
- package/lib/duet/{p-43dde575.system.entry.js → p-848bb1c2.system.entry.js} +1 -1
- package/lib/duet/{p-1391ec53.entry.js → p-880a4afe.entry.js} +1 -1
- package/lib/duet/p-8c375429.entry.js +4 -0
- package/lib/duet/p-8cb71174.system.entry.js +4 -0
- package/lib/duet/p-8d7b68c4.entry.js +4 -0
- package/lib/duet/p-8f477bd6.system.js +4 -0
- package/lib/duet/p-969c6395.system.entry.js +4 -0
- package/lib/duet/p-9c234242.system.entry.js +4 -0
- package/lib/duet/{p-f13a0883.entry.js → p-9d7b9084.entry.js} +1 -1
- package/lib/duet/p-a0544097.system.entry.js +4 -0
- package/lib/duet/p-a16a58c1.system.js +4 -0
- package/lib/duet/{p-fb898d94.system.entry.js → p-a4a16d03.system.entry.js} +1 -1
- package/lib/duet/p-a4e3b44b.entry.js +4 -0
- package/lib/duet/{p-977f2826.entry.js → p-a91673cf.entry.js} +1 -1
- package/lib/duet/p-a926944f.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/p-b08bce4c.entry.js +4 -0
- package/lib/duet/{p-ec3eef3a.entry.js → p-b48a5f80.entry.js} +1 -1
- package/lib/duet/p-bb3e3777.entry.js +4 -0
- package/lib/duet/{p-fbb7d194.entry.js → p-bbe33d02.entry.js} +1 -1
- package/lib/duet/p-be8e1c48.system.entry.js +4 -0
- package/lib/duet/{p-68d09837.system.entry.js → p-c56c73ee.system.entry.js} +1 -1
- package/lib/duet/p-c63bdc6a.system.entry.js +4 -0
- package/lib/duet/{p-c723d36e.system.js → p-c83685a6.system.js} +1 -1
- package/lib/duet/p-c8dfc958.system.entry.js +4 -0
- package/lib/duet/{p-6cf41bfe.system.entry.js → p-c92f601f.system.entry.js} +1 -1
- package/lib/duet/p-d004da5f.js +4 -0
- package/lib/duet/p-d49416f8.entry.js +4 -0
- package/lib/duet/{p-7a868085.entry.js → p-d581d82d.entry.js} +1 -1
- package/lib/duet/p-d6bb4301.entry.js +4 -0
- package/lib/duet/p-d9aadc15.entry.js +4 -0
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/{p-3040debf.entry.js → p-dde63979.entry.js} +1 -1
- package/lib/duet/p-e15ccddc.system.entry.js +4 -0
- package/lib/duet/{p-0f2a478e.entry.js → p-e1be37a6.entry.js} +1 -1
- package/lib/duet/p-e5c1751e.system.js +16 -0
- package/lib/duet/{p-b9683731.entry.js → p-e9209e9f.entry.js} +1 -1
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/{p-b374d7c2.system.js → p-ee1ba0d4.system.js} +1 -1
- package/lib/duet/{p-57cb58d4.system.entry.js → p-f4a29a8a.system.entry.js} +2 -2
- package/lib/duet/p-f8a0bd32.system.entry.js +4 -0
- package/lib/duet/p-f9599dd9.system.entry.js +4 -0
- package/lib/duet/p-fa99eaa4.system.js +4 -0
- package/lib/duet/p-fd7018e9.js +4 -0
- package/lib/duet/{p-19c28d99.system.entry.js → p-fe0cca67.system.entry.js} +1 -1
- package/lib/esm/{dom-8516b24e.js → dom-5d060ace.js} +1 -1
- package/lib/esm/duet-alert.entry.js +2 -2
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +4 -4
- package/lib/esm/duet-caption_4.entry.js +18 -11
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +40 -19
- package/lib/esm/duet-collapsible.entry.js +4 -449
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +7 -7
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table-button.entry.js +92 -0
- package/lib/esm/duet-editable-table_4.entry.js +1513 -0
- 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 +3 -3
- package/lib/esm/duet-grid_2.entry.js +69 -4
- package/lib/esm/duet-header_2.entry.js +216 -49
- package/lib/esm/duet-hero.entry.js +2 -2
- package/lib/esm/duet-icon.entry.js +8 -6
- package/lib/esm/duet-input_2.entry.js +7 -8
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +3 -3
- package/lib/esm/duet-modal.entry.js +3 -3
- package/lib/esm/duet-notification_2.entry.js +3 -3
- package/lib/esm/duet-number-input.entry.js +2 -2
- package/lib/esm/duet-progress.entry.js +71 -0
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +2 -2
- package/lib/esm/duet-select.entry.js +5 -5
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +3 -3
- package/lib/esm/duet-textarea.entry.js +5 -5
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +3 -3
- package/lib/esm/duet-upload-aria-status.entry.js +96 -0
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{focus-utils-6a282066.js → focus-utils-48837cfa.js} +1 -1
- package/lib/esm/form-search-ea8e19ae.js +6 -0
- package/lib/esm/{index-3a265449.js → index-80be4170.js} +5 -2
- package/lib/esm/{language-utils-d5c38f65.js → language-utils-344d894c.js} +6 -3
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-9178c864.js → shadow-css-13d024f4.js} +9 -10
- package/lib/esm/token-utils-75f78ca4.js +75 -0
- package/lib/esm/tokens-e110dc89.js +453 -0
- package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
- package/lib/esm/watch-options-dd55bce8.js +57 -0
- package/lib/esm-es5/{dom-8516b24e.js → dom-5d060ace.js} +0 -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-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +2 -2
- 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 +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +2 -2
- 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-button.entry.js +4 -0
- package/lib/esm-es5/duet-editable-table_4.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 +2 -2
- package/lib/esm-es5/duet-header_2.entry.js +2 -2
- 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-progress.entry.js +4 -0
- 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-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-tab_2.entry.js +2 -2
- 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 +4 -0
- 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-48837cfa.js +4 -0
- package/lib/esm-es5/form-search-ea8e19ae.js +4 -0
- package/lib/esm-es5/index-80be4170.js +4 -0
- package/lib/esm-es5/{language-utils-d5c38f65.js → language-utils-344d894c.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-13d024f4.js +15 -0
- package/lib/esm-es5/token-utils-75f78ca4.js +4 -0
- package/lib/esm-es5/tokens-e110dc89.js +4 -0
- package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
- package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
- package/lib/types/common-types.d.ts +0 -1
- package/lib/types/components/duet-choice/duet-choice.d.ts +20 -1
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +3 -0
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +5 -5
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +73 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +76 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +8 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +94 -0
- package/lib/types/components/duet-grid/duet-grid.d.ts +17 -2
- package/lib/types/components/duet-header/duet-header-dropdown.d.ts +16 -0
- package/lib/types/components/duet-header/duet-header-hamburger.d.ts +2 -0
- package/lib/types/components/duet-header/duet-header-icon.d.ts +8 -0
- package/lib/types/components/duet-header/duet-header.d.ts +41 -4
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-link/duet-link.d.ts +3 -0
- package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
- package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
- package/lib/types/components/duet-table/duet-table.d.ts +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +408 -0
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +8 -0
- package/lib/types/components/duet-upload/mock.helpers.d.ts +2 -0
- package/lib/types/components/duet-upload/upload-editable-item-error.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-inprogres.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-success.d.ts +8 -0
- package/lib/types/components/duet-upload/upload-validators.d.ts +12 -0
- package/lib/types/components/duet-upload/upload.helpers.d.ts +1 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +18 -0
- package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +49 -0
- package/lib/types/components.d.ts +835 -29
- package/lib/types/stencil-public-runtime.d.ts +6 -4
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +5 -1
- package/lib/types/utils/template-utils.d.ts +13 -0
- package/lib/types/utils/token-utils.d.ts +8 -2
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +13 -13
- package/lib/cjs/duet-table.cjs.entry.js +0 -132
- package/lib/cjs/token-utils-13e5d13e.js +0 -30
- package/lib/duet/p-0058512b.js +0 -4
- package/lib/duet/p-08729381.entry.js +0 -4
- package/lib/duet/p-0b00e8d6.system.js +0 -16
- package/lib/duet/p-15922601.system.js +0 -4
- package/lib/duet/p-194e25ce.system.entry.js +0 -4
- package/lib/duet/p-1d87ea02.system.entry.js +0 -4
- package/lib/duet/p-2d1e2b23.system.entry.js +0 -4
- package/lib/duet/p-322d1c38.js +0 -4
- package/lib/duet/p-40d68321.entry.js +0 -4
- package/lib/duet/p-418b2ce7.system.js +0 -4
- package/lib/duet/p-43e39d98.system.js +0 -4
- package/lib/duet/p-4603830b.entry.js +0 -4
- package/lib/duet/p-52d7fbec.entry.js +0 -4
- package/lib/duet/p-60478325.system.entry.js +0 -4
- package/lib/duet/p-64ed7add.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-72fd384a.entry.js +0 -4
- package/lib/duet/p-753b406c.entry.js +0 -4
- package/lib/duet/p-76c00d0c.entry.js +0 -4
- package/lib/duet/p-85fe1132.js +0 -4
- package/lib/duet/p-8c8e82aa.system.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-a11df1b6.js +0 -15
- package/lib/duet/p-a1eccee1.system.entry.js +0 -4
- package/lib/duet/p-ade33230.entry.js +0 -4
- package/lib/duet/p-b04d738f.system.entry.js +0 -4
- package/lib/duet/p-cb827bb7.entry.js +0 -4
- package/lib/duet/p-d85fba2c.system.entry.js +0 -4
- package/lib/duet/p-dfa90f8a.system.entry.js +0 -4
- package/lib/duet/p-e6b9bd1d.entry.js +0 -4
- package/lib/duet/p-ee64d6be.system.entry.js +0 -4
- package/lib/duet/p-f113671b.system.entry.js +0 -4
- package/lib/duet/p-f2f04396.entry.js +0 -4
- package/lib/duet/p-fc6624fe.system.entry.js +0 -4
- package/lib/esm/duet-table.entry.js +0 -128
- package/lib/esm/token-utils-5a35377f.js +0 -28
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-table.entry.js +0 -4
- package/lib/esm-es5/focus-utils-6a282066.js +0 -4
- package/lib/esm-es5/index-3a265449.js +0 -4
- package/lib/esm-es5/shadow-css-9178c864.js +0 -15
- package/lib/esm-es5/token-utils-5a35377f.js +0 -4
- package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
- package/lib/esm-es5/watch-options-de55ea78.js +0 -4
|
@@ -5,18 +5,23 @@ import infoIcon from "@duetds/icons/lib/assets/messaging-info";
|
|
|
5
5
|
import { Component, Element, Event, h, Host, Listen, Method, Prop, State } from "@stencil/core";
|
|
6
6
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
7
7
|
import { createID } from "../../utils/create-id";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { FocusGuard } from "../../utils/focus-utils";
|
|
9
|
+
import { isEscapeKey, isKeyboardClick, isQuestionKey } from "../../utils/keyboard-utils";
|
|
10
|
+
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
10
11
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
11
12
|
/**
|
|
12
13
|
* @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
|
|
13
14
|
* @slot info - Info content. Anything inserted into this slot is displayed in a collapsible info box.
|
|
15
|
+
* @slot collapsible_header - header that is only added to collapsible element, this header should be used when the components collapsible area contains additional interactive elements (such as form items) and should be user for a short description of the content below it, it is mandatory for good accessibility to use this - and aria-decribe-by will point to it. If you use the collapsible area with simple text - describe-by will point to this area
|
|
14
16
|
* @slot additional - Additional content. Anything inserted into this slot is displayed as additional content under the label and caption
|
|
15
17
|
*/
|
|
16
18
|
export class DuetChoice {
|
|
17
19
|
constructor() {
|
|
20
|
+
this.hasHeader = false;
|
|
18
21
|
this.choiceId = createID("DuetChoice");
|
|
19
22
|
this.expandId = createID("DuetChoiceExpand");
|
|
23
|
+
this.headerId = createID("DuetChoiceHeader");
|
|
24
|
+
this.infoButtonId = createID("DuetChoiceInfoButton");
|
|
20
25
|
/**
|
|
21
26
|
* State() variables
|
|
22
27
|
* Inlined decorator, alphabetical order.
|
|
@@ -94,6 +99,24 @@ export class DuetChoice {
|
|
|
94
99
|
* browser from displaying its own validation errors.
|
|
95
100
|
*/
|
|
96
101
|
this.required = false;
|
|
102
|
+
/**
|
|
103
|
+
* Placeholder defaults
|
|
104
|
+
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
105
|
+
*/
|
|
106
|
+
this.infoLabelDefaults = {
|
|
107
|
+
fi: "Lisätietoja",
|
|
108
|
+
en: "More information about",
|
|
109
|
+
sv: "Mera information om",
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Hint text to display before the user types into the date picker input.
|
|
113
|
+
* @default {
|
|
114
|
+
* fi: "Lisätietoja",
|
|
115
|
+
* en: "More information about",
|
|
116
|
+
* sv: "Mera information om",
|
|
117
|
+
* }
|
|
118
|
+
*/
|
|
119
|
+
this.infoLabel = getLocaleString(this.infoLabelDefaults, getLanguage());
|
|
97
120
|
this.onMouseEnter = () => {
|
|
98
121
|
this.isHovering = true;
|
|
99
122
|
};
|
|
@@ -168,6 +191,7 @@ export class DuetChoice {
|
|
|
168
191
|
componentWillLoad() {
|
|
169
192
|
inheritGlobalTheme(this);
|
|
170
193
|
this.hasInfo = !!this.element.querySelector("[slot='info']");
|
|
194
|
+
this.hasHeader = !!this.element.querySelector('[slot="header"]');
|
|
171
195
|
this.hasAdditional = !!this.element.querySelector("[slot='additional']");
|
|
172
196
|
}
|
|
173
197
|
/**
|
|
@@ -188,8 +212,11 @@ export class DuetChoice {
|
|
|
188
212
|
handleHostKeyDown() {
|
|
189
213
|
this.isKeyDown = true;
|
|
190
214
|
}
|
|
191
|
-
handleHostKeyUp() {
|
|
215
|
+
handleHostKeyUp(ev) {
|
|
192
216
|
this.isKeyDown = false;
|
|
217
|
+
if (isEscapeKey(ev) && this.isInfoOpen) {
|
|
218
|
+
this.toggleInfo();
|
|
219
|
+
}
|
|
193
220
|
}
|
|
194
221
|
/**
|
|
195
222
|
* Sets focus on the specified `duet-choice`. Use this method instead of the global
|
|
@@ -203,7 +230,12 @@ export class DuetChoice {
|
|
|
203
230
|
return this.accessibleDescribedBy;
|
|
204
231
|
}
|
|
205
232
|
if (this.collapsible || this.hasInfo) {
|
|
206
|
-
|
|
233
|
+
if (this.hasHeader) {
|
|
234
|
+
return this.headerId;
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
return this.expandId;
|
|
238
|
+
}
|
|
207
239
|
}
|
|
208
240
|
return null;
|
|
209
241
|
}
|
|
@@ -260,17 +292,6 @@ export class DuetChoice {
|
|
|
260
292
|
this.icon && (h("div", { class: "duet-choice-card-icon" },
|
|
261
293
|
h("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))),
|
|
262
294
|
this.label,
|
|
263
|
-
this.hasInfo ||
|
|
264
|
-
// this is an incredibly dirty way of both hiding the expanded / collapsed state text
|
|
265
|
-
// and an extremely bad way of notifying any screenreaders about state - unfortunately
|
|
266
|
-
// this is extremely difficult to do consistently across browsers so this hack is the best way todo it
|
|
267
|
-
(this.collapsible && (h("span", { lang: "en", style: { opacity: "0", pointerEvents: "none", fontSize: "0", lineHeight: "0" } }, this.collapsible
|
|
268
|
-
? this.checked
|
|
269
|
-
? ", Expanded"
|
|
270
|
-
: ", Collapsed"
|
|
271
|
-
: this.isInfoOpen
|
|
272
|
-
? ", Expanded"
|
|
273
|
-
: ", Collapsed"))),
|
|
274
295
|
this.caption && (h("div", null,
|
|
275
296
|
h("duet-spacer", { size: "xx-small" }),
|
|
276
297
|
h("duet-caption", { margin: "none", selected: this.checked }, this.caption))),
|
|
@@ -278,10 +299,10 @@ export class DuetChoice {
|
|
|
278
299
|
h("duet-spacer", { size: "xx-small" }),
|
|
279
300
|
h("slot", { name: "additional" }))),
|
|
280
301
|
h("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && h("div", { class: "duet-checkmark" })))),
|
|
281
|
-
this.hasInfo && !this.collapsible && (h("button", { class: {
|
|
302
|
+
this.hasInfo && !this.collapsible && (h("button", { ref: button => (this.infoButtonEl = button), id: this.infoButtonId, class: {
|
|
282
303
|
"duet-choice-info-toggle": true,
|
|
283
304
|
"duet-theme-turva": this.theme === "turva",
|
|
284
|
-
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-controls": this.expandId, "aria-flowto": this.expandId, tabindex: this.type === "radio" && !this.checked ? "-1" : "0", type: "button" },
|
|
305
|
+
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-label": `${this.infoLabel} ${this.label}`, "aria-controls": this.expandId, "aria-flowto": this.expandId, tabindex: this.type === "radio" && !this.checked ? "-1" : "0", type: "button" },
|
|
285
306
|
h("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton),
|
|
286
307
|
h("div", { class: "duet-choice-info-icon" },
|
|
287
308
|
h("duet-icon", { icon: infoIcon.svg, margin: "none", size: "small", color: "currentColor" }))))),
|
|
@@ -289,10 +310,15 @@ export class DuetChoice {
|
|
|
289
310
|
h("span", { class: {
|
|
290
311
|
"duet-choice-section-visible": this.collapsible ? this.checked : this.isInfoOpen,
|
|
291
312
|
"duet-choice-section-hidden": this.collapsible ? !this.checked : !this.isInfoOpen,
|
|
292
|
-
} },
|
|
293
|
-
h("
|
|
294
|
-
|
|
295
|
-
h("
|
|
313
|
+
} },
|
|
314
|
+
h("span", { id: this.headerId },
|
|
315
|
+
h("slot", { name: "header" })),
|
|
316
|
+
this.hasInfo ? (h("span", null,
|
|
317
|
+
h("span", { "aria-relevant": "all", "aria-atomic": "true", "aria-live": this.isInfoOpen ? "polite" : "off" },
|
|
318
|
+
h("slot", { name: "info" })),
|
|
319
|
+
h("slot", null))) : (h("span", null,
|
|
320
|
+
h("slot", null)))),
|
|
321
|
+
this.isInfoOpen && h(FocusGuard, { moveFocusTo: this.infoButtonEl }))) : null));
|
|
296
322
|
}
|
|
297
323
|
static get is() { return "duet-choice"; }
|
|
298
324
|
static get encapsulation() { return "scoped"; }
|
|
@@ -765,6 +791,53 @@ export class DuetChoice {
|
|
|
765
791
|
"attribute": "required",
|
|
766
792
|
"reflect": false,
|
|
767
793
|
"defaultValue": "false"
|
|
794
|
+
},
|
|
795
|
+
"infoLabelDefaults": {
|
|
796
|
+
"type": "string",
|
|
797
|
+
"mutable": false,
|
|
798
|
+
"complexType": {
|
|
799
|
+
"original": "DuetLangObject | string",
|
|
800
|
+
"resolved": "DuetLangObject | string",
|
|
801
|
+
"references": {
|
|
802
|
+
"DuetLangObject": {
|
|
803
|
+
"location": "import",
|
|
804
|
+
"path": "../../utils/language-utils"
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"required": false,
|
|
809
|
+
"optional": false,
|
|
810
|
+
"docs": {
|
|
811
|
+
"tags": [{
|
|
812
|
+
"name": "default",
|
|
813
|
+
"text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }"
|
|
814
|
+
}],
|
|
815
|
+
"text": "Placeholder defaults"
|
|
816
|
+
},
|
|
817
|
+
"attribute": "accessible-label-info-default",
|
|
818
|
+
"reflect": false,
|
|
819
|
+
"defaultValue": "{\n fi: \"Lis\u00E4tietoja\",\n en: \"More information about\",\n sv: \"Mera information om\",\n }"
|
|
820
|
+
},
|
|
821
|
+
"infoLabel": {
|
|
822
|
+
"type": "string",
|
|
823
|
+
"mutable": false,
|
|
824
|
+
"complexType": {
|
|
825
|
+
"original": "string",
|
|
826
|
+
"resolved": "string",
|
|
827
|
+
"references": {}
|
|
828
|
+
},
|
|
829
|
+
"required": false,
|
|
830
|
+
"optional": false,
|
|
831
|
+
"docs": {
|
|
832
|
+
"tags": [{
|
|
833
|
+
"name": "default",
|
|
834
|
+
"text": "{\nfi: \"Lis\u00E4tietoja\",\nen: \"More information about\",\nsv: \"Mera information om\",\n}"
|
|
835
|
+
}],
|
|
836
|
+
"text": "Hint text to display before the user types into the date picker input."
|
|
837
|
+
},
|
|
838
|
+
"attribute": "info-label",
|
|
839
|
+
"reflect": false,
|
|
840
|
+
"defaultValue": "getLocaleString(this.infoLabelDefaults, getLanguage())"
|
|
768
841
|
}
|
|
769
842
|
}; }
|
|
770
843
|
static get states() { return {
|
|
@@ -8,6 +8,9 @@ import { createID } from "../../utils/create-id";
|
|
|
8
8
|
import { isKeyboardClick } from "../../utils/keyboard-utils";
|
|
9
9
|
import { sanitizeString } from "../../utils/string-utils";
|
|
10
10
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
11
|
+
/**
|
|
12
|
+
* @part duet-collapsible-heading-content - piercing selector for styling the heading content
|
|
13
|
+
*/
|
|
11
14
|
export class DuetCollapsible {
|
|
12
15
|
constructor() {
|
|
13
16
|
this.id = createID("DuetCollapsible");
|
|
@@ -128,7 +131,7 @@ export class DuetCollapsible {
|
|
|
128
131
|
}, style: { "font-size": this.getFontSizeFromTokens() }, role: "button", tabindex: "0", ref: button => (this.nativeButton = button), "aria-expanded": this.open ? "true" : "false", "aria-controls": this.id, onClick: this.handleClick, onKeyDown: this.handleKeyDown },
|
|
129
132
|
h("div", { class: "duet-collapsible-heading-icon" },
|
|
130
133
|
h("duet-icon", { margin: "none", color: this.theme === "turva" ? "secondary-turva" : "secondary", size: this.getEquivalentIconSize(), icon: icon.svg })),
|
|
131
|
-
h("div", { class: "duet-collapsible-heading-content" }, this.heading)),
|
|
134
|
+
h("div", { class: "duet-collapsible-heading-content", part: "duet-collapsible-heading-content" }, this.heading)),
|
|
132
135
|
h("div", { id: this.id, class: { "duet-collapsible-content": true, "duet-theme-turva": this.theme === "turva" } },
|
|
133
136
|
h("slot", null))));
|
|
134
137
|
}
|
|
@@ -47,14 +47,14 @@ export class DuetDatePicker {
|
|
|
47
47
|
*/
|
|
48
48
|
this.margin = "auto";
|
|
49
49
|
/**
|
|
50
|
-
* The currently active language. This setting changes the month/year/day
|
|
50
|
+
* The currently active language. This setting changes the month/year/day.
|
|
51
51
|
* names and button labels as well as all screen reader labels.
|
|
52
|
-
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
52
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing.
|
|
53
53
|
* @default "fi"
|
|
54
54
|
*/
|
|
55
55
|
this.language = getLanguage();
|
|
56
56
|
/**
|
|
57
|
-
* Placeholder defaults
|
|
57
|
+
* Placeholder defaults.
|
|
58
58
|
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
59
59
|
*/
|
|
60
60
|
this.placeholderDefaults = {
|
|
@@ -117,7 +117,7 @@ export class DuetDatePicker {
|
|
|
117
117
|
*/
|
|
118
118
|
this.min = "";
|
|
119
119
|
/**
|
|
120
|
-
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD
|
|
120
|
+
* Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.
|
|
121
121
|
* This setting can be used alone or together with the min property.
|
|
122
122
|
*/
|
|
123
123
|
this.max = "";
|
|
@@ -559,7 +559,7 @@ export class DuetDatePicker {
|
|
|
559
559
|
"optional": false,
|
|
560
560
|
"docs": {
|
|
561
561
|
"tags": [],
|
|
562
|
-
"text": "Caption (underneath label) that can be set as a way of adding extra information"
|
|
562
|
+
"text": "Caption (underneath label) that can be set as a way of adding extra information."
|
|
563
563
|
},
|
|
564
564
|
"attribute": "caption",
|
|
565
565
|
"reflect": false
|
|
@@ -605,12 +605,12 @@ export class DuetDatePicker {
|
|
|
605
605
|
"docs": {
|
|
606
606
|
"tags": [{
|
|
607
607
|
"name": "deprecated",
|
|
608
|
-
"text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing"
|
|
608
|
+
"text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing."
|
|
609
609
|
}, {
|
|
610
610
|
"name": "default",
|
|
611
611
|
"text": "\"fi\""
|
|
612
612
|
}],
|
|
613
|
-
"text": "The currently active language. This setting changes the month/year/day
|
|
613
|
+
"text": "The currently active language. This setting changes the month/year/day.\nnames and button labels as well as all screen reader labels."
|
|
614
614
|
},
|
|
615
615
|
"attribute": "language",
|
|
616
616
|
"reflect": false,
|
|
@@ -636,7 +636,7 @@ export class DuetDatePicker {
|
|
|
636
636
|
"name": "default",
|
|
637
637
|
"text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }"
|
|
638
638
|
}],
|
|
639
|
-
"text": "Placeholder defaults"
|
|
639
|
+
"text": "Placeholder defaults."
|
|
640
640
|
},
|
|
641
641
|
"attribute": "placeholder-default",
|
|
642
642
|
"reflect": false,
|
|
@@ -949,7 +949,7 @@ export class DuetDatePicker {
|
|
|
949
949
|
"optional": false,
|
|
950
950
|
"docs": {
|
|
951
951
|
"tags": [],
|
|
952
|
-
"text": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD
|
|
952
|
+
"text": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property."
|
|
953
953
|
},
|
|
954
954
|
"attribute": "max",
|
|
955
955
|
"reflect": false,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
background: transparent;
|
|
8
|
+
border: 0;
|
|
9
|
+
-moz-appearance: none;
|
|
10
|
+
-webkit-appearance: none;
|
|
11
|
+
appearance: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host button {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-content: space-between;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
min-width: 32px;
|
|
19
|
+
max-width: 32px;
|
|
20
|
+
height: 100%;
|
|
21
|
+
min-height: 32px;
|
|
22
|
+
max-height: 32px;
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
cursor: pointer !important;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
border: 1px solid;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
}
|
|
30
|
+
:host button duet-icon {
|
|
31
|
+
align-self: center;
|
|
32
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Prop, State } from "@stencil/core";
|
|
5
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
6
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
7
|
+
import { getColorByName } from "../../utils/token-utils";
|
|
8
|
+
export class DuetEditableTableButton {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.isHovering = false;
|
|
11
|
+
/**
|
|
12
|
+
* Theme of the empty state component.
|
|
13
|
+
*/
|
|
14
|
+
this.theme = undefined;
|
|
15
|
+
/**
|
|
16
|
+
* action items passed from host component
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
this.actions = undefined;
|
|
20
|
+
/**
|
|
21
|
+
* uid that gets passed along when the action is emitted
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
this.uid = "";
|
|
25
|
+
/**
|
|
26
|
+
* group associated with action
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
this.group = "";
|
|
30
|
+
/**
|
|
31
|
+
* key of the item in the map
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
this.keyName = "";
|
|
35
|
+
this.onMouseEnter = () => {
|
|
36
|
+
this.isHovering = true;
|
|
37
|
+
};
|
|
38
|
+
this.onMouseLeave = () => {
|
|
39
|
+
this.isHovering = false;
|
|
40
|
+
};
|
|
41
|
+
this.getColours = (byName = false) => {
|
|
42
|
+
let colorHover = this.actions.color_hover;
|
|
43
|
+
let colorBlur = this.actions.color;
|
|
44
|
+
if (byName) {
|
|
45
|
+
colorHover = getColorByName(this.actions.color_hover, this.theme);
|
|
46
|
+
colorBlur = getColorByName(this.actions.color, this.theme);
|
|
47
|
+
}
|
|
48
|
+
return this.isHovering ? colorHover : colorBlur;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
/**
|
|
53
|
+
* Component lifecycle events.
|
|
54
|
+
*/
|
|
55
|
+
componentWillLoad() {
|
|
56
|
+
inheritGlobalTheme(this);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
/**
|
|
60
|
+
* private functions
|
|
61
|
+
*/
|
|
62
|
+
emitActionEvent(ev) {
|
|
63
|
+
this.duetEditableItemAction.emit({
|
|
64
|
+
originalEvent: ev,
|
|
65
|
+
uid: this.uid,
|
|
66
|
+
group: this.group,
|
|
67
|
+
action: this.actions.id,
|
|
68
|
+
keyName: this.keyName,
|
|
69
|
+
component: "duet-editable-table-item",
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* render() function
|
|
74
|
+
* Always the last one in the class.
|
|
75
|
+
*/
|
|
76
|
+
render() {
|
|
77
|
+
return (h("button", { style: {
|
|
78
|
+
"border-color": this.getColours(true),
|
|
79
|
+
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) },
|
|
80
|
+
h("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.getColours(), margin: "none" })));
|
|
81
|
+
}
|
|
82
|
+
static get is() { return "duet-editable-table-button"; }
|
|
83
|
+
static get encapsulation() { return "scoped"; }
|
|
84
|
+
static get originalStyleUrls() { return {
|
|
85
|
+
"$": ["duet-editable-table-button.scss"]
|
|
86
|
+
}; }
|
|
87
|
+
static get styleUrls() { return {
|
|
88
|
+
"$": ["duet-editable-table-button.css"]
|
|
89
|
+
}; }
|
|
90
|
+
static get properties() { return {
|
|
91
|
+
"theme": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"mutable": true,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "DuetTheme",
|
|
96
|
+
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
97
|
+
"references": {
|
|
98
|
+
"DuetTheme": {
|
|
99
|
+
"location": "import",
|
|
100
|
+
"path": "../../common-types"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": false,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "Theme of the empty state component."
|
|
109
|
+
},
|
|
110
|
+
"attribute": "theme",
|
|
111
|
+
"reflect": false,
|
|
112
|
+
"defaultValue": "undefined"
|
|
113
|
+
},
|
|
114
|
+
"actions": {
|
|
115
|
+
"type": "unknown",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "DuetEditableTableActionButtonItems",
|
|
119
|
+
"resolved": "{ icon: string; color: string; color_hover: string; id: string; map?: string[]; label?: DuetLangObject; }",
|
|
120
|
+
"references": {
|
|
121
|
+
"DuetEditableTableActionButtonItems": {
|
|
122
|
+
"location": "local"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [{
|
|
130
|
+
"name": "internal",
|
|
131
|
+
"text": undefined
|
|
132
|
+
}],
|
|
133
|
+
"text": "action items passed from host component"
|
|
134
|
+
},
|
|
135
|
+
"defaultValue": "undefined"
|
|
136
|
+
},
|
|
137
|
+
"uid": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "string",
|
|
142
|
+
"resolved": "string",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [{
|
|
149
|
+
"name": "internal",
|
|
150
|
+
"text": undefined
|
|
151
|
+
}],
|
|
152
|
+
"text": "uid that gets passed along when the action is emitted"
|
|
153
|
+
},
|
|
154
|
+
"attribute": "uid",
|
|
155
|
+
"reflect": false,
|
|
156
|
+
"defaultValue": "\"\""
|
|
157
|
+
},
|
|
158
|
+
"group": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"mutable": false,
|
|
161
|
+
"complexType": {
|
|
162
|
+
"original": "string",
|
|
163
|
+
"resolved": "string",
|
|
164
|
+
"references": {}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": false,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [{
|
|
170
|
+
"name": "internal",
|
|
171
|
+
"text": undefined
|
|
172
|
+
}],
|
|
173
|
+
"text": "group associated with action"
|
|
174
|
+
},
|
|
175
|
+
"attribute": "group",
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"defaultValue": "\"\""
|
|
178
|
+
},
|
|
179
|
+
"keyName": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "string",
|
|
184
|
+
"resolved": "string",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": false,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [{
|
|
191
|
+
"name": "internal",
|
|
192
|
+
"text": undefined
|
|
193
|
+
}],
|
|
194
|
+
"text": "key of the item in the map"
|
|
195
|
+
},
|
|
196
|
+
"attribute": "key-name",
|
|
197
|
+
"reflect": false,
|
|
198
|
+
"defaultValue": "\"\""
|
|
199
|
+
}
|
|
200
|
+
}; }
|
|
201
|
+
static get states() { return {
|
|
202
|
+
"isHovering": {}
|
|
203
|
+
}; }
|
|
204
|
+
static get events() { return [{
|
|
205
|
+
"method": "duetEditableItemAction",
|
|
206
|
+
"name": "duetEditableItemAction",
|
|
207
|
+
"bubbles": true,
|
|
208
|
+
"cancelable": true,
|
|
209
|
+
"composed": true,
|
|
210
|
+
"docs": {
|
|
211
|
+
"tags": [],
|
|
212
|
+
"text": "Emitted when any action is clicked"
|
|
213
|
+
},
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "DuetEditableTableItemEvent",
|
|
216
|
+
"resolved": "{ originalEvent?: Event; uid: string | number | bigint; keyName: string | number | bigint; action: string; group: string; component: \"duet-editable-table-item\"; }",
|
|
217
|
+
"references": {
|
|
218
|
+
"DuetEditableTableItemEvent": {
|
|
219
|
+
"location": "local"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}]; }
|
|
224
|
+
static get elementRef() { return "el"; }
|
|
225
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
background: transparent;
|
|
8
|
+
border: 0;
|
|
9
|
+
-moz-appearance: none;
|
|
10
|
+
-webkit-appearance: none;
|
|
11
|
+
appearance: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
display: table-row;
|
|
16
|
+
height: 32px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.duet-editable-table-content, .duet-editable-table-actions {
|
|
20
|
+
height: 32px;
|
|
21
|
+
padding: 12px 0;
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
break-word: break-all;
|
|
24
|
+
border-bottom: 1px solid #e1e3e6;
|
|
25
|
+
}
|
|
26
|
+
.duet-editable-table-actions-items {
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: flex-end;
|
|
29
|
+
}
|
|
30
|
+
.duet-editable-table-actions-items duet-editable-table-button {
|
|
31
|
+
padding-left: 8px;
|
|
32
|
+
}
|
|
33
|
+
.duet-editable-table .editable-item-small {
|
|
34
|
+
font-size: 0.75rem;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
}
|