@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
|
@@ -1,26 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { media_query_large } from "@duetds/tokens/lib/tokens.json";
|
|
5
4
|
import { h, Host } from "@stencil/core";
|
|
6
5
|
import { inheritGlobalTheme } from "../../common/themeable-component";
|
|
7
6
|
import { isEscapeKey } from "../../utils/keyboard-utils";
|
|
8
7
|
export class DuetSubmenuBarLink {
|
|
9
8
|
constructor() {
|
|
10
|
-
/**
|
|
11
|
-
* Own Properties.
|
|
12
|
-
*/
|
|
13
|
-
this.mql = [window.matchMedia(media_query_large.replace(/'/g, ""))];
|
|
14
|
-
this.boundMqlFunctions = [];
|
|
15
|
-
this.changeIconSize = () => {
|
|
16
|
-
if (this.mql[0].matches) {
|
|
17
|
-
this.iconSize = "x-small";
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
this.iconSize = "small";
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
this.iconSize = "small";
|
|
24
9
|
this.theme = "";
|
|
25
10
|
this.active = false;
|
|
26
11
|
this.href = "#";
|
|
@@ -32,26 +17,6 @@ export class DuetSubmenuBarLink {
|
|
|
32
17
|
componentWillLoad() {
|
|
33
18
|
inheritGlobalTheme(this);
|
|
34
19
|
}
|
|
35
|
-
connectedCallback() {
|
|
36
|
-
this.changeIconSize();
|
|
37
|
-
for (let i = 0; i < this.mql.length; i++) {
|
|
38
|
-
// addEventListener is not available in Stencil hydrate
|
|
39
|
-
if (this.mql[i].addEventListener) {
|
|
40
|
-
const bound = this.changeIconSize.bind(this);
|
|
41
|
-
this.mql[i].addEventListener("change", bound);
|
|
42
|
-
this.boundMqlFunctions[i] = bound;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
disconnectedCallback() {
|
|
47
|
-
for (let i = 0; i < this.mql.length; i++) {
|
|
48
|
-
// removeEventListener is not available in Stencil hydrate
|
|
49
|
-
if (this.mql[i].removeEventListener) {
|
|
50
|
-
this.mql[i].removeEventListener("change", this.boundMqlFunctions[i]);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
this.boundMqlFunctions = [];
|
|
54
|
-
}
|
|
55
20
|
handleEscape(e) {
|
|
56
21
|
if (isEscapeKey(e)) {
|
|
57
22
|
const dropdown = this.element.closest("duet-submenu-bar");
|
|
@@ -64,7 +29,7 @@ export class DuetSubmenuBarLink {
|
|
|
64
29
|
* Always the last one in the class.
|
|
65
30
|
*/
|
|
66
31
|
render() {
|
|
67
|
-
return (h(Host, null, h("a", { class: { "duet-submenu-bar-link": true, "duet-theme-turva": this.theme === "turva", active: this.active }, href: this.href, onKeyUp: e => this.handleEscape(e), "aria-current": this.active ? "true" : "false" }, this.icon && (h("duet-icon", { theme: this.theme, name: this.icon, size:
|
|
32
|
+
return (h(Host, null, h("a", { class: { "duet-submenu-bar-link": true, "duet-theme-turva": this.theme === "turva", active: this.active }, href: this.href, onKeyUp: e => this.handleEscape(e), "aria-current": this.active ? "true" : "false" }, this.icon && (h("duet-icon", { class: "submenu-bar-link-icon", theme: this.theme, name: this.icon, size: "auto", margin: "none", color: "currentColor" })), h("span", { class: "label" }, h("slot", null)))));
|
|
68
33
|
}
|
|
69
34
|
static get is() { return "duet-submenu-bar-link"; }
|
|
70
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -160,10 +125,5 @@ export class DuetSubmenuBarLink {
|
|
|
160
125
|
}
|
|
161
126
|
};
|
|
162
127
|
}
|
|
163
|
-
static get states() {
|
|
164
|
-
return {
|
|
165
|
-
"iconSize": {}
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
128
|
static get elementRef() { return "element"; }
|
|
169
129
|
}
|
|
@@ -11,7 +11,9 @@ export const getElementsFromDefaultSlot = (element) => {
|
|
|
11
11
|
return childElements.filter(el => !el.getAttribute("slot"));
|
|
12
12
|
};
|
|
13
13
|
export const hasSlot = (element, slotName) => {
|
|
14
|
-
return
|
|
14
|
+
return slotName
|
|
15
|
+
? getElementsFromNamedSlot(element, slotName).length > 0
|
|
16
|
+
: getElementsFromDefaultSlot(element).length > 0;
|
|
15
17
|
};
|
|
16
18
|
/**
|
|
17
19
|
* Check if the slotted element matches the given selector.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { D as DuetActionButton$1, d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { D as DuetActionButton$1, d as defineCustomElement$1 } from './p-f4ac6968.js';
|
|
5
5
|
|
|
6
6
|
const DuetActionButton = DuetActionButton$1;
|
|
7
7
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { D as DuetAlert$1, d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { D as DuetAlert$1, d as defineCustomElement$1 } from './p-6d366100.js';
|
|
5
5
|
|
|
6
6
|
const DuetAlert = DuetAlert$1;
|
|
7
7
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { p as proxyCustomElement, H, h as h$1, d as Host } from './p-e98f9bb0.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
6
6
|
import { h } from './p-33937fd7.js';
|
|
7
|
-
import { h as hasSlot, c as checkNamedSlotElement } from './p-
|
|
7
|
+
import { h as hasSlot, c as checkNamedSlotElement } from './p-06e608ae.js';
|
|
8
8
|
import { p as parsePossibleJSON } from './p-0e052642.js';
|
|
9
9
|
import { g as getColorByName } from './p-25c80cdb.js';
|
|
10
10
|
import { d as defineCustomElement$3 } from './p-a167e2a0.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { p as proxyCustomElement, H, h, d as Host } from './p-e98f9bb0.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
6
|
-
import { s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-
|
|
6
|
+
import { s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-785686e3.js';
|
|
7
7
|
import { a as getLanguage, c as connectLanguageChangeObserver, d as disconnectLanguageChangeObserver, g as getLocaleString } from './p-2e36d5bf.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './p-667579b0.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './p-23e23ced.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { p as proxyCustomElement, H, h, d as Host } from './p-e98f9bb0.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
6
|
-
import { h as hasSlot, c as checkNamedSlotElement } from './p-
|
|
6
|
+
import { h as hasSlot, c as checkNamedSlotElement } from './p-06e608ae.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './p-667579b0.js';
|
|
8
8
|
|
|
9
9
|
const duetCalloutCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}blockquote,figure{margin:0}.duet-callout{margin-bottom:28px !important;display:flex;align-items:center;justify-content:center;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-callout .container{display:flex;flex-direction:column;gap:8px;align-items:center;max-width:688px;text-align:center}.duet-callout .callout-icon{width:50px;padding-bottom:8px}.duet-callout blockquote{font-size:2.7vw;font-weight:600;line-height:1.5;color:rgb(0, 41, 77)}@media (max-width: 37.037037037rem){.duet-callout blockquote{font-size:1rem}}@media (min-width: 46.2962962963rem){.duet-callout blockquote{font-size:1.25rem}}.duet-callout .author{color:rgb(0, 41, 77)}.duet-callout.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\"}.duet-callout.duet-theme-turva .author,.duet-callout.duet-theme-turva blockquote{color:rgb(23, 28, 58)}.duet-callout.duet-m-0{margin:0 !important}";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Host } from './p-e98f9bb0.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
6
6
|
import { c as createID } from './p-5e59e970.js';
|
|
7
|
-
import { i as isKeyboardClick, s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-
|
|
7
|
+
import { i as isKeyboardClick, s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-785686e3.js';
|
|
8
8
|
import { s as sanitizeString } from './p-0e052642.js';
|
|
9
9
|
import { g as getColorByName } from './p-25c80cdb.js';
|
|
10
10
|
import { d as defineCustomElement$3 } from './p-667579b0.js';
|
|
@@ -1,279 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
6
|
-
import { c as createID } from './p-5e59e970.js';
|
|
7
|
-
import { s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-e44c0eff.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './p-667579b0.js';
|
|
9
|
-
|
|
10
|
-
const duetChipCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;position:relative;display:inline-block;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}:host:last-child,:host:last-of-type{margin-right:0 !important}.duet-chip-container{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:1px;hyphens:none;line-height:1.1;color:rgb(0, 41, 77) !important;text-align:center;cursor:pointer;background:rgb(255, 255, 255);border-color:rgb(207, 210, 212);border-style:solid;border-width:1px;border-radius:8px;transition:background-color 300ms ease, color 300ms ease, border-color 300ms ease}.duet-chip-container.duet-p-0{padding:0 !important}.duet-chip-container.duet-m-0{margin:0 !important}.duet-chip-container.duet-theme-turva{color:rgb(23, 28, 58) !important;background:rgb(255, 255, 255);border-color:rgb(207, 207, 209)}.duet-chip-container.duet-theme-turva:hover{border-color:rgb(198, 12, 48)}.duet-chip-container:hover{padding:0 !important;border-color:rgb(0, 119, 179);border-width:2px}.duet-chip-container.duet-chip-disabled{color:rgb(101, 119, 135) !important;cursor:default;background:rgb(245, 248, 250) !important;border-color:rgb(245, 248, 250) !important}.duet-chip-container.duet-chip-disabled.duet-theme-turva{color:rgb(116, 116, 117) !important;background:rgb(245, 245, 247);border-color:rgb(245, 245, 247)}.duet-chip-container.duet-chip-disabled:hover{background:rgb(245, 248, 250);border-color:rgb(245, 248, 250)}.duet-chip-container.duet-chip-disabled:hover.duet-theme-turva{background:rgb(245, 245, 247);border-color:rgb(245, 245, 247)}.duet-chip-container.duet-chip-disabled button,.duet-chip-container.duet-chip-disabled label{cursor:default}.duet-chip-container button,.duet-chip-container label{display:flex;align-items:center;width:100%;height:100%;padding:8px 14px;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:600;line-height:1rem;color:rgb(0, 41, 77) !important;cursor:pointer}.duet-chip-container button:focus,.duet-chip-container label:focus{outline:none}.duet-chip-container .duet-chip-icon-container{display:flex;align-items:center;height:16px;padding:0;transition:padding 300ms ease}.duet-chip-container.duet-chip-has-icon .duet-chip-icon-container{width:24px;height:16px;padding-right:10px}.duet-chip-container.duet-chip-has-icon.duet-chip-filter-checked .duet-chip-icon-container,.duet-chip-container.duet-chip-has-icon.duet-chip-radio-checked .duet-chip-icon-container{padding-right:11px;padding-left:3px}.duet-chip-container.duet-chip-has-icon button,.duet-chip-container.duet-chip-has-icon label{padding-left:10px}.duet-chip-container.duet-chip-has-popup button,.duet-chip-container.duet-chip-has-popup label{padding-right:8px}.duet-chip-container duet-icon:not(.check-mark){width:auto;visibility:visible;transition:width 300ms ease, transform 300ms ease;transform:scaleX(1)}.duet-chip-container duet-icon.check-mark{width:0;overflow:hidden;visibility:hidden;transition:width 300ms ease, transform 300ms ease;transform:scaleX(0)}.duet-chip-container.duet-chip-filter-checked,.duet-chip-container.duet-chip-radio-checked{padding:0 !important;background:rgb(230, 242, 248);border-color:rgb(0, 119, 179);border-width:2px}.duet-chip-container.duet-chip-filter-checked:hover,.duet-chip-container.duet-chip-radio-checked:hover{background:rgb(205, 229, 241)}.duet-chip-container.duet-chip-filter-checked.chip-has-icon button,.duet-chip-container.duet-chip-filter-checked.chip-has-icon label,.duet-chip-container.duet-chip-radio-checked.chip-has-icon button,.duet-chip-container.duet-chip-radio-checked.chip-has-icon label{padding-left:10px}.duet-chip-container.duet-chip-filter-checked .duet-chip-icon-container,.duet-chip-container.duet-chip-radio-checked .duet-chip-icon-container{padding-right:10px}.duet-chip-container.duet-chip-filter-checked .duet-chip-icon-container duet-icon:not(.check-mark),.duet-chip-container.duet-chip-radio-checked .duet-chip-icon-container duet-icon:not(.check-mark){width:0;overflow:hidden;visibility:hidden;transition:width 300ms ease, transform 300ms ease;transform:scaleX(0)}.duet-chip-container.duet-chip-filter-checked .duet-chip-icon-container duet-icon.check-mark,.duet-chip-container.duet-chip-radio-checked .duet-chip-icon-container duet-icon.check-mark{width:auto;visibility:visible;transition:width 300ms ease, transform 300ms ease;transform:scaleX(1)}.duet-chip-container.duet-chip-filter-checked.duet-theme-turva,.duet-chip-container.duet-chip-radio-checked.duet-theme-turva{background:rgb(245, 245, 247);border-color:rgb(198, 12, 48)}.duet-chip-container.duet-chip-filter-checked.duet-theme-turva:hover,.duet-chip-container.duet-chip-radio-checked.duet-theme-turva:hover{background:rgb(228, 228, 230)}.duet-chip-container .duet-chip-popup-disclosure{padding-right:4.5px;padding-left:12.5px}.duet-chip-container .duet-chip-popup-disclosure duet-icon{transition:transform 300ms ease}.duet-chip-container.duet-chip-filter-popup-open{background:rgb(243, 249, 252);border-color:rgb(243, 249, 252)}.duet-chip-container.duet-chip-filter-popup-open.duet-theme-turva{background:rgb(245, 245, 247);border-color:rgb(245, 245, 247)}.duet-chip-container.duet-chip-filter-popup-open .duet-chip-popup-disclosure duet-icon{transform:rotate(180deg)}.duet-chip-container.duet-chip-input{display:flex;align-items:center;padding-right:0 !important}.duet-chip-container.duet-chip-input .duet-chip-input-button{flex-grow:1}.duet-chip-container.duet-chip-input .duet-chip-remove-button{width:26px;padding:8px 16px 8px 0;margin:-8px 0}.duet-chip-container.large button,.duet-chip-container.large label{padding:15px 22px}:host(.user-is-tabbing) .duet-chip-focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-chip-focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-chip-container input{position:absolute !important;top:0;left:0;z-index:-1;width:100%;height:100%;cursor:pointer;opacity:0}";
|
|
11
|
-
|
|
12
|
-
const DuetChip$1 = /*@__PURE__*/ proxyCustomElement(class DuetChip extends H {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this.__registerHost();
|
|
16
|
-
this.__attachShadow();
|
|
17
|
-
this.duetChange = createEvent(this, "duetChange", 3);
|
|
18
|
-
this.duetFocus = createEvent(this, "duetFocus", 7);
|
|
19
|
-
this.duetBlur = createEvent(this, "duetBlur", 7);
|
|
20
|
-
/**
|
|
21
|
-
* Own Properties.
|
|
22
|
-
*/
|
|
23
|
-
this.chipId = createID("DuetChip");
|
|
24
|
-
this.enforceNoDisabledSelected = () => {
|
|
25
|
-
if (this.disabled && this.checked) {
|
|
26
|
-
console.error("Duet error: pre-selected chip may not be disabled");
|
|
27
|
-
this.disabled = false;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
this.popupSetUp = () => {
|
|
31
|
-
const popup = document.querySelector(`duet-popup-menu#${this.popup}`);
|
|
32
|
-
if (popup) {
|
|
33
|
-
this.popupElement = popup;
|
|
34
|
-
popup.controller = this.element;
|
|
35
|
-
const originalText = this.element.textContent;
|
|
36
|
-
const originalValue = this.value;
|
|
37
|
-
if (!popup.id) {
|
|
38
|
-
popup.id = "popup-menu";
|
|
39
|
-
}
|
|
40
|
-
popup.addEventListener("duetToggle", (evt) => {
|
|
41
|
-
this.popupOpen = evt.detail.open;
|
|
42
|
-
});
|
|
43
|
-
const clearActive = () => {
|
|
44
|
-
popup.querySelectorAll("duet-popup-menu-item").forEach(item => {
|
|
45
|
-
item.active = false;
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
popup.querySelectorAll("duet-popup-menu-item").forEach(item => {
|
|
49
|
-
item.addEventListener("click", evt => {
|
|
50
|
-
var _a;
|
|
51
|
-
const value = (_a = item.value) !== null && _a !== void 0 ? _a : item.innerText;
|
|
52
|
-
if (!item.active) {
|
|
53
|
-
clearActive();
|
|
54
|
-
item.active = true;
|
|
55
|
-
this.element.textContent = item.innerText;
|
|
56
|
-
this.value = value;
|
|
57
|
-
this.checked = true;
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
clearActive();
|
|
61
|
-
this.element.textContent = originalText;
|
|
62
|
-
this.value = originalValue;
|
|
63
|
-
this.checked = false;
|
|
64
|
-
}
|
|
65
|
-
this.emitChange(evt);
|
|
66
|
-
// A workaround to the difference of event handling between the browers.
|
|
67
|
-
// Chrome will emit a separate click event on the chip after the popup is closed, resulting popup.toggle() to
|
|
68
|
-
// open the popup again. Firefox does not have this behavior.
|
|
69
|
-
setTimeout(() => {
|
|
70
|
-
if (this.popupElement.isOpen()) {
|
|
71
|
-
this.popupElement.hide();
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Component event handling.
|
|
80
|
-
*/
|
|
81
|
-
this.onFocus = (ev) => {
|
|
82
|
-
this.focus = true;
|
|
83
|
-
this.duetFocus.emit({
|
|
84
|
-
originalEvent: ev,
|
|
85
|
-
checked: this.checked,
|
|
86
|
-
value: this.value,
|
|
87
|
-
component: "duet-chip",
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
this.onBlur = (ev) => {
|
|
91
|
-
this.focus = false;
|
|
92
|
-
this.duetBlur.emit({
|
|
93
|
-
originalEvent: ev,
|
|
94
|
-
checked: this.checked,
|
|
95
|
-
value: this.value,
|
|
96
|
-
component: "duet-chip",
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
this.emitChange = originalEvent => {
|
|
100
|
-
this.duetChange.emit({
|
|
101
|
-
originalEvent,
|
|
102
|
-
checked: this.checked,
|
|
103
|
-
value: this.value,
|
|
104
|
-
component: "duet-chip",
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Change checked state and emit duetChange event.
|
|
109
|
-
*/
|
|
110
|
-
this.onFilterChange = (evt) => {
|
|
111
|
-
this.checked = !this.checked;
|
|
112
|
-
this.emitChange(evt);
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Change checked state and emit duetChange event.
|
|
116
|
-
*/
|
|
117
|
-
this.onRadioChange = (evt) => {
|
|
118
|
-
const input = this.focusableElement;
|
|
119
|
-
const inputChecked = input.checked;
|
|
120
|
-
this.checked = inputChecked;
|
|
121
|
-
this.emitChange(evt);
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Stop propagation and prevent default if popup is present, as the popup controls value and checked state.
|
|
125
|
-
*/
|
|
126
|
-
this.onFilterClick = (evt) => {
|
|
127
|
-
if (this.disabled) {
|
|
128
|
-
evt.stopPropagation();
|
|
129
|
-
evt.preventDefault();
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (this.popupElement) {
|
|
133
|
-
evt.stopPropagation();
|
|
134
|
-
evt.preventDefault();
|
|
135
|
-
this.popupElement.toggle();
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Remove input chip
|
|
140
|
-
*/
|
|
141
|
-
this.onRemoveClick = (evt) => {
|
|
142
|
-
evt.stopPropagation();
|
|
143
|
-
evt.preventDefault();
|
|
144
|
-
this.element.remove();
|
|
145
|
-
};
|
|
146
|
-
this.focus = false;
|
|
147
|
-
this.popupElement = undefined;
|
|
148
|
-
this.popupOpen = undefined;
|
|
149
|
-
this.accessibleLabel = undefined;
|
|
150
|
-
this.variation = "button";
|
|
151
|
-
this.size = "medium";
|
|
152
|
-
this.popup = undefined;
|
|
153
|
-
this.icon = "";
|
|
154
|
-
this.theme = "";
|
|
155
|
-
this.identifier = undefined;
|
|
156
|
-
this.value = undefined;
|
|
157
|
-
this.name = undefined;
|
|
158
|
-
this.checked = false;
|
|
159
|
-
this.disabled = false;
|
|
160
|
-
this.accessibleExpanded = undefined;
|
|
161
|
-
this.accessiblePopup = "false";
|
|
162
|
-
}
|
|
163
|
-
clearOtherRadioButtons() {
|
|
164
|
-
if (this.variation === "radio" && this.checked) {
|
|
165
|
-
const chips = document.querySelectorAll(`duet-chip[variation="radio"][name="${this.name}"]`);
|
|
166
|
-
chips.forEach(chip => {
|
|
167
|
-
if (chip !== this.element) {
|
|
168
|
-
chip.checked = false;
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Component lifecycle events.
|
|
175
|
-
*/
|
|
176
|
-
componentWillLoad() {
|
|
177
|
-
inheritGlobalTheme(this);
|
|
178
|
-
this.popupSetUp();
|
|
179
|
-
this.enforceNoDisabledSelected();
|
|
180
|
-
}
|
|
181
|
-
connectedCallback() {
|
|
182
|
-
subscribeTabbingChange(this);
|
|
183
|
-
}
|
|
184
|
-
disconnectedCallback() {
|
|
185
|
-
unsubscribeTabbingChange(this);
|
|
186
|
-
}
|
|
187
|
-
getAccessibleExpanded() {
|
|
188
|
-
if (this.accessibleExpanded != null) {
|
|
189
|
-
return (!!this.accessibleExpanded).toString();
|
|
190
|
-
}
|
|
191
|
-
if (this.popupElement) {
|
|
192
|
-
return this.popupOpen ? "true" : "false";
|
|
193
|
-
}
|
|
194
|
-
return undefined;
|
|
195
|
-
}
|
|
196
|
-
getAccessiblePopup() {
|
|
197
|
-
if (this.popupElement) {
|
|
198
|
-
return "true";
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
return this.accessiblePopup != null ? this.accessiblePopup.toString() : undefined;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Sets focus. Use this method instead of the global focus().
|
|
206
|
-
*/
|
|
207
|
-
async setFocus(options) {
|
|
208
|
-
setTimeout(() => this.focusableElement.focus(options), 200);
|
|
209
|
-
}
|
|
210
|
-
render() {
|
|
211
|
-
var _a;
|
|
212
|
-
const identifier = this.identifier || this.chipId;
|
|
213
|
-
const classes = {
|
|
214
|
-
"duet-chip-container": true,
|
|
215
|
-
[`duet-chip-${this.variation}`]: true,
|
|
216
|
-
"duet-chip-focus": this.focus,
|
|
217
|
-
"duet-chip-has-icon": !!this.icon,
|
|
218
|
-
"duet-chip-has-popup": this.variation === "filter" && !!this.popupElement,
|
|
219
|
-
"duet-theme-turva": this.theme === "turva",
|
|
220
|
-
"duet-chip-filter-checked": this.variation === "filter" && this.checked,
|
|
221
|
-
"duet-chip-radio-checked": this.variation === "radio" && this.checked,
|
|
222
|
-
"duet-chip-filter-popup-open": this.popupOpen,
|
|
223
|
-
"duet-chip-disabled": this.disabled,
|
|
224
|
-
[this.size]: true,
|
|
225
|
-
};
|
|
226
|
-
const focusHandlers = {
|
|
227
|
-
onFocus: this.onFocus,
|
|
228
|
-
onBlur: this.onBlur,
|
|
229
|
-
ref: el => (this.focusableElement = el),
|
|
230
|
-
};
|
|
231
|
-
return (h(Host, null, this.variation === "button" && (h("span", { class: classes }, h("button", Object.assign({ id: identifier, "aria-label": this.accessibleLabel, "aria-disabled": this.disabled ? "true" : undefined, name: this.name, value: this.value, onClick: this.disabled ? evt => evt.stopPropagation() : undefined }, focusHandlers), h("span", { class: "duet-chip-icon-container" }, this.icon && (h("duet-icon", { name: this.icon, size: "x-small", margin: "none", color: "currentColor" }))), h("slot", null)))), this.variation === "input" && (h("span", { class: classes }, h("button", Object.assign({ id: identifier, class: "duet-chip-input-button", "aria-label": this.accessibleLabel }, focusHandlers), h("span", { class: "duet-chip-icon-container" }, this.icon && (h("duet-icon", { name: this.icon, size: "x-small", margin: "none", color: "currentColor" }))), h("slot", null)), h("button", { class: "duet-chip-remove-button", onClick: this.onRemoveClick }, h("duet-icon", { name: "activity-close", size: "xx-small", margin: "none", color: "currentColor" })))), this.variation === "filter" && (h("span", { class: classes }, h("input", Object.assign({ "aria-haspopup": this.getAccessiblePopup(), "aria-controls": (_a = this.popupElement) === null || _a === void 0 ? void 0 : _a.id, "aria-expanded": this.getAccessibleExpanded(), "aria-disabled": this.disabled ? "true" : undefined, id: identifier, type: "checkbox", name: this.name, value: this.value, checked: this.checked, onClick: this.onFilterClick, onChange: this.onFilterChange }, focusHandlers)), h("label", { htmlFor: identifier }, this.icon && (h("span", { class: "duet-chip-icon-container" }, h("duet-icon", { name: this.icon, size: "x-small", margin: "none", color: "currentColor" }), h("duet-icon", { name: "messaging-checked-small", size: "xx-small", margin: "none", color: "currentColor", class: "check-mark" }))), h("slot", null), this.popupElement && (h("span", { class: "duet-chip-popup-disclosure" }, h("duet-icon", { name: "action-arrow-down-small", size: "xxx-small", margin: "none", color: "currentColor" })))))), this.variation === "radio" && (h("span", { class: classes }, h("input", Object.assign({ "aria-disabled": this.disabled ? "true" : undefined, id: identifier, type: "radio", name: this.name, value: this.value, checked: this.checked, onChange: this.onRadioChange, onClick: this.disabled ? evt => evt.preventDefault() : undefined }, focusHandlers)), h("label", { htmlFor: identifier }, this.icon && (h("span", { class: "duet-chip-icon-container" }, h("duet-icon", { name: this.icon, size: "x-small", margin: "none", color: "currentColor" }), h("duet-icon", { name: "messaging-checked-small", size: "xx-small", margin: "none", color: "currentColor", class: "check-mark" }))), h("slot", null))))));
|
|
232
|
-
}
|
|
233
|
-
get element() { return this; }
|
|
234
|
-
static get watchers() { return {
|
|
235
|
-
"checked": ["clearOtherRadioButtons"]
|
|
236
|
-
}; }
|
|
237
|
-
static get style() { return duetChipCss; }
|
|
238
|
-
}, [1, "duet-chip", {
|
|
239
|
-
"accessibleLabel": [1, "accessible-label"],
|
|
240
|
-
"variation": [1],
|
|
241
|
-
"size": [1],
|
|
242
|
-
"popup": [1],
|
|
243
|
-
"icon": [1],
|
|
244
|
-
"theme": [1025],
|
|
245
|
-
"identifier": [1],
|
|
246
|
-
"value": [1025],
|
|
247
|
-
"name": [1],
|
|
248
|
-
"checked": [1540],
|
|
249
|
-
"disabled": [4],
|
|
250
|
-
"accessibleExpanded": [1540, "accessible-expanded"],
|
|
251
|
-
"accessiblePopup": [1537, "accessible-popup"],
|
|
252
|
-
"focus": [32],
|
|
253
|
-
"popupElement": [32],
|
|
254
|
-
"popupOpen": [32],
|
|
255
|
-
"setFocus": [64]
|
|
256
|
-
}, undefined, {
|
|
257
|
-
"checked": ["clearOtherRadioButtons"]
|
|
258
|
-
}]);
|
|
259
|
-
function defineCustomElement$1() {
|
|
260
|
-
if (typeof customElements === "undefined") {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
const components = ["duet-chip", "duet-icon"];
|
|
264
|
-
components.forEach(tagName => { switch (tagName) {
|
|
265
|
-
case "duet-chip":
|
|
266
|
-
if (!customElements.get(tagName)) {
|
|
267
|
-
customElements.define(tagName, DuetChip$1);
|
|
268
|
-
}
|
|
269
|
-
break;
|
|
270
|
-
case "duet-icon":
|
|
271
|
-
if (!customElements.get(tagName)) {
|
|
272
|
-
defineCustomElement$2();
|
|
273
|
-
}
|
|
274
|
-
break;
|
|
275
|
-
} });
|
|
276
|
-
}
|
|
4
|
+
import { D as DuetChip$1, d as defineCustomElement$1 } from './p-755dd68f.js';
|
|
277
5
|
|
|
278
6
|
const DuetChip = DuetChip$1;
|
|
279
7
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { p as proxyCustomElement, H, h, d as Host } from './p-e98f9bb0.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
6
|
-
import { c as checkNamedSlotElement } from './p-
|
|
6
|
+
import { c as checkNamedSlotElement } from './p-06e608ae.js';
|
|
7
7
|
import { d as defineCustomElement$8 } from './p-b6322d8d.js';
|
|
8
|
-
import { d as defineCustomElement$7 } from './p-
|
|
8
|
+
import { d as defineCustomElement$7 } from './p-45fd4d84.js';
|
|
9
9
|
import { d as defineCustomElement$6 } from './p-667579b0.js';
|
|
10
|
-
import { d as defineCustomElement$5 } from './p-
|
|
11
|
-
import { d as defineCustomElement$4 } from './p-
|
|
12
|
-
import { d as defineCustomElement$3 } from './p-
|
|
10
|
+
import { d as defineCustomElement$5 } from './p-a02e62f3.js';
|
|
11
|
+
import { d as defineCustomElement$4 } from './p-c8415e2f.js';
|
|
12
|
+
import { d as defineCustomElement$3 } from './p-0cee8a12.js';
|
|
13
13
|
import { d as defineCustomElement$2 } from './p-d1815d2a.js';
|
|
14
14
|
|
|
15
15
|
const duetChoiceGroupCss = "*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block;margin-bottom:-12px}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{margin-bottom:0}}@media (max-width: 35.9375em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex}}.horizontal.duet-choice-group-breakpoint-x-small.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:flex}@media (max-width: 22.5em){.horizontal.duet-choice-group-breakpoint-x-small.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:block}}.horizontal.duet-choice-group-breakpoint-small.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:block}@media (min-width: 36em){.horizontal.duet-choice-group-breakpoint-small.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:flex}}.horizontal.duet-choice-group-breakpoint-medium.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:block}@media (min-width: 48em){.horizontal.duet-choice-group-breakpoint-medium.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:flex}}.horizontal.duet-choice-group-breakpoint-large.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:block}@media (min-width: 62em){.horizontal.duet-choice-group-breakpoint-large.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:flex}}.horizontal.duet-choice-group-breakpoint-x-large.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:block}@media (min-width: 64.0625em){.horizontal.duet-choice-group-breakpoint-x-large.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group:not(.duet-no-stacking){display:flex}}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";
|
|
@@ -83,6 +83,13 @@ const DuetChoiceGroup$1 = /*@__PURE__*/ proxyCustomElement(class DuetChoiceGroup
|
|
|
83
83
|
this.initialValue = this.value;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
* Get initial value
|
|
89
|
+
*/
|
|
90
|
+
async getInitialValue() {
|
|
91
|
+
return this.initialValue;
|
|
92
|
+
}
|
|
86
93
|
/**
|
|
87
94
|
* Local methods
|
|
88
95
|
*/
|
|
@@ -155,7 +162,8 @@ const DuetChoiceGroup$1 = /*@__PURE__*/ proxyCustomElement(class DuetChoiceGroup
|
|
|
155
162
|
"value": [1537],
|
|
156
163
|
"disabled": [4],
|
|
157
164
|
"required": [4],
|
|
158
|
-
"accessibleLiveError": [1, "accessible-live-error"]
|
|
165
|
+
"accessibleLiveError": [1, "accessible-live-error"],
|
|
166
|
+
"getInitialValue": [64]
|
|
159
167
|
}, undefined, {
|
|
160
168
|
"value": ["setInitialValue", "updateChoices"],
|
|
161
169
|
"disabled": ["updateChoices"],
|
|
@@ -5,9 +5,9 @@ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-
|
|
|
5
5
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
6
6
|
import { D as DuetStringsExternalDefaults } from './p-9df4cfa4.js';
|
|
7
7
|
import { c as createID } from './p-5e59e970.js';
|
|
8
|
-
import { i as isKeyboardClick, a as isQuestionKey, s as subscribeTabbingChange, u as unsubscribeTabbingChange, b as isEscapeKey } from './p-
|
|
8
|
+
import { i as isKeyboardClick, a as isQuestionKey, s as subscribeTabbingChange, u as unsubscribeTabbingChange, b as isEscapeKey } from './p-785686e3.js';
|
|
9
9
|
import { g as getLocaleString, a as getLanguage, c as connectLanguageChangeObserver, d as disconnectLanguageChangeObserver } from './p-2e36d5bf.js';
|
|
10
|
-
import { h as hasSlot } from './p-
|
|
10
|
+
import { h as hasSlot } from './p-06e608ae.js';
|
|
11
11
|
import { d as defineCustomElement$4 } from './p-b6322d8d.js';
|
|
12
12
|
import { d as defineCustomElement$3 } from './p-667579b0.js';
|
|
13
13
|
import { d as defineCustomElement$2 } from './p-23e23ced.js';
|
|
@@ -6,8 +6,8 @@ import { a as actionArrowDownSmall } from './p-115c79b6.js';
|
|
|
6
6
|
import { f as font_size_medium, t as tokens } from './p-f9a8d356.js';
|
|
7
7
|
import { i as inheritGlobalTheme } from './p-a58bd561.js';
|
|
8
8
|
import { c as createID } from './p-5e59e970.js';
|
|
9
|
-
import { i as isKeyboardClick, s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-
|
|
10
|
-
import { h as hasSlot } from './p-
|
|
9
|
+
import { i as isKeyboardClick, s as subscribeTabbingChange, u as unsubscribeTabbingChange } from './p-785686e3.js';
|
|
10
|
+
import { h as hasSlot } from './p-06e608ae.js';
|
|
11
11
|
import { s as sanitizeString } from './p-0e052642.js';
|
|
12
12
|
import { d as defineCustomElement$2 } from './p-667579b0.js';
|
|
13
13
|
|