@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/vue/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { LeuChipLink } from "../ChipLink.js";
|
|
|
11
11
|
import type { LeuChipRemovable } from "../ChipRemovable.js";
|
|
12
12
|
import type { LeuChipSelectable, CustomEvent } from "../ChipSelectable.js";
|
|
13
13
|
import type { LeuDropdown } from "../Dropdown.js";
|
|
14
|
+
import type { LeuIcon } from "../Icon.js";
|
|
14
15
|
import type { LeuInput, CustomEvent } from "../Input.js";
|
|
15
16
|
import type { LeuMenu } from "../Menu.js";
|
|
16
17
|
import type { LeuMenuItem } from "../MenuItem.js";
|
|
@@ -59,10 +60,6 @@ type LeuButtonProps = {
|
|
|
59
60
|
/** */
|
|
60
61
|
label?: LeuButton["label"];
|
|
61
62
|
/** */
|
|
62
|
-
icon?: LeuButton["icon"];
|
|
63
|
-
/** Only taken into account if Label and no Icon is set */
|
|
64
|
-
iconPosition?: LeuButton["iconPosition"];
|
|
65
|
-
/** */
|
|
66
63
|
size?: LeuButton["size"];
|
|
67
64
|
/** */
|
|
68
65
|
variant?: LeuButton["variant"];
|
|
@@ -99,15 +96,9 @@ type LeuCheckboxProps = {
|
|
|
99
96
|
/** */
|
|
100
97
|
disabled?: LeuCheckbox["disabled"];
|
|
101
98
|
/** */
|
|
102
|
-
identifier?: LeuCheckbox["identifier"];
|
|
103
|
-
/** */
|
|
104
99
|
value?: LeuCheckbox["value"];
|
|
105
100
|
/** */
|
|
106
101
|
name?: LeuCheckbox["name"];
|
|
107
|
-
/** */
|
|
108
|
-
label?: LeuCheckbox["label"];
|
|
109
|
-
/** */
|
|
110
|
-
checkIcon?: LeuCheckbox["checkIcon"];
|
|
111
102
|
};
|
|
112
103
|
|
|
113
104
|
type LeuCheckboxGroupProps = {
|
|
@@ -130,7 +121,8 @@ type LeuChipGroupProps = {
|
|
|
130
121
|
"heading-level"?: LeuChipGroup["headingLevel"];
|
|
131
122
|
/** */
|
|
132
123
|
label?: LeuChipGroup["label"];
|
|
133
|
-
/**
|
|
124
|
+
/** Checks the items with the given values.
|
|
125
|
+
If the selectionMode is single, only the first item with the given value is checked. */
|
|
134
126
|
value?: LeuChipGroup["value"];
|
|
135
127
|
};
|
|
136
128
|
|
|
@@ -144,8 +136,6 @@ type LeuChipLinkProps = {
|
|
|
144
136
|
/** */
|
|
145
137
|
inverted?: LeuChipLink["inverted"];
|
|
146
138
|
/** */
|
|
147
|
-
label?: LeuChipLink["label"];
|
|
148
|
-
/** */
|
|
149
139
|
""?: LeuChipLink[""];
|
|
150
140
|
};
|
|
151
141
|
|
|
@@ -155,8 +145,6 @@ type LeuChipRemovableProps = {
|
|
|
155
145
|
/** */
|
|
156
146
|
inverted?: LeuChipRemovable["inverted"];
|
|
157
147
|
/** */
|
|
158
|
-
label?: LeuChipRemovable["label"];
|
|
159
|
-
/** */
|
|
160
148
|
""?: LeuChipRemovable[""];
|
|
161
149
|
/** Dispatched when the user clicks on the chip */
|
|
162
150
|
onRemove?: (e: CustomEvent<never>) => void;
|
|
@@ -167,19 +155,15 @@ type LeuChipSelectableProps = {
|
|
|
167
155
|
""?: LeuChipSelectable[""];
|
|
168
156
|
/** The size of the chip. Not supported for radio variant. */
|
|
169
157
|
size?: LeuChipSelectable["size"];
|
|
170
|
-
/**
|
|
171
|
-
- `toggle`: The chip behaves like a toggle button.
|
|
172
|
-
- `radio`: The chip behaves like a radio button. */
|
|
158
|
+
/** `toggle` or `radio`. Determines if only one or multiple chips can be selected. */
|
|
173
159
|
variant?: LeuChipSelectable["variant"];
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
/**
|
|
160
|
+
/** Whether the chip is selected. */
|
|
161
|
+
checked?: LeuChipSelectable["checked"];
|
|
162
|
+
/** The value of the chip. */
|
|
177
163
|
value?: LeuChipSelectable["value"];
|
|
178
164
|
/** */
|
|
179
165
|
inverted?: LeuChipSelectable["inverted"];
|
|
180
166
|
/** */
|
|
181
|
-
label?: LeuChipSelectable["label"];
|
|
182
|
-
/** */
|
|
183
167
|
""?: LeuChipSelectable[""];
|
|
184
168
|
/** */
|
|
185
169
|
onInput?: (e: CustomEvent<CustomEvent>) => void;
|
|
@@ -191,11 +175,21 @@ type LeuDropdownProps = {
|
|
|
191
175
|
/** */
|
|
192
176
|
expanded?: LeuDropdown["expanded"];
|
|
193
177
|
/** */
|
|
178
|
+
hasSlotController?: LeuDropdown["hasSlotController"];
|
|
179
|
+
/** */
|
|
194
180
|
_documentClickHandler?: LeuDropdown["_documentClickHandler"];
|
|
195
181
|
/** */
|
|
196
|
-
|
|
182
|
+
_menuItemClickHandler?: LeuDropdown["_menuItemClickHandler"];
|
|
183
|
+
/** Close the dropdown when the user presses the Escape or the Tab key.
|
|
184
|
+
Navigating the menu with the arrow keys is handled by the menu itself. */
|
|
185
|
+
_keyDownMenuHandler?: LeuDropdown["_keyDownMenuHandler"];
|
|
197
186
|
/** */
|
|
198
|
-
|
|
187
|
+
_toggleRef?: LeuDropdown["_toggleRef"];
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
type LeuIconProps = {
|
|
191
|
+
/** The name of the icon to display. */
|
|
192
|
+
name?: LeuIcon["name"];
|
|
199
193
|
};
|
|
200
194
|
|
|
201
195
|
type LeuInputProps = {
|
|
@@ -241,35 +235,34 @@ type LeuInputProps = {
|
|
|
241
235
|
step?: LeuInput["step"];
|
|
242
236
|
/** */
|
|
243
237
|
_validity?: LeuInput["_validity"];
|
|
244
|
-
|
|
238
|
+
/** */
|
|
239
|
+
valueAsNumber?: LeuInput["valueAsNumber"];
|
|
245
240
|
/** Dispatched when the value of the input element changes. */
|
|
246
241
|
onInput?: (e: CustomEvent<CustomEvent>) => void;
|
|
247
242
|
/** Dispatched when the value of the input element changes and the input element loses focus. */
|
|
248
243
|
onChange?: (e: CustomEvent<CustomEvent>) => void;
|
|
249
244
|
};
|
|
250
245
|
|
|
251
|
-
type LeuMenuProps = {
|
|
246
|
+
type LeuMenuProps = {
|
|
247
|
+
/** This has only an effect when the role is 'menu'. It defines which role the menu items will get. Default is 'none'. */
|
|
248
|
+
selects?: LeuMenu["selects"];
|
|
249
|
+
/** */
|
|
250
|
+
value?: LeuMenu["value"];
|
|
251
|
+
};
|
|
252
252
|
|
|
253
253
|
type LeuMenuItemProps = {
|
|
254
|
-
/**
|
|
255
|
-
If no icon with this value is found, it will be displayed as text.
|
|
256
|
-
If the value is "EMPTY", an empty placeholder with the size of an icon will be displayed. */
|
|
257
|
-
before?: LeuMenuItem["before"];
|
|
258
|
-
/** Can be either an icon name or a text
|
|
259
|
-
If no icon with this value is found, it will be displayed as text
|
|
260
|
-
If the value is "EMPTY", an empty placeholder with the size of an icon will be displayed. */
|
|
261
|
-
after?: LeuMenuItem["after"];
|
|
262
|
-
/** */
|
|
254
|
+
/** Defines if the item is selected or checked */
|
|
263
255
|
active?: LeuMenuItem["active"];
|
|
264
|
-
/**
|
|
265
|
-
This is just a visual effect and does not change the active state. */
|
|
266
|
-
highlighted?: LeuMenuItem["highlighted"];
|
|
267
|
-
/** */
|
|
256
|
+
/** Disables the underlying button or link */
|
|
268
257
|
disabled?: LeuMenuItem["disabled"];
|
|
269
|
-
/**
|
|
270
|
-
|
|
271
|
-
/**
|
|
258
|
+
/** If the item should be focusable. Will be reflected as `tabindex` to the underlying button or link */
|
|
259
|
+
tabbable?: LeuMenuItem["tabbable"];
|
|
260
|
+
/** The href of the underlying link */
|
|
272
261
|
href?: LeuMenuItem["href"];
|
|
262
|
+
/** The value of the item. It must not contain commas. See `getValue()` */
|
|
263
|
+
value?: LeuMenuItem["value"];
|
|
264
|
+
/** The role of the item. This will be reflected as `role` to the underlying button or link. Default is `'menuitem'.` */
|
|
265
|
+
componentRole?: LeuMenuItem["componentRole"];
|
|
273
266
|
};
|
|
274
267
|
|
|
275
268
|
type LeuPaginationProps = {
|
|
@@ -279,10 +272,7 @@ type LeuPaginationProps = {
|
|
|
279
272
|
itemsPerPage?: LeuPagination["itemsPerPage"];
|
|
280
273
|
/** */
|
|
281
274
|
numOfItems?: LeuPagination["numOfItems"];
|
|
282
|
-
/**
|
|
283
|
-
already clamped page number. Should only
|
|
284
|
-
be accessed through the `page` getter and
|
|
285
|
-
setter. */
|
|
275
|
+
/** */
|
|
286
276
|
_page?: LeuPagination["_page"];
|
|
287
277
|
/** */
|
|
288
278
|
page?: LeuPagination["page"];
|
|
@@ -329,13 +319,9 @@ type LeuRadioProps = {
|
|
|
329
319
|
/** */
|
|
330
320
|
disabled?: LeuRadio["disabled"];
|
|
331
321
|
/** */
|
|
332
|
-
identifier?: LeuRadio["identifier"];
|
|
333
|
-
/** */
|
|
334
322
|
value?: LeuRadio["value"];
|
|
335
323
|
/** */
|
|
336
324
|
name?: LeuRadio["name"];
|
|
337
|
-
/** */
|
|
338
|
-
label?: LeuRadio["label"];
|
|
339
325
|
};
|
|
340
326
|
|
|
341
327
|
type LeuRadioGroupProps = {
|
|
@@ -365,30 +351,34 @@ type LeuScrollTopProps = {
|
|
|
365
351
|
};
|
|
366
352
|
|
|
367
353
|
type LeuSelectProps = {
|
|
368
|
-
/**
|
|
354
|
+
/** 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. */
|
|
355
|
+
value?: LeuSelect["value"];
|
|
356
|
+
/** Reflects to the name attribute of the hidden input field that would be used in a form */
|
|
357
|
+
name?: LeuSelect["name"];
|
|
358
|
+
/** The expanded state of the popup */
|
|
369
359
|
open?: LeuSelect["open"];
|
|
370
|
-
/**
|
|
360
|
+
/** The label of the select */
|
|
371
361
|
label?: LeuSelect["label"];
|
|
372
|
-
/**
|
|
373
|
-
options?: LeuSelect["options"];
|
|
374
|
-
/** */
|
|
375
|
-
value?: LeuSelect["value"];
|
|
376
|
-
/** */
|
|
362
|
+
/** Show a clearable button to reset the value */
|
|
377
363
|
clearable?: LeuSelect["clearable"];
|
|
378
|
-
/**
|
|
364
|
+
/** If the select should be disabled */
|
|
379
365
|
disabled?: LeuSelect["disabled"];
|
|
380
|
-
/**
|
|
366
|
+
/** Show an input field to filter the options inside the popup */
|
|
381
367
|
filterable?: LeuSelect["filterable"];
|
|
382
|
-
/**
|
|
368
|
+
/** Allow multiple selections */
|
|
383
369
|
multiple?: LeuSelect["multiple"];
|
|
384
370
|
/** */
|
|
385
|
-
|
|
371
|
+
_optionFilter?: LeuSelect["_optionFilter"];
|
|
372
|
+
/** */
|
|
373
|
+
_hasFilterResults?: LeuSelect["_hasFilterResults"];
|
|
374
|
+
/** */
|
|
375
|
+
_displayValue?: LeuSelect["_displayValue"];
|
|
386
376
|
/** */
|
|
387
|
-
|
|
377
|
+
_optionFilterRef?: LeuSelect["_optionFilterRef"];
|
|
388
378
|
/** */
|
|
389
|
-
|
|
379
|
+
_toggleButtonRef?: LeuSelect["_toggleButtonRef"];
|
|
390
380
|
/** */
|
|
391
|
-
|
|
381
|
+
_menuRef?: LeuSelect["_menuRef"];
|
|
392
382
|
};
|
|
393
383
|
|
|
394
384
|
type LeuTableProps = {
|
|
@@ -474,6 +464,11 @@ export type CustomElements = {
|
|
|
474
464
|
*
|
|
475
465
|
* ---
|
|
476
466
|
*
|
|
467
|
+
*
|
|
468
|
+
* ### **Slots:**
|
|
469
|
+
* - **before** - The icon to display before the label
|
|
470
|
+
* - **after** - The icon to display after the label
|
|
471
|
+
* - _default_ - The label of the button or the icon if no label is set
|
|
477
472
|
*/
|
|
478
473
|
"leu-button": DefineComponent<LeuButtonProps>;
|
|
479
474
|
|
|
@@ -560,6 +555,19 @@ export type CustomElements = {
|
|
|
560
555
|
*/
|
|
561
556
|
"leu-dropdown": DefineComponent<LeuDropdownProps>;
|
|
562
557
|
|
|
558
|
+
/**
|
|
559
|
+
* A component to render all defined zhWeb icons.
|
|
560
|
+
* The `fill` of the icon is set to `currentColor` and
|
|
561
|
+
* can be overriden by setting the css `color` property.
|
|
562
|
+
* If the icon name is not found, a placeholder will be displayed.
|
|
563
|
+
* ---
|
|
564
|
+
*
|
|
565
|
+
*
|
|
566
|
+
* ### **CSS Properties:**
|
|
567
|
+
* - **--leu-icon-size** - The size of the icon. _(default: undefined)_
|
|
568
|
+
*/
|
|
569
|
+
"leu-icon": DefineComponent<LeuIconProps>;
|
|
570
|
+
|
|
563
571
|
/**
|
|
564
572
|
* A text input element.
|
|
565
573
|
* ---
|
|
@@ -577,7 +585,7 @@ export type CustomElements = {
|
|
|
577
585
|
* e.g.
|
|
578
586
|
* `tooLong(this.maxlength)`
|
|
579
587
|
* This way the framework user can create reasonable validation messages
|
|
580
|
-
* - **renderErrorMessages(
|
|
588
|
+
* - **renderErrorMessages(): _TemplateResult | nothing_** - Creates an error list with an item for the given validity state.
|
|
581
589
|
*/
|
|
582
590
|
"leu-input": DefineComponent<LeuInputProps>;
|
|
583
591
|
|
|
@@ -593,6 +601,9 @@ export type CustomElements = {
|
|
|
593
601
|
* ---
|
|
594
602
|
*
|
|
595
603
|
*
|
|
604
|
+
* ### **Methods:**
|
|
605
|
+
* - **getValue(): _string_** - Returns the value of the item. If `value` is not set, it will return the inner text
|
|
606
|
+
*
|
|
596
607
|
* ### **Slots:**
|
|
597
608
|
* - _default_ - The label of the menu item
|
|
598
609
|
*/
|
|
@@ -642,7 +653,12 @@ export type CustomElements = {
|
|
|
642
653
|
*
|
|
643
654
|
*
|
|
644
655
|
* ### **Methods:**
|
|
645
|
-
* - **
|
|
656
|
+
* - **_updateMenuItems(changed)** - Apply the current state to the menu items.
|
|
657
|
+
* - Set the active property when the value property has changed.
|
|
658
|
+
* - Hide menu items that do not match the filter.
|
|
659
|
+
* - **_getDisplayValue(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.
|
|
660
|
+
* - **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.
|
|
661
|
+
* - **_handlePopupFocusOut(event)** - Close the dropdown if the focus moves outside the component.
|
|
646
662
|
*
|
|
647
663
|
* ### **Slots:**
|
|
648
664
|
* - **before** - Optional content the appears before the option list
|