@statistikzh/leu 0.5.1 → 0.6.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 +40 -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 -26
- package/dist/{Button-5326c982.d.ts → Button-9692e403.d.ts} +10 -11
- package/dist/Button-9692e403.d.ts.map +1 -0
- package/dist/{Button-5326c982.js → Button-9692e403.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 -19
- package/dist/CheckboxGroup.d.ts +2 -2
- package/dist/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup.js +4 -6
- package/dist/Chip.d.ts +2 -2
- package/dist/Chip.d.ts.map +1 -1
- package/dist/Chip.js +6 -13
- package/dist/ChipGroup.d.ts +9 -7
- package/dist/ChipGroup.d.ts.map +1 -1
- package/dist/ChipGroup.js +8 -5
- 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 +9 -1
- package/dist/ChipSelectable.d.ts.map +1 -1
- package/dist/ChipSelectable.js +12 -16
- 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 +20 -0
- package/dist/Icon.d.ts.map +1 -0
- package/dist/{icon-03e86700.js → Icon.js} +61 -32
- package/dist/Input.d.ts +7 -16
- package/dist/Input.d.ts.map +1 -1
- package/dist/Input.js +24 -28
- package/dist/LeuElement-6de6f209.d.ts +7 -0
- package/dist/LeuElement-6de6f209.d.ts.map +1 -0
- package/dist/LeuElement-6de6f209.js +43 -0
- 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 -19
- package/dist/Radio.d.ts +4 -2
- package/dist/Radio.d.ts.map +1 -1
- package/dist/Radio.js +9 -16
- package/dist/RadioGroup.d.ts +2 -2
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +4 -6
- 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 -183
- package/dist/Table.d.ts +2 -6
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +17 -18
- package/dist/VisuallyHidden.d.ts +2 -2
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +5 -7
- 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 +116 -79
- package/dist/vue/index.d.ts +80 -76
- package/dist/web-types.json +405 -270
- 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 +10 -4
- package/src/components/chip/ChipLink.js +3 -7
- package/src/components/chip/ChipRemovable.js +8 -11
- package/src/components/chip/ChipSelectable.js +11 -17
- package/src/components/chip/chip.css +3 -4
- 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-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 +2 -2
- package/src/components/chip/test/chip-group.test.js +15 -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 +3 -5
- 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 +21 -23
- 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 +2 -2
- package/src/components/input/test/input.test.js +2 -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 +6 -3
- 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/_rollupPluginBabelHelpers-20f659f4.js +0 -30
- 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 = {
|
|
@@ -135,41 +126,26 @@ type LeuChipGroupProps = {
|
|
|
135
126
|
};
|
|
136
127
|
|
|
137
128
|
type LeuChipLinkProps = {
|
|
138
|
-
/** */
|
|
139
|
-
""?: LeuChipLink[""];
|
|
140
129
|
/** The size of the chip */
|
|
141
130
|
size?: LeuChipLink["size"];
|
|
142
131
|
/** */
|
|
143
132
|
href?: LeuChipLink["href"];
|
|
144
133
|
/** */
|
|
145
134
|
inverted?: LeuChipLink["inverted"];
|
|
146
|
-
/** */
|
|
147
|
-
label?: LeuChipLink["label"];
|
|
148
|
-
/** */
|
|
149
|
-
""?: LeuChipLink[""];
|
|
150
135
|
};
|
|
151
136
|
|
|
152
137
|
type LeuChipRemovableProps = {
|
|
153
|
-
/** */
|
|
154
|
-
""?: LeuChipRemovable[""];
|
|
155
138
|
/** */
|
|
156
139
|
inverted?: LeuChipRemovable["inverted"];
|
|
157
|
-
|
|
158
|
-
label?: LeuChipRemovable["label"];
|
|
159
|
-
/** */
|
|
160
|
-
""?: LeuChipRemovable[""];
|
|
140
|
+
|
|
161
141
|
/** Dispatched when the user clicks on the chip */
|
|
162
142
|
onRemove?: (e: CustomEvent<never>) => void;
|
|
163
143
|
};
|
|
164
144
|
|
|
165
145
|
type LeuChipSelectableProps = {
|
|
166
|
-
/** */
|
|
167
|
-
""?: LeuChipSelectable[""];
|
|
168
146
|
/** The size of the chip. Not supported for radio variant. */
|
|
169
147
|
size?: LeuChipSelectable["size"];
|
|
170
|
-
/**
|
|
171
|
-
- `toggle`: The chip behaves like a toggle button.
|
|
172
|
-
- `radio`: The chip behaves like a radio button. */
|
|
148
|
+
/** `toggle` or `radio`. Determines if only one or multiple chips can be selected. */
|
|
173
149
|
variant?: LeuChipSelectable["variant"];
|
|
174
150
|
/** */
|
|
175
151
|
selected?: LeuChipSelectable["selected"];
|
|
@@ -177,10 +153,7 @@ type LeuChipSelectableProps = {
|
|
|
177
153
|
value?: LeuChipSelectable["value"];
|
|
178
154
|
/** */
|
|
179
155
|
inverted?: LeuChipSelectable["inverted"];
|
|
180
|
-
|
|
181
|
-
label?: LeuChipSelectable["label"];
|
|
182
|
-
/** */
|
|
183
|
-
""?: LeuChipSelectable[""];
|
|
156
|
+
|
|
184
157
|
/** */
|
|
185
158
|
onInput?: (e: CustomEvent<CustomEvent>) => void;
|
|
186
159
|
};
|
|
@@ -191,11 +164,21 @@ type LeuDropdownProps = {
|
|
|
191
164
|
/** */
|
|
192
165
|
expanded?: LeuDropdown["expanded"];
|
|
193
166
|
/** */
|
|
167
|
+
hasSlotController?: LeuDropdown["hasSlotController"];
|
|
168
|
+
/** */
|
|
194
169
|
_documentClickHandler?: LeuDropdown["_documentClickHandler"];
|
|
195
170
|
/** */
|
|
196
|
-
|
|
171
|
+
_menuItemClickHandler?: LeuDropdown["_menuItemClickHandler"];
|
|
172
|
+
/** Close the dropdown when the user presses the Escape or the Tab key.
|
|
173
|
+
Navigating the menu with the arrow keys is handled by the menu itself. */
|
|
174
|
+
_keyDownMenuHandler?: LeuDropdown["_keyDownMenuHandler"];
|
|
197
175
|
/** */
|
|
198
|
-
|
|
176
|
+
_toggleRef?: LeuDropdown["_toggleRef"];
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
type LeuIconProps = {
|
|
180
|
+
/** The name of the icon to display. */
|
|
181
|
+
name?: LeuIcon["name"];
|
|
199
182
|
};
|
|
200
183
|
|
|
201
184
|
type LeuInputProps = {
|
|
@@ -248,28 +231,26 @@ type LeuInputProps = {
|
|
|
248
231
|
onChange?: (e: CustomEvent<CustomEvent>) => void;
|
|
249
232
|
};
|
|
250
233
|
|
|
251
|
-
type LeuMenuProps = {
|
|
234
|
+
type LeuMenuProps = {
|
|
235
|
+
/** This has only an effect when the role is 'menu'. It defines which role the menu items will get. Default is 'none'. */
|
|
236
|
+
selects?: LeuMenu["selects"];
|
|
237
|
+
/** */
|
|
238
|
+
value?: LeuMenu["value"];
|
|
239
|
+
};
|
|
252
240
|
|
|
253
241
|
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
|
-
/** */
|
|
242
|
+
/** Defines if the item is selected or checked */
|
|
263
243
|
active?: LeuMenuItem["active"];
|
|
264
|
-
/**
|
|
265
|
-
This is just a visual effect and does not change the active state. */
|
|
266
|
-
highlighted?: LeuMenuItem["highlighted"];
|
|
267
|
-
/** */
|
|
244
|
+
/** Disables the underlying button or link */
|
|
268
245
|
disabled?: LeuMenuItem["disabled"];
|
|
269
|
-
/**
|
|
270
|
-
|
|
271
|
-
/**
|
|
246
|
+
/** If the item should be focusable. Will be reflected as `tabindex` to the underlying button or link */
|
|
247
|
+
tabbable?: LeuMenuItem["tabbable"];
|
|
248
|
+
/** The href of the underlying link */
|
|
272
249
|
href?: LeuMenuItem["href"];
|
|
250
|
+
/** The value of the item. It must not contain commas. See `getValue()` */
|
|
251
|
+
value?: LeuMenuItem["value"];
|
|
252
|
+
/** The role of the item. This will be reflected as `role` to the underlying button or link. Default is `'menuitem'.` */
|
|
253
|
+
componentRole?: LeuMenuItem["componentRole"];
|
|
273
254
|
};
|
|
274
255
|
|
|
275
256
|
type LeuPaginationProps = {
|
|
@@ -279,10 +260,7 @@ type LeuPaginationProps = {
|
|
|
279
260
|
itemsPerPage?: LeuPagination["itemsPerPage"];
|
|
280
261
|
/** */
|
|
281
262
|
numOfItems?: LeuPagination["numOfItems"];
|
|
282
|
-
/**
|
|
283
|
-
already clamped page number. Should only
|
|
284
|
-
be accessed through the `page` getter and
|
|
285
|
-
setter. */
|
|
263
|
+
/** */
|
|
286
264
|
_page?: LeuPagination["_page"];
|
|
287
265
|
/** */
|
|
288
266
|
page?: LeuPagination["page"];
|
|
@@ -329,13 +307,9 @@ type LeuRadioProps = {
|
|
|
329
307
|
/** */
|
|
330
308
|
disabled?: LeuRadio["disabled"];
|
|
331
309
|
/** */
|
|
332
|
-
identifier?: LeuRadio["identifier"];
|
|
333
|
-
/** */
|
|
334
310
|
value?: LeuRadio["value"];
|
|
335
311
|
/** */
|
|
336
312
|
name?: LeuRadio["name"];
|
|
337
|
-
/** */
|
|
338
|
-
label?: LeuRadio["label"];
|
|
339
313
|
};
|
|
340
314
|
|
|
341
315
|
type LeuRadioGroupProps = {
|
|
@@ -365,30 +339,34 @@ type LeuScrollTopProps = {
|
|
|
365
339
|
};
|
|
366
340
|
|
|
367
341
|
type LeuSelectProps = {
|
|
368
|
-
/**
|
|
342
|
+
/** 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. */
|
|
343
|
+
value?: LeuSelect["value"];
|
|
344
|
+
/** Reflects to the name attribute of the hidden input field that would be used in a form */
|
|
345
|
+
name?: LeuSelect["name"];
|
|
346
|
+
/** The expanded state of the popup */
|
|
369
347
|
open?: LeuSelect["open"];
|
|
370
|
-
/**
|
|
348
|
+
/** The label of the select */
|
|
371
349
|
label?: LeuSelect["label"];
|
|
372
|
-
/**
|
|
373
|
-
options?: LeuSelect["options"];
|
|
374
|
-
/** */
|
|
375
|
-
value?: LeuSelect["value"];
|
|
376
|
-
/** */
|
|
350
|
+
/** Show a clearable button to reset the value */
|
|
377
351
|
clearable?: LeuSelect["clearable"];
|
|
378
|
-
/**
|
|
352
|
+
/** If the select should be disabled */
|
|
379
353
|
disabled?: LeuSelect["disabled"];
|
|
380
|
-
/**
|
|
354
|
+
/** Show an input field to filter the options inside the popup */
|
|
381
355
|
filterable?: LeuSelect["filterable"];
|
|
382
|
-
/**
|
|
356
|
+
/** Allow multiple selections */
|
|
383
357
|
multiple?: LeuSelect["multiple"];
|
|
384
358
|
/** */
|
|
385
|
-
|
|
359
|
+
_optionFilter?: LeuSelect["_optionFilter"];
|
|
360
|
+
/** */
|
|
361
|
+
_hasFilterResults?: LeuSelect["_hasFilterResults"];
|
|
386
362
|
/** */
|
|
387
|
-
|
|
363
|
+
_displayValue?: LeuSelect["_displayValue"];
|
|
388
364
|
/** */
|
|
389
|
-
|
|
365
|
+
_optionFilterRef?: LeuSelect["_optionFilterRef"];
|
|
390
366
|
/** */
|
|
391
|
-
|
|
367
|
+
_toggleButtonRef?: LeuSelect["_toggleButtonRef"];
|
|
368
|
+
/** */
|
|
369
|
+
_menuRef?: LeuSelect["_menuRef"];
|
|
392
370
|
};
|
|
393
371
|
|
|
394
372
|
type LeuTableProps = {
|
|
@@ -474,6 +452,11 @@ export type CustomElements = {
|
|
|
474
452
|
*
|
|
475
453
|
* ---
|
|
476
454
|
*
|
|
455
|
+
*
|
|
456
|
+
* ### **Slots:**
|
|
457
|
+
* - **before** - The icon to display before the label
|
|
458
|
+
* - **after** - The icon to display after the label
|
|
459
|
+
* - _default_ - The label of the button or the icon if no label is set
|
|
477
460
|
*/
|
|
478
461
|
"leu-button": DefineComponent<LeuButtonProps>;
|
|
479
462
|
|
|
@@ -546,7 +529,7 @@ export type CustomElements = {
|
|
|
546
529
|
*
|
|
547
530
|
*
|
|
548
531
|
* ### **Events:**
|
|
549
|
-
* - **input**
|
|
532
|
+
* - **input**
|
|
550
533
|
*
|
|
551
534
|
* ### **Slots:**
|
|
552
535
|
* - _default_ - The content of the chip
|
|
@@ -560,6 +543,19 @@ export type CustomElements = {
|
|
|
560
543
|
*/
|
|
561
544
|
"leu-dropdown": DefineComponent<LeuDropdownProps>;
|
|
562
545
|
|
|
546
|
+
/**
|
|
547
|
+
* A component to render all defined zhWeb icons.
|
|
548
|
+
* The `fill` of the icon is set to `currentColor` and
|
|
549
|
+
* can be overriden by setting the css `color` property.
|
|
550
|
+
* If the icon name is not found, a placeholder will be displayed.
|
|
551
|
+
* ---
|
|
552
|
+
*
|
|
553
|
+
*
|
|
554
|
+
* ### **CSS Properties:**
|
|
555
|
+
* - **--leu-icon-size** - The size of the icon. _(default: undefined)_
|
|
556
|
+
*/
|
|
557
|
+
"leu-icon": DefineComponent<LeuIconProps>;
|
|
558
|
+
|
|
563
559
|
/**
|
|
564
560
|
* A text input element.
|
|
565
561
|
* ---
|
|
@@ -577,7 +573,7 @@ export type CustomElements = {
|
|
|
577
573
|
* e.g.
|
|
578
574
|
* `tooLong(this.maxlength)`
|
|
579
575
|
* This way the framework user can create reasonable validation messages
|
|
580
|
-
* - **renderErrorMessages(
|
|
576
|
+
* - **renderErrorMessages(): _TemplateResult | nothing_** - Creates an error list with an item for the given validity state.
|
|
581
577
|
*/
|
|
582
578
|
"leu-input": DefineComponent<LeuInputProps>;
|
|
583
579
|
|
|
@@ -593,6 +589,9 @@ export type CustomElements = {
|
|
|
593
589
|
* ---
|
|
594
590
|
*
|
|
595
591
|
*
|
|
592
|
+
* ### **Methods:**
|
|
593
|
+
* - **getValue(): _string_** - Returns the value of the item. If `value` is not set, it will return the inner text
|
|
594
|
+
*
|
|
596
595
|
* ### **Slots:**
|
|
597
596
|
* - _default_ - The label of the menu item
|
|
598
597
|
*/
|
|
@@ -604,7 +603,7 @@ export type CustomElements = {
|
|
|
604
603
|
*
|
|
605
604
|
*
|
|
606
605
|
* ### **Events:**
|
|
607
|
-
* - **leu:pagechange**
|
|
606
|
+
* - **leu:pagechange**
|
|
608
607
|
*/
|
|
609
608
|
"leu-pagination": DefineComponent<LeuPaginationProps>;
|
|
610
609
|
|
|
@@ -642,7 +641,12 @@ export type CustomElements = {
|
|
|
642
641
|
*
|
|
643
642
|
*
|
|
644
643
|
* ### **Methods:**
|
|
645
|
-
* - **
|
|
644
|
+
* - **_updateMenuItems(changed)** - Apply the current state to the menu items.
|
|
645
|
+
* - Set the active property when the value property has changed.
|
|
646
|
+
* - Hide menu items that do not match the filter.
|
|
647
|
+
* - **_getDisplayValue(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.
|
|
648
|
+
* - **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.
|
|
649
|
+
* - **_handlePopupFocusOut(event)** - Close the dropdown if the focus moves outside the component.
|
|
646
650
|
*
|
|
647
651
|
* ### **Slots:**
|
|
648
652
|
* - **before** - Optional content the appears before the option list
|