@statistikzh/leu 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -3
- package/CHANGELOG.md +54 -0
- package/dist/Accordion.d.ts +10 -9
- package/dist/Accordion.d.ts.map +1 -1
- package/dist/Accordion.js +12 -11
- package/dist/Breadcrumb.d.ts +4 -4
- package/dist/Breadcrumb.d.ts.map +1 -1
- package/dist/Breadcrumb.js +28 -24
- package/dist/{Button-5326c982.d.ts → Button-7370f901.d.ts} +10 -11
- package/dist/Button-7370f901.d.ts.map +1 -0
- package/dist/{Button-5326c982.js → Button-7370f901.js} +57 -67
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +3 -3
- package/dist/ButtonGroup.d.ts +2 -2
- package/dist/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup.js +3 -3
- package/dist/Checkbox.d.ts +4 -3
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +14 -17
- package/dist/CheckboxGroup.d.ts +2 -2
- package/dist/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup.js +4 -4
- package/dist/Chip.d.ts +2 -2
- package/dist/Chip.d.ts.map +1 -1
- package/dist/Chip.js +23 -28
- package/dist/ChipGroup.d.ts +16 -8
- package/dist/ChipGroup.d.ts.map +1 -1
- package/dist/ChipGroup.js +39 -9
- package/dist/ChipLink.d.ts +2 -1
- package/dist/ChipLink.d.ts.map +1 -1
- package/dist/ChipLink.js +4 -7
- package/dist/ChipRemovable.d.ts +0 -2
- package/dist/ChipRemovable.d.ts.map +1 -1
- package/dist/ChipRemovable.js +8 -11
- package/dist/ChipSelectable.d.ts +12 -2
- package/dist/ChipSelectable.d.ts.map +1 -1
- package/dist/ChipSelectable.js +24 -26
- package/dist/Dropdown.d.ts +9 -5
- package/dist/Dropdown.d.ts.map +1 -1
- package/dist/Dropdown.js +68 -32
- package/dist/Icon.d.ts +116 -0
- package/dist/Icon.d.ts.map +1 -0
- package/dist/{icon-03e86700.js → Icon.js} +61 -32
- package/dist/Input.d.ts +13 -17
- package/dist/Input.d.ts.map +1 -1
- package/dist/Input.js +33 -24
- package/dist/LeuElement-ba5ea33d.d.ts +7 -0
- package/dist/LeuElement-ba5ea33d.d.ts.map +1 -0
- package/dist/{_rollupPluginBabelHelpers-20f659f4.js → LeuElement-ba5ea33d.js} +20 -1
- package/dist/Menu.d.ts +24 -2
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +120 -3
- package/dist/MenuItem.d.ts +28 -11
- package/dist/MenuItem.d.ts.map +1 -1
- package/dist/MenuItem.js +110 -63
- package/dist/Pagination.d.ts +10 -3
- package/dist/Pagination.d.ts.map +1 -1
- package/dist/Pagination.js +24 -21
- package/dist/Popup.d.ts +21 -3
- package/dist/Popup.d.ts.map +1 -1
- package/dist/Popup.js +44 -17
- package/dist/Radio.d.ts +4 -2
- package/dist/Radio.d.ts.map +1 -1
- package/dist/Radio.js +9 -14
- package/dist/RadioGroup.d.ts +2 -2
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +20 -11
- package/dist/ScrollTop.d.ts +2 -2
- package/dist/ScrollTop.d.ts.map +1 -1
- package/dist/ScrollTop.js +10 -8
- package/dist/Select.d.ts +75 -37
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +279 -181
- package/dist/Table.d.ts +2 -6
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +16 -16
- package/dist/VisuallyHidden.d.ts +2 -2
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -14
- package/dist/leu-accordion.d.ts.map +1 -1
- package/dist/leu-accordion.js +2 -3
- package/dist/leu-breadcrumb.d.ts.map +1 -1
- package/dist/leu-breadcrumb.js +4 -10
- package/dist/leu-button-group.d.ts.map +1 -1
- package/dist/leu-button-group.js +2 -3
- package/dist/leu-button.d.ts +1 -1
- package/dist/leu-button.d.ts.map +1 -1
- package/dist/leu-button.js +4 -5
- package/dist/leu-checkbox-group.d.ts.map +1 -1
- package/dist/leu-checkbox-group.js +2 -3
- package/dist/leu-checkbox.d.ts.map +1 -1
- package/dist/leu-checkbox.js +3 -4
- package/dist/leu-chip-group.d.ts.map +1 -1
- package/dist/leu-chip-group.js +2 -3
- package/dist/leu-chip-link.d.ts.map +1 -1
- package/dist/leu-chip-link.js +2 -3
- package/dist/leu-chip-removable.d.ts.map +1 -1
- package/dist/leu-chip-removable.js +3 -4
- package/dist/leu-chip-selectable.d.ts.map +1 -1
- package/dist/leu-chip-selectable.js +2 -3
- package/dist/leu-dropdown.d.ts.map +1 -1
- package/dist/leu-dropdown.js +5 -10
- package/dist/leu-icon.d.ts +3 -0
- package/dist/leu-icon.d.ts.map +1 -0
- package/dist/leu-icon.js +7 -0
- package/dist/leu-input.d.ts.map +1 -1
- package/dist/leu-input.js +3 -4
- package/dist/leu-menu-item.d.ts.map +1 -1
- package/dist/leu-menu-item.js +3 -5
- package/dist/leu-menu.d.ts.map +1 -1
- package/dist/leu-menu.js +5 -3
- package/dist/leu-pagination.d.ts.map +1 -1
- package/dist/leu-pagination.js +4 -7
- package/dist/leu-popup.d.ts.map +1 -1
- package/dist/leu-popup.js +2 -3
- package/dist/leu-radio-group.d.ts.map +1 -1
- package/dist/leu-radio-group.js +2 -3
- package/dist/leu-radio.d.ts.map +1 -1
- package/dist/leu-radio.js +2 -3
- package/dist/leu-scroll-top.d.ts.map +1 -1
- package/dist/leu-scroll-top.js +4 -6
- package/dist/leu-select.d.ts.map +1 -1
- package/dist/leu-select.js +5 -13
- package/dist/leu-table.d.ts.map +1 -1
- package/dist/leu-table.js +4 -8
- package/dist/leu-visually-hidden.d.ts.map +1 -1
- package/dist/leu-visually-hidden.js +2 -3
- package/dist/theme.css +2 -0
- package/dist/vscode.html-custom-data.json +124 -74
- package/dist/vue/index.d.ts +83 -67
- package/dist/web-types.json +256 -142
- package/package.json +9 -12
- package/scripts/generate-component/templates/[Name].js +6 -3
- package/scripts/generate-component/templates/test/[name].test.js +1 -1
- package/src/components/accordion/Accordion.js +13 -10
- package/src/components/accordion/leu-accordion.js +1 -2
- package/src/components/breadcrumb/Breadcrumb.js +31 -18
- package/src/components/breadcrumb/leu-breadcrumb.js +1 -2
- package/src/components/button/Button.js +45 -71
- package/src/components/button/button.css +11 -9
- package/src/components/button/leu-button.js +1 -2
- package/src/components/button/stories/button.stories.js +60 -19
- package/src/components/button/test/button.test.js +26 -63
- package/src/components/button-group/ButtonGroup.js +4 -2
- package/src/components/button-group/leu-button-group.js +1 -2
- package/src/components/checkbox/Checkbox.js +17 -11
- package/src/components/checkbox/CheckboxGroup.js +6 -3
- package/src/components/checkbox/leu-checkbox-group.js +1 -2
- package/src/components/checkbox/leu-checkbox.js +1 -2
- package/src/components/checkbox/stories/checkbox-group.stories.js +10 -26
- package/src/components/checkbox/stories/checkbox.stories.js +2 -7
- package/src/components/checkbox/test/checkbox-group.test.js +6 -21
- package/src/components/checkbox/test/checkbox.test.js +1 -12
- package/src/components/chip/Chip.js +5 -4
- package/src/components/chip/ChipGroup.js +38 -8
- package/src/components/chip/ChipLink.js +3 -7
- package/src/components/chip/ChipRemovable.js +8 -11
- package/src/components/chip/ChipSelectable.js +23 -27
- package/src/components/chip/chip.css +19 -20
- package/src/components/chip/leu-chip-group.js +1 -2
- package/src/components/chip/leu-chip-link.js +1 -2
- package/src/components/chip/leu-chip-removable.js +1 -2
- package/src/components/chip/leu-chip-selectable.js +1 -2
- package/src/components/chip/stories/chip-group.stories.js +6 -9
- package/src/components/chip/stories/chip-link.stories.js +3 -5
- package/src/components/chip/stories/chip-removable.stories.js +3 -4
- package/src/components/chip/stories/chip-selectable.stories.js +3 -3
- package/src/components/chip/test/chip-group.test.js +82 -30
- package/src/components/chip/test/chip-link.test.js +2 -6
- package/src/components/chip/test/chip-removable.test.js +4 -10
- package/src/components/chip/test/chip-selectable.test.js +10 -12
- package/src/components/dropdown/Dropdown.js +79 -26
- package/src/components/dropdown/leu-dropdown.js +1 -2
- package/src/components/dropdown/stories/dropdown.stories.js +30 -7
- package/src/components/dropdown/test/dropdown.test.js +5 -5
- package/src/components/icon/Icon.js +55 -0
- package/src/components/icon/icon.css +6 -0
- package/src/components/icon/leu-icon.js +5 -0
- package/src/components/icon/{icon.js → paths.js} +4 -37
- package/src/components/icon/stories/icon.stories.js +47 -0
- package/src/components/icon/test/icon.test.js +23 -40
- package/src/components/input/Input.js +31 -20
- package/src/components/input/input.css +4 -2
- package/src/components/input/leu-input.js +1 -2
- package/src/components/input/stories/input.stories.js +5 -5
- package/src/components/input/test/input.test.js +22 -0
- package/src/components/menu/Menu.js +143 -2
- package/src/components/menu/MenuItem.js +104 -52
- package/src/components/menu/leu-menu-item.js +1 -2
- package/src/components/menu/leu-menu.js +1 -2
- package/src/components/menu/menu-item.css +11 -4
- package/src/components/menu/stories/menu-item.stories.js +15 -4
- package/src/components/menu/stories/menu.stories.js +34 -7
- package/src/components/menu/test/menu-item.test.js +88 -82
- package/src/components/menu/test/menu.test.js +101 -8
- package/src/components/pagination/Pagination.js +27 -18
- package/src/components/pagination/leu-pagination.js +1 -2
- package/src/components/popup/Popup.js +39 -16
- package/src/components/popup/leu-popup.js +1 -2
- package/src/components/popup/popup.css +1 -0
- package/src/components/radio/Radio.js +12 -7
- package/src/components/radio/RadioGroup.js +18 -12
- package/src/components/radio/leu-radio-group.js +1 -2
- package/src/components/radio/leu-radio.js +1 -2
- package/src/components/radio/stories/radio-group.stories.js +5 -19
- package/src/components/radio/stories/radio.stories.js +2 -7
- package/src/components/radio/test/radio-group.test.js +6 -9
- package/src/components/radio/test/radio.test.js +3 -13
- package/src/components/scroll-top/ScrollTop.js +15 -5
- package/src/components/scroll-top/leu-scroll-top.js +1 -2
- package/src/components/select/Select.js +279 -175
- package/src/components/select/leu-select.js +1 -2
- package/src/components/select/select.css +20 -12
- package/src/components/select/stories/select.stories.js +16 -2
- package/src/components/select/test/select.test.js +191 -37
- package/src/components/table/Table.js +15 -9
- package/src/components/table/leu-table.js +1 -2
- package/src/components/table/table.css +3 -1
- package/src/components/visually-hidden/VisuallyHidden.js +6 -2
- package/src/components/visually-hidden/leu-visually-hidden.js +1 -2
- package/src/lib/LeuElement.js +23 -0
- package/src/lib/a11y.js +26 -0
- package/src/styles/custom-properties.css +2 -0
- package/web-test-runner.config.mjs +2 -0
- package/dist/Button-5326c982.d.ts.map +0 -1
- package/dist/_rollupPluginBabelHelpers-20f659f4.d.ts +0 -3
- package/dist/_rollupPluginBabelHelpers-20f659f4.d.ts.map +0 -1
- package/dist/defineElement-40372b4b.d.ts +0 -9
- package/dist/defineElement-40372b4b.d.ts.map +0 -1
- package/dist/defineElement-40372b4b.js +0 -15
- package/dist/icon-03e86700.d.ts +0 -11
- package/dist/icon-03e86700.d.ts.map +0 -1
- package/src/lib/defineElement.js +0 -13
package/dist/RadioGroup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
2
|
-
import { css,
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-ba5ea33d.js';
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
|
|
5
5
|
var css_248z = css`:host {
|
|
@@ -38,7 +38,7 @@ var css_248z = css`:host {
|
|
|
38
38
|
/**
|
|
39
39
|
* @tagname leu-radio-group
|
|
40
40
|
*/
|
|
41
|
-
class LeuRadioGroup extends
|
|
41
|
+
class LeuRadioGroup extends LeuElement {
|
|
42
42
|
constructor() {
|
|
43
43
|
super();
|
|
44
44
|
_defineProperty(this, "handleFocusIn", e => {
|
|
@@ -65,11 +65,9 @@ class LeuRadioGroup extends LitElement {
|
|
|
65
65
|
this.setTabIndex();
|
|
66
66
|
});
|
|
67
67
|
_defineProperty(this, "handleInput", e => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
}
|
|
68
|
+
this.items.forEach(item => {
|
|
69
|
+
item.checked = item === e.target; // eslint-disable-line no-param-reassign
|
|
70
|
+
});
|
|
73
71
|
});
|
|
74
72
|
this.orientation = "HORIZONTAL";
|
|
75
73
|
this._currentIndex = 0;
|
|
@@ -89,12 +87,23 @@ class LeuRadioGroup extends LitElement {
|
|
|
89
87
|
this.removeEventListeners();
|
|
90
88
|
}
|
|
91
89
|
addEventListeners() {
|
|
92
|
-
|
|
90
|
+
/**
|
|
91
|
+
* It is technically possible to add an event listener to the host element
|
|
92
|
+
* before it is connected to the dom. In that case the outside event listener would
|
|
93
|
+
* be called before the following event listener. But at this point multiple
|
|
94
|
+
* radio buttons could be selected at the same time because `handleInput` hasn't been
|
|
95
|
+
* called yet. That's why we use the capture phase.
|
|
96
|
+
*/
|
|
97
|
+
this.addEventListener("input", this.handleInput, {
|
|
98
|
+
capture: true
|
|
99
|
+
});
|
|
93
100
|
this.addEventListener("focusin", this.handleFocusIn);
|
|
94
101
|
this.addEventListener("keydown", this.handleKeyDown);
|
|
95
102
|
}
|
|
96
103
|
removeEventListeners() {
|
|
97
|
-
this.removeEventListener("input", this.handleInput
|
|
104
|
+
this.removeEventListener("input", this.handleInput, {
|
|
105
|
+
capture: true
|
|
106
|
+
});
|
|
98
107
|
this.removeEventListener("focusin", this.handleFocusIn);
|
|
99
108
|
this.removeEventListener("keydown", this.handleKeyDown);
|
|
100
109
|
}
|
|
@@ -130,7 +139,7 @@ class LeuRadioGroup extends LitElement {
|
|
|
130
139
|
});
|
|
131
140
|
}
|
|
132
141
|
handleItems() {
|
|
133
|
-
this.items =
|
|
142
|
+
this.items = Array.from(this.querySelectorAll(":scope > *:not([slot])"));
|
|
134
143
|
this.initializeIndex();
|
|
135
144
|
this.setTabIndex();
|
|
136
145
|
}
|
package/dist/ScrollTop.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @tagname leu-scroll-top
|
|
3
3
|
*/
|
|
4
|
-
export class LeuScrollTop extends
|
|
4
|
+
export class LeuScrollTop extends LeuElement {
|
|
5
5
|
static scrollToTop(): void;
|
|
6
6
|
_scrollDown: boolean;
|
|
7
7
|
/**
|
|
@@ -15,5 +15,5 @@ export class LeuScrollTop extends LitElement {
|
|
|
15
15
|
_scrollListener: Function;
|
|
16
16
|
render(): import("lit-html").TemplateResult<1>;
|
|
17
17
|
}
|
|
18
|
-
import {
|
|
18
|
+
import { L as LeuElement } from './LeuElement-ba5ea33d.js';
|
|
19
19
|
//# sourceMappingURL=ScrollTop.d.ts.map
|
package/dist/ScrollTop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollTop.d.ts","sourceRoot":"","sources":["ScrollTop.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScrollTop.d.ts","sourceRoot":"","sources":["ScrollTop.js"],"names":[],"mappings":"AA4CA;;GAEG;AACH;IAwCE,2BAMC;IAtCO,qBAAwB;IAM5B;;;;OAIG;IACH,qBAA2E;IAC3E,kBAA+B;IAQjC,gBAAgB;IAChB,0BAAgC;IAkBlC,+CAgBC;CACF;gCA/GqD,0BAA0B"}
|
package/dist/ScrollTop.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
2
|
-
import { css,
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-ba5ea33d.js';
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import './
|
|
4
|
+
import { L as LeuButton } from './Button-7370f901.js';
|
|
5
|
+
import { LeuIcon } from './Icon.js';
|
|
5
6
|
import { t as throttle } from './utils-65469421.js';
|
|
6
|
-
import './defineElement-40372b4b.js';
|
|
7
|
-
import './Button-5326c982.js';
|
|
8
7
|
import 'lit/directives/if-defined.js';
|
|
9
|
-
import './icon-03e86700.js';
|
|
10
8
|
|
|
11
9
|
var css_248z = css`.scroll-top {
|
|
12
10
|
overflow: hidden;
|
|
@@ -47,7 +45,7 @@ var css_248z = css`.scroll-top {
|
|
|
47
45
|
/**
|
|
48
46
|
* @tagname leu-scroll-top
|
|
49
47
|
*/
|
|
50
|
-
class LeuScrollTop extends
|
|
48
|
+
class LeuScrollTop extends LeuElement {
|
|
51
49
|
constructor() {
|
|
52
50
|
super();
|
|
53
51
|
/** @internal */
|
|
@@ -102,16 +100,20 @@ class LeuScrollTop extends LitElement {
|
|
|
102
100
|
return html`
|
|
103
101
|
<div class=${classMap(cssClasses)}>
|
|
104
102
|
<leu-button
|
|
105
|
-
icon="arrowUp"
|
|
106
103
|
label="Zum Seitenanfang"
|
|
107
104
|
round
|
|
108
105
|
@click="${() => LeuScrollTop.scrollToTop()}"
|
|
109
106
|
>
|
|
107
|
+
<leu-icon name="arrowUp"></leu-icon>
|
|
110
108
|
</leu-button>
|
|
111
109
|
</div>
|
|
112
110
|
`;
|
|
113
111
|
}
|
|
114
112
|
}
|
|
113
|
+
_defineProperty(LeuScrollTop, "dependencies", {
|
|
114
|
+
"leu-button": LeuButton,
|
|
115
|
+
"leu-icon": LeuIcon
|
|
116
|
+
});
|
|
115
117
|
_defineProperty(LeuScrollTop, "styles", css_248z);
|
|
116
118
|
_defineProperty(LeuScrollTop, "properties", {
|
|
117
119
|
_showButton: {
|
package/dist/Select.d.ts
CHANGED
|
@@ -2,9 +2,22 @@
|
|
|
2
2
|
* @tagname leu-select
|
|
3
3
|
* @slot before - Optional content the appears before the option list
|
|
4
4
|
* @slot after - Optional content the appears after the option list
|
|
5
|
+
* @property {string} name - Reflects to the name attribute of the hidden input field that would be used in a form
|
|
6
|
+
* @property {boolean} open - The expanded state of the popup
|
|
7
|
+
* @property {string} label - The label of the select
|
|
8
|
+
* @property {array} value - List of selected values. If they're set from outside the component, the select element tries to find all the options with the given values and selects them.
|
|
9
|
+
* @property {boolean} clearable - Show a clearable button to reset the value
|
|
10
|
+
* @property {boolean} disabled - If the select should be disabled
|
|
11
|
+
* @property {boolean} filterable - Show an input field to filter the options inside the popup
|
|
12
|
+
* @property {boolean} multiple - Allow multiple selections
|
|
13
|
+
* @attribute {string} value - The selected values separated by commas.
|
|
5
14
|
*/
|
|
6
|
-
export class LeuSelect extends
|
|
15
|
+
export class LeuSelect extends LeuElement {
|
|
7
16
|
static get properties(): {
|
|
17
|
+
name: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
reflect: boolean;
|
|
20
|
+
};
|
|
8
21
|
open: {
|
|
9
22
|
type: BooleanConstructor;
|
|
10
23
|
reflect: boolean;
|
|
@@ -13,11 +26,11 @@ export class LeuSelect extends LitElement {
|
|
|
13
26
|
type: StringConstructor;
|
|
14
27
|
reflect: boolean;
|
|
15
28
|
};
|
|
16
|
-
options: {
|
|
17
|
-
type: ArrayConstructor;
|
|
18
|
-
};
|
|
19
29
|
value: {
|
|
20
30
|
type: ArrayConstructor;
|
|
31
|
+
converter: {
|
|
32
|
+
fromAttribute(value: any): any;
|
|
33
|
+
};
|
|
21
34
|
};
|
|
22
35
|
clearable: {
|
|
23
36
|
type: BooleanConstructor;
|
|
@@ -35,7 +48,13 @@ export class LeuSelect extends LitElement {
|
|
|
35
48
|
type: BooleanConstructor;
|
|
36
49
|
reflect: boolean;
|
|
37
50
|
};
|
|
38
|
-
|
|
51
|
+
_optionFilter: {
|
|
52
|
+
state: boolean;
|
|
53
|
+
};
|
|
54
|
+
_hasFilterResults: {
|
|
55
|
+
state: boolean;
|
|
56
|
+
};
|
|
57
|
+
_displayValue: {
|
|
39
58
|
state: boolean;
|
|
40
59
|
};
|
|
41
60
|
};
|
|
@@ -46,53 +65,72 @@ export class LeuSelect extends LitElement {
|
|
|
46
65
|
clearable: boolean;
|
|
47
66
|
filterable: boolean;
|
|
48
67
|
value: any[];
|
|
49
|
-
options: any[];
|
|
50
68
|
label: string;
|
|
69
|
+
name: string;
|
|
51
70
|
/** @internal */
|
|
52
|
-
|
|
71
|
+
_optionFilter: string;
|
|
53
72
|
/** @internal */
|
|
54
|
-
|
|
73
|
+
_hasFilterResults: boolean;
|
|
55
74
|
/** @internal */
|
|
56
|
-
|
|
75
|
+
_deferedChangeEvent: boolean;
|
|
57
76
|
/** @internal */
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @type {import("lit/directives/ref").Ref<import("../menu/Menu").LeuMenu>}
|
|
61
|
-
*/
|
|
62
|
-
menuRef: import("lit/directives/ref").Ref<any>;
|
|
77
|
+
_displayValue: string;
|
|
63
78
|
/**
|
|
64
79
|
* @type {import("lit/directives/ref").Ref<import("../input/Input").LeuInput>}
|
|
65
80
|
*/
|
|
66
|
-
|
|
81
|
+
_optionFilterRef: import("lit/directives/ref").Ref<any>;
|
|
67
82
|
/**
|
|
68
83
|
* @type {import("lit/directives/ref").Ref<HTMLButtonElement>}
|
|
69
84
|
*/
|
|
70
|
-
|
|
85
|
+
_toggleButtonRef: import("lit/directives/ref").Ref<HTMLButtonElement>;
|
|
86
|
+
/**
|
|
87
|
+
* @type {import("lit/directives/ref").Ref<import("../menu/Menu").LeuMenu>}
|
|
88
|
+
*/
|
|
89
|
+
_menuRef: import("lit/directives/ref").Ref<any>;
|
|
71
90
|
updated(changedProperties: any): void;
|
|
72
|
-
getDisplayValue(value: any): any;
|
|
73
|
-
getFilteredOptions(): any[];
|
|
74
|
-
emitUpdateEvents(): void;
|
|
75
|
-
emitInputEvent(): void;
|
|
76
|
-
emitChangeEvent(): void;
|
|
77
|
-
clearValue(event: any): void;
|
|
78
|
-
toggleDropdown(): void;
|
|
79
|
-
openDropdown(): void;
|
|
80
|
-
closeDropdown(): void;
|
|
81
91
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
92
|
+
* Apply the current state to the menu items.
|
|
93
|
+
* - Set the active property when the value property has changed.
|
|
94
|
+
* - Hide menu items that do not match the filter.
|
|
95
|
+
*/
|
|
96
|
+
_updateMenuItems(changed: any): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
* @param {KeyboardEvent} event
|
|
100
|
+
*/
|
|
101
|
+
_handleToggleKeyDown(event: KeyboardEvent): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
* @param {KeyboardEvent} event
|
|
105
|
+
*/
|
|
106
|
+
_handleFilterInputKeyDown(event: KeyboardEvent): void;
|
|
107
|
+
/**
|
|
108
|
+
* Determines the value or label that should be displayed inside the toggle button.
|
|
109
|
+
* @returns {String | nothing}
|
|
110
|
+
*/
|
|
111
|
+
_getDisplayValue(): string | typeof nothing;
|
|
112
|
+
_emitInputEvent(): void;
|
|
113
|
+
_emitChangeEvent(): void;
|
|
114
|
+
_clearValue(event: any): void;
|
|
115
|
+
_toggleDropdown(): void;
|
|
116
|
+
_closeDropdown(): void;
|
|
117
|
+
_handleFilterInput(event: any): void;
|
|
118
|
+
/**
|
|
119
|
+
* Checks if the given value is selected.
|
|
120
|
+
* @param {String} menuItemValue
|
|
121
|
+
* @returns {Boolean}
|
|
122
|
+
*/
|
|
123
|
+
_isSelected(menuItemValue: string): boolean;
|
|
124
|
+
_handleMenuItemClick(event: any): void;
|
|
125
|
+
/**
|
|
126
|
+
* Close the dropdown if the focus moves outside the component.
|
|
85
127
|
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
renderMenu(): import("lit-html").TemplateResult<1>;
|
|
91
|
-
renderFilterInput(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
92
|
-
renderApplyButton(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
93
|
-
renderToggleButton(): import("lit-html").TemplateResult<1>;
|
|
128
|
+
_handlePopupFocusOut(event: any): void;
|
|
129
|
+
_renderFilterInput(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
130
|
+
_renderApplyButton(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
131
|
+
_renderToggleButton(): import("lit-html").TemplateResult<1>;
|
|
94
132
|
render(): import("lit-html").TemplateResult<1>;
|
|
95
133
|
}
|
|
96
|
-
import {
|
|
134
|
+
import { L as LeuElement } from './LeuElement-ba5ea33d.js';
|
|
97
135
|
import { nothing } from 'lit';
|
|
98
136
|
//# sourceMappingURL=Select.d.ts.map
|
package/dist/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AA6PA
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AA6PA;;;;;;;;;;;;;GAaG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmDC;IACD,wCAKC;IA4BC,cAAiB;IACjB,kBAAqB;IAErB,kBAAqB;IACrB,mBAAsB;IACtB,oBAAuB;IACvB,aAAe;IACf,cAAe;IACf,aAAc;IAEd,gBAAgB;IAChB,sBAAuB;IAEvB,gBAAgB;IAChB,2BAA6B;IAE7B,gBAAgB;IAChB,6BAAgC;IAEhC,gBAAgB;IAChB,sBAAuB;IAEvB;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,KAAmC,CAE1C;IACnC;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAE1B;IAEnC;;OAEG;IACH,UAFU,OAAO,oBAAoB,EAAE,GAAG,KAAgC,CAE/C;IAU7B,sCAoBC;IAED;;;;OAIG;IACH,8CA0BC;IACD;;;OAGG;IACH,4BAFW,aAAa,iBAcvB;IAED;;;OAGG;IACH,iCAFW,aAAa,QAQvB;IAED;;;OAGG;IACH,oBAFa,uBAAgB,CAO5B;IACD,wBAMC;IACD,yBAMC;IACD,8BAOC;IACD,wBAIC;IACD,uBAMC;IACD,qCAEC;IAED;;;;OAIG;IACH,4CAEC;IACD,uCAoBC;IAED;;OAEG;IACH,uCAIC;IACD,4EAaC;IACD,4EAeC;IACD,4DAmCC;IACD,+CAmDC;CACF;gCA7qBqD,0BAA0B;wBAC7C,KAAK"}
|