@duetds/components 8.5.5 → 8.6.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 +315 -273
- package/lib/cjs/duet-action-button.cjs.entry.js +5 -6
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-banner.cjs.entry.js +1 -1
- package/lib/cjs/duet-callout.cjs.entry.js +1 -1
- package/lib/cjs/duet-chip.cjs.entry.js +9 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +8 -1
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-combobox.cjs.entry.js +260 -127
- package/lib/cjs/duet-date-picker.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-input_2.cjs.entry.js +39 -3
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +2 -34
- package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +2 -37
- package/lib/cjs/duet-menu-bar-link.cjs.entry.js +2 -37
- package/lib/cjs/duet-modal.cjs.entry.js +1 -1
- package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-promo-card.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +2 -5
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +2 -37
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +1 -1
- package/lib/cjs/loader.cjs.js +1 -1
- package/lib/cjs/{slot-utils-f5073417.js → slot-utils-03a40c78.js} +3 -1
- package/lib/collection/components/duet-action-button/duet-action-button.js +6 -8
- package/lib/collection/components/duet-chip/duet-chip.css +7 -0
- package/lib/collection/components/duet-chip/duet-chip.js +29 -2
- package/lib/collection/components/duet-choice-group/duet-choice-group.e2e.js +15 -0
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +31 -0
- package/lib/collection/components/duet-combobox/duet-combobox-select-single.js +2 -2
- package/lib/collection/components/duet-combobox/duet-combobox.css +10 -2
- package/lib/collection/components/duet-combobox/duet-combobox.e2e.js +81 -51
- package/lib/collection/components/duet-combobox/duet-combobox.js +321 -142
- package/lib/collection/components/duet-input/duet-input.css +29 -0
- package/lib/collection/components/duet-input/duet-input.js +159 -3
- package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.css +10 -0
- package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +1 -38
- package/lib/collection/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.css +10 -0
- package/lib/collection/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.js +1 -41
- package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.css +10 -0
- package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +1 -41
- package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.css +10 -0
- package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.js +2 -6
- package/lib/collection/components/duet-submenu-bar-link/duet-submenu-bar-link.css +10 -0
- package/lib/collection/components/duet-submenu-bar-link/duet-submenu-bar-link.js +1 -41
- package/lib/collection/utils/slot-utils.js +3 -1
- package/lib/dist-custom-elements/duet-action-button.js +1 -1
- package/lib/dist-custom-elements/duet-alert.js +1 -1
- package/lib/dist-custom-elements/duet-banner.js +1 -1
- package/lib/dist-custom-elements/duet-breadcrumb.js +1 -1
- package/lib/dist-custom-elements/duet-callout.js +1 -1
- package/lib/dist-custom-elements/duet-card.js +1 -1
- package/lib/dist-custom-elements/duet-chip.js +1 -273
- package/lib/dist-custom-elements/duet-choice-group.js +14 -6
- package/lib/dist-custom-elements/duet-choice.js +2 -2
- package/lib/dist-custom-elements/duet-collapsible.js +2 -2
- package/lib/dist-custom-elements/duet-combobox.js +326 -132
- package/lib/dist-custom-elements/duet-cookie-consent.js +1 -1
- package/lib/dist-custom-elements/duet-date-picker.js +6 -6
- package/lib/dist-custom-elements/duet-editable-table.js +2 -2
- package/lib/dist-custom-elements/duet-fieldset.js +1 -1
- package/lib/dist-custom-elements/duet-footer.js +1 -1
- package/lib/dist-custom-elements/duet-header.js +1 -1
- package/lib/dist-custom-elements/duet-hero.js +1 -1
- package/lib/dist-custom-elements/duet-input.js +1 -1
- package/lib/dist-custom-elements/duet-menu-bar-button.js +2 -35
- package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +1 -1
- package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +3 -39
- package/lib/dist-custom-elements/duet-menu-bar-link.js +3 -39
- package/lib/dist-custom-elements/duet-modal.js +2 -2
- package/lib/dist-custom-elements/duet-multiselect.js +5 -5
- package/lib/dist-custom-elements/duet-notification-drawer.js +1 -1
- package/lib/dist-custom-elements/duet-notification.js +1 -1
- package/lib/dist-custom-elements/duet-number-input.js +6 -6
- package/lib/dist-custom-elements/duet-pagination.js +6 -6
- package/lib/dist-custom-elements/duet-popup-menu.js +1 -1
- package/lib/dist-custom-elements/duet-promo-card.js +1 -1
- package/lib/dist-custom-elements/duet-radio-group.js +5 -5
- package/lib/dist-custom-elements/duet-range-slider.js +1 -1
- package/lib/dist-custom-elements/duet-range-stepper.js +2 -2
- package/lib/dist-custom-elements/duet-scrollable.js +1 -1
- package/lib/dist-custom-elements/duet-select.js +1 -1
- package/lib/dist-custom-elements/duet-show-more.js +1 -1
- package/lib/dist-custom-elements/duet-slideout-panel.js +1 -1
- package/lib/dist-custom-elements/duet-slideout.js +2 -2
- package/lib/dist-custom-elements/duet-step.js +1 -1
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +1 -1
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +3 -7
- package/lib/dist-custom-elements/duet-submenu-bar-item.js +1 -1
- package/lib/dist-custom-elements/duet-submenu-bar-link.js +4 -40
- package/lib/dist-custom-elements/duet-tab-group.js +6 -6
- package/lib/dist-custom-elements/duet-tab.js +1 -1
- package/lib/dist-custom-elements/duet-textarea.js +4 -4
- package/lib/dist-custom-elements/duet-toggle.js +1 -1
- package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +1 -1
- package/lib/dist-custom-elements/duet-toolbar-dropdown.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip-button.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip.js +1 -1
- package/lib/dist-custom-elements/duet-tray.js +1 -1
- package/lib/dist-custom-elements/duet-upload-item.js +1 -1
- package/lib/dist-custom-elements/duet-upload.js +5 -5
- package/lib/dist-custom-elements/{p-cff358b0.js → p-014c1177.js} +49 -8
- package/lib/dist-custom-elements/{p-d87f6dd5.js → p-06e608ae.js} +3 -1
- package/lib/dist-custom-elements/{p-9cdbc360.js → p-0cee8a12.js} +1 -1
- package/lib/dist-custom-elements/{p-9a833e56.js → p-28ec3461.js} +1 -1
- package/lib/dist-custom-elements/{p-d191ba9e.js → p-45fd4d84.js} +1 -1
- package/lib/dist-custom-elements/{p-89d58b60.js → p-6d366100.js} +3 -3
- package/lib/dist-custom-elements/p-755dd68f.js +285 -0
- package/lib/dist-custom-elements/{p-e44c0eff.js → p-785686e3.js} +1 -1
- package/lib/dist-custom-elements/{p-e00d43f3.js → p-92a16064.js} +1 -1
- package/lib/dist-custom-elements/{p-f9f9e33d.js → p-a02e62f3.js} +3 -3
- package/lib/dist-custom-elements/{p-0d5c0a22.js → p-c8415e2f.js} +1 -1
- package/lib/dist-custom-elements/{p-12a0876b.js → p-cb694530.js} +1 -1
- package/lib/dist-custom-elements/{p-d848b48d.js → p-e702eb52.js} +4 -4
- package/lib/dist-custom-elements/{p-c3d02eb2.js → p-f4ac6968.js} +6 -7
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/{p-88a46585.system.entry.js → p-061f4be0.system.entry.js} +1 -1
- package/lib/duet/p-06e608ae.js +4 -0
- package/lib/duet/{p-8ca813cb.system.entry.js → p-0778ccde.system.entry.js} +1 -1
- package/lib/duet/p-07ac7f3e.system.entry.js +4 -0
- package/lib/duet/p-15e24bf0.entry.js +4 -0
- package/lib/duet/{p-0dac34a4.system.entry.js → p-1ef0e5ca.system.entry.js} +1 -1
- package/lib/duet/{p-c9781f22.entry.js → p-2084a65f.entry.js} +1 -1
- package/lib/duet/{p-fd0bb0bf.entry.js → p-23cecf9f.entry.js} +1 -1
- package/lib/duet/p-25048bf8.system.entry.js +4 -0
- package/lib/duet/{p-09e4195f.system.entry.js → p-257800b7.system.entry.js} +1 -1
- package/lib/duet/{p-892a5644.system.entry.js → p-27363096.system.entry.js} +1 -1
- package/lib/duet/{p-1afd901a.entry.js → p-29491f9f.entry.js} +1 -1
- package/lib/duet/{p-3b5ff822.entry.js → p-3302d75d.entry.js} +1 -1
- package/lib/duet/{p-7629cd0a.entry.js → p-40375e30.entry.js} +1 -1
- package/lib/duet/{p-480f37b6.entry.js → p-436fcaf7.entry.js} +1 -1
- package/lib/duet/{p-ba4445cf.system.entry.js → p-45bb3cd0.system.entry.js} +1 -1
- package/lib/duet/p-4781cd58.entry.js +4 -0
- package/lib/duet/p-4cb5943c.entry.js +4 -0
- package/lib/duet/{p-b2f2992f.system.entry.js → p-4de910bd.system.entry.js} +1 -1
- package/lib/duet/p-51e3af7b.system.entry.js +4 -0
- package/lib/duet/p-6151635f.system.js +1 -1
- package/lib/duet/{p-d349dd93.entry.js → p-67382632.entry.js} +1 -1
- package/lib/duet/p-70b705ad.entry.js +4 -0
- package/lib/duet/{p-699a98b4.entry.js → p-76e54ff5.entry.js} +1 -1
- package/lib/duet/{p-4d2ef0e2.entry.js → p-7a161455.entry.js} +1 -1
- package/lib/duet/{p-3d38079c.entry.js → p-7ca15c93.entry.js} +1 -1
- package/lib/duet/{p-bb09fff0.system.entry.js → p-7de614df.system.entry.js} +1 -1
- package/lib/duet/p-82d1fd63.system.entry.js +4 -0
- package/lib/duet/{p-7c1db591.system.entry.js → p-8a4ba903.system.entry.js} +1 -1
- package/lib/duet/{p-4f32a7ee.entry.js → p-8ba91848.entry.js} +1 -1
- package/lib/duet/p-9065a864.entry.js +4 -0
- package/lib/duet/{p-708359ec.system.entry.js → p-999fff8d.system.entry.js} +1 -1
- package/lib/duet/p-9ac25886.system.entry.js +4 -0
- package/lib/duet/{p-9d91a1dd.system.entry.js → p-9e75e5d8.system.entry.js} +1 -1
- package/lib/duet/{p-343d037e.entry.js → p-a3afb1af.entry.js} +1 -1
- package/lib/duet/{p-2ca6a8a0.system.entry.js → p-a3e90064.system.entry.js} +1 -1
- package/lib/duet/{p-cd87960a.system.entry.js → p-a659cdb5.system.entry.js} +1 -1
- package/lib/duet/p-ae21ad57.system.js +4 -0
- package/lib/duet/p-b02ca265.entry.js +4 -0
- package/lib/duet/{p-ce05fe6d.system.entry.js → p-b2fc4b72.system.entry.js} +1 -1
- package/lib/duet/{p-84778369.entry.js → p-b5595969.entry.js} +1 -1
- package/lib/duet/p-c12d34fd.system.entry.js +4 -0
- package/lib/duet/{p-bf51f8a5.system.entry.js → p-c68602c9.system.entry.js} +1 -1
- package/lib/duet/p-c776e072.entry.js +4 -0
- package/lib/duet/p-d1d79e0c.entry.js +4 -0
- package/lib/duet/{p-f6530332.system.entry.js → p-d5721f0d.system.entry.js} +1 -1
- package/lib/duet/{p-c00fe4ed.entry.js → p-dc133655.entry.js} +1 -1
- package/lib/duet/p-de5054b6.system.entry.js +4 -0
- package/lib/duet/{p-61feb701.entry.js → p-df345202.entry.js} +1 -1
- package/lib/duet/{p-2628a322.entry.js → p-e0907f29.entry.js} +1 -1
- package/lib/duet/p-e333b9fc.system.entry.js +4 -0
- package/lib/duet/p-e411627f.entry.js +4 -0
- package/lib/duet/{p-da51c71f.system.entry.js → p-eafed149.system.entry.js} +1 -1
- package/lib/duet/p-f2279e1e.entry.js +4 -0
- package/lib/duet/{p-b1ab1664.system.entry.js → p-fa311641.system.entry.js} +1 -1
- package/lib/duet/{p-320318de.system.entry.js → p-fa72c79b.system.entry.js} +1 -1
- package/lib/duet/p-ffab115e.entry.js +4 -0
- package/lib/esm/duet-action-button.entry.js +5 -6
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-banner.entry.js +1 -1
- package/lib/esm/duet-callout.entry.js +1 -1
- package/lib/esm/duet-chip.entry.js +9 -2
- package/lib/esm/duet-choice_2.entry.js +8 -1
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-combobox.entry.js +261 -128
- package/lib/esm/duet-date-picker.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +39 -3
- package/lib/esm/duet-menu-bar-button.entry.js +2 -34
- package/lib/esm/duet-menu-bar-dropdown.entry.js +2 -37
- package/lib/esm/duet-menu-bar-link.entry.js +2 -37
- package/lib/esm/duet-modal.entry.js +1 -1
- package/lib/esm/duet-multiselect.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-promo-card.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-slideout-panel.entry.js +1 -1
- package/lib/esm/duet-slideout.entry.js +1 -1
- package/lib/esm/duet-submenu-bar-dropdown.entry.js +2 -5
- package/lib/esm/duet-submenu-bar-link.entry.js +2 -37
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet.js +1 -1
- package/lib/esm/loader.js +1 -1
- package/lib/esm/{slot-utils-1115a819.js → slot-utils-b50aaef5.js} +3 -1
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-banner.entry.js +1 -1
- package/lib/esm-es5/duet-callout.entry.js +1 -1
- package/lib/esm-es5/duet-chip.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-combobox.entry.js +2 -2
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +2 -2
- package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +2 -2
- package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-multiselect.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +2 -2
- package/lib/esm-es5/duet-promo-card.entry.js +2 -2
- package/lib/esm-es5/duet-radio_2.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-slideout-panel.entry.js +1 -1
- package/lib/esm-es5/duet-slideout.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +2 -2
- package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/slot-utils-b50aaef5.js +4 -0
- package/lib/types/components/duet-chip/duet-chip.d.ts +4 -0
- package/lib/types/components/duet-choice-group/duet-choice-group.d.ts +5 -0
- package/lib/types/components/duet-combobox/duet-combobox.d.ts +49 -35
- package/lib/types/components/duet-input/duet-input.d.ts +30 -0
- package/lib/types/components/duet-menu-bar-button/duet-menu-bar-button.d.ts +1 -7
- package/lib/types/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.d.ts +1 -7
- package/lib/types/components/duet-menu-bar-link/duet-menu-bar-link.d.ts +1 -10
- package/lib/types/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.d.ts +1 -2
- package/lib/types/components/duet-submenu-bar-link/duet-submenu-bar-link.d.ts +1 -10
- package/lib/types/components.d.ts +45 -21
- package/package.json +2 -2
- package/lib/duet/p-0de8d0c0.system.entry.js +0 -4
- package/lib/duet/p-3f2d14e3.system.entry.js +0 -4
- package/lib/duet/p-7cf03aa8.system.js +0 -4
- package/lib/duet/p-8cc30578.entry.js +0 -4
- package/lib/duet/p-92e1181c.entry.js +0 -4
- package/lib/duet/p-9735b2f9.entry.js +0 -4
- package/lib/duet/p-985c0c67.system.entry.js +0 -4
- package/lib/duet/p-9be9b4d2.entry.js +0 -4
- package/lib/duet/p-9d27bc65.entry.js +0 -4
- package/lib/duet/p-afe29a3e.entry.js +0 -4
- package/lib/duet/p-bece15cd.system.entry.js +0 -4
- package/lib/duet/p-cba00852.entry.js +0 -4
- package/lib/duet/p-cc4a8964.entry.js +0 -4
- package/lib/duet/p-cc949a27.entry.js +0 -4
- package/lib/duet/p-d50ad3ed.entry.js +0 -4
- package/lib/duet/p-d87f6dd5.js +0 -4
- package/lib/duet/p-e614e39f.system.entry.js +0 -4
- package/lib/duet/p-e7fd0d14.entry.js +0 -4
- package/lib/duet/p-e86cafa6.system.entry.js +0 -4
- package/lib/duet/p-f1b01db9.system.entry.js +0 -4
- package/lib/duet/p-fa21a3b6.system.entry.js +0 -4
- package/lib/esm-es5/slot-utils-1115a819.js +0 -4
|
@@ -99,6 +99,11 @@ export declare class DuetChoiceGroup implements ThemeableComponent {
|
|
|
99
99
|
private onChoiceReady;
|
|
100
100
|
private onChoiceRemove;
|
|
101
101
|
private setInitialValue;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
* Get initial value
|
|
105
|
+
*/
|
|
106
|
+
getInitialValue(): Promise<string>;
|
|
102
107
|
/**
|
|
103
108
|
* Local methods
|
|
104
109
|
*/
|
|
@@ -9,7 +9,7 @@ export type DuetComboboxEvent = {
|
|
|
9
9
|
item: DuetComboboxItem;
|
|
10
10
|
};
|
|
11
11
|
export type DuetComboboxItem = {
|
|
12
|
-
id?:
|
|
12
|
+
id?: string;
|
|
13
13
|
value: any;
|
|
14
14
|
name: string;
|
|
15
15
|
html?: string;
|
|
@@ -23,27 +23,27 @@ export declare class DuetCombobox implements ThemeableComponent {
|
|
|
23
23
|
private resizeObserver;
|
|
24
24
|
element: HTMLDivElement;
|
|
25
25
|
processedItems: DuetComboboxItem[];
|
|
26
|
-
inputWidth: number;
|
|
27
26
|
inputValue: string;
|
|
28
|
-
selectionMsg: string;
|
|
29
27
|
listOpen: boolean;
|
|
30
|
-
selectedItems?: Set<
|
|
28
|
+
selectedItems?: Set<string>;
|
|
31
29
|
activeItem?: number;
|
|
32
30
|
activeItemHandler(state: any): void;
|
|
33
31
|
/**
|
|
34
|
-
*
|
|
35
|
-
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
32
|
+
* Defaults for the accessible labels for the select items
|
|
36
33
|
*/
|
|
37
34
|
accessibleLabelDefaults: DuetLangObject | string;
|
|
38
35
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @default {
|
|
41
|
-
* heading: "Valitse:",
|
|
42
|
-
* item: "{0}, ({1}/{2})",
|
|
43
|
-
* itemFiltered: "{0}, ({1}/{2} - {3} suodatettu"
|
|
44
|
-
* }
|
|
36
|
+
* Accessible labels for the select items
|
|
45
37
|
*/
|
|
46
38
|
accessibleLabels: Record<string, string>;
|
|
39
|
+
/**
|
|
40
|
+
* Label for the input if input is not provided as a slotted element.
|
|
41
|
+
*/
|
|
42
|
+
label: string;
|
|
43
|
+
/**
|
|
44
|
+
* Caption for the input if input is not provided as a slotted element.
|
|
45
|
+
*/
|
|
46
|
+
caption: string;
|
|
47
47
|
/**
|
|
48
48
|
* Theme of the combobox.
|
|
49
49
|
*/
|
|
@@ -54,7 +54,12 @@ export declare class DuetCombobox implements ThemeableComponent {
|
|
|
54
54
|
*/
|
|
55
55
|
force: boolean;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Allow multiple selections. Selections are displayed as DuetChips.
|
|
58
|
+
*/
|
|
59
|
+
multiple: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Array of item objects. Each item should have properties name, value and optionally id. If id is not provided, it will be generated.
|
|
62
|
+
* Alternatively, an array of strings can be provided, in which case the strings will be used for name, value and id.
|
|
58
63
|
*/
|
|
59
64
|
items: any;
|
|
60
65
|
/**
|
|
@@ -64,9 +69,9 @@ export declare class DuetCombobox implements ThemeableComponent {
|
|
|
64
69
|
*/
|
|
65
70
|
formatter: (item: DuetComboboxItem) => string;
|
|
66
71
|
/**
|
|
67
|
-
* Value of selected item/s
|
|
72
|
+
* Value of selected item/s. If multiple is true, value is an array of selected items, else it's a string.
|
|
68
73
|
*/
|
|
69
|
-
value: string;
|
|
74
|
+
value: string | string[];
|
|
70
75
|
/**
|
|
71
76
|
* Defines minimum number of characters that must be given to show search results
|
|
72
77
|
*/
|
|
@@ -89,9 +94,9 @@ export declare class DuetCombobox implements ThemeableComponent {
|
|
|
89
94
|
* @param item: DuetComboboxItem
|
|
90
95
|
*/
|
|
91
96
|
formatItem(item: DuetComboboxItem): Promise<string>;
|
|
92
|
-
processItems():
|
|
93
|
-
processValue():
|
|
94
|
-
processListOpenChange():
|
|
97
|
+
processItems(): void;
|
|
98
|
+
processValue(): void;
|
|
99
|
+
processListOpenChange(): void;
|
|
95
100
|
/**
|
|
96
101
|
* Component lifecycle events.
|
|
97
102
|
*/
|
|
@@ -99,36 +104,45 @@ export declare class DuetCombobox implements ThemeableComponent {
|
|
|
99
104
|
connectedCallback(): void;
|
|
100
105
|
disconnectedCallback(): void;
|
|
101
106
|
componentDidLoad(): void;
|
|
102
|
-
/**
|
|
103
|
-
* Updates the input text based on the selected/clicked items.
|
|
104
|
-
* @param event - event
|
|
105
|
-
*'param item: DuetComboboxItem - the item that was selected
|
|
106
|
-
*/
|
|
107
|
-
private onListClick;
|
|
108
107
|
/**
|
|
109
108
|
* Helper function that checks inputs in the field, compares it with the item list and returns true when inputvalue matches selectedItem id
|
|
110
|
-
* TODO: this should be disabled in multiple mode
|
|
111
109
|
*/
|
|
112
110
|
private shouldListBeFiltered;
|
|
113
111
|
/**
|
|
114
112
|
* Helper function that return correct collection depending on filter status returend by shouldListBeFiltered
|
|
115
113
|
*/
|
|
116
114
|
private returnFilteredOrNonFiltered;
|
|
115
|
+
private emitChangeEvent;
|
|
117
116
|
/**
|
|
118
|
-
* Updates the selected items
|
|
119
|
-
* @param id
|
|
120
|
-
* @private
|
|
117
|
+
* Updates the value after selected items have changed for multiple selection.
|
|
121
118
|
*/
|
|
122
|
-
private
|
|
119
|
+
private updateMultipleValue;
|
|
123
120
|
/**
|
|
124
|
-
*
|
|
125
|
-
|
|
121
|
+
* Add item with id to the selectedItems set. Used only when multiple is true.
|
|
122
|
+
*/
|
|
123
|
+
private addSelectedItem;
|
|
124
|
+
/**
|
|
125
|
+
* Remove item with id from the selectedItems set. Used only when multiple is true.
|
|
126
|
+
*/
|
|
127
|
+
private removeSelectedItem;
|
|
128
|
+
/**
|
|
129
|
+
* Updates the selected item based on the item id. Used only when multiple is false.
|
|
130
|
+
*/
|
|
131
|
+
private updateSelectedItem;
|
|
132
|
+
/**
|
|
133
|
+
* Add or remove chips of the input based on the selectedItems Set.
|
|
134
|
+
*/
|
|
135
|
+
private updateChips;
|
|
136
|
+
private getSelectedItemLabel;
|
|
137
|
+
/**
|
|
138
|
+
* Updates the input text when the combobox loses focus or when a selection is made.
|
|
126
139
|
*/
|
|
127
140
|
private updateInputText;
|
|
128
|
-
private
|
|
129
|
-
private
|
|
130
|
-
private
|
|
131
|
-
private
|
|
141
|
+
private onListClick;
|
|
142
|
+
private onInputChange;
|
|
143
|
+
private onInputClick;
|
|
144
|
+
private onInputTyping;
|
|
145
|
+
private onKeyDown;
|
|
132
146
|
private scrollToActive;
|
|
133
147
|
private formatLabel;
|
|
134
148
|
/**
|
|
@@ -151,6 +151,11 @@ export declare class DuetInput implements ThemeableComponent, InputComponent, A1
|
|
|
151
151
|
* Variation of button. Use "button" to render a button element next to the input. Use "revealable" to render a button that reveals the password.
|
|
152
152
|
*/
|
|
153
153
|
variation: DuetVariationType;
|
|
154
|
+
/**
|
|
155
|
+
* @internal
|
|
156
|
+
* Render a container for chips
|
|
157
|
+
*/
|
|
158
|
+
chips: boolean;
|
|
154
159
|
/**
|
|
155
160
|
* Label for the input.
|
|
156
161
|
*/
|
|
@@ -199,6 +204,7 @@ export declare class DuetInput implements ThemeableComponent, InputComponent, A1
|
|
|
199
204
|
*/
|
|
200
205
|
placeholder: string;
|
|
201
206
|
/**
|
|
207
|
+
* @internal
|
|
202
208
|
* Used internally in Duet to adjust whether this component acts as e.g. number input.
|
|
203
209
|
*/
|
|
204
210
|
component: DuetInputComponentType;
|
|
@@ -292,6 +298,30 @@ export declare class DuetInput implements ThemeableComponent, InputComponent, A1
|
|
|
292
298
|
* `input.resetCursor()`.
|
|
293
299
|
*/
|
|
294
300
|
clearInput(): Promise<void>;
|
|
301
|
+
private getAllChips;
|
|
302
|
+
/**
|
|
303
|
+
* @internal
|
|
304
|
+
* Add a chip to the input
|
|
305
|
+
*/
|
|
306
|
+
addChip(chip: HTMLDuetChipElement): Promise<void>;
|
|
307
|
+
/**
|
|
308
|
+
* @internal
|
|
309
|
+
* Does the input have a chip with the given value and text
|
|
310
|
+
*/
|
|
311
|
+
hasChip({ value, text }: {
|
|
312
|
+
value: string;
|
|
313
|
+
text: string;
|
|
314
|
+
}): Promise<boolean>;
|
|
315
|
+
/**
|
|
316
|
+
* @internal
|
|
317
|
+
* Get all chips from the input
|
|
318
|
+
*/
|
|
319
|
+
getChips(): Promise<HTMLDuetChipElement[]>;
|
|
320
|
+
/**
|
|
321
|
+
* @internal
|
|
322
|
+
* Remove all chips from the input
|
|
323
|
+
*/
|
|
324
|
+
clearChips(): Promise<void>;
|
|
295
325
|
/**
|
|
296
326
|
* render() function
|
|
297
327
|
* Always the last one in the class.
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { A11yComponent } from "../../common";
|
|
2
|
-
import {
|
|
2
|
+
import { DuetTheme } from "../../common-types";
|
|
3
3
|
import { ThemeableComponent } from "../../common/themeable-component";
|
|
4
4
|
export declare class DuetMenuBarButton implements ThemeableComponent, A11yComponent {
|
|
5
5
|
/**
|
|
6
6
|
* Own Properties.
|
|
7
7
|
*/
|
|
8
8
|
private nativeButton?;
|
|
9
|
-
private mql;
|
|
10
|
-
private boundMqlFunctions;
|
|
11
|
-
iconSize: DuetIconSize;
|
|
12
9
|
/**
|
|
13
10
|
* Reference to host HTML element.
|
|
14
11
|
*/
|
|
@@ -74,9 +71,6 @@ export declare class DuetMenuBarButton implements ThemeableComponent, A11yCompon
|
|
|
74
71
|
* Component lifecycle events.
|
|
75
72
|
*/
|
|
76
73
|
componentWillLoad(): void;
|
|
77
|
-
connectedCallback(): void;
|
|
78
|
-
disconnectedCallback(): void;
|
|
79
|
-
private changeIconSize;
|
|
80
74
|
/**
|
|
81
75
|
* Sets focus on underlying button element.
|
|
82
76
|
*/
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DuetTheme } from "../../common-types";
|
|
2
2
|
import { ThemeableComponent } from "../../common/themeable-component";
|
|
3
3
|
export declare class DuetMenuBarDropdown implements ThemeableComponent {
|
|
4
4
|
/**
|
|
5
5
|
* Own Properties.
|
|
6
6
|
*/
|
|
7
|
-
private mql;
|
|
8
|
-
private boundMqlFunctions;
|
|
9
7
|
private button;
|
|
10
|
-
iconSize: DuetIconSize;
|
|
11
8
|
/**
|
|
12
9
|
* Reference to host HTML element.
|
|
13
10
|
*/
|
|
@@ -35,9 +32,6 @@ export declare class DuetMenuBarDropdown implements ThemeableComponent {
|
|
|
35
32
|
* Component lifecycle events.
|
|
36
33
|
*/
|
|
37
34
|
componentWillLoad(): void;
|
|
38
|
-
connectedCallback(): void;
|
|
39
|
-
disconnectedCallback(): void;
|
|
40
|
-
private changeIconSize;
|
|
41
35
|
private onClick;
|
|
42
36
|
private getVariant;
|
|
43
37
|
private handleEscape;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DuetTheme } from "../../common-types";
|
|
2
2
|
import { ThemeableComponent } from "../../common/themeable-component";
|
|
3
3
|
export declare class DuetMenuBarLink implements ThemeableComponent {
|
|
4
|
-
/**
|
|
5
|
-
* Own Properties.
|
|
6
|
-
*/
|
|
7
|
-
private mql;
|
|
8
|
-
private boundMqlFunctions;
|
|
9
|
-
iconSize: DuetIconSize;
|
|
10
4
|
/**
|
|
11
5
|
* Reference to host HTML element.
|
|
12
6
|
*/
|
|
@@ -37,9 +31,6 @@ export declare class DuetMenuBarLink implements ThemeableComponent {
|
|
|
37
31
|
* Component lifecycle events.
|
|
38
32
|
*/
|
|
39
33
|
componentWillLoad(): void;
|
|
40
|
-
connectedCallback(): void;
|
|
41
|
-
disconnectedCallback(): void;
|
|
42
|
-
private changeIconSize;
|
|
43
34
|
/**
|
|
44
35
|
* render() function
|
|
45
36
|
* Always the last one in the class.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DuetTheme } from "../../common-types";
|
|
2
2
|
import { ThemeableComponent } from "../../common/themeable-component";
|
|
3
3
|
export declare class DuetSubmenuBarDropdown implements ThemeableComponent {
|
|
4
4
|
/**
|
|
@@ -8,7 +8,6 @@ export declare class DuetSubmenuBarDropdown implements ThemeableComponent {
|
|
|
8
8
|
private boundMqlFunctions;
|
|
9
9
|
private button;
|
|
10
10
|
isDesktop: boolean;
|
|
11
|
-
iconSize: DuetIconSize;
|
|
12
11
|
/**
|
|
13
12
|
* Reference to host HTML element.
|
|
14
13
|
*/
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DuetTheme } from "../../common-types";
|
|
2
2
|
import { ThemeableComponent } from "../../common/themeable-component";
|
|
3
3
|
export declare class DuetSubmenuBarLink implements ThemeableComponent {
|
|
4
|
-
/**
|
|
5
|
-
* Own Properties.
|
|
6
|
-
*/
|
|
7
|
-
private mql;
|
|
8
|
-
private boundMqlFunctions;
|
|
9
|
-
iconSize: DuetIconSize;
|
|
10
4
|
/**
|
|
11
5
|
* Reference to host HTML element.
|
|
12
6
|
*/
|
|
@@ -31,9 +25,6 @@ export declare class DuetSubmenuBarLink implements ThemeableComponent {
|
|
|
31
25
|
* Component lifecycle events.
|
|
32
26
|
*/
|
|
33
27
|
componentWillLoad(): void;
|
|
34
|
-
connectedCallback(): void;
|
|
35
|
-
disconnectedCallback(): void;
|
|
36
|
-
private changeIconSize;
|
|
37
28
|
private handleEscape;
|
|
38
29
|
/**
|
|
39
30
|
* render() function
|
|
@@ -978,6 +978,7 @@ export namespace Components {
|
|
|
978
978
|
* Display choice group in error state along with an error message.
|
|
979
979
|
*/
|
|
980
980
|
"error": string;
|
|
981
|
+
"getInitialValue": () => Promise<string>;
|
|
981
982
|
/**
|
|
982
983
|
* Legend displayed for the choice buttons in this group.
|
|
983
984
|
*/
|
|
@@ -1067,15 +1068,17 @@ export namespace Components {
|
|
|
1067
1068
|
}
|
|
1068
1069
|
interface DuetCombobox {
|
|
1069
1070
|
/**
|
|
1070
|
-
*
|
|
1071
|
-
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
1071
|
+
* Defaults for the accessible labels for the select items
|
|
1072
1072
|
*/
|
|
1073
1073
|
"accessibleLabelDefaults": DuetLangObject | string;
|
|
1074
1074
|
/**
|
|
1075
|
-
*
|
|
1076
|
-
* @default { heading: "Valitse:", item: "{0}, ({1}/{2})", itemFiltered: "{0}, ({1}/{2} - {3} suodatettu" }
|
|
1075
|
+
* Accessible labels for the select items
|
|
1077
1076
|
*/
|
|
1078
1077
|
"accessibleLabels": Record<string, string>;
|
|
1078
|
+
/**
|
|
1079
|
+
* Caption for the input if input is not provided as a slotted element.
|
|
1080
|
+
*/
|
|
1081
|
+
"caption": string;
|
|
1079
1082
|
/**
|
|
1080
1083
|
* Defines if filtering of items should be done by includes or startsWith
|
|
1081
1084
|
*/
|
|
@@ -1096,13 +1099,21 @@ export namespace Components {
|
|
|
1096
1099
|
*/
|
|
1097
1100
|
"formatter": (item: DuetComboboxItem) => string;
|
|
1098
1101
|
/**
|
|
1099
|
-
* Array of item objects.
|
|
1102
|
+
* Array of item objects. Each item should have properties name, value and optionally id. If id is not provided, it will be generated. Alternatively, an array of strings can be provided, in which case the strings will be used for name, value and id.
|
|
1100
1103
|
*/
|
|
1101
1104
|
"items": any;
|
|
1105
|
+
/**
|
|
1106
|
+
* Label for the input if input is not provided as a slotted element.
|
|
1107
|
+
*/
|
|
1108
|
+
"label": string;
|
|
1102
1109
|
/**
|
|
1103
1110
|
* Defines minimum number of characters that must be given to show search results
|
|
1104
1111
|
*/
|
|
1105
1112
|
"minCharacters": number;
|
|
1113
|
+
/**
|
|
1114
|
+
* Allow multiple selections. Selections are displayed as DuetChips.
|
|
1115
|
+
*/
|
|
1116
|
+
"multiple": boolean;
|
|
1106
1117
|
/**
|
|
1107
1118
|
* Defines if items list should always open after clicking on input
|
|
1108
1119
|
*/
|
|
@@ -1112,9 +1123,9 @@ export namespace Components {
|
|
|
1112
1123
|
*/
|
|
1113
1124
|
"theme": DuetTheme;
|
|
1114
1125
|
/**
|
|
1115
|
-
* Value of selected item/s
|
|
1126
|
+
* Value of selected item/s. If multiple is true, value is an array of selected items, else it's a string.
|
|
1116
1127
|
*/
|
|
1117
|
-
"value": string;
|
|
1128
|
+
"value": string | string[];
|
|
1118
1129
|
}
|
|
1119
1130
|
interface DuetContactCard {
|
|
1120
1131
|
/**
|
|
@@ -1892,6 +1903,7 @@ export namespace Components {
|
|
|
1892
1903
|
* Indicates the id of a component owned by the input.
|
|
1893
1904
|
*/
|
|
1894
1905
|
"accessibleOwns": string;
|
|
1906
|
+
"addChip": (chip: HTMLDuetChipElement) => Promise<void>;
|
|
1895
1907
|
/**
|
|
1896
1908
|
* Enable or disable automatic completion by the browser
|
|
1897
1909
|
*/
|
|
@@ -1900,17 +1912,16 @@ export namespace Components {
|
|
|
1900
1912
|
* Caption (underneath label) that can be set as a way of adding extra information
|
|
1901
1913
|
*/
|
|
1902
1914
|
"caption": string;
|
|
1915
|
+
"chips": boolean;
|
|
1903
1916
|
/**
|
|
1904
1917
|
* If set, the input field will display a clear button that can be accessed with tabbing.
|
|
1905
1918
|
*/
|
|
1906
1919
|
"clear": boolean;
|
|
1920
|
+
"clearChips": () => Promise<void>;
|
|
1907
1921
|
/**
|
|
1908
1922
|
* Reset the cursor position on the native element `input.resetCursor()`.
|
|
1909
1923
|
*/
|
|
1910
1924
|
"clearInput": () => Promise<void>;
|
|
1911
|
-
/**
|
|
1912
|
-
* Used internally in Duet to adjust whether this component acts as e.g. number input.
|
|
1913
|
-
*/
|
|
1914
1925
|
"component": DuetInputComponentType;
|
|
1915
1926
|
/**
|
|
1916
1927
|
* Set the amount of time, in milliseconds, to wait to trigger the duetChange event after each keystroke.
|
|
@@ -1936,6 +1947,8 @@ export namespace Components {
|
|
|
1936
1947
|
* Expands the input to fill 100% of the container width.
|
|
1937
1948
|
*/
|
|
1938
1949
|
"expand": boolean;
|
|
1950
|
+
"getChips": () => Promise<HTMLDuetChipElement[]>;
|
|
1951
|
+
"hasChip": ({ value, text }: { value: string; text: string; }) => Promise<boolean>;
|
|
1939
1952
|
/**
|
|
1940
1953
|
* Icon to display on the right side (from Duet’s icons). Example: "form-location"
|
|
1941
1954
|
*/
|
|
@@ -5297,6 +5310,7 @@ declare global {
|
|
|
5297
5310
|
};
|
|
5298
5311
|
interface HTMLDuetChipElementEventMap {
|
|
5299
5312
|
"duetChange": DuetChipEvent;
|
|
5313
|
+
"duetRemove": DuetChipEvent;
|
|
5300
5314
|
"duetFocus": DuetChipEvent;
|
|
5301
5315
|
"duetBlur": DuetChipEvent;
|
|
5302
5316
|
}
|
|
@@ -7017,6 +7031,10 @@ declare namespace LocalJSX {
|
|
|
7017
7031
|
* Emitted when the chip receives focus.
|
|
7018
7032
|
*/
|
|
7019
7033
|
"onDuetFocus"?: (event: DuetChipCustomEvent<DuetChipEvent>) => void;
|
|
7034
|
+
/**
|
|
7035
|
+
* Emitted when an input chip is removed.
|
|
7036
|
+
*/
|
|
7037
|
+
"onDuetRemove"?: (event: DuetChipCustomEvent<DuetChipEvent>) => void;
|
|
7020
7038
|
/**
|
|
7021
7039
|
* Id of the DuetPopupMenu that is controlled by the chip.
|
|
7022
7040
|
*/
|
|
@@ -7294,15 +7312,17 @@ declare namespace LocalJSX {
|
|
|
7294
7312
|
}
|
|
7295
7313
|
interface DuetCombobox {
|
|
7296
7314
|
/**
|
|
7297
|
-
*
|
|
7298
|
-
* @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
|
|
7315
|
+
* Defaults for the accessible labels for the select items
|
|
7299
7316
|
*/
|
|
7300
7317
|
"accessibleLabelDefaults"?: DuetLangObject | string;
|
|
7301
7318
|
/**
|
|
7302
|
-
*
|
|
7303
|
-
* @default { heading: "Valitse:", item: "{0}, ({1}/{2})", itemFiltered: "{0}, ({1}/{2} - {3} suodatettu" }
|
|
7319
|
+
* Accessible labels for the select items
|
|
7304
7320
|
*/
|
|
7305
7321
|
"accessibleLabels"?: Record<string, string>;
|
|
7322
|
+
/**
|
|
7323
|
+
* Caption for the input if input is not provided as a slotted element.
|
|
7324
|
+
*/
|
|
7325
|
+
"caption"?: string;
|
|
7306
7326
|
/**
|
|
7307
7327
|
* Defines if filtering of items should be done by includes or startsWith
|
|
7308
7328
|
*/
|
|
@@ -7318,13 +7338,21 @@ declare namespace LocalJSX {
|
|
|
7318
7338
|
*/
|
|
7319
7339
|
"formatter"?: (item: DuetComboboxItem) => string;
|
|
7320
7340
|
/**
|
|
7321
|
-
* Array of item objects.
|
|
7341
|
+
* Array of item objects. Each item should have properties name, value and optionally id. If id is not provided, it will be generated. Alternatively, an array of strings can be provided, in which case the strings will be used for name, value and id.
|
|
7322
7342
|
*/
|
|
7323
7343
|
"items"?: any;
|
|
7344
|
+
/**
|
|
7345
|
+
* Label for the input if input is not provided as a slotted element.
|
|
7346
|
+
*/
|
|
7347
|
+
"label"?: string;
|
|
7324
7348
|
/**
|
|
7325
7349
|
* Defines minimum number of characters that must be given to show search results
|
|
7326
7350
|
*/
|
|
7327
7351
|
"minCharacters"?: number;
|
|
7352
|
+
/**
|
|
7353
|
+
* Allow multiple selections. Selections are displayed as DuetChips.
|
|
7354
|
+
*/
|
|
7355
|
+
"multiple"?: boolean;
|
|
7328
7356
|
/**
|
|
7329
7357
|
* Emitted when selected item changed.
|
|
7330
7358
|
*/
|
|
@@ -7338,9 +7366,9 @@ declare namespace LocalJSX {
|
|
|
7338
7366
|
*/
|
|
7339
7367
|
"theme"?: DuetTheme;
|
|
7340
7368
|
/**
|
|
7341
|
-
* Value of selected item/s
|
|
7369
|
+
* Value of selected item/s. If multiple is true, value is an array of selected items, else it's a string.
|
|
7342
7370
|
*/
|
|
7343
|
-
"value"?: string;
|
|
7371
|
+
"value"?: string | string[];
|
|
7344
7372
|
}
|
|
7345
7373
|
interface DuetContactCard {
|
|
7346
7374
|
/**
|
|
@@ -8208,10 +8236,6 @@ declare namespace LocalJSX {
|
|
|
8208
8236
|
* If set, the input field will display a clear button that can be accessed with tabbing.
|
|
8209
8237
|
*/
|
|
8210
8238
|
"clear"?: boolean;
|
|
8211
|
-
/**
|
|
8212
|
-
* Used internally in Duet to adjust whether this component acts as e.g. number input.
|
|
8213
|
-
*/
|
|
8214
|
-
"component"?: DuetInputComponentType;
|
|
8215
8239
|
/**
|
|
8216
8240
|
* Set the amount of time, in milliseconds, to wait to trigger the duetChange event after each keystroke.
|
|
8217
8241
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duetds/components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.1",
|
|
4
4
|
"description": "This package includes Duet Design System Web Components and related utilities.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "duetdesignsystem@lahitapiola.fi"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"collection": "lib/collection/collection-manifest.json",
|
|
76
76
|
"es2015": "lib/esm/index.js",
|
|
77
77
|
"es2017": "lib/esm/index.js",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "45d1ef810b411d30818cdfdd5ae84674f8027641"
|
|
79
79
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,o){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function u(t){try{s(o["throw"](t))}catch(t){i(t)}}function s(t){t.done?n(t.value):r(t.value).then(a,u)}s((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(e){return s([t,e])}}function s(u){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(n=0)),n)try{if(o=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1];i=u;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(u);break}if(i[2])n.ops.pop();n.trys.pop();continue}u=e.call(t,n)}catch(t){u=[6,t];r=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
|
-
/*!
|
|
3
|
-
* Built with Duet Design System
|
|
4
|
-
*/System.register(["./p-9644775c.system.js","./p-1c689a26.system.js","./p-50f4bca2.system.js","./p-34d7dd10.system.js"],(function(t){"use strict";var e,n,o,r,i,a,u;return{setters:[function(t){e=t.r;n=t.h;o=t.H;r=t.g},function(t){i=t.a},function(t){a=t.i},function(t){u=t.f}],execute:function(){var s='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;height:100%}@media (min-width: 62em){:host(:last-child) .duet-menu-bar-dropdown button{padding:0 16px 0 16px}}@media (min-width: 76.25em){:host(:last-child) .duet-menu-bar-dropdown button{padding:0 16px 0 28px}}.duet-menu-bar-dropdown{position:relative;height:100%}.duet-menu-bar-dropdown button{position:relative;display:flex;gap:8px;align-items:center;justify-content:center;height:100%;padding:0 12px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:rgb(0, 77, 128);text-align:center;text-decoration:none;cursor:pointer}@media (min-width: 62em){.duet-menu-bar-dropdown button{padding:0 16px}}@media (min-width: 76.25em){.duet-menu-bar-dropdown button{padding:0 28px}}.duet-menu-bar-dropdown button:hover{color:rgb(0, 119, 179)}.duet-menu-bar-dropdown button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-menu-bar-dropdown button .label{display:flex;gap:0.5rem;align-items:center;justify-content:center}.duet-menu-bar-dropdown button.active{color:rgb(0, 119, 179)}.duet-menu-bar-dropdown button.active .caret{transform:rotate(180deg)}.duet-theme-turva .duet-menu-bar-dropdown button.active{color:rgb(198, 12, 48)}.duet-menu-bar-dropdown button.active::after{position:absolute;top:auto;bottom:2px;left:0;display:block;width:100%;height:2px;content:"";background:rgb(0, 119, 179);transition:300ms ease;transform:translateY(2px)}.duet-theme-turva .duet-menu-bar-dropdown button.active::after{background:rgb(198, 12, 48)}.duet-menu-bar-dropdown .items{position:absolute;top:70%;right:0%;left:auto;z-index:600;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:225px;padding:8px;color:rgb(0, 41, 77);background:rgb(255, 255, 255);border-radius:8px;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.07), 0 4px 10px 0 rgba(0, 41, 77, 0.15)}.duet-menu-bar-dropdown .items.hidden{display:none}.duet-menu-bar-dropdown.duet-theme-turva button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-menu-bar-dropdown.duet-theme-turva button:hover{color:rgb(198, 12, 48)}.duet-menu-bar-dropdown.duet-theme-turva button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-menu-bar-dropdown.duet-theme-turva button.active{color:rgb(198, 12, 48)}.duet-menu-bar-dropdown.duet-theme-turva button.active::after{background:rgb(198, 12, 48)}.duet-menu-bar-dropdown.duet-theme-turva .items{background:rgb(255, 255, 255)}';var d=t("duet_menu_bar_dropdown",function(){function t(t){var n=this;e(this,t);this.mql=[window.matchMedia(i.replace(/'/g,""))];this.boundMqlFunctions=[];this.changeIconSize=function(){if(n.mql[0].matches){n.iconSize="x-small"}else{n.iconSize="small"}};this.onClick=function(){n.open=!n.open};this.getVariant=function(){var t=n.element.parentElement.getAttribute("slot");switch(t){case"center":return"right";case"right":return"right";default:return"right"}};this.iconSize="x-small";this.accessibleLabel=undefined;this.theme="";this.open=false;this.icon=undefined}t.prototype.handleFocus=function(t){var e=this;var n=t.composedPath().every((function(t){return t!==e.element}));if(n){this.open=false}};t.prototype.componentWillLoad=function(){a(this)};t.prototype.connectedCallback=function(){this.changeIconSize();for(var t=0;t<this.mql.length;t++){if(this.mql[t].addEventListener){var e=this.changeIconSize.bind(this);this.mql[t].addEventListener("change",e);this.boundMqlFunctions[t]=e}}};t.prototype.disconnectedCallback=function(){for(var t=0;t<this.mql.length;t++){if(this.mql[t].removeEventListener){this.mql[t].removeEventListener("change",this.boundMqlFunctions[t])}}this.boundMqlFunctions=[]};t.prototype.handleEscape=function(t){if(u(t)){this.open=false;this.setFocus()}};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.button.focus(t);return[2]}))}))};t.prototype.render=function(){var t;var e=this;return n(o,{role:"listitem"},n("div",{class:(t={"duet-menu-bar-dropdown":true,"duet-theme-turva":this.theme==="turva",active:this.open},t["duet-menu-bar-dropdown--slot-".concat(this.getVariant())]=true,t)},n("button",{ref:function(t){return e.button=t},"aria-label":this.accessibleLabel,"aria-haspopup":"menu","aria-controls":"menu","aria-expanded":this.open?"true":"false",id:"button",type:"button",class:{active:this.open},onClick:this.onClick,onKeyUp:function(t){return e.handleEscape(t)}},this.icon&&n("duet-icon",{theme:this.theme,name:this.icon,size:this.iconSize,margin:"none",color:"currentColor"}),n("div",{class:"label"},n("slot",{name:"label"}),n("duet-icon",{class:"caret",theme:this.theme,name:"action-arrow-down-small",margin:"none",size:"xxx-small",color:"currentColor"}))),n("div",{tabindex:"-1",role:"menu",id:"menu","aria-labelledby":"button",class:{items:true,hidden:!this.open}},n("slot",null))))};Object.defineProperty(t.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());d.style=s}}}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
System.register(["./p-9644775c.system.js","./p-1c689a26.system.js","./p-50f4bca2.system.js","./p-34d7dd10.system.js"],(function(e){"use strict";var t,n,i,a,r,o,s;return{setters:[function(e){t=e.r;n=e.h;i=e.H;a=e.g},function(e){r=e.a},function(e){o=e.i},function(e){s=e.f}],execute:function(){var u='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%}@media (min-width: 62em){:host{width:auto}}.duet-submenu-bar-link{display:flex;flex-direction:row;gap:16px;align-items:center;justify-content:flex-start;height:100%;padding:12px 1.5rem;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.25;color:rgb(0, 41, 77);text-align:center;text-decoration:none}.duet-submenu-bar-link:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-submenu-bar-link:focus,.duet-submenu-bar-link:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 62em){.duet-submenu-bar-link{flex-direction:column;gap:5px;align-items:center;justify-content:center;font-size:0.875rem;color:rgb(0, 77, 128)}}@media (min-width: 62em){.duet-submenu-bar-link.active{color:rgb(0, 119, 179)}.duet-submenu-bar-link.active.duet-theme-turva{color:rgb(148, 9, 37)}}.duet-submenu-bar-link.active .label{position:relative}.duet-submenu-bar-link.active .label::after{position:absolute;top:auto;bottom:0;left:0;display:block;width:100%;height:1px;content:"";background:rgb(0, 119, 179);transform:1px}@media (min-width: 62em){.duet-submenu-bar-link.active .label::after{display:none}.duet-submenu-bar-link.active::after{position:absolute;top:auto;bottom:0;left:0;display:block;width:100%;height:1px;content:"";background:rgb(0, 119, 179);transition:300ms ease;transform:translateY(1px)}}.duet-submenu-bar-link.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-submenu-bar-link.duet-theme-turva.active .label::after{background:rgb(148, 9, 37)}.duet-submenu-bar-link.duet-theme-turva.active::after{background:rgb(148, 9, 37)}@media (min-width: 62em){.duet-submenu-bar-link:hover{color:rgb(0, 41, 77);background:rgb(230, 242, 248)}.duet-submenu-bar-link:hover.duet-theme-turva{color:rgb(23, 28, 58);background:rgb(228, 228, 230)}.duet-submenu-bar-link:hover.duet-theme-turva.active{color:rgb(148, 9, 37)}}';var l=e("duet_submenu_bar_link",function(){function e(e){var n=this;t(this,e);this.mql=[window.matchMedia(r.replace(/'/g,""))];this.boundMqlFunctions=[];this.changeIconSize=function(){if(n.mql[0].matches){n.iconSize="x-small"}else{n.iconSize="small"}};this.iconSize="small";this.theme="";this.active=false;this.href="#";this.icon=undefined}e.prototype.componentWillLoad=function(){o(this)};e.prototype.connectedCallback=function(){this.changeIconSize();for(var e=0;e<this.mql.length;e++){if(this.mql[e].addEventListener){var t=this.changeIconSize.bind(this);this.mql[e].addEventListener("change",t);this.boundMqlFunctions[e]=t}}};e.prototype.disconnectedCallback=function(){for(var e=0;e<this.mql.length;e++){if(this.mql[e].removeEventListener){this.mql[e].removeEventListener("change",this.boundMqlFunctions[e])}}this.boundMqlFunctions=[]};e.prototype.handleEscape=function(e){if(s(e)){var t=this.element.closest("duet-submenu-bar");t.open=false;t.setFocus()}};e.prototype.render=function(){var e=this;return n(i,null,n("a",{class:{"duet-submenu-bar-link":true,"duet-theme-turva":this.theme==="turva",active:this.active},href:this.href,onKeyUp:function(t){return e.handleEscape(t)},"aria-current":this.active?"true":"false"},this.icon&&n("duet-icon",{theme:this.theme,name:this.icon,size:this.iconSize,margin:"none",color:"currentColor"}),n("span",{class:"label"},n("slot",null))))};Object.defineProperty(e.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());l.style=u}}}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
System.register([],(function(n){"use strict";return{execute:function(){var r=function(n,r){var e=Array.from(n.querySelectorAll(":scope > *"));return e.filter((function(n){return n.matches("[slot='".concat(r,"']"))}))};var e=n("g",(function(n){var r=Array.from(n.querySelectorAll(":scope > *"));return r.filter((function(n){return!n.getAttribute("slot")}))}));var t=n("h",(function(n,e){return r(n,e).length>0}));var u=n("c",(function(n,e,t,u,o){if(u===void 0){u=0}if(o===void 0){o=false}var i=o?"error":"warn";var f=[];var a=r(n,e);var c=a.filter((function(n){if(n.matches(t)){return true}f.push('Only elements matcing selector "'.concat(t,'" may be used in slot ').concat(e,", found:\n").concat(n.outerHTML));if(o){n.remove();return false}return true}));if(u&&c.length>u){f.push("Only ".concat(u," element").concat(u>1?"s":""," may be used in slot ").concat(e,", found ").concat(a.length,"."));if(o){c.slice(u).forEach((function(n){return n.remove()}))}}if(f.length>0){console[i]("Duet ".concat(i," in ").concat(n.tagName.toLowerCase(),":\n").concat(f.join("\n")).concat(o?"\nElement".concat(f.length>1?"s":""," removed."):""))}}))}}}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,h as e,H as o,g as n}from"./p-83e9058b.js";import{a}from"./p-f9a8d356.js";import{i as r}from"./p-a58bd561.js";import{f as i}from"./p-a1b7f2a0.js";const d=class{constructor(e){t(this,e),this.mql=[window.matchMedia(a.replace(/'/g,""))],this.boundMqlFunctions=[],this.checkIsDesktop=()=>{this.mql[0].matches?(this.isDesktop=!0,this.iconSize="x-small"):(this.isDesktop=!1,this.iconSize="small")},this.onClick=()=>{const t=this.open;if(!this.isDesktop){const t=Array.from(this.element.parentElement.querySelectorAll("duet-submenu-bar-dropdown"));for(const e of t)e.open=!1}this.open=!t},this.isDesktop=!1,this.iconSize="small",this.theme="",this.active=!1,this.open=!1,this.icon=void 0}handleFocus(t){t.composedPath().every((t=>t!==this.element))&&this.isDesktop&&(this.open=!1)}componentWillLoad(){r(this)}connectedCallback(){this.checkIsDesktop();for(let t=0;t<this.mql.length;t++)if(this.mql[t].addEventListener){const e=this.checkIsDesktop.bind(this);this.mql[t].addEventListener("change",e),this.boundMqlFunctions[t]=e}}disconnectedCallback(){for(let t=0;t<this.mql.length;t++)this.mql[t].removeEventListener&&this.mql[t].removeEventListener("change",this.boundMqlFunctions[t]);this.boundMqlFunctions=[]}handleEscape(t){if(i(t))if(this.open)this.open=!1;else{const t=this.element.closest("duet-submenu-bar");t.open=!1,t.setFocus()}}async setFocus(t){this.button.focus(t)}render(){return e(o,null,e("div",{class:{"duet-submenu-bar-dropdown":!0,"duet-theme-turva":"turva"===this.theme,open:this.open,active:this.active}},e("button",{ref:t=>this.button=t,"aria-haspopup":"menu","aria-controls":"menu","aria-expanded":this.open?"true":"false","aria-current":this.active?"true":"false",id:"button",type:"button",class:{open:this.open,active:this.active},onClick:this.onClick,onKeyUp:t=>this.handleEscape(t)},this.icon&&e("duet-icon",{theme:this.theme,name:this.icon,size:this.iconSize,margin:"none",color:"currentColor"}),e("div",{class:"label"},e("span",{class:"label-text"},e("slot",{name:"label"})),e("duet-icon",{class:"caret",theme:this.theme,name:"action-arrow-down-small",margin:"none",size:"xxx-small",color:"currentColor"}))),e("div",{tabindex:"-1",role:"menu",id:"menu","aria-labelledby":"button",class:{items:!0,hidden:!this.open}},e("slot",null))))}get element(){return n(this)}};d.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%}@media (min-width: 62em){:host{width:auto}}.duet-submenu-bar-dropdown{position:relative;height:100%}.duet-submenu-bar-dropdown button{position:relative;display:flex;flex-direction:row;gap:16px;align-items:center;justify-content:flex-start;width:100%;height:100%;padding:12px 1.5rem;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.25;color:rgb(0, 41, 77);text-align:center;text-decoration:none;cursor:pointer}@media (min-width: 62em){.duet-submenu-bar-dropdown button{flex-direction:column;gap:5px;align-items:center;justify-content:center;width:auto;font-size:0.875rem;color:rgb(0, 77, 128)}}.duet-submenu-bar-dropdown button .label{display:flex;gap:5px;align-items:center;justify-content:center}@media (min-width: 62em){.duet-submenu-bar-dropdown button.open{background:rgb(230, 242, 248)}}.duet-submenu-bar-dropdown button.open .caret{transform:rotate(180deg)}.duet-submenu-bar-dropdown button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-submenu-bar-dropdown button.active .label-text{position:relative}.duet-submenu-bar-dropdown button.active .label-text::after{position:absolute;top:auto;bottom:0;left:0;display:block;width:100%;height:1px;content:"";background:rgb(0, 119, 179);transform:1px}@media (min-width: 62em){.duet-submenu-bar-dropdown button.active .label-text::after{display:none}}@media (min-width: 62em){.duet-submenu-bar-dropdown button .caret{position:absolute;right:12px}.duet-submenu-bar-dropdown button:hover{color:rgb(0, 41, 77);background:rgb(230, 242, 248)}.duet-submenu-bar-dropdown button:hover.active{color:rgb(0, 41, 77)}.duet-theme-turva .duet-submenu-bar-dropdown button:hover.active{color:rgb(23, 28, 58)}.duet-submenu-bar-dropdown button.active{color:rgb(0, 119, 179)}.duet-theme-turva .duet-submenu-bar-dropdown button.active{color:rgb(198, 12, 48)}.duet-submenu-bar-dropdown button.active::after,.duet-submenu-bar-dropdown button.open::after{position:absolute;top:auto;bottom:0;left:0;display:block;width:100%;height:1px;content:"";background:rgb(0, 119, 179);transition:300ms ease;transform:translateY(1px)}.duet-theme-turva .duet-submenu-bar-dropdown button.active::after,.duet-theme-turva .duet-submenu-bar-dropdown button.open::after{background:rgb(198, 12, 48)}}.duet-submenu-bar-dropdown .items{display:flex;flex-direction:column;align-items:center;justify-content:center;max-height:1000px;padding:4px 0 16px;overflow-y:auto;color:rgb(0, 41, 77);visibility:visible;transition:max-height 0.3s ease-in, padding 0.3s ease-in;-ms-overflow-style:none;scrollbar-width:none}.duet-submenu-bar-dropdown .items::-webkit-scrollbar{display:none}@media (min-width: 62em){.duet-submenu-bar-dropdown .items{position:absolute;top:93%;z-index:600;min-width:320px;padding:8px;background:rgb(255, 255, 255);border-radius:8px;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.07), 0 4px 10px 0 rgba(0, 41, 77, 0.15);transition:none}}.duet-submenu-bar-dropdown .items.hidden{max-height:0;padding:0;overflow:hidden;visibility:hidden;transition:max-height 0.3s ease-in, padding 0.3s ease-in}.duet-submenu-bar-dropdown.duet-theme-turva button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}@media (min-width: 62em){.duet-submenu-bar-dropdown.duet-theme-turva button:hover{background:rgb(228, 228, 230)}}.duet-submenu-bar-dropdown.duet-theme-turva button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-submenu-bar-dropdown.duet-theme-turva button.active .label-text::after,.duet-submenu-bar-dropdown.duet-theme-turva button.open .label-text::after{background:rgb(198, 12, 48)}@media (min-width: 62em){.duet-submenu-bar-dropdown.duet-theme-turva button.active,.duet-submenu-bar-dropdown.duet-theme-turva button.open{color:rgb(148, 9, 37)}}.duet-submenu-bar-dropdown.duet-theme-turva button.active::after,.duet-submenu-bar-dropdown.duet-theme-turva button.open::after{background:rgb(148, 9, 37)}@media (min-width: 62em){.duet-submenu-bar-dropdown.duet-theme-turva button.open{background:rgb(228, 228, 230)}}@media (min-width: 62em){.duet-submenu-bar-dropdown.duet-theme-turva .items{background:rgb(255, 255, 255)}}';export{d as duet_submenu_bar_dropdown}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as e,h as i,H as s,g as n}from"./p-83e9058b.js";import{i as u}from"./p-a58bd561.js";import{c as r}from"./p-5e59e970.js";import{a,b as o,c as h,d,e as b,s as l,u as c}from"./p-a1b7f2a0.js";import{a as p,b as m,g,c as f,d as v}from"./p-2e36d5bf.js";import{c as x}from"./p-d87f6dd5.js";import"./p-0e052642.js";function w(t,e){let i;if("string"==typeof t){if(""===t)return null;let s=t.replace("−","-").replace("‐","-").replace("−","-").replace("–","-").replace("—","-");e&&(s=function(t,e,i=!1){let s;const n=new Intl.NumberFormat(e).format(.5).replace(/[0-9]/g,""),u=new Intl.NumberFormat("en-US").format(.5).replace(/[0-9]/g,""),r=new Intl.NumberFormat(e).format(1e3).replace(/[0-9]/g,""),a=new Intl.NumberFormat("en-US").format(1e3).replace(/[0-9]/g,"");return s=t.replace(n,"DECIMALSEPARATOR"),s=s.replace(r,i?"THOUSANDSEPARATOR":""),s=s.replace("DECIMALSEPARATOR",u),s=s.replace("THOUSANDSEPARATOR",a),s}(s,e,!1)),s=s.replace(/\s+/g,""),i=parseFloat(s)}if("number"==typeof t&&(i=parseFloat(String(t))),!isNaN(Number(i)))return Number(i);if(null==t)return null;throw new Error("Invalid value passed to SafeParseFloat")}const y=(t,e,i)=>Math.min(Math.max(t,e),i),A=class{constructor(i){t(this,i),this.duetChange=e(this,"duetChange",3),this.duetInput=e(this,"duetInput",3),this.duetBlur=e(this,"duetBlur",7),this.duetFocus=e(this,"duetFocus",7),this.inputId=r("DuetInput"),this.handleFocus=()=>{this.focusedValue=this.value},this.handleKeyDown=t=>{a(t)||o(t)?this.add(t):h(t)||d(t)?this.subtract(t):b(t)&&this.clearValue()},this.handleChange=t=>{const e=t.target;if(e&&e.value)try{let i=w(e.value,this.locale);(isNaN(i)||null==i)&&(i=this.min||0),this.setValue(i),this.duetInput.emit({component:"duet-number-input",originalEvent:t,value:w(this.value,this.locale).toString(),valueAsNumber:i})}catch(e){this.duetInput.emit({component:"duet-number-input",originalEvent:t,value:null,valueAsNumber:null})}else this.duetInput.emit({component:"duet-number-input",originalEvent:t,value:null,valueAsNumber:null})},this.handleBlur=t=>{const e=t.target;var i;if(e)if(e.value)try{let s=w(e.value,this.locale);this.rounding&&(i=this.step,s=Math.round(s/i)*i),s=y(s,this.min,this.max),s===w(this.value,this.locale)&&s===w(this.focusedValue,this.locale)||(this.setValue(s),this.emitChange(t))}catch(e){this.emitNull(t)}else this.emitNull(t)},this.emitChange=t=>{const e=w(this.value,this.locale);this.duetChange.emit({originalEvent:t,value:e.toString(),valueAsNumber:e,component:"duet-number-input"})},this.emitNull=t=>{this.duetChange.emit({originalEvent:t,value:null,valueAsNumber:null,component:"duet-number-input"})},this.localizeValue=t=>t.toLocaleString(this.locale),this.setValue=t=>{this.value=this.localizeValue(t),this.duetInputElement.value=`${this.value} ${this.unit}`},this.add=t=>{t&&t.preventDefault();const e=w(this.value,this.locale);if(e===this.max)return;let i=null==e?this.min:e+this.step;i%this.step!=0&&(i-=i%this.step);const s=y(i,this.min,this.max);this.value=this.localizeValue(s),this.emitChange(t)},this.subtract=t=>{t&&t.preventDefault();const e=w(this.value,this.locale);if(e===this.min)return;let i=e-this.step;i%this.step!=0&&(i+=this.step-i%this.step),i=y(i,this.min,this.max),this.value=this.localizeValue(i),this.emitChange(t)},this.language=p(),this.locale=m(this.language).locale,this.unit=m(this.language).money,this.focusedValue=void 0,this.accessibleActiveDescendant=void 0,this.accessibleControls=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.accessibleLiveDefaults={fi:"{current} euroa valittuna",en:"{current} euros selected",sv:"{current} euro valt"},this.accessibleLive=g(this.accessibleLiveDefaults,this.language),this.accessibleLiveEnabled=!0,this.accessibleAddDefaults={fi:"Lisää summaan",en:"Add to the amount",sv:"Lägg till beloppet"},this.accessibleAdd=g(this.accessibleAddDefaults,this.language),this.accessibleSubtractDefaults={fi:"Vähennä summasta",en:"Subtract from the amount",sv:"Dra från beloppet"},this.accessibleSubtract=g(this.accessibleSubtractDefaults,this.language),this.theme="",this.margin="auto",this.expand=!1,this.identifier=void 0,this.min=0,this.labelDefaults={fi:"Nimilappu",en:"Label",sv:"Etikett"},this.label=g(this.labelDefaults,this.language),this.labelHidden=!1,this.max=1e6,this.name=void 0,this.error="",this.tooltip="",this.step=5e3,this.rounding=!0,this.role=void 0,this.disabled=!1,this.required=!1,this.value=void 0}componentWillLoad(){u(this),this.value&&(this.value=this.localizeValue(w(this.value,this.locale))),x(this.element,"tooltip","duet-tooltip",1,!0)}connectedCallback(){f(this,[{prop:"accessibleLive",defaults:"accessibleLiveDefaults"},{prop:"accessibleAdd",defaults:"accessibleAddDefaults"},{prop:"accessibleSubtract",defaults:"accessibleSubtractDefaults"},{prop:"label",defaults:"labelDefaults"}]),l(this)}disconnectedCallback(){v(this),c(this)}async setFocus(t){this.duetInputElement.setFocus(t)}async getValueAsNumber(){const t=w(this.value,this.locale);return null==this.value||isNaN(t)?null:t}clearValue(){this.value=null,this.duetInputElement.value=""}formatAnnouncement(){const t=this.value?w(this.value,this.locale):null;return null==t?"":this.accessibleLive.replace("{current}",t.toString(10))}render(){const t=this.identifier||this.inputId,e=`${this.localizeValue(this.max)} ${this.unit}`.length,n=this.value?w(this.value,this.locale):null;return i(s,{class:{"duet-theme-turva":"turva"===this.theme,"duet-expand":this.expand,"duet-m-0":"none"===this.margin}},i("div",{class:"duet-number-container"},i("duet-input",{ref:t=>this.duetInputElement=t,onDuetChange:t=>this.handleChange(t),onDuetFocus:this.handleFocus,onDuetBlur:t=>this.handleBlur(t),onKeyDown:t=>this.handleKeyDown(t),label:this.label,value:this.value?`${this.value} ${this.unit}`:"",error:this.error,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":null!=n?n:"",maxlength:e,name:this.name,component:"number",required:this.required,disabled:this.disabled,role:this.role,labelHidden:this.labelHidden,tooltip:this.tooltip,identifier:t,theme:this.theme,margin:"none",expand:!0,numericKeyboard:!0,autoComplete:"off",type:"text",accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleLabelledBy:this.accessibleLabelledBy,accessibleDescription:this.accessibleDescription,accessibleDetails:this.accessibleDetails,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy},i("slot",{name:"tooltip"}),i("div",{class:{"duet-number-buttons":!0,"duet-no-label":this.labelHidden}},i("button",{"aria-controls":t,disabled:this.disabled,"aria-disabled":null==n||n===this.min?"true":"false",class:"duet-number-button duet-number-button-subtract",onClick:this.subtract,type:"button"},i("duet-visually-hidden",null,this.accessibleSubtract," ",this.step),i("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M.75 12.788a.75.75 0 0 1 0-1.5h22.5a.75.75 0 0 1 0 1.5z"/></svg>',size:"small",margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary"})),i("button",{"aria-controls":t,disabled:this.disabled,"aria-disabled":n===this.max?"true":"false",class:"duet-number-button duet-number-button-add",onClick:this.add,type:"button"},i("duet-visually-hidden",null,this.accessibleAdd," ",this.step),i("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M12 24a.75.75 0 0 1-.75-.75v-10.5H.75a.75.75 0 0 1 0-1.5h10.5V.75a.75.75 0 0 1 1.5 0v10.5h10.5a.75.75 0 0 1 0 1.5h-10.5v10.5A.75.75 0 0 1 12 24z"/></svg>',size:"small",margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary"})))),this.accessibleLiveEnabled&&i("duet-visually-hidden",{"aria-live":"polite","aria-atomic":"true","aria-relevant":"all"},this.formatAnnouncement())))}get element(){return n(this)}};A.style='*.sc-duet-number-input,*.sc-duet-number-input::after,*.sc-duet-number-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-number-input-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;line-height:1.25;text-align:left;vertical-align:bottom}.sc-duet-number-input-h:last-child,.sc-duet-number-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-number-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-number-input-h{width:100% !important}.duet-m-0.sc-duet-number-input-h{margin:0 !important}.duet-number-container.sc-duet-number-input{position:relative;width:100%}.duet-number-buttons.sc-duet-number-input{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;width:96px;height:calc(100% - 2px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50%;height:100%;text-align:center;cursor:pointer;background:transparent;-webkit-appearance:none;appearance:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled{pointer-events:none}.duet-number-buttons.sc-duet-number-input .duet-number-button[aria-disabled=true].sc-duet-number-input duet-icon.sc-duet-number-input,.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:disabled duet-icon.sc-duet-number-input{opacity:0.4}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:active duet-icon.sc-duet-number-input{transform:translateY(1px)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{outline:0}.user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{z-index:2;box-shadow:0 0 0 2px #0077b3 !important}.duet-theme-turva .user-is-tabbing.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:focus{box-shadow:0 0 0 2px #171c3a !important}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type{border-left:1px solid rgb(207, 210, 212)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:"";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{position:absolute;top:20%;left:0;width:1px;height:60%;content:"";background:rgb(225, 227, 230)}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:first-of-type::before{background:linear-gradient(to left, rgba(207, 207, 209, 0.2) 0%, rgba(207, 207, 209, 0.2) 1px, rgba(207, 207, 209, 0.1) 1px, rgba(207, 207, 209, 0) 100%)}.duet-theme-turva.sc-duet-number-input-h .duet-number-buttons.sc-duet-number-input .duet-number-button.sc-duet-number-input:last-of-type::before{background:rgb(228, 228, 230)}';export{A as duet_number_input}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as i,h as o,H as e,g as n}from"./p-83e9058b.js";import{i as a}from"./p-a58bd561.js";import{c as s}from"./p-5e59e970.js";import{d as r}from"./p-9e371678.js";import{i as d}from"./p-a1b7f2a0.js";import{g as c,c as u,d as h}from"./p-2e36d5bf.js";import{c as b,g as l,s as p}from"./p-0bdcf67f.js";import"./p-0e052642.js";import"./p-67dc45d7.js";const m=class{constructor(o){t(this,o),this.duetActionEvent=i(this,"duetActionEvent",6),this.listId=s("duet-action-button"),this.emitPageEvent=r((t=>{this.duetActionEvent.emit({component:"duet-action-button",originalEvent:t,action:this.actionId,name:this.actionName,meta:this.actionMeta,id:this.listId})})),this.numbersStore="",this.theme="",this.iconName="action-arrow-left-small",this.iconColor="currentColor",this.iconSize="xx-small",this.actionName="default-action",this.actionId=void 0,this.actionMeta=void 0,this.disabled=!1,this.color="",this.background="",this.accessibleTitle=!0,this.accessibleDescribedBy=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleLabelsDefaults={en:"Click to activate action",fi:"Klikkaa aktivoidaksesi toiminto",sv:"Klicka för att aktivera åtgärd"},this.accessibleLabel=c(this.accessibleLabelsDefaults),this.accessibleControls="",this.url=void 0}async onKeyboardDown(t){d(t)&&this.emitPageEvent(t)}getTitle(){let t="";return"string"==typeof this.accessibleTitle&&(t=this.accessibleTitle),!0===this.accessibleTitle&&(t=b(`${this.actionName}`)),t}async onMouseHandler(t){t.preventDefault(),this.duetActionEvent.emit({component:"duet-action-button",originalEvent:t,action:this.actionName,id:this.actionId,meta:this.actionMeta})}componentWillLoad(){a(this)}connectedCallback(){u(this,{prop:"accessibleLabel",defaults:"accessibleLabelsDefaults"})}disconnectedCallback(){h(this)}async setFocus(t){this.nativeButton&&this.nativeButton.focus(t)}render(){const t="currentColor"===this.color?"currentColor":l(this.color,this.theme),i=l(this.background,this.theme),n=i?p(i,-.1):i,a=i?`\n button.duet-action-button {\n background: ${i} !important;\n }\n button.duet-action-button:not(:disabled):hover {\n background: ${n} !important;\n }\n `:"",s={ref:t=>this.nativeButton=t,part:"button",style:{color:t,"border-color":l(this.iconColor,this.theme),"border-width":"1px","border-style":"solid"},disabled:this.disabled,id:this.listId,type:"button","aria-label":this.accessibleLabel,"aria-labelledby":this.accessibleLabelledBy,"aria-description":this.accessibleDescription,"aria-describedby":this.accessibleDescribedBy,"aria-details":this.accessibleDetails,"aria-controls":this.accessibleControls,title:this.getTitle(),class:{"duet-action-button":!0,"duet-action-button--disabled":this.disabled,[`duet-action-button--${this.theme}`]:""!==this.theme,"duet-theme-turva":"turva"===this.theme}};return o(e,{onKeyDown:t=>this.onKeyboardDown(t)},o("style",{innerHTML:a}),this.url&&!this.disabled?o("a",Object.assign({},s,{href:this.url}),o("duet-icon",{part:"icon",name:this.iconName,color:this.iconColor,margin:"none",size:this.iconSize})):o("button",Object.assign({},s,{onClick:t=>this.onMouseHandler(t)}),o("duet-icon",{part:"icon",name:this.iconName,color:this.iconColor,margin:"none",size:this.iconSize}),o("duet-visually-hidden",null,o("slot",null))))}get element(){return n(this)}};m.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}.duet-action-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px;color:rgb(0, 41, 77);white-space:nowrap;cursor:pointer;background:rgb(245, 248, 250);border-radius:50%;transition:background-color 300ms ease !important}.duet-action-button.duet-theme-turva{color:rgb(23, 28, 58);background:rgb(245, 245, 247)}.duet-action-button duet-icon{display:block}@media (max-width: 35.9375em){.duet-action-button{width:32px;height:32px}}.duet-action-button:not(:disabled):hover{background:#e9ecee}.duet-action-button:not(:disabled):hover.duet-theme-turva{background:#e9e9eb}.duet-action-button:focus{outline:0;box-shadow:0 0 0 2px #0077b3 !important}.duet-action-button:focus.duet-theme-turva{box-shadow:0 0 0 2px #171c3a !important}.duet-action-button:active:focus{background:#dddfe1 !important;box-shadow:none}.duet-action-button:active:focus.duet-theme-turva{background:#ddddde !important}.duet-action-button:disabled{color:rgb(144, 149, 153);cursor:default;background:rgb(245, 248, 250);opacity:0.75}.duet-action-button.duet-theme-turva:disabled{color:rgb(116, 116, 117);background:rgb(245, 245, 247)}";export{m as duet_action_button}
|